com.sas.services.information
Interface ServerInterface

All Superinterfaces:
java.rmi.Remote
All Known Subinterfaces:
ChildServerInterface, MetadataServerInterface
All Known Implementing Classes:
OMIChildServer, OMIServer

public interface ServerInterface
extends java.rmi.Remote


Field Summary
static java.lang.String DEFAULT_SERVER_NAME
           
static int SERVER_VERSION_913_SP3
          The version of a 9.1.3sp3 server
static int SERVER_VERSION_913_SP4
          The version of a 9.1.3sp4 server
static int SERVER_VERSION_920
          The version of a 9.2 server
static int SERVER_VERSION_930
          The version of a 9.3 server
static int SERVER_VERSION_UNKNOWN
          Value for an unknown version of a server
 
Method Summary
 void addToCache(MetadataInterface newMetadata)
          Explicitly add a new metadata object to the cache.
 BrowseMetadataInterface browseFetch(java.lang.String objectURI, FilterInterface filter)
          Fetch a lightweight object matching the object URI provided.
 BrowseMetadataInterface browseFolder(java.lang.String folderISEntityKey, FilterInterface filter)
          Get information about a specific folder.
 BrowseMetadataInterface browseFolderRecursive(java.lang.String folderISEntityKey, FilterInterface filter)
          Search a folder tree recursively using the filter.
 java.util.List browseSearch(BrowseMetadataInterface browseFolder, FilterInterface filter)
          Search for objects in the server tree using the folder as a base.
 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.
 java.util.List browseSearch(FolderInterface folder, FilterInterface filter)
          Search for objects in the server tree using the folder as a base.
 java.util.List browseSearch(java.util.List folderList, FilterInterface filter)
          Search for objects in the server tree using the list of folders as bases.
 void clearPendingChanges(boolean rollback)
          Clear the changes that are pending for this server.
 void connect(com.sas.meta.SASOMI.IOMI cnxn, ServerDef def, UserContextInterface user)
          Construct an OMIServer with the connection already established.
 void connect(ServerDef def, UserContextInterface user)
          Connect a user to an InformationService server.
 void debug(java.lang.String context, java.util.ResourceBundle rb, java.lang.String key, java.lang.Object arg0, java.lang.Object arg1, java.lang.Object arg2)
           
 void debug(java.lang.String context, java.lang.String message)
           
 void debug(java.lang.String context, java.lang.String message, java.lang.Throwable t)
           
 void deleteEntity(MetadataInterface input)
          Delete an entity in the repository.
 void destroy()
          Close the connections and release all resources in use by this server instance.
 void error(java.lang.String context, java.util.ResourceBundle rb, java.lang.String key, java.lang.Object arg0, java.lang.Object arg1)
           
 void error(java.lang.String context, java.lang.String message)
           
 java.lang.String executeRequest(java.lang.String request)
          Execute a client request and return the result.
 MetadataInterface factoryProcess(java.lang.Object o)
          Process a raw repository object into a smart object.
 MetadataInterface fetch(java.lang.String objectURI)
          Fetch an object from the metadat based on its URI.
 MetadataInterface fetch(java.lang.String repositoryKey, boolean bypassCache)
          Fetch an object from the repository given the repository key.
 void flush()
          flush any pending updates to the metadata server.
 void fromByteArray(UserContextInterface uci, byte[] data)
          Initialize an instance of the server from a byte array.
 UserIdentityInterface generatePassword(java.lang.String user)
          Generate a one-time use password against the metadata server connection for the specified user.
 java.lang.String getDomain()
          Get the authentication domain used to connect to the server.
 IdentityGroupInterface getExplicitIdentityGroup(java.lang.String IdGrpName)
          Get the IdentityGroupInterface for an explicit IdentityGroup
 RepositoryInterface getFoundationRepository()
          Get a handle to the foundation repository for this server.
 FolderInterface getHomeFolder(java.lang.String userName, UserFolderType folder, Filter filter)
          Get a user's home folder.
 FolderInterface getHomeFolder(java.lang.String userName, UserFolderType folder, Filter filter, boolean createIfNecessary)
          Get a user's home folder.
 java.lang.String getHost()
          Get the host name of the server.
 IdentityInterface getIdentity()
          Get the IdentityInterface representing the connected user.
 java.lang.String getName()
          Get the server's configured definition name.
 MetadataInterface getObjectByPath(PathUrl url)
          Get an object in the BIP tree using a PathUrl to find it.
 MetadataInterface getObjectByPathFilter(PathUrl url)
          Get an object in the BIP tree using a PathUrl to create a filter to search for it, rather than walking the folder hierarchy.
 PersonInterface getPerson()
          Get the PersonInterface representing the connected user.
 int getPort()
          Get the server's TCP port number.
 java.lang.String getProtocol()
          Get the protocol string for this server.
 java.util.List getRepositories(boolean getAll)
          Get a List of the requested repositories from this Server.
 java.util.List getRepositories(java.util.List repositoryNames)
          Get a List of named repositories.
 RepositoryInterface getRepository(java.lang.String name)
          Get a named repository managed by this server.
 java.util.List getRepositoryInfo()
          Get information about the repositories that are maintained by this server instance.
 java.lang.String getRepositoryName(java.lang.String fqid)
          Get a repository name given the FQID of the repository.
 java.util.List getRepositoryNames()
          Get a list of the repository names managed by this server.
 RootFolderInterface getRootFolder()
          Get the server's root folder.
 int getServerVersion()
          Get the version number of the server.
 TypeDescriptorInterface getTypeDescriptor(java.lang.String typeName)
          Get the type descriptor for a known type name.
 UserContextInterface getUserContext()
          Get the UserContext that this server was created on behalf of.
 void info(java.lang.String context, java.util.ResourceBundle rb, java.lang.String key, java.lang.Object arg0, java.lang.Object arg1, java.lang.Object arg2)
           
 void info(java.lang.String context, java.lang.String message)
           
 void info(java.lang.String context, java.lang.String message, java.lang.Throwable t)
           
 boolean isAuthorized(java.lang.String credential, java.lang.String resource, java.lang.String permission)
          Check authorization status for a given credential, resource, and permission.
 boolean isUserAuthorized(java.lang.String repositoryId, java.lang.String permission)
          Check if the user has the specified permission in the repository.
 void loadTypes()
           
 void loadTypes(boolean force)
           
 ChildServerInterface newChild()
          Create a child repository instance with its own cache, which can be used to perform a group of updates transaction-style.
 ChildServerInterface newChild(boolean detached)
          Create a child repository instance with its own cache, which can be used to perform a group of updates transaction-style.
 MetadataInterface newMetadata(java.lang.String reposId, java.lang.String name, java.lang.String type)
          Create a new metadata item.
 void reconnect()
          Reconnect to the server if the connection was broken for any reason.
 void refreshAllData()
          Refresh all of the data cached from this server.
 void refreshEntity(MetadataInterface mi)
          Refresh an entity from the data in the server.
 java.util.List search(FilterInterface filter)
          Search the repository using the provided filter.
 java.util.List search(FolderInterface folder, FilterInterface filter)
          Search the server tree from a given folder base using the provided filter.
 java.util.List search(java.util.List folderList, FilterInterface filter)
          Search the server from a collection of base folders.
 byte[] toByteArray(boolean copyData)
          Output the state of the server to a byte array.
 void warn(java.lang.String context, java.util.ResourceBundle rb, java.lang.String key, java.lang.Object arg0, java.lang.Object arg1)
           
 void warn(java.lang.String context, java.lang.String message)
           
 void warn(java.lang.String context, java.lang.String message, java.lang.Throwable t)
           
 

Field Detail

DEFAULT_SERVER_NAME

static final java.lang.String DEFAULT_SERVER_NAME
See Also:
Constant Field Values

SERVER_VERSION_UNKNOWN

static final int SERVER_VERSION_UNKNOWN
Value for an unknown version of a server

See Also:
Constant Field Values

SERVER_VERSION_913_SP3

static final int SERVER_VERSION_913_SP3
The version of a 9.1.3sp3 server

See Also:
Constant Field Values

SERVER_VERSION_913_SP4

static final int SERVER_VERSION_913_SP4
The version of a 9.1.3sp4 server

See Also:
Constant Field Values

SERVER_VERSION_920

static final int SERVER_VERSION_920
The version of a 9.2 server

See Also:
Constant Field Values

SERVER_VERSION_930

static final int SERVER_VERSION_930
The version of a 9.3 server

See Also:
Constant Field Values
Method Detail

connect

void connect(ServerDef def,
             UserContextInterface user)
             throws ServiceException,
                    java.rmi.RemoteException
Connect a user to an InformationService server.

Parameters:
def - The repository definition with the connection parameters.
user - The user for whom the connection is being established.
Throws:
ServiceException - If a service level error occurs.
java.rmi.RemoteException - In the event of remote object failure.

reconnect

void reconnect()
               throws ServiceException,
                      java.rmi.RemoteException
Reconnect to the server if the connection was broken for any reason. This method will typically be used internally to the Information Service classes, but may be used by clients to control reconnect attempts outside of server operations.

Throws:
ServiceException - If the connection attempt fails for any reason.
java.rmi.RemoteException - In the event of remote object failure.

connect

void connect(com.sas.meta.SASOMI.IOMI cnxn,
             ServerDef def,
             UserContextInterface user)
             throws ServiceException,
                    java.rmi.RemoteException
Construct an OMIServer with the connection already established.

Parameters:
cnxn - The IOMI connection to the server.
def - The server definition. This is still needed for the name, and the host and port are useful in the event of a reconnect try.
user - The user this instance belongs to.
Throws:
ServiceException - If a service level error occurs.
java.rmi.RemoteException - In the event of remote object failure.

getName

java.lang.String getName()
                         throws java.rmi.RemoteException
Get the server's configured definition name.

Returns:
The server's configured definition name.
Throws:
java.rmi.RemoteException - In the event of remote object failure.

getRepositoryInfo

java.util.List getRepositoryInfo()
                                 throws java.rmi.RemoteException
Get information about the repositories that are maintained by this server instance.

Returns:
A List of RepositoryInfo objects with information about the repositories.
Throws:
java.rmi.RemoteException - In the event of remote object failure.

getRepositoryNames

java.util.List getRepositoryNames()
                                  throws ServiceException,
                                         java.rmi.RemoteException
Get a list of the repository names managed by this server.

Returns:
A List of Strings with the names of the repositories that are managed by this server.
Throws:
ServiceException - If a server error occurs.
java.rmi.RemoteException - In the event of remote object failure.

getRepository

RepositoryInterface getRepository(java.lang.String name)
                                  throws ServiceException,
                                         java.rmi.RemoteException
Get a named repository managed by this server.

Parameters:
name - The name of the repository to return.
Returns:
A RepositoryInterface for the named repository, or null if a repository with that name wasn't found.
Throws:
ServiceException - If a server error occured.
java.rmi.RemoteException - In the event of remote object failure.

getRepositories

java.util.List getRepositories(boolean getAll)
                               throws ServiceException,
                                      java.rmi.RemoteException
Get a List of the requested repositories from this Server. This method returns a List of RepositoryInterface instances that have been explicitly requested via the getRepository(String) method, unless the getAll parameter is true; then all of the repositories managed by the server are returned.

Parameters:
getAll - If true, all of the repositories managed by the server are returned. Otherwise, only the explicitly requested repositories are returned.
Returns:
A List of RepositoryInterface objects.
Throws:
ServiceException - If a service level error occurs.
java.rmi.RemoteException - In the event of remote object failure.

getRepositories

java.util.List getRepositories(java.util.List repositoryNames)
                               throws ServiceException,
                                      java.rmi.RemoteException
Get a List of named repositories. The repositoryNames parameter is a List of Strings with repository names to return.

Parameters:
repositoryNames - A List of repository names to return.
Returns:
A List of RepositoryInterface objects for the named repositories.
Throws:
ServiceException - If a service level error occurs.
java.rmi.RemoteException - In the event of remote object failure.

getHomeFolder

FolderInterface getHomeFolder(java.lang.String userName,
                              UserFolderType folder,
                              Filter filter)
                              throws ServiceException,
                                     java.rmi.RemoteException
Get a user's home folder. If the userName is null, the currently connected user's home folder is returned. If not, the home folder of the specified user is returned. This method will always return the requested folder if possible. If it exists, it's returned. If not, it's created and returned.

Parameters:
userName - If null, the home folder of the connected user is returned. Otherwise, it will attempt to return the home folder of the user whose user name is provided.
folder - Which folder to return. If null, the user's "My Folder" is returned. Valid options are UserFolderType.MYFOLDER, or UserFolderType.APPFOLDER for the user's private, or application data folders respectively.
filter - An optional filter that can be used to provide a template and/or flags for the retrieval of folder data. Other than the template and flags, the filter is not used.
Returns:
The "home" folder of the user that's connected to the repository. This may be a server function, or an operation that requires Service level configuration. If no home folder can be determined, null is returned.
Throws:
ServiceException - If a server error occurs.
java.rmi.RemoteException - In the event of remote object failure.

