BrightSide Workbench Full Report + Source Code
org.turro.students.ChallengeContext Class Reference

Public Member Functions

String getAttribute (String attribute)
 
String getAttribute (String attribute, String defaultValue)
 

Static Public Member Functions

static String getChallengeContextAttribute (String attribute, String defaultValue)
 
static boolean getAllowNew (IConstructor constructor)
 
static String getAllowedRoots (IConstructor constructor)
 
static List< TalentCategorygetTalentCategories (IConstructor constructor)
 
static String getDossierCategories (IConstructor constructor)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 33 of file ChallengeContext.java.

Member Function Documentation

◆ getAllowedRoots()

static String org.turro.students.ChallengeContext.getAllowedRoots ( IConstructor  constructor)
static

Definition at line 56 of file ChallengeContext.java.

56  {
57  return getChallengeContextAttribute("allowed-roots", "dossier,talent-category");
58  }
static String getChallengeContextAttribute(String attribute, String defaultValue)
Here is the call graph for this function:

◆ getAllowNew()

static boolean org.turro.students.ChallengeContext.getAllowNew ( IConstructor  constructor)
static

Definition at line 51 of file ChallengeContext.java.

51  {
52  String challengeRoles = getChallengeContextAttribute("challenge-roles", "@admin:is|@partner:on|@patron:on|@collaborator:on");
53  return Strings.isBlank(challengeRoles) ? false : constructor.isInRole(challengeRoles);
54  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAttribute() [1/2]

String org.turro.students.ChallengeContext.getAttribute ( String  attribute)

Definition at line 35 of file ChallengeContext.java.

35  {
36  return getAttribute(attribute, null);
37  }
String getAttribute(String attribute)

◆ getAttribute() [2/2]

String org.turro.students.ChallengeContext.getAttribute ( String  attribute,
String  defaultValue 
)

Definition at line 39 of file ChallengeContext.java.

39  {
40  return getChallengeContextAttribute(attribute, defaultValue);
41  }
Here is the call graph for this function:

◆ getChallengeContextAttribute()

static String org.turro.students.ChallengeContext.getChallengeContextAttribute ( String  attribute,
String  defaultValue 
)
static

Definition at line 47 of file ChallengeContext.java.

47  {
48  return ElephantProperties.getContextProperty(CHALLENGE_CONTEXT, attribute, defaultValue);
49  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDossierCategories()

static String org.turro.students.ChallengeContext.getDossierCategories ( IConstructor  constructor)
static

Definition at line 65 of file ChallengeContext.java.

65  {
66  return getChallengeContextAttribute("dossier-categories", null);
67  }
Here is the call graph for this function:

◆ getTalentCategories()

static List<TalentCategory> org.turro.students.ChallengeContext.getTalentCategories ( IConstructor  constructor)
static

Definition at line 60 of file ChallengeContext.java.

60  {
61  return SqlClause.select("tc").from("TalentCategory tc")
62  .dao(new StudentsPU()).resultList(TalentCategory.class);
63  }
Here is the caller graph for this function:

The documentation for this class was generated from the following file: