Examples of IComponent


Examples of org.jibx.binding.model.IComponent

    private void fillAttributes(ContainerElementBase cont, int offset, AbstractList attrs, SchemaHolder hold) {
       
        // add child attribute components
        ArrayList comps = cont.getAttributeComponents();
        for (int i = 0; i < comps.size(); i++) {
            IComponent comp = (IComponent)comps.get(i);
            if (comp instanceof ValueElement) {
               
                // simple attribute definition
                AttributeElement attr = new AttributeElement();
                attr.setName(comp.getName());
                QName qname = getSimpleTypeQName(comp);
                if (qname == null) {
                    attr.setTypeDefinition(buildSimpleType(comp));
                } else {
                    setAttributeType(qname, attr, hold);
                }
                if (!comp.isOptional()) {
                    attr.setUse(AttributeElement.REQUIRED_USE);
                }
                addItemDocumentation((ValueElement)comp, attr);
                attrs.add(attr);
               
View Full Code Here

Examples of org.jspresso.framework.model.component.IComponent

      storeProperty(propertyDescriptor.getName(), property);
    }
    if (property instanceof List) {
      List<IComponent> propertyAsList = (List<IComponent>) property;
      for (int i = 0; i < propertyAsList.size(); i++) {
        IComponent referent = propertyAsList.get(i);
        IComponent decorated = decorateReferent(referent, propertyDescriptor
            .getReferencedDescriptor().getElementDescriptor()
            .getComponentDescriptor());
        if (decorated != referent) {
          propertyAsList.set(i, decorated);
        }
      }
    } else if (property instanceof Set) {
      Set<IComponent> propertyAsSet = (Set<IComponent>) property;
      for (IComponent referent : new HashSet<IComponent>(propertyAsSet)) {
        IComponent decorated = decorateReferent(referent, propertyDescriptor
            .getReferencedDescriptor().getElementDescriptor()
            .getComponentDescriptor());
        if (decorated != referent) {
          propertyAsSet.add(decorated);
        }
View Full Code Here

Examples of org.jspresso.framework.model.component.IComponent

   *          the property descriptor to get the value for.
   * @return the property value.
   */
  protected Object getReferenceProperty(Object proxy,
      final IReferencePropertyDescriptor<IComponent> propertyDescriptor) {
    IComponent property = (IComponent) straightGetProperty(proxy,
        propertyDescriptor.getName());
    if (property == null && isInlineComponentReference(propertyDescriptor)) {
      property = inlineComponentFactory
          .createComponentInstance(propertyDescriptor.getReferencedDescriptor()
              .getComponentContract());
View Full Code Here

Examples of org.pentaho.platform.api.engine.IComponent

        if ( RuntimeContext.debug ) {
          debug( Messages.getInstance().getString(
              "RuntimeContext.DEBUG_VALIDATING_COMPONENT", actionDef.getComponentName() ) ); //$NON-NLS-1$
        }

        IComponent component = null;
        try {
          component = resolveComponent( actionDef, instanceId, processId, session );
          component.setLoggingLevel( loggingLevel );

          // allow the ActionDefinition to cache the component
          actionDef.setComponent( component );
          paramManager.setCurrentParameters( actionDef );
          /*
           * We need to catch checked and unchecked exceptions here so we can create an ActionSequeceException with
           * contextual information, including the root cause. Allowing unchecked exceptions to pass through would
           * prevent valuable feedback in the log or response.
           */
        } catch ( Throwable ex ) {
          ActionDefinition actionDefinition = new ActionDefinition( (Element) actionDef.getNode(), null );
          throw new ActionValidationException( Messages.getInstance().getErrorString(
              "RuntimeContext.ERROR_0009_COULD_NOT_CREATE_COMPONENT", actionDef.getComponentName().trim() ), ex, //$NON-NLS-1$
              session.getName(), instanceId, getActionSequence().getSequenceName(), actionDefinition.getDescription(),
              actionDefinition.getComponentName() );
        }

        int validateResult = IRuntimeContext.RUNTIME_CONTEXT_VALIDATE_OK;
        try {
          validateResult = component.validate();
          /*
           * We need to catch checked and unchecked exceptions here so we can create an ActionSequeceException with
           * contextual information, including the root cause. Allowing unchecked exceptions to pass through would
           * prevent valuable feedback in the log or response.
           */
        } catch ( Throwable t ) {
          throw new ActionValidationException( Messages.getInstance().getErrorString(
              "RuntimeContext.ERROR_0035_ACTION_VALIDATION_FAILED" ), t, //$NON-NLS-1$
              session.getName(), instanceId, getActionSequence().getSequenceName(), component.getActionDefinition() );
        }

        if ( validateResult != IRuntimeContext.RUNTIME_CONTEXT_VALIDATE_OK ) {
          throw new ActionValidationException( Messages.getInstance().getErrorString(
              "RuntimeContext.ERROR_0035_ACTION_VALIDATION_FAILED" ), //$NON-NLS-1$
              session.getName(), instanceId, getActionSequence().getSequenceName(), component.getActionDefinition() );
        }

        paramManager.addOutputParameters( actionDef );
        setCurrentComponent( "" ); //$NON-NLS-1$
        setCurrentActionDef( null );
View Full Code Here
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.