|
Foundation |
|
| |||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Interface Summary | |
---|---|
AbstractPropertyInterface | |
AccessControlEntryInterface | |
AccessControlTemplateInterface | This is the interface for an AccessControlTemplate object. |
AnalyticTableInterface | |
ApplicationInterface | |
AssociationPropertyInterface | |
AttachmentInterface | Represents an attachment for a comment |
AttributePropertyInterface | |
AuthenticationDomainInterface | |
AuthorizationBaseInterface | AuthorizationBase provides authorization methods common to protected Object and ACT definition usage. |
AuthorizationExplainedInfoInterface | Interface methods that return attributes from an instance of AuthorizationExplainedInfo. |
AuthorizationInfoInterface | Interface methods that set or get attributes from an instance of AuthorizationInfo. |
AuthorizationInheritanceInfoInterface | Interface methods to get attributes from an instance of AuthorizationInheritanceInfoInterface. |
AuthorizationUtilInterface | Remaining Interface methods for managing authorizations on protected objects. |
ChannelInterface | This interface represents a repository neutral accessor class for an IT Channel entity in a metadata repository. |
ClassifierInterface | |
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 | |
CommentFilterInterface | Provides a mechanism to filter comments. |
CommentInterface | A comment |
ConfigurationXMLTextStoreInterface | |
ConfiguredComponentInterface | |
ConnectionInterface | |
ConnectServerInterface | |
ConnectSpawnerInterface | |
ContentInterface | Manipulation of the actual content of a Content smart object |
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 | |
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. |
EventSubscriberGroupInterface | Deprecated. |
EventSubscriberInterface | Deprecated. |
ExtensionInterface | |
ExternalIdentityInterface | |
ExternalTableInterface | |
FileInterface | |
FilteredFolderInterface | This is a generic interface for interacting with a Folder object. |
FilteredRepositoryInterface | This class represents basically the same thing as a FilteredFolder, except that it's the repository level. |
FolderAdminInterface | The interface used for administrative functions with the SAS Folders tree. |
FolderInterface | This is a generic interface for interacting with a Folder object. |
ForeignKeyInterface | Represents foreign key associated with the relational table |
FtpServerInterface | |
GridApplicationInterface | |
GridMonitoringServerInterface | |
GridServerInterface | |
GroupInterface | This is a generic interface for objects coming out of the repositories that represent groups. |
HostInterface | |
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 |
IndexInterface | Represents Index associated with Physical Table. |
IndirectPermissionInfoInterface | Interface methods for obtaining indirect permission info |
JavaBatchServerInterface | |
KeyAssociationInterface | Each Key association represents a pair of column from the foreign key defining table and the unique Key from the referring table |
LocationInterface | |
LogicalConnectServerInterface | |
LogicalDataStepBatchServerInteface | |
LogicalGridServerInterface | |
LogicalJavaBatchServerInterface | |
LogicalOSServerInterface | |
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. |
MessageQueueInterface | Message queue interface. |
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. |
MyDocumentsInterface | |
MyInboxInterface | |
MyResultsInterface | |
NoteInterface | |
OperatingSystemServerInterface | |
OracleServerInterface | |
PermissionExplainedInfoInterface | Interface methods for explaining permission source info An PermissionExplainedInfo instance represents ... |
PermissionInfoInterface | Interface methods for setting or obtaining info for a specific Permission. |
PersonalRepositoryInterface | |
PersonInterface | This is a generic interface for interacting with a repository entry that represents a person. |
PhoneNumberInterface | |
PhysicalTableInterface | |
PropertyGroupInterface | |
PropertyInterface | This is a simple interface for representing properties that are coming from a metadata repository. |
PropertySetInterface | |
PrototypeInterface | |
PrototypePropertyInterface | |
ProxyInterface | ProxyInterface |
ProxyListInterface | ProxyListInterface |
QueryClauseInterface | |
QueueManagerInterface | |
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. |
RemarksInterface | Remarks are a list of comments, which forms a way of grouping comments on a related topic together. |
RoleInterface | |
RootFolderInterface | |
SASClientConnectionInterface | |
SasInProcessServerInterface | |
SASLibraryInterface | |
ServerComponentInterface | |
ServerContextInterface | |
ServerInterface | This is a generic interface for interacting with a repository entry that represents a server of some sort. |
ServiceTypeInterface | |
ShareServerInterface | |
SoftwareComponentInterface | |
SPDSServerInterface | |
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. |
VirtualFolderInterface | Interface used to model a virtual folder contained within the SAS Folders tree. |
WebsphereQueueManagerInterface |
Class Summary | |
---|---|
AllUsersIdentity | |
AnalyticTableAttributes | |
Application | |
ApplicationFilter | |
Attachment | Represents an attachment for a comment. |
AuthenticatedIdentity | |
AuthorFilter | |
AuthorizationExplainedInfo | |
AuthorizationInfo | |
AuthorizationInheritanceInfo | Implementation Methods for obtaining inheritance info for an object |
AuthorizationUtil | Methods for managing authorizations on a protected object |
ChannelFilter | Publishing Channel Filter. |
ChannelPathFilter | |
ColumnAttributes | |
Comment | Represents a comment in a discussion thread |
CommentFilter | Provides a mechanism to filter comments. |
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 | |
ContentSubscriberFilter | Filter used to query publishing framework package subscribers. |
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. |
EventSubscriberFilter | Deprecated. |
FilteredFolder | 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. |
Folder | This class implements the FolderInterface. |
FolderUtil | |
GaoIdentity | |
GuidFilter | |
HttpServerFilter | |
IdFilter | This is a very specific class used to retrieve an object which the repository identifier is already known. |
IndirectPermissionInfo | |
KeywordFilter | This class extends the Filter class by adding the ability to search by keyword. |
LogicalServerFilter | |
MessageQueueFilter | Filter that may be used to query message queues. |
Metadata | An abstract class to represent objects that can exist in multiple types of repositories. |
MetadataBuilder<T extends MetadataInterface,J extends PrimaryType,B extends MetadataBuilder<T,J,B>> | Abstract base class for a metadata object builder. |
MyDocuments | Represents the Documents folder for a person. |
MyInbox | Represents the Inbox folder for a person. |
MyResults | Represents the Inbox folder for a person. |
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. |
PathFilter | |
PathUrl | This class encapsulates the SBIP formatted URL. |
PermissionInfo | |
PersonalRepository | Implements the personal repository. |
PersonFilter | This is a filter class to facilitate searching for Person objects in data stores. |
PhysicalTableAttributes | |
PhysicalTableFilter | |
PropertyIdentity | |
ReferenceIdentity | |
Remarks | Represents a set of comments or discussion thread on a particular topic. |
RemarksFilter | |
RepositoryMetadata | |
SelfIdentity | |
ServerFilter | |
ServerVirtualFolder | Represents the Server virtual folder. |
SoftwareComponentAttributes | |
StoredProcessReportFilter | |
SubscriberDeliveryTransports | |
SubscriberFilter | |
UnauthenticatedIdentity | |
VirtualFolder | An implementation of a virtual folder. |
VirtualFolderManager | Manages and creates virtual folders within a repository's System folder. |
VirtualMetadata |
Enum Summary | |
---|---|
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 |
PropertyValueType | |
UniqueNameValidator.ValidatorContext | Type of name spaces for name validation |
Information Service metadata.
Example 1: Obtaining the AuthorizationUtilInterface for a MetadataInterface
Example 3: Getting the AuthorizationIdentityInfoInterface List for permissions set on an object
Example 4: Getting the PermissionInfoInterface List for a single identity
Example 5: Setting the PermissionInfoInterface List for a single identity
Example 6: Getting the AuthorizationInfoInterface List for multiple identities
Example 7: Setting the AuthorizationInfoInterface List for multiple identities
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
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
***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
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(); }
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(); }
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(); }
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(); }
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(); }
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(); }
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(); }
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(); }
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(); }
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(); }
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(); }
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(); }
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(); }
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(); }
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(); }
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(); }
|
Foundation |
|
| |||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |