Subversion Repositories XServices

Compare Revisions

Regard whitespace Rev 65 → Rev 80

/xservices/trunk/src/java/net/brutex/xservices/ws/FileService.java
26,8 → 26,6
import org.apache.cxf.annotations.WSDLDocumentation;
import org.apache.cxf.annotations.WSDLDocumentationCollection;
 
import com.sun.xml.internal.ws.api.model.wsdl.WSDLDescriptorKind;
 
import net.brutex.xservices.types.ArchiveResource;
import net.brutex.xservices.types.AttachmentType;
import net.brutex.xservices.types.FileResource;
37,7 → 35,10
import net.brutex.xservices.util.BrutexNamespaces;
import net.brutex.xservices.util.XServicesDocumentation;
/**
* File related web service operations.
*
* @author Brian Rosenberger
* @since 0.3.0
*
*/
@WebService(targetNamespace = BrutexNamespaces.WS_XSERVICES)
48,21 → 49,25
)
public interface FileService {
 
public static final String OPERATION_BASENAME ="basename";
public static final String OPERATION_DOWNLOADFILE ="downloadFile";
public static final String OPERATION_UPLOADFILE ="uploadFile";
public static final String OPERATION_COPY ="copy";
public static final String OPERATION_COPYFILE ="copyFile";
public static final String OPERATION_LOADRESOURCE = "loadResource";
public static final String OPERATION_LOADRESOURCEFROMARCHIVE = "loadResourceFromArchive";
public static final String OPERATION_ECHOTOFILE = "echoToFile";
public static final String OPERATION_CHANGEOWNER = "changeOwner";
public static final String OPERATION_CHANGEMODE = "changeMode";
public static final String OPERATION_CHANGEGROUP = "changeGroup";
public static final String OPERATION_REPLACEINFILE = "replaceInFile";
public static final String OPERATION_REPLACEINFILE2 = "replaceInFile2";
public static final String OPERATION_REPLACEINFILEREGEX = "replaceInFileRegEx";
final String OPERATION_BASENAME ="basename";
final String OPERATION_DOWNLOADFILE ="downloadFile";
final String OPERATION_UPLOADFILE ="uploadFile";
final String OPERATION_COPY ="copy";
final String OPERATION_COPYFILE ="copyFile";
final String OPERATION_LOADRESOURCE = "loadResource";
final String OPERATION_LOADRESOURCEFROMARCHIVE = "loadResourceFromArchive";
final String OPERATION_ECHOTOFILE = "echoToFile";
final String OPERATION_CHANGEOWNER = "changeOwner";
final String OPERATION_CHANGEMODE = "changeMode";
final String OPERATION_CHANGEGROUP = "changeGroup";
final String OPERATION_REPLACEINFILE = "replaceInFile";
final String OPERATION_REPLACEINFILE2 = "replaceInFile2";
final String OPERATION_REPLACEINFILEREGEX = "replaceInFileRegEx";
final String PARAM_FILE = "file";
final String PARAM_ENCODING = "encoding";
final String PARAM_OVERRIDE = "override";
/**
* @param filename
* @param suffix
71,7 → 76,7
@WSDLDocumentation(value = "The base name of the given file excluding the suffix.")
@WebMethod(operationName = OPERATION_BASENAME)
public abstract String basename(
@WebParam(name = "file") @XmlElement(required=true) String filename,
@WebParam(name = PARAM_FILE) @XmlElement(required=true) String filename,
@WebParam(name = "suffix") String suffix);
 
/**
92,7 → 97,7
@WSDLDocumentation(XServicesDocumentation.SERVICE_OPERATION_UPLOADFILE)
@WebMethod(operationName = OPERATION_UPLOADFILE)
public abstract String uploadFile(
@WebParam(name = "file") AttachmentType file) throws XServicesFault;
@WebParam(name = PARAM_FILE) AttachmentType file) throws XServicesFault;
/**
* @param src
109,8 → 114,8
@WebParam(name = FileSetResource.XML_NAME) @XmlElement(required=true) FileSetResource src,
@WebParam(name = "todir") @XmlElement(required=true) String todir,
@WebParam(name = "preservelastmodified") boolean plm,
@WebParam(name = "overwrite") boolean overwrite,
@WebParam(name = "encoding") String encoding) throws XServicesFault;
@WebParam(name = PARAM_OVERRIDE) boolean overwrite,
@WebParam(name = PARAM_ENCODING) String encoding) throws XServicesFault;
/**
* @param fromFile
124,7 → 129,7
public abstract ReturnCode copyFile(
@WebParam(name = "fromFile") @XmlElement(required=true) String fromFile,
@WebParam(name = "toFile") @XmlElement(required=true) String tofile,
@WebParam(name = "overwrite") boolean overwrite) throws XServicesFault;
@WebParam(name = PARAM_OVERRIDE) boolean overwrite) throws XServicesFault;
 
/**
* @param res
136,7 → 141,7
@WebMethod(operationName = OPERATION_LOADRESOURCE)
public abstract String loadRes(
@WebParam(name = FileResource.XML_NAME) FileResource res,
@WebParam(name = "encoding") String encoding) throws XServicesFault;
@WebParam(name = PARAM_ENCODING) String encoding) throws XServicesFault;
 
/**
* @param res
148,7 → 153,7
@WebMethod(operationName = OPERATION_LOADRESOURCEFROMARCHIVE)
public abstract String loadResFromArchive(
@WebParam(name = "archiveresource") ArchiveResource res,
@WebParam(name = "encoding") String encoding) throws XServicesFault;
@WebParam(name = PARAM_ENCODING) String encoding) throws XServicesFault;
 
/**
* @param message
162,13 → 167,17
@WebMethod(operationName = OPERATION_ECHOTOFILE)
public abstract ReturnCode echo2file(
@WebParam(name = "message") @XmlElement(required=true) String message,
@WebParam(name = "file") @XmlElement(required=true) String file,
@WebParam(name = "encoding") String encoding,
@WebParam(name = PARAM_FILE) @XmlElement(required=true) String file,
@WebParam(name = PARAM_ENCODING) String encoding,
@WebParam(name = "append") boolean append) throws XServicesFault;
 
/**
* @param res
* @param owner
* Changes the owner of a file or all files inside specified directories.
* Right now it has effect only under Unix/ Linux as it is implemented through
* the 'chown' command.
*
* @param res Collection of files/ directories
* @param owner Identifier of the new owner
* @return
*/
@WebMethod(operationName = OPERATION_CHANGEOWNER)
177,8 → 186,12
@WebParam(name = "owner") @XmlElement(required=true) String owner);
 
/**
* @param res
* @param group
* Changes the group owner of a file or all files inside specified directories.
* Right now it has effect only under Unix/ Linux as it is implemented through
* the 'chgrp' command.
*
* @param res Collection of files/ directories
* @param group Identifier of the new group owner
* @return
*/
@WebMethod(operationName = OPERATION_CHANGEGROUP)