|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.org.LDAPAttributeHolder
This class is an LDAP (via JNDI) implementation of the attribute holding behavior. It is a read only attribute provider. Modifications to the attributes held by the LDAP server must be made directly with the server's own access tools.
The class is implemented using the javax.naming (JNDI) package from Sun. JNDI provides a generic interface to naming services. An additional package is required to provide access to a specific type of naming service, such as LDAP. In this case, another package from Sun implements the LDAP "provider" interface.
To use this class, additions to the wt.properties file are necessary. Following are some example entries for wt.properties:
# java.naming.factory.initial - Specifies the specific naming server # provider implementation that is to be used. In this case, an # LDAP provider package factory. java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory# wt.org.LDAPServices - A comma seperated list of tags which represent # specific LDAP servers. The tags are used to specify specific # server properties below. In the R1 release of Windchill, this # property is ignored. Support for multiple servers will occur # in a future release. In R1, the wt.org.LDAPServices.default # property will be used to specify a single LDAP server. wt.org.LDAPServices=wt
# wt.org.LDAPServices.default - A single tag which represents an LDAP # server. The tag will be used below to specify other server # properties. wt.org.LDAPServices.default=wt
# wt.org.<server tag>.javaNamingProviderURL - The URL of the LDAP # server specified by the <server tag>. wt.org.wt.javaNamingProviderURL=ldap://ldap.windchill.com/o=Windchill Technology,c=US
# wt.org.<server tag>.attributeMappings - A list of mappings between # client attribute names and LDAP server attribute # names. The first character is the seperator character. Entries # come in pairs. The first part of the pair is the client attribute # name, the second part of the pair is an LDAP attribute name. wt.org.wt.attributeMappings=:login:uid:email:mailalternateaddress:
NOTE:
All instances of this class are created via the WTUser
class.
Supported API: false
Extendable: false
WTUser
,
StandardAttributeHolder
,
Serialized FormField Summary | |
private static String |
CLASSNAME
Deprecated. |
private SerialDirContext |
directoryContext
Deprecated. |
private String |
distinguishedNameBase
Deprecated. |
static long |
EXTERNALIZATION_VERSION_UID
Deprecated. |
private static String |
FC_RESOURCE
Deprecated. |
private static String |
INITIAL_CONTEXT_FACTORY
Deprecated. |
private String |
javaNamingAttributeMapping
Deprecated. |
private static String |
javaNamingFactoryInitial
Deprecated. . |
private String |
javaNamingProviderTag
Deprecated. |
private String |
javaNamingProviderURL
Deprecated. |
private Hashtable |
namingAttributeMap
Deprecated. |
protected static long |
OLD_FORMAT_VERSION_UID
Deprecated. |
private static String |
RESOURCE
Deprecated. |
(package private) static long |
serialVersionUID
Deprecated. |
(package private) static boolean |
SERVER
Deprecated. |
private static boolean |
VERBOSE
Deprecated. |
Fields inherited from interface wt.method.RemoteAccess |
versionID |
Constructor Summary | |
LDAPAttributeHolder()
Deprecated. |
|
LDAPAttributeHolder(String name,
String javaNamingProviderTag)
Deprecated. |
Method Summary | |
protected Enumeration |
_getAttrNames()
Deprecated. |
protected Object |
_getSingleValue(String attr_name)
Deprecated. |
protected Enumeration |
_getValues(String attr_name)
Deprecated. |
void |
addValue(String attr_name,
Object value)
Deprecated. |
private String |
getAttributeMappings()
Deprecated. Return a string of attribute mappings from wt.properties file. |
Enumeration |
getAttrNames()
Deprecated. |
SerialDirContext |
getDirectoryContext()
Deprecated. |
protected String |
getDistinguishedNameBase()
Deprecated. |
protected String |
getJavaNamingAttributeMapping()
Deprecated. |
protected String |
getJavaNamingProviderTag()
Deprecated. |
protected String |
getJavaNamingProviderURL()
Deprecated. |
protected Hashtable |
getNamingAttributeMap()
Deprecated. |
Object |
getSingleValue(String attr_name)
Deprecated. |
Enumeration |
getValues(String attr_name)
Deprecated. |
protected SerialDirContext |
initDirectoryContext()
Deprecated. Create an LDAP naming server reference. |
protected void |
initNamingAttributeMap()
Deprecated. Convert a string of attribute mappings to a Hashtable representation. |
protected String |
mapAttributeName(String attrName)
Deprecated. Return attrName mapping as specified in the namingAttributeMap attribute Hashtable. |
static Locale |
newLocale(String preferredLanguage)
Deprecated. Given preferredLanague, return the a corresponding Locale object. |
void |
readExternal(ObjectInput input)
Deprecated. |
private void |
readMyFields(ObjectInput input)
Deprecated. |
private void |
readMyR3Fields(ObjectInput input)
Deprecated. |
private boolean |
readOldVersion(ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Deprecated. Reads the non-transient fields of this class from an external source, which is not the current version. |
protected boolean |
readVersion(LDAPAttributeHolder thisObject,
ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Deprecated. |
void |
removeAttribute(String attr_name)
Deprecated. |
void |
removeValue(String attr_name,
Object value)
Deprecated. |
void |
replaceValue(String attr_name,
Object value)
Deprecated. |
protected void |
setDirectoryContext(SerialDirContext a_DirectoryContext)
Deprecated. |
protected void |
setDistinguishedNameBase(String a_DistinguishedNameBase)
Deprecated. |
protected void |
setJavaNamingAttributeMapping(String a_JavaNamingAttributeMapping)
Deprecated. |
protected void |
setJavaNamingProviderTag(String a_JavaNamingProviderTag)
Deprecated. |
protected void |
setJavaNamingProviderURL(String a_JavaNamingProviderURL)
Deprecated. |
protected void |
setNamingAttributeMap(Hashtable a_NamingAttributeMap)
Deprecated. |
void |
setValue(String attr_name,
Object value)
Deprecated. |
private int |
sizeEnumeration(Enumeration e)
Deprecated. Returns the number of elements in an Enumeration object. |
String |
toString()
Deprecated. |
void |
updateAttributeMappings()
Deprecated. |
void |
writeExternal(ObjectOutput output)
Deprecated. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
private String distinguishedNameBase
private String javaNamingProviderURL
private static final String javaNamingFactoryInitial
private String javaNamingProviderTag
private String javaNamingAttributeMapping
private Hashtable namingAttributeMap
private SerialDirContext directoryContext
static final boolean SERVER
private static final String FC_RESOURCE
static final long serialVersionUID
public static final long EXTERNALIZATION_VERSION_UID
protected static final long OLD_FORMAT_VERSION_UID
private static boolean VERBOSE
private static String INITIAL_CONTEXT_FACTORY
Constructor Detail |
public LDAPAttributeHolder(String name, String javaNamingProviderTag) throws WTException
name
- The user login name, which is stored in the LDAP directory as the "uid".javaNamingProviderTag
- A "nickname" for an LDAP URL, as specified in wt.properties.
WTException
public LDAPAttributeHolder() throws WTException
WTException
Method Detail |
public void writeExternal(ObjectOutput output) throws IOException
writeExternal
in interface Externalizable
output
-
IOException
public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
input
-
IOException
ClassNotFoundException
protected boolean readVersion(LDAPAttributeHolder thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
thisObject
- input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
private boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
protected String getDistinguishedNameBase()
protected void setDistinguishedNameBase(String a_DistinguishedNameBase)
a_DistinguishedNameBase
- protected String getJavaNamingProviderURL()
protected void setJavaNamingProviderURL(String a_JavaNamingProviderURL)
a_JavaNamingProviderURL
- protected String getJavaNamingProviderTag()
protected void setJavaNamingProviderTag(String a_JavaNamingProviderTag)
a_JavaNamingProviderTag
- protected String getJavaNamingAttributeMapping()
protected void setJavaNamingAttributeMapping(String a_JavaNamingAttributeMapping)
a_JavaNamingAttributeMapping
- protected Hashtable getNamingAttributeMap()
protected void setNamingAttributeMap(Hashtable a_NamingAttributeMap)
a_NamingAttributeMap
- public SerialDirContext getDirectoryContext()
protected void setDirectoryContext(SerialDirContext a_DirectoryContext)
a_DirectoryContext
- public Enumeration getValues(String attr_name) throws WTException
getValues
in interface AttributeHolder
attr_name
-
WTException
protected Enumeration _getValues(String attr_name) throws WTException
attr_name
-
WTException
public Object getSingleValue(String attr_name) throws WTException
getSingleValue
in interface AttributeHolder
attr_name
-
WTException
protected Object _getSingleValue(String attr_name) throws WTException
attr_name
-
WTException
public Enumeration getAttrNames() throws WTException
Each element of the enumeration is of class String.
Supported API: false
getAttrNames
in interface AttributeHolder
WTException
protected Enumeration _getAttrNames() throws WTException
Each element of the enumeration is of class String.
Supported API: false
WTException
public void addValue(String attr_name, Object value) throws WTException
Add a new value given the attribute name. Similar to the "set" method
only that multiple values are allowed.
Supported API: false
addValue
in interface AttributeHolder
attr_name
- value
-
WTException
public void setValue(String attr_name, Object value) throws WTException
Replace object for all the current values of the attribute.
Supported API: false
setValue
in interface AttributeHolder
attr_name
- value
-
WTException
public void replaceValue(String attr_name, Object value) throws WTException
Replace object for all the current values of the attribute.
Supported API: false
replaceValue
in interface AttributeHolder
attr_name
- value
-
WTException
public void removeValue(String attr_name, Object value) throws WTException
Removes a specific value from the attribute. If the value is the
last one the attribute is removed as well.
Supported API: false
removeValue
in interface AttributeHolder
attr_name
- value
-
WTException
public void removeAttribute(String attr_name) throws WTException
Removes an attribute from the object (with all its values).
Supported API: false
removeAttribute
in interface AttributeHolder
attr_name
-
WTException
public String toString()
toString
in interface AttributeHolder
public void updateAttributeMappings() throws ExternalDirectoryException
ExternalDirectoryException
protected SerialDirContext initDirectoryContext() throws WTException
WTException
protected String mapAttributeName(String attrName)
protected void initNamingAttributeMap()
private String getAttributeMappings() throws ExternalDirectoryException
ExternalDirectoryException
private int sizeEnumeration(Enumeration e)
public static Locale newLocale(String preferredLanguage) throws ExternalDirectoryException
ExternalDirectoryException
private void readMyR3Fields(ObjectInput input) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
private void readMyFields(ObjectInput input) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |