public class AdminFileMgrEE extends AdminFileMgr implements AdminFileMgrIf
AdminBaseMgr.StaticData
Modifier and Type | Field and Description |
---|---|
protected static org.apache.commons.logging.Log |
log |
imageIOInitMutex, imageIOReadMutex, initialisedImageIO, permittedLocations, synchroniseImageIOReads
adminEng, baseMgrMutex, baseStaticDataHM, cDataEnd, cDataStart, debugStackTraceExclusions, kkAdminPropsFilePath, kkConf, kkInstanceId, mgrFactory, STORE_ID, templateBaseDir
Constructor and Description |
---|
AdminFileMgrEE(KKAdminIf eng)
The AdminFileMgr constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addCategoryImage(AdminImageOptions options)
Add a Category Image using the same configuration as the Admin App uses which is defined in
konakartadmin_gwt.properties.
|
protected java.lang.String |
addCRC(java.lang.String imageCrc,
int nextImageIdx,
java.lang.String crc,
java.lang.String fileSize) |
void |
addImage(AdminImageOptions options)
Add the image to the object defined in the AdminImageOptions object.
|
void |
addManufacturerImage(AdminImageOptions options)
Add a Manufacturer Image using the same configuration as the Admin App uses which is defined
in konakartadmin_gwt.properties.
|
void |
addProductImage(AdminImageOptions options)
Add a Product Image using the same configuration as the Admin App uses in
konakartadmin_gwt.properties.
|
protected void |
copyFromRemote(java.lang.String remoteSessionId,
KKAdminIf remoteEng,
java.lang.String remotefileName,
java.lang.String localfileName) |
protected void |
purgeDirectoryFiles(java.lang.String dirName,
java.lang.String pattern,
int filesToRetain) |
void |
removeCategoryImage(AdminImageOptions options)
Remove the Category's Image from disk (if it's the only Category using the image) and from
the Category's record in the database
|
void |
removeImage(AdminImageOptions options)
Remove the image (or images) from the object defined in the AdminImageOptions object.
|
void |
removeManufacturerImage(AdminImageOptions options)
Remove the Manufacturer's Image from disk and from the Manufacturer's record in the database
|
void |
removeProductImage(AdminImageOptions options)
Remove the Product's Image(s) from disk.
|
int |
rsyncDirectory(java.lang.String remoteSessionId,
KKAdminIf remoteEng,
java.lang.String localSessionId,
KKAdminIf localEng,
java.lang.String remoteDir,
java.lang.String localDir)
Sync the files in the specified directory using a local and a remote engine.
|
checkFileAccess, checkFileAccess, copyFile, copyFiles, deleteFile, getConfigFiles, getFileContents, getFileContents, getFileContentsAsByteArray, getFiles, getPermittedLocations, initImageIO, isSynchroniseImageIOReads, refreshConfigs, renameFile, renameFiles, saveFileContents, scaleImage, setSynchroniseImageIOReads
addInsertAttr, addInsertAttr, addStringRuleConstraint, addStringRuleConstraint, checkAPICallEnabled, checkIntInRange, checkIntIsSet, checkRequired, executeQuery, executeQuery, getAdminAddressMgr, getAdminAuditMgr, getAdminBillingMgr, getAdminBookableProductMgr, getAdminCatMgr, getAdminConfigMgr, getAdminContentMgr, getAdminCurrMgr, getAdminCustMgr, getAdminCustPwdHistMgr, getAdminCustTagMgr, getAdminEmailMgr, getAdminEng, getAdminEngineCacheMgr, getAdminEventMgr, getAdminExecuteMgr, getAdminFileMgr, getAdminFilterMgr, getAdminHtmlMgr, getAdminImportMgr, getAdminLanguageMgr, getAdminManuMgr, getAdminMessageMgr, getAdminMiscItemMgr, getAdminMiscPriceMgr, getAdminModulesMgr, getAdminMultiStoreMgr, getAdminOrderMgr, getAdminPdfMgr, getAdminProdAttrMgr, getAdminProdMgr, getAdminPromMgr, getAdminReviewMgr, getAdminSearchRuleMgr, getAdminSecMgr, getAdminServletMgr, getAdminShipmentMgr, getAdminSolrMgr, getAdminStoreMgr, getAdminSuggestionMgr, getAdminTagMgr, getAdminTaxMgr, getAdminValidationMgr, getAdminVelocityContextMgr, getAdminWishListMgr, getBooleanFromString, getDebugStackTraceExclusions, getEmailThreadGracefulShutdownTimeout, getExportMgr, getExportMgr, getExportXMLData, getIntFromString, getKkAdminPropsFilePath, getKkConfig, getKkInstanceId, getMode, getModeString, getMqMgr, getNewCriteria, getNewCriteria, getNewCriteria, getNewCriteria, getOtherModuleByName, getPostSearchText, getPreSearchText, getProductsToCategoresCriteria, getPropertyValue, getPropertyValue, getPropertyValueAsBool, getPropertyValueAsInt, getPropertyValueAsLong, getRecordCount, getRecordCount, getRewardPointMgr, getSingleIntResult, getStoreId, getTemplate, getTemplateBase, getXml_io, init, insertKKEvent, insertKKEvent, isBusiness, isBusinessOrEnterprise, isCommunity, isConfigSet, isEnterprise, isMultiStoreLanguagesShared, isMultiStoreMode, isMultiStoreShareCategories, isMultiStoreShareCustomers, isMultiStoreShareCustomersOrProducts, isMultiStoreShareProducts, isMultiStoreSingleDBCSMode, isMultiStoreSingleDBMode, isMultiStoreSingleDBNonCSMode, isUnix, isWindows, manageException, manageThrowable, removeCData, sendMQMessages, setAdminEng, setDebugStackTraceExclusions, setKkAdminPropsFilePath, setupWildCardRules, setWildCardAfter, setWildCardBefore, shutdownGracefully, shutdownGracefully, timestampStr, updateStaticVariablesNow
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkFileAccess, checkFileAccess, copyFile, copyFiles, deleteFile, getConfigFiles, getFileContents, getFileContents, getFileContentsAsByteArray, getFiles, refreshConfigs, renameFile, renameFiles, saveFileContents, scaleImage
public AdminFileMgrEE(KKAdminIf eng) throws java.lang.Exception
eng
- the engjava.lang.Exception
- an unexpected exceptionpublic void addImage(AdminImageOptions options) throws KKAdminException
AdminFileMgrIf
When adding product images it uses the same conventions as used in the Admin Application and gets these definitions from the konakartadmin_gwt.properties file. Once an image is added to a product using this API the image will appear for the product in the Admin Application just as if it had been added via an image upload in the Admin application.
addImage
in interface AdminFileMgrIf
addImage
in class AdminFileMgr
options
- The options that define which object the image should be added toKKAdminException
- if the image was not added successfullypublic void addProductImage(AdminImageOptions options) throws KKAdminException
options
- the optionsKKAdminException
- unexpected exception in the KonaKart Admin Engineprotected void purgeDirectoryFiles(java.lang.String dirName, java.lang.String pattern, int filesToRetain)
protected java.lang.String addCRC(java.lang.String imageCrc, int nextImageIdx, java.lang.String crc, java.lang.String fileSize)
public void addManufacturerImage(AdminImageOptions options) throws KKAdminException
options
- the optionsKKAdminException
- if there are any problems such as the source file does not exist.public void addCategoryImage(AdminImageOptions options) throws KKAdminException
options
- the optionsKKAdminException
- if there are any problems such as the source file does not exist.public void removeImage(AdminImageOptions options) throws KKAdminException
AdminFileMgrIf
removeImage
in interface AdminFileMgrIf
removeImage
in class AdminFileMgr
options
- The options that define which images should be removedKKAdminException
- for any unexpected problemspublic void removeProductImage(AdminImageOptions options) throws KKAdminException
options
- Specify the subject (KKConstants.IMG_PRODUCT), the id (productId) and a pattern
for filename selectionKKAdminException
- if the Product has no image defined or there is an unexpected I/O or database
problem.public void removeManufacturerImage(AdminImageOptions options) throws KKAdminException
options
- only necessary to specify the subject and the id for removing Manufacturer imagesKKAdminException
- if the Manufacturer has no image defined or there is an unexpected I/O or
database problem.public void removeCategoryImage(AdminImageOptions options) throws KKAdminException
options
- only necessary to specify the subject and the id for removing Category imagesKKAdminException
- if the Category has no image defined or there is an unexpected I/O or database
problem.public int rsyncDirectory(java.lang.String remoteSessionId, KKAdminIf remoteEng, java.lang.String localSessionId, KKAdminIf localEng, java.lang.String remoteDir, java.lang.String localDir) throws KKAdminException
rsyncDirectory
in interface AdminFileMgrIf
rsyncDirectory
in class AdminFileMgr
remoteSessionId
- sessionId for the remote engineremoteEng
- the remote engine (probably a KKJSONAdminEng)localSessionId
- the local sessionId (could be the same as the remote sessionId for systems sharing
the same database)localEng
- the local engineremoteDir
- remote base directorylocalDir
- local base directory (often the same as the remote base directory)KKAdminException
- an unexpected exception in the KKAdmin engineprotected void copyFromRemote(java.lang.String remoteSessionId, KKAdminIf remoteEng, java.lang.String remotefileName, java.lang.String localfileName) throws KKAdminException, java.io.IOException
KKAdminException
java.io.IOException
Copyright © 2018 DS Data Systems UK Ltd.