001: /*
002: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003: *
004: * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005: *
006: * The contents of this file are subject to the terms of either the GNU
007: * General Public License Version 2 only ("GPL") or the Common
008: * Development and Distribution License("CDDL") (collectively, the
009: * "License"). You may not use this file except in compliance with the
010: * License. You can obtain a copy of the License at
011: * http://www.netbeans.org/cddl-gplv2.html
012: * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
013: * specific language governing permissions and limitations under the
014: * License. When distributing the software, include this License Header
015: * Notice in each file and include the License file at
016: * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
017: * particular file as subject to the "Classpath" exception as provided
018: * by Sun in the GPL Version 2 section of the License file that
019: * accompanied this code. If applicable, add the following below the
020: * License Header, with the fields enclosed by brackets [] replaced by
021: * your own identifying information:
022: * "Portions Copyrighted [year] [name of copyright owner]"
023: *
024: * Contributor(s):
025: *
026: * The Original Software is NetBeans. The Initial Developer of the Original
027: * Software is Sun Microsystems, Inc. Portions Copyright 2006 Sun
028: * Microsystems, Inc. All Rights Reserved.
029: *
030: * If you wish your version of this file to be governed by only the CDDL
031: * or only the GPL Version 2, indicate your decision by adding
032: * "[Contributor] elects to include this software in this distribution
033: * under the [CDDL or GPL Version 2] license." If you do not indicate a
034: * single choice of license, a recipient has the option to distribute
035: * your version of this file under either the CDDL, the GPL Version 2 or
036: * to extend the choice of license to its licensees as provided above.
037: * However, if you add GPL Version 2 code and therefore, elected the GPL
038: * Version 2 license, then the option applies only if the new code is
039: * made subject to such option by the copyright holder.
040: */
041:
042: package org.netbeans.modules.websvc.wsitmodelext.policy.impl;
043:
044: import org.netbeans.modules.websvc.wsitmodelext.rm.FlowControl;
045: import org.netbeans.modules.websvc.wsitmodelext.rm.Ordered;
046: import org.netbeans.modules.websvc.wsitmodelext.rm.RMAssertion;
047: import org.netbeans.modules.websvc.wsitmodelext.security.Wss10;
048: import org.netbeans.modules.websvc.wsitmodelext.security.Wss11;
049: import org.netbeans.modules.websvc.wsitmodelext.policy.All;
050: import org.netbeans.modules.websvc.wsitmodelext.policy.ExactlyOne;
051: import org.netbeans.modules.websvc.wsitmodelext.policy.Policy;
052: import org.netbeans.modules.websvc.wsitmodelext.policy.PolicyQName;
053: import org.netbeans.modules.websvc.wsitmodelext.policy.PolicyReference;
054: import org.netbeans.modules.xml.wsdl.model.WSDLComponent;
055: import org.netbeans.modules.xml.wsdl.model.WSDLModel;
056: import org.netbeans.modules.xml.wsdl.model.visitor.WSDLVisitor;
057: import org.w3c.dom.Element;
058:
059: import java.util.Collections;
060:
061: /**
062: *
063: * @author Martin Grebac
064: */
065: public class AllImpl extends PolicyComponentImpl implements All {
066:
067: /**
068: * Creates a new instance of AllImpl
069: */
070: public AllImpl(WSDLModel model, Element e) {
071: super (model, e);
072: }
073:
074: public AllImpl(WSDLModel model) {
075: this (model, createPrefixedElement(PolicyQName.ALL.getQName(),
076: model));
077: }
078:
079: @Override
080: public void accept(WSDLVisitor visitor) {
081: visitor.visit(this );
082: }
083:
084: public void setAll(All all) {
085: java.util.List<Class<? extends WSDLComponent>> classes = Collections
086: .emptyList();
087: setChild(All.class, ALL_PROPERTY, all, classes);
088: }
089:
090: public All getAll() {
091: return getChild(All.class);
092: }
093:
094: public void removeAll(All all) {
095: removeChild(ALL_PROPERTY, all);
096: }
097:
098: public void setExactlyOne(ExactlyOne exactlyOne) {
099: java.util.List<Class<? extends WSDLComponent>> classes = Collections
100: .emptyList();
101: setChild(ExactlyOne.class, EXACTLYONE_PROPERTY, exactlyOne,
102: classes);
103: }
104:
105: public ExactlyOne getExactlyOne() {
106: return getChild(ExactlyOne.class);
107: }
108:
109: public void removeExactlyOne(ExactlyOne exactlyOne) {
110: removeChild(EXACTLYONE_PROPERTY, exactlyOne);
111: }
112:
113: public void setPolicy(Policy policy) {
114: java.util.List<Class<? extends WSDLComponent>> classes = Collections
115: .emptyList();
116: setChild(Policy.class, POLICY_PROPERTY, policy, classes);
117: }
118:
119: public Policy getPolicy() {
120: return getChild(Policy.class);
121: }
122:
123: public void removePolicy(Policy policy) {
124: removeChild(POLICY_PROPERTY, policy);
125: }
126:
127: public void setPolicyReference(PolicyReference policyReference) {
128: java.util.List<Class<? extends WSDLComponent>> classes = Collections
129: .emptyList();
130: setChild(PolicyReference.class, POLICYREFERENCE_PROPERTY,
131: policyReference, classes);
132: }
133:
134: public PolicyReference getPolicyReference() {
135: return getChild(PolicyReference.class);
136: }
137:
138: public void removePolicyReference(PolicyReference policyReference) {
139: removeChild(POLICYREFERENCE_PROPERTY, policyReference);
140: }
141:
142: public void setRMAssertion(RMAssertion rmAssertion) {
143: java.util.List<Class<? extends WSDLComponent>> classes = Collections
144: .emptyList();
145: setChild(RMAssertion.class, RMAssertion.RMASSERTION_PROPERTY,
146: rmAssertion, classes);
147: }
148:
149: public RMAssertion getRMAssertion() {
150: return getChild(RMAssertion.class);
151: }
152:
153: public void removeRMAssertion(RMAssertion rmAssertion) {
154: removeChild(RMAssertion.RMASSERTION_PROPERTY, rmAssertion);
155: }
156:
157: public void setFlowControl(FlowControl flowControl) {
158: java.util.List<Class<? extends WSDLComponent>> classes = Collections
159: .emptyList();
160: setChild(FlowControl.class, FlowControl.FLOWCONTROL_PROPERTY,
161: flowControl, classes);
162: }
163:
164: public FlowControl getFlowControl() {
165: return getChild(FlowControl.class);
166: }
167:
168: public void removeFlowControl(FlowControl flowControl) {
169: removeChild(FlowControl.FLOWCONTROL_PROPERTY, flowControl);
170: }
171:
172: public void setOrdered(Ordered ordered) {
173: java.util.List<Class<? extends WSDLComponent>> classes = Collections
174: .emptyList();
175: setChild(Ordered.class, Ordered.ORDERED_PROPERTY, ordered,
176: classes);
177: }
178:
179: public Ordered getOrdered() {
180: return getChild(Ordered.class);
181: }
182:
183: public void removeOrdered(Ordered ordered) {
184: removeChild(Ordered.ORDERED_PROPERTY, ordered);
185: }
186:
187: public void setWss11(Wss11 wss11) {
188: java.util.List<Class<? extends WSDLComponent>> classes = Collections
189: .emptyList();
190: setChild(Wss11.class, Wss11.WSS_PROPERTY, wss11, classes);
191: }
192:
193: public Wss11 getWss11() {
194: return getChild(Wss11.class);
195: }
196:
197: public void removeWss11(Wss11 wss11) {
198: removeChild(Wss11.WSS_PROPERTY, wss11);
199: }
200:
201: public void setWss10(Wss10 wss10) {
202: java.util.List<Class<? extends WSDLComponent>> classes = Collections
203: .emptyList();
204: setChild(Wss10.class, Wss10.WSS_PROPERTY, wss10, classes);
205: }
206:
207: public Wss10 getWss10() {
208: return getChild(Wss10.class);
209: }
210:
211: public void removeWss10(Wss10 wss10) {
212: removeChild(Wss10.WSS_PROPERTY, wss10);
213: }
214: }
|