--Thanks,Daniel
Hippo Community Group: The place for all discussions and announcements about Hippo CMS (and HST, repository etc. etc.)
Â
To post to this group, send email to hippo-community@googlegroups.com
RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-community+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/hippo-community.
For more options, visit https://groups.google.com/d/optout.
Thanks,Daniel
To post to this group, send email to hippo-c...@googlegroups.com
RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-communi...@googlegroups.com.
Thanks,Daniel
To post to this group, send email to hippo-c...@googlegroups.com
RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-communi...@googlegroups.com.
Hello Marijan,
Hello Marijan,Is there any way to configure the Date Format (Milliseconds since the EPOCH) for the default Content Rest API - the default date format seems to be yyyy-MM-dd'T'HH:mm:ssZZ -- is there any way to modify this?Â
Âhttps://www.onehippo.org/library/concepts/rest/restful-jax-rs-json-date-serialization-format.html this link seems to reference the custom JAX-RSÂThank you,Yaron
--
Hippo Community Group: The place for all discussions and announcements about Hippo CMS (and HST, repository etc. etc.)
Â
To post to this group, send email to hippo-community@googlegroups.com
RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-community+unsubscribe@googlegroups.com.
>> To post to this group, send email to hippo-community@googlegroups.com
>> RSS:
>> https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Hippo Community" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to hippo-community+unsubscribe@googlegroups.com.
>> Visit this group at https://groups.google.com/group/hippo-community.
>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> Hippo Community Group: The place for all discussions and announcements about
> Hippo CMS (and HST, repository etc. etc.)
>
> To post to this group, send email to hippo-community@googlegroups.com
> RSS:
> https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
> ---
> You received this message because you are subscribed to the Google Groups
> "Hippo Community" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to hippo-community+unsubscribe@googlegroups.com.
> Visit this group at https://groups.google.com/group/hippo-community.
> For more options, visit https://groups.google.com/d/optout.
--
Hippo Netherlands, Oosteinde 11, 1017 WT Amsterdam, Netherlands
Hippo USA, Inc. 71 Summer Street, 2nd Floor Boston, MA 02110, United
states of America.
US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com
--
Hippo Community Group: The place for all discussions and announcements about Hippo CMS (and HST, repository etc. etc.)
To post to this group, send email to hippo-community@googlegroups.com
RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-community+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/hippo-community.
For more options, visit https://groups.google.com/d/optout.
Hey Woonsan,
On Fri, Dec 15, 2017 at 6:24 PM, Woonsan Ko <woons...@bloomreach.com> wrote:
> I think
> org.hippoecm.hst.restapi.content.visitors.AbstractNodeVisitor#getValueRepresentation(Value)
> should have handled date property in a better way.
> At the moment, the method simply converts JCR date property value to string
> and pushes the value to the response object.
> If it pushes a Calendar object instead (which should be an obvious choice
> since JCR returns Calendar object anyway), the ObjectMapper of Jackson2
> could have serialized it to epoch number by default, with an option to
> change it by spring bean configuration to something like ISO8601 string.
> Anyway, as it's hard-coded to convert Calendar to string by default, it's
> almost impossible or too hard to change it at the moment.
> I would rather fix the logic of
> AbstractNodeVisitor#getValueRepresentation(Value) to put Calendar object,
> and let Jackson2 handle it in serialization.
I agree!
How shall we proceed with this? Just changing it might result in
undesired BC behavior for existing customers. Should we introduce an
option to switch to your described behavior? Or change it but
introduce a new API version (from the top of my head I don't know how
versioning of the api is currently done)
Regards Ard
>> >> To post to this group, send email to hippo-community@googlegroups.com
>> >> RSS:
>> >>
>> >> https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
>> >> ---
>> >> You received this message because you are subscribed to the Google
>> >> Groups
>> >> "Hippo Community" group.
>> >> To unsubscribe from this group and stop receiving emails from it, send
>> >> an
>> >> email to hippo-community+unsubscribe@googlegroups.com.
>> >> Visit this group at https://groups.google.com/group/hippo-community.
>> >> For more options, visit https://groups.google.com/d/optout.
>> >
>> >
>> > --
>> > Hippo Community Group: The place for all discussions and announcements
>> > about
>> > Hippo CMS (and HST, repository etc. etc.)
>> >
>> > To post to this group, send email to hippo-community@googlegroups.com
>> > RSS:
>> >
>> > https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
>> > ---
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "Hippo Community" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> > an
>> > email to hippo-community+unsubscribe@googlegroups.com.
>> > Visit this group at https://groups.google.com/group/hippo-community.
>> > For more options, visit https://groups.google.com/d/optout.
>>
>>
>>
>> --
>> Hippo Netherlands, Oosteinde 11, 1017 WT Amsterdam, Netherlands
>> Hippo USA, Inc. 71 Summer Street, 2nd Floor Boston, MA 02110, United
>> states of America.
>>
>> US +1 877 414 4776 (toll free)
>> Europe +31(0)20 522 4466
>> www.onehippo.com
>>
>> --
>> Hippo Community Group: The place for all discussions and announcements
>> about Hippo CMS (and HST, repository etc. etc.)
>>
>> To post to this group, send email to hippo-community@googlegroups.com
>> RSS:
>> https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Hippo Community" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to hippo-community+unsubscribe@googlegroups.com.
>> Visit this group at https://groups.google.com/group/hippo-community.
>> For more options, visit https://groups.google.com/d/optout.
>
>
>
>
> --
> Woonsan Ko
> woons...@bloomreach.com
> US +1 877 414 4776 (toll free)
> Europe +31(0)20 522 4466
>
>
> --
> Hippo Community Group: The place for all discussions and announcements about
> Hippo CMS (and HST, repository etc. etc.)
>
> To post to this group, send email to hippo-community@googlegroups.com
> RSS:
> https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
> ---
> You received this message because you are subscribed to the Google Groups
> "Hippo Community" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to hippo-community+unsubscribe@googlegroups.com.
> Visit this group at https://groups.google.com/group/hippo-community.
> For more options, visit https://groups.google.com/d/optout.
--
Hippo Netherlands, Oosteinde 11, 1017 WT Amsterdam, Netherlands
Hippo USA, Inc. 71 Summer Street, 2nd Floor Boston, MA 02110, United
states of America.
US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com
--
Hippo Community Group: The place for all discussions and announcements about Hippo CMS (and HST, repository etc. etc.)
To post to this group, send email to hippo-community@googlegroups.com
RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-community+unsubscribe@googlegroups.com.
To post to this group, send email to hippo-c...@googlegroups.com
RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-communi...@googlegroups.com.
AbstractNodeVisitor.getValueRepresentation() could beÂ
 default:
        // Date is rendered by JackRabbit including timezone, no need for special handling
         return jcrValue.getDate();
