|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.konakartadmin.bl.AdminBaseMgr
com.konakartadmin.bl.AdminFileMgr
public class AdminFileMgr
Manages Files for KonaKartAdmin
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.konakartadmin.bl.AdminBaseMgr |
|---|
AdminBaseMgr.StaticData |
| Field Summary | |
|---|---|
protected static org.apache.commons.logging.Log |
log
|
| Fields inherited from class com.konakartadmin.bl.AdminBaseMgr |
|---|
adminEng, baseMgrMutex, baseStaticDataHM, cDataEnd, cDataStart, kkConf, kkInstanceId, mgrFactory, STORE_ID, templateBaseDir |
| Constructor Summary | |
|---|---|
AdminFileMgr(KKAdminIf eng)
The AdminFileMgr constructor |
|
| Method Summary | |
|---|---|
boolean |
deleteFile(java.lang.String fileName)
Delete the file. |
AdminFile[] |
getConfigFiles()
Returns an array containing the configuration files. |
java.lang.String |
getFileContents(java.lang.String fileName)
Get the file contents. |
byte[] |
getFileContentsAsByteArray(java.lang.String fileName)
Get the file contents as a byte array. |
AdminFile[] |
getFiles(java.lang.String directory,
java.lang.String extension)
Returns an array of files found in the directory. |
void |
saveFileContents(java.lang.String fileName,
java.lang.String fileContents)
Writes the specified file contents into the specified file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static org.apache.commons.logging.Log log
| Constructor Detail |
|---|
public AdminFileMgr(KKAdminIf eng)
throws java.lang.Exception
eng -
java.lang.Exception| Method Detail |
|---|
public java.lang.String getFileContents(java.lang.String fileName)
throws KKAdminException
getFileContents in interface AdminFileMgrIffileName - the filename in the server's context
KKAdminException - if the file's not present or can't be read, or it's not a text file
public void saveFileContents(java.lang.String fileName,
java.lang.String fileContents)
throws KKAdminException
saveFileContents in interface AdminFileMgrIffileName - the filename in the server's contextfileContents - the file contents to write
KKAdminException - on any Security or IO problems that prevent us from saving the data to the file.
public boolean deleteFile(java.lang.String fileName)
throws KKAdminException
deleteFile in interface AdminFileMgrIffileName - the filename in the server's context
KKAdminException - if the file's not present or can't be deleted
public AdminFile[] getConfigFiles()
throws KKAdminException
AdminFileMgrIf
getConfigFiles in interface AdminFileMgrIfKKAdminException
public AdminFile[] getFiles(java.lang.String directory,
java.lang.String extension)
throws KKAdminException
getFiles in interface AdminFileMgrIfdirectory - extension -
KKAdminException
public byte[] getFileContentsAsByteArray(java.lang.String fileName)
throws KKAdminException
getFileContentsAsByteArray in interface AdminFileMgrIffileName - the filename in the server's context
KKAdminException - if the file's not present or can't be read
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||