KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > activities > IActivityManager


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11
12 package org.eclipse.ui.activities;
13
14 import java.util.Set JavaDoc;
15
16 /**
17  * An instance of this interface allows clients to manage activities, as
18  * defined by the extension point <code>org.eclipse.ui.activities</code>.
19  * <p>
20  * This interface is not intended to be extended or implemented by clients.
21  * </p>
22  *
23  * @since 3.0
24  */

25 public interface IActivityManager {
26
27     /**
28      * Registers an instance of <code>IActivityManagerListener</code> to
29      * listen for changes to properties of this instance.
30      *
31      * @param activityManagerListener
32      * the instance to register. Must not be <code>null</code>.
33      * If an attempt is made to register an instance which is
34      * already registered with this instance, no operation is
35      * performed.
36      */

37     void addActivityManagerListener(
38             IActivityManagerListener activityManagerListener);
39
40     /**
41      * Returns an instance of <code>IActivity</code> given an identifier.
42      *
43      * @param activityId
44      * an identifier. Must not be <code>null</code>
45      * @return an instance of <code>IActivity</code>.
46      */

47     IActivity getActivity(String JavaDoc activityId);
48
49     /**
50      * Returns an instance of <code>ICategory</code> given an identifier.
51      *
52      * @param categoryId
53      * an identifier. Must not be <code>null</code>
54      * @return an instance of <code>ICategory</code>.
55      */

56     ICategory getCategory(String JavaDoc categoryId);
57
58     /**
59      * Returns the set of identifiers to defined activities.
60      * <p>
61      * Notification is sent to all registered listeners if this property
62      * changes.
63      * </p>
64      *
65      * @return the set of identifiers to defined activities. This set may be
66      * empty, but is guaranteed not to be <code>null</code>. If this
67      * set is not empty, it is guaranteed to only contain instances of
68      * <code>String</code>.
69      */

70     Set JavaDoc getDefinedActivityIds();
71
72     /**
73      * Returns the set of identifiers to defined categories.
74      * <p>
75      * Notification is sent to all registered listeners if this property
76      * changes.
77      * </p>
78      *
79      * @return the set of identifiers to defined categories. This set may be
80      * empty, but is guaranteed not to be <code>null</code>. If this
81      * set is not empty, it is guaranteed to only contain instances of
82      * <code>String</code>.
83      */

84     Set JavaDoc getDefinedCategoryIds();
85
86     /**
87      * Returns the set of identifiers to enabled activities.
88      * <p>
89      * Notification is sent to all registered listeners if this property
90      * changes.
91      * </p>
92      *
93      * @return the set of identifiers to enabled activities. This set may be
94      * empty, but is guaranteed not to be <code>null</code>. If this
95      * set is not empty, it is guaranteed to only contain instances of
96      * <code>String</code>.
97      */

98     Set JavaDoc getEnabledActivityIds();
99
100     /**
101      * Returns an instance of <code>IIdentifier</code> given an identifier.
102      *
103      * @param identifierId
104      * an identifier. Must not be <code>null</code>
105      * @return an instance of <code>IIdentifier</code>.
106      */

107     IIdentifier getIdentifier(String JavaDoc identifierId);
108
109     /**
110      * Removes an instance of <code>IActivityManagerListener</code>
111      * listening for changes to properties of this instance.
112      *
113      * @param activityManagerListener
114      * the instance to remove. Must not be <code>null</code>.
115      * If an attempt is made to remove an instance which is not
116      * already registered with this instance, no operation is
117      * performed.
118      */

119     void removeActivityManagerListener(
120             IActivityManagerListener activityManagerListener);
121 }
122
Popular Tags