|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.infoengine.util.LDAPExport
This class will perform an LDAP Export from an LDAP directory to a ldif formatted
text file. By default the LDAP credentials and export point is derived from
the ie.properties file.
The export can be done from any branch of the LDAP directory by specifying
an LDAP uri as a parameter. Example -
ldap://<managerDn>:<managerPw>@<hostname>[:<port>]/<distinguishedName>
During export the ldif file is normalized with the base distinguished name
of the export point and can be imported in another branch of another directory.
Any attribute entry with an attribute value that contains the LDAP uri distinguished name
is normalized.
The resulting ldif file must be imported with the LDAPimport utility.
Parameters required are:
[dir] The home of Windchill installation (ex. c:\ptc\Windchill )
The value is not used if ldapurl is specified.
[ldiffile] A path relative to "dir" or the current director or an absolute path of the
ldif file to write.
[ldapurl] An ldap provider url specifying the directory and distinguished name
of the ldap branch to export to the ldif file.
This parameter is optional, if not specified, ie.properties
in the "dir" is used. Example:
ldap://cn=Manager:admin@jdmeyer03d.ptcnet.ptc.com/cn=myhost,cn=Application Services,o=ptc
[filter] An LDAP filter to limit the entries to export.
This parameter is optional.
[reldn] An LDAP relative distingusihed name used to further restrict the branch
of the LDAP tree to export.
This parameter is optional.
Dependancies: Additional dependant jar files
ie.jar servlet.jar
The command line calling sequence is:
java -cp v:\Windchill\codebase;v:\Windchill\codebase\WEB-INF\lib\ie.jar;v:\Windchill\lib\servlet.jar
com.infoengine.util.LDAPExport -dir (windchill install dir) -ldiffile file
Field Summary | |
private static String |
IEPROPS
|
private String |
ivExportFile
list of import files |
private String |
ivFilter
LDAP search filter |
private String |
ivInstallDir
Installation directory |
private String |
ivLdapUrl
LDAP url |
private String |
ivRelDn
LDAP search filter |
Constructor Summary | |
LDAPExport()
|
Method Summary | |
String |
getExportFile()
Get the current ldif import list. |
String |
getIEProperties(String wcHome)
Helper method to get the provider url from the Info*Engine install. |
String |
getInstallDir()
Get the file path to current installation directory. |
String |
getLdapUrl()
Return the current ldap url |
String |
getProvider(String wcHome)
Helper method to get the provider url from the Info*Engine install. |
String |
getRelDn()
Return the current relative dn |
static void |
main(String[] args)
Main entry point. |
void |
process(String[] args)
Called by the install framework when this action is run. |
void |
runAction()
May be called by java code to execute this action in a stand alone java environment. |
void |
setExportFile(String vals)
Set the relative or absolute paths to the ldif files to import. |
void |
setInstallDir(String val)
Set the file path to the installation directory. |
void |
setLdapUrl(String val)
Set the LDAP url |
void |
setRelDn(String val)
Set the relative dn |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String IEPROPS
private String ivInstallDir
private String ivExportFile
private String ivLdapUrl
private String ivFilter
private String ivRelDn
Constructor Detail |
public LDAPExport()
Method Detail |
public void setInstallDir(String val)
val
- Fully qualified path of a valid Windchill installation
directory.public String getInstallDir()
public void setExportFile(String vals)
vals
- Relative or absolute path string.public String getExportFile()
public void setLdapUrl(String val)
val
- Specifies a valid string form of an LDAP url.public String getLdapUrl()
public void setRelDn(String val)
val
- Specifies a valid string form of relative dn.public String getRelDn()
public void process(String[] args) throws IEException, IOException
Exception
- If an unexpected exception occurs.
IEException
IOException
public void runAction() throws IEException, IOException
IEException
- If a variable setting is unacceptable
IOException
- If an IO error occurs when reading the ldif files.public String getProvider(String wcHome) throws IOException
wcHome
- Install path to the Windchill installation.
IOException
- If an unexpected exception occurs.public String getIEProperties(String wcHome)
wcHome
- Install path to the Windchill installation.
IOException
- If an unexpected exception occurs.public static void main(String[] args)
IOException
- If an unexpected exception occurs.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |