Package com.sas.services.information

# Interface ServerInterface

All Superinterfaces:
  `Remote`

All Known Subinterfaces:
  `ChildServerInterface`, `MetadataServerInterface`

All Known Implementing Classes:
  `OMIChildServer`, `OMIServer`

public interface ServerInterface extends Remote

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `DEFAULT_SERVER_NAME`
  `static final int`
  `SERVER_VERSION_913_SP3`
  The version of a 9.1.3sp3 server
  `static final int`
  `SERVER_VERSION_913_SP4`
  The version of a 9.1.3sp4 server
  `static final int`
  `SERVER_VERSION_920`
  The version of a 9.2 server
  `static final int`
  `SERVER_VERSION_930`
  The version of a 9.3 server
  `static final int`
  `SERVER_VERSION_UNKNOWN`
  Value for an unknown version of a server

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addToCache(MetadataInterface newMetadata)`
  Explicitly add a new metadata object to the cache.
  `BrowseMetadataInterface`
  `browseFetch(String objectURI, FilterInterface filter)`
  Fetch a lightweight object matching the object URI provided.
  `BrowseMetadataInterface`
  `browseFolder(String folderISEntityKey, FilterInterface filter)`
  Get information about a specific folder.
  `BrowseMetadataInterface`
  `browseFolderRecursive(String folderISEntityKey, FilterInterface filter)`
  Search a folder tree recursively using the filter.
  `List`
  `browseSearch(BrowseMetadataInterface browseFolder, FilterInterface filter)`
  Search for objects in the server tree using the folder as a base.
  `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.
  `List`
  `browseSearch(FolderInterface folder, FilterInterface filter)`
  Search for objects in the server tree using the folder as a base.
  `List`
  `browseSearch(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(com.sas.meta.SASOMI.IOMI cnxn, ServerDef def, UserContextInterface user, Cluster cluster)`
  Construct an OMIServer with the connection already established.
  `void`
  `connect(ServerDef def, UserContextInterface user)`
  Connect a user to an InformationService server.
  `void`
  `connect(ServerDef def, UserContextInterface user, Cluster cluster)`
  Connect a user to an InformationService server.
  `void`
  `debug(String context, String message)`
  `void`
  `debug(String context, String message, Throwable t)`
  `void`
  `debug(String context, ResourceBundle rb, String key, Object arg0, Object arg1, Object arg2)`
  `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(String context, String message)`
  `void`
  `error(String context, ResourceBundle rb, String key, Object arg0, Object arg1)`
  `String`
  `executeRequest(String request)`
  Execute a client request and return the result.
  `MetadataInterface`
  `factoryProcess(Object o)`
  Process a raw repository object into a smart object.
  `MetadataInterface`
  `fetch(String objectURI)`
  Fetch an object from the metadat based on its URI.
  `MetadataInterface`
  `fetch(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(String user)`
  Generate a one-time use password against the metadata server connection for the specified user.
  `String`
  `getDomain()`
  Get the authentication domain used to connect to the server.
  `IdentityGroupInterface`
  `getExplicitIdentityGroup(String IdGrpName)`
  Get the IdentityGroupInterface for an explicit IdentityGroup
  `RepositoryInterface`
  `getFoundationRepository()`
  Get a handle to the foundation repository for this server.
  `FolderInterface`
  `getHomeFolder(String userName, UserFolderType folder, Filter filter)`
  Get a user's home folder.
  `FolderInterface`
  `getHomeFolder(String userName, UserFolderType folder, Filter filter, boolean createIfNecessary)`
  Get a user's home folder.
  `String`
  `getHost()`
  Get the host name of the server.
  `IdentityInterface`
  `getIdentity()`
  Get the IdentityInterface representing the connected user.
  `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.
  `String`
  `getProtocol()`
  Get the protocol string for this server.
  `List`
  `getRepositories(boolean getAll)`
  Get a List of the requested repositories from this Server.
  `List`
  `getRepositories(List repositoryNames)`
  Get a List of named repositories.
  `RepositoryInterface`
  `getRepository(String name)`
  Get a named repository managed by this server.
  `List`
  `getRepositoryInfo()`
  Get information about the repositories that are maintained by this server instance.
  `String`
  `getRepositoryName(String fqid)`
  Get a repository name given the FQID of the repository.
  `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(String typeName)`
  Get the type descriptor for a known type name.
  `Collection<TypeDescriptorInterface>`
  `getTypeDescriptors()`
  Returns an unmodifiable collection of all known type descriptors.
  `UserContextInterface`
  `getUserContext()`
  Get the UserContext that this server was created on behalf of.
  `void`
  `info(String context, String message)`
  `void`
  `info(String context, String message, Throwable t)`
  `void`
  `info(String context, ResourceBundle rb, String key, Object arg0, Object arg1, Object arg2)`
  `boolean`
  `isAuthorized(String credential, String resource, String permission)`
  Check authorization status for a given credential, resource, and permission.
  `boolean`
  `isConnected()`
  Returns whether or not the server instance has a valid connection already established.
  `boolean`
  `isUserAuthorized(String repositoryId, 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(String reposId, String name, 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.
  `List`
  `search(FilterInterface filter)`
  Search the repository using the provided filter.
  `List`
  `search(FolderInterface folder, FilterInterface filter)`
  Search the server tree from a given folder base using the provided filter.
  `List`
  `search(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(String context, String message)`
  `void`
  `warn(String context, String message, Throwable t)`
  `void`
  `warn(String context, ResourceBundle rb, String key, Object arg0, Object arg1)`

- ## Field Details

  - ### DEFAULT_SERVER_NAME

    static final 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 Details

  - ### reconnect

    void reconnect() throws ServiceException, 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.
      `RemoteException` - In the event of remote object failure.

  - ### connect

    void connect(ServerDef def, UserContextInterface user) throws ServiceException, 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.
      `RemoteException` - In the event of remote object failure.

  - ### connect

    void connect(ServerDef def, UserContextInterface user, Cluster cluster) throws ServiceException, 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.
      `cluster` - the cluster definition to use for the connection
    Throws:
      `ServiceException` - If a service level error occurs.
      `RemoteException` - In the event of remote object failure.

  - ### connect

    void connect(com.sas.meta.SASOMI.IOMI cnxn, ServerDef def, UserContextInterface user) throws ServiceException, 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.
      `RemoteException` - In the event of remote object failure.

  - ### connect

    void connect(com.sas.meta.SASOMI.IOMI cnxn, ServerDef def, UserContextInterface user, Cluster cluster) throws ServiceException, 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.
      `cluster` - the cluster definition to use for the connection
    Throws:
      `ServiceException` - If a service level error occurs.
      `RemoteException` - In the event of remote object failure.

  - ### getName

    String getName() throws RemoteException
    Get the server's configured definition name.
    Returns:
      The server's configured definition name.
    Throws:
      `RemoteException` - In the event of remote object failure.

  - ### getRepositoryInfo

    List getRepositoryInfo() throws 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:
      `RemoteException` - In the event of remote object failure.

  - ### getRepositoryNames

    List getRepositoryNames() throws ServiceException, 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.
      `RemoteException` - In the event of remote object failure.

  - ### getRepository

    RepositoryInterface getRepository(String name) throws ServiceException, 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.
      `RemoteException` - In the event of remote object failure.

  - ### getRepositories

    List getRepositories(boolean getAll) throws ServiceException, 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.
      `RemoteException` - In the event of remote object failure.

  - ### getRepositories

    List getRepositories(List repositoryNames) throws ServiceException, 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.
      `RemoteException` - In the event of remote object failure.

  - ### getHomeFolder

    FolderInterface getHomeFolder(String userName, UserFolderType folder, Filter filter) throws ServiceException, 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.
      `RemoteException` - In the event of remote object failure.

  - ### getHomeFolder

    FolderInterface getHomeFolder(String userName, UserFolderType folder, Filter filter, boolean createIfNecessary) throws ServiceException, 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.
      `RemoteException` - In the event of remote object failure.

  - ### getProtocol

    String getProtocol() throws ServiceException, RemoteException
    Get the protocol string for this server.
    Returns:
      The string representing the protocol this server understands.
    Throws:
      `ServiceException` - If a server error occurs.
      `RemoteException` - In the event of remote Object failure.

  - ### getHost

    String getHost() throws ServiceException, RemoteException
    Get the host name of the server.
    Returns:
      The server's DNS host name.
    Throws:
      `ServiceException` - If a service level error occurs.
      `RemoteException` - In the event of remote object failure.

  - ### getPort

    int getPort() throws ServiceException, 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.
      `RemoteException` - In the event of remote object failure.

  - ### getDomain

    String getDomain() throws ServiceException, 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.
      `RemoteException` - In the event of remote object failure.

  - ### destroy

    void destroy() throws ServiceException, RemoteException
    Close the connections and release all resources in use by this server instance.
    Throws:
      `ServiceException` - If a service level error occurs.
      `RemoteException` - In the event of remote object failure.

  - ### isConnected

    boolean isConnected() throws ServiceException, RemoteException
    Returns whether or not the server instance has a valid connection already established.
    Returns:
      true if connected, false otherwise
    Throws:
      `ServiceException` - If a service level error occurs.
      `RemoteException` - In the event of remote object failure.

  - ### getRepositoryName

    String getRepositoryName(String fqid) throws 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:
      `RemoteException` - In the event of remote object failure.

  - ### getPerson

    PersonInterface getPerson() throws ServiceException, 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.
      `RemoteException` - In the event of remote object failure.

  - ### getIdentity

    IdentityInterface getIdentity() throws ServiceException, 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.
      `RemoteException` - In the event of remote object failure.

  - ### getUserContext

    UserContextInterface getUserContext() throws ServiceException, 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.
      `RemoteException` - In the event of remote object failure.

  - ### getFoundationRepository

    RepositoryInterface getFoundationRepository() throws ServiceException, 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.
      `RemoteException` - In the event of remote object failure.

  - ### generatePassword

    UserIdentityInterface generatePassword(String user) throws ServiceException, 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.
      `RemoteException` - In the event of remote object failure.

  - ### getRootFolder

    RootFolderInterface getRootFolder() throws ServiceException, 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.
      `RemoteException` - In the event of remote object failure.

  - ### executeRequest

    String executeRequest(String request) throws ServiceException, 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.
      `RemoteException` - In the event of remote object failure.

  - ### getServerVersion

    int getServerVersion() throws ServiceException, 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:

    - `SERVER_VERSION_930`
    - `SERVER_VERSION_920`
    - `SERVER_VERSION_913_SP4`
    - `SERVER_VERSION_913_SP3`
    - `SERVER_VERSION_UNKNOWN`
    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.
      `RemoteException` - In the event of remote object failure.

  - ### factoryProcess

    MetadataInterface factoryProcess(Object o) throws ServiceException, 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.
      `RemoteException` - In the event of remote object failure.

  - ### getTypeDescriptor

    TypeDescriptorInterface getTypeDescriptor(String typeName) throws ServiceException, 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.
      `RemoteException` - In the event of remote object failure.

  - ### getTypeDescriptors

    Collection<TypeDescriptorInterface> getTypeDescriptors() throws ServiceException, RemoteException
    Returns an unmodifiable collection of all known type descriptors.
    Returns:
      an unmodifiable collection of all known type descriptors
    Throws:
      `ServiceException` - If a factory error or repository error occurs.
      `RemoteException` - In the event of remote object failure.

  - ### getExplicitIdentityGroup

    IdentityGroupInterface getExplicitIdentityGroup(String IdGrpName) throws ServiceException, 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.
      `RemoteException` - In the event of remote object failure.

  - ### isAuthorized

    boolean isAuthorized(String credential, String resource, String permission) throws ServiceException, 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.
      `RemoteException` - in the event of remote object failure.

  - ### fetch

    MetadataInterface fetch(String objectURI) throws ServiceException, 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.
      `RemoteException` - In the event of remote object failure.

  - ### search

    List search(FolderInterface folder, FilterInterface filter) throws ServiceException, 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.
      `RemoteException` - In the event of remote object failure.

  - ### search

    List search(List folderList, FilterInterface filter) throws ServiceException, 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.
      `RemoteException` - In the event of remote object failure.

  - ### browseFolder

    BrowseMetadataInterface browseFolder(String folderISEntityKey, FilterInterface filter) throws ServiceException, 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.
      `RemoteException` - in the event of remote object failure.

  - ### browseFolderRecursive

    BrowseMetadataInterface browseFolderRecursive(String folderISEntityKey, FilterInterface filter) throws ServiceException, 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.
      `RemoteException` - In the event of remote object failure.

  - ### browseFetch

    BrowseMetadataInterface browseFetch(String objectURI, FilterInterface filter) throws ServiceException, 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.
      `RemoteException` - In the event of remote object failure.

  - ### browseSearch

    List browseSearch(FilterInterface filter) throws ServiceException, 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.
      `RemoteException` - In the event of remote object failure.

  - ### browseSearch

    List browseSearch(BrowseMetadataInterface browseFolder, FilterInterface filter) throws ServiceException, 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.
      `RemoteException` - In the event of remote object failure.

  - ### browseSearch

    List browseSearch(FolderInterface folder, FilterInterface filter) throws ServiceException, 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.
      `RemoteException` - In the event of remote object failure.

  - ### browseSearch

    List browseSearch(List folderList, FilterInterface filter) throws ServiceException, 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.
      `RemoteException` - In the event of remote object failure.

  - ### getObjectByPath

    MetadataInterface getObjectByPath(PathUrl url) throws ServiceException, 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
      `RemoteException` - in the event of remote object failure.

  - ### getObjectByPathFilter

    MetadataInterface getObjectByPathFilter(PathUrl url) throws ServiceException, 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.
      `RemoteException` - in the event of remote object failure.

  - ### newMetadata

    MetadataInterface newMetadata(String reposId, String name, String type) throws ServiceException, 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.
      `RemoteException` - In the event of remote object failure.

  - ### fetch

    MetadataInterface fetch(String repositoryKey, boolean bypassCache) throws ServiceException, 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:
      `RemoteException` - in the event of network errors.
      `ServiceException` - if a repository error occurs.

  - ### search

    List search(FilterInterface filter) throws ServiceException, 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.
      `RemoteException` - in the event of remote object failure.

  - ### deleteEntity

    void deleteEntity(MetadataInterface input) throws ServiceException, 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.
      `RemoteException` - in the event of remote object failure.

  - ### refreshEntity

    void refreshEntity(MetadataInterface mi) throws ServiceException, RemoteException
    Refresh an entity from the data in the server.
    Parameters:
      `mi` - The Metadata object to refresh.
    Throws:
      `RemoteException` - in the event of network errors.
      `ServiceException` - if a repository error occurs.

  - ### newChild

    ChildServerInterface newChild() throws ServiceException, 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.
      `RemoteException` - in the event of remote object failure.

  - ### newChild

    ChildServerInterface newChild(boolean detached) throws ServiceException, 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.
      `RemoteException` - in the event of remote object failure.

  - ### refreshAllData

    void refreshAllData() throws ServiceException, RemoteException
    Refresh all of the data cached from this server.
    Throws:
      `ServiceException` - If a server error occurs during refresh.
      `RemoteException` - In the event of remote object failure.

  - ### addToCache

    void addToCache(MetadataInterface newMetadata) throws ServiceException, 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.
      `RemoteException` - In the event of remote object failure.

  - ### flush

    void flush() throws ServiceException, RemoteException
    flush any pending updates to the metadata server.
    Throws:
      `ServiceException` - If an error occurs during the update.
      `RemoteException` - In the event of remote object failure.

  - ### clearPendingChanges

    void clearPendingChanges(boolean rollback) throws ServiceException, 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.
      `RemoteException` - In the event of remote object failure.

  - ### isUserAuthorized

    boolean isUserAuthorized(String repositoryId, String permission) throws ServiceException, 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.
      `RemoteException` - In the event of remote object failure.

  - ### debug

    void debug(String context, ResourceBundle rb, String key, Object arg0, Object arg1, Object arg2) throws RemoteException
    Throws:
      `RemoteException`

  - ### debug

    void debug(String context, String message) throws RemoteException
    Throws:
      `RemoteException`

  - ### debug

    void debug(String context, String message, Throwable t) throws RemoteException
    Throws:
      `RemoteException`

  - ### info

    void info(String context, ResourceBundle rb, String key, Object arg0, Object arg1, Object arg2) throws RemoteException
    Throws:
      `RemoteException`

  - ### info

    void info(String context, String message) throws RemoteException
    Throws:
      `RemoteException`

  - ### info

    void info(String context, String message, Throwable t) throws RemoteException
    Throws:
      `RemoteException`

  - ### warn

    void warn(String context, ResourceBundle rb, String key, Object arg0, Object arg1) throws RemoteException
    Throws:
      `RemoteException`

  - ### warn

    void warn(String context, String message) throws RemoteException
    Throws:
      `RemoteException`

  - ### warn

    void warn(String context, String message, Throwable t) throws RemoteException
    Throws:
      `RemoteException`

  - ### error

    void error(String context, ResourceBundle rb, String key, Object arg0, Object arg1) throws RemoteException
    Throws:
      `RemoteException`

  - ### error

    void error(String context, String message) throws RemoteException
    Throws:
      `RemoteException`

  - ### toByteArray

    byte[] toByteArray(boolean copyData) throws ServiceException, 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.
      `RemoteException` - In the event of remote object failure.

  - ### fromByteArray

    void fromByteArray(UserContextInterface uci, byte[] data) throws 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:
      `RemoteException` - In the event of remote object failure.
      `ServiceException` - If a service level error occurs.

  - ### loadTypes

    void loadTypes() throws ServiceException, RemoteException
    Throws:
      `ServiceException`
      `RemoteException`

  - ### loadTypes

    void loadTypes(boolean force) throws ServiceException, RemoteException
    Throws:
      `ServiceException`
      `RemoteException`