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

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 editDossier (String dossierId, String link, String template)
 
static String editDossier (Dossier dossier, String link, 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 64 of file EditDossierCtrl.java.

Member Function Documentation

◆ editDossier() [1/2]

static String org.turro.dossier.www.EditDossierCtrl.editDossier ( Dossier  dossier,
String  link,
String  template 
)
static

Definition at line 72 of file EditDossierCtrl.java.

72  {
73  IConstructor constructor = Application.getApplication().getConstructor();
74  if(dossier != null) {
75  DossierWrapper wrapper = new DossierWrapper(dossier);
76  if(wrapper.isParticipant()) {
77  ElephantMarker marker = new ElephantMarker(constructor);
78  marker.put("action", DirectContents.createRelativeURL(getIdentifier()));
79  marker.put("redirect", link);
80  marker.put("webDefault", DescribeItUtil.descriptionString(DescribeItUtil.DEFAULT_ID, dossier));
81  marker.put("dossier", dossier);
82  AttachCtrl ac = new AttachCtrl(constructor);
83  ac.setEntityPath(DossierPU.getObjectPath(dossier));
84  ac.setPublicOnly(false);
85  marker.put("ac", ac.parseAttachments());
86  return marker.parse("dossier", Strings.isBlank(template) ? "editDossier" : template);
87  }
88  }
89  return "";
90  }
Here is the call graph for this function:

◆ editDossier() [2/2]

static String org.turro.dossier.www.EditDossierCtrl.editDossier ( String  dossierId,
String  link,
String  template 
)
static

Definition at line 66 of file EditDossierCtrl.java.

66  {
67  Long id = Long.valueOf(dossierId);
68  Dossier dossier = new DossierPU().find(Dossier.class, id);
69  return editDossier(dossier, link, template);
70  }
static String editDossier(String dossierId, String link, String template)
Here is the caller graph for this function:

◆ execute()

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

Implements org.turro.elephant.direct.IDirectContent.

Definition at line 107 of file EditDossierCtrl.java.

107  {
108  if(ServletFileUpload.isMultipartContent(request)) {
109  try {
110  processInformation(request, response);
111  } catch (FileUploadException | IOException ex) {
112  Logger.getLogger(EditDossierCtrl.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(null), ex);
113  }
114  }
115  }
Here is the call graph for this function:

◆ getIdentifier()

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

Definition at line 92 of file EditDossierCtrl.java.

92  {
93  return EditDossierCtrl.class.getAnnotation(DirectContent.class).identifier();
94  }

◆ itsMe()

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

Implements org.turro.elephant.direct.IDirectContent.

Definition at line 97 of file EditDossierCtrl.java.

97  {
98  return getIdentifier().equals(id);
99  }

◆ myTurn()

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

Implements org.turro.elephant.direct.IDirectContent.

Definition at line 102 of file EditDossierCtrl.java.

102  {
103  return DirectContents.isYourTurn(request, getIdentifier());
104  }
Here is the call graph for this function:

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