Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Web Services Manager
11g (11.1.1)

E10689-01


oracle.wsm.policymanager.impl
Class QueryService

java.lang.Object
  extended by oracle.wsm.policymanager.impl.QueryService

All Implemented Interfaces:
IStringQueryService, IQueryService
Direct Known Subclasses:
QueryService

public class QueryService
extends Object
implements IQueryService, IStringQueryService

Nested Class Summary

 

Nested classes/interfaces inherited from interface oracle.wsm.policymanager.IQueryService
IQueryService.Attributes

 

Constructor Summary
QueryService()
          Default constructor This constructor uses declarative MDS lookup
QueryService(MDSConfig config)
          Initialize PolicyQuery with custom configuration for datasource

 

Method Summary
 boolean areTransactionsSupported()
          This methods lets you know if transactionality is supported by the backed datastore used by the policymanager.
 boolean areTransactionsSupportedAsBooleanValue()
          This methods lets you know if transactionality is supported by the backed datastore used by the policymanager.
 IAssertionTemplate getAssertionTemplate(String atName)
          Retrieves and returns an Assertiontemplate object with the supplied name
 String getAssertionTemplateAsString(String assertionTemplateName)
          Retrives and returns an Assertiontemplate object with the supplied name
 List<IAssertionTemplate> getAssertionTemplates(String atPath)
          Returns a list of all Assertion Templates stored in the datastore
 List<String> getAssertionTemplatesAsString(String path)
          Returns a list of all Assertion Templates stored in the datastore
 List<String> getAssertionTemplatesAsStringByCategory(String path, String category)
          Return a list of assertion templates belonging to a specific category
 List<String> getAssertionTemplatesAsStringByQNameAndAttachTo(QName assertionQName, String appliesTo)
          Return all Assertion Templates that contain the assertion identified by its qname (assertionQName) and attachTo.
 List<IAssertionTemplate> getAssertionTemplatesByCategory(String path, String category)
          Get a list of assertion templates matching a particular category
 List<IAssertionTemplate> getAssertionTemplatesByQNameAndAttachTo(QName assertionQName, String attachTo)
          Return all Assertion Templates that contain the assertion identified by its qname (assertionQName) and attachTo.
 IAssertionTemplate getAssertionTemplateVersion(String assertionTemplateName, long version)
          Retrieve particular version of an assertionTemplate
 String getAssertionTemplateVersionAsString(String assertionTemplateName, long version)
          Returns a particular version of an assertionTemplate
 List<IAssertionTemplate> getAssertionTemplateVersionHistory(String templateName)
          Get a list of all versions of a assertion template
 List<String> getAssertionTemplateVersionHistoryAsString(String templateName)
          Get a list of all previous version of a particular Assertion template
 IPolicyAttachment getAttachment(String attachmentName)
          Retrieve an attachment for given attachment name
 String getAttachmentAsString(String attachmentName)
          Get a policy attachment object store in the store by the passed name
 String getAttachmentAsStringByPolicyName(String policyName)
          Returns a single policy attachment - given the name of the Policy.
 IPolicyAttachment getAttachmentByPolicyName(String policyName)
          Returns a single policy attachment - given the name of the Policy.
 List<IPolicyAttachment> getAttachments(String path, String policyId)
          Search for policy attachments
 List<String> getAttachmentsAsString(String path, String policyId)
          Get all Policy Attachment objects under a particular path and matching passed ID
 List<IPolicy> getPolicies(String path)
          Returns all policies in the MDS store
 List<String> getPoliciesAsString(String path)
          Returns all policies in the Policy store
 List<String> getPoliciesAsStringByAttachTo(String path, List<String> attachToList)
          Return Policies in a specific Attachment Point
 List<String> getPoliciesAsStringByCategory(String path, String category)
          Returns a list of Policies belonging to the cateory passed
 List<String> getPoliciesAsStringByCategoryAndAttachTo(String path, String category, List<String> attachToList)
          Return a list of Policies in any of the supplied Attachment points and belonging to the passed category
 List<String> getPoliciesAsStringByID(String path, String policyID)
          Return a list of policies matching the supplied path and id This method can be use to restrict searching policies within a particular path If the complete path to a particular policy is know and only a single policy is to be fetched, the corresponding method should be used instead of this method
 List<String> getPoliciesAsStringByPolicyReferences(List<String> polRefs, boolean includeConfigs)
          Given a list of PolicyReferences returns the corresponding Policies.
 Map<String,String> getPoliciesAsStringByPolicyReferencesMap(List<String> polRefs, boolean includeConfigs)
          Given a list of PolicyReferences returns a Map of <IPolicyReference, IPolicy> if a PolicyReference is invalid then null is returned
 List<String> getPoliciesAsStringByPolicyStatus(String path, IPolicy.STATUS status)
          Return a list of Policies with supplied status
 List<String> getPoliciesAsStringForResource(String resourcePattern)
          Returns the Policies attached to a Policy Subject(Resource) identified by resourcePattern
 List<IPolicy> getPoliciesByAssertionQNameAndAttachTo(String path, QName assertionQName, String attachTo)
          Return all Policies that contain the assertion identified by its qname (assertionQName) and attachTo.
 List<IPolicy> getPoliciesByAttachTo(String path, List<String> attachToList)
          Return Policies that can be attached to specific type of Policy Subjects
 List<IPolicy> getPoliciesByCategory(String path, String category)
          Returns a list of Policies belonging to the cateory passed
 List<IPolicy> getPoliciesByCategoryAndAttachTo(String path, String category, List<String> attachToList)
          Return a list of Policies in any of the supplied Attachment points and belonging to the passed category
 List<IPolicy> getPoliciesByID(String path, String policyID)
          Return a list of policies matching the supploed path and id
 List<IPolicy> getPoliciesByPolicyReferenceList(List<IPolicyReference> polrefList)
          Given a list of policyReferences, return a list of IPolicy objects corresponding to the references
 Map<IPolicyReference,IPolicy> getPoliciesByPolicyReferenceMap(List<IPolicyReference> polrefList)
          Returns a Map of policy reference objects and the corresponding policy object that is referenced
 List<IPolicy> getPoliciesByPolicyReferences(List<IPolicyReference> polRefs, boolean includeConfigs)
          Given a list of PolicyReferences returns the corresponding Policies.
 Map<IPolicyReference,IPolicy> getPoliciesByPolicyReferencesMap(List<IPolicyReference> polRefs, boolean includeConfigs)
          Given a list of PolicyReferences returns a Map of <IPolicyReference, IPolicy> if a PolicyReference is invalid then null is returned
 Map<IPolicyReference,IPolicy> getPoliciesByPolicyReferencesMapObj(List<IPolicyReference> polRefs, boolean includeConfigs)
           
 List<IPolicy> getPoliciesByPolicyStatus(String path, IPolicy.STATUS status)
          Return a list of Policies with supplied status
 List<IPolicy> getPoliciesBySmartDigestAndAttachTo(String path, QName attrQName, String smartDigestValue, String attachTo)
          WARNING: This is an internal API - DO NOT USE.
 List<IPolicy> getPoliciesForResource(String resourcePattern)
          Given a resource pattern, returns a list of all policies that apply to the resourcePattern
 IPolicy getPolicy(String policyName)
          Get a policy for the given policy name
 IPolicy getPolicy(String policyName, boolean getConfig)
          Get a particular policy with options to include configuration information
 String getPolicyAsString(String policyName)
          Get a policy for the given policy name
 String getPolicyAsString(String policyName, boolean getConfig)
          Get a particular policy with options to include configuration information
 String getPolicyAsStringByID(String path, String policyID)
          Returns a policy corresponding to given policy path and ID This method will return a single policy with the name <path/id>.
 IPolicy getPolicyByID(String path, String policyID)
          Returns a policy corresponding to given policy name
 List<String> getPolicyReferencesAsStringForResource(String resourcePattern)
          Finds all the policies that are attached to a resource pattern
 Map<String,List<IPolicyReference>> getPolicyReferencesForResource(List<String> policySubject)
          Finds all the policy references that are attached to the policy subject
 List<IPolicyReference> getPolicyReferencesForResource(String resourcePattern)
          Get a list of policyreferences containing reference to the passed resource pattern
 IPolicy getPolicyVersion(String policyName, long version)
          Returns a IPolicy object for a given policy and particular version The method returns a null if the version/policy is not found in the datastore
 String getPolicyVersionAsString(String policyName, long version)
          Returns a particular version of a policy
 List<IPolicy> getPolicyVersionHistory(String policyName)
          Get a list of all previous version of a particular policy
 List<String> getPolicyVersionHistoryAsString(String policyName)
          Get a list of all previous version of a particular policy
 Date getStoreTimestamp()
          Get the time of the last access made to the data store
 Date getStoreTimestampAsDate()
          Returns the timestamp of the Policy store
 List<IPolicy> searchPolicies(SearchCriteria searchCriteria)
          Search policies depending on the query specified in the passed SearchCriteria
 List<String> searchPoliciesAsString(SearchCriteria searchCriteria)
          Search and return a list of policies that meet the passed search Criteria
 Map<IPolicy,List<IValidationError>> validatePolicies(List<IPolicy> policies)
          Performs Policy Validation on each policy and return the list of errors.
 Map<String,List<IValidationError>> validatePoliciesString(List<String> policyStrs)
           
 Map<IPolicySubject,List<IValidationError>> validatePolicySubjects(Map<IPolicySubject,List<IPolicyReference>> polSubjectsToValidate)
          Performs Policy Subject Validation - where each Policy Subject is represented by a IPolicySubject and the List of PolicyReference that are attached for the PolicySubject
 Map<String,List<IValidationError>> validatePolicySubjectsString(Map<String,List<String>> polSubjectsToValidate)
          Performs Policy Subject Validation - where each Policy Subject is represented by a IPolicySubject and the List of PolicyReference that are attached for the PolicySubject

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

