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

com.sas.services.information
Class DAVRepository

com.sas.services.information.DAVRepository
All Implemented Interfaces:
DAVRepositoryInterface, com.sas.services.information.InformationServiceTimerClient, MetadataChangeListener, RepositoryInterface, java.io.Serializable, java.rmi.Remote
Direct Known Subclasses:
DAVChildRepository

public class DAVRepository
implements DAVRepositoryInterface, MetadataChangeListener, com.sas.services.information.InformationServiceTimerClient

The DAV Repository is a single persistent store for information used by client applications. It interfaces to a webDAV server to add, retrieve and update data. DAVRepository documentation

Repositories are defined in the Information Service configuration metadata. NB. Do not specify a trailing slash in the base parameter.

Since:
1.0
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.sas.services.information.RepositoryInterface
PROFILE_BEST, PROFILE_NO, PROFILE_POSSIBLE
 
Constructor Summary
  DAVRepository()
          Constructs a default instance.
protected DAVRepository(java.lang.Class theClass)
          Constructs an instance exporting a remote object that employs RMI socket factories appropriate for the specified class.
 
Method Summary
 void addEntity(MetadataInterface input)
          Add an entity to the repository.
 void addListener(RepositoryListenerInterface listener)
          Add a listener to receive event notifications from the repository instance.
 void addRootFolder(FolderInterface folder)
          Make a folder a root folder of this repository.
 void addToCache(MetadataInterface mi)
           
 BrowseMetadataInterface browseFetch(java.lang.String entityKey, FilterInterface filter)
          Fetch a single object from the repository using the key.
 java.util.List browseFolder(java.lang.String folderISEntityKey, FilterInterface filter)
          Get information about a specific folder.
 java.util.List browseFolderRecursive(java.lang.String folderISEntityKey, FilterInterface filter)
          Search a folder tree recursively using the filter.
 BrowseMetadataInterface browseObjectByPath(PathUrl pathUrl, FilterInterface filter)
          Retrieve an object based on its PathUrl.
 java.util.List browseSearch(FilterInterface filter)
          Search the repository, the objects that are returned are not cached, and are in a generic container that is not remotable, doesn't go to the server for data that wasn't originally retrieved, and not persistable.
 void checkin(MetadataInterface entity)
          Check in the entity
 void checkin(MetadataInterface entity, java.lang.String comment)
          Check in the entity
 void checkout(MetadataInterface entity)
          Check out the entity
static void clearInformationService()
           
 void close()
          Close the connection to the DAV server.
 boolean connect(java.lang.String host, int port, java.lang.String id, java.lang.String password, java.lang.String base)
          Connect a user to a repository.
 boolean connect(java.lang.String user, java.lang.String password, RepositoryDef config)
          Connect to a repository using the configuration provided in a RepositoryDef object.
 boolean connectWithProxy(java.lang.String host, int port, java.lang.String id, java.lang.String password, java.lang.String base, java.lang.String proxy, boolean isSecure)
          Connect a user to a repository.
 MetadataInterface copyTo(DAVEntityInterface de, DAVFolderInterface f)
          Deprecated.  
 MetadataInterface copyTo(DAVEntityInterface de, DAVFolderInterface f, java.lang.String name)
          Copy a smart object.
 void deleteEntity(MetadataInterface input)
          Delete an entity in the repository.
 MetadataInterface factoryProcess(java.lang.Object o)
          Process a raw repository object into a smart object.
 boolean factoryTest(java.lang.Object testObject, java.lang.String filterString)
          Test an object against a Factory filter.
 MetadataInterface fetch(java.lang.String repositoryKey)
          Fetch an object from the repository with this repository key (reposKey).
 MetadataInterface fetch(java.lang.String repositoryKey, boolean bypassCache)
          Fetch an object from the repository with this repository key (reposKey).
 MetadataInterface fetchByUrl(java.lang.String entityURL, boolean bypassCache)
          Fetch an object from the repository given the URL.
 java.io.InputStream fetchContents(java.lang.String repositoryId)
          Fetch an object's content from the repository.
 void fetchContents(java.lang.String repositoryId, java.io.File fout)
          Fetch an object's content from the repository.
 com.sas.services.information.RepositoryData fetchRepositoryData(java.lang.String repositoryKey)
           