getHomeFolder

FolderInterface getHomeFolder(java.lang.String userName,
                              UserFolderType folder,
                              Filter filter,
                              boolean createIfNecessary)
                              throws ServiceException,
                                     java.rmi.RemoteException
Get a user's home folder. If the userName is null, the currently connected user's home folder is returned. If not, the home folder of the specified user is returned. Depending on the setting of the createIfNecessary flag, this method may return a null if the requested folder does not exist already.

Parameters:
userName - If null, the home folder of the connected user is returned. Otherwise, it will attempt to return the home folder of the user whose user name is provided.
folder - Which folder to return. If null, the user's "My Folder" is returned. Valid options are UserFolderType.MYFOLDER, or UserFolderType.APPFOLDER for the user's private, or application data folders respectively.
filter - An optional filter that can be used to provide a template and/or flags for the retrieval of folder data. Other than the template and flags, the filter is not used.
createIfNecessary - If true, the requested folder will created if necessary and returned. If false, the folder will only be returned if it already exists.
Returns:
The "home" folder of the user that's connected to the repository. This may be a server function, or an operation that requires Service level configuration. If no home folder can be determined, null is returned.
Throws:
ServiceException - If a server error occurs.
java.rmi.RemoteException - In the event of remote object failure.

getProtocol

java.lang.String getProtocol()
                             throws ServiceException,
                                    java.rmi.RemoteException
Get the protocol string for this server.

Returns:
The string representing the protocol this server understands.
Throws:
ServiceException - If a server error occurs.
java.rmi.RemoteException - In the event of remote Object failure.

getHost

java.lang.String getHost()
                         throws ServiceException,
                                java.rmi.RemoteException
Get the host name of the server.

Returns:
The server's DNS host name.
Throws:
ServiceException - If a service level error occurs.
java.rmi.RemoteException - In the event of remote object failure.

getPort

int getPort()
            throws ServiceException,
                   java.rmi.RemoteException
Get the server's TCP port number.

Returns:
The TCP port number the server is listening on.
Throws:
ServiceException - If a service level error occurs.
java.rmi.RemoteException - In the event of remote object failure.

getDomain

java.lang.String getDomain()
                           throws ServiceException,
                                  java.rmi.RemoteException
Get the authentication domain used to connect to the server.

Returns:
The authentication domain that was used when establishing a connection to the server.
Throws:
ServiceException - If a service level error occurs.
java.rmi.RemoteException - In the event of remote object failure.

destroy

void destroy()
             throws ServiceException,
                    java.rmi.RemoteException
Close the connections and release all resources in use by this server instance.

Throws:
ServiceException - If a service level error occurs.
java.rmi.RemoteException - In the event of remote object failure.

getRepositoryName

java.lang.String getRepositoryName(java.lang.String fqid)
                                   throws java.rmi.RemoteException
Get a repository name given the FQID of the repository. It needs to be the "A0000001.xxxxxxxx" id.

Parameters:
fqid - The fully qualified Id of the desired repository.
Returns:
The name of the repository matching the id, or null if none was found.
Throws:
java.rmi.RemoteException - In the event of remote object failure.

getPerson

PersonInterface getPerson()
                          throws ServiceException,
                                 java.rmi.RemoteException
Get the PersonInterface representing the connected user.

Returns:
A PersonInterface that represents the connected user in the metadata server. Null if the user has no metadata presence (a "public" user). Also null if a group login was used.
Throws:
ServiceException - If a repository error occurs.
java.rmi.RemoteException - In the event of remote object failure.

getIdentity

IdentityInterface getIdentity()
                              throws ServiceException,
                                     java.rmi.RemoteException
Get the IdentityInterface representing the connected user.

Returns:
A IdentityInterface that represents the connected user in the metadata server. Null if the user has no metadata presence (a "public" user).
Throws:
ServiceException - If a repository error occurs.
java.rmi.RemoteException - In the event of remote object failure.

getUserContext

UserContextInterface getUserContext()
                                    throws ServiceException,
                                           java.rmi.RemoteException
Get the UserContext that this server was created on behalf of.

Returns:
The UserContext that was used to create this server instance.
Throws:
ServiceException - If a service level error occurs.
java.rmi.RemoteException - In the event of remote object failure.