QueryService

public QueryService()
Default constructor This constructor uses declarative MDS lookup

QueryService

public QueryService(MDSConfig config)
Initialize PolicyQuery with custom configuration for datasource
Parameters:
config - MDSConfig object containing mds information

Method Detail

getPolicy

public IPolicy getPolicy(String policyName,
                         boolean getConfig)
                  throws PolicyManagerException
Description copied from interface: IQueryService
Get a particular policy with options to include configuration information
Specified by:
getPolicy in interface IQueryService
Returns:
Throws:
PolicyManagerException

getPolicy

public IPolicy getPolicy(String policyName)
                  throws PolicyManagerException
Get a policy for the given policy name
Specified by:
getPolicy in interface IQueryService
Parameters:
policyName -
Returns:
Throws:
PolicyManagerException

getPolicyByID

public IPolicy getPolicyByID(String path,
                             String policyID)
                      throws PolicyManagerException
Returns a policy corresponding to given policy name
Specified by:
getPolicyByID in interface IQueryService
Parameters:
path -
policyID - Name of the Policy to be looked up
Returns:
Policy object corresponding to the passed policyName null is returned if passed policy name is null or empty
Throws:
PolicyManagerException

getPoliciesByID

public List<IPolicy> getPoliciesByID(String path,
                                     String policyID)
                              throws PolicyManagerException
