001: /*******************************************************************************
002: * Copyright (c) 2000, 2006 IBM Corporation and others.
003: * All rights reserved. This program and the accompanying materials
004: * are made available under the terms of the Eclipse Public License v1.0
005: * which accompanies this distribution, and is available at
006: * http://www.eclipse.org/legal/epl-v10.html
007: *
008: * Contributors:
009: * IBM Corporation - initial API and implementation
010: *******************************************************************************/package org.eclipse.ui.activities;
011:
012: import java.util.Set;
013:
014: /**
015: * An instance of this interface allows clients to manage activities, as
016: * defined by the extension point <code>org.eclipse.ui.activities</code>.
017: * <p>
018: * This interface is not intended to be extended or implemented by clients.
019: * </p>
020: *
021: * @since 3.0
022: */
023: public interface IActivityManager {
024:
025: /**
026: * Registers an instance of <code>IActivityManagerListener</code> to
027: * listen for changes to properties of this instance.
028: *
029: * @param activityManagerListener
030: * the instance to register. Must not be <code>null</code>.
031: * If an attempt is made to register an instance which is
032: * already registered with this instance, no operation is
033: * performed.
034: */
035: void addActivityManagerListener(
036: IActivityManagerListener activityManagerListener);
037:
038: /**
039: * Returns an instance of <code>IActivity</code> given an identifier.
040: *
041: * @param activityId
042: * an identifier. Must not be <code>null</code>
043: * @return an instance of <code>IActivity</code>.
044: */
045: IActivity getActivity(String activityId);
046:
047: /**
048: * Returns an instance of <code>ICategory</code> given an identifier.
049: *
050: * @param categoryId
051: * an identifier. Must not be <code>null</code>
052: * @return an instance of <code>ICategory</code>.
053: */
054: ICategory getCategory(String categoryId);
055:
056: /**
057: * Returns the set of identifiers to defined activities.
058: * <p>
059: * Notification is sent to all registered listeners if this property
060: * changes.
061: * </p>
062: *
063: * @return the set of identifiers to defined activities. This set may be
064: * empty, but is guaranteed not to be <code>null</code>. If this
065: * set is not empty, it is guaranteed to only contain instances of
066: * <code>String</code>.
067: */
068: Set getDefinedActivityIds();
069:
070: /**
071: * Returns the set of identifiers to defined categories.
072: * <p>
073: * Notification is sent to all registered listeners if this property
074: * changes.
075: * </p>
076: *
077: * @return the set of identifiers to defined categories. This set may be
078: * empty, but is guaranteed not to be <code>null</code>. If this
079: * set is not empty, it is guaranteed to only contain instances of
080: * <code>String</code>.
081: */
082: Set getDefinedCategoryIds();
083:
084: /**
085: * Returns the set of identifiers to enabled activities.
086: * <p>
087: * Notification is sent to all registered listeners if this property
088: * changes.
089: * </p>
090: *
091: * @return the set of identifiers to enabled activities. This set may be
092: * empty, but is guaranteed not to be <code>null</code>. If this
093: * set is not empty, it is guaranteed to only contain instances of
094: * <code>String</code>.
095: */
096: Set getEnabledActivityIds();
097:
098: /**
099: * Returns an instance of <code>IIdentifier</code> given an identifier.
100: *
101: * @param identifierId
102: * an identifier. Must not be <code>null</code>
103: * @return an instance of <code>IIdentifier</code>.
104: */
105: IIdentifier getIdentifier(String identifierId);
106:
107: /**
108: * Removes an instance of <code>IActivityManagerListener</code>
109: * listening for changes to properties of this instance.
110: *
111: * @param activityManagerListener
112: * the instance to remove. Must not be <code>null</code>.
113: * If an attempt is made to remove an instance which is not
114: * already registered with this instance, no operation is
115: * performed.
116: */
117: void removeActivityManagerListener(
118: IActivityManagerListener activityManagerListener);
119: }
|