protected  MetadataInterface fetchUsingUrl(java.lang.String url, java.util.Map extraProperties)
           
 void freeResource()
          Free the resource previously acquired.
 void fromByteArry(UserContextInterface uci, byte[] data)
          Initialize an instance of a repository from state saved in a byte array.
 java.lang.String getBase()
          Get the search base.
 com.sas.services.cache.CacheStatistics getCacheStatistics()
          Get the cache statistics for the repository cache.
 java.lang.String getDomain()
          Get the domain for this repository.
 com.sas.services.information.rules.EvaluatorInterface getEvaluator(java.lang.Object o)
          This method is used by the Factory to get an evaluator that will evaluate factory rules against an object's data to determine if it matches the rule.
 java.lang.String getFactoryKey(java.lang.Object o)
          Get the factory key for objects from this repository.
 java.lang.String getHost()
          Get the name of the host this repository is running on.
 boolean getHttps()
          Return whether this repository is using SSL (https://) or not
 java.lang.String getHttpUrl()
          Get the HTTP URL that represents the specific instance for a repository.
 IdentityInterface getIdentity()
          Get the authenticated user identity.
static InformationServiceInterface getInformationService()
          Gets the informationService attribute of the DAVRepository class
 java.lang.String getISName()
          Get the Information Service configuration name for this repository if it exists.
 java.util.List getItems(DAVFolderInterface d)
           
 MetadataInterface getObjectByPath(PathUrl url)
          Get an object in the BIP tree using a PathUrl to find it.
 MetadataInterface getObjectByPath(java.lang.String rootFolderName, java.lang.String path, java.lang.Class type)
          Deprecated.  
 MetadataInterface getObjectByPath(java.lang.String rootFolderName, java.lang.String path, java.lang.String type)
          Deprecated. in favor of getObjectByPathString
 MetadataInterface getObjectByPathString(java.lang.String rootFolderName, java.lang.String path, java.lang.String type)
          Get an object by path.
 PersonalRepositoryInterface getPersonalRepository()
          Get the personal repository.
 int getPort()
          Get the port number of the server this repository is using.
 java.util.List getPreviousVersionNames(MetadataInterface entity)
          Returns a list of version names for the object
 java.lang.String getPrincipal()
          Get the principal name this instance connected with.
 java.lang.String getReposIdwoTypeFromUrl(java.lang.String fullUrl)
          Extract the reposId without the type appended from the url provided.
 FolderInterface getRootFolder(java.lang.String name)
          Get a root folder in the repository.
 java.util.List getRootFolders()
          Get all the root folders int the repository.
 ServerInterface getServer()
          Get the ServerInterface that controls this repository.
 java.lang.String getServerString()
          Returns the identifier string from the connected WebDAV server
 com.sas.services.webdav.SharedResourceInterface getSharedResource()
          Get an object that represents the shared resource
 MetadataInterface getTrackedObject(int trackingId)
          Deprecated.  
 java.lang.String getUniqueId()
          Get a unique identifier for this repository instance.
 java.lang.String getUrl()
          Get the URL that represents the specific instance for a repository.
static java.lang.String getUrlFromEntityKey(java.lang.String entityKey)
          Converts a DAV entity key to an HTTP url.
 PersonInterface getUser()
          Get the person entity that represents the user that is connected to the repository.
 UserContextInterface getUserContext()
          Get the UserContext this repository was connected for.
static java.lang.String getUserPRInbox(java.lang.String userid, UserContextInterface uc)
          Used to get the URL for the user's inbox.
 MetadataInterface getVersion(MetadataInterface entity, java.lang.String versionName)
          Retrieves a particular version of the specified object
 boolean isDestroyed()
          Check if the repostiory instance has been closed.
 boolean isEqual(java.lang.Object o)
          Check to see whether the two repositories point to the same url
 int isProfileRepository(java.lang.String url)
          Returns true if this repository supports profile storage.
 PersonInterface makePersonalAnchor()
           
 FolderInterface makeRootFolder(java.lang.String name)
          Make a root folder in the repository.
 void metadataChange(MetadataChangeEvent event)
           
 MetadataInterface moveTo(DAVEntityInterface de, DAVFolderInterface f)
          Deprecated.  
 MetadataInterface moveTo(DAVEntityInterface de, DAVFolderInterface f, java.lang.String name)
          Move a smart object.
 java.lang.Object narrow(com.sas.services.information.RepositoryData entity)
          Narrow down the type of this entity and return a class that represents this type via the DAVFactory.
 ChildRepositoryInterface newChild()
          Create a child repository instance with its own cache, which can be used to perform a group of updates transaction-style.
 MetadataInterface newMetadata(MetadataInterface model, java.lang.String name)
          Deprecated.  
 MetadataInterface newMetadata(java.lang.String repositoryId, java.lang.String name, java.lang.String type)
          Create a new metadata entity.
 MetadataInterface newMetadataByModel(MetadataInterface model, java.lang.String name)
          Create a new metadata entity.
 MetadataInterface produceDefaultMetadata(java.lang.Object o)
          Return the default metadata object for this repository.
 void refreshAllData()
          Refresh all of the data that's in the cache.
 void refreshEntity(MetadataInterface mi)
          Refresh an existing entity in the repository.
 void removeListener(RepositoryListenerInterface listener)
          Remove a listener from the list of active event listeners for this repository.
 FolderInterface removeRootFolder(java.lang.String folderName)
          Root DAV folders cannot be removed dynamically.
 void runInformationServiceTimer()
           
 java.util.List search(FilterInterface filter)
          Search the repository using the provided filter.
 FilteredFolderInterface searchTree(DAVFolderInterface folder, FilterInterface filter, int levels)
          Search the specified folder tree in the repository using the provided filter.
 FilteredFolderInterface searchTree(FolderInterface baseFolder, FilterInterface filter)
          Deprecated. in favor of searchTreeFromBase.
 FilteredFolderInterface searchTree(java.lang.String rootFolderName, FilterInterface filter)
          Search the specified folder tree in the repository using the provided filter.
 FilteredFolderInterface searchTreeFromBase(FolderInterface baseFolder, FilterInterface filter)
          Search the specified folder tree in the repository using the provided filter.
 FilteredFolderInterface searchTreeFromBaseWithScope(FolderInterface baseFolder, FilterInterface filter, int levels)
          Search the specified folder tree in the repository using the provided filter.
 void setACLFromStore(DAVEntityInterface entity)
          Retrieve the ACL property information and create the access control list for manipulating smart object access control information
 void setDomain(java.lang.String domain)
          Set the string for the security domain this server is running in.
 void setISName(java.lang.String name)
          Set the name that was used to connect to the repository.
 void setUser(PersonInterface person)
          Set the entity that represents the user that is connected to the repository.
 void setUserContext(UserContextInterface user)
          Set the UserContext that this repository belongs to.
 boolean supportsACL()
          Return whether this repository supports ACL or not
 boolean supportsSEARCH()
          Return whether this repository supports SEARCH or not
 byte[] toByteArray()
          Write the current state of the repository to a byte array.
 java.lang.String toString()
          Return a printable string to represent this instance.
 int trackEntity(MetadataInterface entity)
          Add a new object to the tracking cache.
 void uncheckout(MetadataInterface entity)
          Uncheck out/Cancel update
 void updateEntity(DAVEntityInterface input)
          Update an existing entity in the repository.
 void version(MetadataInterface entity)
          Put the entity under version control
 

Constructor Detail

DAVRepository

public DAVRepository()
              throws java.rmi.RemoteException
Constructs a default instance.

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

DAVRepository

protected DAVRepository(java.lang.Class theClass)
                 throws java.rmi.RemoteException
Constructs an instance exporting a remote object that employs RMI socket factories appropriate for the specified class.

Parameters:
theClass - Class which will be used to determine the appropriate RMI socket factories.
Throws:
java.rmi.RemoteException - if unable to export the remote object.
Method Detail

getInformationService

public static InformationServiceInterface getInformationService()
Gets the informationService attribute of the DAVRepository class

Returns:
The informationService value

clearInformationService

public static void clearInformationService()

getUrlFromEntityKey

public static java.lang.String getUrlFromEntityKey(java.lang.String entityKey)
Converts a DAV entity key to an HTTP url.

Parameters:
entityKey - The entity key to be converted
Returns:
String The HTTP url

getUserPRInbox

public static java.lang.String getUserPRInbox(java.lang.String userid,
                                              UserContextInterface uc)
                                       throws ServiceException,
                                              java.rmi.RemoteException
Used to get the URL for the user's inbox. It is assumed that the user's inbox is located on the same DAV server that the user described by the user context parameter. Note - it is possible that this inbox doesn't exist yet.

Parameters:
userid - userid of the inbox you want: format is userid, domain\\userid, user@domain
uc - userContext that can be used to obtain information about the webDAV server
Returns:
String The URL of the user's inbox
Throws:
ServiceException - If a repository error occurs.
java.rmi.RemoteException - In the event of remote object failure.

setISName

public void setISName(java.lang.String name)
               throws java.rmi.RemoteException
Set the name that was used to connect to the repository. This method should be used by the InformationService connect methods. If this is used by client applications, certain functions may not work correctly.

Specified by:
setISName in interface RepositoryInterface
Parameters:
name - The name that was used to connect to the repository. This name should match the Information Service RepositoryDef name.
Throws:
java.rmi.RemoteException - in case of network failures

getISName

public java.lang.String getISName()
                           throws java.rmi.RemoteException
Description copied from interface: RepositoryInterface
Get the Information Service configuration name for this repository if it exists. It looks through the ReposDefs for the best match and returns the name.

Specified by:
getISName in interface RepositoryInterface
Returns:
The ReposDef name for this repository.
Throws:
java.rmi.RemoteException - in the event of remote object failure.

setUserContext

public void setUserContext(UserContextInterface user)
                    throws java.rmi.RemoteException
Set the UserContext that this repository belongs to. This will be used to retrieve a logging interface as well as a session when necessary.

Specified by:
setUserContext in interface RepositoryInterface
Parameters:
user - The UserContext this repository was connected for.
Throws:
java.rmi.RemoteException - in the event of network failure.

getUserContext

public UserContextInterface getUserContext()
                                    throws java.rmi.RemoteException
Get the UserContext this repository was connected for. This may be null if none was set.

Specified by:
getUserContext in interface RepositoryInterface
Returns:
UserContextInterface The UserContext this repostiory is connected for.
Throws:
java.rmi.RemoteException - in the event of network failure.

setUser

public void setUser(PersonInterface person)
             throws java.rmi.RemoteException
Set the entity that represents the user that is connected to the repository.

Specified by:
setUser in interface RepositoryInterface
Parameters:
person - The Person entity that represents the user who is connected. This can only be set once, and if non-null, will throw an IllegalStateException.
Throws:
java.lang.IllegalStateException - if called when the person has already been set.
java.rmi.RemoteException - in the event of remote access errors.

getUser

public PersonInterface getUser()
                        throws java.rmi.RemoteException
Get the person entity that represents the user that is connected to the repository.

Specified by:
getUser in interface RepositoryInterface
Returns:
The person entity. This may be null if no Person entity for the user exists in the repository.
Throws:
java.rmi.RemoteException - in the event of remote access errors.

getIdentity

public IdentityInterface getIdentity()
                              throws java.rmi.RemoteException
Description copied from interface: RepositoryInterface
Get the authenticated user identity. This will either be a PersonInterface object or an IdentityGroupInterface object.

Specified by:
getIdentity in interface RepositoryInterface
Returns:
The user identity.
Throws:
java.rmi.RemoteException - In the event of remote object failure.

newMetadata

public MetadataInterface newMetadata(java.lang.String repositoryId,
                                     java.lang.String name,
                                     java.lang.String type)
                              throws ServiceException,
                                     java.rmi.RemoteException
Create a new metadata entity. It isn't stored in the repository until the addEntity() method is called. This is just a convenient way to get a new metadata object created.

Specified by:
newMetadata in interface RepositoryInterface
Parameters:
repositoryId - The ID of the new item in the repository or the repository itself. The meaning of this is repository-specific.
name - The name of the new repository entity.
type - The repository-specific type to create.
Returns:
a new MetadataInterface object.
Throws:
ServiceException - In the event of a parameter or configuration error.
java.rmi.RemoteException - in the event of a network error.

newMetadata

public MetadataInterface newMetadata(MetadataInterface model,
                                     java.lang.String name)
                              throws ServiceException,
                                     java.rmi.RemoteException
Deprecated. 

Create a new metadata entity. It isn't stored in the repository until the addEntity() method is called. This is just a convenient way to get a new metadata object created.

Specified by:
newMetadata in interface RepositoryInterface
Parameters:
model - A Metadata object to use as a "model" for the new item. The new metadata will have the same type, same repository, and may use the repository ID of the model as a basis for its own.
name - The name of the new repository entity.
Returns:
a new MetadataInterface object.
Throws:
ServiceException - In the event of a parameter or configuration error.
java.rmi.RemoteException - in the event of a network error.

newMetadataByModel

public MetadataInterface newMetadataByModel(MetadataInterface model,
                                            java.lang.String name)
                                     throws ServiceException,
                                            java.rmi.RemoteException
Create a new metadata entity. It isn't stored in the repository until the addEntity() method is called. This is just a convenient way to get a new metadata object created.

Specified by:
newMetadataByModel in interface RepositoryInterface
Parameters:
model - A Metadata object to use as a "model" for the new item. The new metadata will have the same type, same repository, and may use the repository ID of the model as a basis for its own.
name - The name of the new repository entity.
Returns:
a new MetadataInterface object.
Throws:
ServiceException - In the event of a parameter or configuration error.
java.rmi.RemoteException - in the event of a network error.

fetch

public MetadataInterface fetch(java.lang.String repositoryKey,
                               boolean bypassCache)
                        throws ServiceException,
                               java.rmi.RemoteException
Fetch an object from the repository with this repository key (reposKey). The reposKey is the path of the item relative to the repository url. It also has an item type appended to the relative path, which is not used in this repository. For example a url for a resource might be http://server:port/base/results/report1, the repository url would be "dav://server:port/base" and the reposKey would be of the form "results/report1/report", the report being the type of item. The reposKey can be obtained using the Metadata.getReposKey method.

If the bypassCache flag is set then the cache will not be checked before retrieving the object from the server. If the flag is not set, then the behaviour is the same as the fetch method.

Specified by:
fetch in interface RepositoryInterface
Parameters:
repositoryKey - The identifier for the object from the repository. This should be formatted as the repository ID followed by a slash, then the repository specific type. This string can be obtained using the Metadata.getReposKey method.
bypassCache - Boolean flag determines whether the cache should be checked for the object before forcing a trip to the server or not.
Returns:
The object matching the repository ID, or null.
Throws:
java.rmi.RemoteException - in the event of network errors.
ServiceException - if a repository error occurs.

fetchByUrl

public MetadataInterface fetchByUrl(java.lang.String entityURL,
                                    boolean bypassCache)
                             throws ServiceException,
                                    java.rmi.RemoteException
Description copied from interface: RepositoryInterface
Fetch an object from the repository given the URL. If the URL doesn't match this repository instance, a ServiceException is thrown.

Specified by:
fetchByUrl in interface RepositoryInterface
Parameters:
entityURL - The URL string of the object to fetch.
bypassCache - If true, the repository cache is bypassed and a trip to the persistent store is forced.
Returns:
The fetched object if found, null otherwise.
Throws:
ServiceException - If the URL doesn't match the instance.
java.rmi.RemoteException - In the event of remote object failure.

fetch

public MetadataInterface fetch(java.lang.String repositoryKey)
                        throws ServiceException,
                               java.rmi.RemoteException
Fetch an object from the repository with this repository key (reposKey). The reposKey is the path of the item relative to the repository url. It also has an item type appended to the relative path, which is not used in this repository. For example a url for a resource might be http://server:port/base/results/report1, the repository url would be "dav://server:port/base" and the reposKey would be of the form "results/report1/report", the report being the type of item. The reposKey can be obtained using the Metadata.getReposKey method.

Specified by:
fetch in interface RepositoryInterface
Parameters:
repositoryKey - The identifier for the object from the repository.
Returns:
MetadataInterface The metadata matching the repositoryId, or null.
Throws:
ServiceException - in the event of repository failures
java.rmi.RemoteException - in the event of network failures

search

public java.util.List search(FilterInterface filter)
                      throws ServiceException,
                             java.rmi.RemoteException
Search the repository using the provided filter.

Specified by:
search in interface RepositoryInterface
Parameters:
filter - A filter to use to limit the returned data.
Returns:
List (of Objects) found in the repository satisfying the filter
Throws:
ServiceException - in the case of repository failures
java.rmi.RemoteException - in the case of network failures

connect

public boolean connect(java.lang.String user,
                       java.lang.String password,
                       RepositoryDef config)
                throws ServiceException,
                       java.rmi.RemoteException
Description copied from interface: RepositoryInterface
Connect to a repository using the configuration provided in a RepositoryDef object.

Specified by:
connect in interface RepositoryInterface
Parameters:
user - The UserId for authentication to the repository server.
password - The password for authentication to the repository server.
config - The RepositoryDef object with the configuration information.
Returns:
true if the connection was successful, false otherwise.
Throws:
ServiceException - If a service level error occurred.
java.rmi.RemoteException - In the event of remote object failure.

connectWithProxy

public boolean connectWithProxy(java.lang.String host,
                                int port,
                                java.lang.String id,
                                java.lang.String password,
                                java.lang.String base,
                                java.lang.String proxy,
                                boolean isSecure)
                         throws ServiceException,
                                java.rmi.RemoteException
Connect a user to a repository. The identity should already be authenticated before connecting.

The host, port, and base make up the repository url which has the format "dav://host:port/base" in DAVRepository. Each entity in the repository is then known by a reposId, which is the path of the resource relative to this repository url. The id and password are used to authenticate against the DAV/HTTP server.

Specified by:
connectWithProxy in interface RepositoryInterface
Parameters:
host - The host name for the DAV server
port - The port to be used in the url for the DAV server
id - The user name to be used for authentication
password - The password to be used for authentication
base - The virtual root. Generally authentication domains are created for different virtual roots in a web/DAV server. So the authentication is tried against the url that contains this base.
proxy - The proxy URL string if a proxy is to be used
isSecure - SSL to be used or not
Returns:
boolean true if the connection was successful, false otherwise
Throws:
ServiceException - in the case of repository failures
java.rmi.RemoteException - in the case of network failures

connect

public boolean connect(java.lang.String host,
                       int port,
                       java.lang.String id,
                       java.lang.String password,
                       java.lang.String base)
                throws ServiceException,
                       java.rmi.RemoteException
Connect a user to a repository. The identity should already be authenticated before connecting.

The host, port, and base make up the repository url which has the format "dav://host:port/base" in DAVRepository. Each entity in the repository is then known by a reposId, which is the path of the resource relative to this repository url. The id and password are used to authenticate against the DAV/HTTP server.

Specified by:
connect in interface RepositoryInterface
Parameters:
host - The host name for the DAV server
port - The port to be used in the url for the DAV server
id - The user name to be used for authentication
password - The password to be used for authentication
base - The virtual root. Generally authentication domains are created for different virtual roots in a web/DAV server. So the authentication is tried against the url that contains this base.
Returns:
boolean true if the connection was successful, false otherwise
Throws:
ServiceException - in the case of repository failures
java.rmi.RemoteException - in the case of network failures

deleteEntity

public void deleteEntity(MetadataInterface input)
                  throws ServiceException,
                         java.rmi.RemoteException
Delete an entity in the repository.

Specified by:
deleteEntity in interface RepositoryInterface
Parameters:
input - The metadata object to delete from the repository
Throws:
ServiceException - in the case of repository failures
java.rmi.RemoteException - in the case of network failures

addEntity

public void addEntity(MetadataInterface input)
               throws ServiceException,
                      java.rmi.RemoteException
Add an entity to the repository.

Specified by:
addEntity in interface RepositoryInterface
Parameters:
input - The metadata object to be added to the repository
Throws:
ServiceException - in the case of repository failures
java.rmi.RemoteException - in the case of network failures

getUrl

public java.lang.String getUrl()
                        throws java.rmi.RemoteException
Get the URL that represents the specific instance for a repository. This is of the form "dav://server:port/base". This is in an escaped form.

Specified by:
getUrl in interface RepositoryInterface
Returns:
String The url value
Throws:
java.rmi.RemoteException - in case of network failures

getDomain

public java.lang.String getDomain()
                           throws java.rmi.RemoteException
Get the domain for this repository. This is set to a generic domain when the object is created, then set to the specific instance after a successful connection.

Specified by:
getDomain in interface RepositoryInterface
Returns:
String The domain value
Throws:
java.rmi.RemoteException - in case of network failures

setDomain

public void setDomain(java.lang.String domain)
               throws java.rmi.RemoteException
Set the string for the security domain this server is running in.

Specified by:
setDomain in interface RepositoryInterface
Parameters:
domain - The new domain value
Throws:
java.rmi.RemoteException - in case of network failures

getHost

public java.lang.String getHost()
                         throws java.rmi.RemoteException
Get the name of the host this repository is running on.

Specified by:
getHost in interface RepositoryInterface
Returns:
String The host name.
Throws:
java.rmi.RemoteException - in case of network failures

getPort

public int getPort()
            throws java.rmi.RemoteException
Get the port number of the server this repository is using.

Specified by:
getPort in interface RepositoryInterface
Returns:
int The port number.
Throws:
java.rmi.RemoteException - in case of network failures

getPrincipal

public java.lang.String getPrincipal()
                              throws java.rmi.RemoteException
Get the principal name this instance connected with.

Specified by:
getPrincipal in interface RepositoryInterface
Returns:
String The principal string.
Throws:
java.rmi.RemoteException - in case of network failures

getBase

public java.lang.String getBase()
                         throws java.rmi.RemoteException
Get the search base.

Specified by:
getBase in interface RepositoryInterface
Returns:
String The default search base for this repository instance.
Throws:
java.rmi.RemoteException - in the event of a network failure.

getTrackedObject

public MetadataInterface getTrackedObject(int trackingId)
                                   throws java.rmi.RemoteException
Deprecated. 

Get a cached object by its tracking ID. Objects in the tracking cache are saved by WeakReference, so they may be garbage collected if no other object is using them. In that case, this method will return null.

Specified by:
getTrackedObject in interface RepositoryInterface
Parameters:
trackingId - Description of the Parameter
Returns:
MetadataInterface The trackedObject value
Throws:
java.rmi.RemoteException - in case of network failures

close

public void close()
           throws java.rmi.RemoteException
Close the connection to the DAV server.

Specified by:
close in interface RepositoryInterface
Throws:
java.rmi.RemoteException - in the event of a network failure

addRootFolder

public void addRootFolder(FolderInterface folder)
                   throws ServiceException,
                          java.rmi.RemoteException
Make a folder a root folder of this repository. DAV root naming contexts must be administered through configuration, and cannot be added dynamically.

Specified by:
addRootFolder in interface RepositoryInterface
Parameters:
folder - The folder to make a root folder.
Throws:
ServiceException - In the event of a repository error.
java.rmi.RemoteException - In the event of remote object failure.

removeRootFolder

public FolderInterface removeRootFolder(java.lang.String folderName)
                                 throws ServiceException,
                                        java.rmi.RemoteException
Root DAV folders cannot be removed dynamically. They have to be administred through the server configuration.

Specified by:
removeRootFolder in interface RepositoryInterface
Parameters:
folderName - The name of the folder to remove as a root.
Returns:
The folder that was removed, if found. Null otherwise.
Throws:
ServiceException - In the event of repository error.
java.rmi.RemoteException - In the event of remote object failure.

getRootFolder

public FolderInterface getRootFolder(java.lang.String name)
                              throws ServiceException,
                                     java.rmi.RemoteException
Get a root folder in the repository.

Root folders are uniquely identified by a string name.

Specified by:
getRootFolder in interface RepositoryInterface
Parameters:
name -
Returns:
FolderInterface The rootFolder value
Throws:
ServiceException - in the case of repository failures
java.rmi.RemoteException - in the case of network failures

getRootFolders

public java.util.List getRootFolders()
                              throws ServiceException,
                                     java.rmi.RemoteException
Get all the root folders int the repository.

Specified by:
getRootFolders in interface RepositoryInterface
Returns:
List (of FolderInterface objects) representing the root folders.
Throws:
ServiceException - in the event of repository failures.
java.rmi.RemoteException - in the event of RMI failures.

getObjectByPath

public MetadataInterface getObjectByPath(PathUrl url)
                                  throws ServiceException,
                                         java.rmi.RemoteException
Description copied from interface: RepositoryInterface
Get an object in the BIP tree using a PathUrl to find it.

Specified by:
getObjectByPath in interface RepositoryInterface
Parameters:
url - The PathUrl that designates the object to retrieve.
Returns:
The object matching the path, or null if none was found.
Throws:
ServiceException - in the event of service object failure
java.rmi.RemoteException - in the event of remote object failure.

getObjectByPath

public MetadataInterface getObjectByPath(java.lang.String rootFolderName,
                                         java.lang.String path,
                                         java.lang.Class type)
                                  throws ServiceException,
                                         java.rmi.RemoteException
Deprecated. 

Get an object by path.

This method will return an arbitrary matching object if multiple objects exist in the repository. The path is a sequence of names separated by forward or back slashes. The method must return the same object if called again with the same parameters and the repository has not been modified.

Note: Should we allow relative path names? We could implement a getObjectByPath(FolderInterface currentFolder, String path, Class type) version of this method.

We probably should support "dot" (current folder) and "dot dot" (parent folder) notation in paths, especially if we allow relative paths.

Specified by:
getObjectByPath in interface RepositoryInterface
Parameters:
rootFolderName -
path -
type -
Returns:
The objectByPath value
Throws:
ServiceException - in the case of repository failures
java.rmi.RemoteException - in the case of network failures

getObjectByPath

public MetadataInterface getObjectByPath(java.lang.String rootFolderName,
                                         java.lang.String path,
                                         java.lang.String type)
                                  throws ServiceException,
                                         java.rmi.RemoteException
Deprecated. in favor of getObjectByPathString

Get an object by path.

This method will return an arbitrary matching object if multiple objects exist in the repository. The path is a sequence of names separated by forward or back slashes. The method must return the same object if called again with the same parameters and the repository has not been modified.

Note: Should we allow relative path names? We could implement a getObjectByPath(FolderInterface currentFolder, String path, Class type) version of this method.

We probably should support "dot" (current folder) and "dot dot" (parent folder) notation in paths, especially if we allow relative paths.

Specified by:
getObjectByPath in interface RepositoryInterface
Parameters:
rootFolderName -
path -
type -
Returns:
The objectByPath value
Throws:
ServiceException - in the case of repository failures
java.rmi.RemoteException - in the case of network failures

getObjectByPathString

public MetadataInterface getObjectByPathString(java.lang.String rootFolderName,
                                               java.lang.String path,
                                               java.lang.String type)
                                        throws ServiceException,
                                               java.rmi.RemoteException
Get an object by path.

This method will return an arbitrary matching object if multiple objects exist in the repository. The path is a sequence of names separated by forward or back slashes. The method must return the same object if called again with the same parameters and the repository has not been modified.

Note: Should we allow relative path names? We could implement a getObjectByPath(FolderInterface currentFolder, String path, Class type) version of this method.

We probably should support "dot" (current folder) and "dot dot" (parent folder) notation in paths, especially if we allow relative paths.

Specified by:
getObjectByPathString in interface RepositoryInterface
Parameters:
rootFolderName -
path -
type -
Returns:
The objectByPath value
Throws:
ServiceException - in the case of repository failures
java.rmi.RemoteException - in the case of network failures

searchTree

public FilteredFolderInterface searchTree(java.lang.String rootFolderName,
                                          FilterInterface filter)
                                   throws ServiceException,
                                          java.rmi.RemoteException
Search the specified folder tree in the repository using the provided filter.

Specified by:
searchTree in interface RepositoryInterface
Parameters:
rootFolderName - Name of the root folder.
filter - A filter to use to limit the returned data.
Returns:
An Iterator of Objects found in the repository that match the filter.
Throws:
ServiceException - in the case of repository failures
java.rmi.RemoteException - in the case of network failures

searchTree

public FilteredFolderInterface searchTree(FolderInterface baseFolder,
                                          FilterInterface filter)
                                   throws ServiceException,
                                          java.rmi.RemoteException
Deprecated. in favor of searchTreeFromBase.

Search the specified folder tree in the repository using the provided filter.

Specified by:
searchTree in interface RepositoryInterface
Parameters:
baseFolder - The Folder to start the search in.
filter - A filter to use to limit the returned data.
Returns:
A FilteredFolderInterface containing the objects that match the filter criteria.
Throws:
java.rmi.RemoteException - in the event of network errors.
ServiceException - if a repository error occurs.

searchTreeFromBase

public FilteredFolderInterface searchTreeFromBase(FolderInterface baseFolder,
                                                  FilterInterface filter)
                                           throws ServiceException,
                                                  java.rmi.RemoteException
Search the specified folder tree in the repository using the provided filter.

Specified by:
searchTreeFromBase in interface RepositoryInterface
Parameters:
baseFolder - The Folder to start the search in.
filter - A filter to use to limit the returned data.
Returns:
A FilteredFolderInterface containing the objects that match the filter criteria.
Throws:
java.rmi.RemoteException - in the event of network errors.
ServiceException - if a repository error occurs.

searchTreeFromBaseWithScope

public FilteredFolderInterface searchTreeFromBaseWithScope(FolderInterface baseFolder,
                                                           FilterInterface filter,
                                                           int levels)
                                                    throws ServiceException,
                                                           java.rmi.RemoteException
Search the specified folder tree in the repository using the provided filter.

Specified by:
searchTreeFromBaseWithScope in interface RepositoryInterface
Parameters:
baseFolder - The Folder to start the search in.
filter - A filter to use to limit the returned data.
levels - The number of levels to search.
Returns:
A FilteredFolderInterface containing the objects that match the filter criteria.
Throws:
java.rmi.RemoteException - in the event of network errors.
ServiceException - if a repository error occurs.

searchTree

public FilteredFolderInterface searchTree(DAVFolderInterface folder,
                                          FilterInterface filter,
                                          int levels)
                                   throws ServiceException,
                                          java.rmi.RemoteException
Search the specified folder tree in the repository using the provided filter.

Parameters:
folder - The Folder to start the search in.
filter - A filter to use to limit the returned data.
levels - The number of levels to search.
Returns:
A FilteredFolderInterface containing the objects that match the filter criteria.
Throws:
java.rmi.RemoteException - in the event of network errors.
ServiceException - if a repository error occurs.

browseSearch

public java.util.List browseSearch(FilterInterface filter)
                            throws ServiceException,
                                   java.rmi.RemoteException
Search the repository, the objects that are returned are not cached, and are in a generic container that is not remotable, doesn't go to the server for data that wasn't originally retrieved, and not persistable. This allows applications that are only displaying basic object information to perform much more lightweight and efficient operations, and only get "real" objects that can be manipulated and persisted when needed.

It's generally a good idea when using this method to use a template. Otherwise, a basic template will be used that will get keywords, but no other associated objects.

Specified by:
browseSearch in interface RepositoryInterface
Parameters:
filter - A Filter to limit the objects returned to those the client is interested in.
Returns:
A List of BrowseMetadataInterface objects.
Throws:
ServiceException - In the event of repository errors.
java.rmi.RemoteException - In the event of remote object failure.

browseFetch

public BrowseMetadataInterface browseFetch(java.lang.String entityKey,
                                           FilterInterface filter)
                                    throws ServiceException,
                                           java.rmi.RemoteException
Fetch a single object from the repository using the key. The filter will be ignored for a WebDAV repository. All of the object's attributes are retrieved.

Specified by:
browseFetch in interface RepositoryInterface
Parameters:
entityKey - The Information Services entity key, or the repository key of the object desired.
filter - Ignored.
Returns:
A BrowseMetadataInterface object with the requested information.
Throws:
ServiceException - If a repository error occurs.
java.rmi.RemoteException - In the event of remote object failure.

browseFolder

public java.util.List browseFolder(java.lang.String folderISEntityKey,
                                   FilterInterface filter)
                            throws ServiceException,
                                   java.rmi.RemoteException
Get information about a specific folder. If a filter is provided, it's applied to the members of the folder, and the matching members are returned in the result List. If no filter is specified (it's null or no filter information is provided), all of the members and subfolders are retrieved and returned as BrowseMetadataInterface objects in the result List.

