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

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:
  • 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.