Constructor and Description |
---|
Rule(String serviceName,
Map actions)
Constructor to create a rule object with the
service name and actions.
|
Rule(String serviceName,
String resourceName,
Map actions)
Constructor to create a rule object with the
service name, resource name and actions.
|
Rule(String ruleName,
String serviceName,
String resourceName,
Map actions)
Constructor to create a rule object with rule name,
service name, resource name and actions.
|
Modifier and Type | Method and Description |
---|---|
Set |
getActionNames()
Returns the action names that have been set for the rule.
|
Map |
getActionValues()
Returns a
Map of all action names and their
corresponding action values that have been set in the rule. |
Set |
getActionValues(String actionName)
Returns a set of action values that have been set for the
specified action name.
|
Set |
getExcludedResourceNames()
Returns the excluded resource names for which the rule should not apply.
|
String |
getName()
Returns the name assigned to the rule.
|
String |
getResourceName()
Returns the resource name for which the rule has been created.
|
Set |
getResourceNames()
Returns the resource names for which the rule has been created.
|
String |
getServiceTypeName()
Returns the service name for which the rule has been created.
|
void |
setActionValues(Map actionValues)
Sets the action names and their corresponding actions values
(or permissions) for the resource or the service.
|
void |
setExcludedResourceNames(Set excludedResourceNames)
Sets the excluded resource names for which the rule should not apply.
|
void |
setName(String ruleName)
Sets the name for the rule.
|
void |
setResourceNames(Set resourceNames)
Sets the resource names for which the rule has been created.
|
String |
toXML()
Returns an XML string representing the rule.
|
public Rule(String serviceName, String resourceName, Map actions) throws NameNotFoundException, InvalidNameException
Map
must have the action
name as key and a Set
of String
s
as its value. The action names and action values must
conform to the schema specified for the service.
Otherwise, InvalidNameException
is thrown. The parameters ruleName
and resourceName
can be null
.serviceName
- name of the service type as defined by
the service schemaresourceName
- name of the resource for the service typeactions
- map of action and action values for the resourceNameNotFoundException
- the service name provided does
not existInvalidNameException
- the resource name, action name,
or values is not validpublic Rule(String serviceName, Map actions) throws NameNotFoundException, InvalidNameException
Map
must have the action
name as it key and a Set
of String
s
as its value. The action names and action values must
conform to the schema specified for the service.
Otherwise, InvalidNameException
is thrown. The parameters ruleName
and resourceName
can be null
.serviceName
- name of the service type as defined by
the service schemaactions
- map of action and action values for the resourceNameNotFoundException
- the service name provided does
not existInvalidNameException
- the resource name, action name,
or values is not validpublic Rule(String ruleName, String serviceName, String resourceName, Map actions) throws NameNotFoundException, InvalidNameException
Map
must have the action
name as it key and a Set
of String
s
as its value. The action names and action values must
conform to the service schema.
Otherwise, InvalidNameException
is thrown. The parameters ruleName
and resourceName
can be null
.ruleName
- name of the ruleserviceName
- name of the service type as defined by
the service schemaresourceName
- name of the resource for the service typeactions
- map of action and action values for the resourceNameNotFoundException
- the service name provided does
not existInvalidNameException
- the resource name, action name,
or values is not validpublic String getName()
null
if it was not constructed with a name.public void setName(String ruleName) throws InvalidNameException
ruleName
- rule name.InvalidNameException
- if rule name is invalid.public String getServiceTypeName()
public String getResourceName()
null
. The resource name of
the rule cannot be changed once the rule is created.public Set getResourceNames()
null
. The resource name of
the rule cannot be changed once the rule is created.public void setResourceNames(Set resourceNames)
null
. The resource name of
the rule cannot be changed once the rule is created.resourceNames
- resource namepublic Set getExcludedResourceNames()
null
.public void setExcludedResourceNames(Set excludedResourceNames)
excludedResourceNames
- excluded resource namespublic Set getActionNames()
public Set getActionValues(String actionName) throws NameNotFoundException
actionName
- action name for which to compute values.NameNotFoundException
- if actions name is not
found in the rulepublic Map getActionValues()
Map
of all action names and their
corresponding action values that have been set in the rule.
The "key" of the Map
will be the action name
as a string, and its "value" will be a Set
which contains the action values as strings.public void setActionValues(Map actionValues) throws InvalidNameException
actionValues
- action names and their corresponding valuesInvalidNameException
- if action name is invalid.Copyright © 2010-2013, ForgeRock All Rights Reserved.