Skip navigation links


oracle.iam.platformservice.api
Interface EntityPublicationService


public interface EntityPublicationService

This service class should be used to manage entity publications. It provides methods to ceate, update, delete entity-publications in the persistent store. Runtime authorization checks are based on these publications and authorization scopes of a logged-in user.

See Also:
EntityPublication, AdminRoleMembership

Method Summary
 java.util.List addEntityPublications(java.util.List entityPublications)
          Publish entity into given scopes.
 java.util.List addEntityPublications(java.util.List entityPublications, boolean publishDependentData)
          Publish entity into given scopes along with the dependent data.
 java.util.List listEntityPublicationInScope(PolicyConstants.Resources entityType, java.lang.String entityId, java.lang.String scopeId, boolean includeHierarchy, java.util.Map paramsMap)
          Returns a list of publications that publish given entity in a particular scope.
 java.util.List listEntityPublications(PolicyConstants.Resources entityType, java.lang.String entityId, java.util.Map paramsMap)
          Collates and returns a list of scopes in which an entity is published.
 java.util.List listEntityPublicationsInScope(PolicyConstants.Resources entityType, java.lang.String scopeId, java.util.Map paramsMap)
          List all the publications of an entity type in given scope
 boolean removeEntityPublications(java.util.List entityPublications)
          Remove entity publications from the scopes.
 boolean removeEntityPublications(java.util.List entityPublications, boolean unpublishDependentData)
          Removes the already published entities.
 java.util.List search(EntityPublicationSearchCriteria criteria, java.util.Map paramsMap)
          Searches for publications matching the specified SearchCriteria.
 boolean updateEntityPublications(java.util.List updatedEntityPublications)
          Update entity publications.

 

Method Detail

addEntityPublications

java.util.List addEntityPublications(java.util.List entityPublications)
Publish entity into given scopes. All entries are inserted as a single transaction.
Parameters:
entityPublications - a list of entity publications with valid entity reference and scope reference.
Returns:
List of entity publications with populated-ids that were successfully inserted. EntityPublicationException otherwise.

removeEntityPublications

boolean removeEntityPublications(java.util.List entityPublications)
Remove entity publications from the scopes. All entries are removed as a single transaction. Please Note that though remove works on publicationId, however to do the proper authorization checks it is mandatory that caller also passes entityId, entityType and scopeId as part of passed entity-publication object.
Parameters:
entityPublications - a list of entity publications to be removed.
Returns:
true if all publications were removed successful, otherwise false.

updateEntityPublications

boolean updateEntityPublications(java.util.List updatedEntityPublications)
Update entity publications. Only hierarchy flag can be updated in a publication. To change other attribtes, use add/remove methods. All entries are removed as a single transaction.
Parameters:
updatedEntityPublications - a list of entity publications to be updated.
Returns:
true if all publications were updated successful, otherwise false.

listEntityPublications

java.util.List listEntityPublications(PolicyConstants.Resources entityType,
                                      java.lang.String entityId,
                                      java.util.Map paramsMap)
Collates and returns a list of scopes in which an entity is published.
Parameters:
entityType - valid entity type, required. Currently supported are: - PolicyConstants.Resources.ROLE - for Role publishing. - PolicyConstants.Resources.APPLICATION_INSTANCE - for app-instance publishing. - PolicyConstants.Resources.IT_RESOURCE_ENTITLEMENT - For entitlement publication.
entityId - valid entity id, required
paramsMap - - Map containing the pagination & sorting parameters.
Returns:
a list of scopes in which an entity is published

listEntityPublicationsInScope

java.util.List listEntityPublicationsInScope(PolicyConstants.Resources entityType,
                                             java.lang.String scopeId,
                                             java.util.Map paramsMap)
List all the publications of an entity type in given scope
Parameters:
entityType - valid entity type, required. Currently supported are: - PolicyConstants.Resources.ROLE - for Role publishing. - PolicyConstants.Resources.APPLICATION_INSTANCE - for app-instance publishing. - PolicyConstants.Resources.IT_RESOURCE_ENTITLEMENT - For entitlement publication.
scopeId - scope for which publications are to be searched
paramsMap - - Map containing the pagination & sorting parameters.
Returns:
a list of publications in given scope for given entity type

search

java.util.List search(EntityPublicationSearchCriteria criteria,
                      java.util.Map paramsMap)
Searches for publications matching the specified SearchCriteria. For atribute names allowed in the search criteria and sort criteria Attribute enum in EntityPublication class
Parameters:
criteria - The search criteria based on which entries will be retrieved from the backend.
configParams - Parameters to further configure the search operation. There are four configuration parameters. STARTROW, ENDROW, SORTEDBY and SORTORDER.

The STARTROW and ENDROW search configuration parameters indicates which subset of the complete search result is to be fetched. These parameters are mandatory.

The SORTEDBY search configuration parameter indicates the attribute on which search result is to be sorted. This parameter is optional.

The SORTORDER configuration parameter indicates the sorting order of the result, SortOrder.ASCENDING and SortOrder.DESCENDING. This parameter is optional.

Returns:
the list of publications that matched the search criteria. This list is filtered based on the attribute and entity permissions of the logged-in User.
Throws:
AccessDeniedException - if the logged-in user does not have the required authorization.

listEntityPublicationInScope

java.util.List listEntityPublicationInScope(PolicyConstants.Resources entityType,
                                            java.lang.String entityId,
                                            java.lang.String scopeId,
                                            boolean includeHierarchy,
                                            java.util.Map paramsMap)
Returns a list of publications that publish given entity in a particular scope. If flag indicates to include publication due to scope hierarchy, then result will contain publications from the parent scopes.
Parameters:
entityType - valid entity type, required. Currently supported are: - PolicyConstants.Resources.ROLE - for Role publishing. - PolicyConstants.Resources.APPLICATION_INSTANCE - for app-instance publishing. - PolicyConstants.Resources.IT_RESOURCE_ENTITLEMENT - For entitlement publication.
entityId - valid entity id, optional
scopeId - scope for which publications are to be searched.
includeHierarchy - if true, any indirect publications through parent hierarchy are included, otherwise excluded from the result.
paramsMap - - Map containing the pagination & sorting parameters.
Returns:
a list of scopes in which an entity is published

addEntityPublications

java.util.List addEntityPublications(java.util.List entityPublications,
                                     boolean publishDependentData)
Publish entity into given scopes along with the dependent data. Please ensure that list should contain entities with same entity-type. The IDependentDataProvider interface provides the convenience methods for dependent data access. The caller of the method should ensure that IDependentDataProvider is implemented correctly. All entries are inserted as a single transaction.
Parameters:
entityPublications - a list of entity publications with valid entity reference and scope reference.
publishDependentData - - Flag to indicate if the dependent data also needs to be published.
Returns:
List of entity publications with populated-ids that were successfully inserted. EntityPublicationException otherwise.

removeEntityPublications

boolean removeEntityPublications(java.util.List entityPublications,
                                 boolean unpublishDependentData)
Removes the already published entities. The unpublished entities will no longer appear in org scoped searches. PLEASE NOTE: - Unpublishing will NOT delete the actual entity, it will only remove the availability of the entity from org scope. - Though remove works on publicationId, however to do the proper authorization checks it is mandatory that caller also passes entityId, entityType and scopeId as part of passed entity-publication object.
Parameters:
entityPublications - a list of entity publications to be removed.
unpublishDependentData - boolean parameter to determine if the dependent data also needs to be removed along with passed parent data.
Returns:
true if all publications were removed successful, otherwise false.

Skip navigation links


Copyright © 2014, Oracle and/or its affiliates. All rights reserved.