***  This class provides Binary Compatibility only, not Source Compatibility  ***

com.sas.services.information.metadata
Class Content

com.sas.services.information.metadata.Content
All Implemented Interfaces:
ContentInterface, MetadataInterface, PublicObjectInterface, java.io.Serializable, java.rmi.Remote
Direct Known Subclasses:
DavBinaryPackage, DavEvent

public class Content
implements ContentInterface

Content is an example of a smartobject that surfaces content from the underlying repository entity (DAV is an example a repository where entities have content).

Since:
1.1
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.sas.services.information.metadata.Metadata
_actionInterfaces, _children, _isCompatible, _isDestroyPending, _isReadCompatible, _myRefreshInterval, _myState, _omrCreateDate, _omrModifyDate, _repository, _repositoryFlag, _repositoryObject, _treeRefreshTime, formats, gmtZone, OMSOBJ_STRING, REPOSITORY_DAV, REPOSITORY_LOMR, REPOSITORY_NONE, REPOSITORY_OMR, SLASH
 
Fields inherited from interface com.sas.services.information.metadata.MetadataInterface
METADATA_STATE_DELETED, METADATA_STATE_DESTROYED, METADATA_STATE_NEW, METADATA_STATE_NORMAL, PERMISSION_READMETADATA, PERMISSION_WRITEMETADATA
 
Constructor Summary
  Content()
          Creates a new Content object
protected Content(java.lang.Class subClass)
          Creates a new Content object
  Content(java.lang.Object o)
          Creates a new Content object that incorporates the object passed to the constructor
protected Content(java.lang.Object o, java.lang.Class subClass)
          Creates a new Content object that incorporates the object passed to the constructor
 
Method Summary
 byte[] getContentAsBytes()
          Return the content of the repository entity as a byte array
 java.io.InputStream getContentAsStream()
          Return the content of the repository entity as a stream
 java.lang.String getContentAsString()
          Return the content of the repository entity as a String
 java.lang.String getContentType()
          Gets the content type.
 java.lang.String getProperty(java.lang.String propertyName)
          Deprecated. As of release 9.2, replaced by MetadataInterface.getAttribute(String)
 java.lang.String getType()
          Get the smartobject type - this is a "content" provider
 void setContent(java.lang.String content)
          Set the content of the repository entity
 void setContentFromBytes(byte[] content)
          Set the content of the repository entity from an input stream
 void setContentFromStream(java.io.InputStream contentStream)
          Set the content of the repository entity from an input stream.
 void setContentType(java.lang.String contentType)
          Sets the content type.
 void setProperty(java.lang.String propertyName, java.lang.String propertyValue)
          Deprecated. As of release 9.2, replaced by MetadataInterface.setAttribute(String,String)
 
Methods inherited from class com.sas.services.information.metadata.Metadata
add, addAccessControl, addAttribute, addAttributes, addDocument, addExtension, addGroup, addImplementor, addKeyword, addObjectProperty, addObjectProperty, addPermissions, addProcessorInterface, addPrompt, addPropertySet, addRemark, addResponsibleParty, addToList, addTransactionListener, addUsedByPrototype, checkin, checkout, checkPulse, clearInformationService, commit, copyTo, countAssociatedObjects, delete, deleteAttribute, deleteAttributes, deleteRootObject, destroy, fromByteArray, getAccessControls, getAttribute, getAttributes, getAuthorizationUtil, getContainer, getCreateDate, getDefaultLocalizableProperties, getDescription, getDocuments, getEntityKey, getEntityURL, getExtensions, getGroups, getGUID, getIdentifier, getIdentities, getImplementors, getInformationService, getKeywords, getLockedBy, getModifyDate, getName, getObjectProperties, getObjectURI, getParent, getParentPath, getParents, getPath, getPaths, getPathUrl, getPathUrl, getPermission, getPermissions, getPermissions, getPreviousVersionNames, getPrimaryPropertyGroup, getProcessorInterface, getPrompt, getPrompts, getPropertyBag, getPropertySets, getRemarksList, getReposId, getRepository, getRepositoryEntity, getRepositoryName, getReposKey, getResponsibleParties, getState, getTrackingId, getTreeRefresh, getTypeDescriptor, getUsageVersion, getUsedByPrototypes, getUsingPrototype, getVersion, hashCode, isAuthorized, isCompatible, isConnectionException, isDeleted, isDestroyed, isLoggingEnabled, isLoggingEnabled, isObjectAlive, isReadCompatible, logFormat, logFormat, logFormat, logFormat, logFormat, logFormat, logFormat, logFormat, logMessage, logMessage, logMessage, logMessage, logThrowable, logThrowable, mapNameToFilesystem, mapUrlToFilesystem, moveTo, newServiceObject, notifyTransactionListeners, refresh, removeAccessControl, removeDocument, removeExtension, removeFromList, removeGroup, removeImplementor, removeKeyword, removeObjectProperty, removePermissions, removePrompt, removePropertySet, removeResponsibleParty, removeUsedByPrototype, rollback, setAttribute, setAttributes, setCompatibility, setDefaultLocalizableProperties, setDeleted, setDescription, setDocuments, setExtensions, setGroups, setGUID, setKeywords, setName, setObjectProperties, setPermission, setPrimaryPropertyGroup, setPrompt, setPrompts, setRemarksList, setRepository, setTreeRefresh, setUsingPrototype, startTransaction, toByteArray, toString, transactionEvent, uncheckout, update, updateFromBag, validateNameAndFolder, validateNameAndFolder, version
 
