Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
ProfileManager |
|
| 1.0;1 |
1 | /* $Id: ProfileManager.java 17833 2010-01-12 19:04:36Z linus $ | |
2 | ***************************************************************************** | |
3 | * Copyright (c) 2009 Contributors - see below | |
4 | * All rights reserved. This program and the accompanying materials | |
5 | * are made available under the terms of the Eclipse Public License v1.0 | |
6 | * which accompanies this distribution, and is available at | |
7 | * http://www.eclipse.org/legal/epl-v10.html | |
8 | * | |
9 | * Contributors: | |
10 | * maurelio1234 | |
11 | ***************************************************************************** | |
12 | * | |
13 | * Some portions of this file was previously release using the BSD License: | |
14 | */ | |
15 | ||
16 | // Copyright (c) 2007 The Regents of the University of California. All | |
17 | // Rights Reserved. Permission to use, copy, modify, and distribute this | |
18 | // software and its documentation without fee, and without a written | |
19 | // agreement is hereby granted, provided that the above copyright notice | |
20 | // and this paragraph appear in all copies. This software program and | |
21 | // documentation are copyrighted by The Regents of the University of | |
22 | // California. The software program and documentation are supplied "AS | |
23 | // IS", without any accompanying services from The Regents. The Regents | |
24 | // does not warrant that the operation of the program will be | |
25 | // uninterrupted or error-free. The end-user understands that the program | |
26 | // was developed for research purposes and is advised not to rely | |
27 | // exclusively on the program for any reason. IN NO EVENT SHALL THE | |
28 | // UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, | |
29 | // SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, | |
30 | // ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF | |
31 | // THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF | |
32 | // SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY | |
33 | // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | |
34 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE | |
35 | // PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF | |
36 | // CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, | |
37 | // UPDATES, ENHANCEMENTS, OR MODIFICATIONS. | |
38 | ||
39 | package org.argouml.profile; | |
40 | ||
41 | import java.util.List; | |
42 | ||
43 | import org.argouml.kernel.ProfileConfiguration; | |
44 | ||
45 | /** | |
46 | * Interface to the manager for the global set of registered profiles. | |
47 | * | |
48 | * @author maurelio1234 | |
49 | */ | |
50 | public interface ProfileManager { | |
51 | ||
52 | /** | |
53 | * Register a new profile. | |
54 | * | |
55 | * @param profile A profile to be registered so that it is available to the | |
56 | * users. | |
57 | */ | |
58 | void registerProfile(Profile profile); | |
59 | ||
60 | /** | |
61 | * Remove a profile from the list of registered profiles. | |
62 | * Only User defined profiles can be removed. | |
63 | * | |
64 | * @param profile the profile to unregister. It will no longer be available | |
65 | * for selection by users | |
66 | */ | |
67 | void removeProfile(Profile profile); | |
68 | ||
69 | /** | |
70 | * @return the list of registered profiles | |
71 | */ | |
72 | List<Profile> getRegisteredProfiles(); | |
73 | ||
74 | /** | |
75 | * Search for a Profile with the given Java classname. | |
76 | * | |
77 | * @return the profile instance for the class or null if there is none. | |
78 | * @param className the name of the Java class to search for. | |
79 | */ | |
80 | Profile getProfileForClass(String className); | |
81 | ||
82 | /** | |
83 | * @return the default list of profiles | |
84 | */ | |
85 | List<Profile> getDefaultProfiles(); | |
86 | ||
87 | /** | |
88 | * Add a profile to the default list. | |
89 | * | |
90 | * @param profile profile to be added to the default application profiles. | |
91 | * New models will reference it by default | |
92 | */ | |
93 | void addToDefaultProfiles(Profile profile); | |
94 | ||
95 | /** | |
96 | * Remove a profile from the default list. | |
97 | * | |
98 | * @param profile the profile to be removed | |
99 | */ | |
100 | void removeFromDefaultProfiles(Profile profile); | |
101 | ||
102 | /** | |
103 | * Add a new directory to the directory list. | |
104 | * | |
105 | * @param path a directory name where the manager will try to look for user | |
106 | * defined profiles as XMI files | |
107 | */ | |
108 | void addSearchPathDirectory(String path); | |
109 | ||
110 | /** | |
111 | * Remove a directory from the directory list. | |
112 | * | |
113 | * @param path the directory path to be removed. | |
114 | */ | |
115 | void removeSearchPathDirectory(String path); | |
116 | ||
117 | /** | |
118 | * @return the current directory list | |
119 | */ | |
120 | List<String> getSearchPathDirectories(); | |
121 | ||
122 | /** | |
123 | * Look for XMI files at the current directory list and registers them as | |
124 | * user defined profiles. | |
125 | */ | |
126 | void refreshRegisteredProfiles(); | |
127 | ||
128 | /** | |
129 | * @return the Profile for UML, i.e., the base UML profile as defined by the | |
130 | * standard. | |
131 | */ | |
132 | Profile getUMLProfile(); | |
133 | ||
134 | /** | |
135 | * Looks for registered Profile | |
136 | * | |
137 | * @param profile identifier | |
138 | * @return profile | |
139 | */ | |
140 | Profile lookForRegisteredProfile(String profile); | |
141 | ||
142 | /** | |
143 | * Apply the given ProfileConfiguration to ArgoUML | |
144 | * | |
145 | * @param pc the profile configuration | |
146 | */ | |
147 | void applyConfiguration(ProfileConfiguration pc); | |
148 | } |