19 package org.turro.financials.model.document.contract;
21 import java.io.UnsupportedEncodingException;
22 import java.util.HashMap;
23 import javax.servlet.ServletContext;
24 import javax.servlet.http.HttpServletRequest;
25 import javax.servlet.http.HttpServletResponse;
26 import org.turro.string.ObjectString;
27 import org.turro.action.Actions;
28 import org.turro.auth.Authentication;
29 import org.turro.collections.KeyValueMap;
30 import org.turro.elephant.context.ElephantContext;
31 import org.turro.elephant.context.IConstructor;
32 import org.turro.elephant.direct.DirectContent;
33 import org.turro.elephant.direct.DirectContents;
34 import org.turro.elephant.direct.IDirectContent;
35 import org.turro.elephant.security.IUser;
36 import org.turro.financials.db.FinancialsPU;
37 import org.turro.financials.entity.Document;
38 import org.turro.financials.model.document.GenerateDocument;
39 import org.turro.plugin.contacts.IContact;
45 @DirectContent(identifier=
"document-pdf")
50 if(contact !=
null && contact.
isWebUser()) {
51 HashMap<String, String> values =
new HashMap<>();
53 values.put(
"documentId", ObjectString.formatNativeObject(document.getId(),
false));
67 public boolean itsMe(String
id) {
68 return getIdentifier().equals(
id);
72 public boolean myTurn(HttpServletRequest request) {
77 public void execute(ServletContext context, HttpServletRequest request, HttpServletResponse response) {
static String createAction(String email, String redir)
static final String USER_PAR
static KeyValueMap getAction(IConstructor constructor)
static boolean prepareActions(IConstructor constructor, KeyValueMap values)
static IContact getIContact()
static IConstructor getConstructor(HttpServletRequest request, HttpServletResponse response)
static String getRootWebPath()
static boolean isYourTurn(HttpServletRequest request, String path)
static final String DIRECT_CONTENT_PATH
void outputDocument(Document doc, boolean showValues, OutputStream out)
void execute(ServletContext context, HttpServletRequest request, HttpServletResponse response)
static String createURL(IConstructor constructor, Document document)
static String getIdentifier()
boolean myTurn(HttpServletRequest request)
static final String CONNECTOR_EMAIL