*** This interface provides Binary Compatibility only, not Source Compatibility ***
Package com.sas.services.information
Interface MetadataServerInterface
- All Superinterfaces:
Remote,ServerInterface
- All Known Implementing Classes:
OMIChildServer,OMIServer
@SASScope("ALL")
@BinaryCompatibilityOnly
public interface MetadataServerInterface
extends ServerInterface
-
Field Summary
Fields 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 -
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.voidapplyACTToObj(String resource, String act) Apply an AccessControlTemplate to a metadata object.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.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.voiddeleteInternalPassword(String username) Delete a user's internal password.voiddestroyAccessControlTemplate(String act) Destroy an AccessControlTemplate in the repository.voidfreeCredentials(String credential) Free a credential handle.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.ListgetApplicationActionsAuthorizations(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.MapGet a Map with the server-managed enterprise policies.ListgetIdentitiesOnObj(String resource, int flags) Get a List of identities associated with an object through authorizations.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.DateGet the modified date of a metadata object as a Date rather than a String.MapGet the Map of TypeDescriptors.isAuthorizedWithConditions(String credential, String resource, String permission) Check authorization status for a given credential, resource, and permission.voidremoveACTFromObj(String resource, String act) Remove an AccessControlTemplate from a metadata object.voidRemoves an existing connection listenervoidsetAccessControlTemplateAttribs(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 currentPassword, String newPassword) Used to set a user's internal password by the user himself.Methods inherited from interface com.sas.services.information.ServerInterface
addToCache, browseFetch, browseFolder, browseFolderRecursive, browseSearch, browseSearch, browseSearch, browseSearch, clearPendingChanges, connect, connect, connect, connect, debug, debug, debug, deleteEntity, destroy, error, error, executeRequest, factoryProcess, fetch, fetch, flush, fromByteArray, generatePassword, getDomain, getExplicitIdentityGroup, getFoundationRepository, getHomeFolder, getHomeFolder, getHost, getIdentity, getName, getObjectByPath, getObjectByPathFilter, getPerson, getPort, getProtocol, getRepositories, getRepositories, getRepository, getRepositoryInfo, getRepositoryName, getRepositoryNames, getRootFolder, getServerVersion, getTypeDescriptor, getTypeDescriptors, getUserContext, info, info, info, isAuthorized, isConnected, isUserAuthorized, loadTypes, loadTypes, newChild, newChild, newMetadata, reconnect, refreshAllData, refreshEntity, search, search, search, toByteArray, warn, warn, warn
-
Method Details
-
getLoginsForAuthDomain
Get 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.- 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.
-
getApplicationActionsAuthorizations
List getApplicationActionsAuthorizations(SoftwareComponentInterface app, RoleInterface role, boolean explicitRoleActions) throws ServiceException, RemoteException Get 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.- 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
List getApplicationActionsAuthorizations(SoftwareComponentInterface app) throws ServiceException, RemoteException Get 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.- 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.
-
getEnterprisePolicies
Get a Map with the server-managed enterprise policies.- 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
See the ISecurity interface documentation for a description of this method.- 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
Free 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.- Parameters:
credential- The credential to free.- Throws:
ServiceException- in the event of repository errors.RemoteException- in the event of remote object failure.
-
isAuthorizedWithConditions
AuthResult isAuthorizedWithConditions(String credential, String resource, String permission) throws ServiceException, RemoteException Check authorization status for a given credential, resource, and permission. See the ISecurity interface documentation for a more complete description.- 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
String[][] getAuthorizations(String authType, String credHandle, String resource, String permission) throws ServiceException, RemoteException Get the authorization information for a metadata resource. See the ISecurity interface documentation for a more complete description.- 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
Perform 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.- 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.
-
getAuthorizationsOnObj
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.- 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
Authorizationobjects with the resulting authorization data. - Throws:
ServiceException- if a service level error occurs.RemoteException- in the event of remote object failure.
-
setAuthorizationsOnObj
void setAuthorizationsOnObj(String resource, List authorizations, int flags) throws ServiceException, RemoteException Set authorizations on a metadata object.- 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).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.
-
getAuthorizationsForObjects
List<AuthorizationObjectsResult> getAuthorizationsForObjects(List<MetadataInterface> resources, List<String> permissions) throws ServiceException, RemoteException Get 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.- 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.
-
getIdentitiesOnObj
Get a List of identities associated with an object through authorizations.- 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.- 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.- 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).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.- 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
List getAccessControlTemplateList(RepositoryInterface repository, int flags) throws ServiceException, RemoteException Get the list of AccessControlTemplates for this repository.- Parameters:
repository- The repository to retrieve the Access Control Templates 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
void createAccessControTemplate(RepositoryInterface repository, ACTEntry act) throws ServiceException, RemoteException Create a new AccessControlTemplate in this repository.- Parameters:
repository- The repository to create tne new Access Control Template in.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.- 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
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;- Parameters:
repository- The repository containing the ACT 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
Get attributes for an AccessControlTemplate.- 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.
-
setInternalPassword
Set a user's internal password. This is only usable by an administrative user.- 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
void setSelfInternalPassword(String username, String currentPassword, String newPassword) throws ServiceException, RemoteException Used 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.- Parameters:
username- The name of the user to set an internal password for. This is the Name attribute on a Person object.currentPassword- 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.
-
deleteInternalPassword
Delete a user's internal password. This is only usable by an administrative user.- 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
Get 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.- Returns:
- An InternalLoginSitePolicies object containing the policy information.
- Throws:
ServiceException- If a server error occurs.RemoteException- In the event of remote object failure.
-
getInternalLoginUserInfo
InternalLoginUserInfo getInternalLoginUserInfo(String username) throws ServiceException, RemoteException Get the information regarding a user's internal login. Only an administrative user can successfully call this method.- 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
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 Set the options on a user's internal login. This call can only be successfully completed by an administrative user.- 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.
-
getCreateDate
Get the Created date of a metadata object as a Date rather than a String.- 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
Get the modified date of a metadata object as a Date rather than a String.- 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.
-
deleteEntity
void deleteEntity(com.sas.metadata.remote.CMetadata metadata) throws ServiceException, RemoteException Allow a CMetadata object to be passed in to be deleted.- 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
Delete 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.- 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.
-
createMetadata
com.sas.metadata.remote.Root createMetadata(String repositoryId, String name, String type) throws RemoteException, ServiceException Create 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.- 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.
-
getTypeDictionaryMap
Get the Map of TypeDescriptors. The key is the PublicType String and the values areTypeDescriptorInterfaceobjects.- Returns:
- The Type Dictionary Map.
- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
getInternalDomain
Return the string that represents the internal authentication domain. This is normall "saspw".- Returns:
- The internal authentication domain string.
- Throws:
ServiceException- In the event of a service error.RemoteException- In the event of remote object failure.
-
getIdentityInfo
Return an IdentityInfo object containing information about the currently connected user. This calls through to the ISecurity method GetInfo.- 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.
-
addMetadataConnectionListener
void addMetadataConnectionListener(MetadataConnectionListener listener) throws ServiceException, RemoteException Adds a new connection listener so that a consumer may become notified of when a connection to the metadata server has been established.- Parameters:
listener- connection listener- Throws:
ServiceException- In the event of a service error.RemoteException- In the event of remote object failure.
-
removeMetadataConnectionListener
void removeMetadataConnectionListener(MetadataConnectionListener listener) throws ServiceException, RemoteException Removes an existing connection listener- Parameters:
listener- connection listener- Throws:
ServiceException- In the event of a service error.RemoteException- In the event of remote object failure.
-