Class MongoDBBasedPolicyProviderDescriptor
- java.lang.Object
-
- org.ow2.authzforce.xmlns.pdp.ext.AbstractPdpExtension
-
- org.ow2.authzforce.xmlns.pdp.ext.AbstractPolicyProvider
-
- org.ow2.authzforce.core.pdp.testutil.ext.xmlns.MongoDBBasedPolicyProviderDescriptor
-
public class MongoDBBasedPolicyProviderDescriptor extends org.ow2.authzforce.xmlns.pdp.ext.AbstractPolicyProvider
Configuration descriptor for the policy provider module that retrieves policies (given a Policy(Set)IdReference) from documents in a MongoDB-hosted collection. The document model must correspond to JSON form: {id: $policy_ID, version: $policy_version, type: $policy_type, content: $policy_doc}, where $policy_ID must be a valid XACML 3.0 PolicyId, $policy_version a valid XACML 3.0 policy version, $policy_type either '{urn:oasis:names:tc:xacml:3.0:core:schema:wd-17}Policy' if the policy is XACML 3.0 Policy or '{urn:oasis:names:tc:xacml:3.0:core:schema:wd-17}PolicySet' if it is a XACML 3.0 PolicySet, and $policy_doc a valid XACML 3.0 Policy or PolicySet according to $policy_type. TODO: add settings to control the behavior of the client (MongoClientOptions) and its credentials (MongoCredentials).Java class for MongoDBBasedPolicyProviderDescriptor complex type.
The following schema fragment specifies the expected content contained within this class.
<complexType name="MongoDBBasedPolicyProviderDescriptor"> <complexContent> <extension base="{http://authzforce.github.io/xmlns/pdp/ext/3}AbstractPolicyProvider"> <attribute name="serverHost" use="required"> <simpleType> <restriction base="{http://www.w3.org/2001/XMLSchema}string"> <pattern value="localhost|([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6}"/> </restriction> </simpleType> </attribute> <attribute name="serverPort" use="required"> <simpleType> <restriction base="{http://www.w3.org/2001/XMLSchema}int"> <minInclusive value="1"/> <maxInclusive value="65535"/> </restriction> </simpleType> </attribute> <attribute name="dbName" use="required"> <simpleType> <restriction base="{http://www.w3.org/2001/XMLSchema}string"> <minLength value="1"/> </restriction> </simpleType> </attribute> <attribute name="collectionName" use="required"> <simpleType> <restriction base="{http://www.w3.org/2001/XMLSchema}string"> <minLength value="1"/> </restriction> </simpleType> </attribute> </extension> </complexContent> </complexType>
-
-
Field Summary
Fields Modifier and Type Field Description protected String
collectionName
protected String
dbName
protected String
serverHost
protected int
serverPort
-
Constructor Summary
Constructors Constructor Description MongoDBBasedPolicyProviderDescriptor()
Default no-arg constructorMongoDBBasedPolicyProviderDescriptor(String serverHost, int serverPort, String dbName, String collectionName)
Fully-initialising value constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getCollectionName()
Gets the value of the collectionName property.String
getDbName()
Gets the value of the dbName property.String
getServerHost()
Gets the value of the serverHost property.int
getServerPort()
Gets the value of the serverPort property.void
setCollectionName(String value)
Sets the value of the collectionName property.void
setDbName(String value)
Sets the value of the dbName property.void
setServerHost(String value)
Sets the value of the serverHost property.void
setServerPort(int value)
Sets the value of the serverPort property.
-
-
-
Method Detail
-
getServerHost
public String getServerHost()
Gets the value of the serverHost property.- Returns:
- possible object is
String
-
setServerHost
public void setServerHost(String value)
Sets the value of the serverHost property.- Parameters:
value
- allowed object isString
-
getServerPort
public int getServerPort()
Gets the value of the serverPort property.
-
setServerPort
public void setServerPort(int value)
Sets the value of the serverPort property.
-
getDbName
public String getDbName()
Gets the value of the dbName property.- Returns:
- possible object is
String
-
setDbName
public void setDbName(String value)
Sets the value of the dbName property.- Parameters:
value
- allowed object isString
-
getCollectionName
public String getCollectionName()
Gets the value of the collectionName property.- Returns:
- possible object is
String
-
-