org.kuali.student.r2.lum.statement.config.context
Class CluContextImpl

java.lang.Object
  extended by org.kuali.student.r1.core.statement.naturallanguage.AbstractContext<ReqComponentInfo>
      extended by org.kuali.student.r2.lum.statement.config.context.BasicContextImpl
          extended by org.kuali.student.r2.lum.statement.config.context.CluContextImpl
All Implemented Interfaces:
Context<ReqComponentInfo>

public class CluContextImpl
extends BasicContextImpl

This class creates the template context for course list types.


Field Summary
static String CLU_SET_TOKEN
          cluSet token (key) references a Clu set object used in templates.
static String CLU_TOKEN
          clu token (key) references a Clu object used in templates.
static String COURSE_CLU_SET_TOKEN
           
static String COURSE_CLU_TOKEN
           
static String PROGRAM_CLU_SET_TOKEN
           
static String PROGRAM_CLU_TOKEN
           
static String TEST_CLU_SET_TOKEN
           
static String TEST_CLU_TOKEN
           
 
Fields inherited from class org.kuali.student.r2.lum.statement.config.context.BasicContextImpl
INTEGER_VALUE_TOKEN, NL_HELPER_TOKEN, OPERATOR_TOKEN
 
Fields inherited from class org.kuali.student.r1.core.statement.naturallanguage.AbstractContext
FIELDS_TOKEN
 
Constructor Summary
CluContextImpl()
           
 
Method Summary
 Map<String,Object> createContextMap(ReqComponentInfo reqComponent, ContextInfo contextInfo)
          Creates the context map (template data) for the requirement component.
 CluInfo getCluInfo(String cluId, ContextInfo contextInfo)
          Gets a CLU.
 NLCluSet getCluSet(ReqComponentInfo reqComponent, String key, ContextInfo contextInfo)
          Gets a custom CLU set from a requirement component.
 NLCluSet getCluSet(String cluSetId, ContextInfo contextInfo)
          Gets the CLU set.
 CluSetInfo getCluSetInfo(String cluSetId, ContextInfo contextInfo)
          Gets a CLU set.
 void setCluService(CluService cluService)
          Sets the LU service.
 
Methods inherited from class org.kuali.student.r1.core.statement.naturallanguage.AbstractContext
getReqComponentFieldMap, getReqComponentFieldValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLU_TOKEN

public static final String CLU_TOKEN
clu token (key) references a Clu object used in templates. e.g. 'Student must have completed all of $clu.getOfficialIdentifier().getShortName()'

See Also:
Constant Field Values

COURSE_CLU_TOKEN

public static final String COURSE_CLU_TOKEN
See Also:
Constant Field Values

PROGRAM_CLU_TOKEN

public static final String PROGRAM_CLU_TOKEN
See Also:
Constant Field Values

TEST_CLU_TOKEN

public static final String TEST_CLU_TOKEN
See Also:
Constant Field Values

CLU_SET_TOKEN

public static final String CLU_SET_TOKEN
cluSet token (key) references a Clu set object used in templates. e.g. 'Student must have completed all of $cluSet.getCluSetAsCode()'

See Also:
Constant Field Values

COURSE_CLU_SET_TOKEN

public static final String COURSE_CLU_SET_TOKEN
See Also:
Constant Field Values

PROGRAM_CLU_SET_TOKEN

public static final String PROGRAM_CLU_SET_TOKEN
See Also:
Constant Field Values

TEST_CLU_SET_TOKEN

public static final String TEST_CLU_SET_TOKEN
See Also:
Constant Field Values
Constructor Detail

CluContextImpl

public CluContextImpl()
Method Detail

setCluService

public void setCluService(CluService cluService)
Sets the LU service.

Parameters:
cluService - CLU service

getCluInfo

public CluInfo getCluInfo(String cluId,
                          ContextInfo contextInfo)
                   throws OperationFailedException
Gets a CLU.

Parameters:
cluId - CLU id
Returns:
CLU
Throws:
OperationFailedException - If retrieving CLU fails

getCluSetInfo

public CluSetInfo getCluSetInfo(String cluSetId,
                                ContextInfo contextInfo)
                         throws OperationFailedException
Gets a CLU set.

Parameters:
cluSetId - CLU set id
Returns:
CLU set
Throws:
OperationFailedException - If retrieving CLU set fails

getCluSet

public NLCluSet getCluSet(String cluSetId,
                          ContextInfo contextInfo)
                   throws OperationFailedException
Gets the CLU set.

Parameters:
cluSetId - CLU set id
Returns:
CLU set
Throws:
OperationFailedException - If building a custom CLU set fails

getCluSet

public NLCluSet getCluSet(ReqComponentInfo reqComponent,
                          String key,
                          ContextInfo contextInfo)
                   throws OperationFailedException
Gets a custom CLU set from a requirement component.

Parameters:
reqComponent - Requirement component
Returns:
custom CLU set
Throws:
OperationFailedException - If building a custom CLU set fails

createContextMap

public Map<String,Object> createContextMap(ReqComponentInfo reqComponent,
                                           ContextInfo contextInfo)
                                    throws OperationFailedException
Creates the context map (template data) for the requirement component.

Specified by:
createContextMap in interface Context<ReqComponentInfo>
Overrides:
createContextMap in class BasicContextImpl
Parameters:
reqComponent - Requirement component
Throws:
OperationFailedException - Creating context map fails


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