Return a list of policies matching the supploed path and id
Specified by:
getPoliciesByID in interface IQueryService
Parameters:
path -
policyID -
Returns:
Throws:
PolicyManagerException
See Also:
IQueryService.getPolicyByID(String path, String policyID)

getPoliciesByPolicyReferenceList

public List<IPolicy> getPoliciesByPolicyReferenceList(List<IPolicyReference> polrefList)
                                               throws PolicyManagerException
Given a list of policyReferences, return a list of IPolicy objects corresponding to the references
Parameters:
polrefList - List of IPolicyReference objects
Returns:
IPolicyList
Throws:
PolicyManagerException

getPoliciesByPolicyReferences

public List<IPolicy> getPoliciesByPolicyReferences(List<IPolicyReference> polRefs,
                                                   boolean includeConfigs)
                                            throws PolicyManagerException
Description copied from interface: IQueryService
Given a list of PolicyReferences returns the corresponding Policies. an Invalid PolicyReference results in an exception
Specified by:
getPoliciesByPolicyReferences in interface IQueryService
Parameters:
polRefs - - List of IPolicyReference
Returns:
Throws:
PolicyManagerException

getPoliciesByPolicyReferenceMap

public Map<IPolicyReference,IPolicy> getPoliciesByPolicyReferenceMap(List<IPolicyReference> polrefList)
                                                              throws PolicyManagerException
Returns a Map of policy reference objects and the corresponding policy object that is referenced
Parameters:
polrefList -
Returns:
Throws:
PolicyManagerException

getPolicies

public List<IPolicy> getPolicies(String path)
                          throws PolicyManagerException
Returns all policies in the MDS store
Specified by:
getPolicies in interface IQueryService
Parameters:
path - Path within the MDS store to restrict the search to
Returns:
A List of all policies of type IPolicy
Throws:
PolicyManagerException

getPoliciesByCategory

public List<IPolicy> getPoliciesByCategory(String path,
                                           String category)
                                    throws PolicyManagerException
Returns a list of Policies belonging to the cateory passed
Specified by:
getPoliciesByCategory in interface IQueryService
Parameters:
path -
category - The catergory to search policies on
Returns:
A List of IPolicy objects belonging to the cateogry search for
Throws:
PolicyManagerException

getPoliciesByAttachTo

public List<IPolicy> getPoliciesByAttachTo(String path,
                                           List<String> attachToList)
                                    throws PolicyManagerException
Return Policies that can be attached to specific type of Policy Subjects
Specified by:
getPoliciesByAttachTo in interface IQueryService
Parameters:
path -
attachToList - List to attachement points to look for if the list contains multiple attachTo - then a Policy that can be attached to all the Policy Subjects in the list is selected. Example: if attachToList contains binding.client.soap and binding.server.soap then all Policies that have attachTo of binding.any.soap or generic will be returned. In effect an intersection of acceptable Policy Subjects is performed!
Returns:
List of Policies in given attachement points
Throws:
PolicyManagerException

getPoliciesByCategoryAndAttachTo

public List<IPolicy> getPoliciesByCategoryAndAttachTo(String path,
                                                      String category,
                                                      List<String> attachToList)
                                               throws PolicyManagerException
Return a list of Policies in any of the supplied Attachment points and belonging to the passed category
Specified by:
getPoliciesByCategoryAndAttachTo in interface IQueryService
Parameters:
path -
category - Policy Category to search under
attachToList - List of attachment points to look at
Returns:
List of policies matching the passed criteria
Throws:
PolicyManagerException

