BrightSide Workbench Full Report + Source Code
org.turro.jobboard.PracticalWorkContext Class Reference

Public Member Functions

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

Static Public Member Functions

static String getPracticalWorkContextAttribute (String attribute, String defaultValue)
 
static List< String > getPracticalWorkTypeList ()
 
static boolean getAllowSingle ()
 
static boolean getAllowNew (IConstructor constructor)
 
static boolean getAllowQuestion (IConstructor constructor)
 
static List< String > getRecipients (IConstructor constructor)
 

Detailed Description

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

Definition at line 31 of file PracticalWorkContext.java.

Member Function Documentation

◆ getAllowNew()

static boolean org.turro.jobboard.PracticalWorkContext.getAllowNew ( IConstructor  constructor)
static

Definition at line 57 of file PracticalWorkContext.java.

57  {
58  String newRoles = getPracticalWorkContextAttribute("allow-new", "@partner:on|@responsible:is|@admin:is");
59  return (Strings.isBlank(newRoles) ? false : constructor.isInRole(newRoles));
60  }
static String getPracticalWorkContextAttribute(String attribute, String defaultValue)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAllowQuestion()

static boolean org.turro.jobboard.PracticalWorkContext.getAllowQuestion ( IConstructor  constructor)
static

Definition at line 62 of file PracticalWorkContext.java.

62  {
63  String questionRoles = getPracticalWorkContextAttribute("question-roles", "@student:is");
64  return (Strings.isBlank(questionRoles) ? false : constructor.isInRole(questionRoles));
65  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAllowSingle()

static boolean org.turro.jobboard.PracticalWorkContext.getAllowSingle ( )
static

Definition at line 53 of file PracticalWorkContext.java.

53  {
54  return "true".equals(getPracticalWorkContextAttribute("allow-single", "false"));
55  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAttribute() [1/2]

String org.turro.jobboard.PracticalWorkContext.getAttribute ( String  attribute)

Definition at line 33 of file PracticalWorkContext.java.

33  {
34  return getAttribute(attribute, null);
35  }

◆ getAttribute() [2/2]

String org.turro.jobboard.PracticalWorkContext.getAttribute ( String  attribute,
String  defaultValue 
)

Definition at line 37 of file PracticalWorkContext.java.

37  {
38  return getPracticalWorkContextAttribute(attribute, defaultValue);
39  }
Here is the call graph for this function:

◆ getPracticalWorkContextAttribute()

static String org.turro.jobboard.PracticalWorkContext.getPracticalWorkContextAttribute ( String  attribute,
String  defaultValue 
)
static

Definition at line 45 of file PracticalWorkContext.java.

45  {
46  return ElephantProperties.getContextProperty(PRACTICAL_WORK_CONTEXT, attribute, defaultValue);
47  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPracticalWorkTypeList()

static List<String> org.turro.jobboard.PracticalWorkContext.getPracticalWorkTypeList ( )
static

Definition at line 49 of file PracticalWorkContext.java.

49  {
50  return ElephantProperties.getContextPrefixedProperties(PRACTICAL_WORK_CONTEXT, "type_");
51  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getRecipients()

static List<String> org.turro.jobboard.PracticalWorkContext.getRecipients ( IConstructor  constructor)
static

Definition at line 67 of file PracticalWorkContext.java.

67  {
68  String recipients = getPracticalWorkContextAttribute("recipients", "contacts_admin,patron,partner,student");
69  return Arrays.asList(recipients.split("\\s*,\\s*"));
70  }
Here is the call graph for this function:
Here is the caller graph for this function:

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