Subversion Repositories XServices

Rev

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;
22 brianR 23
import net.brutex.xservices.types.MailMimeType;
16 brianR 24
import net.brutex.xservices.types.ReturnCode;
25
import net.brutex.xservices.util.BrutexNamespaces;
23 brianR 26
import org.apache.cxf.annotations.WSDLDocumentation;
72 brianR 27
import org.apache.cxf.annotations.WSDLDocumentationCollection;
16 brianR 28
 
29
/**
30
 *
31
 * @author Brian Rosenberger, bru@brutex.de
70 brianR 32
 * @since 0.4.0
16 brianR 33
 */
21 brianR 34
@WebService(targetNamespace = BrutexNamespaces.WS_XSERVICES)
72 brianR 35
@WSDLDocumentation("Various service operations.")
16 brianR 36
public interface MiscService {
37
 
23 brianR 38
 
39
 
40
    /**
41
     * @param hostname
72 brianR 42
     * @return ReturnCode
23 brianR 43
     */
21 brianR 44
    @WebMethod(operationName = "getHostinfo")
72 brianR 45
    @WSDLDocumentation(value = "Get information about a host.")
46
    public ReturnCode getHostinfo(
47
    		@WebParam(name = "hostname") String hostname);
18 brianR 48
 
23 brianR 49
    /**
50
     *
51
     * @param mailhost
52
     * @param from
53
     * @param tolist
54
     * @param subject
55
     * @param message
72 brianR 56
     * @return ReturnCode
23 brianR 57
     */
21 brianR 58
    @WebMethod(operationName = "sendMailSimple")
72 brianR 59
    @WSDLDocumentation(value = "Send an email (simple).")
21 brianR 60
    public ReturnCode sendMailSimple(@WebParam(name = "mailhost") HostConnection mailhost,
61
            @WebParam(name = "from") String from,
62
            @WebParam(name = "to") String tolist,
63
            @WebParam(name = "subject") String subject,
64
            @WebParam(name = "message") String message);
20 brianR 65
 
23 brianR 66
    /**
67
     *
68
     * @param mailhost
69
     * @param from
70
     * @param tolist
71
     * @param subject
72
     * @param message
73
     * @param res
72 brianR 74
     * @return ReturnCode
23 brianR 75
     */
21 brianR 76
    @WebMethod(operationName = "sendMailSimpleWithAttachment")
72 brianR 77
    @WSDLDocumentation(value = "Send an email with attachment (simple).")
21 brianR 78
    public ReturnCode sendMailSimpleWithAttachment(@WebParam(name = "mailhost") HostConnection mailhost,
79
            @WebParam(name = "from") String from,
80
            @WebParam(name = "to") String tolist,
81
            @WebParam(name = "subject") String subject,
82
            @WebParam(name = "message") String message,
83
            @WebParam(name = "attachments") FileSetResource res);
84
 
23 brianR 85
    /**
86
     *
87
     * @param mailhost
88
     * @param from
89
     * @param tolist
90
     * @param cclist
91
     * @param bcclist
92
     * @param subject
93
     * @param mimetype
94
     * @param charset
95
     * @param message
96
     * @param res
97
     * @param ssl
98
     * @param tls
72 brianR 99
     * @return ReturnCode
23 brianR 100
     */
22 brianR 101
    @WebMethod(operationName = "sendMail")
72 brianR 102
    @WSDLDocumentation(value = "Send an email (advanced).")
22 brianR 103
    public ReturnCode sendMail(@WebParam(name = "mailhost") HostConnection mailhost,
104
            @WebParam(name = "from") String from,
105
            @WebParam(name = "to") String tolist,
106
            @WebParam(name = "cc") String cclist,
107
            @WebParam(name = "bcc") String bcclist,
108
            @WebParam(name = "subject") String subject,
109
            @WebParam(name = "mimetype") MailMimeType mimetype,
110
            @WebParam(name = "charset") String charset,
111
            @WebParam(name = "message") String message,
112
            @WebParam(name = "attachments") FileSetResource res,
113
            @WebParam(name = "useSSL") boolean ssl,
114
            @WebParam(name = "useStartTLS") boolean tls);
115
 
23 brianR 116
    /**
117
     *
118
     * @param minutes
119
     * @param seconds
72 brianR 120
     * @return ReturnCode
23 brianR 121
     */
21 brianR 122
    @WebMethod(operationName = "sleep")
72 brianR 123
    @WSDLDocumentation(value = "Delay request response a specified duration.")
21 brianR 124
    public ReturnCode sleep(@WebParam(name = "minutes") int minutes,
125
            @WebParam(name = "seconds") int seconds);
54 brianR 126
 
127
 
72 brianR 128
    /**
129
     * @return ReturnCode
130
     */
54 brianR 131
    @WebMethod(operationName = "getInfo")
72 brianR 132
    @WSDLDocumentation(value = "Get XService information.")
54 brianR 133
    public ReturnCode getInfo();
134
 
16 brianR 135
}