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.list.paging.PageResponse<de.digitalcollections.model.identifiable.alias.LocalizedUrlAliases>find(de.digitalcollections.model.list.paging.PageRequest pageRequest)Generic request method for getting a parametrized list.de.digitalcollections.model.identifiable.alias.LocalizedUrlAliasesfindAllPrimaryLinks(String slug)Retrieve all primary links corresponding to a slug.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.de.digitalcollections.model.identifiable.alias.LocalizedUrlAliasesgetAllForTarget(UUID uuid)Retrieve all slugs of a link target.de.digitalcollections.model.identifiable.alias.UrlAliasgetByUuid(UUID uuid)Retrieve theUrlAliaswith the supplied UUID (PK).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.list.paging.PageResponse<de.digitalcollections.model.identifiable.alias.LocalizedUrlAliases> find(de.digitalcollections.model.list.paging.PageRequest pageRequest) throws UrlAliasRepositoryExceptionGeneric request method for getting a parametrized list.- Parameters:
pageRequest- request params for list- Returns:
- pagable result list
- Throws:
UrlAliasRepositoryException
-
getAllForTarget
de.digitalcollections.model.identifiable.alias.LocalizedUrlAliases getAllForTarget(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
-
getByUuid
de.digitalcollections.model.identifiable.alias.UrlAlias getByUuid(UUID uuid) throws UrlAliasRepositoryException
Retrieve theUrlAliaswith the supplied UUID (PK).- Parameters:
uuid- UUID of url alias- 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- Returns:
- true if slug of website has an url alias for given language
- 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
-
-