01: /*
02: * $Id: OnBehalfOfImpl.java,v 1.1 2007/08/23 12:40:55 shyam_rao Exp $
03: */
04:
05: /*
06: * The contents of this file are subject to the terms
07: * of the Common Development and Distribution License
08: * (the License). You may not use this file except in
09: * compliance with the License.
10: *
11: * You can obtain a copy of the license at
12: * https://glassfish.dev.java.net/public/CDDLv1.0.html.
13: * See the License for the specific language governing
14: * permissions and limitations under the License.
15: *
16: * When distributing Covered Code, include this CDDL
17: * Header Notice in each file and include the License file
18: * at https://glassfish.dev.java.net/public/CDDLv1.0.html.
19: * If applicable, add the following below the CDDL Header,
20: * with the fields enclosed by brackets [] replaced by
21: * you own identifying information:
22: * "Portions Copyrighted [year] [name of copyright owner]"
23: *
24: * Copyright 2006 Sun Microsystems Inc. All Rights Reserved
25: */
26:
27: package com.sun.xml.ws.security.trust.impl.wssx.elements;
28:
29: //import com.sun.xml.ws.addressing.EndpointReferenceImpl;
30: import javax.xml.ws.EndpointReference;
31: import com.sun.xml.ws.security.trust.elements.str.SecurityTokenReference;
32: import com.sun.xml.ws.security.secext10.SecurityTokenReferenceType;
33: import com.sun.xml.ws.security.trust.elements.OnBehalfOf;
34: import com.sun.xml.ws.security.trust.impl.wssx.bindings.OnBehalfOfType;
35: import javax.xml.bind.JAXBElement;
36:
37: /**
38: *
39: * @author Manveen Kaur
40: */
41: public class OnBehalfOfImpl extends OnBehalfOfType implements
42: OnBehalfOf {
43:
44: private EndpointReference epr = null;
45: private SecurityTokenReference str = null;
46:
47: public OnBehalfOfImpl(OnBehalfOfType oboType) throws Exception {
48: //ToDo
49: }
50:
51: public EndpointReference getEndpointReference() {
52: return epr;
53: }
54:
55: public void setEndpointReference(EndpointReference endpointReference) {
56: epr = endpointReference;
57: // if (endpointReference != null) {
58: // JAXBElement<EndpointReferenceImpl> eprElement=
59: // (new com.sun.xml.ws.security.trust.impl.bindings.ObjectFactory()).
60: // createEndpointReference((EndpointReferenceImpl)endpointReference);
61: // setAny(eprElement);
62: // }
63: str = null;
64: }
65:
66: public void setSecurityTokenReference(SecurityTokenReference ref) {
67: str = ref;
68: if (ref != null) {
69: JAXBElement<SecurityTokenReferenceType> strElement = (new com.sun.xml.ws.security.secext10.ObjectFactory())
70: .createSecurityTokenReference((SecurityTokenReferenceType) ref);
71: setAny(strElement);
72: }
73: epr = null;
74: }
75:
76: public SecurityTokenReference getSecurityTokenReference() {
77: return str;
78: }
79:
80: }
|