## Note:

Extension of the classes in this package is prohibited unless otherwise documented. Similarly, extension or implementation of the interfaces in this package is prohibited except as documented.

# Package com.sas.services.information.metadata

@CodeSet("sas.platform") @SASScope("ALL") package com.sas.services.information.metadata
Information Service metadata.

# How to Use the SAS Metadata Authorization Interfaces

## Introduction

Introduced in 9.3, the SAS Metadata Authorization Services provide a set of interfaces for managing authorizations on MetadataInterface objects and also for AccessControlTemplateInterface definitions. These interfaces insulate consuming code from direct interaction with authorization interfaces provided by the SAS Metadata Server. The following operations are done for a specific MetadataInterface or AccessControlTemplateInterface object.

- Setting a direct authorization by granting or denying permission to an IdentityInterface on the object. The identity can be an individual user or a group. The PermissionInfoInterface provides constants corresponding to the pre-defined set of SAS Metadata permissions as well as related getter and setter methods.
- Getting the permission grant or deny settings for the object. Some of these permissions may be set directly on the object. Other permissions are inherited from a parent object that the object inherits authorizations from. Authorization inheritance relationships are defined by the SAS Open Metadata Server.
- Getting the set of identities that have permissions set for the object. These include identities providing direct and/or inherited permissions. Each identity is represented by an AuthorizationIdentityInfoInterface instance.
- Getting the "explain" details for permissions set on the object. This is provided by the PermissionExplainedInfoInterface via a set of nested IndirectPermissionInfoInterface instances.
- Managing AccessControlTemplateInterface instances that project an MetadataInterface object.
- Committing or discarding pending authorization changes on a MetadataInterface or AccessControlTemplateInterface instance.

  ## Basic Authorization Interfaces

  ### AuthorizationUtilInterface

  The AuthorizationUtilInterface provides a set of methods for managing authorizations that protect a SAS Java Metadata object. Before any of these methods can be called, the AuthorizationUtilInterface must be obtained for the MetadataInterface object. The AuthorizationUtilInterface extends AuthorizationBaseInterface and defines additional methods used to manage AccessControlTemplateInterface instances that protect other objects. See the section Methods for managing AccessControlTemplates that protect objects for more information on this.

  Example 1: Obtaining the AuthorizationUtilInterface for a MetadataInterface

  ### AuthorizationBaseInterface

  AuthorizationBaseInterface provides the common methods necessary for managing direct permissions settings that protect MetadataInterface objects as well as those permission settings that define an AccessControlTemplateInterface. When used to to manage permissions settings that define an AccessControlTemplate, the methods must be invoked from an AuthorizationBaseInterface obtained from calling the AccessControlTemplateInterface.getAuthorizationDefinitionUtil() method.

  Example 2: Obtaining the AuthorizationBaseInterface for authorization definitions on an AccessControlTemplateInterface

  ### AuthorizationIdentityInfoInterface

  The AuthorizationIdentityInfoInterface represents an Identity that has one or more permissions set for the MetadataInterface object. An instance of AuthorizationIdentityInfoInterface contains an IdentityInterface representing the actual Identity object as well as other authorization-related attributes about the Identity. These attributes include membership in various special roles as well as whether or not the Identity's permissions are set directly on the MetadataInterface object and/or come via inheritance.

  Example 3: Getting the AuthorizationIdentityInfoInterface List for permissions set on an object

  ### PermissionInfoInterface

  The PermissionInfoInterface represents a permission for the MetadataInterface object. The following examples demonstrate using a List of PermissionInfoInterface instances to get or set permissions on the MetadataInterface object for a single identity in a single call.

  Example 4: Getting the PermissionInfoInterface List for a single identity
  Example 5: Setting the PermissionInfoInterface List for a single identity

  ### AuthorizationInfoInterface

  The permissions represents an Identity and its permission list for the MetadataInterface object. The following examples demonstrate using a List of AuthorizationIdentityInfoInterface instances to get or set permissions on the MetadataInterface object for multiple identities in a single call.

  Example 6: Getting the AuthorizationInfoInterface List for multiple identities
  Example 7: Setting the AuthorizationInfoInterface List for multiple identities

  ## Explain Authorization Interfaces

  ### AuthorizationExplainedInfoInterface

  The AuthorizationExplainedInfoInterface represents a nested set of objects that describe the source of each requested permission. These are represented by:

  ### IndirectPermissionInfoInterface

  The IndirectPermissionInfoInterface represents the source of an permission that is not set directly on the MetadataInterface object. Indirect permissions come from a Group membership, AccessControlTemplate, or Inheritance Parent object.

  ### PermissionExplainedInfoInterface

  The PermissionExplainedInfoInterface extends the PermissionInfoInterface and anchors a nested List of IndirectPermissionInfoInterface instances.

  Example 8: Getting the AuthorizationExplainedInfoInterface List for a single identity
  Example 9: Getting the AuthorizationExplainedInfoInterface List for multiple identities
  Example 10: Getting the AuthorizationExplainedInfoInterface List for All identities and permissions

  ## AccessControlTemplate Usage

  ### Methods for managing AccessControlTemplates that protect objects

  Note: these methods are only available on the AuthorizationUtilInterface obtained as shown in Example 1.

  Example 11: Getting the List of AccessControlTemplateInterface instances that protect an object
  Example 12: Setting an AccessControlTemplateInterface to protect an object
  Example 13: Removing an AccessControlTemplateInterface from protecting an object

  ## Managing Pending Authorization Changes

  Several methods on the AuthorizationUtilInterface (for MetadataInterface authorization) and the AuthorizationBaseInterface (for AccessControlTemplate definition) result in pending changes that are queued in the SAS Metadata Server. These changes are not persisted until specific action is taken to do so. There are two ways to make this happen. The first is to call the object's MetadataInterface.update() or AccessControlTemplateInterface.update() method which by default*** results in any object attribute changes as well as any pending authorization changes being persisted to the SAS Metadata Server. The second commits pending authorization changes independently of object-related attribute changes made to the MetadataInterface or AccessControlTemplateInterface instance. This is accomplish by calling AuthorizationUtilInterface.commit() in the object authorizations scenario -OR- AuthorizationBaseInterface.commit() in the AccessControlTemplate definition scenario.

  ***By default the CommitOnUpdate directive is set true for each instance of an AuthorizationUtilInterface or AuthorizationBaseInterface. This results in pending authorization changes being committed to the SAS Metadata Server along with any object attribute value changes. If your usage has cases where the update() method should not also commit pending authorization changes then invoke AuthorizationUtilInterface.setCommitOnUpdate(false) in the object authorizations scenario -OR- AuthorizationBaseInterface.setCommitOnUpdate(false) in the AccessControlTemplate definition scenario. When this is the desired behavior then setCommitOnUpdate(false) must be invoked prior to update(). This will cause the update() method to only commit object-related attribute changes while any pending authorization changes remain queued in the SAS Metadata Server. A corresponding call to setCommitOnUpdate(true) will revert to the default behavior.

  Example 14: Using update() with pending authorization changes
  Example 15: Committing authorization changes
  Example 16: Discarding authorization changes

  ### Example 1: Obtaining the AuthorizationUtilInterface for a MetadataInterface

  This is an example of how to get the AuthorizationUtilInterface for a SAS Services-level Metadata object.

        try
        {
            MetadataInterface object;  // any Services-level MetadataInterface object type will work here (your code must fill this in)
            AuthorizationUtilInterface authUtil = object.getAuthorizationUtil();
        }
        catch (ServiceException e)
        {
            e.printStackTrace();
        }
        catch (RemoteException e)
        {
            e.printStackTrace();
        }

  ### Example 2: Obtaining the AuthorizationBaseInterface for authorization definitions on an AccessControlTemplateInterface.

  This is an example of how to get the AuthorizationBaseInterface for a AccessControlTemplateInterface definition. The interface provides methods to manage permissions and identities that define the AccessControlTemplate.

        try
        {
            AccessControlTemplateInterface act;  // only provide an AccessControlTemplateInterface-type object in this case (your code must fill this in)
            AuthorizationBaseInterface authBase = act.getAuthorizationDefinitionUtil();
        }
        catch (ServiceException e)
        {
            e.printStackTrace();
        }
        catch (RemoteException e)
        {
            e.printStackTrace();
        }

  ### Example 3: Getting the AuthorizationIdentityInfoInterface List for permissions set on an object

  This is an example of getting the AuthorizationIdentityInfoInterface objects for permissions set on a MetadataInterface object.

        try
        {
            MetadataInterface object;  // any Services-level MetadataInterface object type will work here (your code must fill this in)
            AuthorizationUtilInterface authUtil = object.getAuthorizationUtil();
            List<AuthorizationIdentityInfoInterface>authIdentityInfoList = authUtil.getIdentities();
            for ( AuthorizationIdentityInfoInterface authIdentityInfo : authIdentityInfoList )
            {
                // Example showing authorization identity-related attributes for
                // each returned AuthorizationIdentityInfoInterface instance
                authIdentityInfo.getIdentity();
                authIdentityInfo.isDirect();
                authIdentityInfo.isInherited();
                authIdentityInfo.isInOperatorsRole();
                authIdentityInfo.isInUnrestricedRole();
                authIdentityInfo.isInUserAdminsRole();
                authIdentityInfo.isNew();
            }
        }
        catch (ServiceException e)
        {
            e.printStackTrace();
        }
        catch (RemoteException e)
        {
            e.printStackTrace();
        }

  ### Example 4: Getting the PermissionInfoInterface List for a single identity

  This is an example of getting the List of PermissionInfoInterface instances for a single IdentityInterface.

        try
        {
            MetadataInterface object;  // any Services-level MetadataInterface object type will work here (your code must fill this in)
            AuthorizationUtilInterface authUtil = object.getAuthorizationUtil();
            IdentityInterface identity; // Some IdentityInterface object (probably from the List returned by Example 2.
            List <String>permissions = Collections.emptyList(); // Indicate empty list to get all applicable Permissions for the object
            List <PermissionInfoInterface>permInfoList = authUtil.getAuthorizations(identity, permissions);
            for ( PermissionInfoInterface permInfo : permInfoList )
            {
                // Example showing permission-related attributes for each returned PermissionInfoInterface instance
                permInfo.getPermission();
                permInfo.getPermissionType();
                permInfo.getPermissionSource();
                permInfo.getPermissionCondition();
            }
        }
        catch (ServiceException e)
        {
            e.printStackTrace();
        }
        catch (RemoteException e)
        {
           e.printStackTrace();
        }

  ### Example 5: Setting the PermissionInfoInterface List for a single identity

  This is an example of setting the List of PermissionInfoInterface instances for a single IdentityInterface object. Each PermissionInfoInterface instance added to the List represents the GRANT or DENY for valid Permission name. A Permission name should only be granted or denied once.

        try
        {
            MetadataInterface object;  // any Services-level MetadataInterface object type will work here (your code must fill this in)
            AuthorizationUtilInterface authUtil = object.getAuthorizationUtil();
            IdentityInterface identity;  // The IdentityInterface for which Permissions are being set.
            // GRANT ReadMetadata and DENY WriteMetdata for this Identity
            List <PermissionInfoInterface>permInfoList = new ArrayList<PermissionInfoInterface>(2);
            permInfoList.add(new PermissionInfo(PermissionType.GRANT, PermissionInfoInterface.PERMISSION_READMETADATA ));
            permInfoList.add(new PermissionInfo(PermissionType.DENY, PermissionInfoInterface.PERMISSION_WRITEMETADATA ));
            authUtil.setAuthorizations(Identity, permInfoList);
        }
        catch (ServiceException e)
        {
           e.printStackTrace();
        }
        catch (RemoteException e)
        {
           e.printStackTrace();
        }

  ### Example 6: Getting the AuthorizationInfoInterface List for multiple identities

  This is an example of getting the List of AuthorizationInfoInterface instances for more than one Identity object. Note that the return value differs from the single Identity usage in Example 4. Because AuthorizationUtilInterface.getAuthorizations() will return Permission Info for multiple Identities, it is necessary to encapsulate the PermissionInfoInterface List for each returned Identity. AuthorizationInfoInterface does exactly that.

        try
        {
            MetadataInterface object;  // any Services-level MetadataInterface object type will work here (your code must fill this in)
            AuthorizationUtilInterface authUtil = object.getAuthorizationUtil();
            List <IdentityInterface>identities; // A List of Identity objects (probably from the List returned by Example 2.)
            List <String>permissions = Collections.emptyList(); // Indicate empty list to get all applicable Permissions for the object
            List <AuthorizationInfoInterface>authInfoList = authUtil.getAuthorizations(identities, permissions);
        }
        catch (ServiceException e)
        {
            e.printStackTrace();
        }
        catch (RemoteException e)
        {
           e.printStackTrace();
        }

  ### Example 7: Setting the AuthorizationInfoInterface List for multiple identities

  This is an example of invoking AuthorizationUtilInterface.setAuthorizations() with a List of AuthorizationInfoInterface instances that represent permissions set for multiple IdentityInterface objects.

        try
        {
            MetadataInterface object;  // any Services-level MetadataInterface object type will work here (your code must fill this in)
            AuthorizationUtilInterface authUtil = object.getAuthorizationUtil();

            // Instance a List to contain MdAuthorizationInfo instances created below
            List <AuthorizationInfoInterface>authInfoList = new ArrayList<AuthorizationInfoInterface>(2);

            IdentityInterface identity1;  // The first IdentityInterface for which permissions are being set (your code must set this Identity object value)
            List <MdPermissionInfo>permInfoList1 = new ArrayList<MdPermissionInfo>(2);
            permInfoList1.add(new PermissionInfo(PermissionType.GRANT, PermissionInfoInterface.PERMISSION_READMETADATA ));
            permInfoList1.add(new PermissionInfoInterfaceImpl(PermissionType.DENY, PermissionInfoInterface.PERMISSION_WRITEMETADATA ));
            authInfoList.add(new AuthorizationInfo(identity1, permInfoList1);

            IdentityInterface identity2;  // The second IdentityInterface for which permissions are being set (your code must set this Identity object value)
            List <PermissionInfoInterface>permInfoList2 = new ArrayList<PermissionInfoInterface>(3);
            permInfoList2.add(new PermissionInfo(PermissionType.DENY, PermissionInfoInterface.PERMISSION_READ ));
            permInfoList2.add(new PermissionInfo(PermissionType.DENY, PermissionInfoInterface.PERMISSION_WRITE ));
            permInfoList2.add(new PermissionInfo(PermissionType.DENY, PermissionInfoInterface.PERMISSION_DELETE ));
            authInfoList.add(new AuthorizationInfo(identity2, permInfoList2);

            IdentityInterface identity3;  // The third IdentityInterface for which permissions are being set (your code must set this Identity object value)
            List <PermissionInfoInterface>permInfoList3 = new ArrayList<PermissionInfoInterface>(4);
            permInfoList3.add(new PermissionInfo(PermissionType.GRANT, PermissionInfoInterface.PERMISSION_CHECKINMETADATA ));
            permInfoList3.add(new PermissionInfo(PermissionType.GRANT, PermissionInfoInterface.PERMISSION_CREATE ));
            permInfoList3.add(new PermissionInfo(PermissionType.GRANT, PermissionInfoInterface.PERMISSION_ADMINISTER ));
            permInfoList3.add(new PermissionInfo(PermissionType.DENY, PermissionInfoInterface.PERMISSION_DELETE ));
            authInfoList.add(new AuthorizationInfo(identity3, permInfoList3);

            authUtil.setAuthorizations(authInfoList);
        }
        catch (ServiceException e)
        {
            e.printStackTrace();
        }
        catch (RemoteException e)
        {
            e.printStackTrace();
        }

  ### Example 8: Getting the AuthorizationExplainedInfoInterface List for a single identity with permissions specified

  This is an example of getting the List of AuthorizationExplainedInfoInterface instances for a single IdentityInterface and two specified permissions.

        try
        {
            MetadataInterface object;  // any Services-level MetadataInterface object type will work here (your code must fill this in)
            AuthorizationUtilInterface authUtil = object.getAuthorizationUtil();
            IdentityInterface identity; // Some IdentityInterface object
            List <String>permissions = new ArrayList(2); // Get an ArrayList instance for the permission strings
            permissions.add(PermissionInfoInterface.PERMISSION_READ);
            permissions.add(PermissionInfoInterface.PERMISSION_WRITE);
            List authExplainedInfoList = authUtil.getAuthorizationsExplained(identity, permissions);
            for ( AuthorizationExplainedInfoInterface authExplainedInfo : authExplainedInfoList )
            {
                // Example showing authorization explain-related attributes for each returned AuthorizationExplainedInfoInterface
                // instance.  NOTE: IndirectPermissionInfoInterface instances can be nested to arbitrary levels
              List <PermissionExplainedInfoInterface> permExplainedInfoList =
                    authExplainedInfo.getPermissionExplainedInfoList();
                for ( PermissionExplainedInfoInterface permExplainedInfo : permExplainedInfoList )
                {
                    List <IndirectPermissionInfoInterface> indirectPermInfoList1 =
                        permExplainedInfo.getIndirectPermissionInfo();
                    // NOTE:  Concentric loops demonstrate nesting of Indirect Permission level information
                    //        A common scenario represents a Permission for an Identity where the Identity
                    //        member in a Group.  The permission is set on the Group via an ACT applied to
                    //        an Inheritance parent.  IndirectPermissionInfoInterface represent this info
                    //        with nesting the following levels:
                    //            level 1 : Inheritance Parent
                    //               level 2 : Group
                    //                  level 3 : AccessControlTemplate
                    if (indirectPermInfoList1 != null)
                    {
                        for ( IndirectPermissionInfoInterface ndirPermInfo : indirectPermInfoList1 )
                        {
                            List <IndirectPermissionInfoInterface> indirectPermInfoList2 =
                                permExplainedInfo.getIndirectPermissionInfo();
                            if (indirectPermInfoList2 != null)
                            {
                                for ( IndirectPermissionInfoInterface ndirPermInfo2 : indirectPermInfoList2 )
                                      // nesting could continue
                            }
                        }
                    }
                }
            }
        }
        catch (ServiceException e)
        {
           e.printStackTrace();
        }
        catch (RemoteException e)
        {
           e.printStackTrace();
        }

  ### Example 9: Getting the AuthorizationExplainedInfoInterface List for multiple identities with permissions specified

  This is an example of getting the List of AuthorizationExplainedInfoInterface instances for a single IdentityInterface and three specified permissions.

        try
        {
            MetadataInterface object;  // any Services-level MetadataInterface object type will work here (your code must fill this in)
            AuthorizationUtilInterface authUtil = object.getAuthorizationUtil();
            List <IdentityInterface>identities; // A List of Identity objects (probably from the List returned by Example 2.)
            List <String>permissions = new ArrayList(3); // Get an ArrayList instance for the permission strings
            permissions.add(PermissionInfoInterface.PERMISSION_CREATETABLE);
            permissions.add(PermissionInfoInterface.PERMISSION_ALTERTABLE);
            permissions.add(PermissionInfoInterface.PERMISSION_ADMINISTER);
            List <AuthorizationExplainedInfoInterface>authInfoList = authUtil.getAuthorizationsExplained(identities, permissions);
        }
        catch (ServiceException e)
        {
            e.printStackTrace();
        }
        catch (RemoteException e)
        {
            e.printStackTrace();
        }

  ### Example 10: Getting the AuthorizationExplainedInfoInterface List for All identities and permissions

  This is an example of getting the List of AuthorizationExplainedInfoInterface instances for All identities and permissions.

        try
        {
            MetadataInterface object;  // any Services-level MetadataInterface object type will work here (your code must fill this in)
            AuthorizationUtilInterface authUtil = object.getAuthorizationUtil();
            List <AuthorizationExplainedInfoInterface>authInfoList = authUtil.getAuthorizationsExplainedAll();
        }
        catch (ServiceException e)
        {
            e.printStackTrace();
        }
        catch (RemoteException e)
        {
            e.printStackTrace();
        }

  ### Example 11: Getting the List of AccessControlTemplateInterface instances that protect an object

  This is an example of getting the List of AccessControlTemplateInterface instances for a MetadataInterface object.

        try
        {
            MetadataInterface object;  // any Services-level MetadataInterface object type will work here (your code must fill this in)
            AuthorizationUtilInterface authUtil = object.getAuthorizationUtil();
            List <AccessControlTemplateInterface>authInfoList = authUtil.getACTs();
        }
        catch (ServiceException e)
        {
            e.printStackTrace();
        }
        catch (RemoteException e)
        {
            e.printStackTrace();
        }

  ### Example 12: Setting an AccessControlTemplateInterface to protect an object

  This is an example of setting an AccessControlTemplateInterface on a MetadataInterface object so that all authorizations defined in the AccessControlTemplate are applied to this object. If the AccessControlTemplate definition is changed this will be reflected in all of the MetadataInterface objects that it protects.

        try
        {
            MetadataInterface object;  // any Services-level MetadataInterface object type will work here (your code must fill this in)
            AuthorizationUtilInterface authUtil = object.getAuthorizationUtil();
            authUtil.applyACT();
        }
        catch (ServiceException e)
        {
            e.printStackTrace();
        }
        catch (RemoteException e)
        {
            e.printStackTrace();
        }

  ### Example 13: Removing an AccessControlTemplateInterface from protecting an object

  This is an example of removing an AccessControlTemplateInterface so it no longer protects the MetadataInterface object that the AuthorizationUtilInterface was obtained for. This removal only effects the specified MetadataInterface instance and does not impact any other objects protected by the AccessControlTemplate.

        try
        {
            MetadataInterface object;  // any Services-level MetadataInterface object type will work here (your code must fill this in)
            AuthorizationUtilInterface authUtil = object.getAuthorizationUtil();
            authUtil.removeACT();
        }
        catch (ServiceException e)
        {
            e.printStackTrace();
        }
        catch (RemoteException e)
        {
            e.printStackTrace();
        }

  ### Example 14: Using update() with pending authorization change

  This is an example of persisting both authorization and object-level attribute changes to the SAS Metadata Server by invoking the MetadataInterface.update() method.

        try
        {
            MetadataInterface object;  // any Services-level MetadataInterface object type will work here (your code must fill this in)
            AccessControlTemplateInterface act; // an existing AccessControlTemplate with authorization definitions already set up
            AuthorizationUtilInterface authUtil = object.getAuthorizationUtil();

            IdentityInterface identity;  // The IdentityInterface for which permissions are being set (your code must set this Identity object value)
            List <MdPermissionInfo>permInfoList = new ArrayList<MdPermissionInfo>(1);
            permInfoList1.add(new PermissionInfo(PermissionType.GRANT, PermissionInfoInterface.PERMISSION_ADMINISTER ));

            // Perform the authorization changes on 'object'
            authUtil.setAuthorizations(identity, permInfoList);
            authUtil.applyACT(act);

            // Change an attribute in the MetadataInterface instance 'object'
            object.setDescription("Authorizations just updated");

            // This will persist both authorization and object-level attribute changes
            object.update();
        }
        catch (ServiceException e)
        {
            e.printStackTrace();
        }
        catch (RemoteException e)
        {
            e.printStackTrace();
        }

  ### Example 15: Committing authorization changes

  This is an example of committing pending authorization changes for an AccessControlTemplateInterface definition change. The same sequence also applies to MetadataInterface authorization changes using an AuthorizationUtilInterface instance obtained as shown in Example 1.

        try
        {
            AccessControlTemplateInterface act; // an existing AccessControlTemplate
            AuthorizationBaseInterface authBase = act.getAuthorizationDefinitionUtil();

            IdentityInterface identity1;  // The IdentityInterface for which permissions are being set (your code must set this Identity object value)
            List <MdPermissionInfo>permInfoList = new ArrayList<MdPermissionInfo>(1);
            permInfoList1.add(new PermissionInfo(PermissionType.DENY, PermissionInfoInterface.PERMISSION_WRITE ));

            // Perform the authorization definition changes on 'act'
            authBase.setAuthorizations(identity, permInfoList);

            // This will persist authorization definition changes to the act only.  If your code has modified any attributes
            // on the AccessControlTemplateInterface then a separate update() operation is required to persist them.
            authBase.commit();
        }
        catch (ServiceException e)
        {
            e.printStackTrace();
        }
        catch (RemoteException e)
        {
            e.printStackTrace();
        }

  ### Example 16: Discarding authorization changes

  This is an example of discarding authorization changes so they are not persisted to the SAS Metadata Server.

        try
        {
            MetadataInterface object;  // any Services-level MetadataInterface object type will work here (your code must fill this in)
            AccessControlTemplateInterface act; // an existing AccessControlTemplate with authorization definitions already set up
            AuthorizationUtilInterface authUtil = object.getAuthorizationUtil();

            IdentityInterface identity;  // The IdentityInterface for which permissions are being set (your code must set this Identity object value)
            List <MdPermissionInfo>permInfoList = new ArrayList<MdPermissionInfo>(1);
            permInfoList1.add(new PermissionInfo(PermissionType.DENY, PermissionInfoInterface.PERMISSION_WRITEMETADATA ));

            // Perform the authorization changes on 'object'
            authUtil.setAuthorizations(identity, permInfoList);
            authUtil.applyACT(act);

            // This will discard authorization pending authorization changes
            // that result from the prior two authUtil calls.
            authUtil.discard();
        }
        catch (ServiceException e)
        {
            e.printStackTrace();
        }
        catch (RemoteException e)
        {
            e.printStackTrace();
        }

- Related Packages
  Package
  Description
  com.sas.services.information
  Interact with data repositories on behalf of client applications.
  com.sas.services.information.metadata.dataexplorer
  com.sas.services.information.metadata.dav
  Information Service WebDAV metadata.
  com.sas.services.information.metadata.etl
  com.sas.services.information.metadata.favorites
  Manages favorites folders and their contents.
  com.sas.services.information.metadata.lookup
  com.sas.services.information.metadata.olap
  com.sas.services.information.metadata.prompt
  Information Service prompt model.
- Class
  Description
  AbstractPropertyInterface
  AccessControlEntryInterface
  AccessControlTemplateInterface
  This is the interface for an AccessControlTemplate object.
  AllUsersIdentity
  AnalyticTableAttributes
  AnalyticTableInterface
  Application
  ApplicationFilter
  ApplicationInterface
  AssociationPropertyInterface
  Attachment
  Represents an attachment for a comment.
  AttachmentInterface
  Represents an attachment for a comment
  AttributePropertyInterface
  AuthenticatedIdentity
  AuthenticationDomainInterface
  AuthorFilter
  AuthorizationBaseInterface
  AuthorizationBase provides authorization methods common to protected Object and ACT definition usage.
  AuthorizationExplainedInfo
  AuthorizationExplainedInfoInterface
  Interface methods that return attributes from an instance of AuthorizationExplainedInfo.
  AuthorizationInfo
  AuthorizationInfoInterface
  Interface methods that set or get attributes from an instance of AuthorizationInfo.
  AuthorizationInheritanceInfo
  Implementation Methods for obtaining inheritance info for an object
  AuthorizationInheritanceInfoInterface
  Interface methods to get attributes from an instance of AuthorizationInheritanceInfoInterface.
  AuthorizationUtil
  Methods for managing authorizations on a protected object
  AuthorizationUtilInterface
  Remaining Interface methods for managing authorizations on protected objects.
  ChannelFilter
  Publishing Channel Filter.
  ChannelInterface
  This interface represents a repository neutral accessor class for an IT Channel entity in a metadata repository.
  ChannelPathFilter
  ClassifierInterface
  ColumnAttributes
  ColumnContainerInterface
  Both indexes and keys represent a somewhat similar data structure in a sense that they both are column container so it make sense to generalize the functionality around the column handling in a base interface and specialize this functionality in the respective Index and keys interfaces.
  ColumnHierarchyInterface
  ColumnInterface
  COMConnectionInterface
  Comment
  Represents a comment in a discussion thread
  CommentFilter
  Provides a mechanism to filter comments.
  CommentFilterInterface
  Provides a mechanism to filter comments.
  CommentInterface
  A comment
  ConfigurationXMLTextStoreInterface
  ConfiguredComponentInterface
  ConnectionInterface
  ConnectServerInterface
  ConnectSpawnerInterface
  Content
  Content is an example of a smartobject that surfaces content from the underlying repository entity (DAV is an example a repository where entities have content).
  ContentDestination
  The ContentDestination class is a container class that contains the content destination information for a subscriber or channel.
  ContentFilter
  ContentInterface
  Manipulation of the actual content of a Content smart object
  ContentSubscriberFilter
  Filter used to query publishing framework package subscribers.
  ContentSubscriberGroupInterface
  This is a generic interface for objects coming out of the repositories that represent groups of content subscribers.
  ContentSubscriberInterface
  Package subscriber interface.
  DatabaseCatalogInterface
  DatabaseSchemaInterface
  DataStepBatchServerInterface
  DataTableInterface
  DataTableRoleInterface
  DAVAccessControlEntry
  Represents a WebDAV Access Control Entry
  DavEvent
  A smart object that represents event data stored in a DAV repository.
  DavPerson
  DAV Smart object implementation for PersonInterface.
  DirectoryInterface
  This interface represents a repository neutral accessor class for a Directory object in a metadata repository.
  DocumentInterface
  This is a simple interface for representing documents that are coming from a metadata repository.
  EmailInterface
  EmbeddedObjectInterface
  EventInterface
  Event data is persisted as an XML document.
  EventSubscriberFilter
  Deprecated.
  EventSubscriberGroupInterface
  Deprecated.
  EventSubscriberInterface
  Deprecated.
  ExtensionInterface
  ExternalIdentityInterface
  ExternalTableInterface
  FileInterface
  FilteredFolder
  This is a generic interface for interacting with a Folder object.
  FilteredFolderInterface
  This is a generic interface for interacting with a Folder object.
  FilteredRepository
  This class represents basically the same thing as a FilteredFolder, except that it's the repository level.
  FilteredRepositoryInterface
  This class represents basically the same thing as a FilteredFolder, except that it's the repository level.
  Folder
  This class implements the FolderInterface.
  FolderAdminInterface
  The interface used for administrative functions with the SAS Folders tree.
  FolderInterface
  This is a generic interface for interacting with a Folder object.
  FolderUtil
  ForeignKeyInterface
  Represents foreign key associated with the relational table
  FtpServerInterface
  GaoIdentity
  GridApplicationInterface
  GridMonitoringServerInterface
  GridServerInterface
  GroupInterface
  This is a generic interface for objects coming out of the repositories that represent groups.
  GuidFilter
  HostInterface
  HttpServerFilter
  HttpServerInterface
  This is a generic interface for interacting with a repository entry that represents an HTTP server of some sort.
  IdentityGroupInterface
  IdentityInterface
  IdentityMembershipInterface
  Interface methods to return the membership info for an identity
  IdFilter
  This is a very specific class used to retrieve an object which the repository identifier is already known.
  IndexInterface
  Represents Index associated with Physical Table.
  IndirectPermissionInfo
  IndirectPermissionInfoInterface
  Interface methods for obtaining indirect permission info
  IndirectPermissionInfoInterface.IndirectPermissionSource
  indirect Permission source ACTSPECIFICATION : identifies the ACT that supplies the indirect permission GRPMBRSHIP : identifies the UserGroup or Role that supplies the indirect permission INHERITED : the permission comes from an inheritance parent, or Repository ACT Inheritance-specific sources: EXPLICT_ON_PARENT : permission explicitly set on inheritance parent GROUP_ON_PARENT : permission set from IdentityGroup or Role on inheritance parent ACT_ON_PARENT : permission set in ACT on inheritance parent REPOSITORY_DEFAULT_ACT : permission setting comes from Repository Default ACT
  IndirectPermissionInfoInterface.IndirectPermissionType
  indirect authorization type
  JavaBatchServerInterface
  KeyAssociationInterface
  Each Key association represents a pair of column from the foreign key defining table and the unique Key from the referring table
  KeywordFilter
  This class extends the Filter class by adding the ability to search by keyword.
  LocationInterface
  LogicalConnectServerInterface
  LogicalDataStepBatchServerInteface
  LogicalGridServerInterface
  LogicalJavaBatchServerInterface
  LogicalOSServerInterface
  LogicalServerFilter
  LogicalServerInterface
  This interface is kind of a place holder.
  LoginInterface
  This is a generic interface for interacting with a repository entry that represents a login object.
  MessageQueueFilter
  Filter that may be used to query message queues.
  MessageQueueInterface
  Message queue interface.
  Metadata
  An abstract class to represent objects that can exist in multiple types of repositories.
  MetadataBuilder<T extends MetadataInterface,J extends com.sas.metadata.remote.PrimaryType,B extends MetadataBuilder<T,J,B>>
  Abstract base class for a metadata object builder.
  MetadataInterface
  This is a generic interface for "smart" classes that bridge the gap between disparate repositories.
  MetadataNameConstraint
  Allows object types to insert an additional name constraint on objects during upgrade.
  MSMQQueueManagerInterface
  MultiHostDeployment
  Some server public types like stored process server object spawner and workspace servers currently support multiple host deployment.
  MyDocuments
  Represents the Documents folder for a person.
  MyDocumentsInterface
  MyInbox
  Represents the Inbox folder for a person.
  MyInboxInterface
  MyResults
  Represents the Inbox folder for a person.
  MyResultsInterface
  NoteInterface
  OMRDatabaseServer
  This is a smart object for database servers.
  OMRGridApplication
  OMRHadoopServer
  This is a smart object for Hadoop servers.
  OMRHost
  OMRMultiHostDeployedObject
  OMRPostgresServer
  OMRProxy
  OMRProxy
  OMRProxyList
  OMRProxyList
  OMRSAPServer
  OMRSPDSServer
  OMRTransformation
  This implementation of Transformation is only to support DM servers.
  OperatingSystemServerInterface
  OracleServerInterface
  PathFilter
  PathUrl
  This class encapsulates the SBIP formatted URL.
  PermissionExplainedInfoInterface
  Interface methods for explaining permission source info
  PermissionInfo
  PermissionInfoInterface
  Interface methods for setting or obtaining info for a specific Permission.
  PersonalRepository
  Implements the personal repository.
  PersonalRepositoryInterface
  PersonFilter
  This is a filter class to facilitate searching for Person objects in data stores.
  PersonInterface
  This is a generic interface for interacting with a repository entry that represents a person.
  PhoneNumberInterface
  PhysicalTableAttributes
  PhysicalTableFilter
  PhysicalTableInterface
  PropertyGroupInterface
  PropertyIdentity
  PropertyInterface
  This is a simple interface for representing properties that are coming from a metadata repository.
  PropertySetInterface
  PropertyValueType
  PrototypeInterface
  PrototypePropertyInterface
  ProxyInterface
  ProxyInterface
  ProxyListInterface
  ProxyListInterface
  QueryClauseInterface
  QueueManagerInterface
  ReferenceIdentity
  RelationalKeyInterface
  Represents Unique Key associated with the Relational Table.
  RelationalSchemaInterface
  RelationalTableInterface
  This interface is just a place holder for the table class hierarchy in the meta model.
  Remarks
  Represents a set of comments or discussion thread on a particular topic.
  RemarksFilter
  RemarksInterface
  Remarks are a list of comments, which forms a way of grouping comments on a related topic together.
  RepositoryMetadata
  RoleInterface
  RootFolderInterface
  SASClientConnectionInterface
  SasInProcessServerInterface
  SASLibraryInterface
  SelfIdentity
  ServerComponentInterface
  ServerContextInterface
  ServerFilter
  ServerInterface
  This is a generic interface for interacting with a repository entry that represents a server of some sort.
  ServerVirtualFolder
  Represents the Server virtual folder.
  ServiceTypeInterface
  ShareServerInterface
  SoftwareComponentAttributes
  SoftwareComponentInterface
  SPDSServerInterface
  StoredProcessReportFilter
  SubscriberDeliveryTransports
  SubscriberFilter
  SubscriberInterface
  Subscriber interface.
  TableServerInterface
  TCPIPConnectionInterface
  TextStoreInterface
  A simple interface representing TextStore objects from the metadata store.
  TransformationInterface
  This interface and its implementation exist solely to service the needs of the DM server component.
  UnauthenticatedIdentity
  VirtualFolder
  An implementation of a virtual folder.
  VirtualFolderInterface
  Interface used to model a virtual folder contained within the SAS Folders tree.
  VirtualFolderManager
  Manages and creates virtual folders within a repository's System folder.
  VirtualMetadata
  WebsphereQueueManagerInterface