◆ createPOST() [1/2]
static String org.turro.dossier.command.DossierAction.createPOST |
( |
String |
domId, |
|
|
String |
values |
|
) |
| |
|
static |
Definition at line 68 of file DossierAction.java.
69 return "$.post(\"" + ElephantContext.getRootWebPath() + DirectContents.DIRECT_CONTENT_PATH +
getIdentifier() +
"\"," +
70 "{ exrino : \"" + Actions.createRightNowParameter(values) +
"\", domid: \"" + domId +
"\" })" +
71 ".done(function(data) { $(\"#" + domId +
"\").html(data); });";
static String getIdentifier()
◆ createPOST() [2/2]
static String org.turro.dossier.command.DossierAction.createPOST |
( |
String |
values | ) |
|
|
static |
Definition at line 63 of file DossierAction.java.
64 return "$.post(\"" + ElephantContext.getRootWebPath() + DirectContents.DIRECT_CONTENT_PATH +
getIdentifier() +
"\"," +
65 "{ exrino : \"" + Actions.createRightNowParameter(values) +
"\" })";
◆ createURL()
static String org.turro.dossier.command.DossierAction.createURL |
( |
String |
values | ) |
|
|
static |
Definition at line 74 of file DossierAction.java.
75 String exrino = Actions.createRightNowAction(values);
76 return ElephantContext.getRootWebPath() +
◆ execute()
void org.turro.dossier.command.DossierAction.execute |
( |
ServletContext |
context, |
|
|
HttpServletRequest |
request, |
|
|
HttpServletResponse |
response |
|
) |
| |
Implements org.turro.elephant.direct.IDirectContent.
Definition at line 96 of file DossierAction.java.
97 IConstructor constructor = ElephantContext.getConstructor(request, response);
98 KeyValueMap map = Actions.getRightNowAction(constructor);
100 String type = map.get(
"type");
101 if(
"worth".equals(type)) {
102 processWorth(map, constructor);
103 }
else if(
"participate".equals(type)) {
104 processParticipate(map, constructor);
◆ getIdentifier()
static String org.turro.dossier.command.DossierAction.getIdentifier |
( |
| ) |
|
|
static |
Definition at line 81 of file DossierAction.java.
82 return DossierAction.class.getAnnotation(DirectContent.class).identifier();
◆ isMine()
boolean org.turro.dossier.command.DossierAction.isMine |
( |
WorthDefinition |
worthDefinition, |
|
|
Double |
value |
|
) |
| |
Definition at line 199 of file DossierAction.java.
200 IContact contact = Authentication.getIContact();
201 if(contact !=
null && contact.isWebUser()) {
203 "select v.value from WorthValue v " +
204 "where v.dossier = ? and v.worthDefinition = ? and v.idContact = ?",
206 worthDefinition.getDossier(), worthDefinition, contact.getId()
208 return value.equals(v);
Object getSingleResultOrNull(SqlClause sc)
◆ isParticipant()
boolean org.turro.dossier.command.DossierAction.isParticipant |
( |
Dossier |
dossier, |
|
|
IContact |
contact, |
|
|
String |
label |
|
) |
| |
Definition at line 215 of file DossierAction.java.
216 if(
"Beneficiary".equals(label)) {
217 return dossier.getParticipationsList().isBeneficiary(contact) || hasRequested(dossier, contact, label);
218 }
else if(
"Offerer".equals(label)) {
219 return dossier.getParticipationsList().isOfferer(contact) || hasRequested(dossier, contact, label);
220 }
else if(
"Support".equals(label)) {
221 return dossier.getParticipationsList().isSupport(contact) || hasRequested(dossier, contact, label);
222 }
else if(
"Coordinator".equals(label)) {
223 return dossier.getParticipationsList().isCoordinator(contact) || hasRequested(dossier, contact, label);
224 }
else if(
"Funding".equals(label)) {
225 return dossier.getParticipationsList().isFunding(contact) || hasRequested(dossier, contact, label);
226 }
else if(
"Research".equals(label)) {
227 return dossier.getParticipationsList().isResearch(contact) || hasRequested(dossier, contact, label);
228 }
else if(
"Consortium".equals(label)) {
229 return dossier.getFullParticipants().isConsortium(contact) || hasRequested(dossier, contact, label);
◆ itsMe()
boolean org.turro.dossier.command.DossierAction.itsMe |
( |
String |
id | ) |
|
◆ myTurn()
boolean org.turro.dossier.command.DossierAction.myTurn |
( |
HttpServletRequest |
request | ) |
|
◆ parseWorths()
String org.turro.dossier.command.DossierAction.parseWorths |
( |
IConstructor |
constructor, |
|
|
Dossier |
dossier, |
|
|
String |
root, |
|
|
String |
tmpl, |
|
|
String |
grpg |
|
) |
| |
Definition at line 183 of file DossierAction.java.
184 if(!Strings.isBlank(root) && !Strings.isBlank(tmpl)) {
185 ElephantMarker em =
new ElephantMarker(constructor);
186 em.put(
"control",
this);
187 em.put(
"contact", Authentication.getIContact());
188 em.put(
"dossier", dossier);
189 em.put(
"grouping", grpg);
190 em.put(
"container",
true);
191 em.put(
"controlId", IdGenerator.generateHex());
192 em.put(
"root", root);
193 em.put(
"tmpl", tmpl);
194 return em.parse(root, tmpl);
The documentation for this class was generated from the following file: