|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.federation.reference.Client
Simple line-mode client.
This simple client serves as an example and reference implementation. It uses the Windchill Federated Task Dispatcher to execute task delegates that provide basic CRUD operations. The Task Dispatcher and task delegates provide an abstraction layer that allows the client to be independent of the types and network locations of the underlying information systems. The client simply applies abstract actions against business objects having abstract types and system-independent schema. Business objects are conveyed and represented as lightweight containers of attributes.
This simple client also demonstrates how to integrate with an LDAP directory service to discover the information systems that are registered in it. Whenever the client prompts for the name of a directory service, the wildcard character "*" may be entered. This will cause the client to search the directory for all registered information systems and direct queries to all of them.
Field Summary | |
private static String |
ADD_CONTENT_ITEMS
|
private static String |
CREATE
|
private static String |
DELETE
|
private String |
directorySearchBase
|
private DirectoryService |
ds
|
private static String |
EXPAND
|
private static String |
GET_CONTENT_ITEMS
|
private static String |
LINK
|
private String |
linkType
|
private static String |
LIST_CONTENT_ITEMS
|
private String |
objectFilter
|
private String |
objectFilter2
|
private static String |
QUERY
|
private BufferedReader |
reader
|
private String |
repositoryNames
|
private String |
repositoryNames2
|
private String |
roleName
|
private String |
targetType
|
private String |
targetType2
|
private boolean |
xmlDisplay
|
Constructor Summary | |
Client()
|
Method Summary | |
private void |
displayObjects(Group objects)
|
private void |
displayTree(Element parent,
String name,
String linktype,
String role,
int depth)
|
private String |
dnToDomain(String dn)
|
private void |
doAddContentItems()
Upload a content item, a file in the local file system, to a content holder object where the content holder object is identified by a target type, a Windchill query specification, and an indication of the repository to which to send the request. |
private void |
doCreate()
Create a business object given a target type, a set of attributes, and the repository in which to create the object. |
private void |
doDelete()
Delete business objects based upon a target type, a Windchill query specification, and an indication of the repositories to which to send the request. |
private void |
doExpand()
Expand trees of business objects based upon the target type of a set of base objects, a Windchill query specification identifying the base objects, an indication of the repositories to which to send the request, the link type identifying the type of association to expand, and the name of the role played by the base object(s) in the association. |
private void |
doGetContentItems()
Download a content item to a file in the local file system. |
private void |
doLink()
Create an association between two business objects. |
private void |
doListContentItems()
List the content items associated with a set of content holder objects where the content holder objects are identified by a target type, a Windchill query specification, and an indication of the repositories to which to send the request. |
private void |
doQuery()
Query for business objects based upon a target type, a Windchill query specification, and an indication of the repositories to which to send the query. |
private String |
getResponse(String prompt,
String dflt)
|
private boolean |
isServiceUnavailable(WTException e)
|
static void |
main(String[] args)
|
private Enumeration |
resolveRepositories(String names)
|
void |
run()
|
private void |
setDisplayMode()
Set the object display mode to one of XML or PLAIN. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String ADD_CONTENT_ITEMS
private static final String CREATE
private static final String DELETE
private static final String EXPAND
private static final String GET_CONTENT_ITEMS
private static final String LINK
private static final String LIST_CONTENT_ITEMS
private static final String QUERY
private String directorySearchBase
private DirectoryService ds
private String linkType
private String roleName
private String objectFilter
private String objectFilter2
private String targetType
private String targetType2
private String repositoryNames
private String repositoryNames2
private boolean xmlDisplay
private BufferedReader reader
Constructor Detail |
public Client() throws WTException, IEException, IOException
Method Detail |
public void run()
private void doQuery()
private void doCreate()
private void doDelete()
private void doLink()
private void doExpand()
private void doListContentItems()
private void doAddContentItems()
private void doGetContentItems()
private void setDisplayMode()
private String getResponse(String prompt, String dflt)
private Enumeration resolveRepositories(String names) throws IEException
IEException
private String dnToDomain(String dn)
private void displayObjects(Group objects)
private void displayTree(Element parent, String name, String linktype, String role, int depth) throws WTException
WTException
private boolean isServiceUnavailable(WTException e)
public static void main(String[] args)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |