public interface IConfigService
Modifier and Type | Method and Description |
---|---|
java.lang.String |
deleteConfig(java.lang.String name,
java.lang.String type,
java.lang.String ticket,
java.lang.String appId,
javax.servlet.http.HttpServletRequest request)
Delete the config by name
|
java.io.ByteArrayOutputStream |
exportConfigByPath(java.lang.String ticket,
java.lang.Boolean userPref,
java.lang.String appId,
java.util.List<java.lang.String> failedDocs)
This method builds up a ZipOutputStream and an oco of the config folder (appId) to be zipped and exported
and then calls the zipSubDirectory on that folder, which returns a byte array output stream containing the zip
for the browser to download
|
java.util.Map<java.lang.String,java.lang.String> |
extractFolder(java.lang.String zipName,
java.lang.String ticket,
java.io.InputStream configStream)
Import configs - this method receives zip file data from the front end and extracts those files
into the users docbase by creating versions if the files already exist, or creating new ones if
they do not
|
void |
findOrCreateAppIdFolder(java.lang.String ticket,
java.lang.String appId)
Looks for the app id folder and creates it if it does not exist
|
org.json.JSONObject |
getConfigByName(java.lang.String type,
java.lang.String name,
java.lang.String ticket,
boolean latest,
boolean shallow,
java.lang.String appId)
Return a TSG configuration for internal use in OpenContent.
|
java.lang.Object |
getConfigByName(java.lang.String type,
java.lang.String name,
java.lang.String ticket,
boolean latest,
boolean shallow,
java.lang.String appId,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
This method returns a TSG configuration.
|
java.lang.Object |
getConfigByPathId(java.lang.String id,
java.lang.String ticket,
java.lang.String appId,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
This method returns a config by id.
|
java.util.List |
getConfigByType(java.lang.String type,
java.lang.String ticket,
boolean latest,
boolean fullConfigs,
java.lang.String appId)
This method returns a TSG configuration.
|
java.lang.String |
getRootPath()
returns the injected root path for hpi
|
java.lang.String |
saveConfig(java.lang.String name,
java.lang.String type,
java.lang.String ticket,
java.lang.String appId,
javax.servlet.http.HttpServletRequest request)
Save config
|
java.lang.String |
updateConfig(java.lang.String name,
java.lang.String type,
java.lang.String ticket,
java.lang.String appId,
javax.servlet.http.HttpServletRequest request)
Update config
|
java.lang.String |
updateConfigById(java.lang.String type,
java.lang.String id,
java.lang.String ticket,
javax.servlet.http.HttpServletRequest request)
Update config by id rather then name
|
java.util.List getConfigByType(java.lang.String type, java.lang.String ticket, boolean latest, boolean fullConfigs, java.lang.String appId)
type
- - The type of configticket
- - The resolved session ticketlatest
- - By default returns the 'active' config. If true this will return the current version of the configuration.fullConfigs
- appId
- - The application id that allows for separation of configs.java.lang.Object getConfigByName(java.lang.String type, java.lang.String name, java.lang.String ticket, boolean latest, boolean shallow, java.lang.String appId, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
type
- - The type of configname
- - The name of the config objectticket
- - The resolved session ticketlatest
- - By default returns the 'active' config. If true this will return the current version of the configuration.shallow
- appId
- - The application id that allows for separation of configs.org.json.JSONObject getConfigByName(java.lang.String type, java.lang.String name, java.lang.String ticket, boolean latest, boolean shallow, java.lang.String appId)
type
- name
- ticket
- latest
- shallow
- request
- response
- java.lang.Object getConfigByPathId(java.lang.String id, java.lang.String ticket, java.lang.String appId, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
id
- - id of object requestticket
- - The ticket from the requestappId
- - The application id that allows for separation of configs.java.lang.String saveConfig(java.lang.String name, java.lang.String type, java.lang.String ticket, java.lang.String appId, javax.servlet.http.HttpServletRequest request)
name
- - The name of the config objecttype
- - The type of config objectticket
- - The resolved session ticketappId
- - The application id that allows for separation of configsrequest
- java.lang.String updateConfigById(java.lang.String type, java.lang.String id, java.lang.String ticket, javax.servlet.http.HttpServletRequest request)
type
- - the object typeid
- - the object idticket
- - The resolved session ticketrequest
- the requestjava.lang.String updateConfig(java.lang.String name, java.lang.String type, java.lang.String ticket, java.lang.String appId, javax.servlet.http.HttpServletRequest request)
name
- - The name of the config objecttype
- - The type of config objectticket
- - The resolved session ticketrequest
- java.lang.String deleteConfig(java.lang.String name, java.lang.String type, java.lang.String ticket, java.lang.String appId, javax.servlet.http.HttpServletRequest request)
name
- - The name of the config objecttype
- - The type of config objectticket
- - The resolved session ticketappId
- - The application id that allows for separation of configs.request
- java.io.ByteArrayOutputStream exportConfigByPath(java.lang.String ticket, java.lang.Boolean userPref, java.lang.String appId, java.util.List<java.lang.String> failedDocs) throws OCRuntimeException
ticket
- - the session/cookie ticket from HPIuserPref
- - boolean indicating whether to include user preferencesappId
- - the name of the config folder, located at /hpi/"appId"failedDocs
- - used by addDocumentToZip to keep track of documents that fail to add to the zipjava.io.IOException
OCRuntimeException
java.util.Map<java.lang.String,java.lang.String> extractFolder(java.lang.String zipName, java.lang.String ticket, java.io.InputStream configStream) throws OCRuntimeException
ticket
- - The resolved session ticketconfigStream
- - a ZipStream containing all of the file data from the front endjava.io.FileNotFoundException
java.io.IOException
OCRuntimeException
void findOrCreateAppIdFolder(java.lang.String ticket, java.lang.String appId)
java.lang.String getRootPath()