001: /*
002: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003: *
004: * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005: *
006: * The contents of this file are subject to the terms of either the GNU
007: * General Public License Version 2 only ("GPL") or the Common
008: * Development and Distribution License("CDDL") (collectively, the
009: * "License"). You may not use this file except in compliance with the
010: * License. You can obtain a copy of the License at
011: * http://www.netbeans.org/cddl-gplv2.html
012: * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
013: * specific language governing permissions and limitations under the
014: * License. When distributing the software, include this License Header
015: * Notice in each file and include the License file at
016: * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
017: * particular file as subject to the "Classpath" exception as provided
018: * by Sun in the GPL Version 2 section of the License file that
019: * accompanied this code. If applicable, add the following below the
020: * License Header, with the fields enclosed by brackets [] replaced by
021: * your own identifying information:
022: * "Portions Copyrighted [year] [name of copyright owner]"
023: *
024: * Contributor(s):
025: * The Original Software is NetBeans. The Initial Developer of the Original
026: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
027: * Microsystems, Inc. All Rights Reserved.
028: *
029: * If you wish your version of this file to be governed by only the CDDL
030: * or only the GPL Version 2, indicate your decision by adding
031: * "[Contributor] elects to include this software in this distribution
032: * under the [CDDL or GPL Version 2] license." If you do not indicate a
033: * single choice of license, a recipient has the option to distribute
034: * your version of this file under either the CDDL, the GPL Version 2 or
035: * to extend the choice of license to its licensees as provided above.
036: * However, if you add GPL Version 2 code and therefore, elected the GPL
037: * Version 2 license, then the option applies only if the new code is
038: * made subject to such option by the copyright holder.
039: */
040:
041: package org.netbeans.modules.profiler.attach.spi;
042:
043: import org.netbeans.lib.profiler.common.AttachSettings;
044: import java.util.List;
045: import java.util.Vector;
046:
047: /**
048: *
049: * @author Tomas Hurka
050: * @author Jaroslav Bachorik
051: */
052: public interface IntegrationProvider {
053: //~ Inner Classes ------------------------------------------------------------------------------------------------------------
054:
055: public class IntegrationHints {
056: //~ Instance fields ------------------------------------------------------------------------------------------------------
057:
058: private List hints;
059: private List steps;
060: private List warnings;
061: private boolean warningsFirst = true;
062:
063: //~ Constructors ---------------------------------------------------------------------------------------------------------
064:
065: public IntegrationHints() {
066: steps = new Vector(10);
067: hints = new Vector(10);
068: warnings = new Vector(10);
069: }
070:
071: //~ Methods --------------------------------------------------------------------------------------------------------------
072:
073: public List getHints() {
074: return copyLock(this .hints);
075: }
076:
077: public List getSteps() {
078: return copyLock(this .steps);
079: }
080:
081: public List getWarnings() {
082: return copyLock(this .warnings);
083: }
084:
085: public void setWarningsFirst(boolean warningsFirst) {
086: this .warningsFirst = warningsFirst;
087: }
088:
089: public boolean isWarningsFirst() {
090: return warningsFirst;
091: }
092:
093: public void addHint(String hint) {
094: this .hints.add(hint);
095: }
096:
097: public void addStep(String step) {
098: this .steps.add(step);
099: }
100:
101: public void addStep(int stepIndex, String step) {
102: this .steps.add(stepIndex, step);
103: }
104:
105: public void addWarning(String warning) {
106: this .warnings.add(warning);
107: }
108:
109: public void clear() {
110: this .hints.clear();
111: this .steps.clear();
112: this .warnings.clear();
113: }
114:
115: public void removeHint(String hint) {
116: this .hints.remove(hint);
117: }
118:
119: public void removeStep(String step) {
120: this .steps.remove(step);
121: }
122:
123: public void removeWarning(String warning) {
124: this .warnings.remove(warning);
125: }
126:
127: private List copyLock(List source) {
128: List immutable = new Vector();
129: immutable.addAll(source);
130:
131: return immutable;
132: }
133: }
134:
135: //~ Methods ------------------------------------------------------------------------------------------------------------------
136:
137: public IntegrationHints getAfterInstallationHints(
138: AttachSettings settings, boolean automation);
139:
140: public IntegrationHints getIntegrationReview(AttachSettings settings);
141:
142: public IntegrationHints getModificationHints(AttachSettings settings);
143:
144: public void setTargetJava(String targetJava);
145:
146: public String getTargetJava();
147:
148: public void setTargetJavaHome(String targetJavaHome);
149:
150: public String getTargetJavaHome();
151:
152: public String getTitle();
153:
154: public void modify(AttachSettings settings)
155: throws ModificationException;
156:
157: public void run(AttachSettings settings) throws RunException;
158:
159: public boolean supportsAutomation();
160:
161: public boolean supportsDirect();
162:
163: public boolean supportsDynamic();
164:
165: public boolean supportsLocal();
166:
167: public boolean supportsManual();
168:
169: public boolean supportsRemote();
170: }
|