KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > info > magnolia > cms > exchange > Syndicator


1 /**
2  *
3  * Magnolia and its source-code is licensed under the LGPL.
4  * You may copy, adapt, and redistribute this file for commercial or non-commercial use.
5  * When copying, adapting, or redistributing this document in keeping with the guidelines above,
6  * you are required to provide proper attribution to obinary.
7  * If you reproduce or distribute the document without making any substantive modifications to its content,
8  * please use the following attribution line:
9  *
10  * Copyright 1993-2006 obinary Ltd. (http://www.obinary.com) All rights reserved.
11  *
12  */

13 package info.magnolia.cms.exchange;
14
15 import info.magnolia.cms.beans.config.Subscriber;
16 import info.magnolia.cms.core.Content;
17 import info.magnolia.cms.security.User;
18 import info.magnolia.cms.util.Rule;
19
20 import javax.jcr.RepositoryException;
21 import java.util.List JavaDoc;
22
23
24 /**
25  * @author Sameer Charles
26  * $Id: Syndicator.java 6443 2006-09-21 10:14:34Z scharles $
27  */

28 public interface Syndicator {
29
30     /**
31      * Set up the syndicator
32      * @param user the user to use for the conection to the subscriber
33      * @param repositoryName the repository to transmit
34      * @param workspaceName the workspace to transmit
35      * @param rule the rules defining which nodes to transmit (node types)
36      */

37     public void init(User user, String JavaDoc repositoryName, String JavaDoc workspaceName, Rule rule);
38
39     /**
40      * <p>
41      * this will activate specifies page (sub pages) to all configured subscribers
42      * </p>
43      * @param parent parent under which this page will be activated
44      * @param path page to be activated
45      * @throws RepositoryException
46      * @throws ExchangeException
47      * @deprecated use Syndicator.activate(String parent, Content content)
48      * @see Syndicator#activate(String, info.magnolia.cms.core.Content)
49      */

50     public void activate(String JavaDoc parent, String JavaDoc path)
51             throws ExchangeException, RepositoryException;
52
53     /**
54      * <p>
55      * this will activate specified node to all configured subscribers
56      * </p>
57      * @param parent parent under which this page will be activated
58      * @param content to be activated
59      * @throws RepositoryException
60      * @throws ExchangeException
61      */

62     public void activate(String JavaDoc parent, Content content)
63             throws ExchangeException, RepositoryException;
64
65     /**
66      * <p>
67      * this will activate specified node to all configured subscribers
68      * </p>
69      * @param parent parent under which this page will be activated
70      * @param content to be activated
71      * @param orderBefore List of UUID to be used by the implementation to order this node after activation
72      * @throws RepositoryException
73      * @throws ExchangeException
74      */

75     public void activate(String JavaDoc parent, Content content, List JavaDoc orderBefore)
76             throws ExchangeException, RepositoryException;
77
78     /**
79      * <p>
80      * this will activate specifies node to the specified subscribers
81      * </p>
82      * @param subscriber
83      * @param parent parent under which this page will be activated
84      * @param content to be activated
85      * @throws RepositoryException
86      * @throws ExchangeException
87      */

88     public void activate(Subscriber subscriber, String JavaDoc parent, Content content)
89             throws ExchangeException, RepositoryException;
90
91     /**
92      * <p>
93      * this will activate specifies node to the specified subscribers
94      * </p>
95      * @param subscriber
96      * @param parent parent under which this page will be activated
97      * @param content to be activated
98      * @param orderBefore List of UUID to be used by the subscriber to order this node after activation
99      * @throws RepositoryException
100      * @throws ExchangeException
101      */

102     public void activate(Subscriber subscriber, String JavaDoc parent, Content content, List JavaDoc orderBefore)
103             throws ExchangeException, RepositoryException;
104
105     /**
106      * @param path , to deactivate
107      * @throws RepositoryException
108      * @throws ExchangeException
109      */

110     public void deActivate(String JavaDoc path)
111             throws ExchangeException, RepositoryException;
112
113     /**
114      * @param path , to deactivate
115      * @param subscriber
116      * @throws RepositoryException
117      * @throws ExchangeException
118      */

119     public void deActivate(Subscriber subscriber, String JavaDoc path)
120             throws ExchangeException, RepositoryException;
121
122 }
123
Popular Tags