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

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 linkToCreateIssue (String link, String dossierId, String template)
 
static String createIssue (String link, String dossierId, 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 81 of file CreateIssueCtrl.java.

Member Function Documentation

◆ createIssue()

static String org.turro.dossier.www.CreateIssueCtrl.createIssue ( String  link,
String  dossierId,
String  template 
)
static

Definition at line 88 of file CreateIssueCtrl.java.

88  {
89  IConstructor constructor = Application.getApplication().getConstructor();
90  if(constructor.isInRole("issue:edit")) {
91  ElephantMarker marker = new ElephantMarker(constructor);
92  marker.put("projectContext", new ProjectContext());
93  marker.put("action", DirectContents.createRelativeURL(getIdentifier()));
94  marker.put("redirect", link);
95  if(Long.valueOf(dossierId) > 0) {
96  marker.put("dossierId", dossierId);
97  DossierDWReport dr = new DossierDWReport();
98  dr.setReportValues(null, null, Long.valueOf(dossierId));
99  marker.put("dossierData", dr.getData());
100  } else {
101  marker.put("dossiers", new DossierResults().getDossierList());
102  }
103  return marker.parse("issue", Strings.isBlank(template) ? "create" : template);
104  }
105  return "";
106  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ execute()

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

Implements org.turro.elephant.direct.IDirectContent.

Definition at line 123 of file CreateIssueCtrl.java.

123  {
124  if(ServletFileUpload.isMultipartContent(request)) {
125  try {
126  processInformation(request, response);
127  } catch (FileUploadException | IOException ex) {
128  Logger.getLogger(CreateIssueCtrl.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.CreateIssueCtrl.getIdentifier ( )
static

Definition at line 108 of file CreateIssueCtrl.java.

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

◆ itsMe()

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

Implements org.turro.elephant.direct.IDirectContent.

Definition at line 113 of file CreateIssueCtrl.java.

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

◆ linkToCreateIssue()

static String org.turro.dossier.www.CreateIssueCtrl.linkToCreateIssue ( String  link,
String  dossierId,
String  template 
)
static

Definition at line 84 of file CreateIssueCtrl.java.

84  {
85  return "/user/newissue?dossierId=" + dossierId;
86  }

◆ myTurn()

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

Implements org.turro.elephant.direct.IDirectContent.

Definition at line 118 of file CreateIssueCtrl.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: