|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.uwyn.rife.site.Validation
com.uwyn.rife.cmf.ContentInfo
public class ContentInfo
This class represents all the information that is stored in the backend
about a certain Content instance.
The setters of this class are only present to make it possible for the back-ends to automatically populate the information.
| Constructor Summary | |
|---|---|
ContentInfo()
Instantiates a new ContentInfo instance. |
|
| Method Summary | |
|---|---|
void |
activateValidation()
This method is called at least once and maximum once when any method related to Validated rules, subjects and group or Constrained properties are used. |
String |
getAttribute(String name)
Retrieves the value of a named content attribute. |
Map<String,String> |
getAttributes()
Retrieves the attributes map of the stored Content
instance. |
Timestamp |
getCreated()
Retrieves the moment when the Content instance was stored. |
String |
getFormattedSize()
Retrieves the size of the stored Content instance as a
formatted string. |
String |
getMimeType()
Retrieves the mime type of the stored Content instance. |
String |
getName()
Retrieves the name of the stored Content instance. |
String |
getOptimalPath()
Retrieves the path of the stored Content instance in the
most optimal form for usage in the cmf. |
String |
getPath()
Retrieves the path of the stored Content instance. |
Map<String,String> |
getProperties()
Retrieves the content data properties of the stored Content instance. |
String |
getProperty(String name)
Retrieves the value of a named content property. |
int |
getSize()
Retrieves the size of the stored Content instance. |
int |
getVersion()
Retrieves the version of the stored Content instance. |
boolean |
hasAttribute(String name)
Indicates whether a specific named content attribute is present. |
boolean |
hasAttributes()
Indicates whether named content attributes are present. |
boolean |
hasName()
Indicates whether the stored Content instance has a name. |
boolean |
hasProperties()
Indicates whether content data properties are present for the stored Content instance. |
boolean |
hasProperty(String name)
Indicates whether a specific named content property is present. |
boolean |
isFragment()
Retrieves wether the stored Content instance is a fragment
or not. |
void |
setAttributes(Map<String,String> attributes)
Sets the attributes map of the stored Content instance. |
void |
setCreated(Timestamp created)
Sets the moment when the Content instance was stored. |
void |
setFragment(boolean fragment)
Sets wether the stored Content instance is a fragment or
not. |
void |
setMimeType(String mimeType)
Sets the mime type of the stored Content instance. |
void |
setName(String name)
Sets the name of the stored Content instance. |
void |
setPath(String path)
Sets the path of the stored Content instance. |
void |
setProperties(Map<String,String> properties)
Sets the content data properties of the stored Content
instance. |
void |
setSize(int size)
Sets the size of the stored Content instance. |
void |
setVersion(int version)
Sets the version of the stored Content instance. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ContentInfo()
ContentInfo instance.
| Method Detail |
|---|
public void activateValidation()
ValidationBy overriding this method, you can thus isolate all the validation setup code code and don't enforce a performance penalty at each object construction when doing it in the default constructor.
activateValidation in class Validationpublic void setPath(String path)
Content instance.
The path has to be unique and will be used to retrieve this
particular Content.
path - the absolute and unique pathgetPath()public String getPath()
Content instance.
Content's pathsetPath(String),
getOptimalPath()public String getOptimalPath()
Content instance in the
most optimal form for usage in the cmf.
Content's most optimal pathgetPath()public void setVersion(int version)
Content instance.
Version numbers are unique and should be increased successively when
the data on a certain Content is updated.
The path and the version together identify exactly one particular
Content with one particular data.
version - the version as a unique integergetVersion()public int getVersion()
Content instance.
Content's versionsetVersion(int)public void setMimeType(String mimeType)
Content instance.
mimeType - the String that identifies the mime typegetMimeType()public String getMimeType()
Content instance.
Content's mime type textual identifiersetMimeType(String)public void setFragment(boolean fragment)
Content instance is a fragment or
not.
fragment - true if it's a fragment; or
false otherwise
isFragment()public boolean isFragment()
Content instance is a fragment
or not.
true if it's a fragment; or
false otherwise
setFragment(boolean)public void setName(String name)
Content instance.
name - the namegetName(),
hasName()public String getName()
Content instance.
null if the stored Content instance
has no name; or
the name of the content
setName(String),
hasName()public boolean hasName()
Content instance has a name.
true if it has a name; or
false otherwise
setName(String),
getName()public void setCreated(Timestamp created)
Content instance was stored.
created - the moment of creationgetCreated()public Timestamp getCreated()
Content instance was stored.
setCreated(Timestamp)public void setAttributes(Map<String,String> attributes)
Content instance.
attributes - the attributes map with String keys and
value.getAttributes()public Map<String,String> getAttributes()
Content
instance.
setAttributes(Map)public boolean hasAttributes()
true if named content attributes are present; or
false otherwise
setAttributes(Map),
getAttributes()public boolean hasAttribute(String name)
name - the name of the attribute
true if the name content attribute is present; or
false otherwise
getAttribute(String)public String getAttribute(String name)
name - the name of the attribute
null if no such attribute could be found
hasAttribute(String)public void setSize(int size)
Content instance.
size - the size of the cotent datagetSize()public int getSize()
Content instance.
Content's sizesetSize(int),
getFormattedSize()public String getFormattedSize()
Content instance as a
formatted string.
Content's formatted sizegetSize()public void setProperties(Map<String,String> properties)
Content
instance.
properties - the content data propertieshasProperties(),
getProperties()public boolean hasProperties()
Content instance.
true if properties are present; or
false otherwise
setProperties(Map),
getProperties()public boolean hasProperty(String name)
name - the name of the property
true if the name content property is present; or
false otherwise
getProperty(String)public String getProperty(String name)
name - the name of the property
null if no such property could be found
hasProperty(String)public Map<String,String> getProperties()
Content instance.
null if no content data properties are present
setProperties(Map),
hasProperties()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||