public interface

AnnotationConfigurationRegistry

com.pspdfkit.annotations.configuration.AnnotationConfigurationRegistry

Class Overview

Interface for objects that manage a list of AnnotationConfiguration for supported annotation types.

Summary

Public Methods
abstract AnnotationConfiguration get(AnnotationType annotationType)
Retrieve configuration for given annotation type.
abstract <T extends AnnotationConfiguration> T get(AnnotationType annotationType, Class<T> requiredClass)
Retrieve configuration for given annotation type casted to required configuration type.
abstract <T extends AnnotationConfiguration> T get(AnnotationTool annotationTool, AnnotationToolVariant toolVariant, Class<T> requiredClass)
Retrieve configuration for given annotation tool and its variant casted to required configuration type.
abstract AnnotationConfiguration get(AnnotationTool annotationTool)
Retrieve configuration for given annotation tool.
abstract <T extends AnnotationConfiguration> T get(AnnotationTool annotationTool, Class<T> requiredClass)
Retrieve configuration for given annotation tool casted to required configuration type.
abstract AnnotationConfiguration get(AnnotationTool annotationTool, AnnotationToolVariant toolVariant)
Retrieve configuration for given annotation tool and its tool variant.
abstract boolean isAnnotationPropertySupported(AnnotationTool annotationTool, AnnotationToolVariant toolVariant, AnnotationProperty property)
Tests if annotation tool variant supports editing given property.
abstract boolean isAnnotationPropertySupported(AnnotationType annotationType, AnnotationProperty property)
Tests if annotation type supports editing given property.
abstract boolean isAnnotationPropertySupported(AnnotationTool annotationTool, AnnotationProperty property)
Tests if annotation tool supports editing given property.
abstract boolean isZIndexEditingSupported(AnnotationType annotationType)
Tests if annotation tool supports editing z-index on a given annotation type.
abstract void put(AnnotationTool annotationTool, AnnotationConfiguration configuration)
Registers configuration for given annotation tool.
abstract void put(AnnotationTool annotationTool, AnnotationToolVariant toolVariant, AnnotationConfiguration configuration)
Registers configuration for given annotation tool.
abstract void put(AnnotationType annotationType, AnnotationConfiguration configuration)
Registers annotation configuration for given annotation type.

Public Methods

public abstract AnnotationConfiguration get (AnnotationType annotationType)

Retrieve configuration for given annotation type.

Parameters
annotationType Type of annotation for which to retrieve configuration.
Returns
  • Annotation configuration or null if configuration does not exist.

public abstract T get (AnnotationType annotationType, Class<T> requiredClass)

Retrieve configuration for given annotation type casted to required configuration type.

Parameters
annotationType Type of annotation for which to retrieve configuration.
requiredClass Required class of configuration.
Returns
  • Annotation configuration casted to T or null if configuration does not exist or has other type than T.

public abstract T get (AnnotationTool annotationTool, AnnotationToolVariant toolVariant, Class<T> requiredClass)

Retrieve configuration for given annotation tool and its variant casted to required configuration type. If no configuration is set for the requested variant, configuration for the default variant is returned. Finally, if no configuration is set for the default variant, configuration for the underlying annotation type (toAnnotationType() is returned.

Parameters
annotationTool Annotation tool for which to retrieve configuration.
toolVariant Variant of the specified tool for which to retrieve the configuration.
requiredClass Required class of configuration.
Returns
  • Annotation configuration casted to T or null if configuration does not exist or has other type than T.

public abstract AnnotationConfiguration get (AnnotationTool annotationTool)

Retrieve configuration for given annotation tool. If no configuration is set for annotation tool, configuration for underlying annotation type (toAnnotationType() is returned. The default tool variant is used in this method.

Parameters
annotationTool Annotation tool for which to retrieve the configuration.
Returns
  • Annotation configuration or null if configuration does not exist.

public abstract T get (AnnotationTool annotationTool, Class<T> requiredClass)

Retrieve configuration for given annotation tool casted to required configuration type. If no configuration is set for annotation tool, configuration for underlying annotation type (toAnnotationType() is returned.

Parameters
annotationTool Annotation tool for which to retrieve configuration.
requiredClass Required class of configuration.
Returns
  • Annotation configuration casted to T or null if configuration does not exist or has other type than T.

public abstract AnnotationConfiguration get (AnnotationTool annotationTool, AnnotationToolVariant toolVariant)

Retrieve configuration for given annotation tool and its tool variant. If no configuration is set for the requested variant, configuration for the default variant is returned. Finally, if no configuration is set for the default variant, configuration for the underlying annotation type (toAnnotationType() is returned.

Parameters
annotationTool Annotation tool for which to retrieve configuration.
toolVariant Annotation tool variant for which to retrieve the configuration.
Returns
  • Annotation configuration or null if configuration does not exist.

public abstract boolean isAnnotationPropertySupported (AnnotationTool annotationTool, AnnotationToolVariant toolVariant, AnnotationProperty property)

Tests if annotation tool variant supports editing given property.

public abstract boolean isAnnotationPropertySupported (AnnotationType annotationType, AnnotationProperty property)

Tests if annotation type supports editing given property.

public abstract boolean isAnnotationPropertySupported (AnnotationTool annotationTool, AnnotationProperty property)

Tests if annotation tool supports editing given property.

public abstract boolean isZIndexEditingSupported (AnnotationType annotationType)

Tests if annotation tool supports editing z-index on a given annotation type.

public abstract void put (AnnotationTool annotationTool, AnnotationConfiguration configuration)

Registers configuration for given annotation tool. This replaces default configuration.

Parameters
annotationTool Annotation tool for which to register configuration.
configuration Configuration to register.

public abstract void put (AnnotationTool annotationTool, AnnotationToolVariant toolVariant, AnnotationConfiguration configuration)

Registers configuration for given annotation tool. This replaces default configuration.

Parameters
annotationTool Annotation tool for which to register configuration.
toolVariant Annotation tool variant for which to set the configuration.
configuration Configuration to register.

public abstract void put (AnnotationType annotationType, AnnotationConfiguration configuration)

Registers annotation configuration for given annotation type. This replaces default configuration.

Parameters
annotationType Type of annotation for which to register the configuration.
configuration Configuration to register.