default:
         // Date is rendered by JackRabbit including timezone, no need for special handling
         return jcrValue.getString();
HippoPublicationWorkflowDocumentVisitor
 response.put("pubwfCreationDate", node.getProperty(HIPPOSTDPUBWF_CREATION_DATE).getDate().getTimeInMillis());
    response.put("pubwfLastModificationDate", node.getProperty(HIPPOSTDPUBWF_LAST_MODIFIED_DATE).getDate().getTimeInMillis());
    if (node.hasProperty(HIPPOSTDPUBWF_PUBLICATION_DATE)) {
      response.put("pubwfPublicationDate", node.getProperty(HIPPOSTDPUBWF_PUBLICATION_DATE).getDate().getTimeInMillis());
     }
protected Object getValueRepresentation(final Value jcrValue) throws RepositoryException {
    switch (jcrValue.getType()) {
      case BINARY:
        return "Retrieving the content of binary property values is not yet supported in the Content REST API. Use images and assets instead.";
      case LONG:
        return jcrValue.getLong();
      case DOUBLE:
        return jcrValue.getDouble();
      case BOOLEAN:
        return jcrValue.getBoolean();
      case DECIMAL:
        return jcrValue.getDecimal();
      case DATE:
       return jcrValue.getDate().getTimeInMillis();
      default:
        // Date is rendered by JackRabbit including timezone, no need for special handling
        return jcrValue.getString();
    }
...And finally...
protected void visitProperties(final ResourceContext context, final Node node, final Map<String, Object> response)
      throws RepositoryException {
    for (Property property : new PropertyIterable(node.getProperties())) {
      final ContentType parentContentType = context.getContentTypes().getContentTypeForNode(property.getParent());
      final ContentTypeProperty propertyType = parentContentType.getProperties().get(property.getName());
      if (propertyType != null                 // explicit and non-residual property type
          && !propertyType.isDerivedItem()         // defined in a (inherited) document type
          && !skipProperty(context, propertyType, property)
          || property.getType() ==5 // not marked to be skipped
      ) {
        visitProperty(context, propertyType, property, response);