Interface UrlAliasRepository
-
public interface UrlAliasRepository
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description intdelete(List<UUID> urlAliasUuids)Remove the entries with the provided UUIDs (PK).de.digitalcollections.model.paging.SearchPageResponse<de.digitalcollections.model.identifiable.alias.LocalizedUrlAliases>find(de.digitalcollections.model.paging.SearchPageRequest searchPageRequest)Generic search method.de.digitalcollections.model.identifiable.alias.LocalizedUrlAliasesfindAllForTarget(UUID uuid)Retrieve all slugs of a link target.de.digitalcollections.model.identifiable.alias.LocalizedUrlAliasesfindAllPrimaryLinks(String slug)Retrieve all primary links corresponding to a slug.de.digitalcollections.model.identifiable.alias.UrlAliasfindOne(UUID uuid)Retrieve theUrlAliaswith the supplied UUID (PK).default de.digitalcollections.model.identifiable.alias.LocalizedUrlAliasesfindPrimaryLinksForWebsite(UUID websiteUuid, String slug)Retrieve the primary links corresponding to a slug and the target's language.de.digitalcollections.model.identifiable.alias.LocalizedUrlAliasesfindPrimaryLinksForWebsite(UUID websiteUuid, String slug, boolean considerLanguage)Retrieve the primary links corresponding to a slug.booleanhasUrlAlias(String slug, UUID websiteUuid, Locale targetLanguage)Check whether an entry exists for the passed website UUID, slug and language.de.digitalcollections.model.identifiable.alias.UrlAliassave(de.digitalcollections.model.identifiable.alias.UrlAlias urlAlias)Save anUrlAliasobject.de.digitalcollections.model.identifiable.alias.UrlAliasupdate(de.digitalcollections.model.identifiable.alias.UrlAlias urlAlias)Update an existing object.
-
-
-
Method Detail
-
delete
int delete(List<UUID> urlAliasUuids) throws UrlAliasRepositoryException
Remove the entries with the provided UUIDs (PK).- Parameters:
urlAliasUuids- List of aliases' UUIDs to remove- Returns:
- count of removed datasets
- Throws:
UrlAliasRepositoryException
-
find
de.digitalcollections.model.paging.SearchPageResponse<de.digitalcollections.model.identifiable.alias.LocalizedUrlAliases> find(de.digitalcollections.model.paging.SearchPageRequest searchPageRequest) throws UrlAliasRepositoryExceptionGeneric search method.- Throws:
UrlAliasRepositoryException
-
findAllForTarget
de.digitalcollections.model.identifiable.alias.LocalizedUrlAliases findAllForTarget(UUID uuid) throws UrlAliasRepositoryException
Retrieve all slugs of a link target.- Parameters:
uuid- the target's (Webpage, Collection,...) UUID- Returns:
LocalizedUrlAliasescontaining allUrlAliasobjects for that target- Throws:
UrlAliasRepositoryException
-
findAllPrimaryLinks
de.digitalcollections.model.identifiable.alias.LocalizedUrlAliases findAllPrimaryLinks(String slug) throws UrlAliasRepositoryException
Retrieve all primary links corresponding to a slug. The owning website is ignored.- Parameters:
slug- the slug to retrieve the primary aliases for- Returns:
- all
UrlAliases withisPrimary() == true - Throws:
UrlAliasRepositoryException
-
findPrimaryLinksForWebsite
default de.digitalcollections.model.identifiable.alias.LocalizedUrlAliases findPrimaryLinksForWebsite(UUID websiteUuid, String slug) throws UrlAliasRepositoryException
Retrieve the primary links corresponding to a slug and the target's language.- Parameters:
websiteUuid- the owning website's UUID, can benulland will be selected as isslug- the slug to retrieve the primary aliases for- Returns:
UrlAliases withisPrimary() == true- Throws:
UrlAliasRepositoryException
-
findPrimaryLinksForWebsite
de.digitalcollections.model.identifiable.alias.LocalizedUrlAliases findPrimaryLinksForWebsite(UUID websiteUuid, String slug, boolean considerLanguage) throws UrlAliasRepositoryException
Retrieve the primary links corresponding to a slug.- Parameters:
websiteUuid- the owning website's UUID, can benulland will be selected as isslug- the slug to retrieve the primary aliases forconsiderLanguage- if true consider the language(s) of the target when searching for the primary links- Returns:
UrlAliases withisPrimary() == true- Throws:
UrlAliasRepositoryException
-
findOne
de.digitalcollections.model.identifiable.alias.UrlAlias findOne(UUID uuid) throws UrlAliasRepositoryException
Retrieve theUrlAliaswith the supplied UUID (PK).- Returns:
- the found
UrlAliasornull - Throws:
UrlAliasRepositoryException
-
hasUrlAlias
boolean hasUrlAlias(String slug, UUID websiteUuid, Locale targetLanguage) throws UrlAliasRepositoryException
Check whether an entry exists for the passed website UUID, slug and language.- Parameters:
slug- not nullwebsiteUuid- can be nulltargetLanguage- can be null- Throws:
UrlAliasRepositoryException
-
save
de.digitalcollections.model.identifiable.alias.UrlAlias save(de.digitalcollections.model.identifiable.alias.UrlAlias urlAlias) throws UrlAliasRepositoryExceptionSave anUrlAliasobject.- Parameters:
urlAlias- the object to save- Returns:
- the newly created dataset or
null - Throws:
UrlAliasRepositoryException
-
update
de.digitalcollections.model.identifiable.alias.UrlAlias update(de.digitalcollections.model.identifiable.alias.UrlAlias urlAlias) throws UrlAliasRepositoryExceptionUpdate an existing object.- Parameters:
urlAlias- the existing object with changed properties- Returns:
- the updated dataset or
null - Throws:
UrlAliasRepositoryException
-
-