Methods inherited from interface com.sas.services.information.metadata.MetadataInterface
add, addAccessControl, addAttribute, addAttributes, addDocument, addExtension, addGroup, addImplementor, addKeyword, addObjectProperty, addObjectProperty, addPermissions, addPrompt, addPropertySet, addRemark, addResponsibleParty, addTransactionListener, addUsedByPrototype, checkin, checkout, commit, copyTo, countAssociatedObjects, delete, deleteAttribute, deleteAttributes, destroy, getAccessControls, getAttribute, getAttributes, getAuthorizationUtil, getCreateDate, getDescription, getDocuments, getEntityKey, getEntityURL, getExtensions, getGroups, getGUID, getIdentities, getImplementors, getKeywords, getLockedBy, getModifyDate, getObjectProperties, getParent, getParentPath, getParents, getPath, getPaths, getPermission, getPermissions, getPermissions, getPreviousVersionNames, getPrimaryPropertyGroup, getPrompt, getPrompts, getPropertyBag, getPropertySets, getRemarksList, getReposId, getRepository, getRepositoryEntity, getRepositoryName, getReposKey, getResponsibleParties, getState, getTrackingId, getUsageVersion, getUsedByPrototypes, getUsingPrototype, getVersion, isAuthorized, isCompatible, isDeleted, isDestroyed, isLoggingEnabled, isObjectAlive, isReadCompatible, logMessage, mapNameToFilesystem, mapUrlToFilesystem, moveTo, newServiceObject, refresh, removeAccessControl, removeDocument, removeExtension, removeGroup, removeImplementor, removeKeyword, removeObjectProperty, removePermissions, removePrompt, removePropertySet, removeResponsibleParty, removeUsedByPrototype, rollback, setAttribute, setAttributes, setDeleted, setDescription, setDocuments, setExtensions, setGroups, setGUID, setKeywords, setName, setObjectProperties, setPermission, setPrimaryPropertyGroup, setPrompt, setPrompts, setRemarksList, setRepository, setUsingPrototype, startTransaction, toByteArray, transactionEvent, uncheckout, update, updateFromBag, version
 
Methods inherited from interface com.sas.services.information.publicobject.PublicObjectInterface
addProcessorInterface, getContainer, getIdentifier, getName, getObjectURI, getPathUrl, getProcessorInterface, getTypeDescriptor
 

Constructor Detail

Content

public Content()
        throws java.rmi.RemoteException
Creates a new Content object

Throws:
java.rmi.RemoteException - if unable to export the remote object.

Content

public Content(java.lang.Object o)
        throws java.rmi.RemoteException
Creates a new Content object that incorporates the object passed to the constructor

Parameters:
o - Content object.
Throws:
java.rmi.RemoteException - if unable to export the remote object.

Content

protected Content(java.lang.Class subClass)
           throws java.rmi.RemoteException
Creates a new Content object

Parameters:
subClass - The subclass's class which should be used to determine the appropriate RMI socket factories.
Throws:
java.rmi.RemoteException - in the case of network failures

Content