getPoliciesBySmartDigestAndAttachTo

public List<IPolicy> getPoliciesBySmartDigestAndAttachTo(String path,
                                                         QName attrQName,
                                                         String smartDigestValue,
                                                         String attachTo)
                                                  throws PolicyManagerException
WARNING: This is an internal API - DO NOT USE. Return a list of Policies in any of the supplied Attachment points and belonging to the passed category
Parameters:
path -
attrQName - - the smartDigest attr or the oraSmartDigest attr
smartDigestValue - - the smart digest value of the Policy
attachTo - - attachTo of the policy
Returns:
List of policies matching the passed criteria
Throws:
PolicyManagerException

getPoliciesByPolicyStatus

public List<IPolicy> getPoliciesByPolicyStatus(String path,
                                               IPolicy.STATUS status)
                                        throws PolicyManagerException
Return a list of Policies with supplied status
Specified by:
getPoliciesByPolicyStatus in interface IQueryService
Parameters:
path - partition to search within
status - Policy enums tatus to lookup
Returns:
List of policies with the status value matching the passed status
Throws:
PolicyManagerException

getAssertionTemplate

public IAssertionTemplate getAssertionTemplate(String atName)
                                        throws PolicyManagerException
Retrieves and returns an Assertiontemplate object with the supplied name
Specified by:
getAssertionTemplate in interface IQueryService
Parameters:
atName - Name of the assertion Template object to be fetched
Returns:
IAssertionTemplate object matching the passed name
Throws:
PolicyManagerException

getAssertionTemplates

public List<IAssertionTemplate> getAssertionTemplates(String atPath)
                                               throws PolicyManagerException
Returns a list of all Assertion Templates stored in the datastore
Specified by:
getAssertionTemplates in interface IQueryService
Parameters:
atPath - Name of the directory from where assertiontemplates to be fetch
Returns:
List of IAssertionTemplate objects
Throws:
PolicyManagerException

getPolicyVersionHistory

public List<IPolicy> getPolicyVersionHistory(String policyName)
                                      throws PolicyManagerException
Get a list of all previous version of a particular policy
Specified by:
getPolicyVersionHistory in interface IQueryService
Parameters:
polName - Name of the policy whos versions need to be fetched
Returns:
List of IPolicies representing the versions of the search policy The list is empty if a null or empty policy name is specified If versioning support is not available (e.g. if using file base MDS) then an emtpy list will be returned
Throws:
PolicyManagerException

getAssertionTemplateVersionHistory

public List<IAssertionTemplate> getAssertionTemplateVersionHistory(String templateName)
                                                            throws PolicyManagerException
Get a list of all versions of a assertion template
Specified by:
getAssertionTemplateVersionHistory in interface IQueryService
Parameters:
templateName - Assertion template to be looked up
Returns:
AssertionTemplate list containing all versions of the passed assertion template name
Throws:
PolicyManagerException

getAssertionTemplatesByCategory

public List<IAssertionTemplate> getAssertionTemplatesByCategory(String path,
                                                                String category)
                                                         throws PolicyManagerException
Get a list of assertion templates matching a particular category
Specified by:
getAssertionTemplatesByCategory in interface IQueryService
Parameters:
path - Path to restrict the search to
category - Category to search assertion templates on
Returns:
List of IAssertionTemplate object matching the searched category
Throws:
PolicyManagerException

getPolicyVersion

public IPolicy getPolicyVersion(String policyName,
                                long version)
                         throws PolicyManagerException
Returns a IPolicy object for a given policy and particular version The method returns a null if the version/policy is not found in the datastore
Specified by:
getPolicyVersion in interface IQueryService
Parameters:
policyName - The name of the policy whose version needs to be looked up
version - Version to be retrived
Returns:
Version matching the searched version number for the passed policy
Throws:
PolicyManagerException

getAssertionTemplateVersion

public IAssertionTemplate getAssertionTemplateVersion(String assertionTemplateName,
                                                      long version)
                                               throws PolicyManagerException
Retrieve particular version of an assertionTemplate
Specified by:
getAssertionTemplateVersion in interface IQueryService
Parameters:
assertionTemplateName - Name of the assertion template
version - Version # to be retrieved
Returns:
Assertion template version requested
Throws:
PolicyManagerException

getAttachment

public IPolicyAttachment getAttachment(String attachmentName)
                                throws PolicyManagerException
Retrieve an attachment for given attachment name
Specified by:
getAttachment in interface IQueryService
Parameters:
Name - of the policy attachment to be fetched
Returns:
Query Policy Attachment
Throws:
PolicyManagerException

getAttachments

public List<IPolicyAttachment> getAttachments(String path,
                                              String policyId)
                                       throws PolicyManagerException
Search for policy attachments
Specified by:
getAttachments in interface IQueryService
Parameters:
path - Path to restrict your search to
policyId -
Returns:
Throws:
PolicyManagerException