Specified by:
browseFolder in interface RepositoryInterface
Parameters:
folderISEntityKey - The Information Service entity key of the Folder to retrieve information for.
filter - A filter used to limit the items returned.
Returns:
A List of BrowseMetadataInterface objects. These will be either the matching members, if a filter is provided, or all the members and subfolders if no filter is provided.
Throws:
ServiceException - If a repository error occurs.
java.rmi.RemoteException - in the event of remote object failure.

browseFolderRecursive

public java.util.List browseFolderRecursive(java.lang.String folderISEntityKey,
                                            FilterInterface filter)
                                     throws ServiceException,
                                            java.rmi.RemoteException
Search a folder tree recursively using the filter. If the filter is provided, the members of all the trees from the one specified, through all of its subordinates will be searched and the matching objects will be returned in the results List. If no filter is specified, all the members and subfolders of the requested folder will be returned in the result List, with their members and subfolders included in their Maps. This is potentially a very expensive operation, so use it cautiously.

Specified by:
browseFolderRecursive in interface RepositoryInterface
Parameters:
folderISEntityKey - The Entity key of the requested folder.
filter - A filter to limit the results.
Returns:
A List of BrowseMetadataInterface objects.
Throws:
ServiceException - If a repository error occurs.
java.rmi.RemoteException - In the event of remote object failure.

