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 Classes Modifier and Type Class Description static interfaceIdentifiableUrlAliasAlignHelper.SlugGeneratorService
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <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 Detail
-
alignForUpdate
public static <I extends de.digitalcollections.model.identifiable.Identifiable> void alignForUpdate(I actualIdentifiable, I identifiableInDatabase, CudamiConfig cudamiConfig, IdentifiableUrlAliasAlignHelper.SlugGeneratorService slugGeneratorService) throws CudamiServiceExceptionAlign 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:
CudamiServiceException
-
checkDefaultAliases
public static <I extends de.digitalcollections.model.identifiable.Identifiable> void checkDefaultAliases(I actualIdentifiable, CudamiConfig cudamiConfig, IdentifiableUrlAliasAlignHelper.SlugGeneratorService slugGeneratorService) throws CudamiServiceExceptionEnsure 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:
CudamiServiceException
-
checkIdentifiableExcluded
public static <I extends de.digitalcollections.model.identifiable.Identifiable> boolean checkIdentifiableExcluded(I actualIdentifiable, CudamiConfig cudamiConfig) throws CudamiServiceException- Throws:
CudamiServiceException
-
-