View Javadoc

1   /*
2    * Copyright 2008 Members of the EGEE Collaboration.
3    * Copyright 2008 University Corporation for Advanced Internet Development, Inc.
4    *
5    * Licensed under the Apache License, Version 2.0 (the "License");
6    * you may not use this file except in compliance with the License.
7    * You may obtain a copy of the License at
8    *
9    *     http://www.apache.org/licenses/LICENSE-2.0
10   *
11   * Unless required by applicable law or agreed to in writing, software
12   * distributed under the License is distributed on an "AS IS" BASIS,
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   * See the License for the specific language governing permissions and
15   * limitations under the License.
16   */
17  
18  package org.opensaml.ws.wspolicy.impl;
19  
20  import java.util.List;
21  
22  import org.opensaml.ws.wspolicy.PolicyReference;
23  import org.opensaml.xml.XMLObject;
24  import org.opensaml.xml.util.AttributeMap;
25  
26  /**
27   * PolicyReferenceImpl.
28   * 
29   */
30  public class PolicyReferenceImpl extends AbstractWSPolicyObject implements PolicyReference {
31  
32      /** URI attribute value. */
33      private String uri;
34  
35      /** Digest attribute value. */
36      private String digest;
37  
38      /** DigestAlgorithm attribute value. */
39      private String digestAlgorithm;
40  
41      /** xs:anyAttribute attributes. */
42      private AttributeMap unknownAttributes;
43  
44      /**
45       * Constructor.
46       * 
47       * @param namespaceURI The namespace of the element
48       * @param elementLocalName The local name of the element
49       * @param namespacePrefix The namespace prefix of the element
50       */
51      public PolicyReferenceImpl(String namespaceURI, String elementLocalName, String namespacePrefix) {
52          super(namespaceURI, elementLocalName, namespacePrefix);
53          unknownAttributes = new AttributeMap(this);
54      }
55  
56      /** {@inheritDoc} */
57      public String getDigest() {
58          return digest;
59      }
60  
61      /** {@inheritDoc} */
62      public String getDigestAlgorithm() {
63          return digestAlgorithm;
64      }
65  
66      /** {@inheritDoc} */
67      public String getURI() {
68          return uri;
69      }
70  
71      /** {@inheritDoc} */
72      public void setDigest(String newDigest) {
73          digest = prepareForAssignment(digest, newDigest);
74      }
75  
76      /** {@inheritDoc} */
77      public void setDigestAlgorithm(String newDigestAlgorithm) {
78          digestAlgorithm = prepareForAssignment(digestAlgorithm, newDigestAlgorithm);
79      }
80  
81      /** {@inheritDoc} */
82      public void setURI(String newURI) {
83          uri = prepareForAssignment(uri, newURI);
84      }
85  
86      /** {@inheritDoc} */
87      public AttributeMap getUnknownAttributes() {
88          return unknownAttributes;
89      }
90  
91      /** {@inheritDoc} */
92      public List<XMLObject> getOrderedChildren() {
93          return null;
94      }
95  
96  }