Package wt.clients.beans
Class AssociationsLogic
java.lang.Object
wt.clients.beans.AssociationsLogic
This class contains the task logic for the
Supported API: true.
Extendable: true.
AssociationsPanel. It assumes a BinaryLink
between two Persitables.
Supported API: true.
Extendable: true.
-
Constructor Summary
ConstructorsConstructorDescriptionNo arg constructor for AssociationsLogic
Supported API: true. -
Method Summary
Modifier and TypeMethodDescriptionprotected BinaryLinkcreateNewLink(Persistable added_object) This creates a new link between this side object and an added other-side object using the linkClass.getAttrValue(Object obj, Method getter) This invokes the getter on the object passed in and returns the string value representing that object.This returns theClassInfofor the current object whose links are being manipulated.getDisplayName(String attribute, String class_name) This uses introspection to find the display name for the passed in attribute and the passed in class_name.getGetterMethod(String attribute, Object object) This uses introspection to find the getter method for the object passed in and it's attribute.This is the public getter for the link class being displayed in the multilist and being created, updated, or viewed.This is the public getter for the name of the link class being displayed in the multilist and being created, updated, or viewed.getModel()Get the model used to navigate the association
Supported API: true.This is the getter for the object for which the links can be created, updated, and viewed.This returns theClassfor which the links are being displayed in the multilist.String[]This returns an array of attributes on the other side object that are displayed in the columns of the multilist.This returns the class on the other side of the link.This method navigates the links on the object and returns all links that are of the same class as thelinkClass.getRole()This is the getter of the role of the other side object.getStandardIcon(WTObject myObject, WTContext context) Returns an Image that symbolically represents the object instance or class.protected voidThis initializes theclassInfovariable with a new instance of ClassInfo for the currentobjectClass
Supported API: true.booleanisPersistent(Persistable persistable) Tests to see if thePeristableparameter is persistent in the database.voidsave(Enumeration removed_links, Hashtable links) This persists any new links that the user created, and any links that the user updated.voidsetLinkClassName(String class_name) This is the public setter for the name of the link class to be displayed in the multilist and created, updated, or viewed.voidsetModel(AssociationsModel model) Set the model used to navigate the association
Supported API: true.voidThis sets the object for which the links can be created, updated, and viewed.voidsetObjectClass(Class object_class) This is the public setter for the class to be displayed in the multilist and created, updated, or viewed.voidsetOtherSideAttributes(String[] attributes) This sets the attributes on the other side object that will be displayed in the columns of the multilist.voidsetOtherSideClass(Class other_side) This sets the class on the other side of the link.voidCall this to set the role of the other side object.
-
Constructor Details
-
AssociationsLogic
public AssociationsLogic()No arg constructor for AssociationsLogic
Supported API: true.
-
-
Method Details
-
setObject
This sets the object for which the links can be created, updated, and viewed.
Supported API: true. -
getObject
This is the getter for the object for which the links can be created, updated, and viewed.
Supported API: true. -
setRole
Call this to set the role of the other side object. It is used to traverse the link that will be created, updated, or viewed.
Supported API: true. -
getRole
This is the getter of the role of the other side object.
Supported API: true. -
getOtherSideClass
This returns the class on the other side of the link.
Supported API: true. -
setOtherSideClass
This sets the class on the other side of the link.
Supported API: true. -
setOtherSideAttributes
This sets the attributes on the other side object that will be displayed in the columns of the multilist.
Supported API: true. -
getOtherSideAttributes
This returns an array of attributes on the other side object that are displayed in the columns of the multilist.
Supported API: true. -
setLinkClassName
This is the public setter for the name of the link class to be displayed in the multilist and created, updated, or viewed.
Supported API: true. -
getLinkClassName
This is the public getter for the name of the link class being displayed in the multilist and being created, updated, or viewed.
Supported API: true.- Throws:
WTIntrospectionExceptionWTException
-
getLinkClass
This is the public getter for the link class being displayed in the multilist and being created, updated, or viewed.
Supported API: true. -
setModel
Set the model used to navigate the association
Supported API: true. -
getModel
Get the model used to navigate the association
Supported API: true. -
setObjectClass
This is the public setter for the class to be displayed in the multilist and created, updated, or viewed.
Supported API: true. -
getObjectClass
This returns theClassfor which the links are being displayed in the multilist.
Supported API: true. -
getAttrValue
public String getAttrValue(Object obj, Method getter) throws InvocationTargetException, IllegalAccessException This invokes the getter on the object passed in and returns the string value representing that object.
Supported API: true. -
getRelations
This method navigates the links on the object and returns all links that are of the same class as thelinkClass.
Supported API: true. -
getGetterMethod
This uses introspection to find the getter method for the object passed in and it's attribute.
Supported API: true.- Parameters:
attribute- for which to find the getterobject- that the getter is on- Throws:
WTException
-
save
This persists any new links that the user created, and any links that the user updated. It also removes the links that the user removed.
Supported API: true.- Throws:
WTException
-
createNewLink
protected BinaryLink createNewLink(Persistable added_object) throws WTIntrospectionException, IllegalAccessException, NoSuchMethodException, InstantiationException, ClassNotFoundException, InvocationTargetException, WTException This creates a new link between this side object and an added other-side object using the linkClass.
Supported API: true. -
getClassInfo
This returns theClassInfofor the current object whose links are being manipulated.
Supported API: true.- Throws:
WTException
-
initClassInfo
This initializes theclassInfovariable with a new instance of ClassInfo for the currentobjectClass
Supported API: true.- Throws:
WTException
-
isPersistent
Tests to see if thePeristableparameter is persistent in the database.
Supported API: true.- Parameters:
persistable- APeristablethat will be tested to see if it is persistent.- Returns:
- A
boolean. The valuetruemeans that thePeristableparameter is persistent. - See Also:
-
getStandardIcon
Returns an Image that symbolically represents the object instance or class. For the WTQuery list, the Image should be 16x16 pixels. By convention, the background should be transparent which is readily supported by the GIF images. This method is used by WTQuery during run-time.
Supported API: true.- Returns:
Imageto be displayed.- Since:
- Windchill Foundation 1.0: WTQuery
- See Also:
-
getDisplayName
public String getDisplayName(String attribute, String class_name) throws ClassNotFoundException, WTIntrospectionException This uses introspection to find the display name for the passed in attribute and the passed in class_name.
Supported API: true.
-