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).")
21 brianR 63
    public ReturnCode sendMailSimple(@WebParam(name = "mailhost") HostConnection mailhost,
64
            @WebParam(name = "from") String from,
65
            @WebParam(name = "to") String tolist,
66
            @WebParam(name = "subject") String subject,
67
            @WebParam(name = "message") String message);
20 brianR 68
 
23 brianR 69
    /**
70
     *
71
     * @param mailhost
72
     * @param from
73
     * @param tolist
74
     * @param subject
75
     * @param message
76
     * @param res
72 brianR 77
     * @return ReturnCode
23 brianR 78
     */
21 brianR 79
    @WebMethod(operationName = "sendMailSimpleWithAttachment")
72 brianR 80
    @WSDLDocumentation(value = "Send an email with attachment (simple).")
21 brianR 81
    public ReturnCode sendMailSimpleWithAttachment(@WebParam(name = "mailhost") HostConnection mailhost,
82
            @WebParam(name = "from") String from,
83
            @WebParam(name = "to") String tolist,
84
            @WebParam(name = "subject") String subject,
85
            @WebParam(name = "message") String message,
86
            @WebParam(name = "attachments") FileSetResource res);
87
 
23 brianR 88
    /**
89
     *
90
     * @param mailhost
91
     * @param from
92
     * @param tolist
93
     * @param cclist
94
     * @param bcclist
95
     * @param subject
96
     * @param mimetype
97
     * @param charset
98
     * @param message
99
     * @param res
100
     * @param ssl
101
     * @param tls
72 brianR 102
     * @return ReturnCode
23 brianR 103
     */
22 brianR 104
    @WebMethod(operationName = "sendMail")
72 brianR 105
    @WSDLDocumentation(value = "Send an email (advanced).")
22 brianR 106
    public ReturnCode sendMail(@WebParam(name = "mailhost") HostConnection mailhost,
107
            @WebParam(name = "from") String from,
108
            @WebParam(name = "to") String tolist,
109
            @WebParam(name = "cc") String cclist,
110
            @WebParam(name = "bcc") String bcclist,
111
            @WebParam(name = "subject") String subject,
112
            @WebParam(name = "mimetype") MailMimeType mimetype,
113
            @WebParam(name = "charset") String charset,
114
            @WebParam(name = "message") String message,
115
            @WebParam(name = "attachments") FileSetResource res,
116
            @WebParam(name = "useSSL") boolean ssl,
117
            @WebParam(name = "useStartTLS") boolean tls);
118
 
23 brianR 119
    /**
120
     *
121
     * @param minutes
122
     * @param seconds
72 brianR 123
     * @return ReturnCode
23 brianR 124
     */
21 brianR 125
    @WebMethod(operationName = "sleep")
72 brianR 126
    @WSDLDocumentation(value = "Delay request response a specified duration.")
21 brianR 127
    public ReturnCode sleep(@WebParam(name = "minutes") int minutes,
128
            @WebParam(name = "seconds") int seconds);
54 brianR 129
 
130
 
72 brianR 131
    /**
132
     * @return ReturnCode
133
     */
54 brianR 134
    @WebMethod(operationName = "getInfo")
72 brianR 135
    @WSDLDocumentation(value = "Get XService information.")
54 brianR 136
    public ReturnCode getInfo();
137
 
78 brianR 138
    /**
139
     * Generate a UUID
140
     * @return new UUID
141
     */
142
    @WebMethod(operationName = "generateUUID")
143
    @WSDLDocumentation(value = "Generate a UUID.")
144
    public String generateUUID();
145
 
16 brianR 146
}