Class ExtensionHandler
java.lang.Object
com.softslate.commerce.administrator.extender.ExtensionHandler
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidappendContentsIntoFile(String fileContents, String filePath) protected StringappendContentsToExistingFileContents(String fileContents, String existingContents, String newFileTokenStart, String newFileTokenEnd, String endingMarker) protected voidprotected StringcreateFileContents(String template) protected voidprotected voidprotected voidmergeContentsIntoFileIfItAlreadyExists(String fileContents, String filePath, String mergeTokenStart, String mergeTokenEnd) protected StringmergeExistingFileContents(String fileContents, String existingContents, String destinationTokenStart, String destinationTokenEnd) voidstatic StringreplaceLast(String original, String toReplace, String replacement) protected voidwriteContentsToDisk(String fileContents, String filePath)
-
Field Details
-
log
static org.apache.commons.logging.Log log -
extension
-
ve
private org.apache.velocity.app.VelocityEngine ve -
vc
private org.apache.velocity.VelocityContext vc
-
-
Constructor Details
-
ExtensionHandler
-
-
Method Details
-
performExtension
- Throws:
Exception
-
initializeVelocity
protected void initializeVelocity() -
createNonAdminContents
- Throws:
Exception
-
createAdminContents
- Throws:
Exception
-
createFileContents
- Throws:
Exception
-
writeContentsToDisk
- Throws:
Exception
-
mergeContentsIntoFileIfItAlreadyExists
protected void mergeContentsIntoFileIfItAlreadyExists(String fileContents, String filePath, String mergeTokenStart, String mergeTokenEnd) throws Exception - Throws:
Exception
-
mergeExistingFileContents
protected String mergeExistingFileContents(String fileContents, String existingContents, String destinationTokenStart, String destinationTokenEnd) throws Exception - Throws:
Exception
-
appendContentsIntoFile
- Throws:
Exception
-
appendContentsToExistingFileContents
protected String appendContentsToExistingFileContents(String fileContents, String existingContents, String newFileTokenStart, String newFileTokenEnd, String endingMarker) throws Exception - Throws:
Exception
-
replaceLast
-