browseObjectByPath

public BrowseMetadataInterface browseObjectByPath(PathUrl pathUrl,
                                                  FilterInterface filter)
                                           throws ServiceException,
                                                  java.rmi.RemoteException
Retrieve an object based on its PathUrl.

Specified by:
browseObjectByPath in interface RepositoryInterface
Parameters:
pathUrl - A PathUrl object that represents the object to be retrieved.
filter - Ignored for this implementation
Returns:
A BrowseMetadataInterface with the requested object, or null if it couldn't be located.
Throws:
ServiceException - If a repository error occurs.
java.rmi.RemoteException - In the event of remote object failure.

addListener

public void addListener(RepositoryListenerInterface listener)
                 throws ServiceException,
                        java.rmi.RemoteException
Description copied from interface: RepositoryInterface
Add a listener to receive event notifications from the repository instance. Events include disconnect, reconnect, and close. Other events may be added.

Specified by:
addListener in interface RepositoryInterface
Parameters:
listener - The object to add to the repository's list of event listeners.
Throws:
ServiceException - if a repository error occurs.
java.rmi.RemoteException - in the event of network errors.

removeListener

public void removeListener(RepositoryListenerInterface listener)
                    throws ServiceException,
                           java.rmi.RemoteException
Description copied from interface: RepositoryInterface
Remove a listener from the list of active event listeners for this repository.

