BrightSide Workbench Full Report + Source Code
org.turro.pivot.servlet.PivotServices Class Reference
Inheritance diagram for org.turro.pivot.servlet.PivotServices:
Collaboration diagram for org.turro.pivot.servlet.PivotServices:

Protected Member Functions

void service (HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
 
Object doGet (Path path) throws QueryException
 
URL doPost (Path path, Object value) throws QueryException
 
Serializer<?> createSerializer (Path path)
 

Detailed Description

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

Definition at line 41 of file PivotServices.java.

Member Function Documentation

◆ createSerializer()

Serializer<?> org.turro.pivot.servlet.PivotServices.createSerializer ( Path  path)
protected

Definition at line 130 of file PivotServices.java.

130  {
131  if("/upload".equals(path.toString()) || "/download".equals(path.toString())) {
132  return new FileSerializer();
133  }
134  return new BinarySerializer();
135  }

◆ doGet()

Object org.turro.pivot.servlet.PivotServices.doGet ( Path  path) throws QueryException
protected

Definition at line 50 of file PivotServices.java.

50  {
51  if("/queryFolders".equals(path.toString())) {
52  return new ArrayList<String>(new ListAdapter(AttachWd.queryFolders(
53  getParameters().get("path"),
54  getParameters().get("user"))));
55  } else if ("/queryFiles".equals(path.toString())) {
56  return new ArrayList<ServerFile>(new ListAdapter<ServerFile>(AttachWd.queryVersionedAttachments(
57  getParameters().get("path"),
58  getParameters().get("user"))));
59  } else if ("/download".equals(path.toString())) {
60  return AttachWd.convertToFile(
61  getParameters().get("path"),
62  getParameters().get("fileName"),
63  getParameters().get("user"),
64  "true".equals(getParameters().get("forEditing")));
65  } else if ("/unlock".equals(path.toString())) {
66  return AttachWd.unlockFile(
67  getParameters().get("path"),
68  getParameters().get("fileName"),
69  getParameters().get("user"));
70  } else {
71 // IContact contact = getContact();
72 // if(contact != null) {
73 // if("userFolders".equals(getParameters().get("action"))) {
74 // ServerFolders sf = new ServerFolders();
75 // sf.setServerDate(new Date());
76 // sf.setServerUser(Base64.encode("root".getBytes()));
77 // sf.setServerPass(Base64.encode("organic1i1".getBytes()));
78 // FolderProperties fp;
79 // if(true) { //app.isInRole("my-documents:list")) {
80 // fp = new FolderProperties(
81 // null,
82 // "My Documents",
83 // null,
84 // null,
85 // "/WEB-INF/mydocuments/" + contact.getId());
86 // sf.getUserFolders().put(fp.getFolderName(), fp);
87 // }
88 // if(true) { //app.isInRole("file-attach:self")) {
89 // fp = new FolderProperties(
90 // contact.getId(),
91 // contact.getName(),
92 // null,
93 // "/Contact",
94 // "/WEB-INF/files/contact/" + contact.getId());
95 // sf.getUserFolders().put(fp.getFolderName(), fp);
96 // fp = new FolderProperties(
97 // contact.getId(),
98 // contact.getName(),
99 // "Publishable",
100 // "/Contact",
101 // "/_internal/files/contact/" + contact.getId());
102 // sf.getUserFolders().put(fp.getFolderName(), fp);
103 // }
104 // // fill
105 // convertPathToAbsolute(sf);
106 // return sf;
107 // }
108 // }
109  }
110  return null;
111  }
Here is the call graph for this function:

◆ doPost()

URL org.turro.pivot.servlet.PivotServices.doPost ( Path  path,
Object  value 
) throws QueryException
protected

Definition at line 114 of file PivotServices.java.

114  {
115  if("/upload".equals(path.toString())) {
116  AttachWd.saveFromFile((File) value,
117  getParameters().get("fileName"),
118  getParameters().get("fileDate"),
119  getParameters().get("path"),
120  getParameters().get("user"),
121  getParameters().get("comment"),
122  "true".equals(getParameters().get("lock")),
123  false);
124  }
125  return null;
126  }
Here is the call graph for this function:

◆ service()

void org.turro.pivot.servlet.PivotServices.service ( HttpServletRequest  request,
HttpServletResponse  response 
) throws IOException, ServletException
protected

Definition at line 44 of file PivotServices.java.

44  {
45  request.setAttribute("el_app", new ElephantApplication(request, response));
46  super.service(request, response);
47  }

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