/** * MailArchiver is an application that provides services for storing and managing e-mail messages through a Web Services SOAP interface. * Copyright (C) 2012 Marcio Andre Scholl Levien and Fernando Alberto Reuter Wendt and Jose Ronaldo Nogueira Fonseca Junior * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ /******************************************************************************\ * * This product was developed by * * SERVIÇO FEDERAL DE PROCESSAMENTO DE DADOS (SERPRO), * * a government company established under Brazilian law (5.615/70), * at Department of Development of Porto Alegre. * \******************************************************************************/ package serpro.mailarchiver.service.web; import javax.jws.WebParam; import javax.jws.WebService; import javax.jws.soap.SOAPBinding; import javax.jws.soap.SOAPBinding.ParameterStyle; import javax.jws.soap.SOAPBinding.Style; import javax.jws.soap.SOAPBinding.Use; import javax.xml.bind.annotation.XmlSeeAlso; import org.apache.cxf.feature.Features; import org.apache.cxf.interceptor.InFaultInterceptors; import org.apache.cxf.interceptor.InInterceptors; import org.apache.cxf.interceptor.OutFaultInterceptors; import org.apache.cxf.interceptor.OutInterceptors; import serpro.mailarchiver.service.dto.TAttachment; import serpro.mailarchiver.service.dto.TFault; import serpro.mailarchiver.service.dto.TFolder; import serpro.mailarchiver.service.dto.TMessage; import serpro.mailarchiver.service.dto.TSession; @WebService @SOAPBinding( style=Style.DOCUMENT, use=Use.LITERAL, parameterStyle= ParameterStyle.WRAPPED // ParameterStyle.BARE ) @InInterceptors (interceptors = {"serpro.mailarchiver.util.SoapInterceptors$Receive"}) @InFaultInterceptors (interceptors = {"serpro.mailarchiver.util.SoapInterceptors$ReceiveFault"}) @OutInterceptors (interceptors = {"serpro.mailarchiver.util.SoapInterceptors$Setup"}) @OutFaultInterceptors (interceptors = {"serpro.mailarchiver.util.SoapInterceptors$SetupFault"}) @Features(features = "org.apache.cxf.feature.LoggingFeature") @XmlSeeAlso({ServiceFault.class}) public interface ArchiveServices { TFault getFaultInfo( @WebParam(name="sessionId") String sessionId ); TSession login( @WebParam(name="userId") String userId, @WebParam(name="password") String password, @WebParam(name="phpSessId") String phpSessId, @WebParam(name="balanceId") String balanceId ) throws ServiceFault; Integer logout( @WebParam(name="sessionId") String sessionId ) throws ServiceFault; TFolder[] listFolders( @WebParam(name="sessionId") String sessionId, @WebParam(name="folderId") String folderId ) throws ServiceFault; TMessage[] listMessages( @WebParam(name="sessionId") String sessionId, @WebParam(name="queryConfig") String queryConfig ) throws ServiceFault; //TODO: remover? propriedade "attachments" em TMessage será suficiente? TAttachment[] listAttachments( @WebParam(name="sessionId") String sessionId, @WebParam(name="messageId") String messageId ) throws ServiceFault; String getMessageBody( @WebParam(name="sessionId") String sessionId, @WebParam(name="messageId") String messageId ) throws ServiceFault; String getRawBinaryBody( @WebParam(name="sessionId") String sessionId, @WebParam(name="bodyId") String bodyId ) throws ServiceFault; Integer copyMessages( @WebParam(name="sessionId") String sessionId, @WebParam(name="folderId") String folderId, @WebParam(name="messagesId") String... messagesId ) throws ServiceFault; Integer moveMessages( @WebParam(name="sessionId") String sessionId, @WebParam(name="folderId") String folderId, @WebParam(name="messagesId") String... messagesId ) throws ServiceFault; Integer deleteMessages( @WebParam(name="sessionId") String sessionId, @WebParam(name="messagesId") String... messagesId ) throws ServiceFault; Integer tagMessages( @WebParam(name="sessionId") String sessionId, @WebParam(name="tagConfig") String tagConfig ) throws ServiceFault; String zipMessages( @WebParam(name="sessionId") String sessionId, @WebParam(name="zipConfig") String zipConfig ) throws ServiceFault; TFolder createFolder( @WebParam(name="sessionId") String sessionId, @WebParam(name="parentFolderId") String parentFolderId, @WebParam(name="name") String name ) throws ServiceFault; TFolder createAbsoluteFolder( @WebParam(name="sessionId") String sessionId, @WebParam(name="path") String path ) throws ServiceFault; TFolder renameFolder( @WebParam(name="sessionId") String sessionId, @WebParam(name="folderId") String folderId, @WebParam(name="newName") String newName ) throws ServiceFault; TFolder moveFolder( @WebParam(name="sessionId") String sessionId, @WebParam(name="newParentFolderId") String newParentFolderId, @WebParam(name="folderId") String folderId ) throws ServiceFault; Integer deleteFolder( @WebParam(name="sessionId") String sessionId, @WebParam(name="folderId") String folderId, @WebParam(name="recursive") boolean recursive ) throws ServiceFault; TMessage archive( @WebParam(name="sessionId") String sessionId, @WebParam(name="folderId") String folderId, @WebParam(name="message") String message ) throws ServiceFault; TFolder getFolderInfo( @WebParam(name="sessionId") String sessionId, @WebParam(name="folderId") String folderId ) throws ServiceFault; TMessage getMessageInfo( @WebParam(name="sessionId") String sessionId, @WebParam(name="messageId") String messageId ) throws ServiceFault; String getState() throws ServiceFault; }