it.eng.spagobi.analiticalmodel.execution.service
Class SaveDocumentAction

java.lang.Object
  extended by it.eng.spago.dispatching.service.DefaultRequestContext
      extended by it.eng.spago.dispatching.service.DefaultHttpRequestContext
          extended by it.eng.spago.dispatching.action.AbstractHttpAction
              extended by it.eng.spagobi.utilities.service.AbstractBaseHttpAction
                  extended by it.eng.spagobi.commons.services.AbstractSpagoBIAction
                      extended by it.eng.spagobi.analiticalmodel.execution.service.SaveDocumentAction
All Implemented Interfaces:
it.eng.spago.dispatching.action.ActionIFace, it.eng.spago.dispatching.service.HttpRequestContextIFace, it.eng.spago.dispatching.service.RequestContextIFace, it.eng.spago.dispatching.service.ServiceIFace, it.eng.spago.init.InitializerIFace, java.io.Serializable

public class SaveDocumentAction
extends AbstractSpagoBIAction

See Also:
Serialized Form

Field Summary
static java.lang.String BIOBJ_TYPE_DOMAIN_CD
           
static java.lang.Integer MODIFIABLE
           
static java.lang.Integer MULTIVALUE
           
static java.lang.String OBJ_DATASET_ID
           
static java.lang.String OBJ_DATASET_LABEL
           
static java.lang.Integer REQUIRED
           
static java.lang.Integer VISIBLE
           
 
Fields inherited from class it.eng.spagobi.commons.services.AbstractSpagoBIAction
SERVICE_NAME
 
Constructor Summary
SaveDocumentAction()
           
 
Method Summary
protected  ObjTemplate createNewTemplate(byte[] content)
           
 void doService()
           
protected  byte[] getTemplateContent()
           
 org.json.JSONObject parseRequest()
           
 
Methods inherited from class it.eng.spagobi.commons.services.AbstractSpagoBIAction
checkError, createContext, getContext, getLocale, getTheme, getUserProfile, handleException, init, localize, service, writeErrorsBackToClient
 
Methods inherited from class it.eng.spagobi.utilities.service.AbstractBaseHttpAction
delAttributeFromHttpSession, delAttributeFromSession, getAttribute, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsCsvStringList, getAttributeAsInteger, getAttributeAsJSONArray, getAttributeAsJSONObject, getAttributeAsList, getAttributeAsString, getAttributeFromHttpSession, getAttributeFromHttpSessionAsBoolean, getAttributeFromHttpSessionAsBoolean, getAttributeFromHttpSessionAsString, getAttributeFromSession, getAttributeFromSessionAsBoolean, getAttributeFromSessionAsBoolean, getAttributeFromSessionAsString, getAttributesAsLinkedMap, getAttributesAsMap, getHttpSession, getSessionContainer, getSpagoBIHttpSessionContainer, getSpagoBIRequestContainer, getSpagoBIResponseContainer, getSpagoBISessionContainer, httpSessionContainsAttribute, requestContainsAttribute, requestContainsAttribute, sessionContainsAttribute, setAttribute, setAttributeInHttpSession, setAttributeInSession, setSpagoBIRequestContainer, setSpagoBIResponseContainer, tryToWriteBackToClient, writeBackToClient, writeBackToClient, writeBackToClient, writeBackToClient, writeBackToClient
 
Methods inherited from class it.eng.spago.dispatching.action.AbstractHttpAction
getActionMethod, getActionName, getConfig, setActionMethod, setActionName
 
Methods inherited from class it.eng.spago.dispatching.service.DefaultHttpRequestContext
freezeHttpResponse, getHttpRequest, getHttpResponse, getServletConfig, isHttpResponseFreezed, setRequestContext, unfreezeHttpResponse
 
Methods inherited from class it.eng.spago.dispatching.service.DefaultRequestContext
getErrorHandler, getRequestContainer, getResponseContainer, getServiceRequest, getServiceResponse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface it.eng.spago.dispatching.service.RequestContextIFace
getErrorHandler, getRequestContainer, getResponseContainer, getServiceRequest, getServiceResponse
 

Field Detail

OBJ_DATASET_ID

public static final java.lang.String OBJ_DATASET_ID
See Also:
Constant Field Values

OBJ_DATASET_LABEL

public static final java.lang.String OBJ_DATASET_LABEL
See Also:
Constant Field Values

BIOBJ_TYPE_DOMAIN_CD

public static final java.lang.String BIOBJ_TYPE_DOMAIN_CD
See Also:
Constant Field Values

REQUIRED

public static final java.lang.Integer REQUIRED

MODIFIABLE

public static final java.lang.Integer MODIFIABLE

MULTIVALUE

public static final java.lang.Integer MULTIVALUE

VISIBLE

public static final java.lang.Integer VISIBLE
Constructor Detail

SaveDocumentAction

public SaveDocumentAction()
Method Detail

doService

public void doService()
Specified by:
doService in class AbstractSpagoBIAction

parseRequest

public org.json.JSONObject parseRequest()
Returns:
a JSON object representing the input request to the service with the following structure: { action: STRING , sourceDataset: { label: STRING } , sourceDocument: { id: NUMBER } , document: { id: NUMBER label: STRING name: STRING description: STRING type: STRING engineId: NUMBER metadata: [JSON, ..., JSON] } , customData: { query: [STRING] workseheet: [JSON] smartfilter: [JSON] } , folders: [STRING, ... , STRING] }

getTemplateContent

protected byte[] getTemplateContent()
                             throws java.lang.Exception
Throws:
java.lang.Exception

createNewTemplate

protected ObjTemplate createNewTemplate(byte[] content)