getFoundationRepository

RepositoryInterface getFoundationRepository()
                                            throws ServiceException,
                                                   java.rmi.RemoteException
Get a handle to the foundation repository for this server.

Returns:
The RepositoryInterface representing the foundation repository for this server.
Throws:
ServiceException - If a server error occurs.
java.rmi.RemoteException - In the event of remote object failure.

generatePassword

UserIdentityInterface generatePassword(java.lang.String user)
                                       throws ServiceException,
                                              java.rmi.RemoteException
Generate a one-time use password against the metadata server connection for the specified user. Passing in a null or empty string for the user will generate a password for the currently authenticated user. Passing in a user id will only work if the current user is the trusted user.

Parameters:
user - The userid to generate a password for. This should be null or empty to generate a password for the current user.
Returns:
A UserIdentityInterface object with the generated userid and password. The domain is hard-coded to "TRUST".
Throws:
ServiceException - If an error occurs during the password generation.
java.rmi.RemoteException - In the event of remote object failure.

getRootFolder

RootFolderInterface getRootFolder()
                                  throws ServiceException,
                                         java.rmi.RemoteException
Get the server's root folder.

Returns:
The FolderInterface representing the root of the server's Folder hierarchy.
Throws:
ServiceException - If a server error occurs.
java.rmi.RemoteException - In the event of remote object failure.

executeRequest

java.lang.String executeRequest(java.lang.String request)
                                throws ServiceException,
                                       java.rmi.RemoteException
Execute a client request and return the result. This method is not intended for use by application clients.

Parameters:
request - A correctly formatted server request to send as-is to the server.
Returns:
The response from the server. This response is not processed in any way, and is just returned to the caller, who is reponsible for parsing for errors.
Throws:
ServiceException - If a communications error occurs.
java.rmi.RemoteException - In the event of remote object failure.

getServerVersion

int getServerVersion()
                     throws ServiceException,
                            java.rmi.RemoteException
Get the version number of the server. If this method is not supported for a server implementation, it will return -1.

For an OMR server, valid return values include:

Returns:
The server's version number, represented as an integer. A -1 indicates the method is not supported by a given implementation.
Throws:
ServiceException - If a server error occurs.
java.rmi.RemoteException - In the event of remote object failure.

factoryProcess

MetadataInterface factoryProcess(java.lang.Object o)
                                 throws ServiceException,
                                        java.rmi.RemoteException
Process a raw repository object into a smart object. Going through the repository rather than directly against the Factory allows for better cache control. This will primarily be called by Smart objects, RepositoryInterface implementations, and other Information Service classes.

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.

getTypeDescriptor

TypeDescriptorInterface getTypeDescriptor(java.lang.String typeName)
                                          throws ServiceException,
                                                 java.rmi.RemoteException
Get the type descriptor for a known type name.

Parameters:
typeName - The non-localized type name for the type.
Returns:
The TypeDescriptorInterface for the type or null if none was found.
Throws:
ServiceException - If a factory error or repository error occurs.
java.rmi.RemoteException - In the event of remote object failure.

getExplicitIdentityGroup

IdentityGroupInterface getExplicitIdentityGroup(java.lang.String IdGrpName)
                                                throws ServiceException,
                                                       java.rmi.RemoteException
Get the IdentityGroupInterface for an explicit IdentityGroup

Parameters:
IdGrpName - The non-localized name for the IdentityGroup.
Returns:
The IdentityGroupInterface for the type or null if none was found.
Throws:
ServiceException - If a factory error or repository error occurs.
java.rmi.RemoteException - In the event of remote object failure.

isAuthorized

boolean isAuthorized(java.lang.String credential,
                     java.lang.String resource,
                     java.lang.String permission)
                     throws ServiceException,
                            java.rmi.RemoteException
Check authorization status for a given credential, resource, and permission.

Parameters:
credential - A credential handle. If this is null, the current authenticated user is checked for permission.
resource - A resource string of the form OMSOBJ:type/FQID which represents the object whose permissions are being checked.
permission - A permission or comma-separated list of permissions to check against the user's authorized permissions for the resource.
Returns:
true if the user is granted the requested permissions, false otherwise.
Throws:
ServiceException - in the event of repository errors.
java.rmi.RemoteException - in the event of remote object failure.

fetch

MetadataInterface fetch(java.lang.String objectURI)
                        throws ServiceException,
                               java.rmi.RemoteException
