01: /**
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * 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: */package org.apache.openejb.jee;
17:
18: import javax.xml.bind.annotation.XmlAccessType;
19: import javax.xml.bind.annotation.XmlAccessorType;
20: import javax.xml.bind.annotation.XmlAttribute;
21: import javax.xml.bind.annotation.XmlElement;
22: import javax.xml.bind.annotation.XmlID;
23: import javax.xml.bind.annotation.XmlType;
24: import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
25: import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
26: import java.util.ArrayList;
27: import java.util.List;
28:
29: /**
30: * The authentication-mechanismType specifies an authentication
31: * mechanism supported by the resource adapter. Note that this
32: * support is for the resource adapter and not for the
33: * underlying EIS instance. The optional description specifies
34: * any resource adapter specific requirement for the support of
35: * security contract and authentication mechanism.
36: * <p/>
37: * Note that BasicPassword mechanism type should support the
38: * javax.resource.spi.security.PasswordCredential interface.
39: * The Kerbv5 mechanism type should support the
40: * org.ietf.jgss.GSSCredential interface or the deprecated
41: * javax.resource.spi.security.GenericCredential interface.
42: */
43: @XmlAccessorType(XmlAccessType.FIELD)
44: @XmlType(name="authentication-mechanismType",propOrder={"description","authenticationMechanismType","credentialInterface"})
45: public class AuthenticationMechanism {
46:
47: protected List<Text> description;
48: @XmlElement(name="authentication-mechanism-type",required=true)
49: protected String authenticationMechanismType;
50: @XmlElement(name="credential-interface",required=true)
51: protected String credentialInterface;
52: @XmlAttribute
53: @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
54: @XmlID
55: protected String id;
56:
57: public List<Text> getDescription() {
58: if (description == null) {
59: description = new ArrayList<Text>();
60: }
61: return this .description;
62: }
63:
64: public String getAuthenticationMechanismType() {
65: return authenticationMechanismType;
66: }
67:
68: public void setAuthenticationMechanismType(String value) {
69: this .authenticationMechanismType = value;
70: }
71:
72: public String getCredentialInterface() {
73: return credentialInterface;
74: }
75:
76: public void setCredentialInterface(String value) {
77: this .credentialInterface = value;
78: }
79:
80: public String getId() {
81: return id;
82: }
83:
84: public void setId(String value) {
85: this.id = value;
86: }
87:
88: }
|