Package com.sas.services.information
Class OMIServer
java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
com.sas.services.information.OMIServer
- All Implemented Interfaces:
com.sas.metadata.remote.MdConnectionListener,com.sas.metadata.remote.MdFactoryListener,com.sas.metadata.remote.MdObjectListener,com.sas.metadata.remote.MdStoreIDChangeListener,com.sas.metadata.remote.MdStoreListener,MetadataServerInterface,ServerInterface,Serializable,Remote,EventListener
- Direct Known Subclasses:
OMIChildServer
public class OMIServer
extends UnicastRemoteObject
implements MetadataServerInterface, com.sas.metadata.remote.MdStoreIDChangeListener, com.sas.metadata.remote.MdFactoryListener, com.sas.metadata.remote.MdObjectListener, com.sas.metadata.remote.MdConnectionListener
This class is the OMI implementation of the ServerInterface. In order to be
useful, the Information Service should be configured with a ServerDefinition
that provides a name for a given host/port/domain, which can then be
referenced by applications. Generally, this class will be created by the
Information Service when a user authenticates.
- Since:
- 9.2
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classThis listener is used when you only want to update the local objects with changes, but do not want to override any local changes.class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected RepositoryCacheprotected ConnectionFactoryAdminInterfaceprotected ConnectionInterfaceprotected Objectprotected Mapprotected Stringprotected Mapprotected booleanprotected org.apache.logging.log4j.Loggerprotected com.sas.metadata.remote.MdFactoryprotected com.sas.metadata.remote.MdObjectStoreprotected Stringprotected IdentityInterfaceprotected Mapprotected Stringprotected Mapprotected Stringstatic final StringThe name of the SoftwareComponent object that used as the root of the tree structures used by SAS applications.static final StringThe ClassIdentifier attribute value for the SoftwareComponent that's the root of the tree structures used by SAS applications.Fields inherited from class java.rmi.server.RemoteObject
refFields inherited from interface com.sas.services.information.ServerInterface
DEFAULT_SERVER_NAME, SERVER_VERSION_913_SP3, SERVER_VERSION_913_SP4, SERVER_VERSION_920, SERVER_VERSION_930, SERVER_VERSION_UNKNOWN -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a new connection listener so that a consumer may become notified of when a connection to the metadata server has been established.voidaddToCache(MetadataInterface newMetadata) Explicitly add a new metadata object to the cache.voidapplyACTToObj(String resource, String act) Apply an AccessControlTemplate to a metadata object.protected booleanbrowseFetch(String objectURI, FilterInterface filter) Fetch a lightweight object matching the object URI provided.browseFolder(String folderISEntityKey, FilterInterface filter) Get information about a specific folder.browseFolderRecursive(String folderISEntityKey, FilterInterface filter) Search a folder tree recursively using the filter.ListbrowseSearch(BrowseMetadataInterface browseFolder, FilterInterface filter) Search for objects in the server tree using the folder as a base.ListbrowseSearch(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.ListbrowseSearch(FolderInterface folder, FilterInterface filter) Search for objects in the server tree using the folder as a base.ListbrowseSearch(List folderList, FilterInterface filter) Search for objects in the server tree using the list of folders as bases.protected StringvoidclearPendingChanges(boolean rollback) Clear the changes that are pending for this server.voidconnect(com.sas.meta.SASOMI.IOMI cnxn, ServerDef def, UserContextInterface user) Construct an OMIServer with the connection already established.voidconnect(com.sas.meta.SASOMI.IOMI cnxn, ServerDef def, UserContextInterface user, Cluster cluster) Construct an OMIServer with the connection already established.voidconnect(ServerDef def, UserContextInterface user) Connect a user to an InformationService server.voidconnect(ServerDef def, UserContextInterface user, Cluster cluster) Connect a user to an InformationService server.voidcreateAccessControTemplate(RepositoryInterface repository, ACTEntry act) Create a new AccessControlTemplate in this repository.com.sas.metadata.remote.RootcreateMetadata(String repositoryId, String name, String type) Create a new metadata object.voiddebug(String context, String message) voiddebug(String context, String message, Throwable t) voiddebug(String context, ResourceBundle rb, String key, Object arg0, Object arg1, Object arg2) voiddeleteEntities(List metadataObjects) Delete a collection of CMetadata objects.voiddeleteEntity(com.sas.metadata.remote.CMetadata metadata) Allow a CMetadata object to be passed in to be deleted.voiddeleteEntity(MetadataInterface input) Delete an entity in the repository.voiddeleteInternalPassword(String username) Delete a user's internal password.voiddestroy()Close the connections and release all resources in use by this server instance.voiddestroyAccessControlTemplate(String act) Destroy an AccessControlTemplate in the repository.static StringencodePassword(String password) voiderror(String context, String message) voiderror(String context, ResourceBundle rb, String key, Object arg0, Object arg1) StringexecuteRequest(String request) Execute a client request and return the result.factoryProcess(Object o) Process a raw repository object into a smart object.fetch(String objectURI) Fetch an object from the metadat based on its URI.fetch(String repositoryKey, boolean bypassCache) Fetch an object from the repository given the repository key.voidflush()flush any pending updates to the metadata server.voidvoidfreeCredentials(String credential) Free a credential handle.voidfromByteArray(UserContextInterface uci, byte[] data) Initialize an instance of the server from a byte array.generatePassword(String user) Generate a one-time use password against the metadata server connection for the specified user.getAccessControlTemplateAttribs(String act) Get attributes for an AccessControlTemplate.ListgetAccessControlTemplateList(RepositoryInterface repository, int flags) Get the list of AccessControlTemplates for this repository.ListgetACTsOnObj(String resource) Get the AccessControlTemplates that are associated to an object.ListGet the authorizations on an application's actions.List<ApplicationAuthorization> getApplicationActionsAuthorizations(SoftwareComponentInterface app, RoleInterface role, boolean explicitRoleActions) Get the authorizations on an application's actions.String[][]getAuthorizations(String authType, String credHandle, String resource, String permission) Get the authorization information for a metadata resource.getAuthorizationsForObjects(List<MetadataInterface> resources, List<String> permissions) Get authorization information for a list of metadata objects.ListgetAuthorizationsOnObj(String resource, List identities, List permissions, int flags) Get the authorizations on an object for the given identities and permissions.intgetCountNoSecurity(Filter filter, String association) Perform a search operation against the metadata repository which will return a count of the matching objects, rather than the objects themselves.DateGet the Created date of a metadata object as a Date rather than a String.StringgetCredentials(String subject) See the ISecurity interface documentation for a description of this method.StringGet the authentication domain used to connect to the server.MapGet a Map with the server-managed enterprise policies.getExplicitIdentityGroup(String idGrpName) Get the IdentityGroupInterface for an explicit IdentityGroupGet a handle to the foundation repository for this server.getHomeFolder(String userName, UserFolderType type, Filter filter) Get a user's home folder.getHomeFolder(String userName, UserFolderType type, Filter filter, boolean createIfNecessary) Get a user's home folder.StringgetHost()Get the host name of the server.ListgetIdentitiesOnObj(String resource, int flags) Get a List of identities associated with an object through authorizations.Get the IdentityInterface representing the connected user.Return an IdentityInfo object containing information about the currently connected user.StringReturn the string that represents the internal authentication domain.Get the site policies that control the internal authentication provider.getInternalLoginUserInfo(String username) Get the information regarding a user's internal login.ListgetLoginsForAuthDomain(String domain) Get the logins for the connected user for a given authentication domain.com.sas.metadata.remote.MdFactoryDateGet the modified date of a metadata object as a Date rather than a String.StringgetName()Get the server's configured definition name.getObjectByPath(PathUrl url) Get an object in the BIP tree using a PathUrl to find it.Get an object in the BIP tree using a PathUrl to create a filter to search for it, rather than walking the folder hierarchy.com.sas.metadata.remote.MdObjectStoreGet the PersonInterface representing the connected user.intgetPort()Get the server's TCP port number.StringGet the protocol string for this server.ListgetRepositories(boolean getAll) Get a List of the requested repositories from this Server.ListgetRepositories(List repositoryNames) Get a List of named repositories.getRepository(String name) Get a named repository managed by this server.StringgetRepositoryId(String name) ListGet information about the repositories that are maintained by this server instance.getRepositoryInfoById(String fqid) StringgetRepositoryName(String fqid) Get a repository name given the FQID of the repository.ListGet a list of the repository names managed by this server.Get the server's root folder.intGet the version number of the server.protected StringgetTypeDescriptor(String typeName) Get the type descriptor for a known type name.Collection<TypeDescriptorInterface> Returns an unmodifiable collection of all known type descriptors.MapGet the Map of TypeDescriptors.StringgetUrl()Get the UserContext that this server was created on behalf of.voidinfo(String context, String message) voidinfo(String context, String message, Throwable t) voidinfo(String context, ResourceBundle rb, String key, Object arg0, Object arg1, Object arg2) booleanisAuthorized(String credential, String resource, String permission) Check authorization status for a given credential, resource, and permission.isAuthorizedWithConditions(String credential, String resource, String permission) Check authorization status for a given credential, resource, and permission.booleanReturns whether or not the server instance has a valid connection already established.booleanisUserAuthorized(String repositoryId, String permission) Check if the user has the specified permission in the repository.voidvoidvoidvoidloadTypes(boolean force) protected StringmakeChainedMessage(Throwable t) protected OMIServer.OMIKeymakeKey(String repositoryKey) voidMdObjectModified(com.sas.metadata.remote.MdEvent e) voidMdObjectsAdded(com.sas.metadata.remote.MdEvent e, List items) voidMdObjectsCreated(com.sas.metadata.remote.MdFactoryEvent e) voidMdObjectsDeleted(com.sas.metadata.remote.MdFactoryEvent e) voidMdObjectsModified(com.sas.metadata.remote.MdEvent e, List items) voidMdObjectsModified(com.sas.metadata.remote.MdFactoryEvent e) voidMdObjectsRemoved(com.sas.metadata.remote.MdEvent e, List items) voidMdStoreIDChange(com.sas.metadata.remote.MdEvent e, List itemsOld, List itemsNew) newChild()Create a child repository instance with its own cache, which can be used to perform a group of updates transaction-style.newChild(boolean detached) Create a child repository instance with its own cache, which can be used to perform a group of updates transaction-style.newMetadata(String reposId, String name, String type) Create a new metadata item.booleannotify(com.sas.metadata.remote.MdConnectionEvent event) protected final voidvoidReconnect to the server if the connection was broken for any reason.voidRefresh all of the data cached from this server.voidRefresh an entity from the data in the server.voidvoidremoveACTFromObj(String resource, String act) Remove an AccessControlTemplate from a metadata object.voidRemoves an existing connection listenervoidRepositoryDeleted(String name) Client code notifying the Server that a repository was deleted.Listsearch(FilterInterface filter) Search the repository using the provided filter.Listsearch(FolderInterface folder, FilterInterface filter) Search the server tree from a given folder base using the provided filter.Listsearch(List folderList, FilterInterface filter) Search the server from a collection of base folders.voidsetAccessControlTemplateAttribs(RepositoryInterface repository, ACTEntry act) Set attributes on an AccessControlTemplate.voidsetAuthorizationsOnObj(String resource, List authorizations, int flags) Set authorizations on a metadata object.voidsetInternalLoginUserOptions(String username, boolean isDisabled, boolean bypassStrength, boolean bypassHistory, boolean useStdPasswordExpirationDays, int passwordExpirationDays, boolean bypassLockout, boolean bypassInactivitySuspension, boolean doesAccountExpire, Date accountExpirationDate) Set the options on a user's internal login.voidsetInternalPassword(String username, String password) Set a user's internal password.voidsetSelfInternalPassword(String username, String oldPassword, String newPassword) Used to set a user's internal password by the user himself.byte[]toByteArray(boolean copyData) Output the state of the server to a byte array.voidwarn(String context, String message) voidwarn(String context, String message, Throwable t) voidwarn(String context, ResourceBundle rb, String key, Object arg0, Object arg1) Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, exportObject, exportObject, unexportObjectMethods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLogMethods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStubMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Field Details
-
ROOT_CLASSIDENTIFIER
public static final String ROOT_CLASSIDENTIFIERThe ClassIdentifier attribute value for the SoftwareComponent that's the root of the tree structures used by SAS applications.- See Also:
-
BIP_COMPONENTNAME
public static final String BIP_COMPONENTNAMEThe name of the SoftwareComponent object that used as the root of the tree structures used by SAS applications.- See Also:
-
_typeMap
protected Map _typeMap -
_explicitIdGrpsMap
protected Map _explicitIdGrpsMap -
_isDestroyed
protected boolean _isDestroyed -
_repositories
protected Map _repositories -
_id2NameMap
protected Map _id2NameMap -
_logger
protected org.apache.logging.log4j.Logger _logger -
_mdfactory
protected com.sas.metadata.remote.MdFactory _mdfactory -
_mdstore
protected com.sas.metadata.remote.MdObjectStore _mdstore -
_cache
protected RepositoryCache _cache -
_url
protected String _url -
_name
protected String _name -
_person
-
_cnxnHandle
-
_cnxnAdmin
-
_cnxnSync
protected Object _cnxnSync -
_foundationReposName
protected String _foundationReposName -
_subNum
protected String _subNum
-
-
Constructor Details
-
OMIServer
public OMIServer() throws RemoteException- Throws:
RemoteException
-
OMIServer
protected OMIServer(Class theClass) throws RemoteException - Throws:
RemoteException
-
-
Method Details
-
connect
public 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.- Specified by:
connectin interfaceServerInterface- 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 connectionhost- metadata server host name. Use currently connected host for a cluster.port- metadata server port. Use currently connected port for a cluster.factoryConfig- The connection factory configuration used to create the connection. This configuration will be used if a reconnect is necessary.- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
connect
public void connect(com.sas.meta.SASOMI.IOMI cnxn, ServerDef def, UserContextInterface user) throws ServiceException, RemoteException Construct an OMIServer with the connection already established.- Specified by:
connectin interfaceServerInterface- Parameters:
cnxn- The IOMI connection to the server.def- The server definition. Seem stupid to have both? I still need 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
public void connect(ServerDef def, UserContextInterface user) throws ServiceException, RemoteException Description copied from interface:ServerInterfaceConnect a user to an InformationService server.- Specified by:
connectin interfaceServerInterface- 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
public void connect(ServerDef def, UserContextInterface user, Cluster cluster) throws ServiceException, RemoteException Description copied from interface:ServerInterfaceConnect a user to an InformationService server.- Specified by:
connectin interfaceServerInterface- 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.
-
flushAllCachedObjects
- Throws:
RemoteExceptionServiceException
-
loadRepositoryData
public void loadRepositoryData() -
reloadRepositoryData
public void reloadRepositoryData() -
destroy
Description copied from interface:ServerInterfaceClose the connections and release all resources in use by this server instance.- Specified by:
destroyin interfaceServerInterface- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
isConnected
Description copied from interface:ServerInterfaceReturns whether or not the server instance has a valid connection already established.- Specified by:
isConnectedin interfaceServerInterface- Returns:
- true if connected, false otherwise
- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
getSubNum
protected String getSubNum() throws RemoteException- Throws:
RemoteException
-
getMdFactory
public com.sas.metadata.remote.MdFactory getMdFactory() -
getObjectStore
public com.sas.metadata.remote.MdObjectStore getObjectStore() -
getName
public String getName() throws RemoteExceptionDescription copied from interface:ServerInterfaceGet the server's configured definition name.- Specified by:
getNamein interfaceServerInterface- Returns:
- The server's configured definition name.
- Throws:
RemoteException- In the event of remote object failure.
-
getPerson
Description copied from interface:ServerInterfaceGet the PersonInterface representing the connected user.- Specified by:
getPersonin interfaceServerInterface- Returns:
- A
PersonInterfacethat 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
Description copied from interface:ServerInterfaceGet the IdentityInterface representing the connected user.- Specified by:
getIdentityin interfaceServerInterface- Returns:
- A
IdentityInterfacethat 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.
-
getRepositoryNames
Description copied from interface:ServerInterfaceGet a list of the repository names managed by this server.- Specified by:
getRepositoryNamesin interfaceServerInterface- 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.
-
getRepositoryId
public String getRepositoryId(String name) throws RemoteException - Throws:
RemoteException
-
getRepositoryName
public String getRepositoryName(String fqid) throws RemoteException Description copied from interface:ServerInterfaceGet a repository name given the FQID of the repository. It needs to be the "A0000001.xxxxxxxx" id.- Specified by:
getRepositoryNamein interfaceServerInterface- 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.
-
getUrl
- Throws:
ServiceExceptionRemoteException
-
getUserContext
Description copied from interface:ServerInterfaceGet the UserContext that this server was created on behalf of.- Specified by:
getUserContextin interfaceServerInterface- Returns:
- The UserContext that was used to create this server instance.
- Throws:
RemoteException- In the event of remote object failure.
-
getRepositoryInfo
public List getRepositoryInfo() throws RemoteExceptionDescription copied from interface:ServerInterfaceGet information about the repositories that are maintained by this server instance.- Specified by:
getRepositoryInfoin interfaceServerInterface- Returns:
- A List of
RepositoryInfoobjects with information about the repositories. - Throws:
RemoteException- In the event of remote object failure.
-
getRepositoryInfoById
- Throws:
RemoteException
-
getRepository
Description copied from interface:ServerInterfaceGet a named repository managed by this server.- Specified by:
getRepositoryin interfaceServerInterface- 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
Description copied from interface:ServerInterfaceGet a List of named repositories. The repositoryNames parameter is a List of Strings with repository names to return.- Specified by:
getRepositoriesin interfaceServerInterface- 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.
-
getRepositories
Description copied from interface:ServerInterfaceGet a List of the requested repositories from this Server. This method returns a List of RepositoryInterface instances that have been explicitly requested via theServerInterface.getRepository(String)method, unless the getAll parameter is true; then all of the repositories managed by the server are returned.- Specified by:
getRepositoriesin interfaceServerInterface- 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.
-
RepositoryDeleted
Client code notifying the Server that a repository was deleted. This will typically only be used by SASMC.- Parameters:
name- The name of the repository that was deleted.- Throws:
ServiceExceptionRemoteException
-
getHomeFolder
public FolderInterface getHomeFolder(String userName, UserFolderType type, Filter filter) throws ServiceException, RemoteException Description copied from interface:ServerInterfaceGet 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.- Specified by:
getHomeFolderin interfaceServerInterface- 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.type- Which folder to return. If null, the user's "My Folder" is returned. Valid options areUserFolderType.MYFOLDER, orUserFolderType.APPFOLDERfor 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
public FolderInterface getHomeFolder(String userName, UserFolderType type, Filter filter, boolean createIfNecessary) throws ServiceException, RemoteException Description copied from interface:ServerInterfaceGet 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.- Specified by:
getHomeFolderin interfaceServerInterface- 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.type- Which folder to return. If null, the user's "My Folder" is returned. Valid options areUserFolderType.MYFOLDER, orUserFolderType.APPFOLDERfor 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
Description copied from interface:ServerInterfaceGet the protocol string for this server.- Specified by:
getProtocolin interfaceServerInterface- 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
Description copied from interface:ServerInterfaceGet the host name of the server.- Specified by:
getHostin interfaceServerInterface- Returns:
- The server's DNS host name.
- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
getPort
Description copied from interface:ServerInterfaceGet the server's TCP port number.- Specified by:
getPortin interfaceServerInterface- 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
Description copied from interface:ServerInterfaceGet the authentication domain used to connect to the server.- Specified by:
getDomainin interfaceServerInterface- 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.
-
pulseCheck
- Throws:
ServiceException
-
reconnect
Description copied from interface:ServerInterfaceReconnect 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.- Specified by:
reconnectin interfaceServerInterface- Throws:
ServiceException- If the connection attempt fails for any reason.RemoteException- In the event of remote object failure.
-
attemptConnection
- Throws:
ServiceException
-
cachePath
protected String cachePath() throws RemoteException- Throws:
RemoteException
-
makeChainedMessage
protected String makeChainedMessage(Throwable t) -
getLoginsForAuthDomain
Description copied from interface:MetadataServerInterfaceGet the logins for the connected user for a given authentication domain. This calls through to the ISecurity_1_1 interface to get the logins in a specific order determined by the server. This method is used by the UserContext to populate the identities list, and should not be called by other clients.- Specified by:
getLoginsForAuthDomainin interfaceMetadataServerInterface- Parameters:
domain- The authentication domain to return the logins for.- Returns:
- A List of
UserIdentityInterfaceobjects accessible by the connected user in the requested domain. - Throws:
ServiceException- If a service-level error occurs.RemoteException- In teh event of remote object failure.
-
getFoundationRepository
Description copied from interface:ServerInterfaceGet a handle to the foundation repository for this server.- Specified by:
getFoundationRepositoryin interfaceServerInterface- 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
Description copied from interface:ServerInterfaceGenerate 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.- Specified by:
generatePasswordin interfaceServerInterface- 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
UserIdentityInterfaceobject 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
Description copied from interface:ServerInterfaceGet the server's root folder.- Specified by:
getRootFolderin interfaceServerInterface- 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.
-
loadTypes
- Specified by:
loadTypesin interfaceServerInterface- Throws:
ServiceExceptionRemoteException
-
loadTypes
- Specified by:
loadTypesin interfaceServerInterface- Throws:
ServiceExceptionRemoteException
-
loadExplicitIdentityGroups
- Throws:
ServiceExceptionRemoteException
-
executeRequest
Description copied from interface:ServerInterfaceExecute a client request and return the result. This method is not intended for use by application clients.- Specified by:
executeRequestin interfaceServerInterface- 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.
-
getApplicationActionsAuthorizations
public List<ApplicationAuthorization> getApplicationActionsAuthorizations(SoftwareComponentInterface app, RoleInterface role, boolean explicitRoleActions) throws ServiceException, RemoteException Description copied from interface:MetadataServerInterfaceGet the authorizations on an application's actions. The SoftwareComponent is the metadata object that represents the application. The actions defined for the application and their required roles, combined with the roles that the current user has will determine what actions are allowed. Note: Other methods are preferred over this method for most use cases. UseApplicationInterface.getActions()when a list of all application actions is required. UseUserContextInterface.getGrantedApplicationActions(String...)when a list of granted actions is required. Use this method if role or explicitRoleActions parameters are required.- Specified by:
getApplicationActionsAuthorizationsin interfaceMetadataServerInterface- Parameters:
app- The SoftwareComponent that represents the application to check.role- The Role for which ApplicationActions Authorizations will be returnedexplicitRoleActions- Limit the returned ApplicationsActions to the indicated Role only. ApplicationsActions from contributed Roles will not be returned.- Returns:
- A List of
ApplicationAuthorizationobjects which indicate the list of actions available for the application and for each, whether the current user is allowed access to that action. - Throws:
ServiceException- If a server error occurs.RemoteException- In the event of remote object failure.
-
getApplicationActionsAuthorizations
public List getApplicationActionsAuthorizations(SoftwareComponentInterface app) throws ServiceException, RemoteException Description copied from interface:MetadataServerInterfaceGet the authorizations on an application's actions. The SoftwareComponent is the metadata object that represents the application. The actions defined for the application and their required roles, combined with the roles that the current user has will determine what actions are allowed.Note:
ApplicationInterface.getActions()is preferred over this method.- Specified by:
getApplicationActionsAuthorizationsin interfaceMetadataServerInterface- Parameters:
app- The SoftwareComponent that represents the application to check.- Returns:
- A List of
ApplicationAuthorizationobjects which indicate the list of actions available for the application and for each, whether the current user is allowed access to that action. - Throws:
ServiceException- If a server error occurs.RemoteException- In the event of remote object failure.
-
getServerVersion
Description copied from interface:ServerInterfaceGet 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:
- Specified by:
getServerVersionin interfaceServerInterface- 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
Description copied from interface:ServerInterfaceProcess 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.- Specified by:
factoryProcessin interfaceServerInterface- 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
public TypeDescriptorInterface getTypeDescriptor(String typeName) throws ServiceException, RemoteException Description copied from interface:ServerInterfaceGet the type descriptor for a known type name.- Specified by:
getTypeDescriptorin interfaceServerInterface- 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
Description copied from interface:ServerInterfaceReturns an unmodifiable collection of all known type descriptors.- Specified by:
getTypeDescriptorsin interfaceServerInterface- Returns:
- an unmodifiable collection of all known type descriptors
- Throws:
RemoteException- In the event of remote object failure.
-
getExplicitIdentityGroup
public IdentityGroupInterface getExplicitIdentityGroup(String idGrpName) throws ServiceException, RemoteException Description copied from interface:ServerInterfaceGet the IdentityGroupInterface for an explicit IdentityGroup- Specified by:
getExplicitIdentityGroupin interfaceServerInterface- 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.
-
getInternalDomain
Description copied from interface:MetadataServerInterfaceReturn the string that represents the internal authentication domain. This is normall "saspw".- Specified by:
getInternalDomainin interfaceMetadataServerInterface- Returns:
- The internal authentication domain string.
- Throws:
ServiceException- In the event of a service error.RemoteException- In the event of remote object failure.
-
getIdentityInfo
Description copied from interface:MetadataServerInterfaceReturn an IdentityInfo object containing information about the currently connected user. This calls through to the ISecurity method GetInfo.- Specified by:
getIdentityInfoin interfaceMetadataServerInterface- Returns:
- An IdentityInfo object with the current user's information.
- Throws:
ServiceException- If a metadata server error occurs.RemoteException- In the event of remote object failure.
-
getEnterprisePolicies
Description copied from interface:MetadataServerInterfaceGet a Map with the server-managed enterprise policies.- Specified by:
getEnterprisePoliciesin interfaceMetadataServerInterface- Returns:
- A Map of the enterprise policies. Keys and values should be Strings.
- Throws:
ServiceException- If a server error occurs.RemoteException- In the event of remote object failure.
-
getCredentials
Description copied from interface:MetadataServerInterfaceSee the ISecurity interface documentation for a description of this method.- Specified by:
getCredentialsin interfaceMetadataServerInterface- Parameters:
subject- The subject for which to get a credential handle.- Returns:
- A credential handle for the requested subject.
- Throws:
ServiceException- in the event of repository errors.RemoteException- in the event of remote object failure.
-
freeCredentials
Description copied from interface:MetadataServerInterfaceFree a credential handle. See the ISecurity interface documentation for a description of this method. This method must be called for any credential retrieved with a getCredentials call.- Specified by:
freeCredentialsin interfaceMetadataServerInterface- Parameters:
credential- The credential to free.- Throws:
ServiceException- in the event of repository errors.RemoteException- in the event of remote object failure.
-
isAuthorized
public boolean isAuthorized(String credential, String resource, String permission) throws ServiceException, RemoteException Description copied from interface:ServerInterfaceCheck authorization status for a given credential, resource, and permission.- Specified by:
isAuthorizedin interfaceServerInterface- 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.
-
isUserAuthorized
public boolean isUserAuthorized(String repositoryId, String permission) throws ServiceException, RemoteException Description copied from interface:ServerInterfaceCheck 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.- Specified by:
isUserAuthorizedin interfaceServerInterface- 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.
-
getAuthorizationsForObjects
public List<AuthorizationObjectsResult> getAuthorizationsForObjects(List<MetadataInterface> resources, List<String> permissions) throws ServiceException, RemoteException Description copied from interface:MetadataServerInterfaceGet authorization information for a list of metadata objects. Accepts a List of MetadataInterface objects and a List of permission strings. Returns a List of AuthorizationObjectsResult objects that include the MetadataInterface as the resource, and a List of permission strings which are the granted permissions from the list that was passed in.- Specified by:
getAuthorizationsForObjectsin interfaceMetadataServerInterface- Parameters:
resources- A List of MetadataInterface objects to check authorizations for.permissions- A List of permission strings to check the metadata objects for.- Returns:
- A List of AuthorizationObjectsResult objects that give the MetadataInterface object and a list of granted permissions from the input list.
- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
getAuthorizationsOnObj
public List getAuthorizationsOnObj(String resource, List identities, List permissions, int flags) throws ServiceException, RemoteException Get the authorizations on an object for the given identities and permissions.- Specified by:
getAuthorizationsOnObjin interfaceMetadataServerInterface- Parameters:
resource- The resource string of the object to test. A resource string should be of the form OMSOBJ:obj_type/obj_ID (e.g., OMSOBJ:PhysicalTable/A5DRX6L4.AJ00001Z).identities- A List ofIdentityInterfaceobjects for the users to test permissions for. If left null, all identities are returned.permissions- A List ofPermissionobjects specifying the permissions to check. If null, all permissions for all specified identities on the object are returned.flags- Flags which control the return values. Valid flags are: ISecurityAdmin.SECAD_ACT_CONTENTS and ISecurityAdmin.SECAD_DO_NOT_RETURN_PERMCOND. See the documentation for ISecurityAdmin.GetAuthorizationsOnObj for more details.- Returns:
- A List of Authorization objects with the resulting authorization data.
- Throws:
ServiceException- if a service level error occurs.RemoteException- in the event of remote object failure.
-
setAuthorizationsOnObj
public void setAuthorizationsOnObj(String resource, List authorizations, int flags) throws ServiceException, RemoteException Set authorizations on a metadata object.- Specified by:
setAuthorizationsOnObjin interfaceMetadataServerInterface- Parameters:
resource- The resource string of the object to modify. A resource string should be of the form OMSOBJ:obj_type/obj_ID (e.g., OMSOBJ:PhysicalTable/A5DRX6L4.AJ00001Z).authorizations- A List ofAuthorizationobjects defining the authorizations to set on the object.flags- Controls the behavior of the method. The only valid flag as of this writing is ISecurityAdmin.SECAD_ACT_CONTENTS. Check the documentation for the ISecurityAdmin interface for details.- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
getIdentitiesOnObj
Get a List of identities associated with an object through authorizations.- Specified by:
getIdentitiesOnObjin interfaceMetadataServerInterface- Parameters:
resource- The resource string of the object to test. A resource string should be of the form OMSOBJ:obj_type/obj_ID (e.g., OMSOBJ:PhysicalTable/A5DRX6L4.AJ00001Z).flags- Zero or ISecurityAdmin.SECAD_ACT_CONTENTS. See the javadoc for ISecurityAdmin for more information.- Returns:
- A List of identities as Strings in the form of type/name.
examples:
Person/Gary Williams IdentityGroup/PUBLIC - Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
getACTsOnObj
Get the AccessControlTemplates that are associated to an object.- Specified by:
getACTsOnObjin interfaceMetadataServerInterface- Parameters:
resource- The resource string of the object to test. A resource string should be of the form OMSOBJ:obj_type/obj_ID (e.g., OMSOBJ:PhysicalTable/A5DRX6L4.AJ00001Z).- Returns:
- A List of ACTEntry objects describing the ACT's associated to the object.
- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of a remote object failure.
-
applyACTToObj
Apply an AccessControlTemplate to a metadata object.- Specified by:
applyACTToObjin interfaceMetadataServerInterface- Parameters:
resource- The resource string of the object to modify. A resource string should be of the form OMSOBJ:obj_type/obj_ID (e.g., OMSOBJ:PhysicalTable/A5DRX6L4.AJ00001Z).act- The resource string representing the AccessControlTemplate. It's the same format as the resource parameter.- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of a remote object failure.
-
removeACTFromObj
Remove an AccessControlTemplate from a metadata object.- Specified by:
removeACTFromObjin interfaceMetadataServerInterface- Parameters:
resource- The resource string of the object to modify. A resource string should be of the form OMSOBJ:obj_type/obj_ID (e.g., OMSOBJ:PhysicalTable/A5DRX6L4.AJ00001Z).act- The resource string representing the AccessControlTemplate. It's the same format as the resource parameter.- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of a remote object failure.
-
getAccessControlTemplateList
public List getAccessControlTemplateList(RepositoryInterface repository, int flags) throws ServiceException, RemoteException Get the list of AccessControlTemplates for this repository.- Specified by:
getAccessControlTemplateListin interfaceMetadataServerInterface- Parameters:
repository- The repository to retrieve the ACT's for.flags- zero or ISecurityAdmin.SECAD_REPOSITORY_DEPENDENCY_USES to get AccessControlTemplates for repositories up the dependency chain from this one.- Returns:
- A List of ACTEntry objects with the information about the ACTs in this repository.
- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
createAccessControTemplate
public void createAccessControTemplate(RepositoryInterface repository, ACTEntry act) throws ServiceException, RemoteException Create a new AccessControlTemplate in this repository.- Specified by:
createAccessControTemplatein interfaceMetadataServerInterface- Parameters:
repository- The repository which will contain the new ACTEntry.act- An ACTEntry describing the new entry. The name must be set. The description may be set, and the use parameter should be left null, or set to "REPOS" if this is to become the new repository default ACT (if you have permission to perform that operation).- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
destroyAccessControlTemplate
Destroy an AccessControlTemplate in the repository.- Specified by:
destroyAccessControlTemplatein interfaceMetadataServerInterface- Parameters:
act- The resource ID of the ACT. A resource string should be of the form OMSOBJ:obj_type/obj_ID (e.g., OMSOBJ:AccessControlTemplate/A5DRX6L4.AJ00001Z).- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
setAccessControlTemplateAttribs
public void setAccessControlTemplateAttribs(RepositoryInterface repository, ACTEntry act) throws ServiceException, RemoteException Set attributes on an AccessControlTemplate. I'm assuming that ACT names and descriptions don't really change that much, so I guess the main use for this method is to make an existing ACT the repository default;- Specified by:
setAccessControlTemplateAttribsin interfaceMetadataServerInterface- Parameters:
repository- The repository that contains the ACTEntry to update.act- An ACTEntry object with the new information about the ACT. Set the use parameter in the ACTEntry to "REPOS" to make it the repository default, and be sure you have the necessary permissions to do it or expect an exception.- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
getAccessControlTemplateAttribs
public ACTEntry getAccessControlTemplateAttribs(String act) throws ServiceException, RemoteException Get attributes for an AccessControlTemplate.- Specified by:
getAccessControlTemplateAttribsin interfaceMetadataServerInterface- Parameters:
act- The resource ID of the ACT. A resource string should be of the form OMSOBJ:obj_type/obj_ID (e.g., OMSOBJ:AccessControlTemplate/A5DRX6L4.AJ00001Z).- Returns:
- An ACTEntry with the information about the ACT.
- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
isAuthorizedWithConditions
public AuthResult isAuthorizedWithConditions(String credential, String resource, String permission) throws ServiceException, RemoteException Description copied from interface:MetadataServerInterfaceCheck authorization status for a given credential, resource, and permission. See the ISecurity interface documentation for a more complete description.- Specified by:
isAuthorizedWithConditionsin interfaceMetadataServerInterface- 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:
- An AuthResult object with a boolean indicating whether the user has the requested permissions granted, and possibly a condition string.
- Throws:
ServiceException- in the event of repository errors.RemoteException- in the event of remote object failure.
-
getAuthorizations
public String[][] getAuthorizations(String authType, String credHandle, String resource, String permission) throws ServiceException, RemoteException Description copied from interface:MetadataServerInterfaceGet the authorization information for a metadata resource. See the ISecurity interface documentation for a more complete description.- Specified by:
getAuthorizationsin interfaceMetadataServerInterface- Parameters:
authType- The type of authorization check to perform.credHandle- A credential handle. If null, the current user's authorizations for the resource are checked.resource- A string of the form OMSOBJ:type/FQID representing the metadata object to be checked.permission- A permission string, or a comma-separated list of permissions to check.- Returns:
- A two-dimensional array of strings. The exact layout and meaning of the of the result array depends on the value of authType.
- Throws:
ServiceException- in the event of repository errors.RemoteException- in the event of remote object failure.
-
getCountNoSecurity
public int getCountNoSecurity(Filter filter, String association) throws ServiceException, RemoteException Description copied from interface:MetadataServerInterfacePerform a search operation against the metadata repository which will return a count of the matching objects, rather than the objects themselves. The search is done with security off. In this way, an application can determine if objects exist even if they can't read those objects.- Specified by:
getCountNoSecurityin interfaceMetadataServerInterface- Parameters:
filter- A Filter specifying the selection criteria as well as any template that's desired for the operation. If the search should be constrained to a single repository, the repository should be set on the filter using the setOMRRepository method. If no repository is set on the Filter, all repositories in the server will be searched.association- An optional parameter that requests that a specific association be counted rather than the top level objects. If this is used, only one top level object can be returned by the filter, and a template must be supplied to return the association to count.- Returns:
- The count of matching objects.
- Throws:
ServiceException- In the event of a server error.RemoteException- In the event of remote object failure.
-
setInternalPassword
public void setInternalPassword(String username, String password) throws ServiceException, RemoteException Description copied from interface:MetadataServerInterfaceSet a user's internal password. This is only usable by an administrative user.- Specified by:
setInternalPasswordin interfaceMetadataServerInterface- Parameters:
username- The name of the user to set an internal password for. This is the Name attribute on a Person object.password- The password to set for internal authentication.- Throws:
ServiceException- If a server error occurs.RemoteException- In the event of remote object failure.
-
setSelfInternalPassword
public void setSelfInternalPassword(String username, String oldPassword, String newPassword) throws ServiceException, RemoteException Description copied from interface:MetadataServerInterfaceUsed to set a user's internal password by the user himself. This is only usable by a User whose own internal password is being changed.- Specified by:
setSelfInternalPasswordin interfaceMetadataServerInterface- Parameters:
username- The name of the user to set an internal password for. This is the Name attribute on a Person object.oldPassword- The current password for internal authentication.newPassword- The new password to set for internal authentication.- Throws:
ServiceException- If a server error occurs.RemoteException- In the event of remote object failure.
-
encodePassword
public static String encodePassword(String password) -
deleteInternalPassword
Description copied from interface:MetadataServerInterfaceDelete a user's internal password. This is only usable by an administrative user.- Specified by:
deleteInternalPasswordin interfaceMetadataServerInterface- Parameters:
username- The name of the user whose internal password should be deleted.- Throws:
ServiceException- If a server error occurs.RemoteException- In the event of remote object failure.
-
getInternalLoginSitePolicies
public InternalLoginSitePolicies getInternalLoginSitePolicies() throws ServiceException, RemoteExceptionDescription copied from interface:MetadataServerInterfaceGet the site policies that control the internal authentication provider. These policies cannot be set programmatically, they have to be set in the server configuration files. This method can only be used by an administrative user.- Specified by:
getInternalLoginSitePoliciesin interfaceMetadataServerInterface- Returns:
- An InternalLoginSitePolicies object containing the policy information.
- Throws:
ServiceException- If a server error occurs.RemoteException- In the event of remote object failure.
-
getInternalLoginUserInfo
public InternalLoginUserInfo getInternalLoginUserInfo(String username) throws ServiceException, RemoteException Description copied from interface:MetadataServerInterfaceGet the information regarding a user's internal login. Only an administrative user can successfully call this method.- Specified by:
getInternalLoginUserInfoin interfaceMetadataServerInterface- Parameters:
username- The user to retrieve internal login parameters for.- Returns:
- An InternalLoginUserInfo object with the user's internal login information.
- Throws:
ServiceException- If a server error occurs.RemoteException- In the event of remote object failure.
-
setInternalLoginUserOptions
public void setInternalLoginUserOptions(String username, boolean isDisabled, boolean bypassStrength, boolean bypassHistory, boolean useStdPasswordExpirationDays, int passwordExpirationDays, boolean bypassLockout, boolean bypassInactivitySuspension, boolean doesAccountExpire, Date accountExpirationDate) throws ServiceException, RemoteException Description copied from interface:MetadataServerInterfaceSet the options on a user's internal login. This call can only be successfully completed by an administrative user.- Specified by:
setInternalLoginUserOptionsin interfaceMetadataServerInterface- Parameters:
username- The user whose internal login data is to be updated.isDisabled- A flag indicating if the internal login is disabled.bypassStrength- Bypass the site password strength requirements.bypassHistory- Bypass the site password history checks.useStdPasswordExpirationDays- Use the site password expiration setting.passwordExpirationDays- Override setting in days for password expiration.bypassLockout- Bypass the site policy for account lockout.bypassInactivitySuspension- Bypass the site policy for inactivity suspension.doesAccountExpire- Set the flag indicating whether this account ever expires.accountExpirationDate- Set the date that this account expires.- Throws:
ServiceException- If a server error occurs.RemoteException- In the event of remote object failure.
-
browseFolder
public BrowseMetadataInterface browseFolder(String folderISEntityKey, FilterInterface filter) throws ServiceException, RemoteException Description copied from interface:ServerInterfaceGet 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.
- Specified by:
browseFolderin interfaceServerInterface- Parameters:
folderISEntityKey- The Information Service entity key of the Folder to retrieve information for.filter- AFilterused to limit the items returned.- Returns:
- A
BrowseMetadataInterfaceobject. 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
public BrowseMetadataInterface browseFolderRecursive(String folderISEntityKey, FilterInterface filter) throws ServiceException, RemoteException Description copied from interface:ServerInterfaceSearch 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.- Specified by:
browseFolderRecursivein interfaceServerInterface- Parameters:
folderISEntityKey- The Entity key of the requested folder.filter- AFilterto limit the results.- Returns:
- A
BrowseMetadataInterfaceobject representing the Folder being browsed. - Throws:
ServiceException- If a repository error occurs.RemoteException- In the event of remote object failure.
-
browseFetch
public BrowseMetadataInterface browseFetch(String objectURI, FilterInterface filter) throws ServiceException, RemoteException Description copied from interface:ServerInterfaceFetch a lightweight object matching the object URI provided.- Specified by:
browseFetchin interfaceServerInterface- 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
Description copied from interface:ServerInterfaceSearch 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.
- Specified by:
browseSearchin interfaceServerInterface- Parameters:
filter- AFilterto 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
BrowseMetadataInterfaceobjects. - Throws:
ServiceException- In the event of repository errors.RemoteException- In the event of remote object failure.
-
browseSearch
public List browseSearch(BrowseMetadataInterface browseFolder, FilterInterface filter) throws ServiceException, RemoteException Description copied from interface:ServerInterfaceSearch for objects in the server tree using the folder as a base. This will return lightweight objects which cannot be updated.- Specified by:
browseSearchin interfaceServerInterface- 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
public List browseSearch(FolderInterface folder, FilterInterface filter) throws ServiceException, RemoteException Description copied from interface:ServerInterfaceSearch for objects in the server tree using the folder as a base. This will return lightweight objects which cannot be updated.- Specified by:
browseSearchin interfaceServerInterface- 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
public List browseSearch(List folderList, FilterInterface filter) throws ServiceException, RemoteException Description copied from interface:ServerInterfaceSearch for objects in the server tree using the list of folders as bases. This will return lightweight objects which cannot be updated.- Specified by:
browseSearchin interfaceServerInterface- 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.
-
search
public List search(FolderInterface folder, FilterInterface filter) throws ServiceException, RemoteException Description copied from interface:ServerInterfaceSearch the server tree from a given folder base using the provided filter.- Specified by:
searchin interfaceServerInterface- 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
public List search(List folderList, FilterInterface filter) throws ServiceException, RemoteException Description copied from interface:ServerInterfaceSearch the server from a collection of base folders. All of the folders are searched and the results aggregated into a List.- Specified by:
searchin interfaceServerInterface- 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.
-
deleteEntity
Description copied from interface:ServerInterfaceDelete 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.- Specified by:
deleteEntityin interfaceServerInterface- Parameters:
input- The object to delete.- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
deleteEntity
public void deleteEntity(com.sas.metadata.remote.CMetadata metadata) throws ServiceException, RemoteException Description copied from interface:MetadataServerInterfaceAllow a CMetadata object to be passed in to be deleted.- Specified by:
deleteEntityin interfaceMetadataServerInterface- Parameters:
metadata- The CMetadata object to be deleted.- Throws:
ServiceException- in the event of back end repository failure.RemoteException- in the event of remote object failure.
-
deleteEntities
Description copied from interface:MetadataServerInterfaceDelete a collection of CMetadata objects. The entire list is passed to the jOMA classes for processing at one time. This prevents multiple calls to the server when deleting several objects at once.- Specified by:
deleteEntitiesin interfaceMetadataServerInterface- Parameters:
metadataObjects- a List of CMetadata objects to be deleted.- Throws:
ServiceException- in the event of back end repository failure.RemoteException- in the event of remote object failure.
-
getObjectByPathFilter
public MetadataInterface getObjectByPathFilter(PathUrl url) throws ServiceException, RemoteException Description copied from interface:ServerInterfaceGet 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.- Specified by:
getObjectByPathFilterin interfaceServerInterface- 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.
-
getObjectByPathNew
- Throws:
ServiceExceptionRemoteException
-
getObjectByPath
Description copied from interface:ServerInterfaceGet an object in the BIP tree using a PathUrl to find it.- Specified by:
getObjectByPathin interfaceServerInterface- 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 failureRemoteException- in the event of remote object failure.
-
getCreateDate
Description copied from interface:MetadataServerInterfaceGet the Created date of a metadata object as a Date rather than a String.- Specified by:
getCreateDatein interfaceMetadataServerInterface- Parameters:
mi- The metadata object to get the create date for.- Returns:
- A Java Date for the creation date/time of the object.
- Throws:
ServiceException- If a repository error occurs.RemoteException- In the event of remote object failure.
-
getModifiedDate
Description copied from interface:MetadataServerInterfaceGet the modified date of a metadata object as a Date rather than a String.- Specified by:
getModifiedDatein interfaceMetadataServerInterface- Parameters:
mi- The metadata object to get the modified date for.- Returns:
- A Java Date for the modified date/time of the object.
- Throws:
ServiceException- If a repository error occurs.RemoteException- In the event of remote object failure.
-
getClusterConnections
- Throws:
RemoteExceptionServiceException
-
createMetadata
public com.sas.metadata.remote.Root createMetadata(String repositoryId, String name, String type) throws RemoteException, ServiceException Description copied from interface:MetadataServerInterfaceCreate a new metadata object. This is specific to the OMIRepository because it deals with CMetadat objects. I have to surface this method because I don't provide access to the MdFactory, which is used to create new objects.- Specified by:
createMetadatain interfaceMetadataServerInterface- Parameters:
repositoryId- The FQID of the repository where the object is to be created.name- A String for the name of the new object.type- The Type for the new object. Should be a field from MetadataObjects.- Returns:
- A new CMetadata object which can be cast to the correct type.
- Throws:
RemoteException- In the event of remote object failure.ServiceException- If a repository error occurs.
-
newMetadata
public 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.- Specified by:
newMetadatain interfaceServerInterface- 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
Description copied from interface:ServerInterfaceFetch an object from the metadat based on its URI.- Specified by:
fetchin interfaceServerInterface- 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.
-
fetch
public MetadataInterface fetch(String repositoryKey, boolean bypassCache) throws ServiceException, RemoteException Fetch an object from the repository given the repository key. If thebypassCacheflag 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 thefetchmethod.- Specified by:
fetchin interfaceServerInterface- 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
Search the repository using the provided filter.- Specified by:
searchin interfaceServerInterface- 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.
-
refreshEntity
Description copied from interface:ServerInterfaceRefresh an entity from the data in the server.- Specified by:
refreshEntityin interfaceServerInterface- Parameters:
mi- The Metadata object to refresh.- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of network errors.
-
getTypeDictionaryMap
Description copied from interface:MetadataServerInterfaceGet the Map of TypeDescriptors. The key is the PublicType String and the values areTypeDescriptorInterfaceobjects.- Specified by:
getTypeDictionaryMapin interfaceMetadataServerInterface- Returns:
- The Type Dictionary Map.
- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
addToCache
Description copied from interface:ServerInterfaceExplicitly add a new metadata object to the cache.- Specified by:
addToCachein interfaceServerInterface- 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.
-
newChild
Description copied from interface:ServerInterfaceCreate a child repository instance with its own cache, which can be used to perform a group of updates transaction-style.- Specified by:
newChildin interfaceServerInterface- Returns:
- A new object of type ChildRepositoryInterface.
- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
newChild
Description copied from interface:ServerInterfaceCreate a child repository instance with its own cache, which can be used to perform a group of updates transaction-style.- Specified by:
newChildin interfaceServerInterface- 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.
-
flush
Description copied from interface:ServerInterfaceflush any pending updates to the metadata server.- Specified by:
flushin interfaceServerInterface- Throws:
ServiceException- If an error occurs during the update.RemoteException- In the event of remote object failure.
-
toByteArray
Description copied from interface:ServerInterfaceOutput the state of the server to a byte array.- Specified by:
toByteArrayin interfaceServerInterface- 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:
RemoteException- In the event of remote object failure.ServiceException- If a service level error occurs.
-
fromByteArray
public void fromByteArray(UserContextInterface uci, byte[] data) throws RemoteException, ServiceException Description copied from interface:ServerInterfaceInitialize an instance of the server from a byte array.- Specified by:
fromByteArrayin interfaceServerInterface- 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.
-
debug
public void debug(String context, ResourceBundle rb, String key, Object arg0, Object arg1, Object arg2) throws RemoteException - Specified by:
debugin interfaceServerInterface- Throws:
RemoteException
-
debug
public void debug(String context, String message) throws RemoteException - Specified by:
debugin interfaceServerInterface- Throws:
RemoteException
-
debug
public void debug(String context, String message, Throwable t) throws RemoteException - Specified by:
debugin interfaceServerInterface- Throws:
RemoteException
-
info
public void info(String context, ResourceBundle rb, String key, Object arg0, Object arg1, Object arg2) throws RemoteException - Specified by:
infoin interfaceServerInterface- Throws:
RemoteException
-
info
public void info(String context, String message) throws RemoteException - Specified by:
infoin interfaceServerInterface- Throws:
RemoteException
-
info
public void info(String context, String message, Throwable t) throws RemoteException - Specified by:
infoin interfaceServerInterface- Throws:
RemoteException
-
warn
public void warn(String context, ResourceBundle rb, String key, Object arg0, Object arg1) throws RemoteException - Specified by:
warnin interfaceServerInterface- Throws:
RemoteException
-
warn
public void warn(String context, String message) throws RemoteException - Specified by:
warnin interfaceServerInterface- Throws:
RemoteException
-
warn
public void warn(String context, String message, Throwable t) throws RemoteException - Specified by:
warnin interfaceServerInterface- Throws:
RemoteException
-
error
public void error(String context, ResourceBundle rb, String key, Object arg0, Object arg1) throws RemoteException - Specified by:
errorin interfaceServerInterface- Throws:
RemoteException
-
error
public void error(String context, String message) throws RemoteException - Specified by:
errorin interfaceServerInterface- Throws:
RemoteException
-
MdStoreIDChange
public void MdStoreIDChange(com.sas.metadata.remote.MdEvent e, List itemsOld, List itemsNew) throws RemoteException - Specified by:
MdStoreIDChangein interfacecom.sas.metadata.remote.MdStoreIDChangeListener- Throws:
RemoteException
-
MdObjectsAdded
public void MdObjectsAdded(com.sas.metadata.remote.MdEvent e, List items) throws RemoteException - Specified by:
MdObjectsAddedin interfacecom.sas.metadata.remote.MdStoreListener- Throws:
RemoteException
-
MdObjectsRemoved
public void MdObjectsRemoved(com.sas.metadata.remote.MdEvent e, List items) throws RemoteException - Specified by:
MdObjectsRemovedin interfacecom.sas.metadata.remote.MdStoreListener- Throws:
RemoteException
-
MdObjectsModified
public void MdObjectsModified(com.sas.metadata.remote.MdEvent e, List items) throws RemoteException - Specified by:
MdObjectsModifiedin interfacecom.sas.metadata.remote.MdStoreListener- Throws:
RemoteException
-
refreshAllData
Description copied from interface:ServerInterfaceRefresh all of the data cached from this server.- Specified by:
refreshAllDatain interfaceServerInterface- Throws:
ServiceException- If a server error occurs during refresh.RemoteException- In the event of remote object failure.
-
clearPendingChanges
Description copied from interface:ServerInterfaceClear 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.- Specified by:
clearPendingChangesin interfaceServerInterface- 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.
-
MdObjectModified
public void MdObjectModified(com.sas.metadata.remote.MdEvent e) throws RemoteException - Specified by:
MdObjectModifiedin interfacecom.sas.metadata.remote.MdObjectListener- Throws:
RemoteException
-
notify
public boolean notify(com.sas.metadata.remote.MdConnectionEvent event) throws RemoteException - Specified by:
notifyin interfacecom.sas.metadata.remote.MdConnectionListener- Throws:
RemoteException
-
addMetadataConnectionListener
public void addMetadataConnectionListener(MetadataConnectionListener listener) throws ServiceException, RemoteException Description copied from interface:MetadataServerInterfaceAdds a new connection listener so that a consumer may become notified of when a connection to the metadata server has been established.- Specified by:
addMetadataConnectionListenerin interfaceMetadataServerInterface- Parameters:
listener- connection listener- Throws:
ServiceException- In the event of a service error.RemoteException- In the event of remote object failure.
-
removeMetadataConnectionListener
public void removeMetadataConnectionListener(MetadataConnectionListener listener) throws ServiceException, RemoteException Description copied from interface:MetadataServerInterfaceRemoves an existing connection listener- Specified by:
removeMetadataConnectionListenerin interfaceMetadataServerInterface- Parameters:
listener- connection listener- Throws:
ServiceException- In the event of a service error.RemoteException- In the event of remote object failure.
-
MdObjectsCreated
public void MdObjectsCreated(com.sas.metadata.remote.MdFactoryEvent e) throws RemoteException - Specified by:
MdObjectsCreatedin interfacecom.sas.metadata.remote.MdFactoryListener- Throws:
RemoteException
-
MdObjectsDeleted
public void MdObjectsDeleted(com.sas.metadata.remote.MdFactoryEvent e) throws RemoteException - Specified by:
MdObjectsDeletedin interfacecom.sas.metadata.remote.MdFactoryListener- Throws:
RemoteException
-
MdObjectsModified
public void MdObjectsModified(com.sas.metadata.remote.MdFactoryEvent e) throws RemoteException - Specified by:
MdObjectsModifiedin interfacecom.sas.metadata.remote.MdFactoryListener- Throws:
RemoteException
-
makeKey
- Throws:
ServiceExceptionRemoteException
-