01: /*
02: * $Id: Action.java,v 1.4 2007/01/08 16:05:59 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.wss.saml.assertion.saml20.jaxb20;
28:
29: // makeing the implementation dummy for Appserver Release
30:
31: import com.sun.xml.wss.logging.LogDomainConstants;
32: import org.w3c.dom.Element;
33: import java.util.logging.Logger;
34:
35: /**
36: *This class is designed for <code>Action</code> element in SAML core assertion.
37: *The Action Element specifies an action on specified resource for which
38: *permission is sought.
39: */
40: public class Action extends
41: com.sun.xml.wss.saml.internal.saml20.jaxb20.ActionType
42: implements com.sun.xml.wss.saml.Action {
43: protected static final Logger log = Logger.getLogger(
44: LogDomainConstants.WSS_API_DOMAIN,
45: LogDomainConstants.WSS_API_DOMAIN_BUNDLE);
46:
47: /**
48: * Constructs an action element from an existing XML block.
49: *
50: * @param element representing a DOM tree element.
51: * @exception SAMLException if there is an error in the sender or in
52: * the element definition.
53: */
54: public Action(Element element) {
55: setValue(element.getLocalName());
56: setNamespace(element.getNamespaceURI());
57: }
58:
59: /**
60: * Convenience constructor of <code>Action</code>
61: * @param namespace The attribute "namespace" of
62: * <code>Action</code> element
63: * @param action A String representing an action
64: * @exception SAMLException if there is an error in the sender or in
65: * the element definition.
66: */
67: public Action(String namespace, String action) {
68: setValue(action);
69: setNamespace(namespace);
70: }
71: }
|