]> source.dussan.org Git - archiva.git/commitdiff
Remove unused code
authorJames William Dumay <jdumay@apache.org>
Tue, 16 Dec 2008 05:28:59 +0000 (05:28 +0000)
committerJames William Dumay <jdumay@apache.org>
Tue, 16 Dec 2008 05:28:59 +0000 (05:28 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@726963 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/functors/BytecodeIndexTransformer.java [deleted file]
archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/functors/FileContentIndexTransformer.java [deleted file]
archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/functors/HashcodesIndexTransformer.java [deleted file]
archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/functors/IndexExistsPredicate.java [deleted file]
archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/functors/SearchableTransformer.java [deleted file]
archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/functors/UserAllowedToSearchRepositoryPredicate.java [deleted file]

diff --git a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/functors/BytecodeIndexTransformer.java b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/functors/BytecodeIndexTransformer.java
deleted file mode 100644 (file)
index 58c2210..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-package org.apache.maven.archiva.indexer.functors;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.commons.collections.Transformer;
-import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
-import org.apache.maven.archiva.indexer.RepositoryContentIndexFactory;
-
-/**
- * BytecodeIndexTransformer 
- *
- * @version $Id$
- * 
- * @plexus.component role="org.apache.commons.collections.Transformer" role-hint="bytecode"
- */
-public class BytecodeIndexTransformer
-    implements Transformer
-{
-    /**
-     * @plexus.requirement role-hint="lucene"
-     */
-    private RepositoryContentIndexFactory indexFactory;
-
-    public Object transform( Object input )
-    {
-        if ( input instanceof ManagedRepositoryConfiguration )
-        {
-            return indexFactory.createBytecodeIndex( (ManagedRepositoryConfiguration) input );
-        }
-
-        return input;
-    }
-}
diff --git a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/functors/FileContentIndexTransformer.java b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/functors/FileContentIndexTransformer.java
deleted file mode 100644 (file)
index c04a715..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-package org.apache.maven.archiva.indexer.functors;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.commons.collections.Transformer;
-import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
-import org.apache.maven.archiva.indexer.RepositoryContentIndexFactory;
-
-/**
- * FileContentIndexTransformer 
- *
- * @version $Id$
- * 
- * @plexus.component role="org.apache.commons.collections.Transformer" role-hint="filecontent"
- */
-public class FileContentIndexTransformer
-    implements Transformer
-{
-    /**
-     * @plexus.requirement role-hint="lucene"
-     */
-    private RepositoryContentIndexFactory indexFactory;
-
-    public Object transform( Object input )
-    {
-        if ( input instanceof ManagedRepositoryConfiguration )
-        {
-            return indexFactory.createFileContentIndex( (ManagedRepositoryConfiguration) input );
-        }
-
-        return input;
-    }
-}
diff --git a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/functors/HashcodesIndexTransformer.java b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/functors/HashcodesIndexTransformer.java
deleted file mode 100644 (file)
index d3d9013..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-package org.apache.maven.archiva.indexer.functors;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.commons.collections.Transformer;
-import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
-import org.apache.maven.archiva.indexer.RepositoryContentIndexFactory;
-
-/**
- * HashcodesIndexTransformer 
- *
- * @version $Id$
- * 
- * @plexus.component role="org.apache.commons.collections.Transformer" role-hint="hashcodes"
- */
-public class HashcodesIndexTransformer
-    implements Transformer
-{
-    /**
-     * @plexus.requirement role-hint="lucene"
-     */
-    private RepositoryContentIndexFactory indexFactory;
-
-    public Object transform( Object input )
-    {
-        if ( input instanceof ManagedRepositoryConfiguration )
-        {
-            return indexFactory.createHashcodeIndex( (ManagedRepositoryConfiguration) input );
-        }
-
-        return input;
-    }
-}
diff --git a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/functors/IndexExistsPredicate.java b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/functors/IndexExistsPredicate.java
deleted file mode 100644 (file)
index e20b1c6..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-package org.apache.maven.archiva.indexer.functors;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.commons.collections.Predicate;
-import org.apache.maven.archiva.indexer.RepositoryContentIndex;
-import org.apache.maven.archiva.indexer.RepositoryIndexException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Test the {@link RepositoryContentIndex} object for the existance of an index. 
- *
- * @version $Id$
- */
-public class IndexExistsPredicate
-    implements Predicate
-{
-    private Logger log = LoggerFactory.getLogger( IndexExistsPredicate.class );
-    
-    public boolean evaluate( Object object )
-    {
-        boolean satisfies = false;
-
-        if ( object instanceof RepositoryContentIndex )
-        {
-            RepositoryContentIndex index = (RepositoryContentIndex) object;
-            try
-            {
-                satisfies = index.exists();
-            }
-            catch ( RepositoryIndexException e )
-            {
-                log.info(
-                                  "Repository Content Index [" + index.getId() + "] for repository ["
-                                      + index.getRepository().getId() + "] does not exist yet in ["
-                                      + index.getIndexDirectory().getAbsolutePath() + "]." );
-            }
-        }
-        
-        return satisfies;
-    }
-}
diff --git a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/functors/SearchableTransformer.java b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/functors/SearchableTransformer.java
deleted file mode 100644 (file)
index 5b05b98..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-package org.apache.maven.archiva.indexer.functors;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.commons.collections.Transformer;
-import org.apache.maven.archiva.indexer.RepositoryIndexSearchException;
-import org.apache.maven.archiva.indexer.lucene.LuceneRepositoryContentIndex;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * SearchableTransformer 
- *
- * @version $Id$
- * 
- * @plexus.component role="org.apache.commons.collections.Transformer" role-hint="searchable"
- */
-public class SearchableTransformer
-    implements Transformer
-{
-    private Logger log = LoggerFactory.getLogger( SearchableTransformer.class );
-    
-    public Object transform( Object input )
-    {
-        if ( input instanceof LuceneRepositoryContentIndex )
-        {
-            try
-            {
-                LuceneRepositoryContentIndex index = (LuceneRepositoryContentIndex) input;
-                return index.getSearchable();
-            }
-            catch ( RepositoryIndexSearchException e )
-            {
-                log.warn("Unable to get searchable for index:" + e.getMessage(), e);
-            }
-        }
-        
-        return input;
-    }
-}
diff --git a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/functors/UserAllowedToSearchRepositoryPredicate.java b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/functors/UserAllowedToSearchRepositoryPredicate.java
deleted file mode 100644 (file)
index 4b42257..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-package org.apache.maven.archiva.indexer.functors;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.commons.collections.Predicate;
-import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
-
-/**
- * UserAllowedToSearchRepositoryPredicate 
- *
- * @version $Id$
- */
-public class UserAllowedToSearchRepositoryPredicate
-    implements Predicate
-{
-    public boolean evaluate( Object object )
-    {
-        boolean satisfies = false;
-
-        if ( object instanceof ManagedRepositoryConfiguration )
-        {
-            // TODO: perform check here.
-            satisfies = true; // Everyone is allowed! (for now)
-        }
-
-        return satisfies;
-    }
-}