Package com.atlassian.confluence.links
Class DefaultTitleContentMappingManager
java.lang.Object
com.atlassian.confluence.links.DefaultTitleContentMappingManager
- All Implemented Interfaces:
TitleContentMappingManager
Default implementation of the
TitleContentMappingManager interface.
This class acts as the service layer for managing TitleContentMapping objects
and delegates database operations to the TitleContentMappingDao.-
Constructor Summary
ConstructorsConstructorDescriptionDefaultTitleContentMappingManager(TitleContentMappingDao titleContentMappingDao) Constructor to initialize the manager with the required DAO. -
Method Summary
Modifier and TypeMethodDescriptionvoidcreate(TitleContentMapping titleContentMapping) Creates a newTitleContentMappingentity in the database.voiddeleteByTitle(String title, long contentId) Deletes aTitleContentMappingentity based on the given title.getContentIdByTitle(String title) Retrieves the content ID associated with a given title.Retrieves a list ofTitleContentMappingentities associated with the oldest content ID group.
-
Constructor Details
-
DefaultTitleContentMappingManager
Constructor to initialize the manager with the required DAO.- Parameters:
titleContentMappingDao- The DAO used for database operations.
-
-
Method Details
-
getTitlesForOldestContentIdGroup
Retrieves a list ofTitleContentMappingentities associated with the oldest content ID group. This method delegates the operation to the DAO layer.- Specified by:
getTitlesForOldestContentIdGroupin interfaceTitleContentMappingManager- Returns:
- A list of
TitleContentMappingobjects belonging to the oldest content ID group.
-
getContentIdByTitle
Retrieves the content ID associated with a given title. This method delegates the operation to the DAO layer.- Specified by:
getContentIdByTitlein interfaceTitleContentMappingManager- Parameters:
title- The title for which the content ID is being retrieved.- Returns:
- The content ID associated with the given title, or
nullif no mapping exists.
-
deleteByTitle
Deletes aTitleContentMappingentity based on the given title. This method delegates the operation to the DAO layer.- Specified by:
deleteByTitlein interfaceTitleContentMappingManager- Parameters:
title- The title of the mapping to delete.
-
create
Creates a newTitleContentMappingentity in the database. This method delegates the operation to the DAO layer.- Specified by:
createin interfaceTitleContentMappingManager- Parameters:
titleContentMapping- TheTitleContentMappingobject to persist.
-