getPoliciesForResource

public List<IPolicy> getPoliciesForResource(String resourcePattern)
                                     throws PolicyManagerException
Given a resource pattern, returns a list of all policies that apply to the resourcePattern
Specified by:
getPoliciesForResource in interface IQueryService
Parameters:
resourcePattern -
Returns:
Throws:
PolicyManagerException

getPolicyReferencesForResource

public Map<String,List<IPolicyReference>> getPolicyReferencesForResource(List<String> policySubject)
                                                                  throws PolicyManagerException
Description copied from interface: IQueryService
Finds all the policy references that are attached to the policy subject
Specified by:
getPolicyReferencesForResource in interface IStringQueryService
Specified by:
getPolicyReferencesForResource in interface IQueryService
Parameters:
policySubject - list of policysubject
Returns:
Throws:
PolicyManagerException

getPolicyReferencesForResource

public List<IPolicyReference> getPolicyReferencesForResource(String resourcePattern)
                                                      throws PolicyManagerException
Get a list of policyreferences containing reference to the passed resource pattern
Specified by:
getPolicyReferencesForResource in interface IQueryService
Parameters:
resourcePattern -
Returns:
Throws:
PolicyManagerException

getAssertionTemplatesByQNameAndAttachTo

public List<IAssertionTemplate> getAssertionTemplatesByQNameAndAttachTo(QName assertionQName,
                                                                        String attachTo)
                                                                 throws PolicyManagerException
Return all Assertion Templates that contain the assertion identified by its qname (assertionQName) and attachTo.
Specified by:
getAssertionTemplatesByQNameAndAttachTo in interface IQueryService
Parameters:
assertionQName - - cannot be null
attachTo - - can be null - in which case it is ignored completely
Returns:
Throws:
PolicyManagerException

searchPolicies

public List<IPolicy> searchPolicies(SearchCriteria searchCriteria)
                             throws PolicyManagerException
Search policies depending on the query specified in the passed SearchCriteria
Specified by:
searchPolicies in interface IQueryService
Parameters:
searchCriteria -
Returns:
Throws:
PolicyManagerException

getPoliciesByAssertionQNameAndAttachTo

public List<IPolicy> getPoliciesByAssertionQNameAndAttachTo(String path,
                                                            QName assertionQName,
                                                            String attachTo)
                                                     throws PolicyManagerException
Return all Policies that contain the assertion identified by its qname (assertionQName) and attachTo.
Parameters:
assertionQName - - cannot be null
attachTo - - can be null - in which case it is ignored completely
Returns:
Throws:
PolicyManagerException

getAttachmentByPolicyName

public IPolicyAttachment getAttachmentByPolicyName(String policyName)
                                            throws PolicyManagerException
Returns a single policy attachment - given the name of the Policy. Returns null if no policy attachment for the Policy exists.
Specified by:
getAttachmentByPolicyName in interface IQueryService
Parameters:
attachmentName - Name of the Policy attachment to be looked up
Returns:
IPolicyAttachment
Throws:
PolicyManagerException

validatePolicySubjects

public Map<IPolicySubject,List<IValidationError>> validatePolicySubjects(Map<IPolicySubject,List<IPolicyReference>> polSubjectsToValidate)
                                                                  throws PolicyManagerException
Performs Policy Subject Validation - where each Policy Subject is represented by a IPolicySubject and the List of PolicyReference that are attached for the PolicySubject
Specified by:
validatePolicySubjects in interface IQueryService
Returns:
Map<IPolicySubject, List>IValidationError>>
Throws:
PolicyManagerException

getPoliciesByPolicyReferencesMapObj

public Map<IPolicyReference,IPolicy> getPoliciesByPolicyReferencesMapObj(List<IPolicyReference> polRefs,
                                                                         boolean includeConfigs)
                                                                  throws PolicyManagerException
Throws:
PolicyManagerException

getPoliciesByPolicyReferencesMap

public Map<IPolicyReference,IPolicy> getPoliciesByPolicyReferencesMap(List<IPolicyReference> polRefs,
                                                                      boolean includeConfigs)
                                                               throws PolicyManagerException
Description copied from interface: IQueryService
Given a list of PolicyReferences returns a Map of <IPolicyReference, IPolicy> if a PolicyReference is invalid then null is returned
Specified by:
getPoliciesByPolicyReferencesMap in interface IQueryService
Parameters:
polRefs - - List of IPolicyReference
Returns:
Map
Throws:
PolicyManagerException

getAssertionTemplateAsString

public String getAssertionTemplateAsString(String assertionTemplateName)
                                    throws PolicyManagerException
Description copied from interface: IStringQueryService
Retrives and returns an Assertiontemplate object with the supplied name
Specified by:
getAssertionTemplateAsString in interface IStringQueryService
Parameters:
assertionTemplateName - Name of the assertion Template object to be fetched
Returns:
IAssertionTemplate object matching the passed name
Throws:
PolicyManagerException

