public class EntitlementPolicyAdminService extends Object
Constructor and Description |
---|
EntitlementPolicyAdminService() |
Modifier and Type | Method and Description |
---|---|
void |
addPolicies(PolicyDTO[] policies)
Adds XACML policies in bulk to the system.
|
void |
addPolicy(PolicyDTO policyDTO)
Add a new XACML policy in to the system.
|
void |
addSubscriber(PublisherDataHolder holder)
Add subscriber details in to registry
|
void |
deleteSubscriber(String subscriberId)
delete subscriber details from registry
|
void |
dePromotePolicy(String policyId) |
void |
enableDisablePolicy(String policyId,
boolean enable) |
PaginatedPolicySetDTO |
getAllPolicies(String policyTypeFilter,
String policySearchString,
int pageNumber,
boolean isPDPPolicy)
This method paginates policies
|
String[] |
getAllPolicyIds(String searchString)
This method returns the list of policy id available in PDP
|
EntitlementTreeNodeDTO |
getEntitlementData(String dataModule,
String category,
String regexp,
int dataLevel,
int limit) |
EntitlementFinderDataHolder[] |
getEntitlementDataModules() |
PolicyDTO |
getLightPolicy(String policyId)
Gets light weight policy DTO for given policy id
|
PolicyDTO |
getPolicy(String policyId,
boolean isPDPPolicy)
Gets policy for given policy id
|
PolicyDTO |
getPolicyByVersion(String policyId,
String version)
Gets policy for given policy id and version
|
String[] |
getPolicyVersions(String policyId) |
PublisherDataHolder[] |
getPublisherModuleData()
Gets policy publisher module data to populate in the UI
|
PaginatedStatusHolder |
getStatusData(String about,
String key,
String type,
String searchString,
int pageNumber) |
PublisherDataHolder |
getSubscriber(String subscribeId)
Gets subscriber details
|
String[] |
getSubscriberIds(String searchString)
Gets all subscribers ids that is registered,
|
void |
importPolicyFromRegistry(String policyRegistryPath)
This method finds the policy file from given registry path and adds the policy
|
void |
orderPolicy(String policyId,
int newOrder) |
void |
publish(String verificationCode)
Publishes given set of policies to all subscribers
|
void |
publishPolicies(String[] policyIds,
String[] subscriberIds,
String action,
String version,
boolean enabled,
int order)
Publishes given set of policies to all subscribers
|
void |
publishToPDP(String[] policyIds,
String action,
String version,
boolean enabled,
int order) |
void |
removePolicies(String[] policyIds,
boolean dePromote)
Removes policy for given policy object
|
void |
removePolicy(String policyId,
boolean dePromote)
Removes policy for given policy object
|
void |
rollBackPolicy(String policyId,
String version) |
void |
updatePolicy(PolicyDTO policyDTO)
Updates given policy
|
void |
updateSubscriber(PublisherDataHolder holder)
Update subscriber details in registry
|
public void addPolicy(PolicyDTO policyDTO) throws EntitlementException
policyDTO
- policy objectEntitlementException
- throwspublic void addPolicies(PolicyDTO[] policies) throws EntitlementException
policies
- Array of policies.EntitlementException
- throwspublic void importPolicyFromRegistry(String policyRegistryPath) throws EntitlementException
policyRegistryPath
- given registry pathEntitlementException
- throws when fails or registry error
occurspublic void updatePolicy(PolicyDTO policyDTO) throws EntitlementException
policyDTO
- policy objectEntitlementException
- throws if invalid policypublic PaginatedPolicySetDTO getAllPolicies(String policyTypeFilter, String policySearchString, int pageNumber, boolean isPDPPolicy) throws EntitlementException
policyTypeFilter
- policy type to filterpolicySearchString
- policy search StringpageNumber
- page numberisPDPPolicy
- whether this is a PDP policy or PAP policyEntitlementException
- throwspublic PolicyDTO getPolicy(String policyId, boolean isPDPPolicy) throws EntitlementException
policyId
- policy idisPDPPolicy
- whether policy is PDP policy or PAP policyEntitlementException
- throwspublic PolicyDTO getPolicyByVersion(String policyId, String version) throws EntitlementException
policyId
- policy idversion
- version of policyEntitlementException
- throwspublic PolicyDTO getLightPolicy(String policyId) throws EntitlementException
policyId
- policy idEntitlementException
- throwspublic void removePolicies(String[] policyIds, boolean dePromote) throws EntitlementException
policyIds
- A Array
of policy idsdePromote
- whether these policy must be removed from PDP as wellEntitlementException
- throws if failspublic void removePolicy(String policyId, boolean dePromote) throws EntitlementException
policyId
- policyIddePromote
- whether these policy must be removed from PDP as wellEntitlementException
- throwspublic String[] getAllPolicyIds(String searchString) throws EntitlementException
searchString
- search StringEntitlementException
- throwspublic PublisherDataHolder getSubscriber(String subscribeId) throws EntitlementException
subscribeId
- subscriber idEntitlementException
- throws, if any errorpublic String[] getSubscriberIds(String searchString) throws EntitlementException
searchString
- search StringEntitlementException
- throws, if failspublic void addSubscriber(PublisherDataHolder holder) throws EntitlementException
holder
- subscriber data as PublisherDataHolder objectEntitlementException
- throws, if failspublic void updateSubscriber(PublisherDataHolder holder) throws EntitlementException
holder
- subscriber data as PublisherDataHolder objectEntitlementException
- throws, if failspublic void deleteSubscriber(String subscriberId) throws EntitlementException
subscriberId
- subscriber idEntitlementException
- throws, if failspublic void publishPolicies(String[] policyIds, String[] subscriberIds, String action, String version, boolean enabled, int order) throws EntitlementException
policyIds
- policy ids to publish, if null or empty, all policies are publishedsubscriberIds
- subscriber ids to publish, if null or empty, all policies are publishedaction
- publishing actionversion
- versionenabled
- whether policy must be enabled or notorder
- order of the policyEntitlementException
- throws, if failspublic void publish(String verificationCode) throws EntitlementException
verificationCode
- verification code that is received by administrator to publishEntitlementException
- throws, if failspublic void publishToPDP(String[] policyIds, String action, String version, boolean enabled, int order) throws EntitlementException
policyIds
- EntitlementException
public void rollBackPolicy(String policyId, String version) throws EntitlementException
policyId
- version
- EntitlementException
public PaginatedStatusHolder getStatusData(String about, String key, String type, String searchString, int pageNumber) throws EntitlementException
type
- key
- EntitlementException
public PublisherDataHolder[] getPublisherModuleData()
public EntitlementTreeNodeDTO getEntitlementData(String dataModule, String category, String regexp, int dataLevel, int limit)
dataModule
- category
- regexp
- dataLevel
- limit
- public EntitlementFinderDataHolder[] getEntitlementDataModules()
public String[] getPolicyVersions(String policyId) throws EntitlementException
policyId
- EntitlementException
public void orderPolicy(String policyId, int newOrder) throws EntitlementException
EntitlementException
public void enableDisablePolicy(String policyId, boolean enable) throws EntitlementException
EntitlementException
public void dePromotePolicy(String policyId) throws EntitlementException
policyId
- EntitlementException
Copyright © 2016 WSO2. All rights reserved.