|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.prefs.delegates.PreferenceDelegate
PreferenceDelegate
This is the abstract class that may be utilized by customizers to create
site-specific delegates. Each delegate must be declared to the Windchill
system via the Preferences Interface by creating a preference key equal to
/wt/prefs/delegates/$DIVISION
or
/wt/prefs/delegates/$DIVISION:Unique Name
and a value of the fully
qualified class name (for example cust.prefs.LDAPDelegate
).
As well, the Preference Order property (wt.prefs.delegateOrder)
in the delegates.properties file must
be changed to add the appropriate delegate to the preference order.
Each subclass of PreferenceDelegate must implement the abstract methods mentioned below. Each method states what the inputs are and what the expected result of the method should produce. The manner in which this is achieved (whether via a XML file, LDAP system etc.) is upto the customizer to implement at this stage.
Glossary
wt.prefs.WTPreferences
,
wt.prefs.delegates.DefaultSystemDelegate
,
wt.prefs.delegates.UserDelegate
Field Summary | |
static String |
DELEGATE_FILE
|
static String |
DELEGATE_ORDER
|
static String |
DELEGATE_PREFERENCE_NODE
|
Constructor Summary | |
PreferenceDelegate()
|
Method Summary | |
ArrayList |
getDivisions(WTContainerRef aContainer,
WTUser user)
This method is called by the Delegate to determine the nodes that the delegate is responsible for either above or below the current node (or division). |
abstract ArrayList |
getDivisions(WTUser user)
This method is called by the Delegate to determine the nodes that the delegate is responsible for either above or below the current node (or division). |
ArrayList |
getDivisionsAsAdministrator(WTContainerRef aContainer,
WTUser user)
This method will return the divisions of given container and all its ancestor containers the user has administration privileges for. |
abstract ArrayList |
getDivisionsAsAdministrator(WTUser user)
This method will return the divisions within this delegate that the user has administration privileges for. |
abstract String |
getLocalizedName(String division,
Locale aLocale)
|
abstract boolean |
isAdministrator(String division,
WTUser user)
Determine whether the user is an adminstrator of the desired division. |
boolean |
isAdministrator(WTContainerRef container,
String division,
WTUser user)
Determine whether the user is an administrator of the desired container. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String DELEGATE_ORDER
public static final String DELEGATE_PREFERENCE_NODE
public static final String DELEGATE_FILE
Constructor Detail |
public PreferenceDelegate()
Method Detail |
public abstract String getLocalizedName(String division, Locale aLocale)
public abstract boolean isAdministrator(String division, WTUser user)
division
- The current node within the structureuser
- The current user of the preference.
public abstract ArrayList getDivisionsAsAdministrator(WTUser user)
Note:
getDivisionAsAdministrator(user)
for the
wt.prefs.delegates.UserDelegate
will always return the
WTPreferences.USER_CONTEXT
constant.
user
- The user to look for administration divisions for.
public abstract ArrayList getDivisions(WTUser user)
Notes:
user
- The current user of the preference
public boolean isAdministrator(WTContainerRef container, String division, WTUser user)
Note:
container
- The container for which administrative rights of
user are ascertaineddivision
- The current node within the structure (can be null for
container scope calls)user
- The current user of the preference.
public ArrayList getDivisionsAsAdministrator(WTContainerRef aContainer, WTUser user)
Note:
Note:
getDivisionAsAdministrator(user)
for the
wt.prefs.delegates.UserDelegate
will always return the
WTPreferences.USER_CONTEXT
constant.
aContainer
- The container check for administrative rights for.user
- The user to look for administration divisions for.
public ArrayList getDivisions(WTContainerRef aContainer, WTUser user)
Notes:
getDivisions( WTUser user )
is sufficient.
aContainer
- The current container scope for getting the divisions.user
- The current user of the preference
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |