Package org.structr.core.converter

Examples of org.structr.core.converter.PropertyConverter.revert()


        if (converter != null) {

          Object convertedValue = null;

          // ignore conversion errors
          try { convertedValue = converter.revert(value); } catch (Throwable t) {}

          serializeRoot(writer, convertedValue, localPropertyView, depth);

        } else {
View Full Code Here


      try {
        PropertyConverter converter = key.inputConverter(securityContext);

        if (converter != null) {

          return serializeRoot(converter.revert(value), localPropertyView, depth);

        } else {

          return serializeRoot(value, localPropertyView, depth);
        }
View Full Code Here

      PropertyConverter converter = key.inputConverter(securityContext);
      if (converter != null) {
       
        try {
          Object convertedValue = converter.revert(source.getProperty(key));
          groupedProperties.put(key, convertedValue);
         
        } catch(FrameworkException fex) {
         
          logger.log(Level.WARNING, "Unable to convert grouped property {0} on type {1}: {2}", new Object[] {
View Full Code Here

      Object value = node.getProperty(propertyKey);
      if (converter != null) {

        try {
          value = converter.revert(value);

        } catch (FrameworkException ex) {
         
          getWebSocket().send(MessageBuilder.status().code(400).message(ex.getMessage()).build(), true);
View Full Code Here

      PropertyConverter converter = referenceKeyProperty.inputConverter(securityContext);

      if (value != null && converter != null && !(referenceKeyProperty instanceof RelationProperty)) {

        try {
          value = converter.revert(value);

        } catch (Throwable t) {

          logger.log(Level.WARNING, "Unable to convert property {0} of node {1}: {2}", new Object[]{referenceKeyProperty, _data, t.getMessage()});
        }
View Full Code Here

                PropertyConverter converter = propertyToFix.databaseConverter(securityContext, node);
                if (converter != null) {

                  try {
                    Object value = databaseNode.getProperty(propertyToFix.dbName());
                    converter.revert(value);

                  } catch (ClassCastException cce) {

                    // exception, needs fix
                    String databaseName   = propertyToFix.dbName();
View Full Code Here

      // apply property converters
      PropertyConverter converter = databaseConverter(securityContext, obj);
      if (converter != null) {

        try {
          value = converter.revert(value);

        } catch (Throwable t) {
         
          t.printStackTrace();
View Full Code Here

          PropertyConverter converter = propertyKey.databaseConverter(securityContext, entity);

          if (converter != null) {

            try {
              Object propertyValue = converter.revert(value);
              resultMap.put(propertyKey, propertyValue);

            } catch(ClassCastException cce) {

              cce.printStackTrace();
View Full Code Here

          PropertyConverter converter = propertyKey.databaseConverter(securityContext);

          if (converter != null) {

            try {
              Object propertyValue = converter.revert(value);
              resultMap.put(propertyKey, propertyValue);

            } catch(ClassCastException cce) {

              cce.printStackTrace();
View Full Code Here

      PropertyConverter converter = propertyKey.inputConverter(securityContext);

      if (converter != null) {

        try {
          Object propertyValue = converter.revert(entry.getValue());
          inputTypedProperties.put(propertyKey.jsonName(), propertyValue);

        } catch(ClassCastException cce) {

          cce.printStackTrace();
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.