com.orchestranetworks.schema
Interface SchemaExtensionsContext


public interface SchemaExtensionsContext

Context for specifying particular extensions to a schema.

See Also:
SchemaExtensions

Method Summary
 SchemaNode getSchemaNode()
          Returns the root node of the schema.
 void setAccessRuleOnInstance(AccessRule aRule)
          Declares that the global access to an instance of the schema may be restricted by the specified rule.
 void setAccessRuleOnNode(Path aPath, AccessRule aRule)
          Declares that the access to a node may be restricted by the specified rule.
 void setAccessRuleOnNodeAndAllDescendants(Path subTreePath, boolean includeSubTreeRoot, AccessRule aRule)
          Declares that the access to a nodes subtree may be restricted by the specified rule.
 void setAccessRuleOnOccurrence(Path aTablePath, AccessRule aRule)
          Declares that the global access to a table occurrence of the schema may be restricted by the rule specified.
 

Method Detail

getSchemaNode

public SchemaNode getSchemaNode()
Returns the root node of the schema.


setAccessRuleOnInstance

public void setAccessRuleOnInstance(AccessRule aRule)
Declares that the global access to an instance of the schema may be restricted by the specified rule.

Parameters:
aRule - specifies the rule to be assigned
See Also:
setAccessRuleOnNode(Path, AccessRule), setAccessRuleOnOccurrence(Path, AccessRule), AccessRule.getPermission(com.onwbp.adaptation.Adaptation, Session, SchemaNode)

setAccessRuleOnNode

public void setAccessRuleOnNode(Path aPath,
                                AccessRule aRule)
Declares that the access to a node may be restricted by the specified rule.

Only one rule can be associated to a node, so if a rule has been already set, it will be overridden. At runtime, the actual access permission to a node is the minimal permission of the following :

  1. node's configured right: this is the right on the adaptation node that is set or inherited via Manager tool;
  2. node's access rule: this is the right that is computed by the access rule attached to the node – as set by this method;
  3. node's instance access rule: this is the right that is computed by the access rule attached to the instance that contains the node – see setAccessRuleOnInstance(AccessRule);
  4. node's occurrence access rule: this is the right that is computed by the access rule attached to the occurrence that contains the node (if the node is in a table) – see setAccessRuleOnOccurrence(Path, AccessRule).
When a rule is not defined at some level, it is considered as AccessRule.ALWAYS_READ_WRITE.

Parameters:
aPath - the location of the node
aRule - specifies the rule to be assigned
See Also:
AccessRule.getPermission(com.onwbp.adaptation.Adaptation, Session, SchemaNode)

setAccessRuleOnNodeAndAllDescendants

public void setAccessRuleOnNodeAndAllDescendants(Path subTreePath,
                                                 boolean includeSubTreeRoot,
                                                 AccessRule aRule)
Declares that the access to a nodes subtree may be restricted by the specified rule.

Only one rule can be associated to a node, so if a rule has been already set to any node in the specified subtree, it will be overridden. Hence the order of sets is important.

Parameters:
subTreePath - specifies the root of the nodes to be assigned
includeSubTreeRoot - specifies whether the root is also assigned with the rule
aRule - specifies the rule to assigned
See Also:
setAccessRuleOnNode(Path, AccessRule), AccessRule.getPermission(com.onwbp.adaptation.Adaptation, Session, SchemaNode)

setAccessRuleOnOccurrence

public void setAccessRuleOnOccurrence(Path aTablePath,
                                      AccessRule aRule)
Declares that the global access to a table occurrence of the schema may be restricted by the rule specified.

At runtime, the actual access permission to a table occurrence is the minimal permission of the following :

  1. table's instance access rule: this is the right that is computed by the access rule attached to the instance that contains the table – see setAccessRuleOnInstance(AccessRule);
  2. node's occurrence access rule: this is the right that is computed by the access rule attached to the occurrence that contains the node – as set by this method.
When a rule is not defined at some level, it is considered as AccessRule.ALWAYS_READ_WRITE.

Parameters:
aTablePath - location of table node
aRule - specifies the rule to assign
See Also:
AccessRule.getPermission(com.onwbp.adaptation.Adaptation, Session, SchemaNode)


(report a bug)
EBX.Platform 4.8.4 [0722]
Copyright Orchestra Networks 2000-2010. All rights reserved.