Subversion Repositories XServices

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
16 brianR 1
/*
2
 *   Copyright 2010 Brian Rosenberger (Brutex Network)
3
 *
4
 *   Licensed under the Apache License, Version 2.0 (the "License");
5
 *   you may not use this file except in compliance with the License.
6
 *   You may obtain a copy of the License at
7
 *
8
 *       http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 *   Unless required by applicable law or agreed to in writing, software
11
 *   distributed under the License is distributed on an "AS IS" BASIS,
12
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 *   See the License for the specific language governing permissions and
14
 *   limitations under the License.
15
 */
16
package net.brutex.xservices.ws;
17
 
18
import javax.jws.WebMethod;
19
import javax.jws.WebParam;
20
import javax.jws.WebService;
21 brianR 21
import net.brutex.xservices.types.FileSetResource;
18 brianR 22
import net.brutex.xservices.types.HostConnection;
78 brianR 23
import net.brutex.xservices.types.HostinfoType;
22 brianR 24
import net.brutex.xservices.types.MailMimeType;
16 brianR 25
import net.brutex.xservices.types.ReturnCode;
26
import net.brutex.xservices.util.BrutexNamespaces;
78 brianR 27
 
28
import org.apache.cxf.aegis.type.java5.XmlElement;
23 brianR 29
import org.apache.cxf.annotations.WSDLDocumentation;
72 brianR 30
import org.apache.cxf.annotations.WSDLDocumentationCollection;
16 brianR 31
 
32
/**
33
 *
34
 * @author Brian Rosenberger, bru@brutex.de
70 brianR 35
 * @since 0.4.0
16 brianR 36
 */
21 brianR 37
@WebService(targetNamespace = BrutexNamespaces.WS_XSERVICES)
72 brianR 38
@WSDLDocumentation("Various service operations.")
16 brianR 39
public interface MiscService {
40
 
23 brianR 41
 
42
 
43
    /**
44
     * @param hostname
72 brianR 45
     * @return ReturnCode
23 brianR 46
     */
21 brianR 47
    @WebMethod(operationName = "getHostinfo")
72 brianR 48
    @WSDLDocumentation(value = "Get information about a host.")
78 brianR 49
    public HostinfoType getHostinfo(
50
    		@WebParam(name = "hostname") @XmlElement(minOccurs="1", nillable=false ) String hostname);
18 brianR 51
 
23 brianR 52
    /**
53
     *
54
     * @param mailhost
55
     * @param from
56
     * @param tolist
57
     * @param subject
58
     * @param message
72 brianR 59
     * @return ReturnCode
23 brianR 60
     */
21 brianR 61
    @WebMethod(operationName = "sendMailSimple")
72 brianR 62
    @WSDLDocumentation(value = "Send an email (simple).")
79 brianR 63
    public ReturnCode sendMailSimple(
64
    		@WebParam(name = "mailhost") @XmlElement(minOccurs="1", nillable=false) HostConnection mailhost,
65
            @WebParam(name = "from") @XmlElement(minOccurs="1", nillable=false) String from,
66
            @WebParam(name = "to") @XmlElement(minOccurs="1", nillable=false) String tolist,
21 brianR 67
            @WebParam(name = "subject") String subject,
68
            @WebParam(name = "message") String message);
20 brianR 69
 
23 brianR 70
    /**
71
     *
72
     * @param mailhost
73
     * @param from
74
     * @param tolist
75
     * @param subject
76
     * @param message
77
     * @param res
72 brianR 78
     * @return ReturnCode
23 brianR 79
     */
21 brianR 80
    @WebMethod(operationName = "sendMailSimpleWithAttachment")
72 brianR 81
    @WSDLDocumentation(value = "Send an email with attachment (simple).")
79 brianR 82
    public ReturnCode sendMailSimpleWithAttachment(
83
    		@WebParam(name = "mailhost") @XmlElement(minOccurs="1", nillable=false) HostConnection mailhost,
84
            @WebParam(name = "from") @XmlElement(minOccurs="1", nillable=false) String from,
85
            @WebParam(name = "to") @XmlElement(minOccurs="1", nillable=false) String tolist,
21 brianR 86
            @WebParam(name = "subject") String subject,
87
            @WebParam(name = "message") String message,
88
            @WebParam(name = "attachments") FileSetResource res);
89
 
23 brianR 90
    /**
91
     *
92
     * @param mailhost
93
     * @param from
94
     * @param tolist
95
     * @param cclist
96
     * @param bcclist
97
     * @param subject
98
     * @param mimetype
99
     * @param charset
100
     * @param message
101
     * @param res
102
     * @param ssl
103
     * @param tls
72 brianR 104
     * @return ReturnCode
23 brianR 105
     */
22 brianR 106
    @WebMethod(operationName = "sendMail")
72 brianR 107
    @WSDLDocumentation(value = "Send an email (advanced).")
79 brianR 108
    public ReturnCode sendMail(
109
    		@WebParam(name = "mailhost") @XmlElement(minOccurs="1", nillable=false) HostConnection mailhost,
110
            @WebParam(name = "from") @XmlElement(minOccurs="1", nillable=false) String from,
111
            @WebParam(name = "to") @XmlElement(minOccurs="1", nillable=false) String tolist,
22 brianR 112
            @WebParam(name = "cc") String cclist,
113
            @WebParam(name = "bcc") String bcclist,
114
            @WebParam(name = "subject") String subject,
115
            @WebParam(name = "mimetype") MailMimeType mimetype,
116
            @WebParam(name = "charset") String charset,
117
            @WebParam(name = "message") String message,
118
            @WebParam(name = "attachments") FileSetResource res,
119
            @WebParam(name = "useSSL") boolean ssl,
120
            @WebParam(name = "useStartTLS") boolean tls);
121
 
23 brianR 122
    /**
123
     *
124
     * @param minutes
125
     * @param seconds
72 brianR 126
     * @return ReturnCode
23 brianR 127
     */
21 brianR 128
    @WebMethod(operationName = "sleep")
72 brianR 129
    @WSDLDocumentation(value = "Delay request response a specified duration.")
79 brianR 130
    public ReturnCode sleep(
131
    		@WebParam(name = "minutes") int minutes,
21 brianR 132
            @WebParam(name = "seconds") int seconds);
54 brianR 133
 
134
 
72 brianR 135
    /**
136
     * @return ReturnCode
137
     */
54 brianR 138
    @WebMethod(operationName = "getInfo")
72 brianR 139
    @WSDLDocumentation(value = "Get XService information.")
54 brianR 140
    public ReturnCode getInfo();
141
 
78 brianR 142
    /**
143
     * Generate a UUID
144
     * @return new UUID
145
     */
146
    @WebMethod(operationName = "generateUUID")
147
    @WSDLDocumentation(value = "Generate a UUID.")
148
    public String generateUUID();
149
 
16 brianR 150
}