Fetch an object from the metadat based on its URI.

Parameters:
objectURI - When the SASDS URI is supported, this will be that String. Until then, this should be the entity key (obtained via the MetadataInterface.getEntityKey method) or the repository key (obtained via the MetadataInterface.getReposKey method);
Returns:
The metadata object that was fetched.
Throws:
ServiceException - If no object matching the URI was found, or some other error occurred.
java.rmi.RemoteException - In the event of remote object failure.

search

java.util.List search(FolderInterface folder,
                      FilterInterface filter)
                      throws ServiceException,
                             java.rmi.RemoteException
Search the server tree from a given folder base using the provided filter.

Parameters:
folder - The folder which is the base of the search hierarchy.
filter - The filter criteria to use to search for objects.
Returns:
A List of objects matching the filter within tree specified.
Throws:
ServiceException - If a repository error occurs.
java.rmi.RemoteException - In the event of remote object failure.

search

java.util.List search(java.util.List folderList,
                      FilterInterface filter)
                      throws ServiceException,
                             java.rmi.RemoteException
Search the server from a collection of base folders. All of the folders are searched and the results aggregated into a List.

Parameters:
folderList - The List of FolderInterface objects to use as search bases.
filter - The filter criteria to use to search for objects.
Returns:
The List of objects matching the filter criteria in the folders.
Throws:
ServiceException - If a repository error occurs.
java.rmi.RemoteException - In the event of remote object failure.

browseFolder

BrowseMetadataInterface 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. The return object is the BrowseMetadataInterface object representing the folder itself.

If what you want is a complete set of information about a specific folder, you may want to consider using the browseFetch method instead of browseFolder, using an appropriate template.

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 BrowseMetadataInterface object. The folder and any matching members will be returned.
Throws:
ServiceException - If a repository error occurs.
java.rmi.RemoteException - in the event of remote object failure.

browseFolderRecursive

BrowseMetadataInterface 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 as Members of the entity returned. If no filter is specified, all the members and subfolders of the requested folder will be returned in the resulting BrowseMetadata object, with their members and subfolders included in their Maps. This is potentially a very expensive operation, so use it cautiously.

Parameters:
folderISEntityKey - The Entity key of the requested folder.
filter - A Filter to limit the results.
Returns:
A BrowseMetadataInterface object representing the Folder being browsed.
Throws:
ServiceException - If a repository error occurs.
java.rmi.RemoteException - In the event of remote object failure.

browseFetch

BrowseMetadataInterface browseFetch(java.lang.String objectURI,
                                    FilterInterface filter)
                                    throws ServiceException,
                                           java.rmi.RemoteException
Fetch a lightweight object matching the object URI provided.

Parameters:
objectURI - The SASDS URI of the object to fetch.
filter - A filter to provide optional flags and template.
Returns:
The browse object for the URI provided.
Throws:
ServiceException - If a repository error occurs.
java.rmi.RemoteException - In the event of remote object failure.

browseSearch

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, and responsible parties but no other associated objects.

Parameters:
filter - A Filter to limit the objects returned to those the client is interested in. This needs to include the repository the user wants to search, or all repositories will be searched. This can be expensive.
Returns:
A List of BrowseMetadataInterface objects.
Throws:
ServiceException - In the event of repository errors.
java.rmi.RemoteException - In the event of remote object failure.

browseSearch

java.util.List browseSearch(BrowseMetadataInterface browseFolder,
                            FilterInterface filter)
                            throws ServiceException,
                                   java.rmi.RemoteException
Search for objects in the server tree using the folder as a base. This will return lightweight objects which cannot be updated.

Parameters:
browseFolder - The BrowseMetadataInterface object representing a folder to use as a base of the search.
filter - The filter criteria to use to find objects.
Returns:
A List of BrowseMetadataInterface objects in the folder matching the criteria.
Throws:
ServiceException - If a repository error occurs.
java.rmi.RemoteException - In the event of remote object failure.

browseSearch

java.util.List browseSearch(FolderInterface folder,
                            FilterInterface filter)
                            throws ServiceException,
                                   java.rmi.RemoteException
Search for objects in the server tree using the folder as a base. This will return lightweight objects which cannot be updated.

Parameters:
folder - The FolderInterface object representing a folder to use as a base of the search.
filter - The filter criteria to use to find objects.
Returns:
A List of BrowseMetadataInterface objects in the folder matching the criteria.
Throws:
ServiceException - If a repository error occurs.
java.rmi.RemoteException - In the event of remote object failure.

