final public class PolicySourceModel implements Cloneable(Code)
This class is a root of unmarshaled policy source structure. Each instance of the class contains factory method
to create new
com.sun.xml.ws.policy.sourcemodel.ModelNode instances associated with the actual model instance.
author: Marek Potociar
containsPolicyReferences() Returns a boolean value indicating whether this policy source model contains references to another policy source models.
Every source model that references other policies must be expanded before it can be translated into a Policy objects.
createPolicySourceModel(String policyId, String policyName) Factory method that creates new policy source model instance and initializes it according to parameters provided.
Parameters: policyId - local policy identifier - relative URI.
public boolean
equals(Object obj) An
Object.equals(Object obj) method override.
When child nodes are tested for equality, the parent policy source model is not considered.
Adds new policy reference to the policy source model. The method is used by
the ModelNode instances of type POLICY_REFERENCE that need to register themselves
as policy references in the model.
Parameters: node - policy reference model node to be registered as a policy referencein this model.
Returns a boolean value indicating whether this policy source model contains references to another policy source models.
Every source model that references other policies must be expanded before it can be translated into a Policy objects. See
PolicySourceModel.expand(PolicySourceModelContext) and
PolicySourceModel.isExpanded() for more details.
true or {code false} depending on whether this policy source model contains references to another policy source models.
Factory method that creates new policy source model instance and initializes it according to parameters provided.
Parameters: policyId - local policy identifier - relative URI. May be null . Parameters: policyName - global policy identifier - absolute policy expression URI. May be null . newly created policy source model instance with its name and id properly set
An
Object.equals(Object obj) method override.
When child nodes are tested for equality, the parent policy source model is not considered. Thus two different
policy source models instances may be equal based on their node content.
Expands current policy model. This means, that if this model contains any (unexpanded) policy references, then the method expands those
references by placing the content of the referneced policy source models under the policy reference nodes. This operation merely creates
a link between this and referenced policy source models. Thus any change in the referenced models will be visible wihtin this model as well.
Please, notice that the method does not check if the referenced models are already expanded nor does the method try to expand unexpanded
referenced models. This must be preformed manually within client's code. Consecutive calls of this method will have no effect.
Every source model that references other policies must be expanded before it can be translated into a Policy object. See
PolicySourceModel.isExpanded() and
PolicySourceModel.containsPolicyReferences() for more details.
Parameters: context - a policy source model context holding the set of unmarshalled policy source models within the same context.
Provides information about how namespaces used in this
PolicySourceModel instance should be mapped to thier default prefixes when marshalled.
immutable map that holds information about namespaces used in themodel and their mapping to prefixes that should be used when marshallingthis model.
Returns a string representation of the object. In general, the toString method
returns a string that "textually represents" this object.
a string representation of the object.