Package fr.imag.adele.apam.declarations

Examples of fr.imag.adele.apam.declarations.InstanceDeclaration


   *
   */
  private static class SystemRootInstance extends BaseApformComponent<Instance, InstanceDeclaration> implements ApformInstance {

    public SystemRootInstance(Implementation rootImplementation, String name) {
      super(new InstanceDeclaration(VersionedReference.any(rootImplementation.getImplDeclaration().getReference()),name));
    }
View Full Code Here


     *
     * @param ipojoInstance
     */
    public ApformOSGiInstance(Specification specification, ServiceReference reference) {

        super(new InstanceDeclaration(VersionedReference.any(generateImplementationName(specification,reference)), generateInstanceName(specification,reference)));
       
        this.specification    = specification;
       
        for (PropertyDefinition property : specification.getDeclaration().getPropertyDefinitions()) {
          Object value = reference.getProperty(property.getName());
View Full Code Here

     * An apform instance to represent a legacy component created using the APAM API
     *
     * @param ipojoInstance
     */
    public ApformIpojoInstance(ComponentInstance ipojoInstance) {
      super( new InstanceDeclaration(VersionedReference.any(new ApformIPojoImplementation.Reference(ipojoInstance.getFactory().getName())), ipojoInstance.getInstanceName()));

      this.ipojoInstance = ipojoInstance;
    }
View Full Code Here

                        componentDescription.addAttribute(new Attribute("main",composite.getMainComponent().getName()));
                    }
                }

                if (declaration instanceof InstanceDeclaration) {
                    InstanceDeclaration instance = (InstanceDeclaration) declaration;
                    if (instance.getImplementation() != null ) {
                        componentDescription.addAttribute(new Attribute("implementation",instance.getImplementation().getName()));
                    }
                }

                Element providesDescription = new Element("provides", APAM_NAMESPACE);;
                for (ResourceReference resource : declaration.getProvidedResources()) {
View Full Code Here

    String instanceName = (String) configuration.get("instance.name");

    declaration = (InstanceDeclaration) configuration.get(ApamInstanceManager.ATT_DECLARATION);
    if (isApamCreated || (declaration == null)) {
     
      declaration = new InstanceDeclaration(VersionedReference.any(getFactory().getApform().getDeclaration().getReference()), instanceName);
     
      for (Enumeration<String> properties = configuration.keys(); properties.hasMoreElements();) {
        String property = properties.nextElement();
        declaration.getProperties().put(property, configuration.get(property).toString());
      }
View Full Code Here

      triggerDeclarations.add(triggerDeclaration);

    }


        InstanceDeclaration declaration = new InstanceDeclaration(implementationVersion,name,triggerDeclarations);
    parseComponent(element, declaration);

    return declaration;
  }
View Full Code Here

   */
  private static class ApamOnlyComposite extends BaseApformComponent<Composite, InstanceDeclaration> implements ApformInstance {

    public ApamOnlyComposite(ComponentReference<CompositeDeclaration> implementation, String name, Map<String, String> initialProperties) {

      super(new InstanceDeclaration(VersionedReference.any(implementation),name));
     
      if (initialProperties != null) {
        for (Map.Entry<String, String> property : initialProperties.entrySet()) {
          if (!Attribute.isFinalAttribute(property.getKey())) {
            declaration.getProperties().put(property.getKey(), property.getValue());
View Full Code Here

      case INSTANCE:
              ImplementationReference<ImplementationDeclaration> implementation   = reference(CST.IMPLNAME,ComponentKind.IMPLEMENTATION);
            String range                             = property(CST.REQUIRE_VERSION);
               VersionedReference<ImplementationDeclaration> implementationVersion      = VersionedReference.range(implementation,range);

            component = new InstanceDeclaration(implementationVersion, componentName);
        break;
      default:
    }
   
       
View Full Code Here

    RootURL = rootURL;
    ServletURL = rootURL + DistrimanConstant.PROVIDER_URL;
    this.isLocalhost = isLocalhost;
    my_impl = daddy;
    this.id = id;
    my_declaration = new InstanceDeclaration(VersionedReference.any(daddy.getDeclaration().getReference()), "RemoteMachine_" + RootURL);
    my_declaration.setInstantiable(false);
 
    Apform2Apam.newInstance(this);
    }
View Full Code Here

    public RemoteInstanceImpl(String dependencyId, String url, Composite composite, Object serviceObject) {
    this.id = dependencyId;
    this.url = url;
    this.serviceObject = serviceObject;
 
    declaration = new InstanceDeclaration(VersionedReference.any(new RemoteMachine.RemoteImplementationReference(getFullName())),getFullName());
    }
View Full Code Here

TOP

Related Classes of fr.imag.adele.apam.declarations.InstanceDeclaration

Copyright © 2018 www.massapicom. 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.