browseSearch

java.util.List browseSearch(java.util.List folderList,
                            FilterInterface filter)
                            throws ServiceException,
                                   java.rmi.RemoteException
Search for objects in the server tree using the list of folders as bases. This will return lightweight objects which cannot be updated.

Parameters:
folderList - The List of FolderInterface object representing folders to use as a base of the search.
filter - The filter criteria to use to find objects.
Returns:
A List of BrowseMetadataInterface objects in the folder matching the criteria.
Throws:
ServiceException - If a repository error occurs.
java.rmi.RemoteException - In the event of remote object failure.

getObjectByPath

MetadataInterface getObjectByPath(PathUrl url)
                                  throws ServiceException,
                                         java.rmi.RemoteException
Get an object in the BIP tree using a PathUrl to find it.

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.

getObjectByPathFilter

MetadataInterface getObjectByPathFilter(PathUrl url)
                                        throws ServiceException,
                                               java.rmi.RemoteException
Get an object in the BIP tree using a PathUrl to create a filter to search for it, rather than walking the folder hierarchy. This can be a more efficient technique than the getObjectByPath method uses, but works best for public type objects.

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.

newMetadata

MetadataInterface newMetadata(java.lang.String reposId,
                              java.lang.String name,
                              java.lang.String type)
                              throws ServiceException,
                                     java.rmi.RemoteException
Create a new metadata item. This is used to create repository-specific metadata objects. The type must be a repository-native type string, not a smart object type.

Parameters:
reposId - The ID of the repository where the object is going. This can be the 8.8 ID, the 8 byte ID, or the repository name.
name - The name of the new metadata object.
type - The repository-specific type of the new metadata.
Returns:
The smart object representation of the new metadata.
Throws:
ServiceException - If a repository or service-level error occurs.
java.rmi.RemoteException - In the event of remote object failure.

fetch

MetadataInterface fetch(java.lang.String repositoryKey,
                        boolean bypassCache)
                        throws ServiceException,
                               java.rmi.RemoteException
Fetch an object from the repository given the repository key. 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.

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.

search

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

Parameters:
filter - A filter to use to limit the returned data.
Returns:
A List of MetadataInterface objects found in the repository that match the filter.
Throws:
ServiceException - If repository errors occur.
java.rmi.RemoteException - in the event of remote object failure.

deleteEntity

void deleteEntity(MetadataInterface input)
                  throws ServiceException,
                         java.rmi.RemoteException
Delete an entity in the repository. This method shouldn't be called directly by clients. Instead, use the MetadataInterface.delete() method which may also clean up dependent objects.

Parameters:
input - The object to delete.
Throws:
ServiceException - if a repository error occurs.
java.rmi.RemoteException - in the event of remote object failure.

refreshEntity

void refreshEntity(MetadataInterface mi)
                   throws ServiceException,
                          java.rmi.RemoteException
Refresh an entity from the data in the server.

Parameters:
mi - The Metadata object to refresh.
Throws:
java.rmi.RemoteException - in the event of network errors.
ServiceException - if a repository error occurs.

newChild

ChildServerInterface newChild()
                              throws ServiceException,
                                     java.rmi.RemoteException
Create a child repository instance with its own cache, which can be used to perform a group of updates transaction-style.

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

newChild

ChildServerInterface newChild(boolean detached)
                              throws ServiceException,
                                     java.rmi.RemoteException
Create a child repository instance with its own cache, which can be used to perform a group of updates transaction-style.

Parameters:
detached - If true, a detached transaction is created that will not cause objects to be added to the main store of the server.
Returns:
A new object of type ChildRepositoryInterface.
Throws:
ServiceException - if a repository error occurs.
java.rmi.RemoteException - in the event of remote object failure.

refreshAllData

void refreshAllData()
                    throws ServiceException,
                           java.rmi.RemoteException
Refresh all of the data cached from this server.

Throws:
ServiceException - If a server error occurs during refresh.
java.rmi.RemoteException - In the event of remote object failure.

addToCache

void addToCache(MetadataInterface newMetadata)
                throws ServiceException,
                       java.rmi.RemoteException
Explicitly add a new metadata object to the cache.

Parameters:
newMetadata - The new metadata object to add.
Throws:
ServiceException - If an error occurs adding the object.
java.rmi.RemoteException - In the event of remote object failure.

