View Javadoc

1   package org.astrogrid.applications.manager;
2   
3   import org.astrogrid.config.SimpleConfig;
4   
5   /***
6    * An implementation of BaseApplicationDescriptionLibrary.AppAuthorityIDResolver
7    * that uses the AstroGrid configuration to get its value.
8    * This is required by the ApplicationDescriptionEnvironment.
9    * This implementation was refactored from an anonymous inner class in 
10   * EmptyCEAComponentManager. The anonymous class works in unit tests and in
11   * the web service but Picocontainer cannot use it when called in a JSP;
12   * presumably the class-loading details are different there.
13   *
14   * @author Guy Rixon
15   */
16  public class DefaultAppAuthorityIDResolver implements AppAuthorityIDResolver {
17    
18    public String getAuthorityID() {
19      return SimpleConfig.getSingleton().getString("cea.application.authorityid", 
20                                                   "org.astrogrid.localhost");
21    }
22    
23  }