Class ExtensionHandler
java.lang.Object
com.softslate.commerce.administrator.extender.ExtensionHandler
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
appendContentsIntoFile
(String fileContents, String filePath) protected String
appendContentsToExistingFileContents
(String fileContents, String existingContents, String newFileTokenStart, String newFileTokenEnd, String endingMarker) protected void
protected String
createFileContents
(String template) protected void
protected void
protected void
mergeContentsIntoFileIfItAlreadyExists
(String fileContents, String filePath, String mergeTokenStart, String mergeTokenEnd) protected String
mergeExistingFileContents
(String fileContents, String existingContents, String destinationTokenStart, String destinationTokenEnd) void
static String
replaceLast
(String original, String toReplace, String replacement) protected void
writeContentsToDisk
(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
-