Package nexj.core.meta

Examples of nexj.core.meta.MetadataException


            {
               part.setAggregation(CompositeMessagePart.SINGLE);
            }
            else
            {
               throw new MetadataException("err.meta.integration.aggregation",
                  new Object[]{sAggregation});
            }
         }

         part.setLax(XMLUtil.getBooleanAttr(partElement, "lax", part.isLax()));
View Full Code Here


                        }
                     });
                  }
                  else
                  {
                     throw new MetadataException("err.meta.msgPartElement", new Object[]{element.getNodeName()});
                  }
               }
            });
         }
      });
View Full Code Here

      {
         transformation.setDerivation(Transformation.DERIVATION_ABSTRACT);
      }
      else
      {
         throw new MetadataException("err.meta.integration.transformationDerivation",
            new Object[] {sDerivation, transformation.getName()});
      }

      transformation.setPrimary(XMLUtil.getBooleanAttr(transformationElement, "primary", true));
View Full Code Here

                  String sSource = XMLUtil.getStringAttr(sourceElement, "source");
                  final String sMapping = XMLUtil.getStringAttr(sourceElement, "mapping");

                  if (sSource != null && sMapping != null)
                  {
                     throw new MetadataException("err.meta.transformation.bothSourceMapping",
                        new Object[]{mapping.getName(), transformation.getName()});
                  }

                  final TransformationArgument argument = new TransformationArgument(sSourceName);

                  if (sMapping == null)
                  {
                     if (sSource == null)
                     {
                        sSource = "";
                     }

                     StringTokenizer tokenizer = new StringTokenizer(sSource);
                     TransformationSource source = transformation.getRoot();

                     while (tokenizer.hasMoreTokens())
                     {
                        String sPartName = tokenizer.nextToken();
                        boolean bFixed = sPartName.endsWith("$");

                        if (bFixed)
                        {
                           sPartName = sPartName.substring(0, sPartName.length() - 1);
                        }

                        source = source.addChild(sPartName);

                        if (bFixed)
                        {
                           mapping.setFixedSource(source, true);
                        }
                     }

                     argument.setSource(source);
                  }
                  else
                  {
                     m_postInheritanceTransformationFixupList.add(new ContextFixup(getHelper())
                     {
                        public void fixup()
                        {
                           argument.setMapping(transformation, sMapping);
                        }
                     });
                  }

                  argument.setNull(XMLUtil.getBooleanAttr(sourceElement, "null", argument.isNull()));
                  argument.setDefaultValue(m_helper.parse(XMLUtil.getStringAttr(sourceElement, "default"), false,
                     sCodeURL + '.' + argument.getName(), transformation.getPosMap(), argument.getDefaultValue(),
                     m_metadata.getGlobalEnvironment()));
                  mapping.addArgument(argument);
               }

               protected String getName(Element element)
               {
                  return XMLUtil.getStringAttr(element, "name");
               }
            });
         }
      });

      Element scriptElement = XMLUtil.findChildElement(mappingElement, "Script");
      Element transformElement = XMLUtil.findChildElement(mappingElement, "Transformation");

      if (scriptElement != null && transformElement != null)
      {
         throw new MetadataException("err.meta.transformation.bothScriptTransformation",
            new Object[]{mapping.getName(), transformation.getName()});
      }

      if (scriptElement != null)
      {
View Full Code Here

         {
            nVersion = Integer.parseInt(sServiceName.substring(i + 1));
         }
         catch (NumberFormatException e)
         {
            throw new MetadataException("err.meta.service.version", new Object[]{sServiceName.substring(i + 1)}, e);
         }

         sServiceName = sServiceName.substring(0, i);
      }
View Full Code Here

            {
               step = loadFlowMacroScript(element, sStepName, activity);

               if (step == null)
               {
                  throw new MetadataException("err.meta.service.invalidElement",
                     new Object[]{sElement, activity.getFlow().getFullName()});
               }
            }

            final String sNextStepName = XMLUtil.getStringAttr(element, "next");
View Full Code Here

         {
            mapping.setFragmentReplication(PersistenceMapping.REPLICATION_BROADCAST);
         }
         else
         {
            throw new MetadataException("err.meta.fragmentReplication",
               new Object[]{sFragmentReplication, metaclass.getName()});
         }
      }

      String sCaching = XMLUtil.getStringAttr(element, "caching");

      if (sCaching != null)
      {
         if (sCaching.equals("instance"))
         {
            mapping.setCaching(PersistenceMapping.CACHING_INSTANCE);
         }
         else if (sCaching.equals("class"))
         {
            mapping.setCaching(PersistenceMapping.CACHING_CLASS);
         }
         else
         {
            throw new MetadataException("err.meta.caching",
               new Object[]{sCaching, metaclass.getName()});
         }
      }

      return mapping;
View Full Code Here

      {
         component.setActivation(Component.NEW);
      }
      else
      {
         throw new MetadataException("err.meta.componentActivation", new Object[]{sActivation});
      }

      if (!isRuntimeExcluded())
      {
         component.setType(m_helper.getClassObject(XMLUtil.getReqStringAttr(componentElement, "type")));
View Full Code Here

      }
      else
      {
         if (!type.equals(Component.class))
         {
            throw new MetadataException("err.meta.componentElement",
               new Object[]{initializer.getName(), initializer.getComponent().getName()});
         }

         final Component component = new Component(initializer.getComponent().getName() +
            "/" + initializer.getName());
View Full Code Here

               {
                  Component component = initializer.getComponent().getMetadata().getComponent(sValue);

                  if (!m_bRuntimeExcluded && !type.isAssignableFrom(component.getType()))
                  {
                     throw new MetadataException("err.meta.propertyTypeMismatch",
                        new Object[]{initializer.getName(), initializer.getComponent().getName()});
                  }

                  initializer.initializeValue(component);
               }
            }
         });
      }
      else
      {
         final Component component = new Component(initializer.getComponent().getName() +
            "/" + initializer.getName());

         component.setMetadata(m_metadata);
         loadComponent(element, component);

         if (!m_bRuntimeExcluded && !type.isAssignableFrom(component.getType()))
         {
            throw new MetadataException("err.meta.propertyTypeMismatch",
               new Object[]{initializer.getName(), initializer.getComponent().getName()});
         }

         m_componentFixupList.add(new ContextFixup(m_helper)
         {
View Full Code Here

TOP

Related Classes of nexj.core.meta.MetadataException

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.