Class ItemServiceInternalImpl
- java.lang.Object
-
- org.craftercms.studio.impl.v2.service.item.internal.ItemServiceInternalImpl
-
- All Implemented Interfaces:
ItemServiceInternal
public class ItemServiceInternalImpl extends Object implements ItemServiceInternal
-
-
Field Summary
Fields Modifier and Type Field Description static String
CONTENT_TYPE
static String
DISABLED
static String
INTERNAL_NAME
static String
LOCALE_CODE
-
Constructor Summary
Constructors Constructor Description ItemServiceInternalImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearPreviousPath(String siteId, String path)
Clear previous path of the contentPublishingDashboardItem
convertHistoryItemToDashboardItem(PublishingHistoryItem historyItem)
Convert Publishing History Item to Publishing Dashboard ItemContentDashboardItem
convertItemToContentDashboardItem(String siteId, Item item)
Convert Item to Content Dashboard Itemint
countAllContentItems()
Count all content itemsvoid
deleteItem(long itemId)
Delete itemvoid
deleteItem(String siteId, String path)
Delete itemvoid
deleteItemForFolder(long siteId, String folderPath)
Delete items for site and pathsvoid
deleteItemsById(List<Long> itemIds)
Delete items by idsvoid
deleteItemsForSite(long siteId)
Delete all items for sitevoid
deleteItemsForSiteAndPaths(long siteId, List<String> paths)
Delete items for site and pathsprotected String
getBrowserUri(String uri, String replacePattern, boolean isPage)
String
getBrowserUrl(String site, String path)
Get browser url for given repository itemList<String>
getChangeSetForSubtree(String siteId, String path)
Get change set for subtreeList<ContentDashboardItem>
getContentDashboard(String siteId, String path, String modifier, String contentType, long state, ZonedDateTime dateFrom, ZonedDateTime dateTo, String sortBy, String order, int offset, int limit)
Get result set for content dashboardint
getContentDashboardTotal(String siteId, String path, String modifier, String contentType, long state, ZonedDateTime dateFrom, ZonedDateTime dateTo)
Get total number of records for content dashboardContentService
getContentService()
ContentServiceInternal
getContentServiceInternal()
List<String>
getExistingRenamedChildrenOfMandatoryParentsForPublishing(String siteId, List<String> parents)
Get existing renamed children of mandatory parents for publishingGeneralLockService
getGeneralLockService()
List<Item>
getInProgressItems(String siteId)
Get in progress items for given siteDetailedItem
getItem(String siteId, long id)
Get item by given idItem
getItem(String siteId, String path)
Get item fir given site and pathItem
getItem(String siteId, String path, boolean preferContent)
Get item fir given site and pathItemDAO
getItemDao()
List<Item>
getItems(String siteId, List<String> paths)
Get items for given site and pathsList<Item>
getItems(String siteId, List<String> paths, boolean preferContent)
Get items for given site and pathsList<Item>
getItemStates(String siteId, String path, Long states, int offset, int limit)
Get item states for given filters by path regex and states maskint
getItemStatesTotal(String siteId, String path, Long states)
Get total number of item states records for given filters by path regex and states maskList<String>
getMandatoryParentsForPublishing(String siteId, List<String> paths)
Get mandatory parents for publishing for given site and list of pathsRetryingDatabaseOperationFacade
getRetryingDatabaseOperationFacade()
List<String>
getSameCommitItems(String siteId, String path)
Get items edited on same commit id for given itemServicesConfig
getServicesConfig()
SiteFeedMapper
getSiteFeedMapper()
List<Item>
getSubmittedItems(String siteId)
Get submitted items for given siteList<String>
getSubtreeForDelete(String siteId, String path)
Get subtree for deleteUserServiceInternal
getUserServiceInternal()
Item
instantiateItem(long siteId, String siteName, String path, String previewUrl, long state, Long ownedBy, String owner, Long createdBy, String creator, ZonedDateTime createdOn, Long lastModifiedBy, String modifier, ZonedDateTime lastModifiedOn, String label, String contentTypeId, String systemType, String mimeType, String localeCode, Long translationSourceId, long size, Long parentId, String commitId)
Instantiate item by getting it from DB and setting properties to valuesItem.Builder
instantiateItem(String siteName, String path)
Item
instantiateItemAfterWrite(String siteId, String path, String username, ZonedDateTime lastModifiedOn, String label, String contentTypeId, String locale, String commitId, long size, Optional<Boolean> unlock)
Instantiate item after write or updateboolean
isNew(String siteId, String path)
Check if item is newboolean
isSystemProcessing(String siteId, String path)
Check if item is in system processingboolean
isUpdatedOrNew(String siteId, String path)
Check if item is update or newvoid
lockItemById(long itemId, String username)
Lock item for given lock ownervoid
lockItemByPath(String siteId, String path, String username)
Lock item for given lock ownervoid
lockItemsById(List<Long> itemIds, String username)
Lock items for given lock ownervoid
lockItemsByPath(String siteId, List<String> paths, String username)
Lock items for given lock ownervoid
moveItem(String siteId, String oldPath, String newPath)
Move itemvoid
moveItems(String siteId, String oldPath, String newPath, Long parentId)
Move itemsvoid
persistItemAfterCreate(String siteId, String path, String username, String commitId, Optional<Boolean> unlock, Long parentId)
Persist item metadata after createvoid
persistItemAfterCreateFolder(String siteId, String folderPath, String folderName, String username, String commitId, Long parentId)
Persist item metadata after create foldervoid
persistItemAfterRenameFolder(String siteId, String folderPath, String folderName, String username, String commitId)
Persist item metadata after rename foldervoid
persistItemAfterWrite(String siteId, String path, String username, String commitId, Optional<Boolean> unlock)
Persist item metadata after writeboolean
previousPathExists(String siteId, String path)
Check if path exists as previous pathvoid
resetStateBits(long itemId, long statesBitMask)
Update states bitmap for item by setting bits to 0void
resetStateBits(String siteId, String path, long statesBitMask)
Update states bitmap for item by setting bits to 0void
resetStateBitsBulk(String siteId, List<String> paths, long statesBitMask)
Update states bitmap for list of items by setting bits to 0void
setContentService(ContentService contentService)
void
setContentServiceInternal(ContentServiceInternal contentServiceInternal)
void
setGeneralLockService(GeneralLockService generalLockService)
void
setItemDao(ItemDAO itemDao)
void
setRetryingDatabaseOperationFacade(RetryingDatabaseOperationFacade retryingDatabaseOperationFacade)
void
setServicesConfig(ServicesConfig servicesConfig)
void
setSiteFeedMapper(SiteFeedMapper siteFeedMapper)
void
setStateBits(long itemId, long statesBitMask)
Update states bitmap for item by setting bits to 1void
setStateBits(String siteId, String path, long statesBitMask)
Update states bitmap for item by setting bits to 1void
setStateBitsBulk(String siteId, List<String> paths, long statesBitMask)
Update states bitmap for list of items by setting bits to 1void
setSystemProcessing(String siteId, String path, boolean isSystemProcessing)
Set system processing for itemvoid
setSystemProcessingBulk(String siteId, List<String> paths, boolean isSystemProcessing)
Set system processing for itemsvoid
setUserServiceInternal(UserServiceInternal userServiceInternal)
void
unlockItemById(long itemId)
Unlock itemvoid
unlockItemByPath(String siteId, String path)
Unlock itemvoid
updateCommitId(String siteId, String path, String commitId)
Update commit id for itemvoid
updateItem(Item item)
Update itemvoid
updateItemStates(String siteId, List<String> paths, boolean clearSystemProcessing, boolean clearUserLocked, Boolean live, Boolean staged)
Update item state flags for given itemsvoid
updateItemStatesByQuery(String siteId, String path, Long states, boolean clearSystemProcessing, boolean clearUserLocked, Boolean live, Boolean staged)
Update item state flags for given path queryvoid
updateLastPublishedOn(String siteId, String path, ZonedDateTime lastPublishedOn)
Update last published date for itemvoid
updateLastPublishedOnBulk(String siteId, List<String> paths, ZonedDateTime lastPublishedOn)
Update last published date for itemvoid
updateStateBits(long itemId, long onStateBitMap, long offStateBitMap)
Update states to flip on list off states and flip off another list of states for itemvoid
updateStateBits(String siteId, String path, long onStateBitMap, long offStateBitMap)
Update states to flip on list off states and flip off another list of states for itemvoid
updateStateBitsBulk(String siteId, List<String> paths, long onStateBitMap, long offStateBitMap)
Update states to flip on list off states and flip off another list of states for itemsvoid
updateStateBitsBulk(List<Long> itemIds, long onStateBitMap, long offStateBitMap)
Update states to flip on list off states and flip off another list of states for itemsvoid
updateStatesForSite(String siteId, long onStateBitMap, long offStateBitMap)
Update states for all content in the given sitevoid
upsertEntries(String siteId, List<Item> items)
Insert records for list of item if they do not exist, otherwise update themboolean
upsertEntry(Item item)
Insert record for item if it does not exist, otherwise update it
-
-
-
Field Detail
-
INTERNAL_NAME
public static final String INTERNAL_NAME
- See Also:
- Constant Field Values
-
CONTENT_TYPE
public static final String CONTENT_TYPE
- See Also:
- Constant Field Values
-
DISABLED
public static final String DISABLED
- See Also:
- Constant Field Values
-
LOCALE_CODE
public static final String LOCALE_CODE
- See Also:
- Constant Field Values
-
-
Method Detail
-
upsertEntry
public boolean upsertEntry(Item item)
Description copied from interface:ItemServiceInternal
Insert record for item if it does not exist, otherwise update it- Specified by:
upsertEntry
in interfaceItemServiceInternal
- Parameters:
item
- item to add or update
-
upsertEntries
public void upsertEntries(String siteId, List<Item> items)
Description copied from interface:ItemServiceInternal
Insert records for list of item if they do not exist, otherwise update them- Specified by:
upsertEntries
in interfaceItemServiceInternal
- Parameters:
siteId
- site identifieritems
- list of items to add or update
-
getItem
public DetailedItem getItem(String siteId, long id)
Description copied from interface:ItemServiceInternal
Get item by given id- Specified by:
getItem
in interfaceItemServiceInternal
- Parameters:
siteId
- site identifierid
- item id- Returns:
- item
-
getItem
public Item getItem(String siteId, String path)
Description copied from interface:ItemServiceInternal
Get item fir given site and path- Specified by:
getItem
in interfaceItemServiceInternal
- Parameters:
siteId
- site identifierpath
- item path- Returns:
- item
-
getItem
public Item getItem(String siteId, String path, boolean preferContent)
Description copied from interface:ItemServiceInternal
Get item fir given site and path- Specified by:
getItem
in interfaceItemServiceInternal
- Parameters:
siteId
- site identifierpath
- item pathpreferContent
- if true return content item if available- Returns:
- item
-
getItems
public List<Item> getItems(String siteId, List<String> paths)
Description copied from interface:ItemServiceInternal
Get items for given site and paths- Specified by:
getItems
in interfaceItemServiceInternal
- Parameters:
siteId
- site identifierpaths
- item paths- Returns:
- list of items
-
getItems
public List<Item> getItems(String siteId, List<String> paths, boolean preferContent)
Description copied from interface:ItemServiceInternal
Get items for given site and paths- Specified by:
getItems
in interfaceItemServiceInternal
- Parameters:
siteId
- site identifierpaths
- item pathspreferContent
- if true return content item if available- Returns:
- list of items
-
deleteItem
public void deleteItem(long itemId)
Description copied from interface:ItemServiceInternal
Delete item- Specified by:
deleteItem
in interfaceItemServiceInternal
- Parameters:
itemId
- item id
-
deleteItem
public void deleteItem(String siteId, String path)
Description copied from interface:ItemServiceInternal
Delete item- Specified by:
deleteItem
in interfaceItemServiceInternal
- Parameters:
siteId
- siteIdentifierpath
- path of item to be deleted
-
updateItem
public void updateItem(Item item)
Description copied from interface:ItemServiceInternal
Update item- Specified by:
updateItem
in interfaceItemServiceInternal
- Parameters:
item
- item to update
-
setSystemProcessing
public void setSystemProcessing(String siteId, String path, boolean isSystemProcessing)
Description copied from interface:ItemServiceInternal
Set system processing for item- Specified by:
setSystemProcessing
in interfaceItemServiceInternal
- Parameters:
siteId
- site identifierpath
- path of the itemisSystemProcessing
- true if item is being processed by system, otherwise false
-
setSystemProcessingBulk
public void setSystemProcessingBulk(String siteId, List<String> paths, boolean isSystemProcessing)
Description copied from interface:ItemServiceInternal
Set system processing for items- Specified by:
setSystemProcessingBulk
in interfaceItemServiceInternal
- Parameters:
siteId
- site identifierpaths
- paths of itemsisSystemProcessing
- true if item is being processed by system, otherwise false
-
setStateBits
public void setStateBits(String siteId, String path, long statesBitMask)
Description copied from interface:ItemServiceInternal
Update states bitmap for item by setting bits to 1- Specified by:
setStateBits
in interfaceItemServiceInternal
- Parameters:
siteId
- site identifierpath
- path of itemstatesBitMask
- bit mask for states to be updated
-
setStateBitsBulk
public void setStateBitsBulk(String siteId, List<String> paths, long statesBitMask)
Description copied from interface:ItemServiceInternal
Update states bitmap for list of items by setting bits to 1- Specified by:
setStateBitsBulk
in interfaceItemServiceInternal
- Parameters:
siteId
- site identifierpaths
- paths of itemsstatesBitMask
- bit mask for states to be updated
-
resetStateBits
public void resetStateBits(String siteId, String path, long statesBitMask)
Description copied from interface:ItemServiceInternal
Update states bitmap for item by setting bits to 0- Specified by:
resetStateBits
in interfaceItemServiceInternal
- Parameters:
siteId
- site identifierpath
- path of itemstatesBitMask
- bit mask for states to be updated
-
resetStateBitsBulk
public void resetStateBitsBulk(String siteId, List<String> paths, long statesBitMask)
Description copied from interface:ItemServiceInternal
Update states bitmap for list of items by setting bits to 0- Specified by:
resetStateBitsBulk
in interfaceItemServiceInternal
- Parameters:
siteId
- site identifierpaths
- paths of itemsstatesBitMask
- bit mask for states to be updated
-
setStateBits
public void setStateBits(long itemId, long statesBitMask)
Description copied from interface:ItemServiceInternal
Update states bitmap for item by setting bits to 1- Specified by:
setStateBits
in interfaceItemServiceInternal
- Parameters:
itemId
- item identifierstatesBitMask
- bit mask for states to be updated
-
resetStateBits
public void resetStateBits(long itemId, long statesBitMask)
Description copied from interface:ItemServiceInternal
Update states bitmap for item by setting bits to 0- Specified by:
resetStateBits
in interfaceItemServiceInternal
- Parameters:
itemId
- item identifierstatesBitMask
- bit mask for states to be updated
-
updateStateBits
public void updateStateBits(String siteId, String path, long onStateBitMap, long offStateBitMap)
Description copied from interface:ItemServiceInternal
Update states to flip on list off states and flip off another list of states for item- Specified by:
updateStateBits
in interfaceItemServiceInternal
- Parameters:
siteId
- site identifierpath
- path of itemonStateBitMap
- states bitmap to flip onoffStateBitMap
- stats bitmap to flip off
-
updateStateBits
public void updateStateBits(long itemId, long onStateBitMap, long offStateBitMap)
Description copied from interface:ItemServiceInternal
Update states to flip on list off states and flip off another list of states for item- Specified by:
updateStateBits
in interfaceItemServiceInternal
- Parameters:
itemId
- item identifieronStateBitMap
- states bitmap to flip onoffStateBitMap
- stats bitmap to flip off
-
updateStateBitsBulk
public void updateStateBitsBulk(String siteId, List<String> paths, long onStateBitMap, long offStateBitMap)
Description copied from interface:ItemServiceInternal
Update states to flip on list off states and flip off another list of states for items- Specified by:
updateStateBitsBulk
in interfaceItemServiceInternal
- Parameters:
siteId
- site identifierpaths
- list of paths of itemsonStateBitMap
- states bitmap to flip onoffStateBitMap
- stats bitmap to flip off
-
updateStateBitsBulk
public void updateStateBitsBulk(List<Long> itemIds, long onStateBitMap, long offStateBitMap)
Description copied from interface:ItemServiceInternal
Update states to flip on list off states and flip off another list of states for items- Specified by:
updateStateBitsBulk
in interfaceItemServiceInternal
- Parameters:
itemIds
- list of item idsonStateBitMap
- states bitmap to flip onoffStateBitMap
- stats bitmap to flip off
-
instantiateItem
public Item.Builder instantiateItem(String siteName, String path)
- Specified by:
instantiateItem
in interfaceItemServiceInternal
-
instantiateItem
public Item instantiateItem(long siteId, String siteName, String path, String previewUrl, long state, Long ownedBy, String owner, Long createdBy, String creator, ZonedDateTime createdOn, Long lastModifiedBy, String modifier, ZonedDateTime lastModifiedOn, String label, String contentTypeId, String systemType, String mimeType, String localeCode, Long translationSourceId, long size, Long parentId, String commitId)
Description copied from interface:ItemServiceInternal
Instantiate item by getting it from DB and setting properties to values- Specified by:
instantiateItem
in interfaceItemServiceInternal
- Parameters:
siteId
- site identifiersiteName
- site namepath
- path of the itempreviewUrl
- preview URLstate
- state of the item (bitmap)ownedBy
- owner idowner
- owner usernamecreatedBy
- creator idcreator
- creator usernamecreatedOn
- created datelastModifiedBy
- modifier idmodifier
- modifier usernamelastModifiedOn
- modified datelabel
- label for the itemcontentTypeId
- content type idsystemType
- system typemimeType
- mime typelocaleCode
- locale codetranslationSourceId
- translation source item idsize
- size of the fileparentId
- parent idcommitId
- commit id- Returns:
- Item object
-
instantiateItemAfterWrite
public Item instantiateItemAfterWrite(String siteId, String path, String username, ZonedDateTime lastModifiedOn, String label, String contentTypeId, String locale, String commitId, long size, Optional<Boolean> unlock) throws ServiceLayerException, UserNotFoundException
Description copied from interface:ItemServiceInternal
Instantiate item after write or update- Specified by:
instantiateItemAfterWrite
in interfaceItemServiceInternal
- Parameters:
siteId
- site identifierpath
- path of the itemusername
- username of modifierlastModifiedOn
- modified datelabel
- label for the itemcontentTypeId
- content type idlocale
- locale codecommitId
- commit id obtained with write operationsize
- file size in bytesunlock
- Optional unlocking of item, if true unlock, otherwise lock. If not present item will be unlocked- Returns:
- item object
- Throws:
ServiceLayerException
- General service errorUserNotFoundException
- If given username does not exist
-
deleteItemsForSite
public void deleteItemsForSite(long siteId)
Description copied from interface:ItemServiceInternal
Delete all items for site- Specified by:
deleteItemsForSite
in interfaceItemServiceInternal
- Parameters:
siteId
- site id
-
deleteItemsById
public void deleteItemsById(List<Long> itemIds)
Description copied from interface:ItemServiceInternal
Delete items by ids- Specified by:
deleteItemsById
in interfaceItemServiceInternal
- Parameters:
itemIds
- ids of items to delete
-
deleteItemsForSiteAndPaths
public void deleteItemsForSiteAndPaths(long siteId, List<String> paths)
Description copied from interface:ItemServiceInternal
Delete items for site and paths- Specified by:
deleteItemsForSiteAndPaths
in interfaceItemServiceInternal
- Parameters:
siteId
- site idpaths
- list of item paths to delete
-
getContentDashboardTotal
public int getContentDashboardTotal(String siteId, String path, String modifier, String contentType, long state, ZonedDateTime dateFrom, ZonedDateTime dateTo)
Description copied from interface:ItemServiceInternal
Get total number of records for content dashboard- Specified by:
getContentDashboardTotal
in interfaceItemServiceInternal
- Parameters:
siteId
- site identifierpath
- path regular expression to apply as filter for result setmodifier
- filter results by usercontentType
- filter results by content typestate
- filter results by statedateFrom
- lower boundary for modified datedateTo
- upper boundary for modified date- Returns:
- total number of records in result set
-
getContentDashboard
public List<ContentDashboardItem> getContentDashboard(String siteId, String path, String modifier, String contentType, long state, ZonedDateTime dateFrom, ZonedDateTime dateTo, String sortBy, String order, int offset, int limit)
Description copied from interface:ItemServiceInternal
Get result set for content dashboard- Specified by:
getContentDashboard
in interfaceItemServiceInternal
- Parameters:
siteId
- site identifierpath
- path regular expression to apply as filter for result setmodifier
- filter results by usercontentType
- filter results by content typestate
- filter results by statedateFrom
- lower boundary for modified datedateTo
- upper boundary for modified datesortBy
- sort results by columnorder
- order of resultsoffset
- offset of the first record in result setlimit
- number of records to return- Returns:
- list of item metadata records
-
getBrowserUrl
public String getBrowserUrl(String site, String path)
Description copied from interface:ItemServiceInternal
Get browser url for given repository item- Specified by:
getBrowserUrl
in interfaceItemServiceInternal
- Parameters:
site
- site identifierpath
- path of the content- Returns:
- browser url
-
persistItemAfterCreate
public void persistItemAfterCreate(String siteId, String path, String username, String commitId, Optional<Boolean> unlock, Long parentId) throws ServiceLayerException, UserNotFoundException
Description copied from interface:ItemServiceInternal
Persist item metadata after create- Specified by:
persistItemAfterCreate
in interfaceItemServiceInternal
- Parameters:
siteId
- site identifierpath
- path of the contentusername
- user that executed write operationcommitId
- commit id of the write operationunlock
- true if content needs to be unlocked after write (save & close), otherwise falseparentId
- id of parent item- Throws:
ServiceLayerException
UserNotFoundException
-
persistItemAfterWrite
public void persistItemAfterWrite(String siteId, String path, String username, String commitId, Optional<Boolean> unlock) throws ServiceLayerException, UserNotFoundException
Description copied from interface:ItemServiceInternal
Persist item metadata after write- Specified by:
persistItemAfterWrite
in interfaceItemServiceInternal
- Parameters:
siteId
- site identifierpath
- path of the contentusername
- user that executed write operationcommitId
- commit id of the write operationunlock
- true if content needs to be unlocked after write (save & close), otherwise false- Throws:
ServiceLayerException
UserNotFoundException
-
persistItemAfterCreateFolder
public void persistItemAfterCreateFolder(String siteId, String folderPath, String folderName, String username, String commitId, Long parentId) throws ServiceLayerException, UserNotFoundException
Description copied from interface:ItemServiceInternal
Persist item metadata after create folder- Specified by:
persistItemAfterCreateFolder
in interfaceItemServiceInternal
- Parameters:
siteId
- site identifierfolderPath
- folder pathfolderName
- folder nameusername
- user that executed create folder operationcommitId
- commit id of the create folder operationparentId
- id of parent item- Throws:
ServiceLayerException
UserNotFoundException
-
persistItemAfterRenameFolder
public void persistItemAfterRenameFolder(String siteId, String folderPath, String folderName, String username, String commitId) throws ServiceLayerException, UserNotFoundException
Description copied from interface:ItemServiceInternal
Persist item metadata after rename folder- Specified by:
persistItemAfterRenameFolder
in interfaceItemServiceInternal
- Parameters:
siteId
- site identifierfolderPath
- folder pathfolderName
- folder nameusername
- user that executed create folder operationcommitId
- commit id of the create folder operation- Throws:
ServiceLayerException
UserNotFoundException
-
moveItem
public void moveItem(String siteId, String oldPath, String newPath)
Description copied from interface:ItemServiceInternal
Move item- Specified by:
moveItem
in interfaceItemServiceInternal
- Parameters:
siteId
- site identifieroldPath
- old pathnewPath
- new path
-
moveItems
public void moveItems(String siteId, String oldPath, String newPath, Long parentId)
Description copied from interface:ItemServiceInternal
Move items- Specified by:
moveItems
in interfaceItemServiceInternal
- Parameters:
siteId
- site identifieroldPath
- old pathnewPath
- new pathparentId
- new parent id, if null it will not be updated
-
isNew
public boolean isNew(String siteId, String path)
Description copied from interface:ItemServiceInternal
Check if item is new- Specified by:
isNew
in interfaceItemServiceInternal
- Parameters:
siteId
- site identifierpath
- path of the item- Returns:
- true if NEW flag is set otherwise false
-
countAllContentItems
public int countAllContentItems()
Description copied from interface:ItemServiceInternal
Count all content items- Specified by:
countAllContentItems
in interfaceItemServiceInternal
- Returns:
- number of content items in the system
-
clearPreviousPath
public void clearPreviousPath(String siteId, String path)
Description copied from interface:ItemServiceInternal
Clear previous path of the content- Specified by:
clearPreviousPath
in interfaceItemServiceInternal
- Parameters:
siteId
- site identifierpath
- path of the content;
-
convertHistoryItemToDashboardItem
public PublishingDashboardItem convertHistoryItemToDashboardItem(PublishingHistoryItem historyItem)
Description copied from interface:ItemServiceInternal
Convert Publishing History Item to Publishing Dashboard Item- Specified by:
convertHistoryItemToDashboardItem
in interfaceItemServiceInternal
- Parameters:
historyItem
- publishing history item- Returns:
- publishing dashboard item
-
convertItemToContentDashboardItem
public ContentDashboardItem convertItemToContentDashboardItem(String siteId, Item item)
Description copied from interface:ItemServiceInternal
Convert Item to Content Dashboard Item- Specified by:
convertItemToContentDashboardItem
in interfaceItemServiceInternal
- Parameters:
siteId
- site identifieritem
- item- Returns:
- content dashboard item
-
getInProgressItems
public List<Item> getInProgressItems(String siteId)
Description copied from interface:ItemServiceInternal
Get in progress items for given site- Specified by:
getInProgressItems
in interfaceItemServiceInternal
- Parameters:
siteId
- site identifier- Returns:
- list of items
-
getSubmittedItems
public List<Item> getSubmittedItems(String siteId)
Description copied from interface:ItemServiceInternal
Get submitted items for given site- Specified by:
getSubmittedItems
in interfaceItemServiceInternal
- Parameters:
siteId
- site identifier- Returns:
- list of items
-
isUpdatedOrNew
public boolean isUpdatedOrNew(String siteId, String path)
Description copied from interface:ItemServiceInternal
Check if item is update or new- Specified by:
isUpdatedOrNew
in interfaceItemServiceInternal
- Parameters:
siteId
- site identifierpath
- item path- Returns:
- true if item is new or modified
-
deleteItemForFolder
public void deleteItemForFolder(long siteId, String folderPath)
Description copied from interface:ItemServiceInternal
Delete items for site and paths- Specified by:
deleteItemForFolder
in interfaceItemServiceInternal
- Parameters:
siteId
- site idfolderPath
- folder path to delete
-
isSystemProcessing
public boolean isSystemProcessing(String siteId, String path)
Description copied from interface:ItemServiceInternal
Check if item is in system processing- Specified by:
isSystemProcessing
in interfaceItemServiceInternal
- Parameters:
siteId
- site identifierpath
- item path- Returns:
- true if item is in system processing
-
previousPathExists
public boolean previousPathExists(String siteId, String path)
Description copied from interface:ItemServiceInternal
Check if path exists as previous path- Specified by:
previousPathExists
in interfaceItemServiceInternal
- Parameters:
siteId
- site identifierpath
- path to check- Returns:
- true if item exists with previous path as given path
-
updateCommitId
public void updateCommitId(String siteId, String path, String commitId)
Description copied from interface:ItemServiceInternal
Update commit id for item- Specified by:
updateCommitId
in interfaceItemServiceInternal
- Parameters:
siteId
- site identifierpath
- path of the itemcommitId
- commit id
-
getMandatoryParentsForPublishing
public List<String> getMandatoryParentsForPublishing(String siteId, List<String> paths)
Description copied from interface:ItemServiceInternal
Get mandatory parents for publishing for given site and list of paths- Specified by:
getMandatoryParentsForPublishing
in interfaceItemServiceInternal
- Parameters:
siteId
- site identifierpaths
- list of paths- Returns:
- list of mandatory parents paths
-
getExistingRenamedChildrenOfMandatoryParentsForPublishing
public List<String> getExistingRenamedChildrenOfMandatoryParentsForPublishing(String siteId, List<String> parents)
Description copied from interface:ItemServiceInternal
Get existing renamed children of mandatory parents for publishing- Specified by:
getExistingRenamedChildrenOfMandatoryParentsForPublishing
in interfaceItemServiceInternal
- Parameters:
siteId
- site identifierparents
- list of parents paths- Returns:
- list of children paths
-
getChangeSetForSubtree
public List<String> getChangeSetForSubtree(String siteId, String path)
Description copied from interface:ItemServiceInternal
Get change set for subtree- Specified by:
getChangeSetForSubtree
in interfaceItemServiceInternal
- Parameters:
siteId
- site identifierpath
- root path of the subtree- Returns:
- list of items
-
getSameCommitItems
public List<String> getSameCommitItems(String siteId, String path)
Description copied from interface:ItemServiceInternal
Get items edited on same commit id for given item- Specified by:
getSameCommitItems
in interfaceItemServiceInternal
- Parameters:
siteId
- site identifierpath
- path of content item- Returns:
- list of items paths
-
updateLastPublishedOn
public void updateLastPublishedOn(String siteId, String path, ZonedDateTime lastPublishedOn)
Description copied from interface:ItemServiceInternal
Update last published date for item- Specified by:
updateLastPublishedOn
in interfaceItemServiceInternal
- Parameters:
siteId
- site identifierpath
- path of the itemlastPublishedOn
- published date
-
updateLastPublishedOnBulk
public void updateLastPublishedOnBulk(String siteId, List<String> paths, ZonedDateTime lastPublishedOn)
Description copied from interface:ItemServiceInternal
Update last published date for item- Specified by:
updateLastPublishedOnBulk
in interfaceItemServiceInternal
- Parameters:
siteId
- site identifierpaths
- list of pathslastPublishedOn
- published date
-
lockItemByPath
public void lockItemByPath(String siteId, String path, String username) throws UserNotFoundException, ServiceLayerException
Description copied from interface:ItemServiceInternal
Lock item for given lock owner- Specified by:
lockItemByPath
in interfaceItemServiceInternal
- Parameters:
siteId
- site identifierpath
- item pathusername
- user that owns the lock- Throws:
UserNotFoundException
ServiceLayerException
-
lockItemsByPath
public void lockItemsByPath(String siteId, List<String> paths, String username) throws UserNotFoundException, ServiceLayerException
Description copied from interface:ItemServiceInternal
Lock items for given lock owner- Specified by:
lockItemsByPath
in interfaceItemServiceInternal
- Parameters:
siteId
- site identifierpaths
- list of item pathsusername
- user that owns the lock- Throws:
UserNotFoundException
ServiceLayerException
-
unlockItemByPath
public void unlockItemByPath(String siteId, String path)
Description copied from interface:ItemServiceInternal
Unlock item- Specified by:
unlockItemByPath
in interfaceItemServiceInternal
- Parameters:
siteId
- site identifierpath
- item path
-
lockItemById
public void lockItemById(long itemId, String username) throws UserNotFoundException, ServiceLayerException
Description copied from interface:ItemServiceInternal
Lock item for given lock owner- Specified by:
lockItemById
in interfaceItemServiceInternal
- Parameters:
itemId
- item identifierusername
- user that owns the lock- Throws:
UserNotFoundException
ServiceLayerException
-
lockItemsById
public void lockItemsById(List<Long> itemIds, String username) throws UserNotFoundException, ServiceLayerException
Description copied from interface:ItemServiceInternal
Lock items for given lock owner- Specified by:
lockItemsById
in interfaceItemServiceInternal
- Parameters:
itemIds
- list of item identifiersusername
- user that owns the lock- Throws:
UserNotFoundException
ServiceLayerException
-
unlockItemById
public void unlockItemById(long itemId)
Description copied from interface:ItemServiceInternal
Unlock item- Specified by:
unlockItemById
in interfaceItemServiceInternal
- Parameters:
itemId
- item identifier
-
getItemStatesTotal
public int getItemStatesTotal(String siteId, String path, Long states)
Description copied from interface:ItemServiceInternal
Get total number of item states records for given filters by path regex and states mask- Specified by:
getItemStatesTotal
in interfaceItemServiceInternal
- Parameters:
siteId
- site identifierpath
- path regex to filter itemsstates
- states mask to filter items by state- Returns:
- number of records
-
getItemStates
public List<Item> getItemStates(String siteId, String path, Long states, int offset, int limit)
Description copied from interface:ItemServiceInternal
Get item states for given filters by path regex and states mask- Specified by:
getItemStates
in interfaceItemServiceInternal
- Parameters:
siteId
- site identifierpath
- path regex to filter itemsstates
- states mask to filter items by stateoffset
- offset for the first record in result setlimit
- number of item states records to return- Returns:
- list of sandbox items
-
updateItemStates
public void updateItemStates(String siteId, List<String> paths, boolean clearSystemProcessing, boolean clearUserLocked, Boolean live, Boolean staged)
Description copied from interface:ItemServiceInternal
Update item state flags for given items- Specified by:
updateItemStates
in interfaceItemServiceInternal
- Parameters:
siteId
- site identifierpaths
- item pathsclearSystemProcessing
- if true clear system processing flag, otherwise ignoreclearUserLocked
- if true clear user locked flag, otherwise ignorelive
- if true set live flag, otherwise reset itstaged
- if true set staged flag, otherwise reset it
-
updateItemStatesByQuery
public void updateItemStatesByQuery(String siteId, String path, Long states, boolean clearSystemProcessing, boolean clearUserLocked, Boolean live, Boolean staged)
Description copied from interface:ItemServiceInternal
Update item state flags for given path query- Specified by:
updateItemStatesByQuery
in interfaceItemServiceInternal
- Parameters:
siteId
- site identifierpath
- path regex to identify itemsclearSystemProcessing
- if true clear system processing flag, otherwise ignoreclearUserLocked
- if true clear user locked flag, otherwise ignorelive
- if true set live flag, otherwise reset itstaged
- if true set staged flag, otherwise reset it
-
getSubtreeForDelete
public List<String> getSubtreeForDelete(String siteId, String path)
Description copied from interface:ItemServiceInternal
Get subtree for delete- Specified by:
getSubtreeForDelete
in interfaceItemServiceInternal
- Parameters:
siteId
- site identifierpath
- root path of the subtree- Returns:
- list of items
-
updateStatesForSite
public void updateStatesForSite(String siteId, long onStateBitMap, long offStateBitMap)
Description copied from interface:ItemServiceInternal
Update states for all content in the given site- Specified by:
updateStatesForSite
in interfaceItemServiceInternal
- Parameters:
siteId
- site identifieronStateBitMap
- states bitmap to flip onoffStateBitMap
- states bitmap to flip off
-
getUserServiceInternal
public UserServiceInternal getUserServiceInternal()
-
setUserServiceInternal
public void setUserServiceInternal(UserServiceInternal userServiceInternal)
-
getSiteFeedMapper
public SiteFeedMapper getSiteFeedMapper()
-
setSiteFeedMapper
public void setSiteFeedMapper(SiteFeedMapper siteFeedMapper)
-
getItemDao
public ItemDAO getItemDao()
-
setItemDao
public void setItemDao(ItemDAO itemDao)
-
getServicesConfig
public ServicesConfig getServicesConfig()
-
setServicesConfig
public void setServicesConfig(ServicesConfig servicesConfig)
-
getContentServiceInternal
public ContentServiceInternal getContentServiceInternal()
-
setContentServiceInternal
public void setContentServiceInternal(ContentServiceInternal contentServiceInternal)
-
getContentService
public ContentService getContentService()
-
setContentService
public void setContentService(ContentService contentService)
-
getGeneralLockService
public GeneralLockService getGeneralLockService()
-
setGeneralLockService
public void setGeneralLockService(GeneralLockService generalLockService)
-
getRetryingDatabaseOperationFacade
public RetryingDatabaseOperationFacade getRetryingDatabaseOperationFacade()
-
setRetryingDatabaseOperationFacade
public void setRetryingDatabaseOperationFacade(RetryingDatabaseOperationFacade retryingDatabaseOperationFacade)
-
-