View Javadoc

1   /*
2    * Copyright 2009 University Corporation for Advanced Internet Development, Inc.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  
17  package org.opensaml.ws.wsaddressing.impl;
18  
19  import org.opensaml.ws.wsaddressing.AttributedUnsignedLong;
20  import org.opensaml.xml.util.AttributeMap;
21  
22  /**
23   * Implementation of {@link AttributedUnsignedLong}.
24   */
25  public class AttributedUnsignedLongImpl extends AbstractWSAddressingObject implements AttributedUnsignedLong {
26      
27      /** Element's long value. */
28      private Long value;
29      
30      /** Wildcard attributes. */
31      private AttributeMap unknownAttributes;
32  
33      /**
34       * Constructor.
35       * 
36       * @param namespaceURI The namespace of the element
37       * @param elementLocalName The local name of the element
38       * @param namespacePrefix The namespace prefix of the element
39       */
40      public AttributedUnsignedLongImpl(String namespaceURI, String elementLocalName, String namespacePrefix) {
41          super(namespaceURI, elementLocalName, namespacePrefix);
42          unknownAttributes = new AttributeMap(this);
43      }
44  
45      /** {@inheritDoc} */
46      public AttributeMap getUnknownAttributes() {
47          return unknownAttributes;
48      }
49  
50      /** {@inheritDoc} */
51      public Long getValue() {
52          return value;
53      }
54  
55      /** {@inheritDoc} */
56      public void setValue(Long newValue) {
57          value = prepareForAssignment(value, newValue);
58      }
59  
60  }