protected PolicyAssertion() { this.data = AssertionData.createAssertionData(null); this.parameters = AssertionSet.createAssertionSet(null); }
/** * Creates generic assertionand stores the data specified in input parameters * * @param assertionData assertion creation data specifying the details of newly created assertion * @param assertionParameters collection of assertions parameters of this policy assertion. May be {@code null}. */ protected PolicyAssertion(final AssertionData assertionData, final Collection<? extends PolicyAssertion> assertionParameters) { if (assertionData == null) { this.data = AssertionData.createAssertionData(null); } else { this.data = assertionData; } this.parameters = AssertionSet.createAssertionSet(assertionParameters); }
/** * Create a policy with an MTOM assertion. * * @param model The binding element name. Used to generate a (locally) unique ID for the policy. * @return The policy. */ private Policy createMtomPolicy(final QName bindingName) { ArrayList<AssertionSet> assertionSets = new ArrayList<AssertionSet>(1); ArrayList<PolicyAssertion> assertions = new ArrayList<PolicyAssertion>(1); assertions.add(new MtomAssertion()); assertionSets.add(AssertionSet.createAssertionSet(assertions)); return Policy.createPolicy(null, bindingName.getLocalPart() + "_MTOM_Policy", assertionSets); }
/** * Create a policy with an MTOM assertion. * * @param model The binding element name. Used to generate a (locally) unique ID for the policy. * @return The policy. */ private Policy createMtomPolicy(final QName bindingName) { ArrayList<AssertionSet> assertionSets = new ArrayList<AssertionSet>(1); ArrayList<PolicyAssertion> assertions = new ArrayList<PolicyAssertion>(1); assertions.add(new MtomAssertion()); assertionSets.add(AssertionSet.createAssertionSet(assertions)); return Policy.createPolicy(null, bindingName.getLocalPart() + "_MTOM_Policy", assertionSets); }
/** * Create a policy with an MTOM assertion. * * @param model The binding element name. Used to generate a (locally) unique ID for the policy. * @return The policy. */ private Policy createMtomPolicy(final QName bindingName) { ArrayList<AssertionSet> assertionSets = new ArrayList<AssertionSet>(1); ArrayList<PolicyAssertion> assertions = new ArrayList<PolicyAssertion>(1); assertions.add(new MtomAssertion()); assertionSets.add(AssertionSet.createAssertionSet(assertions)); return Policy.createPolicy(null, bindingName.getLocalPart() + "_MTOM_Policy", assertionSets); }
/** * Creates generic assertionand stores the data specified in input parameters * * @param assertionData assertion creation data specifying the details of newly created assertion. May be {@code null}. * @param assertionParameters collection of assertions parameters of this policy assertion. May be {@code null}. * @param nestedAlternative assertion set specifying nested policy alternative. May be {@code null}. * * @deprecated Non-abstract assertion types should derive from {@link SimpleAssertion} * or {@link ComplexAssertion} instead. {@link Policy} class will not provide support for * nested policy alternatives in the future. This responsibility is delegated to * {@link ComplexAssertion} class instead. */ @Deprecated protected PolicyAssertion(final AssertionData assertionData, final Collection<? extends PolicyAssertion> assertionParameters, final AssertionSet nestedAlternative) { this.data = assertionData; if (nestedAlternative != null) { this.nestedPolicy = NestedPolicy.createNestedPolicy(nestedAlternative); } this.parameters = AssertionSet.createAssertionSet(assertionParameters); }
if (normalizedContentOptions.isEmpty()) { options.add(AssertionSet.createAssertionSet(normalizedContentBase)); } else { options.add(AssertionSet.createAssertionSet(contentOption));
AssertionData nestedAsserData = AssertionData.createAssertionData(W3CAddressingMetadataConstants.WSAM_ANONYMOUS_NESTED_ASSERTION); PolicyAssertion nestedAsser = new AddressingAssertion(nestedAsserData, null); assertions.add(new AddressingAssertion(addressingData, AssertionSet.createAssertionSet(Collections.singleton(nestedAsser)))); } else if (responses == AddressingFeature.Responses.NON_ANONYMOUS) { final AssertionData nestedAsserData = AssertionData.createAssertionData(W3CAddressingMetadataConstants.WSAM_NONANONYMOUS_NESTED_ASSERTION); PolicyAssertion nestedAsser = new AddressingAssertion(nestedAsserData, null); assertions.add(new AddressingAssertion(addressingData, AssertionSet.createAssertionSet(Collections.singleton(nestedAsser)))); } else { assertions.add(new AddressingAssertion(addressingData, AssertionSet.createAssertionSet(null))); assertions.add(new AddressingAssertion(addressingData, AssertionSet.createAssertionSet(null))); assertionSets.add(AssertionSet.createAssertionSet(assertions)); return Policy.createPolicy(null, bindingName.getLocalPart() + "_WSAM_Addressing_Policy", assertionSets);
AssertionData nestedAsserData = AssertionData.createAssertionData(W3CAddressingMetadataConstants.WSAM_ANONYMOUS_NESTED_ASSERTION); PolicyAssertion nestedAsser = new AddressingAssertion(nestedAsserData, null); assertions.add(new AddressingAssertion(addressingData, AssertionSet.createAssertionSet(Collections.singleton(nestedAsser)))); } else if (responses == AddressingFeature.Responses.NON_ANONYMOUS) { final AssertionData nestedAsserData = AssertionData.createAssertionData(W3CAddressingMetadataConstants.WSAM_NONANONYMOUS_NESTED_ASSERTION); PolicyAssertion nestedAsser = new AddressingAssertion(nestedAsserData, null); assertions.add(new AddressingAssertion(addressingData, AssertionSet.createAssertionSet(Collections.singleton(nestedAsser)))); } else { assertions.add(new AddressingAssertion(addressingData, AssertionSet.createAssertionSet(null))); assertions.add(new AddressingAssertion(addressingData, AssertionSet.createAssertionSet(null))); assertionSets.add(AssertionSet.createAssertionSet(assertions)); return Policy.createPolicy(null, bindingName.getLocalPart() + "_WSAM_Addressing_Policy", assertionSets);
AssertionData nestedAsserData = AssertionData.createAssertionData(W3CAddressingMetadataConstants.WSAM_ANONYMOUS_NESTED_ASSERTION); PolicyAssertion nestedAsser = new AddressingAssertion(nestedAsserData, null); assertions.add(new AddressingAssertion(addressingData, AssertionSet.createAssertionSet(Collections.singleton(nestedAsser)))); } else if (responses == AddressingFeature.Responses.NON_ANONYMOUS) { final AssertionData nestedAsserData = AssertionData.createAssertionData(W3CAddressingMetadataConstants.WSAM_NONANONYMOUS_NESTED_ASSERTION); PolicyAssertion nestedAsser = new AddressingAssertion(nestedAsserData, null); assertions.add(new AddressingAssertion(addressingData, AssertionSet.createAssertionSet(Collections.singleton(nestedAsser)))); } else { assertions.add(new AddressingAssertion(addressingData, AssertionSet.createAssertionSet(null))); assertions.add(new AddressingAssertion(addressingData, AssertionSet.createAssertionSet(null))); assertionSets.add(AssertionSet.createAssertionSet(assertions)); return Policy.createPolicy(null, bindingName.getLocalPart() + "_WSAM_Addressing_Policy", assertionSets);