Package pt.webdetails.cdf.dd.plugin.resource

Source Code of pt.webdetails.cdf.dd.plugin.resource.PluginResourceLocationManager

package pt.webdetails.cdf.dd.plugin.resource;

import java.util.List;

import org.apache.commons.lang.NotImplementedException;

import pt.webdetails.cdf.dd.DashboardDesignerContentGenerator;
import pt.webdetails.cdf.dd.FsPluginResourceLocations;
import pt.webdetails.cdf.dd.IPluginResourceLocationManager;
import pt.webdetails.cdf.dd.cdf.CdfStyles;
import pt.webdetails.cpf.packager.origin.PathOrigin;
import pt.webdetails.cpf.repository.api.IReadAccess;

public class PluginResourceLocationManager implements IPluginResourceLocationManager {

  private FsPluginResourceLocations componentLocator;

  public IReadAccess[] getAllCustomComponentsResourceLocations() {
    throw new NotImplementedException( "shouldn't be using this anymore" );
  }

  @Override
  public String getMessagePropertiesResourceLocation() {
    return "lang/messages.properties";
  }

  @Override
  public String getStyleResourceLocation( String arg0 ) {
    return new CdfStyles().getResourceLocation( arg0 );
  }

  public synchronized List<PathOrigin> getCustomComponentsLocations() {
    if ( componentLocator == null ) {
      componentLocator = new FsPluginResourceLocations();
    }
    return componentLocator.getCustomComponentLocations();
  }
}
TOP

Related Classes of pt.webdetails.cdf.dd.plugin.resource.PluginResourceLocationManager

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.