Subversion Repositories XServices

Compare Revisions

Regard whitespace Rev 68 → Rev 69

/xservices/trunk/src/java/net/brutex/xservices/ws/ArchiveService.java
28,28 → 28,30
 
 
/**
* Archiving related web service.
*
* @author Brian Rosenberger, bru@brutex.de
* @since 0.4.0
*/
@WebService(targetNamespace = BrutexNamespaces.WS_XSERVICES)
public interface ArchiveService {
 
public static final String WS_OPERATION_BZIP2 = "bzip2";
public static final String WS_OPERATION_BZIP2_ARCHIVE = "bzip2FromArchive";
public static final String WS_OPERATION_GZIP = "gzip";
public static final String WS_OPERATION_GZIP_ARCHIVE = "gzipFromArchive";
public static final String WS_OPERATION_UNZIP = "unzip";
public static final String WS_OPERATION_GUNZIP = "gunzip";
public static final String WS_OPERATION_BUNZIP2 = "bunzip2";
public static final String WS_PARAM_SOURCEFILE = "source";
public static final String WS_PARAM_SOURCEFILE_STRING = "srcfile";
public static final String WS_PARAM_SOURCEURL = "srcurl";
public static final String WS_PARAM_SOURCEARCHIVE = "archivesource";
public static final String WS_PARAM_DESTFILE = "destfile";
public static final String WS_PARAM_DESTDIR = "destdir";
public static final String WS_PARAM_ENCODING = "encoding";
public static final String WS_PARAM_OVERWRITE = "overwrite";
public static final String WS_PARAM_COMPRESS = "compresslevel";
final String WS_OPERATION_BZIP2 = "bzip2";
final String WS_OPERATION_BZIP2_ARCHIVE = "bzip2FromArchive";
final String WS_OPERATION_GZIP = "gzip";
final String WS_OPERATION_GZIP_ARCHIVE = "gzipFromArchive";
final String WS_OPERATION_UNZIP = "unzip";
final String WS_OPERATION_GUNZIP = "gunzip";
final String WS_OPERATION_BUNZIP2 = "bunzip2";
final String WS_PARAM_SOURCEFILE = "source";
final String WS_PARAM_SOURCEFILE_STRING = "srcfile";
final String WS_PARAM_SOURCEURL = "srcurl";
final String WS_PARAM_SOURCEARCHIVE = "archivesource";
final String WS_PARAM_DESTFILE = "destfile";
final String WS_PARAM_DESTDIR = "destdir";
final String WS_PARAM_ENCODING = "encoding";
final String WS_PARAM_OVERWRITE = "overwrite";
final String WS_PARAM_COMPRESS = "compresslevel";
 
/**
* @param src
/xservices/trunk/src/java/net/brutex/xservices/ws/ExecuteService.java
25,7 → 25,9
import net.brutex.xservices.util.BrutexNamespaces;
 
/**
* @author brosenberger
* Task execution web service
* @author Brian Rosenberger
* @since 0.1.0
*
*/
@WebService(targetNamespace = BrutexNamespaces.WS_XSERVICES)
/xservices/trunk/src/java/net/brutex/xservices/ws/DateService.java
45,21 → 45,21
public interface DateService {
public static final String SERVICE_NAME = "DateService";
public static final String OPERATION_GETDATE = "getDate";
public static final String OPERATION_GETTIMESTAMP = "getTimestamp";
public static final String OPERATION_GETINTIMEZONE = "getInTimezone";
public static final String OPERATION_FORMATDATE = "formatDate";
public static final String OPERATION_FORMATDATEADVANCED = "formatDateAdvanced";
public static final String OPERATION_PARSEDATE = "parseDate";
public static final String OPERATION_PARSEDATEADVANCED = "parseDateAdvanced";
public static final String OPERATION_DATETIMEDIFF = "dateTimeDiff";
public static final String OPERATION_DATETIMEDIFF2 = "dateTimeDiff2";
public static final String OPERATION_DATEADD = "dateAdd";
final String OPERATION_GETDATE = "getDate";
final String OPERATION_GETTIMESTAMP = "getTimestamp";
final String OPERATION_GETINTIMEZONE = "getInTimezone";
final String OPERATION_FORMATDATE = "formatDate";
final String OPERATION_FORMATDATEADVANCED = "formatDateAdvanced";
final String OPERATION_PARSEDATE = "parseDate";
final String OPERATION_PARSEDATEADVANCED = "parseDateAdvanced";
final String OPERATION_DATETIMEDIFF = "dateTimeDiff";
final String OPERATION_DATETIMEDIFF2 = "dateTimeDiff2";
final String OPERATION_DATEADD = "dateAdd";
public static final String PARAM_TIMEZONE = "timezone";
public static final String PARAM_DATETIME = "datetime";
public static final String PARAM_FORMAT = "format";
public static final String PARAM_UNIT = "unit";
final String PARAM_TIMEZONE = "timezone";
final String PARAM_DATETIME = "datetime";
final String PARAM_FORMAT = "format";
final String PARAM_UNIT = "unit";
/**
* Get current date and time.
97,8 → 97,10
@WebParam(name=PARAM_TIMEZONE) @XmlElement(required=true) String timezone) throws XServicesFault;
/**
* @param cal
* @param format
* Formats a date with pre-defined patterns.
*
* @param cal date time to be formatted
* @param format Pattern to be used for date formating
* @return formatted date/time string
* @throws XServicesFault
*/
107,6 → 109,36
@WebParam(name=PARAM_DATETIME) @XmlElement(required=true) GregorianCalendar cal,
@WebParam(name=PARAM_FORMAT) @XmlElement(required=true) DateFormatType format) throws XServicesFault;
/**
* Formats a date with a free form pattern.
* Uses SimpleDateFormat patterns
* The following pattern letters are defined (all other characters from 'A' to 'Z' and from 'a' to 'z' are reserved):
 
Letter Date or Time Component Presentation Examples
G Era designator Text AD
y Year Year 1996; 96
M Month in year Month July; Jul; 07
w Week in year Number 27
W Week in month Number 2
D Day in year Number 189
d Day in month Number 10
F Day of week in month Number 2
E Day in week Text Tuesday; Tue
a Am/pm marker Text PM
H Hour in day (0-23) Number 0
k Hour in day (1-24) Number 24
K Hour in am/pm (0-11) Number 0
h Hour in am/pm (1-12) Number 12
m Minute in hour Number 30
s Second in minute Number 55
S Millisecond Number 978
z Time zone General time zone Pacific Standard Time; PST; GMT-08:00
Z Time zone RFC 822 time zone -0800
* @param cal Date time to be formatted
* @param format Format string
* @return Date time formatted according to format string
* @throws XServicesFault
*/
@WebMethod(operationName=OPERATION_FORMATDATEADVANCED)
public abstract String formatDateAdvanced(
@WebParam(name=PARAM_DATETIME) @XmlElement(required=true) GregorianCalendar cal,
124,6 → 156,13
@WebParam(name=PARAM_FORMAT) @XmlElement(required=true) String format,
@WebParam(name=PARAM_TIMEZONE) String timezone) throws XServicesFault;
/**
* Calculate elapsed time between two dates.
* @param fromCal First date.
* @param toCal Second date.
* @return Elapsed time in milliseconds
* @throws XServicesFault
*/
@WebMethod(operationName=OPERATION_DATETIMEDIFF)
public abstract BigInteger dateTimeDiff(
@WebParam(name="fromDateTime") @XmlElement(required=true) GregorianCalendar fromCal,
147,12 → 186,14
@WebParam(name="PARAM_UNIT") DateTimeUnits unit) throws XServicesFault;
/**
* Add or substract a time span from a date.
* Add or subtract a time span from a date.
*
* @param cal
* @param unit
* @param cal The initial date.
* @param value The amount to add.
* @param unit The unit the amount is defined in.
* @return New date and time.
* @throws XServicesFault
*
*/
@WebMethod(operationName=OPERATION_DATEADD)
@WSDLDocumentation(value="Add or substract a time span from a date.")