Specified by:
removeListener in interface RepositoryInterface
Parameters:
listener - The object to remove from the repository's list of event listeners.
Throws:
ServiceException - if a repository error occurs.
java.rmi.RemoteException - in the event of network errors.

newChild

public ChildRepositoryInterface newChild()
                                  throws ServiceException,
                                         java.rmi.RemoteException
Description copied from interface: RepositoryInterface
Create a child repository instance with its own cache, which can be used to perform a group of updates transaction-style.

Specified by:
newChild in interface RepositoryInterface
Returns:
A new object of type ChildRepositoryInterface.
Throws:
ServiceException - if a repository error occurs.
java.rmi.RemoteException - in the event of remote object failure.

getUniqueId

public java.lang.String getUniqueId()
                             throws java.rmi.RemoteException
Description copied from interface: RepositoryInterface
Get a unique identifier for this repository instance.

Specified by:
getUniqueId in interface RepositoryInterface
Returns:
A unique identifier.
Throws:
java.rmi.RemoteException - In the event of remote object failure.

factoryProcess

public MetadataInterface factoryProcess(java.lang.Object o)
                                 throws ServiceException,
                                        java.rmi.RemoteException
Description copied from interface: RepositoryInterface
Process a raw repository object into a smart object. Going through the repository rather than directly against the Factory allows for better cache control.

