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

Package com.sas.services.information.metadata

# Class Content

java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
com.sas.services.information.metadata.Metadata
com.sas.services.information.metadata.Content

All Implemented Interfaces:
  `ContentInterface`, `MetadataInterface`, `PublicObjectInterface`, `Serializable`, `Remote`

Direct Known Subclasses:
  `DavBinaryPackage`, `DavEvent`

@SASScope("ALL") @BinaryCompatibilityOnly public class Content extends Metadata 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 class java.rmi.server.RemoteObject

  `ref`

  ### 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

  Constructors
  Modifier
  Constructor
  Description
  ``
  `Content()`
  Creates a new Content object
  `protected`
  `Content(Class subClass)`
  Creates a new Content object
  ``
  `Content(Object o)`
  Creates a new Content object that incorporates the object passed to the constructor
  `protected`
  `Content(Object o, Class subClass)`
  Creates a new Content object that incorporates the object passed to the constructor

- ## Method Summary

  Modifier and Type
  Method
  Description
  `byte[]`
  `getContentAsBytes()`
  Return the content of the repository entity as a byte array
  `InputStream`
  `getContentAsStream()`
  Return the content of the repository entity as a stream
  `String`
  `getContentAsString()`
  Return the content of the repository entity as a String
  `String`
  `getContentType()`
  Gets the content type.
  `String`
  `getProperty(String propertyName)`
  Deprecated.
  As of release 9.2, replaced by `MetadataInterface.getAttribute(String)`
  `String`
  `getType()`
  Get the smartobject type - this is a "content" provider
  `void`
  `setContent(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(InputStream contentStream)`
  Set the content of the repository entity from an input stream.
  `void`
  `setContentType(String contentType)`
  Sets the content type.
  `void`
  `setProperty(String propertyName, 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, addNoteTextStore, addNoteTextStore, 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, getCreatedBy, getDefaultLocalizableProperties, getDescription, getDocuments, getEntityKey, getEntityURL, getExtensions, getGroups, getGUID, getIdentifier, getIdentities, getImplementors, getInformationService, getKeywords, getLockedBy, getModifiedBy, getModifyDate, getName, getNoteTextStore, getNoteTextStores, getNoteTextStoresByRole, 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, isObjectAlive, isReadCompatible, logFormat, logFormat, logFormat, logFormat, logMessage, logMessage, logThrowable, mapNameToFilesystem, mapUrlToFilesystem, moveTo, newServiceObject, notifyTransactionListeners, refresh, removeAccessControl, removeDocument, removeExtension, removeFromList, removeGroup, removeImplementor, removeKeyword, removeNoteTextStore, removeObjectProperty, removePermissions, removePrompt, removePropertySet, removeResponsibleParty, removeResponsiblePartyByIdentity, removeUsedByPrototype, reset, rollback, setAttribute, setAttributes, setCompatibility, setDefaultLocalizableProperties, setDeleted, setDescription, setDocuments, setExtensions, setGroups, setGUID, setKeywords, setName, setNoteTextStores, setObjectProperties, setPermission, setPrimaryPropertyGroup, setPrompt, setPrompts, setRemarksList, setRepository, setTreeRefresh, setUsingPrototype, startTransaction, toByteArray, toString, transactionEvent, uncheckout, update, updateFromBag, validateNameAndFolder, validateNameAndFolder, version`

  ### Methods inherited from class java.rmi.server.UnicastRemoteObject

  `clone, exportObject, exportObject, exportObject, exportObject, exportObject, unexportObject`

  ### Methods inherited from class java.rmi.server.RemoteServer

  `getClientHost, getLog, setLog`

  ### Methods inherited from class java.rmi.server.RemoteObject

  `equals, getRef, toStub`

  ### Methods inherited from class java.lang.Object

  `finalize, getClass, notify, notifyAll, wait, wait, wait`

  ### Methods inherited from interface com.sas.services.information.metadata.MetadataInterface

  `add, addAccessControl, addAttribute, addAttributes, addDocument, addExtension, addGroup, addImplementor, addKeyword, addNoteTextStore, addNoteTextStore, addObjectProperty, addObjectProperty, addPermissions, addPrompt, addPropertySet, addRemark, addResponsibleParty, addTransactionListener, addUsedByPrototype, checkin, checkout, commit, copyTo, countAssociatedObjects, delete, deleteAttribute, deleteAttributes, destroy, getAccessControls, getAttribute, getAttributes, getAuthorizationUtil, getCreateDate, getCreatedBy, getDescription, getDocuments, getEntityKey, getEntityURL, getExtensions, getGroups, getGUID, getIdentities, getImplementors, getKeywords, getLockedBy, getModifiedBy, getModifyDate, getNoteTextStore, getNoteTextStores, getNoteTextStoresByRole, 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, isObjectAlive, isReadCompatible, mapNameToFilesystem, mapUrlToFilesystem, moveTo, newServiceObject, refresh, removeAccessControl, removeDocument, removeExtension, removeGroup, removeImplementor, removeKeyword, removeNoteTextStore, removeObjectProperty, removePermissions, removePrompt, removePropertySet, removeResponsibleParty, removeResponsiblePartyByIdentity, removeUsedByPrototype, rollback, setAttribute, setAttributes, setDeleted, setDescription, setDocuments, setExtensions, setGroups, setGUID, setKeywords, setName, setNoteTextStores, 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 Details

  - ### Content

    public Content() throws RemoteException
    Creates a new Content object
    Throws:
      `RemoteException` - if unable to export the remote object.

  - ### Content

    public Content(Object o) throws RemoteException
    Creates a new Content object that incorporates the object passed to the constructor
    Parameters:
      `o` - Content object.
    Throws:
      `RemoteException` - if unable to export the remote object.

  - ### Content

    protected Content(Class subClass) throws RemoteException
    Creates a new Content object
    Parameters:
      `subClass` - The subclass's class which should be used to determine the appropriate RMI socket factories.
    Throws:
      `RemoteException` - in the case of network failures

  - ### Content

    protected Content(Object o, Class subClass) throws 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:
      `RemoteException` - in the case of network failures

- ## Method Details

  - ### getContentAsString

    public String getContentAsString() throws 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:
      `RemoteException` - in the case of network failures

  - ### getContentAsStream

    public InputStream getContentAsStream() throws 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:
      `RemoteException` - in the case of network failures

  - ### getContentAsBytes

    public byte[] getContentAsBytes() throws 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:
      `RemoteException` - in the case of network failures

  - ### getContentType

    public String getContentType() throws 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:
      `RemoteException` - in the case of network failures

  - ### setContentType

    public void setContentType(String contentType) throws 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:
      `RemoteException` - in the case of network failures

  - ### setContent

    public void setContent(String content) throws 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:
      `RemoteException` - in the case of network failures

  - ### setContentFromStream

    public void setContentFromStream(InputStream contentStream) throws 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:
      `RemoteException` - in the case of network failures

  - ### setContentFromBytes

    public void setContentFromBytes(byte[] content) throws 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:
      `RemoteException` - in the case of network failures

  - ### getType

    public String getType() throws 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:
      `RemoteException` - in the case of network failures

  - ### setProperty

    public void setProperty(String propertyName, String propertyValue) throws 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:
      `RemoteException` - In the event of remote object failure.

  - ### getProperty

    public String getProperty(String propertyName) throws 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:
      `RemoteException` - In the event of remote object failure.