org.kuali.student.r2.common.dto
Class ContextInfo

java.lang.Object
  extended by org.kuali.student.r2.common.dto.HasAttributesInfo
      extended by org.kuali.student.r2.common.dto.ContextInfo
All Implemented Interfaces:
Serializable, Context, HasAttributes

public class ContextInfo
extends HasAttributesInfo
implements Context, Serializable

The DTO for a Context.

Author:
Kamal
See Also:
Serialized Form

Constructor Summary
ContextInfo()
          Constructs a new ContextInfo.
ContextInfo(Context context)
          Constructs a new ContextInfo from another Context.
 
Method Summary
 String getAuthenticatedPrincipalId()
          The Principal Id of the currently authenticated user.
 Date getCurrentDate()
          The current date in this context.
static ContextInfo getInstance(String principalId, String localeLanguage, String localeRegion)
          Deprecated. 
 LocaleInfo getLocale()
          The locale information requested by the user.
 String getPrincipalId()
          The Principal Id of the principal on whose behalf the authenticated principal is acting.
 String getTimeZone()
          The time zone requested by the user.
 void setAuthenticatedPrincipalId(String authenticatedPrincipalId)
           
 void setCurrentDate(Date currentDate)
           
 void setLocale(LocaleInfo locale)
           
 void setPrincipalId(String principalId)
           
 void setTimeZone(String timeZone)
           
 
Methods inherited from class org.kuali.student.r2.common.dto.HasAttributesInfo
getAttributes, getAttributeValue, getAttributeValueList, setAttributes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.kuali.student.r2.common.infc.HasAttributes
getAttributes
 

Constructor Detail

ContextInfo

public ContextInfo()
Constructs a new ContextInfo.


ContextInfo

public ContextInfo(Context context)
Constructs a new ContextInfo from another Context.

Parameters:
context - the context to copy
Method Detail

getAuthenticatedPrincipalId

public String getAuthenticatedPrincipalId()
Description copied from interface: Context
The Principal Id of the currently authenticated user.

Specified by:
getAuthenticatedPrincipalId in interface Context

setAuthenticatedPrincipalId

public void setAuthenticatedPrincipalId(String authenticatedPrincipalId)

getPrincipalId

public String getPrincipalId()
Description copied from interface: Context
The Principal Id of the principal on whose behalf the authenticated principal is acting. If the authenticated principal is not acting on behalf of a different user, then this Id should be the same as the Authenticated Principal Id. (1) User is authorized to only act on behalf of itself. Principal Id must equal the Authenticated Principal Id and the authorization is performed on that Id. If the Principal Id differs from the Authenticated Principal Id, then the user is not authorized to perform the requested operation. (2) User is authorized to act on behalf of another user. The Principal Id differs from the Authentication Principal Id. Authorization is checked to see if Authenticated Principal Id can perform the operation on behalf of Principal Id. Then, authorization is checked to see if Principal Id can perform the operation.

Specified by:
getPrincipalId in interface Context

setPrincipalId

public void setPrincipalId(String principalId)

getCurrentDate

public Date getCurrentDate()
Description copied from interface: Context
The current date in this context. This date is used to instruct the provider to peform operations as if this date were the current date.

Specified by:
getCurrentDate in interface Context

setCurrentDate

public void setCurrentDate(Date currentDate)

getLocale

public LocaleInfo getLocale()
Description copied from interface: Context
The locale information requested by the user.

Specified by:
getLocale in interface Context

setLocale

public void setLocale(LocaleInfo locale)

getTimeZone

public String getTimeZone()
Description copied from interface: Context
The time zone requested by the user.

Specified by:
getTimeZone in interface Context

setTimeZone

public void setTimeZone(String timeZone)

getInstance

@Deprecated
public static ContextInfo getInstance(String principalId,
                                                 String localeLanguage,
                                                 String localeRegion)
Deprecated. 



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