com.adobe.livecycle.rightsmanagement.client.infomodel
Class PolicySearchFilter

java.lang.Object
  extended by com.adobe.livecycle.rightsmanagement.client.infomodel.PolicySearchFilter

public class PolicySearchFilter
extends java.lang.Object

The PolicySearchFilter class is used to specify search criteria when searching for policies.

This class provides methods for setting and retrieving the values of parameters for searching for policies by the policy owner, name, and type:

The PolicyManager.getPolicies() method uses a PolicySearchFilter object to perfom searches.


Constructor Summary
PolicySearchFilter()
           
 
Method Summary
 java.lang.String getName()
          Retrieves the value of the parameter used for searching for policies by name.
 Principal getOwner()
          Retrieves the value of the parameter used for searching for policies by owner.
 java.lang.String getPolicySetName()
          Retrieves the value of the parameter used for searching for policies by policy set name.
 java.lang.String getType()
          Retrieves the value of the parameter used for searching for policies by type.
 boolean isAsDocumentPublisher()
          Returns whether the search results include policies for which the user is the document publisher.
 boolean isIncludePrincipalAttributes()
          Returns whether the search results include detailed information about the principals for which the returned policies provide permissions.
 void setAsDocumentPublisher(boolean asDocPublisher)
          Specifies whether the search results can include policies for which the user is only a document publisher.
 void setIncludePrincipalAttributes(boolean includePrincipalAttrs)
          Specifies whether the search results include detailed information about the principals for which the returned policies provide permissions.
 void setName(java.lang.String name)
          Sets the value of the parameter used for searching for policies by name.
 void setOwner(Principal owner)
          Sets the name of an owner when searching for policies.
 void setPolicySetName(java.lang.String policySetName)
          Sets the name of the policy set to search when searching for policies.
 void setType(java.lang.String type)
          Sets the value of the parameter used for searching for policies by policy type.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PolicySearchFilter

public PolicySearchFilter()
Method Detail

getName

public java.lang.String getName()
Retrieves the value of the parameter used for searching for policies by name.

Returns:
A string value that specifies the parameter for searching by name and null if no parameter is set.
See Also:
#setName()

getPolicySetName

public java.lang.String getPolicySetName()
Retrieves the value of the parameter used for searching for policies by policy set name.

Returns:
A string value that specifies the parameter for searching by policy set name and null if no parameter was set.
See Also:
#setPolicySetName()

getOwner

public Principal getOwner()
Retrieves the value of the parameter used for searching for policies by owner.

Returns:
The Principal object used for searching policies by owner.
See Also:
#setOwner()

getType

public java.lang.String getType()
Retrieves the value of the parameter used for searching for policies by type.

Returns:
A java.lang.String that holds the policy type.
See Also:
Policy

setName

public void setName(java.lang.String name)
Sets the value of the parameter used for searching for policies by name.

You can specify all or part of the name to search for.

Parameters:
name - A java.lang.String that holds all or part of the name of the policy to search for and null if you do not want to search by name. The maximum length of the java.lang.String you can use is 25 characters or errors can occur.

setPolicySetName

public void setPolicySetName(java.lang.String policySetName)
Sets the name of the policy set to search when searching for policies. The maximum length of the java.lang.String you can use is 50 characters. You can specify all or part of the policy set name.

Parameters:
policySetName - A string value that represents the policy set name.

setOwner

public void setOwner(Principal owner)
Sets the name of an owner when searching for policies. To search for policies that any principal owns, you must use an administrator user name and password when you connect to the Rights Management service. If the Principal specified is a Policy Set Coordinator and has permission to manage the policies within the policy set, then those policies are returned as well.

Parameters:
owner - A Principal object that owns the policy to retrieve.

setType

public void setType(java.lang.String type)
             throws SDKException
Sets the value of the parameter used for searching for policies by policy type.

Parameters:
type - A string value that contains the policy type. The policy type can be either Policy.USER_POLICY or Policy.ORGANIZATIONAL_POLICY. If its a Organizational Policy, the policy set name has to be specified as well in the filter.
Throws:
SDKException - If the policy type specified in typeis not valid.
See Also:
Policy

isIncludePrincipalAttributes

public boolean isIncludePrincipalAttributes()
Returns whether the search results include detailed information about the principals for which the returned policies provide permissions.

Returns:
A boolean that holds true if the principal information is returned and false if the principal information is not returned.
See Also:
#setIncludePrincipalAttributes()

setIncludePrincipalAttributes

public void setIncludePrincipalAttributes(boolean includePrincipalAttrs)
Specifies whether the search results include detailed information about the principals for which the returned policies provide permissions. Detailed user information includes the user's full name, organization, and email address. If detailed information is not requested, then only the user identification is returned with the policy. For the LDAP server, this limited user identication is the user's distinguished name (DN).

By default, searches for policies return detailed user information about the associated principals.

Parameters:
includePrincipalAttrs - A value of true specifies detailed user information. A value of false specifies only the user identification. The default value of includePrincipalAttrs is true.

isAsDocumentPublisher

public boolean isAsDocumentPublisher()
Returns whether the search results include policies for which the user is the document publisher.

Returns:
A value of true indicates that the search results include only policies for which the user is a document publisher A value of false indicates that the search results include policies for which the user is document publisher and a Policy Set Coordinator.
See Also:
#setAsDocumentPublisher()

setAsDocumentPublisher

public void setAsDocumentPublisher(boolean asDocPublisher)
Specifies whether the search results can include policies for which the user is only a document publisher.

By default, policy searches return results for which the user is a document publisher and a Policy Set Coordinator.

Parameters:
asDocPublisher - A value of true specifies that policy searches return results for which the user is only a document publisher. A value of false specifies policy searches return results for which the user is a document publisher and a Policy Set Coordinator. The default value of includePrincipalAttrs is true.