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 Type
    Method
    Description
    void
    Destroy all memory allocated for object and release from RMI
    int
    getAssociationCountForObject(CMetadata meta, String associationName)
    Returns the size of a specific association for an object.
    int
    getCountNoSecurity(String reposID, String xmlSelect, String metadataType)
    Performs a search on the server bypassing all security permissions.
    int
    getCountNoSecurity(String reposID, String xmlSelect, String metadataType, int flags)
    Performs a search on the server bypassing all security permissions.
    boolean
    isFolderWriteAuthorized(String folderID)
    Returns true if the user has the necessary WriteMemberMetadata permissions for a particular folder.
    boolean
    isReadAuthorized(String metadataType, String metadataID)
    Returns true if the user has the necessary ReadMetadata permissions for a particular object.
    boolean
    isWriteAuthorized(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 object
      metadataID - the object's metadata id
      Returns:
      true if user has read metadata permission, false otherwise
      Throws:
      MdException
      RemoteException
    • 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 object
      metadataID - the object's metadata id
      Returns:
      true if user has write metadata permission, false otherwise
      Throws:
      MdException
      RemoteException
    • isFolderWriteAuthorized

      boolean isFolderWriteAuthorized(String folderID) throws MdException, RemoteException
      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:
      MdException
      RemoteException
    • 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 for
      associationName - the name of the association to search
      isec - the ISecurity connection
      Returns:
      the total size of an association for a given object or 0 if the association is completely empty.
      Throws:
      MdException
      RemoteException
    • 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 within
      xmlSelect - an xml select statement used to search for the object
      metadataType - the metadata type of the object
      Returns:
      count the number of objects matching the search criteria that exist on the server
      Throws:
      MdException
      RemoteException
    • 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 flags parameter.

      Parameters:
      reposID - the repository id to search within
      xmlSelect - an xml select statement used to search for the object
      metadataType - the metadata type of the object
      flags - allows additional flags to be passed in. Typically this can be used to allow users to search across multiple repositories using the MdOMIUtil.OMI_DEPENDENCY_USES and MdOMIUtil.OMI_DEPENDENCY_USEDBY flags. 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:
      MdException
      RemoteException
    • dispose

      void dispose() throws RemoteException
      Destroy all memory allocated for object and release from RMI
      Throws:
      RemoteException