flush

void flush()
           throws ServiceException,
                  java.rmi.RemoteException
flush any pending updates to the metadata server.

Throws:
ServiceException - If an error occurs during the update.
java.rmi.RemoteException - In the event of remote object failure.

clearPendingChanges

void clearPendingChanges(boolean rollback)
                         throws ServiceException,
                                java.rmi.RemoteException
Clear the changes that are pending for this server. This should only be done to clear an error in the changed data that can't be corrected by the user or application. If the rollback flag is set, then all the pending changes will be rolled back to their persisted state. This will likely require a trip to the server to fetch the data.

Parameters:
rollback - Roll back the changed objects to their persisted state.
Throws:
ServiceException - If a repository error occurs during the operation.
java.rmi.RemoteException - In the event of remote object failure.

isUserAuthorized

boolean isUserAuthorized(java.lang.String repositoryId,
                         java.lang.String permission)
                         throws ServiceException,
                                java.rmi.RemoteException
Check if the user has the specified permission in the repository. This only checks if the connected user has the specified permission to the repository given. It can't make decisions based on hierarchy, etc. This is most useful to determine if the user has WriteMetadata in the repository, which will determine if they can create new objects.

Parameters:
repositoryId - The repository id. This can be the 8.8 FQID, the name, or the 8 character unique portion of the FQID (all repository id's start with A0000001 anyway).
permission - The permission string. This will most usefully be "WriteMetadata" or PermissionInterface.PERMISSION_WRITEMETADATA.
Returns:
True if the user has the specified permission in the repository, false otherwise.
Throws:
ServiceException - If the permission is invalid, the repository specification is invalid, or there is some other repository error.
java.rmi.RemoteException - In the event of remote object failure.

debug

void debug(java.lang.String context,
           java.util.ResourceBundle rb,
           java.lang.String key,
           java.lang.Object arg0,
           java.lang.Object arg1,
           java.lang.Object arg2)
           throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

debug

void debug(java.lang.String context,
           java.lang.String message)
           throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

debug

void debug(java.lang.String context,
           java.lang.String message,
           java.lang.Throwable t)
           throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

info

void info(java.lang.String context,
          java.util.ResourceBundle rb,
          java.lang.String key,
          java.lang.Object arg0,
          java.lang.Object arg1,
          java.lang.Object arg2)
          throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

info

void info(java.lang.String context,
          java.lang.String message)
          throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

info

void info(java.lang.String context,
          java.lang.String message,
          java.lang.Throwable t)
          throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

warn

void warn(java.lang.String context,
          java.util.ResourceBundle rb,
          java.lang.String key,
          java.lang.Object arg0,
          java.lang.Object arg1)
          throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

warn

void warn(java.lang.String context,
          java.lang.String message)
          throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

warn

void warn(java.lang.String context,
          java.lang.String message,
          java.lang.Throwable t)
          throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

error

void error(java.lang.String context,
           java.util.ResourceBundle rb,
           java.lang.String key,
           java.lang.Object arg0,
           java.lang.Object arg1)
           throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

error

void error(java.lang.String context,
           java.lang.String message)
           throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

toByteArray

byte[] toByteArray(boolean copyData)
                   throws ServiceException,
                          java.rmi.RemoteException
Output the state of the server to a byte array.

Parameters:
copyData - If true, the contents of the data cache is output to the byte stream.
Returns:
The byte array containing the object state.
Throws:
ServiceException - If a service level error occurs.
java.rmi.RemoteException - In the event of remote object failure.

fromByteArray

void fromByteArray(UserContextInterface uci,
                   byte[] data)
                   throws java.rmi.RemoteException,
                          ServiceException
Initialize an instance of the server from a byte array.

Parameters:
uci - The UserContextInterface containing any credentials or other information to complete the initialization.
data - The byte array containing the data stream for initializing the object.
Throws:
java.rmi.RemoteException - In the event of remote object failure.
ServiceException - If a service level error occurs.

loadTypes

void loadTypes()
               throws ServiceException,
                      java.rmi.RemoteException
Throws:
ServiceException
java.rmi.RemoteException

loadTypes

void loadTypes(boolean force)
               throws ServiceException,
                      java.rmi.RemoteException
Throws:
ServiceException
java.rmi.RemoteException



Copyright © 2009 SAS Institute Inc. All Rights Reserved.