Class ImportServiceImpl
- java.lang.Object
-
- org.craftercms.studio.impl.v1.service.content.ImportServiceImpl
-
- All Implemented Interfaces:
ImportService
public class ImportServiceImpl extends Object implements ImportService
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
ImportServiceImpl.PublishingChannel
publishing channel
-
Field Summary
Fields Modifier and Type Field Description protected ContentRepository
contentRepository
protected ContentService
contentService
protected DmPublishService
dmPublishService
protected ItemServiceInternal
itemServiceInternal
protected SecurityService
securityService
protected SiteService
siteService
protected StudioConfiguration
studioConfiguration
-
Constructor Summary
Constructors Constructor Description ImportServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
createFiles(String site, Set<String> importedPaths, List<String> importedFullPaths, List<org.dom4j.Node> nodes, String fileRoot, String targetRoot, String parentPath, boolean overWrite, String user)
create files from a listString
getAssetChainName()
String
getAssignee()
ContentRepository
getContentRepository()
ContentService
getContentService()
DmPublishService
getDmPublishService()
ItemServiceInternal
getItemServiceInternal()
SecurityService
getSecurityService()
SiteService
getSiteService()
StudioConfiguration
getStudioConfiguration()
String
getXmlChainName()
protected void
importFileList(String site, Set<String> importedPaths, List<String> importedFullPaths, String fileRoot, String targetRoot, String parentPath, boolean overWrite, String user)
import files and folders at the given fileRoot pathprotected void
importRootFileList(String site, Set<String> importedPaths, List<String> importedFullPaths, String fileRoot, String targetRoot, String parentPath, boolean overWrite, String user)
import all files from the given file rootvoid
importSite(String configLocation)
protected org.dom4j.Document
loadConfiguration(String configLocation)
protected void
pause()
pause the process if it reached the intervalprotected void
publish(String site, String publishChannelGroup, String targetRoot, List<String> fullPaths, int chunkSize)
publish itemsvoid
setContentRepository(ContentRepository contentRepository)
void
setContentService(ContentService contentService)
void
setDmPublishService(DmPublishService dmPublishService)
void
setItemServiceInternal(ItemServiceInternal itemServiceInternal)
void
setSecurityService(SecurityService securityService)
void
setSiteService(SiteService siteService)
void
setStudioConfiguration(StudioConfiguration studioConfiguration)
protected void
submitToGoLive(String site, String publishChannelGroup, List<String> importedFullPaths)
submit imported items to go liveprotected void
writeContent(String site, Set<String> importedPaths, List<String> importedFullPaths, String fileRoot, String targetRoot, String parentPath, String name, boolean overWrite)
write contentprotected void
writeContentInTransaction(String site, Set<String> importedPaths, List<String> importedFullPaths, String fileRoot, String targetRoot, String parentPath, String name, boolean overWrite, String user)
write content
-
-
-
Field Detail
-
siteService
protected SiteService siteService
-
securityService
protected SecurityService securityService
-
contentRepository
protected ContentRepository contentRepository
-
contentService
protected ContentService contentService
-
dmPublishService
protected DmPublishService dmPublishService
-
studioConfiguration
protected StudioConfiguration studioConfiguration
-
itemServiceInternal
protected ItemServiceInternal itemServiceInternal
-
-
Method Detail
-
importSite
public void importSite(String configLocation) throws ServiceLayerException, org.craftercms.commons.validation.ValidationException, UserNotFoundException
- Specified by:
importSite
in interfaceImportService
- Throws:
ServiceLayerException
org.craftercms.commons.validation.ValidationException
UserNotFoundException
-
loadConfiguration
protected org.dom4j.Document loadConfiguration(String configLocation)
-
importRootFileList
protected void importRootFileList(String site, Set<String> importedPaths, List<String> importedFullPaths, String fileRoot, String targetRoot, String parentPath, boolean overWrite, String user) throws ServiceLayerException, UserNotFoundException
import all files from the given file root- Parameters:
site
-importedPaths
-importedFullPaths
-fileRoot
-targetRoot
- the target location rootparentPath
- the target location to import tooverWrite
-user
-- Throws:
ServiceLayerException
UserNotFoundException
-
importFileList
protected void importFileList(String site, Set<String> importedPaths, List<String> importedFullPaths, String fileRoot, String targetRoot, String parentPath, boolean overWrite, String user) throws ServiceLayerException, UserNotFoundException
import files and folders at the given fileRoot path- Parameters:
site
-importedPaths
-importedFullPaths
-fileRoot
-targetRoot
- the target location rootparentPath
- the target location to import tooverWrite
-user
-- Throws:
ServiceLayerException
UserNotFoundException
-
writeContentInTransaction
protected void writeContentInTransaction(String site, Set<String> importedPaths, List<String> importedFullPaths, String fileRoot, String targetRoot, String parentPath, String name, boolean overWrite, String user)
write content- Parameters:
site
-importedPaths
-importedFullPaths
-fileRoot
-parentPath
-name
-overWrite
-user
-
-
writeContent
protected void writeContent(String site, Set<String> importedPaths, List<String> importedFullPaths, String fileRoot, String targetRoot, String parentPath, String name, boolean overWrite)
write content- Parameters:
site
-importedPaths
-importedFullPaths
-fileRoot
-parentPath
-name
-overWrite
-
-
pause
protected void pause()
pause the process if it reached the interval
-
createFiles
protected void createFiles(String site, Set<String> importedPaths, List<String> importedFullPaths, List<org.dom4j.Node> nodes, String fileRoot, String targetRoot, String parentPath, boolean overWrite, String user)
create files from a list- Parameters:
site
-importedPaths
-importedFullPaths
-nodes
-fileRoot
-targetRoot
- the target location rootparentPath
- the target location to import tooverWrite
-user
-
-
publish
protected void publish(String site, String publishChannelGroup, String targetRoot, List<String> fullPaths, int chunkSize)
publish items- Parameters:
site
-publishChannelGroup
-targetRoot
-fullPaths
-chunkSize
-
-
submitToGoLive
protected void submitToGoLive(String site, String publishChannelGroup, List<String> importedFullPaths)
submit imported items to go live- Parameters:
site
-publishChannelGroup
-importedFullPaths
-
-
getSiteService
public SiteService getSiteService()
-
setSiteService
public void setSiteService(SiteService siteService)
-
getSecurityService
public SecurityService getSecurityService()
-
setSecurityService
public void setSecurityService(SecurityService securityService)
-
getContentRepository
public ContentRepository getContentRepository()
-
setContentRepository
public void setContentRepository(ContentRepository contentRepository)
-
getContentService
public ContentService getContentService()
-
setContentService
public void setContentService(ContentService contentService)
-
getDmPublishService
public DmPublishService getDmPublishService()
-
setDmPublishService
public void setDmPublishService(DmPublishService dmPublishService)
-
getStudioConfiguration
public StudioConfiguration getStudioConfiguration()
-
setStudioConfiguration
public void setStudioConfiguration(StudioConfiguration studioConfiguration)
-
getItemServiceInternal
public ItemServiceInternal getItemServiceInternal()
-
setItemServiceInternal
public void setItemServiceInternal(ItemServiceInternal itemServiceInternal)
-
getAssignee
public String getAssignee()
-
getXmlChainName
public String getXmlChainName()
-
getAssetChainName
public String getAssetChainName()
-
-