Specified by:
factoryProcess in interface RepositoryInterface
Parameters:
o - The repository object that needs to be processed into a smart object.
Returns:
The smart object representation of the repository entity.
Throws:
ServiceException - If a factory error or repository error occurs.
java.rmi.RemoteException - In the event of remote object failure.

isDestroyed

public boolean isDestroyed()
                    throws java.rmi.RemoteException
Description copied from interface: RepositoryInterface
Check if the repostiory instance has been closed.

Specified by:
isDestroyed in interface RepositoryInterface
Returns:
true if the repository has been closed, false otherwise.
Throws:
java.rmi.RemoteException - In the event of remote object failure.

toByteArray

public byte[] toByteArray()
                   throws java.rmi.RemoteException,
                          ServiceException
Description copied from interface: RepositoryInterface
Write the current state of the repository to a byte array.

Specified by:
toByteArray in interface RepositoryInterface
Returns:
The byte array containing the current repository state.
Throws:
java.rmi.RemoteException - In the event of remote object failure.
ServiceException - If a factory error or repository error occurs.

fromByteArry

public void fromByteArry(UserContextInterface uci,
                         byte[] data)
                  throws java.rmi.RemoteException,
                         ServiceException
Description copied from interface: RepositoryInterface
Initialize an instance of a repository from state saved in a byte array.

Specified by:
fromByteArry in interface RepositoryInterface
Parameters:
uci - A UserContext to use to get credentials and other information.
data - The data array with the repository state.
Throws:
java.rmi.RemoteException - In the event of remote object failure.
ServiceException - If a factory error or repository error occurs.

getCacheStatistics

public com.sas.services.cache.CacheStatistics getCacheStatistics()
                                                          throws ServiceException,
                                                                 java.rmi.RemoteException
Description copied from interface: RepositoryInterface
Get the cache statistics for the repository cache.

Specified by:
getCacheStatistics in interface RepositoryInterface
Returns:
A CacheStatistics object.
Throws:
ServiceException - If a factory error or repository error occurs.
java.rmi.RemoteException - In the event of remote object failure.

getFactoryKey

public java.lang.String getFactoryKey(java.lang.Object o)
                               throws java.rmi.RemoteException,
                                      ServiceException
Description copied from interface: RepositoryInterface
Get the factory key for objects from this repository. This method should only be used internally to the Information Service.

Specified by:
getFactoryKey in interface RepositoryInterface
Parameters:
o - The object to return the factory key for.
Returns:
The factory key string for this object.
Throws:
java.rmi.RemoteException - In the event of remote object failure.
ServiceException - If a service level error occurs.

produceDefaultMetadata

public MetadataInterface produceDefaultMetadata(java.lang.Object o)
                                         throws java.rmi.RemoteException,
                                                ServiceException
Description copied from interface: RepositoryInterface
Return the default metadata object for this repository. Some repository instances return a Metadata, others a Folder, others subclasses of those. This method should only be used internally by the Information Service.

Specified by:
produceDefaultMetadata in interface RepositoryInterface
Parameters:
o - The data layer object to return a default smart object for.
Returns:
A default smart object for this repository, and the provided data layer object.
Throws:
java.rmi.RemoteException - In the event of remote object failure.
ServiceException - If a repository or service level error occurs.

factoryTest

public boolean factoryTest(java.lang.Object testObject,
                           java.lang.String filterString)
                    throws java.rmi.RemoteException,
                           ServiceException
Description copied from interface: RepositoryInterface
Test an object against a Factory filter. Return true if the filter string matches, false otherwise.

Specified by:
factoryTest in interface RepositoryInterface
Parameters:
testObject - The data layer object to test.
filterString - The Factory filter string.
Returns:
true if the test object matches the filter string, false otherwise.
Throws:
java.rmi.RemoteException - In the event of remote object failure.
ServiceException - If a repository or service level error occurs.

isProfileRepository

public int isProfileRepository(java.lang.String url)
                        throws java.rmi.RemoteException
Description copied from interface: RepositoryInterface
Returns true if this repository supports profile storage.

