Package com.sas.services.information.metadata

# Interface ContentInterface

All Superinterfaces:
  `MetadataInterface`, `PublicObjectInterface`, `Remote`

All Known Implementing Classes:
  `Content`, `DavBinaryPackage`, `DavEvent`, `StoredProcessAlertItem`

public interface ContentInterface extends MetadataInterface
Manipulation of the actual content of a Content smart object

- ## Field Summary

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `byte[]`
  `getContentAsBytes()`
  Get the content as a byte array.
  `InputStream`
  `getContentAsStream()`
  Get the content as an input stream.
  `String`
  `getContentAsString()`
  Get the content as a String.
  `String`
  `getContentType()`
  Gets the content type for the object.
  `String`
  `getProperty(String propertyName)`
  Deprecated.
  As of 9.1.3SP4, replaced by `MetadataInterface.getAttribute(String)`
  `void`
  `setContent(String content)`
  Set the content from a String
  `void`
  `setContentFromBytes(byte[] content)`
  Set the content from a byte array
  `void`
  `setContentFromStream(InputStream content)`
  Set the content from a stream.For remote deployment the InputStream should be wrapped in an `InputStreamAdapter`
  `void`
  `setContentType(String contentType)`
  Set the content type for the object.
  `void`
  `setProperty(String propertyName, String propertyValue)`
  Deprecated.
  As of 9.1.3SP4, replaced by `MetadataInterface.setAttribute(String, String)`

  ### 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, getType, 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`

- ## Method Details

  - ### getContentType

    String getContentType() throws RemoteException
    Gets the content type for the object. This would be the MIME type for the content.
    Returns:
      The content type String.
    Throws:
      `RemoteException` - In the event of remote object failure.

  - ### getContentAsStream

    InputStream getContentAsStream() throws RemoteException
    Get the content as an input stream.
    Returns:
      An InputStream to receive the content.
    Throws:
      `RemoteException` - In the event of remote object failure.

  - ### getContentAsBytes

    byte[] getContentAsBytes() throws RemoteException
    Get the content as a byte array.
    Returns:
      A byte array containing the content.
    Throws:
      `RemoteException` - In the event of remote object failure.

  - ### getContentAsString

    String getContentAsString() throws RemoteException
    Get the content as a String.
    Returns:
      a String containing the content.
    Throws:
      `RemoteException` - In the event of remote object failure.

  - ### setContentType

    void setContentType(String contentType) throws RemoteException
    Set the content type for the object.
    Parameters:
      `contentType` - The new content type for the content.
    Throws:
      `RemoteException` - In the event of remote object failure.

  - ### setContent

    void setContent(String content) throws RemoteException
    Set the content from a String
    Parameters:
      `content` - The new content for this object.
    Throws:
      `RemoteException` - In the event of remote object failure.

  - ### setContentFromStream

    void setContentFromStream(InputStream content) throws RemoteException
    Set the content from a stream.For remote deployment the InputStream should be wrapped in an `InputStreamAdapter`
    Parameters:
      `content` - An InputStream that streams the content.
    Throws:
      `RemoteException` - In the event of remote object failure.

  - ### setContentFromBytes

    void setContentFromBytes(byte[] content) throws RemoteException
    Set the content from a byte array
    Parameters:
      `content` - A ByteArray containing the content.
    Throws:
      `RemoteException` - In the event of remote object failure.

  - ### setProperty

    void setProperty(String propertyName, String propertyValue) throws RemoteException
    Deprecated.
    As of 9.1.3SP4, replaced by `MetadataInterface.setAttribute(String, String)`
    Set the value of a property
    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

    String getProperty(String propertyName) throws RemoteException
    Deprecated.
    As of 9.1.3SP4, replaced by `MetadataInterface.getAttribute(String)`
    Get the value of a property
    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.