File Coverage

blib/lib/WWW/Wookie/Connector/Service/Interface.pm
Criterion Covered Total %
statement 14 14 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod n/a
total 19 19 100.0


line stmt bran cond sub pod time code
1             # -*- cperl; cperl-indent-level: 4 -*-
2             # Copyright (C) 2010-2021, Roland van Ipenburg
3             package WWW::Wookie::Connector::Service::Interface v1.1.4;
4 4     4   3099 use strict;
  4         12  
  4         133  
5 4     4   20 use warnings;
  4         8  
  4         122  
6              
7 4     4   19 use utf8;
  4         7  
  4         29  
8 4     4   402 use 5.020000;
  4         14  
9              
10 4     4   23 use Moose::Role qw/requires/;
  4         16  
  4         48  
11             requires 'getAvailableServices';
12             requires 'getAvailableWidgets';
13             requires 'getConnection';
14             requires 'setUser';
15             requires 'getUser';
16             requires 'getOrCreateInstance';
17             requires 'addParticipant';
18             requires 'deleteParticipant';
19             requires 'getUsers';
20             requires 'addProperty';
21             requires 'setProperty';
22             requires 'getProperty';
23             requires 'deleteProperty';
24             requires 'setLocale';
25             requires 'getLocale';
26             requires 'getWidget';
27              
28             1;
29              
30             __END__
31              
32             =encoding utf8
33              
34             =for stopwords Bitbucket Wookie guid Ipenburg MERCHANTABILITY
35              
36             =head1 NAME
37              
38             WWW::Wookie::Connector::Service::Interface - Interface for
39             L<WWW::Wookie::Connector::Service|WWW::Wookie::Connector::Service>
40              
41             =head1 VERSION
42              
43             This document describes WWW::Wookie::Connector::Service::Interface version
44             C<v1.1.4>
45              
46             =head1 SYNOPSIS
47              
48             use Moose;
49             use Moose::Role;
50             with 'WWW::Wookie::Connector::Service::Interface';
51              
52             =head1 DESCRIPTION
53              
54             =head1 SUBROUTINES/METHODS
55              
56             =head2 C<getAvailableServices>
57              
58             Get a all available service categories in the server. Returns an array of
59             L<WWWW::Wookie::Widget::Category|WW::Wookie::Widget::Category> objects.
60             Throws a C<WookieConnectorException>.
61              
62             =head2 C<getAvailableWidgets>
63              
64             Get all available widgets in the server, or only the available widgets in the
65             specified service category. Returns an array of
66             L<WWW::Wookie::Widget|WWW::Wookie::Widget> objects, otherwise false. Throws a
67             C<WookieConnectorException>.
68              
69             =over
70              
71             =item 1. Service category name as string
72              
73             =back
74              
75             =head2 C<getWidget>
76              
77             Get the details of the widget specified by it's identifier. Returns a
78             L<WWW::Wookie::Widget|WWW::Wookie::Widget> object.
79              
80             =over
81              
82             =item 1. The identifier of an available widget
83              
84             =back
85              
86             =head2 C<getConnection>
87              
88             Get the currently active connection to the Wookie server. Returns a
89             L<WWW::Wookie::Server::Connection|WWW::Wookie::Server::Connection> object.
90              
91             =head2 C<setUser>
92              
93             Set the current user.
94              
95             =over
96              
97             =item 1. User name for the current Wookie connection
98              
99             =item 2. Screen name for the current Wookie connection
100              
101             =back
102              
103             =head2 C<getUser>
104              
105             Retrieve the details of the current user. Returns an instance of the user as a
106             L<WWW::Wookie::User|WWW::Wookie::User> object.
107              
108             =head2 C<getOrCreateInstance>
109              
110             Get or create a new instance of a widget. The current user will be added as a
111             participant. Returns a
112             L<WWW::Wookie::Widget::Instance|WWW::Wookie::Widget::Instance> object if
113             successful, otherwise false. Throws a C<WookieConnectorException>.
114              
115             =over
116              
117             =item 1. Widget as guid string or a L<WWW::Wookie::Widget|WWW::Wookie::Widget>
118             object
119              
120             =back
121              
122             =head2 C<addParticipant>
123              
124             Add a participant to a widget. Returns true if successful, otherwise false.
125             Throws a C<WookieWidgetInstanceException> or a C<WookieConnectorException>.
126              
127             =over
128              
129             =item 1. Instance of widget as
130             L<WWW::Wookie::Widget::Instance|WWW::Wookie::Widget::Instance> object
131              
132             =item 2. Instance of user as L<WWW::Wookie::User|WWW::Wookie::User> object
133              
134             =back
135              
136             =head2 C<deleteParticipant>
137              
138             Delete a participant. Returns true if successful, otherwise false. Throws a
139             C<WookieWidgetInstanceException> or a C<WookieConnectorException>.
140              
141             =over
142              
143             =item 1. Instance of widget as
144             L<WWW::Wookie::Widget::Instance|WWW::Wookie::Widget::Instance> object
145              
146             =item 2. Instance of user as L<WWW::Wookie::User|WWW::Wookie::User> object
147              
148             =back
149              
150             =head2 C<getUsers>
151              
152             Get all participants of the current widget. Returns an array of
153             L<WWW::Wookie::User|WWW::Wookie::User> instances. Throws a
154             C<WookieConnectorException>.
155              
156             =over
157              
158             =item 1. Instance of widget as
159             L<WWW::Wookie::Widget::Instance|WWW::Wookie::Widget::Instance> object
160              
161             =back
162              
163             =head2 C<addProperty>
164              
165             Adds a new property. Returns true if successful, otherwise false. Throws a
166             C<WookieConnectorException>.
167              
168             =over
169              
170             =item 1. Instance of widget as
171             L<WWW::Wookie::Widget::Instance|WWW::Wookie::Widget::Instance> object
172              
173             =item 2. Instance of property as
174             L<WWW::Wookie::Widget::Property|WWW::Wookie::Widget::Property> object
175              
176             =back
177              
178             =head2 C<setProperty>
179              
180             Set a new property. Returns the property as
181             L<WWW::Wookie::Widget::Property|WWW::Wookie::Widget::Property> if successful,
182             otherwise false. Throws a C<WookieWidgetInstanceException> or a
183             C<WookieConnectorException>.
184              
185             =over
186              
187             =item 1. Instance of widget as
188             L<WWW::Wookie::Widget::Instance|WWW::Wookie::Widget::Instance> object
189              
190             =item 2. Instance of property as
191             L<WWW::Wookie::Widget::Property|WWW::Wookie::Widget::Property> object
192              
193             =back
194              
195             =head2 C<getProperty>
196              
197             Get a property. Returns the property as
198             L<WWW::Wookie::Widget::Property|WWW::Wookie::Widget::Property> if successful,
199             otherwise false. Throws a C<WookieWidgetInstanceException> or a
200             C<WookieConnectorException>.
201              
202             =over
203              
204             =item 1. Instance of widget as
205             L<WWW::Wookie::Widget::Instance|WWW::Wookie::Widget::Instance> object
206              
207             =item 2. Instance of property as
208             L<WWW::Wookie::Widget::Property|WWW::Wookie::Widget::Property> object
209              
210             =back
211              
212             =head2 C<deleteProperty>
213              
214             Delete a property. Returns true if successful, otherwise false. Throws a
215             C<WookieWidgetInstanceException> or a C<WookieConnectorException>.
216              
217             =over
218              
219             =item 1. Instance of widget as
220             L<WWW::Wookie::Widget::Instance|WWW::Wookie::Widget::Instance> object
221              
222             =item 2. Instance of property as
223             L<WWW::Wookie::Widget::Property|WWW::Wookie::Widget::Property> object
224              
225             =back
226              
227             =head2 C<setLocale>
228              
229             Set a locale.
230              
231             =over
232              
233             =item 1. Locale as string
234              
235             =back
236              
237             =head2 C<getLocale>
238              
239             Get the current locale setting. Returns current locale as string.
240              
241             =head1 CONFIGURATION AND ENVIRONMENT
242              
243             =head1 DEPENDENCIES
244              
245             L<Moose::Role|Moose::Role>
246              
247             =head1 INCOMPATIBILITIES
248              
249             =head1 DIAGNOSTICS
250              
251             =head1 BUGS AND LIMITATIONS
252              
253             Please report any bugs or feature requests at
254             L<Bitbucket|https://bitbucket.org/rolandvanipenburg/www-wookie/issues>.
255              
256             =head1 AUTHOR
257              
258             Roland van Ipenburg, E<lt>roland@rolandvanipenburg.comE<gt>
259              
260             =head1 LICENSE AND COPYRIGHT
261              
262             Copyright 2010-2021 by Roland van Ipenburg
263              
264             This library is free software; you can redistribute it and/or modify
265             it under the same terms as Perl itself, either Perl version 5.14.0 or,
266             at your option, any later version of Perl 5 you may have available.
267              
268             =head1 DISCLAIMER OF WARRANTY
269              
270             BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
271             FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
272             OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
273             PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
274             EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
275             WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
276             ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
277             YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
278             NECESSARY SERVICING, REPAIR, OR CORRECTION.
279              
280             IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
281             WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
282             REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENSE, BE
283             LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL,
284             OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
285             THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
286             RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
287             FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
288             SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
289             SUCH DAMAGES.
290              
291             =cut