|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.student.common.ui.client.application.ApplicationContext
public class ApplicationContext
The application contains information about who is currently logged in, the security context, and access to messages loaded from the message service in the app. It provides and a static way to obtain this information across the entire app.
Field Summary | |
---|---|
private String |
applicationContextUrl
|
private HashMap<String,HashMap<String,HashSet<HasCrossConstraints>>> |
crossConstraints
|
private Map<String,String> |
flatMessages
|
private boolean |
loggedIn
|
private Map<String,Map<String,String>> |
messages
|
private List<Message> |
messagesList
|
private String |
parentPath
|
private HashMap<String,HashMap<String,FieldDescriptor>> |
pathToFieldMapping
|
private List<String> |
roles
|
private SecurityContext |
securityContext
|
private ServerPropertiesRpcServiceAsync |
serverPropertiesRpcService
|
private String |
userId
|
private String |
version
|
Constructor Summary | |
---|---|
protected |
ApplicationContext()
This constructor should only be visible to the common application package. |
Method Summary | |
---|---|
void |
addMessages(List<Message> messages)
Adds the messages in the list of messages to the map of the messages |
void |
clearCrossConstraintMap(String namespace)
|
void |
clearCrossConstraintsWithStartingPath(String namespace,
String pathPrefix)
Removes the bidirectional mapping for all paths that start with the path prefix This means if Field A had a dependency on Field B, and you cleared A, first all mappings with dependencies to A would be removed, then all mappings with dependencies to A would be removed. |
void |
clearPathToFieldMapping(String namespace)
|
String |
getApplicationContextUrl()
Application URL based on the serverPropertiesRPC service result |
HashSet<HasCrossConstraints> |
getCrossConstraint(String namespace,
String path)
|
HashSet<HasCrossConstraints> |
getCrossConstraints(String namespace)
|
String |
getMessage(String messageId)
Get a message by a unique id |
String |
getMessage(String groupName,
String messageId)
Get message by the group it is in and its unique id within that group |
List<Message> |
getMessages()
Returns all the messages in the ApplicationContext |
String |
getParentPath()
|
FieldDescriptor |
getPathToFieldMapping(String namespace,
String path)
|
List<String> |
getRoles()
|
SecurityContext |
getSecurityContext()
Get the security context for the app |
String |
getUILabel(String groupName,
String fieldId)
Same as getUILabel(String groupName, String type, String state, String fieldId) with no type and state needed |
String |
getUILabel(String groupName,
String type,
String state,
String fieldId)
This method looks up a UI Label in the messages cache. |
String |
getUserId()
|
String |
getVersion()
|
boolean |
isLoggedIn()
|
void |
putCrossConstraint(String namespace,
String path,
HasCrossConstraints fd)
Adds a mapping from path to a list of field descriptors for a given namespace namespace defaults to _default if null |
void |
putPathToFieldMapping(String namespace,
String path,
FieldDescriptor fd)
|
void |
setLoggedIn(boolean loggedIn)
|
void |
setParentPath(String parentPath)
|
void |
setRoles(List<String> roles)
|
void |
setSecurityContext(SecurityContext securityContext)
|
void |
setUserId(String userId)
|
void |
setVersion(String version)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private ServerPropertiesRpcServiceAsync serverPropertiesRpcService
private boolean loggedIn
private String userId
private String version
private List<String> roles
private Map<String,Map<String,String>> messages
private Map<String,String> flatMessages
private List<Message> messagesList
private SecurityContext securityContext
private String applicationContextUrl
private String parentPath
private HashMap<String,HashMap<String,FieldDescriptor>> pathToFieldMapping
private HashMap<String,HashMap<String,HashSet<HasCrossConstraints>>> crossConstraints
Constructor Detail |
---|
protected ApplicationContext()
Method Detail |
---|
public void setLoggedIn(boolean loggedIn)
public void setUserId(String userId)
public void setRoles(List<String> roles)
public boolean isLoggedIn()
public String getUserId()
public List<String> getRoles()
public void addMessages(List<Message> messages)
messages
- public String getMessage(String messageId)
public List<Message> getMessages()
public String getMessage(String groupName, String messageId)
public String getUILabel(String groupName, String type, String state, String fieldId)
groupName
- - for example 'course' or 'program'type
- state
- fieldId
-
public String getUILabel(String groupName, String fieldId)
public SecurityContext getSecurityContext()
public void setSecurityContext(SecurityContext securityContext)
public String getApplicationContextUrl()
public void setVersion(String version)
public String getVersion()
public void putCrossConstraint(String namespace, String path, HasCrossConstraints fd)
path
- fd
- public HashSet<HasCrossConstraints> getCrossConstraint(String namespace, String path)
public void clearCrossConstraintMap(String namespace)
public void putPathToFieldMapping(String namespace, String path, FieldDescriptor fd)
public FieldDescriptor getPathToFieldMapping(String namespace, String path)
public void clearPathToFieldMapping(String namespace)
public void clearCrossConstraintsWithStartingPath(String namespace, String pathPrefix)
namespace
- pathPrefix
- public HashSet<HasCrossConstraints> getCrossConstraints(String namespace)
public String getParentPath()
public void setParentPath(String parentPath)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |