Class IdentifiableUrlAliasAlignHelper<I extends de.digitalcollections.model.identifiable.Identifiable>
java.lang.Object
de.digitalcollections.cudami.server.business.impl.service.identifiable.IdentifiableUrlAliasAlignHelper<I>
public class IdentifiableUrlAliasAlignHelper<I extends de.digitalcollections.model.identifiable.Identifiable>
extends Object
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface -
Method Summary
Modifier and TypeMethodDescriptionstatic <I extends de.digitalcollections.model.identifiable.Identifiable>
voidalignForUpdate(I actualIdentifiable, I identifiableInDatabase, CudamiConfig cudamiConfig, IdentifiableUrlAliasAlignHelper.SlugGeneratorService slugGeneratorService) Align all UrlAliases to fit in with the updating/updated identifiable.static <I extends de.digitalcollections.model.identifiable.Identifiable>
voidcheckDefaultAliases(I actualIdentifiable, CudamiConfig cudamiConfig, IdentifiableUrlAliasAlignHelper.SlugGeneratorService slugGeneratorService) Ensure that default aliases exist (new ones can be created).static <I extends de.digitalcollections.model.identifiable.Identifiable>
booleancheckIdentifiableExcluded(I actualIdentifiable, CudamiConfig cudamiConfig)
-
Method Details
-
alignForUpdate
public static <I extends de.digitalcollections.model.identifiable.Identifiable> void alignForUpdate(I actualIdentifiable, I identifiableInDatabase, CudamiConfig cudamiConfig, IdentifiableUrlAliasAlignHelper.SlugGeneratorService slugGeneratorService) throws ServiceException Align all UrlAliases to fit in with the updating/updated identifiable. It is also ensured that default aliases exist and missing ones are created.- Parameters:
actualIdentifiable- the object that is/was updatedidentifiableInDatabase- the existing object saved in storage prior to any updatecudamiConfig-slugGeneratorService- slug generator method- Throws:
ServiceException
-
checkDefaultAliases
public static <I extends de.digitalcollections.model.identifiable.Identifiable> void checkDefaultAliases(I actualIdentifiable, CudamiConfig cudamiConfig, IdentifiableUrlAliasAlignHelper.SlugGeneratorService slugGeneratorService) throws ServiceException Ensure that default aliases exist (new ones can be created). For an update of an existing identifiablealignForUpdate(Identifiable, Identifiable, CudamiConfig, SlugGeneratorService)should be used instead.- Parameters:
actualIdentifiable- the (new) identifiablecudamiConfig-slugGeneratorService- slug generator method- Throws:
ServiceException
-
checkIdentifiableExcluded
public static <I extends de.digitalcollections.model.identifiable.Identifiable> boolean checkIdentifiableExcluded(I actualIdentifiable, CudamiConfig cudamiConfig) throws ServiceException - Throws:
ServiceException
-