protected Content(java.lang.Object o,
                  java.lang.Class subClass)
           throws java.rmi.RemoteException
Creates a new Content object that incorporates the object passed to the constructor

Parameters:
o - content
subClass - The subclass's class which should be used to determine the appropriate RMI socket factories.
Throws:
java.rmi.RemoteException - in the case of network failures
Method Detail

getContentAsString

public java.lang.String getContentAsString()
                                    throws java.rmi.RemoteException
Return the content of the repository entity as a String

Specified by:
getContentAsString in interface ContentInterface
Returns:
String The content of the repository entity
Throws:
java.rmi.RemoteException - in the case of network failures

getContentAsStream

public java.io.InputStream getContentAsStream()
                                       throws java.rmi.RemoteException
Return the content of the repository entity as a stream

Specified by:
getContentAsStream in interface ContentInterface
Returns:
InputStream The stream representing the content of the repository entity.
Throws:
java.rmi.RemoteException - in the case of network failures

getContentAsBytes

public byte[] getContentAsBytes()
                         throws java.rmi.RemoteException
Return the content of the repository entity as a byte array

Specified by:
getContentAsBytes in interface ContentInterface
Returns:
byte[] The byte array representing the content of the repository entity.
Throws:
java.rmi.RemoteException - in the case of network failures

getContentType

public java.lang.String getContentType()
                                throws java.rmi.RemoteException
Gets the content type. Returns the media type for the content of the resource. This information is required if a Content-Type header would have been returned in response to a GET request.

Specified by:
getContentType in interface ContentInterface
Returns:
String The media type of the content at this location. Returns an empty string if no content type property is available on the resource.
Throws:
java.rmi.RemoteException - in the case of network failures

setContentType

public void setContentType(java.lang.String contentType)
                    throws java.rmi.RemoteException
Sets the content type. Set the media type for the content of the resource.

Specified by:
setContentType in interface ContentInterface
Parameters:
contentType - The media type for the content
Throws:
java.rmi.RemoteException - in the case of network failures

setContent

public void setContent(java.lang.String content)
                throws java.rmi.RemoteException
Set the content of the repository entity

Specified by:
setContent in interface ContentInterface
Parameters:
content - A byte array with the actual content for the entity
Throws:
java.rmi.RemoteException - in the case of network failures

setContentFromStream

public void setContentFromStream(java.io.InputStream contentStream)
                          throws java.rmi.RemoteException
Set the content of the repository entity from an input stream. For remote deployment the InputStream should be wrapped in an InputStreamAdapter

Specified by:
setContentFromStream in interface ContentInterface
Parameters:
contentStream - An input stream representing the content
Throws:
java.rmi.RemoteException - in the case of network failures

setContentFromBytes

public void setContentFromBytes(byte[] content)
                         throws java.rmi.RemoteException
Set the content of the repository entity from an input stream

Specified by:
setContentFromBytes in interface ContentInterface
Parameters:
content - A byte array representing the content
Throws:
java.rmi.RemoteException - in the case of network failures

getType

public java.lang.String getType()
                         throws java.rmi.RemoteException
Get the smartobject type - this is a "content" provider

Specified by:
getType in interface MetadataInterface
Overrides:
getType in class Metadata
Returns:
A type string for the object.
Throws:
java.rmi.RemoteException - in the case of network failures

setProperty

public void setProperty(java.lang.String propertyName,
                        java.lang.String propertyValue)
                 throws java.rmi.RemoteException
Deprecated. As of release 9.2, replaced by MetadataInterface.setAttribute(String,String)

Set the value of a property

Specified by:
setProperty in interface ContentInterface
Parameters:
propertyName - The name, including namespace, of the property to be set
propertyValue - The value of the property to be set
Throws:
java.rmi.RemoteException - In the event of remote object failure.

getProperty

public java.lang.String getProperty(java.lang.String propertyName)
                             throws java.rmi.RemoteException
Deprecated. As of release 9.2, replaced by MetadataInterface.getAttribute(String)

Get the value of a property

Specified by:
getProperty in interface ContentInterface
Parameters:
propertyName - The name, including namespace, of the property to get
Returns:
String The value of the property
Throws:
java.rmi.RemoteException - In the event of remote object failure.

***  This class provides Binary Compatibility only, not Source Compatibility  ***




Copyright © 2009 SAS Institute Inc. All Rights Reserved.