org.kuali.student.lum.statement.config.context
Class LuContextImpl

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

public class LuContextImpl
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
           
private  LuService luService
          Learning unit service.
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.lum.statement.config.context.BasicContextImpl
INTEGER_VALUE_TOKEN, NL_HELPER_TOKEN, OPERATOR_TOKEN
 
Fields inherited from class org.kuali.student.core.statement.naturallanguage.AbstractContext
FIELDS_TOKEN
 
Constructor Summary
LuContextImpl()
           
 
Method Summary
private static boolean containsClu(List<CluInfo> cluList, CluInfo clu)
           
 Map<String,Object> createContextMap(ReqComponentInfo reqComponent)
          Creates the context map (template data) for the requirement component.
private static void findClusInCluSet(CluSetTreeViewInfo tree, List<CluInfo> cluList)
           
private  CluInfo getClu(ReqComponentInfo reqComponent, String key)
           
 CluInfo getCluInfo(String cluId)
          Gets a CLU.
 NLCluSet getCluSet(ReqComponentInfo reqComponent, String key)
          Gets a custom CLU set from a requirement component.
 NLCluSet getCluSet(String cluSetId)
          Gets the CLU set.
 CluSetInfo getCluSetInfo(String cluSetId)
          Gets a CLU set.
 void setLuService(LuService luService)
          Sets the LU service.
 
Methods inherited from class org.kuali.student.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

luService

private LuService luService
Learning unit service.


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

LuContextImpl

public LuContextImpl()
Method Detail

setLuService

public void setLuService(LuService luService)
Sets the LU service.

Parameters:
luService - LU service

getCluInfo

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

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

getClu

private CluInfo getClu(ReqComponentInfo reqComponent,
                       String key)
                throws OperationFailedException
Throws:
OperationFailedException

getCluSetInfo

public CluSetInfo getCluSetInfo(String cluSetId)
                         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)
                   throws OperationFailedException
Gets the CLU set.

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

findClusInCluSet

private static void findClusInCluSet(CluSetTreeViewInfo tree,
                                     List<CluInfo> cluList)

containsClu

private static boolean containsClu(List<CluInfo> cluList,
                                   CluInfo clu)

getCluSet

public NLCluSet getCluSet(ReqComponentInfo reqComponent,
                          String key)
                   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)
                                    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-2012 The Kuali Foundation. All Rights Reserved.