Permalink
Browse files

o Added svn:eol-style=native

  • Loading branch information...
bentmann
bentmann committed Apr 11, 2008
1 parent 308acdc commit 8225985121ab46c5a2cc09e80375cd93098346b9
Showing with 1,926 additions and 1,926 deletions.
  1. +2 −2 NOTICE.txt
  2. +67 −67 src/main/java/org/codehaus/plexus/components/io/filemappers/FileExtensionMapper.java
  3. +28 −28 src/main/java/org/codehaus/plexus/components/io/filemappers/FileMapper.java
  4. +28 −28 src/main/java/org/codehaus/plexus/components/io/filemappers/FlattenFileMapper.java
  5. +21 −21 src/main/java/org/codehaus/plexus/components/io/filemappers/IdentityMapper.java
  6. +55 −55 src/main/java/org/codehaus/plexus/components/io/filemappers/MergeFileMapper.java
  7. +20 −20 src/main/java/org/codehaus/plexus/components/io/fileselectors/AllFilesFileSelector.java
  8. +39 −39 src/main/java/org/codehaus/plexus/components/io/fileselectors/FileInfo.java
  9. +28 −28 src/main/java/org/codehaus/plexus/components/io/fileselectors/FileSelector.java
  10. +63 −63 ...n/java/org/codehaus/plexus/components/io/resources/AbstractPlexusIoArchiveResourceCollection.java
  11. +122 −122 src/main/java/org/codehaus/plexus/components/io/resources/AbstractPlexusIoResource.java
  12. +228 −228 src/main/java/org/codehaus/plexus/components/io/resources/AbstractPlexusIoResourceCollection.java
  13. +112 −112 src/main/java/org/codehaus/plexus/components/io/resources/PlexusIoFileResource.java
  14. +120 −120 src/main/java/org/codehaus/plexus/components/io/resources/PlexusIoFileResourceCollection.java
  15. +120 −120 src/main/java/org/codehaus/plexus/components/io/resources/PlexusIoProxyResourceCollection.java
  16. +51 −51 src/main/java/org/codehaus/plexus/components/io/resources/PlexusIoResource.java
  17. +47 −47 src/main/java/org/codehaus/plexus/components/io/resources/PlexusIoResourceCollection.java
  18. +27 −27 src/main/java/org/codehaus/plexus/components/io/resources/PlexusIoURLResource.java
  19. +64 −64 src/main/java/org/codehaus/plexus/components/io/resources/PlexusIoZipFileResourceCollection.java
  20. +84 −84 src/main/resources/META-INF/plexus/components.xml
  21. +96 −96 src/site/apt/filemappers.apt
  22. +63 −63 src/site/apt/fileselectors.apt
  23. +26 −26 src/site/apt/index.apt
  24. +35 −35 src/site/site.xml
  25. +154 −154 src/test/java/org/codehaus/plexus/components/io/filemappers/FileMapperTest.java
  26. +226 −226 src/test/java/org/codehaus/plexus/components/io/filemappers/ResourcesTest.java
