*** This class provides Binary Compatibility only, not Source Compatibility ***
Class DAVItem
java.lang.Object
com.sas.services.information.metadata.dav.DAVEntity
com.sas.services.information.metadata.dav.DAVItem
- All Implemented Interfaces:
AttributesInterface,DAVEntityInterface,DAVItemInterface,Serializable
- Direct Known Subclasses:
DAVApplitem,DAVBinarypackage,DAVEvent
@SASScope("ALL")
@BinaryCompatibilityOnly
public class DAVItem
extends DAVEntity
implements DAVItemInterface
DAVItem represents a non-collection resource in a DAV Store. DAVEntity provides the
common functionality and DAVItem only the resource specific characteristics (eg.
content manipulation).
- Since:
- 1.0
- See Also:
-
Field Summary
Fields inherited from class com.sas.services.information.metadata.dav.DAVEntity
_acl, _descAttribute, _fullUrl, _name, _nameAttribute, _objectClass, _properties, _repos, _reposId, _resource, _schemaProperties, aclList, content, hasBeenFetched, LOCAL, STORE, UNSET -
Constructor Summary
ConstructorsConstructorDescriptionDAVItem(RepositoryData entity) Creates a new DAVFolder from the information in the entityDAVItem(RepositoryInterface repos, String reposId) Creates a new DAVItem for the entity with a repository idreposIdin the repositoryreposDAVItem(String url, Map properties) Creates a new DAVItem from the url and a property map -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckin()Check in the itemvoidcheckout()Check out the itemvoidClear local lists as for DAVEntity and then reset the contentsStatus for this resource to reflect the fact that the content is the same as in the DAV storeprotected voidfinalize()intGet the length of the contentInputStreamGet the contents of the item.byte[]Get the contents of the item as a byte arrayintReturns the status of the contents in the itemStringGet the content type for the item.booleanDoes this item have any new content that should be updated/persisted ?booleanAre there any updates pending for this entity.voidsetContents(byte[] contents) Set the contents of the item.voidsetContents(InputStream contents) Set the contents of the item from an input stream.voidSet the contents of the item from storevoidsetContentsStatus(int contentsStatus) Set the content status field.voidsetContentType(String contentType) Sets the content type for the item.StringtoString()voidUncheckout the itemMethods inherited from class com.sas.services.information.metadata.dav.DAVEntity
addAccessControlEntry, addAttribute, addAttributes, addUpdateMultiple, addUpdateSingle, commitUpdates, copy, delete, deleteAttribute, deleteAttributes, fetchEntity, getAccessControlList, getACL, getAttribute, getAttributes, getCreateDate, getDAVResource, getDescription, getFolder, getGUID, getModifyDate, getName, getObjectClass, getProperties, getRemarksKeys, getRemoveUpdates, getReposId, getRepository, getSetUpdates, getType, getUpdateableACL, getUrl, getURL, isCollection, isDeleted, move, refresh, refresh, removeAccessControlEntry, setAccessControls, setACL, setAttribute, setAttributes, setContentClass, setDeleted, setDescription, setGUID, setName, setRemarksKeys, setReposId, setRepository, updateMethods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.sas.services.information.metadata.dav.AttributesInterface
addAttribute, addAttributes, deleteAttribute, deleteAttributes, getAttribute, getAttributes, setAttribute, setAttributesMethods inherited from interface com.sas.services.information.metadata.dav.DAVEntityInterface
addAccessControlEntry, copy, delete, getAccessControlList, getACL, getCreateDate, getDAVResource, getDescription, getFolder, getGUID, getModifyDate, getName, getProperties, getRemarksKeys, getRemoveUpdates, getReposId, getRepository, getSetUpdates, getType, getUpdateableACL, getUrl, getURL, isCollection, isDeleted, move, refresh, refresh, removeAccessControlEntry, setACL, setContentClass, setDeleted, setDescription, setGUID, setName, setRemarksKeys, setReposId, update
-
Constructor Details
-
DAVItem
Creates a new DAVItem for the entity with a repository idreposIdin the repositoryrepos -
DAVItem
public DAVItem(String url, Map properties) Creates a new DAVItem from the url and a property map -
DAVItem
public DAVItem(RepositoryData entity) Creates a new DAVFolder from the information in the entity
-
-
Method Details
-
setContentType
public void setContentType(String contentType) Sets the content type for the item.- Specified by:
setContentTypein interfaceDAVItemInterface- Parameters:
contentType- A string that represents the media type for the item
-
getContentType
public String getContentType()Get the content type for the item.- Specified by:
getContentTypein interfaceDAVItemInterface- Returns:
- String The media type for the item's content
-
getContents
public InputStream getContents() throws RemoteExceptionGet the contents of the item.- Specified by:
getContentsin interfaceDAVItemInterface- Returns:
- InputStream An input stream that represents the item's contents
- Throws:
RemoteException- in the case of network failure
-
setContents
public void setContents(byte[] contents) Set the contents of the item.- Specified by:
setContentsin interfaceDAVItemInterface- Parameters:
contents- A byte array that represents the item's content
-
setContents
public void setContents(InputStream contents) Set the contents of the item from an input stream. For remote deployment the InputStream should be wrapped in anInputStreamAdapter- Specified by:
setContentsin interfaceDAVItemInterface- Parameters:
contents- An input stream containing the contents
-
setContentsfromStore
Set the contents of the item from store- Specified by:
setContentsfromStorein interfaceDAVItemInterface- Parameters:
r- A byte array that represents the item's content
-
getContentLength
public int getContentLength()Get the length of the content- Specified by:
getContentLengthin interfaceDAVItemInterface- Returns:
- int The length of the content
-
getContentsAsBytes
public byte[] getContentsAsBytes()Get the contents of the item as a byte array- Specified by:
getContentsAsBytesin interfaceDAVItemInterface- Returns:
- byte[] A byte array with the contents of the item
-
toString
public String toString() -
clearLocalLists
public void clearLocalLists()Clear local lists as for DAVEntity and then reset the contentsStatus for this resource to reflect the fact that the content is the same as in the DAV store- Overrides:
clearLocalListsin classDAVEntity
-
hasContentsUpdates
public boolean hasContentsUpdates()Does this item have any new content that should be updated/persisted ?- Specified by:
hasContentsUpdatesin interfaceDAVItemInterface- Returns:
- boolean Whether content has changed since the last update
-
finalize
protected void finalize() throws Throwable- Overrides:
finalizein classObject- Throws:
Throwable
-
setContentsStatus
public void setContentsStatus(int contentsStatus) Description copied from interface:DAVItemInterfaceSet the content status field.- Specified by:
setContentsStatusin interfaceDAVItemInterface- Parameters:
contentsStatus- The content status to be set
-
getContentsStatus
public int getContentsStatus()Returns the status of the contents in the item- Specified by:
getContentsStatusin interfaceDAVItemInterface- Returns:
- int The status of the content
-
isUpdatePending
public boolean isUpdatePending()Are there any updates pending for this entity. Any attribute sets or removes create a pending update.- Specified by:
isUpdatePendingin interfaceDAVEntityInterface- Overrides:
isUpdatePendingin classDAVEntity- Returns:
- boolean true is there are updates pending, false otherwise
-
checkout
public void checkout() throws RemoteExceptionCheck out the item- Specified by:
checkoutin interfaceDAVItemInterface- Throws:
RemoteException
-
checkin
public void checkin() throws RemoteExceptionCheck in the item- Specified by:
checkinin interfaceDAVItemInterface- Throws:
RemoteException
-
uncheckout
public void uncheckout() throws RemoteExceptionUncheckout the item- Specified by:
uncheckoutin interfaceDAVItemInterface- Throws:
RemoteException
-