BrightSide Workbench Full Report + Source Code
org.turro.dossier.www.QuestionCtrl Class Reference
Inheritance diagram for org.turro.dossier.www.QuestionCtrl:
Collaboration diagram for org.turro.dossier.www.QuestionCtrl:

Public Member Functions

boolean itsMe (String id)
 
boolean myTurn (HttpServletRequest request)
 
void execute (ServletContext context, HttpServletRequest request, HttpServletResponse response)
 

Static Public Member Functions

static String editQuestion (String issueId, String link, IssueType type, String template)
 
static String editQuestion (Issue issue, String link, IssueType type, String template)
 
static String getIdentifier ()
 

Detailed Description

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

Definition at line 70 of file QuestionCtrl.java.

Member Function Documentation

◆ editQuestion() [1/2]

static String org.turro.dossier.www.QuestionCtrl.editQuestion ( Issue  issue,
String  link,
IssueType  type,
String  template 
)
static

Definition at line 78 of file QuestionCtrl.java.

78  {
79  IConstructor constructor = Application.getApplication().getConstructor();
80  if(issue == null) {
81  ElephantMarker marker = new ElephantMarker(constructor);
82  marker.put("action", DirectContents.createRelativeURL(getIdentifier()));
83  marker.put("redirect", link);
84  marker.put("type", type == null ? IssueType.TYPE_QUESTION.toString() : type.toString());
85  return marker.parse("issue", Strings.isBlank(template) ? "editQuestion" : template);
86  } else {
87  IssueWrapper wrapper = new IssueWrapper(issue);
88  if(wrapper.isFullParticipant()) {
89  String issuePath = DossierPU.getObjectPath(issue);
90  ElephantMarker marker = new ElephantMarker(constructor);
91  marker.put("action", DirectContents.createRelativeURL(getIdentifier()));
92  marker.put("redirect", link);
93  marker.put("issue", issue);
94  marker.put("webDefault", DescribeItUtil.description(DescribeItUtil.DEFAULT_ID, issuePath));
95  marker.put("tagsString", Tags.tagsString(issuePath));
96  marker.put("tagChoices", Tags.tagChoices(issuePath));
97  //marker.put("type", type == null ? IssueType.TYPE_QUESTION.toString() : type.toString());
98  AttachCtrl ac = new AttachCtrl(constructor);
99  ac.setEntityPath(issuePath);
100  ac.setPublicOnly(false);
101  marker.put("ac", ac.parseAttachments());
102  return marker.parse("issue", Strings.isBlank(template) ? "editQuestion" : template);
103  }
104  }
105  return "";
106  }
Here is the call graph for this function:

◆ editQuestion() [2/2]

static String org.turro.dossier.www.QuestionCtrl.editQuestion ( String  issueId,
String  link,
IssueType  type,
String  template 
)
static

Definition at line 72 of file QuestionCtrl.java.

72  {
73  Long id = Long.valueOf(issueId);
74  Issue issue = new DossierPU().find(Issue.class, id);
75  return editQuestion(issue, link, type, template);
76  }
static String editQuestion(String issueId, String link, IssueType type, String template)
Here is the caller graph for this function:

◆ execute()

void org.turro.dossier.www.QuestionCtrl.execute ( ServletContext  context,
HttpServletRequest  request,
HttpServletResponse  response 
)

Implements org.turro.elephant.direct.IDirectContent.

Definition at line 123 of file QuestionCtrl.java.

123  {
124  if(ServletFileUpload.isMultipartContent(request)) {
125  try {
126  processInformation(request, response);
127  } catch (FileUploadException | IOException ex) {
128  Logger.getLogger(QuestionCtrl.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(null), ex);
129  }
130  }
131  }
Here is the call graph for this function:

◆ getIdentifier()

static String org.turro.dossier.www.QuestionCtrl.getIdentifier ( )
static

Definition at line 108 of file QuestionCtrl.java.

108  {
109  return QuestionCtrl.class.getAnnotation(DirectContent.class).identifier();
110  }

◆ itsMe()

boolean org.turro.dossier.www.QuestionCtrl.itsMe ( String  id)

Implements org.turro.elephant.direct.IDirectContent.

Definition at line 113 of file QuestionCtrl.java.

113  {
114  return getIdentifier().equals(id);
115  }

◆ myTurn()

boolean org.turro.dossier.www.QuestionCtrl.myTurn ( HttpServletRequest  request)

Implements org.turro.elephant.direct.IDirectContent.

Definition at line 118 of file QuestionCtrl.java.

118  {
119  return DirectContents.isYourTurn(request, getIdentifier());
120  }
Here is the call graph for this function:

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