getAssertionTemplateVersionAsString

public String getAssertionTemplateVersionAsString(String assertionTemplateName,
                                                  long version)
                                           throws PolicyManagerException
Description copied from interface: IStringQueryService
Returns a particular version of an assertionTemplate
Specified by:
getAssertionTemplateVersionAsString in interface IStringQueryService
Parameters:
assertionTemplateName - Name of the assertiontemplate to be look up
version - The version number to be fetched
Returns:
IAssertionTemplate object corresponding the the searched Assertion template versions
Throws:
PolicyManagerException - If the particular version or the Assertion template doesn't exist

getAssertionTemplateVersionHistoryAsString

public List<String> getAssertionTemplateVersionHistoryAsString(String templateName)
                                                        throws PolicyManagerException
Description copied from interface: IStringQueryService
Get a list of all previous version of a particular Assertion template
Specified by:
getAssertionTemplateVersionHistoryAsString in interface IStringQueryService
Parameters:
templateName - Name of the Assertion template versions of which need to be fetched
Returns:
List of IAssertionTemplate representing the versions of the search Assertion template The list is empty if a null or empty Assertion template name is specified Also, if versioning support is not available (e.g. if using file base MDS) then an emtpy list will be returned
Throws:
PolicyManagerException

getAssertionTemplatesAsString

public List<String> getAssertionTemplatesAsString(String path)
                                           throws PolicyManagerException
Description copied from interface: IStringQueryService
Returns a list of all Assertion Templates stored in the datastore
Specified by:
getAssertionTemplatesAsString in interface IStringQueryService
Parameters:
path - The path to search within the data store If path is null, the entire datastore will be searched
Returns:
List of IAssertionTemplate objects
Throws:
PolicyManagerException

getAssertionTemplatesAsStringByQNameAndAttachTo

public List<String> getAssertionTemplatesAsStringByQNameAndAttachTo(QName assertionQName,
                                                                    String appliesTo)
                                                             throws PolicyManagerException
Description copied from interface: IStringQueryService
Return all Assertion Templates that contain the assertion identified by its qname (assertionQName) and attachTo.
Specified by:
getAssertionTemplatesAsStringByQNameAndAttachTo in interface IStringQueryService
Parameters:
assertionQName - - cannot be null
Returns:
Throws:
PolicyManagerException

getAssertionTemplatesAsStringByCategory

public List<String> getAssertionTemplatesAsStringByCategory(String path,
                                                            String category)
                                                     throws PolicyManagerException
Description copied from interface: IStringQueryService
Return a list of assertion templates belonging to a specific category
Specified by:
getAssertionTemplatesAsStringByCategory in interface IStringQueryService
Parameters:
path - Path to restrict the search to
category - Category to search for
Returns:
List of Assertion templates matching the given category
Throws:
PolicyManagerException

getAttachmentAsString

public String getAttachmentAsString(String attachmentName)
                             throws PolicyManagerException
Description copied from interface: IStringQueryService
Get a policy attachment object store in the store by the passed name
Specified by:
getAttachmentAsString in interface IStringQueryService
Parameters:
attachmentName - Name of the Policy attachment to be looked up
Returns:
Query Policy Attachment
Throws:
PolicyManagerException

getAttachmentAsStringByPolicyName

public String getAttachmentAsStringByPolicyName(String policyName)
                                         throws PolicyManagerException
Description copied from interface: IStringQueryService
Returns a single policy attachment - given the name of the Policy. Returns null if no policy attachment for the Policy exists.
Specified by:
getAttachmentAsStringByPolicyName in interface IStringQueryService
Returns:
IPolicyAttachment
Throws:
PolicyManagerException

getAttachmentsAsString

public List<String> getAttachmentsAsString(String path,
                                           String policyId)
                                    throws PolicyManagerException
Description copied from interface: IStringQueryService
Get all Policy Attachment objects under a particular path and matching passed ID
Specified by:
getAttachmentsAsString in interface IStringQueryService
Returns:
Throws:
PolicyManagerException

getPoliciesAsString

public List<String> getPoliciesAsString(String path)
                                 throws PolicyManagerException
Description copied from interface: IStringQueryService
Returns all policies in the Policy store
Specified by:
getPoliciesAsString in interface IStringQueryService
Parameters:
path - The path to search within the data store If path is null, the entire datastore will be searched
Returns:
A List of all policies of type IPolicy
Throws:
PolicyManagerException

getPoliciesAsStringByAttachTo

public List<String> getPoliciesAsStringByAttachTo(String path,
                                                  List<String> attachToList)
                                           throws PolicyManagerException
Description copied from interface: IStringQueryService
Return Policies in a specific Attachment Point
Specified by:
getPoliciesAsStringByAttachTo in interface IStringQueryService
Parameters:
path - The path to search within the data store If path is null, the entire datastore will be searched
attachToList - List to attachement points to look for
Returns:
List of Policies in given attachement points
Throws:
PolicyManagerException

getPoliciesAsStringByCategory

public List<String> getPoliciesAsStringByCategory(String path,
                                                  String category)
                                           throws PolicyManagerException
Description copied from interface: IStringQueryService
Returns a list of Policies belonging to the cateory passed
Specified by:
getPoliciesAsStringByCategory in interface IStringQueryService
Parameters:
path - The path to search within the data store If path is null, the entire datastore will be searched
category - The catergory to search policies on
Returns:
A List of IPolicy objects belonging to the cateogry search for
Throws:
PolicyManagerException

getPoliciesAsStringByCategoryAndAttachTo

public List<String> getPoliciesAsStringByCategoryAndAttachTo(String path,
                                                             String category,
                                                             List<String> attachToList)
                                                      throws PolicyManagerException
Description copied from interface: IStringQueryService
Return a list of Policies in any of the supplied Attachment points and belonging to the passed category
Specified by:
getPoliciesAsStringByCategoryAndAttachTo in interface IStringQueryService
Parameters:
path - The path to search within the data store If path is null, the entire datastore will be searched
category - Policy Category to search under
attachToList - List of attachment points to look at
Returns:
List of policies matching the passed criteria
Throws:
PolicyManagerException

getPoliciesAsStringByID

public List<String> getPoliciesAsStringByID(String path,
                                            String policyID)
                                     throws PolicyManagerException
Description copied from interface: IStringQueryService
Return a list of policies matching the supplied path and id This method can be use to restrict searching policies within a particular path If the complete path to a particular policy is know and only a single policy is to be fetched, the corresponding method should be used instead of this method
Specified by:
getPoliciesAsStringByID in interface IStringQueryService
Parameters:
path - The path to search within the data store If path is null, the entire datastore will be searched
Returns:
Throws:
PolicyManagerException
See Also:
IQueryService.getPolicyByID(String path, String policyID)

getPoliciesAsStringByPolicyReferences

public List<String> getPoliciesAsStringByPolicyReferences(List<String> polRefs,
                                                          boolean includeConfigs)
                                                   throws PolicyManagerException
Description copied from interface: IStringQueryService
Given a list of PolicyReferences returns the corresponding Policies. an Invalid PolicyReference results in an exception
Specified by:
getPoliciesAsStringByPolicyReferences in interface IStringQueryService
Parameters:
polRefs - - List of IPolicyReference
Returns:
Throws:
PolicyManagerException

getPoliciesAsStringByPolicyStatus

public List<String> getPoliciesAsStringByPolicyStatus(String path,
                                                      IPolicy.STATUS status)
                                               throws PolicyManagerException
Description copied from interface: IStringQueryService
Return a list of Policies with supplied status
Specified by:
getPoliciesAsStringByPolicyStatus in interface IStringQueryService
Parameters:
path - The path to search within the data store If path is null, the entire datastore will be searched
status - Policy enums tatus to lookup
Returns:
List of policies with the status value matching the passed status
Throws:
PolicyManagerException

getPoliciesAsStringForResource

public List<String> getPoliciesAsStringForResource(String resourcePattern)
                                            throws PolicyManagerException
Description copied from interface: IStringQueryService
Returns the Policies attached to a Policy Subject(Resource) identified by resourcePattern
Specified by:
getPoliciesAsStringForResource in interface IStringQueryService
Parameters:
resourcePattern - - String representation of a Policy Subject or Resource
Returns:
List<IPolicy> - list of Policies - returns empty list if the Resource is not associated with Policies
Throws:
PolicyManagerException

getPolicyAsString

public String getPolicyAsString(String policyName)
                         throws PolicyManagerException
Description copied from interface: IStringQueryService
Get a policy for the given policy name
Specified by:
getPolicyAsString in interface IStringQueryService
Returns:
Throws:
PolicyManagerException

getPolicyAsString

public String getPolicyAsString(String policyName,
                                boolean getConfig)
                         throws PolicyManagerException
Description copied from interface: IStringQueryService
Get a particular policy with options to include configuration information
Specified by:
getPolicyAsString in interface IStringQueryService
Returns:
Throws:
PolicyManagerException

getPolicyAsStringByID

public String getPolicyAsStringByID(String path,
                                    String policyID)
                             throws PolicyManagerException
Description copied from interface: IStringQueryService
Returns a policy corresponding to given policy path and ID This method will return a single policy with the name <path/id>.
Specified by:
getPolicyAsStringByID in interface IStringQueryService
Parameters:
path - The path to search within the data store If path is null, the entire datastore will be searched
policyID - Name of the Policy to be looked up
Returns:
Policy object corresponding to the passed policyName null is returned if passed policy ID is null or empty
Throws:
PolicyManagerException

getPolicyReferencesAsStringForResource

public List<String> getPolicyReferencesAsStringForResource(String resourcePattern)
                                                    throws PolicyManagerException
