public class HttpService extends Service implements csbase.remote.HttpServiceInterface
HttpService implementa o serviço de download e upload
de arquivos. Cada requisicao de dowload e' inserida na requestList, para um
usuario, projeto e filePath Nulo, alem de a data de criacao do registro. O
filePath e' nulo no download pois o arquivo pode ter referencias para outros
arquivos que possuem caminhos distintos, sendo que estes precisam de um mesmo
codigo de acesso.| Modifier | Constructor and Description |
|---|---|
protected |
HttpService() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
createFile(String accessCode,
String fileName) |
static void |
createService()
Constrói a instância do serviço.
|
boolean |
finishUpload(String accessCode,
String fileName)
Remove o upload da lista de requisicoes e informa que o arquivo nao esta'
mais em construcao, se foi um upload de arquivo de projeto.
|
String |
getDownloadCSVURL(Object userId,
String password,
String text)
Pega a URL que será chamada pelo browser quando o tipo de dowload for CSV.
|
String |
getDownloadCSVURL(Object userId,
String password,
String text,
String fileName)
Pega a URL que será chamada pelo browser quando o tipo de dowload for CSV.
|
String |
getDownloadCSVURL(String text)
Pega a URL que será chamada pelo browser quando o tipo de dowload for CSV.
|
String |
getDownloadCSVURL(String text,
String fileName)
Pega a URL que será chamada pelo browser quando o tipo de dowload for CSV.
|
String |
getDownloadPDFReportURL(String filePath,
Map parameters,
String jdbcDriverClassName,
String jdbcURL,
String jdbcUser,
String jdbcPassword)
Obtém a URL para a exibição de um relatório no formato pdf em um navegador
web.
|
String |
getDownloadTextURL(Object userId,
String password,
String text) |
String |
getDownloadTextURL(Object userId,
String password,
String text,
String fileName) |
String |
getDownloadTextURL(String text) |
int |
getDownloadType(String accessCode) |
String |
getDownloadURL(Object userId,
String password,
Object projectId,
String[] filePath) |
String |
getDownloadURL(String filePath) |
String |
getDownloadURL(String filePath,
Map<String,String> parameters) |
String |
getFileDownloadURL(String filePath)
Obtém uma URL para exibição de um arquivo do sistema de arquivos (NFS) em
um navegador web.
|
String |
getFilePath(String accessCode) |
String |
getFilePath(String accessCode,
String filePath) |
String |
getFileType(String accessCode,
String filePath) |
static HttpService |
getInstance() |
String |
getJdbcDriverClassName(String accessCode) |
String |
getJdbcPassword(String accessCode) |
String |
getJdbcURL(String accessCode) |
String |
getJdbcUser(String accessCode) |
Map |
getParameters(String accessCode) |
String |
getPresentationPath(String accessCode) |
int |
getRequestListSize()
Obtém o número de requisições de download retidos em memória, aguardando
limpeza periódica.
|
String |
getResultPath(String accessCode) |
String |
getText(String accessCode) |
String |
getUploadURL(Object userId,
String password,
Object projectId,
String[] filePath,
String fileType) |
String |
getUploadURL(String filePath,
String presentationPath,
String resultPath) |
String |
getUploadURL(String filePath,
String presentationPath,
String resultPath,
Observer obs) |
String |
getUploadURL(String filePath,
String presentationPath,
String resultPath,
UploadHandler fileHandler) |
protected boolean |
has2Update(Object arg,
Object event) |
void |
initService()
Inicialização do serviço.
|
boolean |
isDirectory(String accessCode) |
void |
shutdownService()
Término do serviço.
|
getBooleanProperty, getDefaultLocale, getDoubleProperty, getExternalPropertyFile, getFormattedString, getFormattedString, getInitializationDependencies, getInstance, getIntProperty, getKey, getLongProperty, getName, getOptionalString, getOptionalString, getOSPropertyPath, getSenderName, getServices, getString, getString, getStringListProperty, getStringProperty, getSystemId, getThreadLocale, getUser, getUserPermission, hasProperty, incrCounter, isActive, isEnabled, isInternalServerRequest, isLoggingNotifications, isPropertyNull, logNotification, setEnabled, setKey, setSystemId, setUserIdhandleException, handleFatalErroraddObserver, countObservers, deleteObserver, deleteObserver, deleteObservers, has2update, notifyObserversprotected HttpService()
throws ServerException
ServerExceptionpublic static void createService()
throws ServerException
ServerExceptionpublic String getDownloadURL(Object userId, String password, Object projectId, String[] filePath) throws RemoteException
getDownloadURL in interface csbase.remote.HttpServiceInterfaceRemoteExceptionpublic String getUploadURL(Object userId, String password, Object projectId, String[] filePath, String fileType) throws RemoteException
getUploadURL in interface csbase.remote.HttpServiceInterfaceRemoteExceptionpublic String getFileType(String accessCode, String filePath) throws RemoteException
getFileType in interface csbase.remote.HttpServiceInterfaceRemoteExceptionpublic int getDownloadType(String accessCode) throws RemoteException
getDownloadType in interface csbase.remote.HttpServiceInterfaceRemoteExceptionpublic boolean createFile(String accessCode, String fileName) throws RemoteException
createFile in interface csbase.remote.HttpServiceInterfaceRemoteExceptionpublic String getFilePath(String accessCode) throws RemoteException
getFilePath in interface csbase.remote.HttpServiceInterfaceRemoteExceptionpublic String getFilePath(String accessCode, String filePath) throws RemoteException
getFilePath in interface csbase.remote.HttpServiceInterfaceRemoteExceptionpublic String getPresentationPath(String accessCode) throws RemoteException
getPresentationPath in interface csbase.remote.HttpServiceInterfaceRemoteExceptionpublic String getResultPath(String accessCode) throws RemoteException
getResultPath in interface csbase.remote.HttpServiceInterfaceRemoteExceptionpublic boolean isDirectory(String accessCode) throws RemoteException
isDirectory in interface csbase.remote.HttpServiceInterfaceRemoteExceptionpublic boolean finishUpload(String accessCode, String fileName) throws csbase.exception.HttpServiceException
finishUpload in interface csbase.remote.HttpServiceInterfaceaccessCode - fileName - O nome original do arquivo que sofreu upload.csbase.exception.HttpServiceException - .public String getFileDownloadURL(String filePath) throws RemoteException
filePath - caminho absoluto do arquivo no sistema de arquivos.RemoteExceptionpublic String getDownloadPDFReportURL(String filePath, Map parameters, String jdbcDriverClassName, String jdbcURL, String jdbcUser, String jdbcPassword) throws RemoteException
filePath - caminho absoluto do arquivo .jasper que representa o layout
do relatórioparameters - parâmetros passados para o relatóriojdbcDriverClassName - nome da classe do driver jdbc para criação da
conexão usada no relatóriojdbcURL - URL de acesso para criação da conexão usada no relatóriojdbcUser - usuário de acesso para criação da conexão usada no
relatóriojdbcPassword - senha de acesso para criação da conexão usada no
relatórioRemoteExceptionpublic Map getParameters(String accessCode) throws RemoteException
getParameters in interface csbase.remote.HttpServiceInterfaceRemoteExceptionpublic String getJdbcDriverClassName(String accessCode) throws RemoteException
getJdbcDriverClassName in interface csbase.remote.HttpServiceInterfaceRemoteExceptionpublic String getJdbcURL(String accessCode) throws RemoteException
getJdbcURL in interface csbase.remote.HttpServiceInterfaceRemoteExceptionpublic String getJdbcUser(String accessCode) throws RemoteException
getJdbcUser in interface csbase.remote.HttpServiceInterfaceRemoteExceptionpublic String getJdbcPassword(String accessCode) throws RemoteException
getJdbcPassword in interface csbase.remote.HttpServiceInterfaceRemoteExceptionpublic String getUploadURL(String filePath, String presentationPath, String resultPath) throws RemoteException
RemoteExceptionpublic String getUploadURL(String filePath, String presentationPath, String resultPath, UploadHandler fileHandler)
public String getUploadURL(String filePath, String presentationPath, String resultPath, Observer obs)
public String getDownloadURL(String filePath) throws RemoteException
RemoteExceptionpublic String getDownloadURL(String filePath, Map<String,String> parameters) throws RemoteException
RemoteExceptionpublic String getDownloadTextURL(Object userId, String password, String text) throws RemoteException
getDownloadTextURL in interface csbase.remote.HttpServiceInterfaceRemoteExceptionpublic String getDownloadTextURL(String text) throws RemoteException
RemoteExceptionpublic String getDownloadTextURL(Object userId, String password, String text, String fileName) throws RemoteException
getDownloadTextURL in interface csbase.remote.HttpServiceInterfaceRemoteExceptionpublic String getDownloadCSVURL(Object userId, String password, String text) throws RemoteException
getDownloadCSVURL in interface csbase.remote.HttpServiceInterfaceuserId - identificação do usuário.password - senha do usuário.text - texto contendo o conteúdo do CSV.RemoteExceptionpublic String getDownloadCSVURL(String text) throws RemoteException
text - texto contendo o conteúdo do CSV.RemoteExceptionpublic String getDownloadCSVURL(String text, String fileName) throws RemoteException
text - texto contendo o conteúdo do CSV.fileName - nome do arquivo gerado para downloadRemoteExceptionpublic String getText(String accessCode) throws RemoteException
getText in interface csbase.remote.HttpServiceInterfaceRemoteExceptionprotected boolean has2Update(Object arg, Object event)
has2Update in class csbase.remote.RemoteObjectObservablepublic void shutdownService()
throws ServerException
shutdownService in class ServiceServerException - .public void initService()
throws ServerException
initService in class ServiceServerException - se ocorrer um erro na inicializaçãopublic static HttpService getInstance()
public String getDownloadCSVURL(Object userId, String password, String text, String fileName) throws RemoteException
getDownloadCSVURL in interface csbase.remote.HttpServiceInterfaceuserId - identificação do usuário.password - senha do usuário.text - texto contendo o conteúdo do CSV.fileName - nome do arquivo que será geradoRemoteExceptionpublic int getRequestListSize()
throws RemoteException
getRequestListSize in interface csbase.remote.HttpServiceInterfaceRemoteExceptionCopyright © 2017. All rights reserved.