Author: rob.stryker(a)jboss.com
Date: 2008-02-22 18:47:28 -0500 (Fri, 22 Feb 2008)
New Revision: 6549
Added:
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/INamedContainerArchiveNode.java
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/IArchive.java
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/IArchiveFolder.java
Log:
Archives API refactor (code review)
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/IArchive.java
===================================================================
---
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/IArchive.java 2008-02-22
22:50:36 UTC (rev 6548)
+++
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/IArchive.java 2008-02-22
23:47:28 UTC (rev 6549)
@@ -33,12 +33,11 @@
* @author <a href="rob.stryker(a)redhat.com">Rob Stryker</a>
* @version $Revision: 1939 $
*/
-public interface IArchive extends IArchiveNode {
+public interface IArchive extends INamedContainerArchiveNode {
public static final String ATTRIBUTE_PREFIX =
"org.jboss.ide.eclipse.archives.core.model.IPackage.";
public static final String PACKAGE_TYPE_ATTRIBUTE = ATTRIBUTE_PREFIX +
"packageType";
public static final String EXPLODED_ATTRIBUTE = ATTRIBUTE_PREFIX +
"exploded";
public static final String DESTINATION_ATTRIBUTE = ATTRIBUTE_PREFIX +
"destination";
- public static final String NAME_ATTRIBUTE = ATTRIBUTE_PREFIX + "name";
public static final String IN_WORKSPACE_ATTRIBUTE = ATTRIBUTE_PREFIX +
"inWorkspace";
@@ -52,11 +51,6 @@
* @return
*/
public String getArchiveTypeId();
-
- /**
- * @return The name (with extension) of this package.
- */
- public String getName();
/**
* @return Whether or not this package will be build exploded, or as a directory instead
of a ZIP/JAR
@@ -74,21 +68,6 @@
* @return Whether or not the destination of this package is in the workspace
*/
public boolean isDestinationInWorkspace();
-
- /**
- * @return A list of sub-archives contained in this package
- */
- public IArchive[] getArchives();
-
- /**
- * @return A list of folders contained in this package
- */
- public IArchiveFolder[] getFolders();
-
- /**
- * @return A list of filesets contained in this package
- */
- public IArchiveFileSet[] getFileSets();
/**
* Get The path to this package's output file.
@@ -122,13 +101,8 @@
* @param type
*/
public void setArchiveType(String type);
+
/**
- * Set the name of this package
- * @param name This package's name
- */
- public void setName(String name);
-
- /**
* Set whether or not this package is generated as a folder
* @param exploded
*/
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/IArchiveFolder.java
===================================================================
---
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/IArchiveFolder.java 2008-02-22
22:50:36 UTC (rev 6548)
+++
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/IArchiveFolder.java 2008-02-22
23:47:28 UTC (rev 6549)
@@ -22,45 +22,6 @@
package org.jboss.ide.eclipse.archives.core.model;
-/**
- * <p>
- * This interface represents a folder inside a package definition.
- * A folder can contain packages, filesets, and sub-folders.
- * </p>
- *
- * @author <a href="marshall(a)jboss.org">Marshall Culpepper</a>
- * @author <a href="rob.stryker(a)redhat.com">Rob Stryker</a>
- * @version $Revision: 1929 $
- */
-public interface IArchiveFolder extends IArchiveNode {
-
- public static final String ATTRIBUTE_PREFIX =
"org.jboss.ide.eclipse.archives.core.model.IPackageFolder.";
- public static final String NAME_ATTRIBUTE = ATTRIBUTE_PREFIX + "name";
-
-
- /**
- * @return The name of this folder
- */
- public String getName();
-
- /**
- * Set the name of this folder
- * @param name The name of this folder
- */
- public void setName(String name);
-
- /**
- * @return An array of sub-packages of this folder
- */
- public IArchive[] getArchives();
-
- /**
- * @return An array of sub-folders of this folder
- */
- public IArchiveFolder[] getFolders();
-
- /**
- * @return An array of filesets whose destination is this folder
- */
- public IArchiveFileSet[] getFileSets();
+public interface IArchiveFolder extends INamedContainerArchiveNode {
+ public static final String ATTRIBUTE_PREFIX =
"org.jboss.ide.eclipse.archives.core.model.IPackageFolder.";
}
Added:
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/INamedContainerArchiveNode.java
===================================================================
---
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/INamedContainerArchiveNode.java
(rev 0)
+++
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/INamedContainerArchiveNode.java 2008-02-22
23:47:28 UTC (rev 6549)
@@ -0,0 +1,65 @@
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ide.eclipse.archives.core.model;
+
+
+/**
+ * <p>
+ * This interface represents a folder inside a package definition.
+ * A folder can contain packages, filesets, and sub-folders.
+ * </p>
+ *
+ * @author <a href="marshall(a)jboss.org">Marshall Culpepper</a>
+ * @author <a href="rob.stryker(a)redhat.com">Rob Stryker</a>
+ * @version $Revision: 1929 $
+ */
+public interface INamedContainerArchiveNode extends IArchiveNode {
+ public static final String ATTRIBUTE_PREFIX =
"org.jboss.ide.eclipse.archives.core.model.INamedContainerArchiveNode";
+ public static final String NAME_ATTRIBUTE = ATTRIBUTE_PREFIX + "name";
+
+ /**
+ * @return The name of this folder
+ */
+ public String getName();
+
+ /**
+ * Set the name of this folder
+ * @param name The name of this folder
+ */
+ public void setName(String name);
+
+ /**
+ * @return An array of sub-packages of this folder
+ */
+ public IArchive[] getArchives();
+
+ /**
+ * @return An array of sub-folders of this folder
+ */
+ public IArchiveFolder[] getFolders();
+
+ /**
+ * @return An array of filesets whose destination is this folder
+ */
+ public IArchiveFileSet[] getFileSets();
+
+}