KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > outerj > daisy > emailnotifier > Subscription


1 /*
2  * Copyright 2004 Outerthought bvba and Schaubroeck nv
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 org.outerj.daisy.emailnotifier;
17
18 import org.outerx.daisy.x10.SubscriptionDocument;
19 import org.outerj.daisy.repository.RepositoryException;
20 import org.outerj.daisy.repository.VariantKey;
21
22 import java.util.Locale JavaDoc;
23
24 public interface Subscription {
25     /**
26      * Returns the user to which this subscription applies.
27      */

28     public long getUserId();
29
30     public void setReceiveDocumentEvents(boolean value);
31
32     public boolean getReceiveDocumentEvents();
33
34     public void setReceiveSchemaEvents(boolean value);
35
36     public boolean getReceiveSchemaEvents();
37
38     public void setReceiveUserEvents(boolean value);
39
40     public boolean getReceiveUserEvents();
41
42     public void setReceiveCollectionEvents(boolean value);
43
44     public boolean getReceiveCollectionEvents();
45
46     public void setReceiveAclEvents(boolean value);
47
48     public boolean getReceiveAclEvents();
49
50     public void setReceiveCommentEvents(boolean value);
51
52     public boolean getReceiveCommentEvents();
53
54     /**
55      * Returns the locale to use to format the notification mails, returns null if not set.
56      */

57     public Locale JavaDoc getLocale();
58
59     /**
60      * Sets the locale used to format the notification mails.
61      * @param locale can be null
62      */

63     public void setLocale(Locale JavaDoc locale);
64
65     public VariantKey[] getSubscribedVariantKeys();
66
67     /**
68      * Note: if any of the VariantKey components for an entry is '-1', it means 'any'.
69      */

70     public void setSubscribedVariantKeys(VariantKey[] keys);
71
72     public CollectionSubscriptionKey[] getSubscribedCollectionKeys();
73
74     /**
75      * Note: if any of the CollectionSubscriptionKey components for an entry is '-1', it means 'any'.
76      */

77     public void setSubscribedCollectionKeys(CollectionSubscriptionKey[] keys);
78
79     public void save() throws RepositoryException;
80
81     public SubscriptionDocument getXml();
82
83     public void setFromXml(SubscriptionDocument.Subscription subscriptionXml);
84 }
85
Popular Tags