Specified by:
isProfileRepository in interface RepositoryInterface
Parameters:
url - The URL of the configured repository. This may be null.
Returns:
One of the defined values PROFILE_NO, PROFILE_POSSIBLE, or PROFILE_BEST.
Throws:
java.rmi.RemoteException - In the event of remote object failure.

getEvaluator

public com.sas.services.information.rules.EvaluatorInterface getEvaluator(java.lang.Object o)
Description copied from interface: RepositoryInterface
This method is used by the Factory to get an evaluator that will evaluate factory rules against an object's data to determine if it matches the rule.

Specified by:
getEvaluator in interface RepositoryInterface
Parameters:
o - The object to test against the rule.
Returns:
A new evaluator for this object.

getServer

public ServerInterface getServer()
                          throws ServiceException,
                                 java.rmi.RemoteException
Description copied from interface: RepositoryInterface
Get the ServerInterface that controls this repository. For repositories that do not have servers, this may return null.

Specified by:
getServer in interface RepositoryInterface
Returns:
The ServerInterface that controls this repository.
Throws:
ServiceException - If a service level error occurs.
java.rmi.RemoteException - In the event of remote object failure.

refreshAllData

public void refreshAllData()
                    throws ServiceException,
                           java.rmi.RemoteException
Description copied from interface: RepositoryInterface
Refresh all of the data that's in the cache.

Specified by:
refreshAllData in interface RepositoryInterface
Throws:
ServiceException - If a repository error occurs during the refresh.
java.rmi.RemoteException - In the event of remote object failure.

fetchContents

public java.io.InputStream fetchContents(java.lang.String repositoryId)
                                  throws ServiceException,
                                         java.rmi.RemoteException
Fetch an object's content from the repository. This is separate from the fetch method, which only loads the properties of the object. Try to delay the fetching of the content until it is called for (to improve performance). *

Specified by:
fetchContents in interface DAVRepositoryInterface
Parameters:
repositoryId - The identifier for the object from the repository.
Returns:
byte[] The content for the object
Throws:
ServiceException - in the event of repository failures
java.rmi.RemoteException - in the event of network failures

fetchContents

public void fetchContents(java.lang.String repositoryId,
                          java.io.File fout)
                   throws ServiceException,
                          java.rmi.RemoteException
Description copied from interface: DAVRepositoryInterface
Fetch an object's content from the repository. This is separate from the fetch method, which only loads the properties of the object. Try to delay the fetching of the content until it is called for (to improve performance). The content is written to the provided file.

Specified by:
fetchContents in interface DAVRepositoryInterface
fout - The file to which the content should be written
Throws:
ServiceException - in the event of repository failures
java.rmi.RemoteException - in the event of network failures

getHttpUrl

public java.lang.String getHttpUrl()
                            throws java.rmi.RemoteException
Get the HTTP URL that represents the specific instance for a repository. This is of the form "http(s)://sever:port/base".

Specified by:
getHttpUrl in interface DAVRepositoryInterface
Returns:
String The url value
Throws:
java.rmi.RemoteException - in case of network failures

updateEntity

public void updateEntity(DAVEntityInterface input)
                  throws ServiceException,
                         java.rmi.RemoteException
Update an existing entity in the repository.

Specified by:
updateEntity in interface DAVRepositoryInterface
Parameters:
input - The entity to be updated on the backing store
Throws:
ServiceException - in the case of repository failures
java.rmi.RemoteException - in the case of network failures

getReposIdwoTypeFromUrl

public java.lang.String getReposIdwoTypeFromUrl(java.lang.String fullUrl)
Extract the reposId without the type appended from the url provided. If this url can be serviced by this repository, then the url parameter must begin with the repository url. The reposId (without type modifier) is the remainder of the url.

Specified by:
getReposIdwoTypeFromUrl in interface DAVRepositoryInterface
Parameters:
fullUrl - The url that needs to be broken up into the repository url and the reposId without a type qualifier
Returns:
The reposId without a type qualifier for the fullUrl provided. If this entity cannot be processed by this repository then null is returned

makePersonalAnchor

public PersonInterface makePersonalAnchor()
                                   throws ServiceException,
                                          java.rmi.RemoteException
Specified by:
makePersonalAnchor in interface DAVRepositoryInterface
Throws:
ServiceException
java.rmi.RemoteException

getPersonalRepository

public PersonalRepositoryInterface getPersonalRepository()
                                                  throws ServiceException,
                                                         java.rmi.RemoteException
Get the personal repository. If one doesn't exist then create one for this user. The personal repository is anchored under a collection that represents the person connected to the repository - if this collection doesn't exist at this time then it is created here. This is to avoid creating this collection for every connected repository, only ones that are required (eg. personal repository or personal profiles).

Specified by:
getPersonalRepository in interface DAVRepositoryInterface
Returns:
PersonalRepository The personal repository for this user
Throws:
ServiceException - in the case of repository failures
java.rmi.RemoteException - in the case of network failures

getHttps

