|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ptc.windchill.enterprise.doc.server.DocumentUtility
Makes available functions to set attributes on the documents. Used in
the template processing and creating documents.
Supported API: false
Extendable: false
Field Summary | |
private static String |
CLASSNAME
|
private static String |
DRESOURCE
|
private static String |
RESOURCE
|
static String |
TYPE_SELECT_BLANK
|
static String |
TYPE_SELECT_STRING
|
private static boolean |
VERBOSE
|
Constructor Summary | |
DocumentUtility()
|
Method Summary | |
static boolean |
checkNameLength(String name)
|
static boolean |
checkNumberLength(String number)
|
static boolean |
checkTitleLength(String title)
|
static int |
getInsertLocation(Vector vector,
Object object,
Locale locale)
|
static int |
getNameUpperLimit()
|
static String |
getNumber(String number)
Used to get the number either through user input or through automatic number generation. |
static int |
getNumberUpperLimit()
|
private static String |
getPreferenceValue(String node,
String key)
|
static int |
getTitleUpperLimit()
|
static Vector |
getTypeDisplayInfo(String solution,
TypeIdentifier[] types,
Locale locale)
Gets the display information for a list of types. |
static WTDocument |
setDept(WTDocument document,
String dept)
Used to set the dept through user input. |
static WTDocument |
setDescription(WTDocument document,
String desc)
Used to set the description through user input. |
static WTDocument |
setDocType(WTDocument document,
String docType)
Used to set the docType through user input. |
static WTDocument |
setEnabled(WTDocument document,
boolean enabled)
Used to set the enabled attribute on the Document's Template object. |
static WTDocument |
setLifeCycleTemplate(WTDocument document,
String lifeCycle)
Used to set the lifecycle template either through user input or through automatic default. |
static WTDocument |
setLocation(WTDocument document,
String location)
Used to set the location either through user input or through automatic default of the location. |
static WTDocument |
setName(WTDocument document,
String name)
Used to set the name through user input. |
static WTDocument |
setNumber(WTDocument document,
String number)
Used to set the number either through user input or through automatic number generation. |
static WTDocument |
setOldAttributes(WTDocument document)
Used to set attributes that aren't used on documents anymore. |
static WTDocument |
setOrganization(WTDocument document,
String docOrg)
|
static WTDocument |
setSoftAttributes(WTDocument document,
HashMap nameValueData,
Locale locale)
Set the soft attributes from the hash map into the object. |
static WTDocument |
setTeamTemplate(WTDocument document,
String teamTemplate)
Used to set the team template on the document. |
static WTDocument |
setTemplate(WTDocument document,
boolean templated)
Used to set the template object on the Document. |
static WTDocument |
setTitle(WTDocument document,
String title)
Used to set the title through user input. |
private static String |
validateTypePreference(TypeIdentifier[] types,
String localizedString,
Locale locale)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
private static final boolean VERBOSE
public static final String TYPE_SELECT_STRING
public static final String TYPE_SELECT_BLANK
private static final String DRESOURCE
Constructor Detail |
public DocumentUtility()
Method Detail |
public static WTDocument setNumber(WTDocument document, String number) throws WTException
document
- The unpersisted document to set the number on.number
- Number can either be a value entered by the user from the UI or it can be null and then auto generated.
WTException
public static String getNumber(String number)
number
- Number can either be a value entered by the user from the UI or it can be null and then auto generated.
public static WTDocument setOldAttributes(WTDocument document) throws WTException
document
- The unpersisted document to set the attributes on.
WTException
public static WTDocument setLocation(WTDocument document, String location) throws WTException
document
- The unpersisted document to set the location on.location
- Location can either be a value entered by the user from the UI or it can be null and then auto generated.
WTException
public static WTDocument setLifeCycleTemplate(WTDocument document, String lifeCycle) throws WTException
document
- The unpersisted document to set the life cycle on.lifeCycle
- LifeCycle can either be a value entered by the user from the UI or it can be null and then auto generated.
WTException
public static WTDocument setTeamTemplate(WTDocument document, String teamTemplate) throws WTException
document
- The unpersisted document to set the team template on.teamTemplate
- Team Template to set the new document to.
WTException
public static WTDocument setSoftAttributes(WTDocument document, HashMap nameValueData, Locale locale) throws WTException
document
- The document (non-persisted if create operation, persisted if update) to set the soft type values on. This method does not persist the changes that it makes to the document, that must be done outside of this method.nameValueData
- locale
- The locale of the client, used to return some of the strings in the locale of the client.
WTException
public static WTDocument setName(WTDocument document, String name) throws WTException
document
- The unpersisted document to set the name on.name
- Name is a value entered by the user from the UI
WTException
public static WTDocument setTitle(WTDocument document, String title) throws WTException
document
- The unpersisted document to set the title on.title
- Title is a value entered by the user from the UI
WTException
public static WTDocument setDescription(WTDocument document, String desc) throws WTException
document
- The unpersisted document to set the description on.desc
- Description entered by the user from the UI
WTException
public static WTDocument setTemplate(WTDocument document, boolean templated) throws WTException
document
- The unpersisted document to set the template object on.templated
- Indicates whether the document is a template or not.
WTException
public static WTDocument setEnabled(WTDocument document, boolean enabled) throws WTException
document
- The unpersisted document which may be a template, to set the enabled flag on.enabled
- Indicates whether the document template is enabled or not.
WTException
public static WTDocument setDept(WTDocument document, String dept) throws WTException
document
- The unpersisted document to set the dept on.dept
- dept is selected by the user from the UI. It is a number passed in as a string.
WTException
public static WTDocument setDocType(WTDocument document, String docType) throws WTException
document
- The unpersisted document to set the docType on.docType
- docType is selected by the user from the UI. It is a number passed in as a string.
WTException
public static Vector getTypeDisplayInfo(String solution, TypeIdentifier[] types, Locale locale) throws WTException
solution
- The solution for which the type display info is neededtypes
- An array of the type identifiers for the types that are valid for this display.locale
- The locale of the client.
WTException
public static int getNameUpperLimit()
public static boolean checkNameLength(String name)
public static int getNumberUpperLimit()
public static boolean checkNumberLength(String number)
public static int getTitleUpperLimit()
public static boolean checkTitleLength(String title)
public static WTDocument setOrganization(WTDocument document, String docOrg) throws WTException
WTException
public static int getInsertLocation(Vector vector, Object object, Locale locale)
private static String validateTypePreference(TypeIdentifier[] types, String localizedString, Locale locale) throws WTException
WTException
private static String getPreferenceValue(String node, String key)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |