public abstract class BaseExternalHandler
extends com.labvantage.sapphire.BaseCustom
implements com.labvantage.sapphire.util.cache.CacheNames, com.labvantage.sapphire.servlet.externalapp.ExternalAppConstants
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONNECTIONID |
static java.lang.String |
DATABASE |
static java.lang.String |
GETCONNECTIONID |
static java.lang.String |
PASSWORD |
static java.lang.String |
USERNAME |
CACHE_ACTION_ATTACHMENTS, CACHE_ACTION_DEFINITION, CACHE_ACTION_PROPERTYLIST, CACHE_ACTION_ROLES, CACHE_APP_RESOURCE_SDIS, CACHE_APP_RESOURCE_TAGS, CACHE_ASSIGNMENT_RESOURCEDATA, CACHE_ATTACHMENTS_EXPLODEDPATH, CACHE_ATTACHMENTS_LOCALFILE, CACHE_AUTHTOKEN, CACHE_AUTHTOKEN_CONNECTIONID, CACHE_CALENDAR, CACHE_CLASSLOADERS, CACHE_CONNECTION_PROPERTIES, CACHE_DATACHART, CACHE_DEFAULT_PAGE_EDITION, CACHE_DEPARTMENT, CACHE_DEPARTMENT_SCHEDULE, CACHE_DEPARTMENTUSERS, CACHE_EDITORSTYLE, CACHE_EVENTMANAGER, CACHE_EXPRESSIONPREFIX, CACHE_EXTERNALAPP, CACHE_FORM_DEFINITION, CACHE_GIZMO, CACHE_GIZMO_DEFAULTS, CACHE_GIZMODEF, CACHE_GIZMODEF_ACCESS, CACHE_GIZMODEF_ALL, CACHE_GIZMODEF_ASSETS, CACHE_GIZMODEF_SECURED, CACHE_GIZMODEF_USER, CACHE_GUIMODES, CACHE_IMAGEREF, CACHE_PARAMLIST_CURRENTVERSION, CACHE_PROFILE_PROPERTIES, CACHE_PROPERTYTREE, CACHE_PROPERTYTREE_NODE, CACHE_REFVALUES, CACHE_SCHEDULE_EXCLUDES, CACHE_SCHEDULE_TASK_NODE_PROPERTIES, CACHE_SCHEDULE_TASK_PROPERTYTREE, CACHE_SCHEDULEGRID, CACHE_SDC, CACHE_SDC_LINKDATA, CACHE_SPECRULES, CACHE_STEPTYPE, CACHE_SYSCONFIG_PROPERTIES, CACHE_TABLE_COLUMNS, CACHE_TASKDEF, CACHE_TASKSTEPPROPS, CACHE_TASKSTEPTYPEPROPS, CACHE_TESTMETHOD, CACHE_UNITCONVERSION, CACHE_USER_SCHEDULES, CACHE_WEBPAGE_ACCESS, CACHE_WEBPAGE_FILENAME, CACHE_WEBPAGE_PROPERTIES, CACHE_WEBPAGE_PROPERYTREE, CACHE_WEBPAGE_TREEELEMENT, CACHE_WEBPAGE_USEROVERRIDES, CACHE_WORKITEM
COMMAND_CHECKCONNECTION, COMMAND_CLEARCONNECTION, COMMAND_GETCONNECTIONID, COMMAND_ISTOKENACTIVE, COMMAND_REQUESTTOKEN, COMMANDRESPONSE_EXCEPTION, CONNECTION_DEVICEID, ERROR_EXTERNALAPP_DISABLED, ERROR_EXTERNALAPP_NOTFOUND, ERROR_INVALID_HANDLER, ERROR_PROCESSAS_INVALID, ERROR_TOKEN_EXPIRED, ERROR_UNRECOGNIZED_TOKEN, EXTERNALAPP_STATUS_ACTIVE, EXTERNALAPP_STATUS_DISABLED, PROCESSAS_ANY, PROCESSAS_DEPARTMENT, PROCESSAS_NEVER, PROCESSAS_ROLE, PROCESSAS_USER
ERROR_CONNECTION_INVALID, ERROR_CONNECTION_REFUSED, ERROR_INVALID_REQUEST_METHOD, ERROR_MALFORMED_REQUEST_BODY, ERROR_MALFORMED_REQUEST_URL, ERROR_RESOURCE_NOT_AVAILABLE, ERROR_RESOURCE_NOT_FOUND, ERROR_UNEXPECTED_SERVER_ERROR, HTTPCODE_BAD_REQUEST, HTTPCODE_CONFLICT, HTTPCODE_CREATED, HTTPCODE_FORBIDDEN, HTTPCODE_METHOD_NOT_ALLOWED, HTTPCODE_NO_CONTENT, HTTPCODE_NOT_FOUND, HTTPCODE_NOT_MODIFIED, HTTPCODE_OK, HTTPCODE_SERVER_ERROR, HTTPCODE_UNAUTHORIZED, HTTPHEADER_LOCATION, HTTPSTATUS_BAD_REQUEST, HTTPSTATUS_CONFLICT, HTTPSTATUS_CREATED, HTTPSTATUS_FORBIDDEN, HTTPSTATUS_METHOD_NOT_ALLOWED, HTTPSTATUS_NO_CONTENT, HTTPSTATUS_NOT_FOUND, HTTPSTATUS_NOT_MODIFIED, HTTPSTATUS_OK, HTTPSTATUS_SERVER_ERROR, HTTPSTATUS_UNAUTHORIZED, MESSAGE, METHOD_DELETE, METHOD_GET, METHOD_POST, METHOD_PUT, NAMESPACE_ACTIONS, NAMESPACE_API, NAMESPACE_CONNECTIONS, NAMESPACE_LABVANTAGE, NAMESPACE_SDC
Constructor and Description |
---|
BaseExternalHandler() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getAuthenticationValue(java.lang.String authenticationParam,
HttpServletRequest request,
HttpServletResponse response)
Internal.
|
java.lang.String |
getDatabaseId()
Get the databaseid this command handler is associated with
|
java.lang.String |
getExternalAppid()
Get the external app this command handler is associated with
|
java.lang.String |
getExternalUserid()
Get the external user this command handler is associated with
|
static BaseExternalHandler |
getInstance(HttpServletRequest request,
HttpServletResponse response)
Internal.
|
java.lang.String |
getProcessAsUserId()
Get the process-as user this command handler is associated with
|
org.json.JSONObject |
processCommand(java.lang.String command,
org.json.JSONObject commandRequest)
Overide this method to handle commands coming from an external app.
|
PropertyList |
processCommand(java.lang.String command,
PropertyList commandRequest)
Overide this method to handle commands coming from an external app.
|
org.json.JSONObject |
processFileCommand(java.lang.String command,
java.nio.file.Path file,
org.json.JSONObject commandRequest)
Overide this method to handle commands coming from an external app that are accompanited by a file.
|
org.json.JSONObject |
processFileCommand(java.lang.String command,
java.lang.String filename,
java.io.InputStream inputStream,
org.json.JSONObject commandRequest)
Overide this method to handle commands coming from an external app that are accompanited by a file.
|
java.io.File |
processFileDownloadCommand(java.lang.String command,
org.json.JSONObject commandRequest)
Overide this method to handle commands coming from an external app that require a file to be downloaded
|
void |
setDatabaseId(java.lang.String databaseId)
Internal.
|
void |
setExternalAppid(java.lang.String externalAppid)
Internal.
|
void |
setExternalUserid(java.lang.String externalUserid)
Internal.
|
void |
setProcessAsUserId(java.lang.String processAsUserId)
Internal.
|
getAccessorErrorIds, getAccessorErrorMsgs, getActionProcessor, getConfigurationProcessor, getConnectionid, getConnectionId, getConnectionProcessor, getDAMProcessor, getDepartmentList, getHttpProcessor, getQueryProcessor, getRakFile, getSDCProcessor, getSDIProcessor, getSequenceProcessor, getTranslationProcessor, setConnectionId, setLanguage, setRakFile
public static final java.lang.String GETCONNECTIONID
public static final java.lang.String USERNAME
public static final java.lang.String PASSWORD
public static final java.lang.String DATABASE
public static final java.lang.String CONNECTIONID
public org.json.JSONObject processCommand(java.lang.String command, org.json.JSONObject commandRequest) throws SapphireException
command
- the command to executecommandRequest
- the set of parametersSapphireException
public PropertyList processCommand(java.lang.String command, PropertyList commandRequest) throws SapphireException
command
- the command to executecommandRequest
- the set of parametersSapphireException
public org.json.JSONObject processFileCommand(java.lang.String command, java.nio.file.Path file, org.json.JSONObject commandRequest) throws SapphireException
command
- the command to executefile
- the file associated with the commandcommandRequest
- the set of parametersSapphireException
public org.json.JSONObject processFileCommand(java.lang.String command, java.lang.String filename, java.io.InputStream inputStream, org.json.JSONObject commandRequest) throws SapphireException
command
- the command to executefilename
- the file associated with the commandinputStream
- a stream of the file associated with the commandcommandRequest
- the set of parametersSapphireException
public java.io.File processFileDownloadCommand(java.lang.String command, org.json.JSONObject commandRequest) throws SapphireException
command
- the command to executecommandRequest
- the set of parametersSapphireException
public java.lang.String getDatabaseId()
public java.lang.String getExternalAppid()
public java.lang.String getExternalUserid()
public java.lang.String getProcessAsUserId()
public static BaseExternalHandler getInstance(HttpServletRequest request, HttpServletResponse response) throws com.labvantage.sapphire.servlet.externalapp.ExternalAppException
com.labvantage.sapphire.servlet.externalapp.ExternalAppException
public static java.lang.String getAuthenticationValue(java.lang.String authenticationParam, HttpServletRequest request, HttpServletResponse response)
public void setExternalAppid(java.lang.String externalAppid)
public void setExternalUserid(java.lang.String externalUserid)
public void setProcessAsUserId(java.lang.String processAsUserId)
public void setDatabaseId(java.lang.String databaseId)