Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

Commit

Permalink
Drop initializable, use injection with default
Browse files Browse the repository at this point in the history
  • Loading branch information
jdillon committed Oct 18, 2012
1 parent 25b9f59 commit 2ff103c
Showing 1 changed file with 2 additions and 16 deletions.
Expand Up @@ -24,9 +24,6 @@
import org.apache.velocity.exception.MethodInvocationException;
import org.apache.velocity.exception.ParseErrorException;
import org.apache.velocity.exception.ResourceNotFoundException;
// FIXME: Kill these...
import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException;
import org.codehaus.plexus.util.StringUtils;
import org.restlet.Context;
import org.restlet.data.MediaType;
Expand All @@ -51,8 +48,7 @@
@Singleton
public class IndexTemplatePlexusResource
extends AbstractPlexusResource
implements ManagedPlexusResource,
Initializable
implements ManagedPlexusResource
{

public static final String NAME = "indexTemplate";
Expand All @@ -64,7 +60,7 @@ public class IndexTemplatePlexusResource
private Map<String, NexusIndexHtmlCustomizer> bundles;

@Inject
@Named( "${index.template.file}" )
@Named( "${index.template.file:-templates/index.vm}" )
String templateFilename;

public IndexTemplatePlexusResource()
Expand Down Expand Up @@ -257,14 +253,4 @@ protected void evaluateIfNeeded( VelocityEngine engine, Map<String, Object> cont
}
}
}

public void initialize()
throws InitializationException
{
//Hasn't been interpolated
if ( "${index.template.file}".equals( templateFilename ) )
{
templateFilename = "templates/index.vm";
}
}
}

0 comments on commit 2ff103c

Please sign in to comment.