|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Resource
Common parts of nodes and directories interfaces.
Method Summary | |
---|---|
void |
copyTo(Directory dir,
java.lang.String newName,
java.lang.String logMessage)
Copies this resource to the given directory. |
void |
delete()
Deletes this node or directory (immediately, no save() is
needed). |
void |
deleteProperty(java.lang.String propertyName)
Deletes the the given property. |
ContentManager |
getContentManager()
Gets the content manager from which this resource was obtained from. |
java.lang.String |
getFullName()
Gets the full name of this resource, that is, path to this resource relative to the content manager this node was read from. |
long |
getLastModification()
Gets the last modification time of this node. |
java.util.Date |
getLastModificationDate()
Gets the last modification time of this node, represented as a date object. |
java.lang.String |
getName()
Gets the name of this resource (node/ directory). |
Directory |
getParent()
Gets a directory to which this node/ directory belongs. |
java.util.Map<java.lang.String,java.lang.String> |
getProperties()
Gets a map of all properties associated with this resource. |
java.lang.String |
getProperty(java.lang.String propertyName)
Gets the value of the given property. |
boolean |
hasModifications()
Checks if this resource has any modifications (that is, if any of its properties are changed, or content; new resources will always return "true" before a save). |
void |
moveTo(Directory dir,
java.lang.String logMessage)
Moves this resource to the given directory. |
void |
save(java.lang.String logMessage)
Saves modified properties and possibly content (in case of nodes). |
void |
setProperty(java.lang.String propertyName,
java.lang.String propertyValue)
Sets the value of the given property. |
Method Detail |
---|
void copyTo(Directory dir, java.lang.String newName, java.lang.String logMessage) throws CopyException
dir
- Directory to copy this resource to. This can't be a new and
not saved directory.newName
- New name of this resource (in directory dir after copying).logMessage
- Log message associated with this resource copy.
CopyException
void moveTo(Directory dir, java.lang.String logMessage) throws MoveException
dir
- Directory to move this resource to. This can't be a new and
not saved directory.logMessage
- Log message associated with this resource move.
MoveException
java.util.Map<java.lang.String,java.lang.String> getProperties() throws RepositoryException
RepositoryException
java.lang.String getProperty(java.lang.String propertyName) throws RepositoryException
propertyName
- Name of the property to get.
RepositoryException
void deleteProperty(java.lang.String propertyName) throws RepositoryException
propertyName
- Name of the property to delete.
RepositoryException
void setProperty(java.lang.String propertyName, java.lang.String propertyValue)
propertyName
- Name of the property to set. It must begin with a character,
and cannot contain any special characters (so the regexp to which
a property name must match would be [a-z][a-z0-9]*).propertyValue
- Value of the property to set.Directory getParent() throws RepositoryException
RepositoryException
void save(java.lang.String logMessage) throws SaveException, RepositoryException
logMessage
- Log message for saving this node/ directory.
SaveException
RepositoryException
void delete() throws DeleteException, RepositoryException
save()
is
needed). This resource should not be used after performing this
operation.
DeleteException
RepositoryException
java.lang.String getName()
java.lang.String getFullName()
boolean hasModifications()
long getLastModification() throws RepositoryException
RepositoryException
java.util.Date getLastModificationDate() throws RepositoryException
RepositoryException
ContentManager getContentManager()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |