Пример #1
0
 public Object evaluate(List args) throws XPathFunctionException {
   if (args.size() != 1) {
     throw new CompilationException(
         __msgs.errInvalidNumberOfArguments(Constants.NON_STDRD_FUNCTION_YEAR_MONTH_DURATION));
   }
   return "";
 }
Пример #2
0
 public Object evaluate(List args) throws XPathFunctionException {
   if (args.size() < 1 || args.size() > 2) {
     throw new CompilationException(
         __msgs.errInvalidNumberOfArguments(Constants.NON_STDRD_FUNCTION_DELETE));
   }
   return "";
 }
Пример #3
0
 public Object evaluate(List args) throws XPathFunctionException {
   if (args.size() != 2) {
     throw new CompilationException(
         __msgs.errInvalidNumberOfArguments(Constants.NON_STDRD_FUNCTION_INSERT_AS_LAST_INTO));
   }
   return "";
 }
Пример #4
0
 public Object evaluate(List params) throws XPathFunctionException {
   if (params.size() < 3 || params.size() > 4) {
     throw new CompilationException(
         __msgs.errInvalidNumberOfArguments(Constants.NON_STDRD_FUNCTION_SPLIT_TO_ELEMENTS));
   }
   return "";
 }
Пример #5
0
 public Object evaluate(List args) throws XPathFunctionException {
   boolean separareParameteters;
   if (args.size() != 2 && (args.size() <= 2 || args.size() % 2 != 1)) {
     throw new CompilationException(
         __msgs.errInvalidNumberOfArguments(Constants.NON_STDRD_FUNCTION_COMPOSE_URL));
   }
   return "";
 }
Пример #6
0
  public XPathFunction resolveFunction(QName functionName, int arity) {
    if (functionName.getNamespaceURI() == null) {
      throw new WrappedResolverException("Undeclared namespace for " + functionName);
    } else if (functionName.getNamespaceURI().equals(_bpelNS)) {
      String localName = functionName.getLocalPart();
      if (Constants.EXT_FUNCTION_GETVARIABLEPROPERTY.equals(localName)) {
        return new GetVariableProperty();
      } else if (Constants.EXT_FUNCTION_DOXSLTRANSFORM.equals(localName)) {
        return new DoXslTransform();
      } else {
        throw new WrappedResolverException(__msgs.errUnknownBpelFunction(localName));
      }
    } else if (functionName.getNamespaceURI().equals(Namespaces.ODE_EXTENSION_NS)) {
      String localName = functionName.getLocalPart();
      if (Constants.NON_STDRD_FUNCTION_SPLIT_TO_ELEMENTS.equals(localName)
          || Constants.NON_STDRD_FUNCTION_DEPRECATED_SPLIT_TO_ELEMENTS.equals(localName)) {
        return new SplitToElements();
      } else if (Constants.NON_STDRD_FUNCTION_COMBINE_URL.equals(localName)
          || Constants.NON_STDRD_FUNCTION_DEPRECATED_COMBINE_URL.equals(localName)) {
        return new CombineUrl();
      } else if (Constants.NON_STDRD_FUNCTION_COMPOSE_URL.equals(localName)
          || Constants.NON_STDRD_FUNCTION_EXPAND_TEMPLATE.equals(localName)
          || Constants.NON_STDRD_FUNCTION_DEPRECATED_COMPOSE_URL.equals(localName)
          || Constants.NON_STDRD_FUNCTION_DEPRECATED_EXPAND_TEMPLATE.equals(localName)) {
        return new ComposeUrl();
      } else if (Constants.NON_STDRD_FUNCTION_DOM_TO_STRING.equals(localName)
          || Constants.NON_STDRD_FUNCTION_DEPRECATED_DOM_TO_STRING.equals(localName)) {
        return new DomToString();
      } else if (Constants.NON_STDRD_FUNCTION_INSERT_AFTER.equals(localName)) {
        return new InsertAfter();
      } else if (Constants.NON_STDRD_FUNCTION_INSERT_AS_FIRST_INTO.equals(localName)) {
        return new InsertAsFirstInto();
      } else if (Constants.NON_STDRD_FUNCTION_INSERT_AS_LAST_INTO.equals(localName)) {
        return new InsertAsLastInto();
      } else if (Constants.NON_STDRD_FUNCTION_INSERT_BEFORE.equals(localName)) {
        return new InsertBefore();
      } else if (Constants.NON_STDRD_FUNCTION_DELETE.equals(localName)) {
        return new Delete();
      } else if (Constants.NON_STDRD_FUNCTION_RENAME.equals(localName)) {
        return new Rename();
      } else if (Constants.NON_STDRD_FUNCTION_PROCESS_PROPERTY.equals(localName)) {
        return new ProcessProperty();
      }
    } else if (functionName.getNamespaceURI().equals(Namespaces.DEPRECATED_XDT_NS)) {
      String localName = functionName.getLocalPart();
      if (Constants.NON_STDRD_FUNCTION_DAY_TIME_DURATION.equals(localName)) {
        return new DayTimeDuration();
      } else if (Constants.NON_STDRD_FUNCTION_YEAR_MONTH_DURATION.equals(localName)) {
        return new YearMonthDuration();
      }
    }

    return null;
  }