Class ExternalTemplateCustomDataProvider
java.lang.Object
ch.tocco.nice2.optional.cms.impl.template.ExternalTemplateCustomDataProvider
- All Implemented Interfaces:
CustomDataProvider
@Component
public class ExternalTemplateCustomDataProvider
extends Object
implements CustomDataProvider
This custom providers provides understandable information about the origin of a template and whether
it is synchronized with the external source (if there is one) or not.
There are 4 possibilities:
- The template has not been imported from an external source (in this case "edited" is always false and doesn't
matter)
- The template has been imported from an external source, but the "edited" flag is not readable (this is the case
for system templates)
- The template has been imported and edited
- The template has been imported and not edited
-
Constructor Summary
ConstructorDescriptionExternalTemplateCustomDataProvider
(TypeManager typeManager, TextResources textResources, org.slf4j.Logger log) -
Method Summary
Modifier and TypeMethodDescriptionCollects the custom data for this field and returns it as aTypedValue
.
-
Constructor Details
-
ExternalTemplateCustomDataProvider
public ExternalTemplateCustomDataProvider(TypeManager typeManager, TextResources textResources, org.slf4j.Logger log)
-
-
Method Details
-
getData
public CustomDataValue<String> getData(@Nullable @Nullable Entity entity) throws CustomDataProviderException Description copied from interface:CustomDataProvider
Collects the custom data for this field and returns it as aTypedValue
.- Specified by:
getData
in interfaceCustomDataProvider
- Parameters:
entity
- The current entity, which gets loaded in the grid or form (is null in create scope).- Returns:
- a
TypedValue
containing the custom data for this field. - Throws:
CustomDataProviderException
- in case of error.
-