|
| Services |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
java.lang.Object | +--com.sas.services.information.metadata.dav.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 String |
_acl
A serialized XML string from the ACL property on the resource |
protected String |
_descAttribute
|
protected String |
_fullUrl
|
protected String |
_name
|
protected String |
_nameAttribute
|
protected String |
_objectClass
|
protected Map |
_properties
|
protected RepositoryInterface |
_repos
|
protected String |
_reposId
|
protected DAVResource |
_resource
|
protected Map |
_schemaProperties
|
protected 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(RepositoryData entity)
Creates a new DAVEntity from the entity (property map) |
|
DAVEntity(RepositoryInterface repos,
String reposId)
Creates a new DAVEntity for the entity with a repository id reposId
in the repository repos |
|
DAVEntity(String url,
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(String key,
Object value)
Add an attribute with the given name and value |
void |
addAttributes(Map attributeMap)
Add a number of attributes - names and values are given in the map. |
protected void |
addUpdateMultiple(String attributeName,
ArrayList newValue)
Add a multivalued property update. |
protected void |
addUpdateSingle(String attributeName,
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(String key)
Delete a specific attribute |
void |
deleteAttributes(List attributes)
Delete a list of attributes. |
void |
fetchEntity()
Physically retrieve the entity from the repository and update the properties. |
List |
getAccessControlList()
|
String |
getACL()
Get the ACL for this entity |
String |
getAttribute(String key)
Get the value of the attribute with the given key/name. |
Map |
getAttributes()
Get a list of all the attributes. |
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) |
String |
getDescription()
Return the entity's description property |
DAVFolderInterface |
getFolder()
Get the folder that contains this entity. |
String |
getGUID()
Return the GUID for this entity, if one has been set. |
String |
getModifyDate()
Returns the last modified date, if it exists, null otherwise |
String |
getName()
Get the name of the entity. |
String |
getObjectClass()
Return the type (object class) of this entity. |
Map |
getProperties()
Get properties/attributes for this entity |
String[] |
getRemarksKeys()
Get a list of entity keys for the remarks or dicussion threads relating to this object. |
Map |
getRemoveUpdates()
If there are any updates to remove properties, then return this list |
String |
getReposId()
Get the repository identifier for this entity. |
RepositoryInterface |
getRepository()
Get the repository associated with this entity |
Map |
getSetUpdates()
If there are any updates to set property values, then return this list |
String |
getType()
Get the entity's object type. |
String |
getUpdateableACL()
|
String |
getUrl()
Get the url for this entity. |
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(List aclList)
|
void |
setACL(String acl)
Set the ACL for this entity |
void |
setAttribute(String key,
Object value)
Set the value of an attribute to the given value |
void |
setAttributes(Map attributeMap)
Set a number of attributes - names and values are given in the map |
void |
setContentClass(String contentClass)
Set the contentClass for a paricular resource. |
void |
setDeleted()
Mark the entity as having been deleted. |
void |
setDescription(String desc)
Set the entity's description property |
void |
setGUID(String guid)
Set the GUID on this entity. |
void |
setName(String name)
Set the name attribute |
void |
setRemarksKeys(String[] keys)
Set the remarks or discussion threads relating to this object |
void |
setReposId(String reposId)
Set the repository identifier for this entity. |
void |
setRepository(RepositoryInterface repos)
Set the repository associated with this entity. |
String |
toString()
|
void |
update()
Persist any changes to the metadata back to the backing store. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected Map _properties
protected Map _schemaProperties
protected RepositoryInterface _repos
protected DAVResource _resource
protected String _name
protected String _fullUrl
protected String _reposId
protected byte[] content
protected String _acl
protected List aclList
protected boolean hasBeenFetched
public static final int UNSET
public static final int LOCAL
public static final int STORE
protected String _nameAttribute
protected String _descAttribute
protected String _objectClass
| Constructor Detail |
public DAVEntity(String url,
Map properties)
public DAVEntity(RepositoryData entity)
public DAVEntity(RepositoryInterface repos,
String reposId)
reposId
in the repository repos| Method Detail |
public void delete()
throws ServiceException,
RemoteException
delete in interface DAVEntityInterfacepublic DAVEntityInterface copy(DAVFolderInterface folder)
copy in interface DAVEntityInterfacefolder - destination folderpublic DAVEntityInterface move(DAVFolderInterface folder)
move in interface DAVEntityInterfacefolder - destination folderpublic String getUrl()
getUrl in interface DAVEntityInterfacepublic DAVFolderInterface getFolder()
getFolder in interface DAVEntityInterfacecom.sas.services.information.metadata.dav.DAVEntityInterfacepublic String getName()
getName in interface DAVEntityInterfacepublic String getAttribute(String key)
getAttribute in interface AttributesInterfacecom.sas.services.information.metadata.dav.AttributesInterfacekey - The name of the attribute/propertypublic Map getAttributes()
getAttributes in interface AttributesInterfacecom.sas.services.information.metadata.dav.AttributesInterface
public void setAttribute(String key,
Object value)
setAttribute in interface AttributesInterfacecom.sas.services.information.metadata.dav.AttributesInterfacekey - The key/name for this attributevalue - The value of this attribute, generally a String
public void addAttribute(String key,
Object value)
addAttribute in interface AttributesInterfacecom.sas.services.information.metadata.dav.AttributesInterfacekey - The key/name for this attributevalue - The value of this attribute, generally a Stringpublic void deleteAttribute(String key)
deleteAttribute in interface AttributesInterfacecom.sas.services.information.metadata.dav.AttributesInterfacekey - The name of the attribute to deletepublic void setAttributes(Map attributeMap)
setAttributes in interface AttributesInterfacecom.sas.services.information.metadata.dav.AttributesInterfaceattributeMap - Map containing the name/value pairs to setpublic void addAttributes(Map attributeMap)
addAttributes in interface AttributesInterfacecom.sas.services.information.metadata.dav.AttributesInterfaceattributeMap - Map containing the name/value pairs to addpublic void deleteAttributes(List attributes)
deleteAttributes in interface AttributesInterfaceattributes - List (of String) property namespublic String getType()
getType in interface DAVEntityInterfacepublic void setReposId(String reposId)
setReposId in interface DAVEntityInterfacereposId - Repository identifier for this entitypublic String getReposId()
getReposId in interface DAVEntityInterfacepublic void setRepository(RepositoryInterface repos)
repos - The repository that holds this entitypublic boolean isCollection()
isCollection in interface DAVEntityInterfacepublic boolean isUpdatePending()
isUpdatePending in interface DAVEntityInterfacepublic void clearLocalLists()
public void refresh(DAVEntityInterface entity)
refresh in interface DAVEntityInterfaceentity - A DAVEntity from which to obtain the latest propertiespublic void refresh()
refresh in interface DAVEntityInterfacepublic String toString()
toString in class Object
protected void addUpdateSingle(String attributeName,
String newValue)
attributeName - Attribute to be changednewValue - New atrribute value
protected void addUpdateMultiple(String attributeName,
ArrayList newValue)
public void commitUpdates()
throws ServiceException,
RemoteException
public void update()
throws ServiceException,
RemoteException
update in interface DAVEntityInterfaceServiceException - in the case of a services failureRemoteException - in the case of network failurespublic void setContentClass(String contentClass)
setContentClass in interface DAVEntityInterfacecontentClass - The content class to set for this entitypublic RepositoryInterface getRepository()
getRepository in interface DAVEntityInterfacepublic void setName(String name)
setName in interface DAVEntityInterfacename - Value for the name attributepublic String getDescription()
getDescription in interface DAVEntityInterfacepublic void setDescription(String desc)
setDescription in interface DAVEntityInterfacedesc - The value for the description property of the entitypublic String getObjectClass()
public String getURL()
getURL in interface DAVEntityInterfacepublic Map getProperties()
getProperties in interface DAVEntityInterfacepublic Map getSetUpdates()
getSetUpdates in interface DAVEntityInterfacepublic Map getRemoveUpdates()
getRemoveUpdates in interface DAVEntityInterfacepublic DAVResource getDAVResource()
getDAVResource in interface DAVEntityInterfacepublic void fetchEntity()
public String getCreateDate()
DAVEntityInterfacenull otherwisegetCreateDate in interface DAVEntityInterfacecom.sas.services.information.metadata.dav.DAVEntityInterfacepublic String getModifyDate()
DAVEntityInterfacenull otherwisegetModifyDate in interface DAVEntityInterfacecom.sas.services.information.metadata.dav.DAVEntityInterfacepublic String[] getRemarksKeys()
DAVEntityInterfacegetRemarksKeys in interface DAVEntityInterfacecom.sas.services.information.metadata.dav.DAVEntityInterfacepublic void setRemarksKeys(String[] keys)
DAVEntityInterfacesetRemarksKeys in interface DAVEntityInterfacecom.sas.services.information.metadata.dav.DAVEntityInterfaceremarksKeys - An array of entity keys for the remarks relating to this object.public void setACL(String acl)
DAVEntityInterfacesetACL in interface DAVEntityInterfacecom.sas.services.information.metadata.dav.DAVEntityInterfaceacl - An XML element string that defines the WebDAV ACL for this resourcepublic String getACL()
DAVEntityInterfacegetACL in interface DAVEntityInterfacecom.sas.services.information.metadata.dav.DAVEntityInterfacepublic List getAccessControlList()
getAccessControlList in interface DAVEntityInterfacepublic void setAccessControls(List aclList)
public String getUpdateableACL()
getUpdateableACL in interface DAVEntityInterfacepublic boolean isDeleted()
DAVEntityInterfaceisDeleted in interface DAVEntityInterfacecom.sas.services.information.metadata.dav.DAVEntityInterfacepublic void setDeleted()
DAVEntityInterfacesetDeleted in interface DAVEntityInterfacepublic String getGUID()
getGUID in interface DAVEntityInterfacepublic void setGUID(String guid)
setGUID in interface DAVEntityInterfaceguid - The GUID to be set on this entitypublic void addAccessControlEntry(AccessControlEntryInterface ace)
DAVEntityInterfaceaddAccessControlEntry in interface DAVEntityInterfacecom.sas.services.information.metadata.dav.DAVEntityInterfaceace - Access control entry to be added to the ACLpublic void removeAccessControlEntry(AccessControlEntryInterface ace)
DAVEntityInterfaceremoveAccessControlEntry in interface DAVEntityInterfacecom.sas.services.information.metadata.dav.DAVEntityInterfaceace - Access control entry to be removed from the ACL
|
| Services |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||