Class RemoteHelper
java.lang.Object
fr.becpg.repo.entity.remote.extractor.RemoteHelper
RemoteHelper class.
- Version:
- $Id: $Id
- Author:
- matthieu
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final DateTimeFormatterConstantISO_DAY_FORMATTERprivate static final PatternConstantISO_DAY_PATTERN -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringRenders ad:dateas the calendar day the repository displays.static org.alfresco.service.namespace.QNamegetPropName(org.alfresco.service.namespace.QName type, EntityDictionaryService dictionaryService) getPropName.static booleanisDayProperty(org.alfresco.service.namespace.QName propType, EntityDictionaryService dictionaryService) States whether a property denotes a calendar day rather than an instant.static booleanisJSONValue(org.alfresco.service.namespace.QName propType) isJSONValue.Reads back a calendar day, anchored at midnight in the time zone of this server.
-
Field Details
-
ISO_DAY_FORMATTER
ConstantISO_DAY_FORMATTER -
ISO_DAY_PATTERN
ConstantISO_DAY_PATTERN
-
-
Constructor Details
-
RemoteHelper
private RemoteHelper()Constructor for RemoteHelper.
-
-
Method Details
-
getPropName
public static org.alfresco.service.namespace.QName getPropName(org.alfresco.service.namespace.QName type, EntityDictionaryService dictionaryService) getPropName.
- Parameters:
type- aQNameobject.dictionaryService- aEntityDictionaryServiceobject.- Returns:
- a
QNameobject.
-
isJSONValue
public static boolean isJSONValue(org.alfresco.service.namespace.QName propType) isJSONValue.
- Parameters:
propType- aQNameobject.- Returns:
- a boolean.
-
isDayProperty
public static boolean isDayProperty(org.alfresco.service.namespace.QName propType, EntityDictionaryService dictionaryService) States whether a property denotes a calendar day rather than an instant.
- Parameters:
propType- aQNameobject.dictionaryService- aEntityDictionaryServiceobject.- Returns:
- a boolean.
-
formatDay
Renders ad:dateas the calendar day the repository displays.The repository holds a day as an instant and whoever writes it picks a time zone. Publishing that instant lets every reader re-interpret it in its own zone, which moves the day by one on a server ahead of UTC. A plain day carries no zone, so it cannot move.
-
parseDay
Reads back a calendar day, anchored at midnight in the time zone of this server.Anything else yields an empty result, so that the ISO instants written by earlier versions keep going through the standard Alfresco conversion.
-