Ejemplo n.º 1
0
    public UnknownContext(ArooaContext parentContext) {
      this.parentContext = parentContext;

      ArooaContext interceptContext = new XMLInterceptor("xml").intercept(this);

      firstElementContext =
          interceptContext.getArooaHandler().onStartElement(element, interceptContext);
    }
Ejemplo n.º 2
0
  PropertyDefinitionImpl(String property, ArooaContext parentContext)
      throws ArooaNoPropertyException, ArooaException {
    this.property = property;
    RuntimeConfiguration parentRuntime = parentContext.getRuntime();

    PropertyAccessor propertyAccessor = parentContext.getSession().getTools().getPropertyAccessor();

    BeanOverview overview = parentRuntime.getClassIdentifier().getBeanOverview(propertyAccessor);

    type = overview.getPropertyType(property);
  }
Ejemplo n.º 3
0
  public DesignInstance createDesign(ArooaElement element, ArooaContext parentContext) {

    switch (parentContext.getArooaType()) {
      case COMPONENT:
        return new PropertiesJobDesign(element, parentContext);
      case VALUE:
        return new PropertiesTypeDesign(element, parentContext);
    }
    throw new IllegalStateException("Unknown Type.");
  }
Ejemplo n.º 4
0
          public void destroy() throws ArooaConfigurationException {
            fireBeforeDestroy();

            RuntimeConfiguration parentRuntime = parentContext.getRuntime();

            // check it's not the root
            if (parentRuntime != null) {

              int index =
                  parentContext.getConfigurationNode().indexOf(arooaContext.getConfigurationNode());

              if (index < 0) {
                throw new IllegalStateException("Configuration node not added to parent.");
              }

              parentContext.getRuntime().setIndexedProperty(null, index, null);
            }

            fireAfterDestroy();
          }
Ejemplo n.º 5
0
          public void init() throws ArooaConfigurationException {
            firstElementContext.getRuntime().init();

            fireBeforeInit();

            RuntimeConfiguration parentRuntime = parentContext.getRuntime();

            // check it's not the root
            if (parentRuntime != null) {

              int index =
                  parentContext.getConfigurationNode().indexOf(arooaContext.getConfigurationNode());

              if (index < 0) {
                throw new IllegalStateException("Configuration node not added to parent.");
              }

              parentRuntime.setIndexedProperty(null, index, UnknownInstance.this);
            }

            fireAfterInit();
          }
Ejemplo n.º 6
0
 public PrefixMappings getPrefixMappings() {
   return parentContext.getPrefixMappings();
 }
Ejemplo n.º 7
0
 public ArooaHandler getArooaHandler() {
   return firstElementContext.getArooaHandler();
 }
Ejemplo n.º 8
0
 public ArooaSession getSession() {
   return parentContext.getSession();
 }