Class AnnotationRenderSettings

java.lang.Object
com.levigo.jadice.web.shared.model.settings.AbstractListenableRenderSettings
com.levigo.jadice.web.shared.model.settings.AnnotationRenderSettings
All Implemented Interfaces:
RenderSettings

public class AnnotationRenderSettings extends AbstractListenableRenderSettings
JWTs client-side AnnotationRenderSettings. They are also sent to the server as part of the RenderSpecification when requesting tiles.

The server reads the client-side settings and apply them to the server-side AnnotationRenderSettings implementation.

  • Field Details

  • Constructor Details

    • AnnotationRenderSettings

      public AnnotationRenderSettings()
      Default Constructor.
  • Method Details

    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • isAnnotationRenderingEnabled

      public boolean isAnnotationRenderingEnabled(AnnotationFactory annotationFactory)
      Returns whether annotation of given type should be rendered or not.
      Parameters:
      annotationFactory - the annotation type
      Returns:
      boolean
    • setAnnotationRenderingEnabled

      public void setAnnotationRenderingEnabled(AnnotationFactory annotationFactory, boolean enabled)
      Sets a flag whether annotations of given type should be rendered or not. If the rendering of all annotation types is enabled (isAnnotationRenderingEnabled(AnnotationFactory)), this flag decides whether annotations of given type are rendered or not. Otherwise if the general settings isAnnotationRenderingEnabled(AnnotationFactory) is not true, the enabled state of the specific annotation type does not matter.
      Parameters:
      annotationFactory - describing annotation type
      enabled - the enabled state of a specific annotation type
    • getDisabledAnnotationTypes

      public Collection<AnnotationFactory> getDisabledAnnotationTypes()
      Returns an immutable set of currently disabled (not visible) annotation types.
      Returns:
      currently disabled (not visible) annotation types
    • clear

      public void clear()
      remove all disabledTypes
    • setDefaults

      protected void setDefaults()
      Description copied from class: AbstractListenableRenderSettings
      Initializes additional settings.
      Specified by:
      setDefaults in class AbstractListenableRenderSettings
    • update

      public void update(String propertyName, RenderSettings other, Object... details)
      Description copied from interface: RenderSettings
      Updates this instance property specified by given property name with the value provided by the other processing setting. For each update-supported property the render settings type have to provide a unique property name.
      Parameters:
      propertyName - the name of the property to update. Update supported properties have unique property identifier provided by the specific render settings implementation.
      other - the processing setting which provide the new property value. Therefore, the other processing setting have to be of the same type as this instance.
      details - (optional) if some describing details are necessary to do a specific update, the details parameter will transport this information
    • createSnapshot

      public RenderSettings createSnapshot()
      Creates and returns a snapshot copy of this settings instance.
      Returns:
      snapshot copy
    • accept

      public boolean accept(Annotation annotation, Document document)
      Decides whether the given annotation is accepted for rendering on the client side. Restricted permissions or completely disabling some annotation types may prohibit client side rendering.
      Parameters:
      annotation - the Annotation
      document - the Document containing the Annotation
      Returns:
      true when the given Annotation is accepted for rendering
    • toString

      public String toString()
      Overrides:
      toString in class Object