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

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,
Direct Known Subclasses:
DavBinaryPackage, DavEvent

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

Fields inherited from class com.sas.services.information.metadata.Metadata
_repository, _repositoryFlag, _repositoryObject, formats, gmtZone, REPOSITORY_DAV, REPOSITORY_LDAP, REPOSITORY_NONE, REPOSITORY_OMR
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Fields inherited from interface com.sas.services.information.metadata.MetadataInterface
PERMISSION_READMETADATA, PERMISSION_WRITEMETADATA
 
Constructor Summary
  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
 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)
          Get the value of a property
 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)
          Set the value of a property
 
Methods inherited from class com.sas.services.information.metadata.Metadata
add, addAccessControl, addAttribute, addAttributes, addExtension, addKeyword, addPermissions, addRemark, addTransactionListener, checkin, checkout, clearInformationService, commit, copyTo, delete, deleteAttribute, deleteAttributes, getAccessControls, getAttribute, getAttributes, getCreateDate, getDescription, getEntityKey, getEntityURL, getExtensions, getGUID, getIdentities, getInformationService, getKeywords, getModifyDate, getName, getParentPath, getParents, getPath, getPaths, getPathUrl, getPathUrl, getPermission, getPermissions, getPermissions, getPreviousVersionNames, getRemarksList, getReposId, getRepository, getRepositoryEntity, getReposKey, getTrackingId, getTreeRefresh, getVersion, isAuthorized, isLoggingEnabled, logMessage, mapNameToFilesystem, mapUrlToFilesystem, moveTo, newServiceObject, notifyTransactionListeners, refresh, removeAccessControl, removeExtension, removeKeyword, removePermissions, rollback, setAttribute, setAttributes, setDescription, setGUID, setKeywords, setName, setPermission, setRemarksList, setRepository, setTreeRefresh, startTransaction, transactionEvent, uncheckout, update, version
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, 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, hashCode, toString, 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, addExtension, addKeyword, addPermissions, addRemark, addTransactionListener, checkin, checkout, commit, copyTo, delete, deleteAttribute, deleteAttributes, getAccessControls, getAttribute, getAttributes, getCreateDate, getDescription, getEntityKey, getEntityURL, getExtensions, getGUID, getIdentities, getKeywords, getModifyDate, getName, getParentPath, getParents, getPath, getPaths, getPathUrl, getPathUrl, getPermission, getPermissions, getPermissions, getPreviousVersionNames, getRemarksList, getReposId, getRepository, getRepositoryEntity, getReposKey, getTrackingId, getVersion, isAuthorized, isLoggingEnabled, logMessage, mapNameToFilesystem, mapUrlToFilesystem, moveTo, newServiceObject, refresh, removeAccessControl, removeExtension, removeKeyword, removePermissions, rollback, setAttribute, setAttributes, setDescription, setGUID, setKeywords, setName, setPermission, setRemarksList, setRepository, startTransaction, transactionEvent, uncheckout, update, version
 

Constructor Detail

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 Detail

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
Throws:
RemoteException - in the case of network failures

setProperty

public void setProperty(String propertyName,
                        String propertyValue)
                 throws RemoteException
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

getProperty

public String getProperty(String propertyName)
                   throws RemoteException
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

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




Copyright © 2006 SAS Institute Inc. All Rights Reserved.
javadoc generated Fri, 10 Feb 2006 17:28:57