View
@@ -1,2 +1,2 @@
-This product includes software developed by
-The Apache Software Foundation (http://www.apache.org/).
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
@@ -1,67 +1,67 @@
-package org.codehaus.plexus.components.io.filemappers;
-
-/**
- * An implementation of {@link FileMapper}, which changes the files extension.
- */
-public class FileExtensionMapper extends IdentityMapper
-{
- /**
- * The file extension mappers role-hint: "fileExtension".
- */
- public static final String ROLE_HINT = "fileExtension";
-
- private String targetExtension;
-
- /**
- * Sets the target files extension.
- *
- * @throws IllegalArgumentException
- * The target extension is null or empty.
- */
- public void setTargetExtension( String pTargetExtension )
- {
- if ( pTargetExtension == null )
- {
- throw new IllegalArgumentException( "The target extension is null." );
- }
- if ( pTargetExtension.length() == 0 )
- {
- throw new IllegalArgumentException( "The target extension is empty." );
- }
- if ( pTargetExtension.charAt( 0 ) == '.' )
- {
- targetExtension = pTargetExtension;
- }
- else
- {
- targetExtension = '.' + pTargetExtension;
- }
- }
-
- /**
- * Returns the target files extension.
- */
- public String getTargetExtension()
- {
- return targetExtension;
- }
-
- public String getMappedFileName( String pName )
- {
- final String ext = getTargetExtension();
- if ( ext == null )
- {
- throw new IllegalStateException( "The target extension has not been set." );
- }
- final String name = super.getMappedFileName( pName ); // Check arguments
- final int offset = pName.indexOf( '.' );
- if ( offset == -1 )
- {
- return name + ext;
- }
- else
- {
- return name.substring( 0, offset ) + ext;
- }
- }
-}
+package org.codehaus.plexus.components.io.filemappers;
+
+/**
+ * An implementation of {@link FileMapper}, which changes the files extension.
+ */
+public class FileExtensionMapper extends IdentityMapper
+{
+ /**
+ * The file extension mappers role-hint: "fileExtension".
+ */
+ public static final String ROLE_HINT = "fileExtension";
+
+ private String targetExtension;
+
+ /**
+ * Sets the target files extension.
+ *
+ * @throws IllegalArgumentException
+ * The target extension is null or empty.
+ */
+ public void setTargetExtension( String pTargetExtension )
+ {
+ if ( pTargetExtension == null )
+ {
+ throw new IllegalArgumentException( "The target extension is null." );
+ }
+ if ( pTargetExtension.length() == 0 )
+ {
+ throw new IllegalArgumentException( "The target extension is empty." );
+ }
+ if ( pTargetExtension.charAt( 0 ) == '.' )
+ {
+ targetExtension = pTargetExtension;
+ }
+ else
+ {
+ targetExtension = '.' + pTargetExtension;
+ }
+ }
+
+ /**
+ * Returns the target files extension.
+ */
+ public String getTargetExtension()
+ {
+ return targetExtension;
+ }
+
+ public String getMappedFileName( String pName )
+ {
+ final String ext = getTargetExtension();
+ if ( ext == null )
+ {
+ throw new IllegalStateException( "The target extension has not been set." );
+ }
+ final String name = super.getMappedFileName( pName ); // Check arguments
+ final int offset = pName.indexOf( '.' );
+ if ( offset == -1 )
+ {
+ return name + ext;
+ }
+ else
+ {
+ return name.substring( 0, offset ) + ext;
+ }
+ }
+}
@@ -1,28 +1,28 @@
-package org.codehaus.plexus.components.io.filemappers;
-
-/**
- * Interface of a component, which may be used to map file names.
- */
-public interface FileMapper
-{
- /**
- * Role used to register component implementations with the container.
- */
- public static final String ROLE = FileMapper.class.getName();
-
- /**
- * The default role-hint: "default".
- */
- public static final String DEFAULT_ROLE_HINT = "default";
-
- /**
- * Maps the given source name to a target name.
- *
- * @param pName
- * The source name.
- * @return The target name.
- * @throws IllegalArgumentException
- * The source name is null or empty.
- */
- public String getMappedFileName( String pName );
-}
+package org.codehaus.plexus.components.io.filemappers;
+
+/**
+ * Interface of a component, which may be used to map file names.
+ */
+public interface FileMapper
+{
+ /**
+ * Role used to register component implementations with the container.
+ */
+ public static final String ROLE = FileMapper.class.getName();
+
+ /**
+ * The default role-hint: "default".
+ */
+ public static final String DEFAULT_ROLE_HINT = "default";
+
+ /**
+ * Maps the given source name to a target name.
+ *
+ * @param pName
+ * The source name.
+ * @return The target name.
+ * @throws IllegalArgumentException
+ * The source name is null or empty.
+ */
+ public String getMappedFileName( String pName );
+}
@@ -1,28 +1,28 @@
-package org.codehaus.plexus.components.io.filemappers;
-
-/**
- * Implementation of a flattening file mapper: Removes all directory parts.
- */
-public class FlattenFileMapper extends IdentityMapper
-{
- /**
- * The flatten file mappers role-hint: "flatten".
- */
- public static final String ROLE_HINT = "flatten";
-
- public String getMappedFileName( String pName )
- {
- String name = super.getMappedFileName( pName ); // Check for null, etc.
- int offset = pName.lastIndexOf( '/' );
- if ( offset >= 0 )
- {
- name = name.substring( offset + 1 );
- }
- offset = pName.lastIndexOf( '\\' );
- if ( offset >= 0 )
- {
- name = name.substring( offset + 1 );
- }
- return name;
- }
-}
+package org.codehaus.plexus.components.io.filemappers;
+
+/**
+ * Implementation of a flattening file mapper: Removes all directory parts.
+ */
+public class FlattenFileMapper extends IdentityMapper
+{
+ /**
+ * The flatten file mappers role-hint: "flatten".
+ */
+ public static final String ROLE_HINT = "flatten";
+
+ public String getMappedFileName( String pName )
+ {
+ String name = super.getMappedFileName( pName ); // Check for null, etc.
+ int offset = pName.lastIndexOf( '/' );
+ if ( offset >= 0 )
+ {
+ name = name.substring( offset + 1 );
+ }
+ offset = pName.lastIndexOf( '\\' );
+ if ( offset >= 0 )
+ {
+ name = name.substring( offset + 1 );
+ }
+ return name;
+ }
+}
@@ -1,21 +1,21 @@
-package org.codehaus.plexus.components.io.filemappers;
-
-/**
- * Default implementation of {@link FileMapper}, which performs the identity mapping: All names are left unchanged.
- */
-public class IdentityMapper implements FileMapper
-{
- /**
- * The identity mappers role-hint: "identity".
- */
- public static final String ROLE_HINT = "identity";
-
- public String getMappedFileName( String pName )
- {
- if ( pName == null || pName.length() == 0 )
- {
- throw new IllegalArgumentException( "The source name must not be null." );
- }
- return pName;
- }
-}
+package org.codehaus.plexus.components.io.filemappers;
+
+/**
+ * Default implementation of {@link FileMapper}, which performs the identity mapping: All names are left unchanged.
+ */
+public class IdentityMapper implements FileMapper
+{
+ /**
+ * The identity mappers role-hint: "identity".
+ */
+ public static final String ROLE_HINT = "identity";
+
+ public String getMappedFileName( String pName )
+ {
+ if ( pName == null || pName.length() == 0 )
+ {
+ throw new IllegalArgumentException( "The source name must not be null." );
+ }
+ return pName;
+ }
+}
Oops, something went wrong.

0 comments on commit 8225985

Please sign in to comment.