org.kuali.student.common.ui.client.application
Class ViewContext

java.lang.Object
  extended by org.kuali.student.common.ui.client.application.ViewContext
All Implemented Interfaces:
Comparable<ViewContext>

public class ViewContext
extends Object
implements Comparable<ViewContext>

ViewContext can be used to pass along context information when switching or initializing a view. For example a display view requires the id of the object to display, the view context can be used to pass along that information from a different controller or view.


Field Summary
private  Map<String,String> attributes
           
private  String id
           
static String ID_ATR
           
static String ID_TYPE_ATR
           
private  IdAttributes.IdType idType
           
private  PermissionType permissionType
           
private  String state
           
 
Constructor Summary
ViewContext()
           
 
Method Summary
 int compareTo(ViewContext o)
           
 String getAttribute(String key)
           
 Map<String,String> getAttributes()
           
 String getId()
           
 IdAttributes.IdType getIdType()
           
 PermissionType getPermissionType()
           
 String getState()
           
 void setAttribute(String key, String value)
          Add an additional attribute to the view context, this will appear in the address bar like id and type does
 void setId(String id)
          Set the id for this view context, this will appear as part of the address bar when used in a controller, the controller can use this id to determine what to show (determine the context)
 void setIdType(IdAttributes.IdType idType)
          Set the type of id for this view context, this will appear as part of the address bar when used in a controller
 void setIdType(String idTypeString)
           
 void setPermissionType(PermissionType permissionType)
          Sets the type of permission needed to be at the the current view, this is interpreted by the controller if set which checks with the server to see if the user has this kind of permission.
 void setState(String state)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID_ATR

public static final String ID_ATR
See Also:
Constant Field Values

ID_TYPE_ATR

public static final String ID_TYPE_ATR
See Also:
Constant Field Values

attributes

private Map<String,String> attributes

id

private String id

idType

private IdAttributes.IdType idType

state

private String state

permissionType

private PermissionType permissionType
Constructor Detail

ViewContext

public ViewContext()
Method Detail

getId

public String getId()

setId

public void setId(String id)
Set the id for this view context, this will appear as part of the address bar when used in a controller, the controller can use this id to determine what to show (determine the context)


getIdType

public IdAttributes.IdType getIdType()

setIdType

public void setIdType(IdAttributes.IdType idType)
Set the type of id for this view context, this will appear as part of the address bar when used in a controller


setIdType

public void setIdType(String idTypeString)

getState

public String getState()

setState

public void setState(String state)

getPermissionType

public PermissionType getPermissionType()

setPermissionType

public void setPermissionType(PermissionType permissionType)
Sets the type of permission needed to be at the the current view, this is interpreted by the controller if set which checks with the server to see if the user has this kind of permission. Doesn't appear in the address bar


compareTo

public int compareTo(ViewContext o)
Specified by:
compareTo in interface Comparable<ViewContext>

setAttribute

public void setAttribute(String key,
                         String value)
Add an additional attribute to the view context, this will appear in the address bar like id and type does


getAttribute

public String getAttribute(String key)

getAttributes

public Map<String,String> getAttributes()


Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.