Package com.sas.metadata.remote
Interface MdSecurityUtil
- All Superinterfaces:
Remote
public interface MdSecurityUtil
extends Remote
Utility class used for retrieving the necessary security permissions for a metadata object.
An instance of this class should be obtained by calling MdFactory.getSecurityUtil().
-
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Destroy all memory allocated for object and release from RMIintgetAssociationCountForObject(CMetadata meta, String associationName) Returns the size of a specific association for an object.intgetCountNoSecurity(String reposID, String xmlSelect, String metadataType) Performs a search on the server bypassing all security permissions.intgetCountNoSecurity(String reposID, String xmlSelect, String metadataType, int flags) Performs a search on the server bypassing all security permissions.booleanisFolderWriteAuthorized(String folderID) Returns true if the user has the necessary WriteMemberMetadata permissions for a particular folder.booleanisReadAuthorized(String metadataType, String metadataID) Returns true if the user has the necessary ReadMetadata permissions for a particular object.booleanisWriteAuthorized(String metadataType, String metadataID) Returns true if the user has the necessary WriteMetadata permissions for a particular object.
-
Method Details
-
isReadAuthorized
boolean isReadAuthorized(String metadataType, String metadataID) throws MdException, RemoteException Returns true if the user has the necessary ReadMetadata permissions for a particular object.- Parameters:
metadataType- the metadata type of the objectmetadataID- the object's metadata id- Returns:
- true if user has read metadata permission, false otherwise
- Throws:
MdExceptionRemoteException
-
isWriteAuthorized
boolean isWriteAuthorized(String metadataType, String metadataID) throws MdException, RemoteException Returns true if the user has the necessary WriteMetadata permissions for a particular object.- Parameters:
metadataType- the metadata type of the objectmetadataID- the object's metadata id- Returns:
- true if user has write metadata permission, false otherwise
- Throws:
MdExceptionRemoteException
-
isFolderWriteAuthorized
Returns true if the user has the necessary WriteMemberMetadata permissions for a particular folder. If true, the user has permissions to add/delete objects within a folder.- Parameters:
folderID- the metadata id of the parent folder- Returns:
- true if user has write metadata permission, false otherwise
- Throws:
MdExceptionRemoteException
-
getAssociationCountForObject
int getAssociationCountForObject(CMetadata meta, String associationName) throws MdException, RemoteException Returns the size of a specific association for an object. This method will bypass all security permissions. The count returned will be the size of the association, regardless if the user doesn't have permission to view all objects in the association.For example, this method can be used to get the number of columns associated to a table or to see if a public object is already contained within a folder.
- Parameters:
meta- the metadata object to search forassociationName- the name of the association to searchisec- the ISecurity connection- Returns:
- the total size of an association for a given object or 0 if the association is completely empty.
- Throws:
MdExceptionRemoteException
-
getCountNoSecurity
int getCountNoSecurity(String reposID, String xmlSelect, String metadataType) throws MdException, RemoteException Performs a search on the server bypassing all security permissions. This method will return a count of all objects that exist on the server, even those that the user doesn't have permission to view.- Parameters:
reposID- the repository id to search withinxmlSelect- an xml select statement used to search for the objectmetadataType- the metadata type of the object- Returns:
- count the number of objects matching the search criteria that exist on the server
- Throws:
MdExceptionRemoteException
-
getCountNoSecurity
int getCountNoSecurity(String reposID, String xmlSelect, String metadataType, int flags) throws MdException, RemoteException Performs a search on the server bypassing all security permissions. This method will return a count of all objects that exist on the server, even those that the user doesn't have permission to view.This method can be used when needing to search across multiple repositories. In this case, additional flags can be passed in via the
flagsparameter.- Parameters:
reposID- the repository id to search withinxmlSelect- an xml select statement used to search for the objectmetadataType- the metadata type of the objectflags- allows additional flags to be passed in. Typically this can be used to allow users to search across multiple repositories using theMdOMIUtil.OMI_DEPENDENCY_USESandMdOMIUtil.OMI_DEPENDENCY_USEDBYflags. If no additional flags are needed, a value of 0 can be passed in.- Returns:
- count the number of objects matching the search criteria that exist on the server
- Throws:
MdExceptionRemoteException
-
dispose
void dispose() throws RemoteExceptionDestroy all memory allocated for object and release from RMI- Throws:
RemoteException
-