Description copied from interface: IStringQueryService
Finds all the policies that are attached to a resource pattern
Specified by:
getPolicyReferencesAsStringForResource in interface IStringQueryService
Returns:
Throws:
PolicyManagerException

getPolicyVersionAsString

public String getPolicyVersionAsString(String policyName,
                                       long version)
                                throws PolicyManagerException
Description copied from interface: IStringQueryService
Returns a particular version of a policy
Specified by:
getPolicyVersionAsString in interface IStringQueryService
Parameters:
policyName - Name a policy to look up
version - The version number to be fetched
Returns:
IPolicy object corresponding the the searched policy versions
Throws:
PolicyManagerException - If the particular version or the policy doesn't exist

getPolicyVersionHistoryAsString

public List<String> getPolicyVersionHistoryAsString(String policyName)
                                             throws PolicyManagerException
Description copied from interface: IStringQueryService
Get a list of all previous version of a particular policy
Specified by:
getPolicyVersionHistoryAsString in interface IStringQueryService
Returns:
List of IPolicies representing the versions of the search policy The list is empty if a null or empty policy name is specified If versioning support is not available (e.g. if using file base MDS) then an emtpy list will be returned
Throws:
PolicyManagerException

searchPoliciesAsString

public List<String> searchPoliciesAsString(SearchCriteria searchCriteria)
                                    throws PolicyManagerException
Description copied from interface: IStringQueryService
Search and return a list of policies that meet the passed search Criteria
Specified by:
searchPoliciesAsString in interface IStringQueryService
Parameters:
searchCriteria - Condition for the search
Returns:
List of Policies meeting the search Criteria
Throws:
PolicyManagerException

validatePolicySubjectsString

public Map<String,List<IValidationError>> validatePolicySubjectsString(Map<String,List<String>> polSubjectsToValidate)
                                                                throws PolicyManagerException
Description copied from interface: IStringQueryService
Performs Policy Subject Validation - where each Policy Subject is represented by a IPolicySubject and the List of PolicyReference that are attached for the PolicySubject
Specified by:
validatePolicySubjectsString in interface IStringQueryService
Returns:
Map<IPolicySubject, List>IValidationError>>
Throws:
PolicyManagerException

getPoliciesAsStringByPolicyReferencesMap

public Map<String,String> getPoliciesAsStringByPolicyReferencesMap(List<String> polRefs,
                                                                   boolean includeConfigs)
                                                            throws PolicyManagerException
Given a list of PolicyReferences returns a Map of <IPolicyReference, IPolicy> if a PolicyReference is invalid then null is returned
Specified by:
getPoliciesAsStringByPolicyReferencesMap in interface IStringQueryService
Parameters:
polRefs - - List of IPolicyReference
includeConfigs -
Returns:
Map
Throws:
PolicyManagerException

getStoreTimestamp

public Date getStoreTimestamp()
Get the time of the last access made to the data store
Specified by:
getStoreTimestamp in interface IQueryService
Returns:
Date object representing the last time the backend datastore was accessed

getStoreTimestampAsDate

public Date getStoreTimestampAsDate()
Description copied from interface: IStringQueryService
Returns the timestamp of the Policy store
Specified by:
getStoreTimestampAsDate in interface IStringQueryService
Returns:
Timestamp of the Policy store

validatePoliciesString

public Map<String,List<IValidationError>> validatePoliciesString(List<String> policyStrs)
                                                          throws PolicyManagerException
Specified by:
validatePoliciesString in interface IStringQueryService
Throws:
PolicyManagerException

validatePolicies

public Map<IPolicy,List<IValidationError>> validatePolicies(List<IPolicy> policies)
                                                     throws PolicyManagerException
Description copied from interface: IQueryService
Performs Policy Validation on each policy and return the list of errors.
Specified by:
validatePolicies in interface IQueryService
Parameters:
policies - - List of IPolicy to be validated
Returns:
List<IValidationError>>
Throws:
PolicyManagerException

areTransactionsSupportedAsBooleanValue

public boolean areTransactionsSupportedAsBooleanValue()
                                               throws PolicyManagerException
This methods lets you know if transactionality is supported by the backed datastore used by the policymanager. This method should be consulted before making any method calls that call any APIs dealing with bulk operations (create/update/delete)
Specified by:
areTransactionsSupportedAsBooleanValue in interface IStringQueryService
Returns:
True if the back end datastore supports transactions, false otherwise
Throws:
PolicyManagerException

areTransactionsSupported

public boolean areTransactionsSupported()
                                 throws PolicyManagerException
Description copied from interface: IQueryService
This methods lets you know if transactionality is supported by the backed datastore used by the policymanager. This method should be consulted before making any method calls that call any APIs dealing with bulk operations (create/update/delete)
Specified by:
areTransactionsSupported in interface IQueryService
Returns:
True if the back end datastore supports transactions, false otherwise
Throws:
PolicyManagerException

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Web Services Manager
11g (11.1.1)

E10689-01


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