Interface AccessControlTemplate

All Superinterfaces:
AccessControl, CMetadata, MdObjectBase, MdObjectBaseUtil, MdObjectBaseXML, PrimaryType, Remote, Root

public interface AccessControlTemplate extends AccessControl
The AccessControlTemplate (ACT) metadata type enables you to define a template of individual users, groups, and permissions that can be applied to multiple resources. This template is stored as an independent resource that can be associated with other resources. Use this metadata type when you want to confer the same set of authorizations on multiple resources. Because an ACT is independent of the resources that it controls, it is also easy to maintain when an update is needed. Any change that you make to the ACT will be enforced on all resources that reference the ACT.

An ACT should not be explicitly created or deleted. ACTs are managed programmatically using the SAS Open Metadata Interface ISecurityAdmin method class, which is documented in the SAS 9.2 Open Metadata Interface: Reference and Usage. The ISecurityAdmin class provides methods for defining and managing direct access controls as well as access control templates.

Attributes of AccessControlTemplate are:

Associations of AccessControlTemplate are:

Usage

To create an instance of this AccessControlTemplate, use the factory create methods.
Example: create a AccessControlTemplate with name "AccessControlTemplate_Object", in repository "AAAAAAAA".
 // create a store to contain your objects for this change. If you do not have an existing object
 // or store to use.  You may obtain the store from another object by using Object.getObjectStore().
 MdFactory factory; //where "factory" is a valid MdFactory instance
 MdObjectStore objectStore = factory.createObjectStore();
 AccessControlTemplate myObject = (AccessControlTemplate) factory.createComplexMetadataObject(objectStore, "AccessControlTemplate_Object", MetadataObjects.ACCESSCONTROLTEMPLATE, "AAAAAAAA");
 myObject.updateMetadataAll();  // Write object to server
 objectStore.dispose();  // dispose of the object store if it is no longer needed
 

Behavior

  • Attributes and associations for this object can be retrieved by using the methods in MdOMIUtil.
  • When changes are made to the object, either by setting an attribute or adding objects to a particular association, they can be persisted to the metadata server with the updateMetadataAll method.
  • If an object needs to be deleted, the delete method can be used. This will flag the object as being deleted on the client, and will require an update call to persist the change to the server.

Dependencies

This class depends on objects being contained in an MdObjectStore. Object stores should be disposed of when they are no longer needed as this will help clean up memory. Disposing an object store will dispose of all objects contained within that store.

Since:
9.0
  • Field Details

    • ATTRIBUTE_USE_NAME

      static final String ATTRIBUTE_USE_NAME
      Constant used for the name of the Use attribute.

      Use: This is a field that can store a symbolic flag indicating a special use for this particular ACT. Note: A specific ACT may have only one special use. If an ACT needs to be used in more than one way, then a new ACT should be created for each additional Use value. The additional ACTs would then simply add the original ACT to their AccessControlItems

      See Also:
    • ASSOCIATION_ACCESSCONTROLITEMS_NAME

      static final String ASSOCIATION_ACCESSCONTROLITEMS_NAME
      Constant used for the name of the AccessControlItems association.

      AccessControlItems: The list of access controls that define this access control template.  

      See Also:
  • Method Details

    • initializeRequiredObjects

      void initializeRequiredObjects() throws RemoteException
      (S) This initializes the Required Objects(Roles) which are:
      Specified by:
      initializeRequiredObjects in interface AccessControl
      Specified by:
      initializeRequiredObjects in interface MdObjectBaseUtil
      Specified by:
      initializeRequiredObjects in interface PrimaryType
      Specified by:
      initializeRequiredObjects in interface Root
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
    • initializePredObjects

      void initializePredObjects() throws RemoteException
      (S) Adds the Associated objects to the predObjects which are:
      AccessControlItems
      Specified by:
      initializePredObjects in interface AccessControl
      Specified by:
      initializePredObjects in interface MdObjectBase
      Specified by:
      initializePredObjects in interface PrimaryType
      Specified by:
      initializePredObjects in interface Root
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
    • getUse

      String getUse() throws RemoteException
      Gets the String value of Use
      Returns:
      The Use
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
    • getUseState

      int getUseState() throws RemoteException
      Gets the Metadata State of Use
      Returns:
      The State.
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
    • getUseMaxLength

      int getUseMaxLength() throws RemoteException
      Gets the maximum length of Use
      Returns:
      The max size
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
    • getAccessControlItems

      AssociationList getAccessControlItems() throws RemoteException, MdException
      Gets the AssociationList of AccessControlItems
      Returns:
      Returns the AssociationList of AccessControlItems which can be of type:
      AccessControl
      AccessControlEntry
      AccessControlTemplate
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
      MdException - If error getting/setting part of the object.
    • getAccessControlItems

      AssociationList getAccessControlItems(boolean fGoToServer) throws RemoteException, MdException
      Gets the Associationlist of AccessControlItems
      Parameters:
      fGoToServer - boolean Get the value from the server.
      Returns:
      Returns the AssociationList of AccessControlItems which can be of type:
      AccessControl
      AccessControlEntry
      AccessControlTemplate
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
      MdException - If error getting/setting part of the object.
    • setUse

      void setUse(String inUse) throws RemoteException
      Sets the Use value and sets the state to MetadataState.LOCAL.
      Parameters:
      inUse - String
      Throws:
      RemoteException - If error communicating with remote object.
    • setUse

      void setUse(String inUse, int state) throws RemoteException
      Sets the Use Metadata State.
      Parameters:
      inUse - String
      state - int
      Throws:
      RemoteException - If error communicating with remote object.
    • setUseState

      void setUseState(int state) throws RemoteException
      Sets the Metadata State of Use.
      Parameters:
      state - int
      Throws:
      RemoteException - If error communicating with remote object.
    • setAccessControlItems

      void setAccessControlItems(AssociationList list) throws RemoteException
      Sets the AccessControlItems list to be list. Objects of which can be of type:
      AccessControl
      AccessControlEntry
      AccessControlTemplate
      Parameters:
      list - AssociationList
      Throws:
      RemoteException - If error communicating with remote object.
    • setAccessControlItems

      void setAccessControlItems(AssociationList inObjects, int state) throws RemoteException
      Sets the entire AssociationList to match the passed in Vector, sets the state of the AssociationList
      Parameters:
      inObjects - AssociationList
      state - int
      Throws:
      RemoteException - If error communicating with remote object.