|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectwt.prefs.PreferenceHelper
@Deprecated public class PreferenceHelper
The PreferenceHelper class may be used by both the client and server for obtaining utlity and helper methods for the Preferences Framework. This includes the creation of Edit and Search Context Masks, and translating contexts.
The methods of this class ( createEditMask() and
createContextMask() ) replace those found in the PrefsUtil class.
This class is safe to provide to the client and will be able to communicate with a Windchill Method Server over RMI if client side communication is required.
To assist in the usage of the Preferences Framework, the helper creation context methods will return context masks in the form as defined below. It is important to ensure any code utilizes the correct context in order to be 'well-formed' in a multi-level preference heirarchy.
Division Policy.1
Division Policy.2
...
Division Policy.n
User
Division.n
...
Division.2
Division.1
System Defaults
Supported API: true
WTPreferences,
PreferenceDelegate,
UserDelegate| Method Summary | |
|---|---|
static String[] |
createContextMask()
Deprecated. This method will create a Context Mask for the current logged in user. |
static String[] |
createContextMask(String division)
Deprecated. This method will create a Context Mask for the current logged in user. |
static String[] |
createContextMask(String aContainer,
String division)
Deprecated. This method will create a Context Mask for the current logged in user. |
static String[] |
createContextMask(String aDivision,
WTUser aUser)
Deprecated. This method will create a Context Mask for the named user. |
static String[] |
createContextMask(WTContainerRef aContainer,
String aDivision,
WTUser aUser)
Deprecated. This method will create a Context Mask for the named user. |
static String |
createEditMask()
Deprecated. This method will attempt to create the Edit Mask for the current user. |
static String |
createEditMask(String division,
boolean policy)
Deprecated. This method will attempt to create the Edit Mask for the current user at a given division node in the Heirarchy. |
static String |
createEditMask(String division,
WTUser aUser,
boolean policy)
Deprecated. This method will attempt to create the Edit Mask for a given user at a given division node in the Heirarchy. |
static String |
createEditMask(WTContainerRef aContainer,
WTUser aUser,
boolean policy)
Deprecated. This method will attempt to create the Edit Mask for a given user at the given container node in the Heirarchy. |
static String |
getDisplayNameFromContext(String aContext,
Locale aLocale)
Deprecated. This method will access the delegate for the given context and return the localized string the represents that context within the delegate. |
static String[] |
getDivisionsAsAdministrator()
Deprecated. This method will return the divisions that the user can administer from the current sesssion context. |
static String[] |
getDivisionsAsAdministrator(String aContainer)
Deprecated. This method will return the divisions that the session's user can administer from the list of all the delegates in the current heirarchy. |
static String[] |
getDivisionsAsAdministrator(WTContainerRef aContainer)
Deprecated. This method will return the divisions that the session's user can administer from the list of all the delegates in the current heirarchy. |
static String[] |
getDivisionsAsAdministrator(WTContainerRef aContainer,
WTUser user)
Deprecated. This method will return the divisions that the named user can administer from the list of all the delegates in the current heirarchy. |
static String[] |
getDivisionsAsAdministrator(WTUser user)
Deprecated. This method will return the divisions that the named user can administer from the list of all the delegates in the current heirarchy. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static String getDisplayNameFromContext(String aContext,
Locale aLocale)
throws WTException
NOTE: If the context
is a WTPreferences.DIVISION_CONTEXT or
WTPreferences.DIVISION_POLICY_CONTEXT, the Macro constant will be
stripped before being sent to the delegate. Both a fully defined context
(one that has a WTPreferences.DIVISION_CONTEXT) or a delegate context
(just the name of the division) are valid parameters.
Supported API: true
aLocale - The locale of the current browseraContext - The context name or Division to localize.
WTExceptionpublic static String[] getDivisionsAsAdministrator(WTUser user)
user - The user which wants administration rights.
public static String[] getDivisionsAsAdministrator(WTContainerRef aContainer,
WTUser user)
aContainer - The container to check adminitrative rights
(for container delegate)user - The user which wants administration rights.
public static String[] getDivisionsAsAdministrator(WTContainerRef aContainer)
aContainer - The container to check adminitrative rights
for the current session's user
(for container delegate)
public static String[] getDivisionsAsAdministrator()
public static String[] getDivisionsAsAdministrator(String aContainer)
aContainer - Reference String of the container to check
adminitrative rightsfor the current session's user
(for container delegate)
public static final String createEditMask()
WTPreferences.setEditContext( createEditMask( ) );
Will edit a preference at the user level upon a
WTPreferences.put( aKey, aPreference );
Supported API: true
public static String createEditMask(String division,
boolean policy)
WTPreferences.setEditContext( createEditMask( division, policy ) );
Will edit a preference at this level upon a
WTPreferences.put( aKey, aPreference );
Supported API: true
division - The division node in the heirarchy that is to be edited.policy - Whether the Editmask is a policy
(WTPreferences.DIVISION_POLICY_CONTEXT)
public static String createEditMask(String division,
WTUser aUser,
boolean policy)
WTPreferences.setEditContext( createEditMask( division, aUseri, policy ) );
Will edit a preference at this level upon a
WTPreferences.put( aKey, aPreference );
Supported API: true
division - The division node in the heirarchy that is to be edited.aUser - The user requesting editing permissions.policy - Whether the Editmask is a policy
(WTPreferences.DIVISION_POLICY_CONTEXT)
public static String createEditMask(WTContainerRef aContainer,
WTUser aUser,
boolean policy)
WTPreferences.setEditContext( createEditMask( aContainer, aUser, policy ) );Will edit a preference at this level upon a
WTPreferences.put( aKey, aPreference );
Supported API: true
aContainer - The container in the heirarchy that is to be edited.aUser - The user requesting editing permissions.policy - Whether the Editmask is a policy
(WTPreferences.CONTAINER_POLICY_CONTEXT)
public static String[] createContextMask(String division)
{ Policy.1, Policy2, User, Division.1....} and
Division.1 was passed in as the division parameter then the new order
would be
{ Policy.1, Policy.2, Division.1, User, .... }
Please see Context Mask Format for details
on the proper format of the context mask.
Supported API: true
division - The division to take higher priority
public static String[] createContextMask(String aContainer,
String division)
{ Policy.1, Policy2, User, Division.1....} and
Division.1 was passed in as the division parameter then the new order
would be
{ Policy.1, Policy.2, Division.1, User, .... }
Please see Context Mask Format for details
on the proper format of the context mask.
Supported API: true
aContainer - The container string to create the hierarchy fordivision - The division to take higher priority
public static String[] createContextMask(String aDivision,
WTUser aUser)
WTPreferences.USER_CONTEXT which is expanded during
Preferences calls). The mask will have a proper heirarchy list for a given user.
The mask that is created with the named division being taken in precedence over the normal ordering of the context mask. For example, if the normal order was:
{ Policy.1, Policy2, User, Division.1....} and
Division.1 was passed in as the division parameter then the new order
would be
{ Policy.1, Policy.2, Division.1, User, .... }
Please see Context Mask Format for details
on the proper format of the context mask.
Supported API: true
aDivision - The division to create the Context Mask with.aUser - The user to create the mask for.
public static String[] createContextMask(WTContainerRef aContainer,
String aDivision,
WTUser aUser)
WTPreferences.USER_CONTEXT which is expanded during Preferences calls).
The mask will have a proper heirarchy list for a given user. The mask that is created with the named division being taken in precedence over the normal ordering of the context mask. For example, if the normal order was:
{ Policy.1, Policy.2, User, Division.1....} and
Division.1 was passed in as the container parameter then the new order
would be
{ Policy.1, Policy.2, Division.1, User, .... }
Please see Context Mask Format for details
on the proper format of the context mask.
Supported API: true
aContainer - The container to create the context mask with, for
container delegate.aDivision - The preferred division to create the Context Mask with.aUser - The user to create the mask for.
public static String[] createContextMask()
WTPreferences.USER_CONTEXT which is expanded during
Preferences calls).
The mask will have a proper heirarchy list for a
given user. The user is taken from the current session context managed
on the Method Server.
Please see Context Mask Format for details on the proper format of the context mask.
Supported API: true
PreferenceHelper
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||