|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.services.information.metadata.dav.DAVEntity
public class DAVEntity
DAVEntity is a common class for DAVFolder and DAVItem. It implements the functions that are common to both sub-classes. In addition to these functions, a DAV entity has a set of properties, manipulated through the AttributesInterface.
Field Summary | |
---|---|
protected java.lang.String |
_acl
A serialized XML string from the ACL property on the resource |
protected java.lang.String |
_descAttribute
|
protected java.lang.String |
_fullUrl
|
protected java.lang.String |
_name
|
protected java.lang.String |
_nameAttribute
|
protected java.lang.String |
_objectClass
|
protected java.util.Map |
_properties
|
protected RepositoryInterface |
_repos
|
protected java.lang.String |
_reposId
|
protected DAVResource |
_resource
|
protected java.util.Map |
_schemaProperties
|
protected java.util.List |
aclList
A list containing the access control entries from the ACL property on the resource. |
protected byte[] |
content
|
protected boolean |
hasBeenFetched
|
static int |
LOCAL
The variable has been set by the local client, and has not been saved in the persisten store. |
static int |
STORE
The value reflects the current value from the persistent store. |
static int |
UNSET
A variable is unset from either the persistent store or locally from the client. |
Constructor Summary | |
---|---|
DAVEntity(com.sas.services.information.RepositoryData entity)
Creates a new DAVEntity from the entity (property map) |
|
DAVEntity(RepositoryInterface repos,
java.lang.String reposId)
Creates a new DAVEntity for the entity with a repository id reposId
in the repository repos |
|
DAVEntity(java.lang.String url,
java.util.Map properties)
Creates a new DAVEntity from the url and a property map |
Method Summary | |
---|---|
void |
addAccessControlEntry(AccessControlEntryInterface ace)
Add an access control entry to the ACL |
void |
addAttribute(java.lang.String key,
java.lang.Object value)
Add an attribute with the given name and value |
void |
addAttributes(java.util.Map attributeMap)
Add a number of attributes - names and values are given in the map. |
protected void |
addUpdateMultiple(java.lang.String attributeName,
java.util.ArrayList newValue)
Add a multivalued property update. |
protected void |
addUpdateSingle(java.lang.String attributeName,
java.lang.String newValue)
Add a single valued property update |
void |
clearLocalLists()
Clear the set and remove update lists. |
void |
commitUpdates()
Commit the pending updates to the repository (setting or removing properties) |
DAVEntityInterface |
copy(DAVFolderInterface folder)
Copy the entity to another folder. |
void |
delete()
Delete this entity |
void |
deleteAttribute(java.lang.String key)
Delete a specific attribute |
void |
deleteAttributes(java.util.List attributes)
Delete a list of attributes. |
void |
fetchEntity()
Physically retrieve the entity from the repository and update the properties. |
java.util.List |
getAccessControlList()
|
java.lang.String |
getACL()
Get the ACL for this entity |
java.lang.String |
getAttribute(java.lang.String key)
Get the value of the attribute with the given key/name. |
java.util.Map |
getAttributes()
Get a list of all the attributes. |
java.lang.String |
getCreateDate()
Returns the creation date, if it exists, null otherwise |
DAVResource |
getDAVResource()
Return the underlying DAVResource for this entity, if it exists (that is if it has been fetched) |
java.lang.String |
getDescription()
Return the entity's description property |
DAVFolderInterface |
getFolder()
Get the folder that contains this entity. |
java.lang.String |
getGUID()
Return the GUID for this entity, if one has been set. |
java.lang.String |
getModifyDate()
Returns the last modified date, if it exists, null otherwise |
java.lang.String |
getName()
Get the name of the entity. |
java.lang.String |
getObjectClass()
Return the type (object class) of this entity. |
java.util.Map |
getProperties()
Get properties/attributes for this entity |
java.lang.String[] |
getRemarksKeys()
Get a list of entity keys for the remarks or dicussion threads relating to this object. |
java.util.Map |
getRemoveUpdates()
If there are any updates to remove properties, then return this list |
java.lang.String |
getReposId()
Get the repository identifier for this entity. |
RepositoryInterface |
getRepository()
Get the repository associated with this entity |
java.util.Map |
getSetUpdates()
If there are any updates to set property values, then return this list |
java.lang.String |
getType()
Get the entity's object type. |
java.lang.String |
getUpdateableACL()
|
java.lang.String |
getUrl()
Get the url for this entity. |
java.lang.String |
getURL()
Return the full url as represented in a repository for this entity |
boolean |
isCollection()
Is this DAVEntity a collection (folder) or not? |
boolean |
isDeleted()
Has this entity been deleted? |
boolean |
isUpdatePending()
Are there any updates pending for this entity. |
DAVEntityInterface |
move(DAVFolderInterface folder)
Move the entity to another folder. |
void |
refresh()
Refresh this entity. |
void |
refresh(DAVEntityInterface entity)
Refresh this entity from the parameter. |
void |
removeAccessControlEntry(AccessControlEntryInterface ace)
Remove an access control entry from the ACL |
void |
setAccessControls(java.util.List aclList)
|
void |
setACL(java.lang.String acl)
Set the ACL for this entity |
void |
setAttribute(java.lang.String key,
java.lang.Object value)
Set the value of an attribute to the given value |
void |
setAttributes(java.util.Map attributeMap)
Set a number of attributes - names and values are given in the map |
void |
setContentClass(java.lang.String contentClass)
Set the contentClass for a paricular resource. |
void |
setDeleted()
Mark the entity as having been deleted. |
void |
setDescription(java.lang.String desc)
Set the entity's description property |
void |
setGUID(java.lang.String guid)
Set the GUID on this entity. |
void |
setName(java.lang.String name)
Set the name attribute |
void |
setRemarksKeys(java.lang.String[] keys)
Set the remarks or discussion threads relating to this object |
void |
setReposId(java.lang.String reposId)
Set the repository identifier for this entity. |
void |
setRepository(RepositoryInterface repos)
Set the repository associated with this entity. |
java.lang.String |
toString()
|
void |
update()
Persist any changes to the metadata back to the backing store. |
Field Detail |
---|
protected java.util.Map _properties
protected java.util.Map _schemaProperties
protected RepositoryInterface _repos
protected DAVResource _resource
protected java.lang.String _name
protected java.lang.String _fullUrl
protected java.lang.String _reposId
protected byte[] content
protected java.lang.String _acl
protected java.util.List aclList
protected boolean hasBeenFetched
public static final int UNSET
public static final int LOCAL
public static final int STORE
protected java.lang.String _nameAttribute
protected java.lang.String _descAttribute
protected java.lang.String _objectClass
Constructor Detail |
---|
public DAVEntity(java.lang.String url, java.util.Map properties)
url
- properties
- public DAVEntity(com.sas.services.information.RepositoryData entity)
entity
- public DAVEntity(RepositoryInterface repos, java.lang.String reposId)
reposId
in the repository repos
repos
- reposId
- Method Detail |
---|
public void delete() throws ServiceException, java.rmi.RemoteException
delete
in interface DAVEntityInterface
ServiceException
java.rmi.RemoteException
public DAVEntityInterface copy(DAVFolderInterface folder)
copy
in interface DAVEntityInterface
folder
- destination folder
public DAVEntityInterface move(DAVFolderInterface folder)
move
in interface DAVEntityInterface
folder
- destination folder
public java.lang.String getUrl()
getUrl
in interface DAVEntityInterface
public DAVFolderInterface getFolder()
getFolder
in interface DAVEntityInterface
public java.lang.String getName()
getName
in interface DAVEntityInterface
public java.lang.String getAttribute(java.lang.String key)
getAttribute
in interface AttributesInterface
key
- The name of the attribute/property
public java.util.Map getAttributes()
getAttributes
in interface AttributesInterface
public void setAttribute(java.lang.String key, java.lang.Object value)
setAttribute
in interface AttributesInterface
key
- The key/name for this attributevalue
- The value of this attribute, generally a Stringpublic void addAttribute(java.lang.String key, java.lang.Object value)
addAttribute
in interface AttributesInterface
key
- The key/name for this attributevalue
- The value of this attribute, generally a Stringpublic void deleteAttribute(java.lang.String key)
deleteAttribute
in interface AttributesInterface
key
- The name of the attribute to deletepublic void setAttributes(java.util.Map attributeMap)
setAttributes
in interface AttributesInterface
attributeMap
- Map containing the name/value pairs to setpublic void addAttributes(java.util.Map attributeMap)
addAttributes
in interface AttributesInterface
attributeMap
- Map containing the name/value pairs to addpublic void deleteAttributes(java.util.List attributes)
deleteAttributes
in interface AttributesInterface
attributes
- List (of String) property namespublic java.lang.String getType()
getType
in interface DAVEntityInterface
public void setReposId(java.lang.String reposId)
setReposId
in interface DAVEntityInterface
reposId
- Repository identifier for this entitypublic java.lang.String getReposId()
getReposId
in interface DAVEntityInterface
public void setRepository(RepositoryInterface repos)
repos
- The repository that holds this entitypublic boolean isCollection()
isCollection
in interface DAVEntityInterface
public boolean isUpdatePending()
isUpdatePending
in interface DAVEntityInterface
public void clearLocalLists()
public void refresh(DAVEntityInterface entity)
refresh
in interface DAVEntityInterface
entity
- A DAVEntity from which to obtain the latest propertiespublic void refresh()
refresh
in interface DAVEntityInterface
public java.lang.String toString()
toString
in class java.lang.Object
protected void addUpdateSingle(java.lang.String attributeName, java.lang.String newValue)
attributeName
- Attribute to be changednewValue
- New atrribute valueprotected void addUpdateMultiple(java.lang.String attributeName, java.util.ArrayList newValue)
public void commitUpdates() throws ServiceException, java.rmi.RemoteException
ServiceException
- If a service level error occurs.
java.rmi.RemoteException
- In the event of remote object failure.public void update() throws ServiceException, java.rmi.RemoteException
update
in interface DAVEntityInterface
ServiceException
- in the case of a services failure
java.rmi.RemoteException
- in the case of network failurespublic void setContentClass(java.lang.String contentClass)
setContentClass
in interface DAVEntityInterface
contentClass
- The content class to set for this entitypublic RepositoryInterface getRepository()
getRepository
in interface DAVEntityInterface
public void setName(java.lang.String name)
setName
in interface DAVEntityInterface
name
- Value for the name attributepublic java.lang.String getDescription()
getDescription
in interface DAVEntityInterface
public void setDescription(java.lang.String desc)
setDescription
in interface DAVEntityInterface
desc
- The value for the description property of the entitypublic java.lang.String getObjectClass()
public java.lang.String getURL()
getURL
in interface DAVEntityInterface
public java.util.Map getProperties()
getProperties
in interface DAVEntityInterface
public java.util.Map getSetUpdates()
getSetUpdates
in interface DAVEntityInterface
public java.util.Map getRemoveUpdates()
getRemoveUpdates
in interface DAVEntityInterface
public DAVResource getDAVResource()
getDAVResource
in interface DAVEntityInterface
public void fetchEntity()
public java.lang.String getCreateDate()
DAVEntityInterface
null
otherwise
getCreateDate
in interface DAVEntityInterface
public java.lang.String getModifyDate()
DAVEntityInterface
null
otherwise
getModifyDate
in interface DAVEntityInterface
public java.lang.String[] getRemarksKeys()
DAVEntityInterface
getRemarksKeys
in interface DAVEntityInterface
public void setRemarksKeys(java.lang.String[] keys)
DAVEntityInterface
setRemarksKeys
in interface DAVEntityInterface
keys
- An array of entity keys for the remarks relating to this object.public void setACL(java.lang.String acl)
DAVEntityInterface
setACL
in interface DAVEntityInterface
acl
- An XML element string that defines the WebDAV ACL for this resourcepublic java.lang.String getACL()
DAVEntityInterface
getACL
in interface DAVEntityInterface
public java.util.List getAccessControlList()
getAccessControlList
in interface DAVEntityInterface
public void setAccessControls(java.util.List aclList)
public java.lang.String getUpdateableACL()
getUpdateableACL
in interface DAVEntityInterface
public boolean isDeleted()
DAVEntityInterface
isDeleted
in interface DAVEntityInterface
public void setDeleted()
DAVEntityInterface
setDeleted
in interface DAVEntityInterface
public java.lang.String getGUID()
getGUID
in interface DAVEntityInterface
public void setGUID(java.lang.String guid)
setGUID
in interface DAVEntityInterface
guid
- The GUID to be set on this entitypublic void addAccessControlEntry(AccessControlEntryInterface ace)
DAVEntityInterface
addAccessControlEntry
in interface DAVEntityInterface
ace
- Access control entry to be added to the ACLpublic void removeAccessControlEntry(AccessControlEntryInterface ace)
DAVEntityInterface
removeAccessControlEntry
in interface DAVEntityInterface
ace
- Access control entry to be removed from the ACL
|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |