niclas 2003/11/17 03:07:24
Modified:
eclipse/org.apache.avalon.ide.eclipse/ide/src/java/org/apache/avalon/ide/eclipse
RepositoryPlugin.java
eclipse/org.apache.avalon.ide.eclipse/ide/src/java/org/apache/avalon/ide/eclipse/preferences
AddRepositoryDialog.java AvalonPreferencePage.java
RepositoryListEditor.java
eclipse/org.apache.avalon.ide.eclipse/ide/src/java/org/apache/avalon/ide/eclipse/views/repository
RepositoryView.java
eclipse/org.apache.avalon.ide.eclipse/repository/api/src/java/org/apache/avalon/repository/tools
RepositoryAgentFactory.java
Log:
Touched up some more stuff in the AddRepositoryDialog and formatting of source code.
Revision Changes Path
1.2 +57 -58
avalon-sandbox/eclipse/org.apache.avalon.ide.eclipse/ide/src/java/org/apache/avalon/ide/eclipse/RepositoryPlugin.java
Index: RepositoryPlugin.java
===================================================================
RCS file:
/home/cvs/avalon-sandbox/eclipse/org.apache.avalon.ide.eclipse/ide/src/java/org/apache/avalon/ide/eclipse/RepositoryPlugin.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- RepositoryPlugin.java 17 Nov 2003 10:34:18 -0000 1.1
+++ RepositoryPlugin.java 17 Nov 2003 11:07:24 -0000 1.2
@@ -1,52 +1,47 @@
/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Jakarta", "Apache Avalon", "Avalon Framework" and
- "Apache Software Foundation" must not be used to endorse or promote
- products derived from this software without prior written
- permission. For written permission, please contact [EMAIL PROTECTED]
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation. For more information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
+ *
+ * ============================================================================
+ * The Apache Software License, Version 1.1
+ * ============================================================================
+ *
+ * Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modifica-
+ * tion, are permitted provided that the following conditions are met:
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The end-user documentation included with the redistribution, if any,
+ * must include the following acknowledgment: "This product includes software
+ * developed by the Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowledgment may appear in the software itself, if and
+ * wherever such third-party acknowledgments normally appear.
+ * 4. The names "Jakarta", "Apache Avalon", "Avalon Framework" and "Apache
+ * Software Foundation" must not be used to endorse or promote products derived
+ * from this software without prior written permission. For written permission,
+ * please contact [EMAIL PROTECTED]
+ * 5. Products derived from this software may not be called "Apache", nor may
+ * "Apache" appear in their name, without prior written permission of the
+ * Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation. For more information on the
+ * Apache Software Foundation, please see <http://www.apache.org/> .
+ *
+ */
package org.apache.avalon.ide.eclipse;
import org.apache.avalon.repository.tools.InvalidURNException;
@@ -75,8 +70,8 @@
private SimpleRepositoryRegistry m_RepositoryTypeRegistry;
/**
- * The constructor.
- */
+ * The constructor.
+ */
public RepositoryPlugin(IPluginDescriptor descriptor)
{
super(descriptor);
@@ -86,9 +81,13 @@
RepositoryAgentFactory fact = new URLPlainRepositoryAgentFactory();
try
{
- URNDescriptor urn = new URNDescriptorImpl( "urn:simple", "Simple",
"This is a simple Repository type for mainly for the validation of the GUI.");
- m_RepositoryTypeRegistry.registerRepositoryAgentFactory( urn, fact );
- } catch( InvalidURNException e )
+ URNDescriptor urn =
+ new URNDescriptorImpl(
+ "urn:simple",
+ "Simple",
+ "This is a simple Repository type for mainly for the validation
of the GUI.");
+ m_RepositoryTypeRegistry.registerRepositoryAgentFactory(urn, fact);
+ } catch (InvalidURNException e)
{} //cannot happen.
}
@@ -96,18 +95,18 @@
{
return m_RepositoryTypeRegistry;
}
-
+
/**
- * Returns the shared instance.
- */
+ * Returns the shared instance.
+ */
public static RepositoryPlugin getDefault()
{
return m_Plugin;
}
/**
- * Returns the workspace instance.
- */
+ * Returns the workspace instance.
+ */
public static IWorkspace getWorkspace()
{
return ResourcesPlugin.getWorkspace();
1.2 +94 -64
avalon-sandbox/eclipse/org.apache.avalon.ide.eclipse/ide/src/java/org/apache/avalon/ide/eclipse/preferences/AddRepositoryDialog.java
Index: AddRepositoryDialog.java
===================================================================
RCS file:
/home/cvs/avalon-sandbox/eclipse/org.apache.avalon.ide.eclipse/ide/src/java/org/apache/avalon/ide/eclipse/preferences/AddRepositoryDialog.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AddRepositoryDialog.java 17 Nov 2003 10:34:18 -0000 1.1
+++ AddRepositoryDialog.java 17 Nov 2003 11:07:24 -0000 1.2
@@ -1,60 +1,60 @@
/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Jakarta", "Apache Avalon", "Avalon Framework" and
- "Apache Software Foundation" must not be used to endorse or promote
- products derived from this software without prior written
- permission. For written permission, please contact [EMAIL PROTECTED]
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation. For more information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
+ *
+ * ============================================================================
+ * The Apache Software License, Version 1.1
+ * ============================================================================
+ *
+ * Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modifica-
+ * tion, are permitted provided that the following conditions are met: 1.
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer. 2. Redistributions in
+ * binary form must reproduce the above copyright notice, this list of
+ * conditions and the following disclaimer in the documentation and/or other
+ * materials provided with the distribution. 3. The end-user documentation
+ * included with the redistribution, if any, must include the following
+ * acknowledgment: "This product includes software developed by the Apache
+ * Software Foundation (http://www.apache.org/)." Alternately, this
+ * acknowledgment may appear in the software itself, if and wherever such
+ * third-party acknowledgments normally appear. 4. The names "Jakarta", "Apache
+ * Avalon", "Avalon Framework" and "Apache Software Foundation" must not be
+ * used to endorse or promote products derived from this software without prior
+ * written permission. For written permission, please contact
+ * [EMAIL PROTECTED] 5. Products derived from this software may not be called
+ * "Apache", nor may "Apache" appear in their name, without prior written
+ * permission of the Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation. For more information on the
+ * Apache Software Foundation, please see <http://www.apache.org/> .
+ *
+ */
package org.apache.avalon.ide.eclipse.preferences;
+import org.apache.avalon.ide.eclipse.RepositoryPlugin;
+import org.apache.avalon.repository.tools.RepositoryTypeRegistry;
+import org.apache.avalon.repository.tools.URNDescriptor;
import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.IInputValidator;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.List;
import org.eclipse.swt.widgets.Shell;
@@ -68,28 +68,58 @@
private List m_List;
private Text m_Text;
private IInputValidator m_Validator;
-
- public AddRepositoryDialog( Shell parent, IInputValidator validator )
+
+ public AddRepositoryDialog(Shell parent, IInputValidator validator)
{
- super( parent );
+ super(parent);
m_Validator = validator;
}
-
+
protected Control createDialogArea(Composite parent)
{
- Composite panel = new Composite(parent, SWT.NONE );
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- Label label = new Label(panel, SWT.NONE );
- label.setText( "Location:" );
- m_Text = new Text( panel, SWT.NONE );
- m_Text.setText( "" );
- m_List = new List( panel, SWT.NONE );
- m_List.add( "simple" );
- m_List.setSelection(0);
+ Composite panel = (Composite) super.createDialogArea(parent);
+
+ Label label = new Label(panel, SWT.WRAP);
+ label.setText("Location:");
+ GridData data =
+ new GridData(
+ GridData.GRAB_HORIZONTAL
+ | GridData.GRAB_VERTICAL
+ | GridData.HORIZONTAL_ALIGN_FILL
+ | GridData.VERTICAL_ALIGN_CENTER);
+ data.widthHint =
convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);
+ label.setLayoutData(data);
+
+ m_Text = new Text(panel, SWT.SINGLE | SWT.BORDER);
+ m_Text.setText("");
+ m_Text.setLayoutData(
+ new GridData(GridData.GRAB_HORIZONTAL |
GridData.HORIZONTAL_ALIGN_FILL));
+
+ Group group = new Group(panel, SWT.SHADOW_ETCHED_IN);
+ group.setText("Registered Types");
+ group.setLayoutData(
+ new GridData(
+ GridData.GRAB_HORIZONTAL
+ | GridData.GRAB_VERTICAL
+ | GridData.HORIZONTAL_ALIGN_FILL
+ | GridData.VERTICAL_ALIGN_FILL));
+
+ RepositoryTypeRegistry reg =
RepositoryPlugin.getDefault().getRepositoryTypeRegistry();
+ URNDescriptor[] urns = reg.getRegisteredURNs();
+ for (int i = 0; i < urns.length; i++)
+ {
+ System.out.println("Placing button:" + urns[i]);
+ Button b = new Button(group, SWT.RADIO);
+ b.setText(urns[i].getName());
+ b.setData(urns[i]);
+ b.setToolTipText(urns[i].getDescription());
+ }
+ group.pack();
+ group.layout();
+ panel.pack();
return panel;
}
-
+
public String getValue()
{
return "urn:" + m_List.getSelection()[0] + ":" + m_Text.getText();
1.2 +1 -5
avalon-sandbox/eclipse/org.apache.avalon.ide.eclipse/ide/src/java/org/apache/avalon/ide/eclipse/preferences/AvalonPreferencePage.java
Index: AvalonPreferencePage.java
===================================================================
RCS file:
/home/cvs/avalon-sandbox/eclipse/org.apache.avalon.ide.eclipse/ide/src/java/org/apache/avalon/ide/eclipse/preferences/AvalonPreferencePage.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AvalonPreferencePage.java 17 Nov 2003 10:34:19 -0000 1.1
+++ AvalonPreferencePage.java 17 Nov 2003 11:07:24 -0000 1.2
@@ -96,11 +96,7 @@
}, getFieldEditorParent());
addField(editor);
addField(
- new DirectoryFieldEditor(
- P_CONTAINER_HOME,
- "Container Home",
- getFieldEditorParent())
- );
+ new DirectoryFieldEditor(P_CONTAINER_HOME, "Container Home",
getFieldEditorParent()));
}
public void init(IWorkbench workbench)
1.2 +116 -122
avalon-sandbox/eclipse/org.apache.avalon.ide.eclipse/ide/src/java/org/apache/avalon/ide/eclipse/preferences/RepositoryListEditor.java
Index: RepositoryListEditor.java
===================================================================
RCS file:
/home/cvs/avalon-sandbox/eclipse/org.apache.avalon.ide.eclipse/ide/src/java/org/apache/avalon/ide/eclipse/preferences/RepositoryListEditor.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- RepositoryListEditor.java 17 Nov 2003 10:34:19 -0000 1.1
+++ RepositoryListEditor.java 17 Nov 2003 11:07:24 -0000 1.2
@@ -1,52 +1,47 @@
/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Jakarta", "Apache Avalon", "Avalon Framework" and
- "Apache Software Foundation" must not be used to endorse or promote
- products derived from this software without prior written
- permission. For written permission, please contact [EMAIL PROTECTED]
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation. For more information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
+ *
+ * ============================================================================
+ * The Apache Software License, Version 1.1
+ * ============================================================================
+ *
+ * Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modifica-
+ * tion, are permitted provided that the following conditions are met:
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The end-user documentation included with the redistribution, if any,
+ * must include the following acknowledgment: "This product includes software
+ * developed by the Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowledgment may appear in the software itself, if and
+ * wherever such third-party acknowledgments normally appear.
+ * 4. The names "Jakarta", "Apache Avalon", "Avalon Framework" and "Apache
+ * Software Foundation" must not be used to endorse or promote products derived
+ * from this software without prior written permission. For written permission,
+ * please contact [EMAIL PROTECTED]
+ * 5. Products derived from this software may not be called "Apache", nor may
+ * "Apache" appear in their name, without prior written permission of the
+ * Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation. For more information on the
+ * Apache Software Foundation, please see <http://www.apache.org/> .
+ *
+ */
package org.apache.avalon.ide.eclipse.preferences;
import java.util.ArrayList;
@@ -58,139 +53,138 @@
import org.eclipse.jface.preference.ListEditor;
import org.eclipse.swt.widgets.Composite;
-/**
+/**
* @author Niclas Hedhman, [EMAIL PROTECTED]
*/
public class RepositoryListEditor extends ListEditor
{
/**
- * @param name
- * @param labelText
- * @param parent
- */
+ * @param name
+ * @param labelText
+ * @param parent
+ */
public RepositoryListEditor(String name, String labelText, Composite parent)
{
super(name, labelText, parent);
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.ListEditor#createList(java.lang.String[])
- */
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.preference.ListEditor#createList(java.lang.String[])
+ */
protected String createList(String[] items)
{
StringBuffer b = new StringBuffer();
- for( int i=0 ; i < items.length ; i++ )
+ for (int i = 0; i < items.length; i++)
{
- replaceAndAppend( b, items[i] );
- b.append( "," );
+ replaceAndAppend(b, items[i]);
+ b.append(",");
}
return b.toString();
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.ListEditor#getNewInputObject()
- */
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.preference.ListEditor#getNewInputObject()
+ */
protected String getNewInputObject()
{
IInputValidator validator = new URLValidator();
-
- AddRepositoryDialog dialog = new AddRepositoryDialog( getShell(), validator
);
- dialog.setBlockOnOpen( true );
+
+ AddRepositoryDialog dialog = new AddRepositoryDialog(getShell(), validator);
+ dialog.setBlockOnOpen(true);
int code = dialog.open();
- if( code == InputDialog.OK )
+ if (code == InputDialog.OK)
{
String input = dialog.getValue();
- if( ! input.startsWith( "urn:"))
+ if (!input.startsWith("urn:"))
input = "urn:simple:" + input;
return input;
- }
- else
+ } else
return null;
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.ListEditor#parseString(java.lang.String)
- */
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.preference.ListEditor#parseString(java.lang.String)
+ */
protected String[] parseString(String stringList)
{
ArrayList result = new ArrayList();
- StringTokenizer st = new StringTokenizer( stringList, ",", false );
- while( st.hasMoreTokens() )
+ StringTokenizer st = new StringTokenizer(stringList, ",", false);
+ while (st.hasMoreTokens())
{
String element = st.nextToken();
- result.add( parse( element ));
+ result.add(parse(element));
}
- String[] ret = new String[ result.size() ];
+ String[] ret = new String[result.size()];
Iterator list = result.iterator();
- for( int i=0 ; list.hasNext() ; i++ )
+ for (int i = 0; list.hasNext(); i++)
ret[i] = (String) list.next();
return ret;
}
-
- private void replaceAndAppend(StringBuffer out, String text )
+
+ private void replaceAndAppend(StringBuffer out, String text)
{
- for( int i=0 ; i < text.length() ; i++ )
+ for (int i = 0; i < text.length(); i++)
{
- char ch = text.charAt( i );
- if( ch == ',' )
+ char ch = text.charAt(i);
+ if (ch == ',')
{
- out.append( "," );
- }
- else if( ch == '&' )
+ out.append(",");
+ } else if (ch == '&')
{
- out.append( "&" );
- }
- else if( ch < 32 )
+ out.append("&");
+ } else if (ch < 32)
{
- out.append( "&#" );
- out.append( (int)ch );
- out.append( ';' );
- }
- else
- out.append( ch );
+ out.append("&#");
+ out.append((int) ch);
+ out.append(';');
+ } else
+ out.append(ch);
}
}
-
- private String parse( String raw )
+
+ private String parse(String raw)
{
StringBuffer buf = new StringBuffer();
int pos = 0;
- while( pos < raw.length() )
+ while (pos < raw.length())
{
- char ch = raw.charAt( pos++ );
- if( ch == '&' )
+ char ch = raw.charAt(pos++);
+ if (ch == '&')
{
- int colonPos = raw.indexOf( ';', pos );
- if( colonPos > 0 )
+ int colonPos = raw.indexOf(';', pos);
+ if (colonPos > 0)
{
- String word = raw.substring( pos + 1, colonPos );
+ String word = raw.substring(pos + 1, colonPos);
pos = colonPos + 1;
- decode( buf, word );
- }
- else
- buf.append( ch );
- }
- else
- buf.append( ch );
+ decode(buf, word);
+ } else
+ buf.append(ch);
+ } else
+ buf.append(ch);
}
return buf.toString();
}
-
- private void decode( StringBuffer out, String encoded )
+
+ private void decode(StringBuffer out, String encoded)
{
- if( encoded.charAt(0) == '#')
+ if (encoded.charAt(0) == '#')
{
- String n = encoded.substring( 1 );
- int value = Integer.parseInt( n );
+ String n = encoded.substring(1);
+ int value = Integer.parseInt(n);
char ch = (char) value;
- out.append( ch );
- }
- else if( encoded.equals( "comma") )
- out.append( "," );
- else if( encoded.equals( "amp") )
- out.append( "&" );
+ out.append(ch);
+ } else if (encoded.equals("comma"))
+ out.append(",");
+ else if (encoded.equals("amp"))
+ out.append("&");
else
- out.append( encoded );
-
+ out.append(encoded);
+
}
}
1.3 +61 -67
avalon-sandbox/eclipse/org.apache.avalon.ide.eclipse/ide/src/java/org/apache/avalon/ide/eclipse/views/repository/RepositoryView.java
Index: RepositoryView.java
===================================================================
RCS file:
/home/cvs/avalon-sandbox/eclipse/org.apache.avalon.ide.eclipse/ide/src/java/org/apache/avalon/ide/eclipse/views/repository/RepositoryView.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- RepositoryView.java 17 Nov 2003 10:34:19 -0000 1.2
+++ RepositoryView.java 17 Nov 2003 11:07:24 -0000 1.3
@@ -1,52 +1,47 @@
/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Jakarta", "Apache Avalon", "Avalon Framework" and
- "Apache Software Foundation" must not be used to endorse or promote
- products derived from this software without prior written
- permission. For written permission, please contact [EMAIL PROTECTED]
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation. For more information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
+ *
+ * ============================================================================
+ * The Apache Software License, Version 1.1
+ * ============================================================================
+ *
+ * Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modifica-
+ * tion, are permitted provided that the following conditions are met:
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The end-user documentation included with the redistribution, if any,
+ * must include the following acknowledgment: "This product includes software
+ * developed by the Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowledgment may appear in the software itself, if and
+ * wherever such third-party acknowledgments normally appear.
+ * 4. The names "Jakarta", "Apache Avalon", "Avalon Framework" and "Apache
+ * Software Foundation" must not be used to endorse or promote products derived
+ * from this software without prior written permission. For written permission,
+ * please contact [EMAIL PROTECTED]
+ * 5. Products derived from this software may not be called "Apache", nor may
+ * "Apache" appear in their name, without prior written permission of the
+ * Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation. For more information on the
+ * Apache Software Foundation, please see <http://www.apache.org/> .
+ *
+ */
package org.apache.avalon.ide.eclipse.views.repository;
import org.apache.avalon.ide.eclipse.RepositoryPlugin;
@@ -73,12 +68,11 @@
import org.eclipse.ui.part.DrillDownAdapter;
import org.eclipse.ui.part.ViewPart;
-/**
+/**
* @author Niclas Hedhman, [EMAIL PROTECTED]
*/
public class RepositoryView extends ViewPart
-
{
private TreeViewer m_Viewer;
private ViewContentProvider m_ContentProvider;
@@ -88,22 +82,22 @@
private Action m_DoubleClickAction;
/**
- * The constructor.
- */
+ * The constructor.
+ */
public RepositoryView()
{}
/**
- * This is a callback that will allow us
- * to create the viewer and initialize it.
- */
+ * This is a callback that will allow us to create the viewer and
+ * initialize it.
+ */
public void createPartControl(Composite parent)
{
m_Viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
m_DrillDownAdapter = new DrillDownAdapter(m_Viewer);
m_ContentProvider = new ViewContentProvider(this);
- m_Viewer.addTreeListener( m_ContentProvider );
- m_Viewer.setContentProvider( m_ContentProvider );
+ m_Viewer.addTreeListener(m_ContentProvider);
+ m_Viewer.setContentProvider(m_ContentProvider);
m_Viewer.setLabelProvider(new ViewLabelProvider(this));
m_Viewer.setSorter(new NameSorter());
m_Viewer.setInput(ResourcesPlugin.getWorkspace());
@@ -170,7 +164,7 @@
RepositoryPlugin plugin = RepositoryPlugin.getDefault();
ResourceManager resources = plugin.getResourceManager();
String message =
resources.getStringResource("USE_PREFERENCES_INSTEAD");
- showMessage( message );
+ showMessage(message);
}
};
m_AddRepositoryAction.setText("Add Repository...");
@@ -186,7 +180,7 @@
RepositoryPlugin plugin = RepositoryPlugin.getDefault();
ResourceManager resources = plugin.getResourceManager();
String message =
resources.getStringResource("USE_PREFERENCES_INSTEAD");
- showMessage( message );
+ showMessage(message);
}
};
m_RemoveRepositoryAction.setText("Remove Repository...");
@@ -198,24 +192,24 @@
{
public void run()
{
- // TODO Double click.
- // Not sure what this should do!
- showMessage("Not implemented yet!" );
+ // TODO Double click.
+ // Not sure what this should do!
+ showMessage("Not implemented yet!");
}
};
}
void refreshViewer()
{
- Display.getDefault().asyncExec( new Runnable()
+ Display.getDefault().asyncExec(new Runnable()
{
public void run()
{
- m_Viewer.refresh();
+ m_Viewer.refresh();
}
});
}
-
+
private void hookDoubleClickAction()
{
m_Viewer.addDoubleClickListener(new IDoubleClickListener()
@@ -241,8 +235,8 @@
return RepositoryPlugin.getDefault().getRepositoryTypeRegistry();
}
/**
- * Passing the focus request to the viewer's control.
- */
+ * Passing the focus request to the viewer's control.
+ */
public void setFocus()
{
m_Viewer.getControl().setFocus();
1.3 +101 -94
avalon-sandbox/eclipse/org.apache.avalon.ide.eclipse/repository/api/src/java/org/apache/avalon/repository/tools/RepositoryAgentFactory.java
Index: RepositoryAgentFactory.java
===================================================================
RCS file:
/home/cvs/avalon-sandbox/eclipse/org.apache.avalon.ide.eclipse/repository/api/src/java/org/apache/avalon/repository/tools/RepositoryAgentFactory.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- RepositoryAgentFactory.java 17 Nov 2003 10:34:19 -0000 1.2
+++ RepositoryAgentFactory.java 17 Nov 2003 11:07:24 -0000 1.3
@@ -1,109 +1,116 @@
/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Jakarta", "Apache Avalon", "Avalon Framework" and
- "Apache Software Foundation" must not be used to endorse or promote
- products derived from this software without prior written
- permission. For written permission, please contact [EMAIL PROTECTED]
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation. For more information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
+ *
+ * ============================================================================
+ * The Apache Software License, Version 1.1
+ * ============================================================================
+ *
+ * Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modifica-
+ * tion, are permitted provided that the following conditions are met:
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The end-user documentation included with the redistribution, if any,
+ * must include the following acknowledgment: "This product includes software
+ * developed by the Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowledgment may appear in the software itself, if and
+ * wherever such third-party acknowledgments normally appear.
+ * 4. The names "Jakarta", "Apache Avalon", "Avalon Framework" and "Apache
+ * Software Foundation" must not be used to endorse or promote products derived
+ * from this software without prior written permission. For written permission,
+ * please contact [EMAIL PROTECTED]
+ * 5. Products derived from this software may not be called "Apache", nor may
+ * "Apache" appear in their name, without prior written permission of the
+ * Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation. For more information on the
+ * Apache Software Foundation, please see <http://www.apache.org/> .
+ *
+ */
package org.apache.avalon.repository.tools;
import java.util.Locale;
-/** A Factory interface for creating RepositoryAgents.
+/**
+ * A Factory interface for creating RepositoryAgents.
*
* <p>
- * The RepositoryTypeRegistry holds references to each registered
RepositoryAgentFactory.
+ * The RepositoryTypeRegistry holds references to each registered
+ * RepositoryAgentFactory.
* </p>
+ *
* @see org.apache.avalon.repository.tools.RepositoryTypeRegistry
*
* @author Niclas Hedhman, [EMAIL PROTECTED]
*/
public interface RepositoryAgentFactory
{
- /** Creates a RepositoryAgent for the given location.
- *
- * <p>
- * The semantics of the <i>location</i> parameter is implementation dependent.
The
- * RepositoryAgentFactory MUST handle any initial "urn:" and <i>[type]</i> of a
- * urn:<i>[type]</i>:<i>[location]</i> format.
- * </p>
- * @param location Location of the repository.
- *
- * @return A RepositoryAgent for the given location and locale.
- * @throws RepositoryAgentCreationException
- */
- RepositoryAgent create( String location, Locale locale ) throws
RepositoryAgentCreationException;
-
- /** Call to dispose the RepositoryAgent.
- *
- * It is important that the factory is given a chance to clean up the
- * RepositoryAgent, and therefor this method must be called when the
RepositoryAgent is no
- * longer needed.
- *
- * @param agent The RepositoryAgent to drop/delete.
- */
- void dispose( RepositoryAgent agent );
-
-
- /** Adds a RepositoryAgentFactoryListener.
- *
- * <p>
- * If an equal listener already exists, the listener will not be added.
- * </p>
- * @param listener The listener to add.
- */
- void addRepositoryAgentFactoryListener( RepositoryAgentFactoryListener listener
);
-
- /** Removes a RepositoryAgentFactoryListener.
- *
- * <p>
- * If the listener does not exist, nothing will happen.
- * </p>
- *
- * @param listener The listener to be removed.
- */
- void removeRepositoryAgentFactoryListener( RepositoryAgentFactoryListener
listener );
-
+ /**
+ * Creates a RepositoryAgent for the given location.
+ *
+ * <p>
+ * The semantics of the <i>location</i> parameter is implementation
+ * dependent. The RepositoryAgentFactory MUST handle any initial "urn:" and
+ * <i>[type]</i> of a urn: <i>[type]</i>:<i>[location]</i> format.
+ * </p>
+ *
+ * @param location
+ * Location of the repository.
+ *
+ * @return A RepositoryAgent for the given location and locale.
+ * @throws RepositoryAgentCreationException
+ */
+ RepositoryAgent create(String location, Locale locale) throws
RepositoryAgentCreationException;
+
+ /**
+ * Call to dispose the RepositoryAgent.
+ *
+ * It is important that the factory is given a chance to clean up the
+ * RepositoryAgent, and therefor this method must be called when the
+ * RepositoryAgent is no longer needed.
+ *
+ * @param agent
+ * The RepositoryAgent to drop/delete.
+ */
+ void dispose(RepositoryAgent agent);
+
+ /**
+ * Adds a RepositoryAgentFactoryListener.
+ *
+ * <p>
+ * If an equal listener already exists, the listener will not be added.
+ * </p>
+ *
+ * @param listener
+ * The listener to add.
+ */
+ void addRepositoryAgentFactoryListener(RepositoryAgentFactoryListener listener);
+
+ /**
+ * Removes a RepositoryAgentFactoryListener.
+ *
+ * <p>
+ * If the listener does not exist, nothing will happen.
+ * </p>
+ *
+ * @param listener
+ * The listener to be removed.
+ */
+ void removeRepositoryAgentFactoryListener(RepositoryAgentFactoryListener
listener);
+
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]