View Javadoc

1   /*$Id: ApplicationDescriptionEnvironment.java,v 1.5 2004/11/27 13:20:02 pah Exp $
2    * Created on 16-Jun-2004
3    *
4    * Copyright (C) AstroGrid. All rights reserved.
5    *
6    * This software is published under the terms of the AstroGrid 
7    * Software License version 1.2, a copy of which has been included 
8    * with this distribution in the LICENSE.txt file.  
9    *
10  **/
11  package org.astrogrid.applications.description.base;
12  
13  import org.astrogrid.applications.description.BaseApplicationDescriptionLibrary;
14  import org.astrogrid.applications.manager.idgen.IdGen;
15  import org.astrogrid.applications.parameter.protocol.ProtocolLibrary;
16  import org.astrogrid.component.descriptor.ComponentDescriptor;
17  
18  import junit.framework.Test;
19  
20  /*** A container for some components generally used within {@link org.astrogrid.applications.description.ApplicationDescription} implementations.
21   * <p>
22   * The components are bundled into this container to make it simpler to add further ones later
23   * <p />
24   * At present, this class containts a unique-id-generator, and library of indirection handlers.
25   * @todo could add hash map, so providers can stuff their own things in here? -becomes a kind of context object. unsure whether this is a good idea - extension may be better.
26   * @author Noel Winstanley nw@jb.man.ac.uk 16-Jun-2004
27   *
28   */
29  public class ApplicationDescriptionEnvironment implements ComponentDescriptor {
30      /*** Construct a new ApplicationDescriptionEnvironment
31       * 
32       */
33      public ApplicationDescriptionEnvironment(IdGen id,ProtocolLibrary lib, BaseApplicationDescriptionLibrary.AppAuthorityIDResolver appAuthorityIDResolver) {        
34          super();
35          this.id =id;
36          this.lib = lib;
37          this.authIDresolver = appAuthorityIDResolver;
38      }
39      protected final IdGen id;
40      protected final ProtocolLibrary lib;
41      protected final BaseApplicationDescriptionLibrary.AppAuthorityIDResolver authIDresolver;
42     
43      
44      /***Access the unique id generator
45       * @return the IdGen for this server
46       * @see org.astrogrid.applications.manager.idgen
47       */
48      public IdGen getIdGen() {
49          return this.id;
50      }
51      
52      /*** Access the library of protcols that paramters can be indirected through
53       * @return the protocol library.
54       * @see org.astrogrid.applications.param.indirect
55       */
56      public ProtocolLibrary getProtocolLib() {
57          return this.lib;
58      }
59      
60      /***Access the resolver that will return the appropriate authorityID that applications can be registered under.
61      * @return the resolver
62      */
63     public BaseApplicationDescriptionLibrary.AppAuthorityIDResolver getAuthIDResolver()
64      {
65         return this.authIDresolver;
66      }
67  
68      /***
69       * @see org.astrogrid.component.descriptor.ComponentDescriptor#getName()
70       */
71      public String getName() {
72          return "ApplicationDescriptionEnvironment";
73      }
74  
75      /***
76       * @see org.astrogrid.component.descriptor.ComponentDescriptor#getDescription()
77       */
78      public String getDescription() {
79          return "Container for components used by applications";
80      }
81  
82      /***
83       * @see org.astrogrid.component.descriptor.ComponentDescriptor#getInstallationTest()
84       */
85      public Test getInstallationTest() {
86          return null;
87      }
88      
89    
90      
91  }
92  
93  
94  /* 
95  $Log: ApplicationDescriptionEnvironment.java,v $
96  Revision 1.5  2004/11/27 13:20:02  pah
97  result of merge of pah_cea_bz561 branch
98  
99  Revision 1.4.70.1  2004/11/09 09:21:16  pah
100 initial attempt to rationalise authorityID use & self registering
101 
102 Revision 1.4  2004/07/26 12:07:38  nw
103 renamed indirect package to protocol,
104 renamed classes and methods within protocol package
105 javadocs
106 
107 Revision 1.3  2004/07/26 00:58:22  nw
108 javadoc
109 
110 Revision 1.2  2004/07/01 11:16:22  nw
111 merged in branch
112 nww-itn06-componentization
113 
114 Revision 1.1.2.2  2004/07/01 01:42:47  nw
115 final version, before merge
116 
117 Revision 1.1.2.1  2004/06/17 09:21:23  nw
118 finished all major functionality additions to core
119  
120 */