public boolean getHttps()
Return whether this repository is using SSL (https://) or not

Specified by:
getHttps in interface DAVRepositoryInterface
Returns:
boolean true using https, false using http

supportsACL

public boolean supportsACL()
Description copied from interface: DAVRepositoryInterface
Return whether this repository supports ACL or not

Specified by:
supportsACL in interface DAVRepositoryInterface
Returns:
boolean true supports ACL, false does not support ACL

supportsSEARCH

public boolean supportsSEARCH()
Description copied from interface: DAVRepositoryInterface
Return whether this repository supports SEARCH or not

Specified by:
supportsSEARCH in interface DAVRepositoryInterface
Returns:
boolean true supports SEARCH, false does not support SEARCH

getItems

public java.util.List getItems(DAVFolderInterface d)
Specified by:
getItems in interface DAVRepositoryInterface

fetchRepositoryData

public com.sas.services.information.RepositoryData fetchRepositoryData(java.lang.String repositoryKey)
                                                                throws ServiceException,
                                                                       java.rmi.RemoteException
Specified by:
fetchRepositoryData in interface DAVRepositoryInterface
Throws:
ServiceException
java.rmi.RemoteException

copyTo

public MetadataInterface copyTo(DAVEntityInterface de,
                                DAVFolderInterface f)
                         throws ServiceException,
                                java.rmi.RemoteException
Deprecated. 

Specified by:
copyTo in interface DAVRepositoryInterface
Throws:
ServiceException - in the case of repository failures
java.rmi.RemoteException - in case of network failures

moveTo

public MetadataInterface moveTo(DAVEntityInterface de,
                                DAVFolderInterface f)
                         throws ServiceException,
                                java.rmi.RemoteException
Deprecated. 

Specified by:
moveTo in interface DAVRepositoryInterface
Throws:
ServiceException - in the case of repository failures
java.rmi.RemoteException - in case of network failures

copyTo

public MetadataInterface copyTo(DAVEntityInterface de,
                                DAVFolderInterface f,
                                java.lang.String name)
                         throws ServiceException,
                                java.rmi.RemoteException
Description copied from interface: DAVRepositoryInterface
Copy a smart object.

Specified by:
copyTo in interface DAVRepositoryInterface
Parameters:
de - The repository entity to be copied
f - The folder to contain the new object
name - The object's new name - null or blank takes name of existing object
Throws:
ServiceException - in the case of repository failures
java.rmi.RemoteException - in the case of network failures

moveTo

public MetadataInterface moveTo(DAVEntityInterface de,
                                DAVFolderInterface f,
                                java.lang.String name)
                         throws ServiceException,
                                java.rmi.RemoteException
Description copied from interface: DAVRepositoryInterface
Move a smart object.

Specified by:
moveTo in interface DAVRepositoryInterface
Parameters:
de - The repository entity to be moved
f - The folder to contain the new object
name - The object's new name - null or blank takes name of existing object
Throws:
ServiceException - in the case of repository failures
java.rmi.RemoteException - in the case of network failures

setACLFromStore

public void setACLFromStore(DAVEntityInterface entity)
                     throws java.rmi.RemoteException
Retrieve the ACL property information and create the access control list for manipulating smart object access control information

Specified by:
setACLFromStore in interface DAVRepositoryInterface
Parameters:
entity - The "in memory" smart object
Throws:
java.rmi.RemoteException - if a networking issue is encountered.

version

public void version(MetadataInterface entity)
             throws ServiceException,
                    java.rmi.RemoteException
Put the entity under version control

Specified by:
version in interface DAVRepositoryInterface
Parameters:
entity - The entity that represents the item to be put under version control
Throws:
ServiceException - in the case of repository failures
java.rmi.RemoteException - in the case of network failures

checkout

public void checkout(MetadataInterface entity)
              throws ServiceException,
                     java.rmi.RemoteException
Check out the entity

Specified by:
checkout in interface DAVRepositoryInterface
Parameters:
entity - The entity to be checked out of the repository
Throws:
ServiceException - in the case of repository failures
java.rmi.RemoteException - in the case of network failures

checkin

public void checkin(MetadataInterface entity)
             throws ServiceException,
                    java.rmi.RemoteException
Check in the entity

Specified by:
checkin in interface DAVRepositoryInterface
Parameters:
entity - The entity to be checked in to the repository
Throws:
ServiceException - in the case of repository failures
java.rmi.RemoteException - in the case of network failures

checkin

public void checkin(MetadataInterface entity,
                    java.lang.String comment)
             throws ServiceException,
                    java.rmi.RemoteException
Check in the entity

Specified by:
checkin in interface DAVRepositoryInterface
Parameters:
entity - The entity to be checked in to the repository
comment - A comment for the new version that will be created
Throws:
ServiceException - in the case of repository failures
java.rmi.RemoteException - in the case of network failures

uncheckout

public void uncheckout(MetadataInterface entity)
                throws ServiceException,
                       java.rmi.RemoteException
Uncheck out/Cancel update

Specified by:
uncheckout in interface DAVRepositoryInterface
Parameters:
entity - The entity to be unchecked out
Throws:
ServiceException - in the case of repository failures
java.rmi.RemoteException - in the case of network failures

trackEntity

public int trackEntity(MetadataInterface entity)
                throws java.rmi.RemoteException
Add a new object to the tracking cache. This is called from the Metadata.setRepository() method. Other client code shouldn't need to call this method.

Specified by:
trackEntity in interface DAVRepositoryInterface
Throws:
java.rmi.RemoteException - in the case of network failures

addToCache

public void addToCache(MetadataInterface mi)
                throws java.rmi.RemoteException
Specified by:
addToCache in interface DAVRepositoryInterface
Throws:
java.rmi.RemoteException

getSharedResource

public com.sas.services.webdav.SharedResourceInterface getSharedResource()
                                                                  throws java.rmi.RemoteException
Get an object that represents the shared resource

Specified by:
getSharedResource in interface DAVRepositoryInterface
Returns:
SharedResourceInterface The object that represents the shared resource
Throws:
java.rmi.RemoteException - in the case of network failures

getPreviousVersionNames

public java.util.List getPreviousVersionNames(MetadataInterface entity)
                                       throws ServiceException,
                                              java.rmi.RemoteException
Returns a list of version names for the object

Specified by:
getPreviousVersionNames in interface DAVRepositoryInterface
Parameters:
entity - The object for which a list of versions is required
Returns:
List A list of version names (String)
Throws:
ServiceException - in the case of repository failures
java.rmi.RemoteException - in the case of network failures

getVersion

public MetadataInterface getVersion(MetadataInterface entity,
                                    java.lang.String versionName)
                             throws ServiceException,
                                    java.rmi.RemoteException
Retrieves a particular version of the specified object

Specified by:
getVersion in interface DAVRepositoryInterface
Parameters:
entity - The object for which the specified version is being requested
versionName - The name of the version (one obtained from getPreviousVersionNames)
Returns:
MetadataInterface The specified version of the object
Throws:
ServiceException - in the case of repository failures
java.rmi.RemoteException - in the case of network failures

metadataChange

public void metadataChange(MetadataChangeEvent event)
                    throws java.rmi.RemoteException
Specified by:
metadataChange in interface MetadataChangeListener
Throws:
java.rmi.RemoteException

runInformationServiceTimer

public void runInformationServiceTimer()
Specified by:
runInformationServiceTimer in interface com.sas.services.information.InformationServiceTimerClient

narrow

public java.lang.Object narrow(com.sas.services.information.RepositoryData entity)
                        throws java.rmi.RemoteException
Narrow down the type of this entity and return a class that represents this type via the DAVFactory.

Specified by:
narrow in interface RepositoryInterface
Parameters:
entity - The general entity to be narrowed
Returns:
An instance of a subclass of DAVEntity, depending on type information in entity
Throws:
java.rmi.RemoteException - in case of network failures

isEqual

public boolean isEqual(java.lang.Object o)
                throws java.rmi.RemoteException
Check to see whether the two repositories point to the same url

Specified by:
isEqual in interface RepositoryInterface
Parameters:
o - The repository to be compared against
Returns:
true if they are the same repository, false if not
Throws:
java.rmi.RemoteException - in case of network failures

makeRootFolder

public FolderInterface makeRootFolder(java.lang.String name)
                               throws ServiceException,
                                      java.rmi.RemoteException
Make a root folder in the repository.

DAV root folders cannot be created dynamically. They have to be created using the server configuration tools.

Specified by:
makeRootFolder in interface RepositoryInterface
Parameters:
name - The name of the folder
Returns:
FolderInterface Newly created root folder or null if a folder was not created.
Throws:
ServiceException - if unable to create the root folder.
java.rmi.RemoteException - if a network error occurs.

refreshEntity

public void refreshEntity(MetadataInterface mi)
                   throws ServiceException,
                          java.rmi.RemoteException
Refresh an existing entity in the repository. Refresh the properties of the resource and if not a collection then refresh the contents too.

Specified by:
refreshEntity in interface RepositoryInterface
Parameters:
mi - The entity to be updated on the backing store
Throws:
ServiceException - in the case of network failures
java.rmi.RemoteException - in the case of repository failures

freeResource

public void freeResource()
                  throws java.rmi.RemoteException
Free the resource previously acquired. This method must be called to free up the resource. It should always be called in a try finally block.

Throws:
java.rmi.RemoteException - In the event of remote object failure.

fetchUsingUrl

protected MetadataInterface fetchUsingUrl(java.lang.String url,
                                          java.util.Map extraProperties)
                                   throws ServiceException,
                                          java.rmi.RemoteException
Throws:
ServiceException
java.rmi.RemoteException

toString

public java.lang.String toString()
Return a printable string to represent this instance.

Overrides:
toString in class java.rmi.server.RemoteObject
Returns:
The domain string is hopefully enough to represent this server from any others. If that's not enough, we'll have to provide the bind DN.

getServerString

public java.lang.String getServerString()
Description copied from interface: DAVRepositoryInterface
Returns the identifier string from the connected WebDAV server

Specified by:
getServerString in interface DAVRepositoryInterface
Returns:
String The server identifier

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




Copyright © 2009 SAS Institute Inc. All Rights Reserved.