org.mactor.framework.spec
Class ProjectContext

java.lang.Object
  extended by org.mactor.framework.spec.ProjectContext

public class ProjectContext
extends java.lang.Object


Nested Class Summary
static interface ProjectContext.ProjectContextListener
           
 
Constructor Summary
ProjectContext()
           
 
Method Summary
 void deleteFile(java.io.File file)
           
 java.io.File duplicateFile(java.io.File file)
           
 java.io.File getAbsolutePath(java.lang.String relativePath)
           
 java.lang.String getGlobalConfigName()
           
static ProjectContext getGlobalInstance()
           
 ProjectContext.ProjectContextListener getListener()
           
 java.lang.String getMessageBrokerConfigName()
           
 java.lang.String getNextFilename(java.lang.String filename, boolean isConfigFile)
           
 java.io.File getProjectConfigDir()
           
 java.io.File getProjectDir()
           
 java.lang.String getProjectName()
           
 java.lang.String getRelativePath(java.io.File path)
           
 boolean isDirty()
           
 GlobalConfig loadGlobalConfig()
           
 MessageBrokersConfig loadMessageBrokersConfig()
           
 org.dom4j.Document readFromFile(java.io.File path)
           
 org.dom4j.Document readFromFile(java.lang.String name, boolean isConfigFile)
           
 java.lang.String readStringFromFile(java.lang.String name, boolean isConfigFile)
           
 java.io.File renameFile(java.io.File oldFile, java.lang.String newFilename)
           
 void setDirty(boolean dirty)
           
 void setGlobalConfigName(java.lang.String globalConfigName)
           
 void setListener(ProjectContext.ProjectContextListener listener)
           
 void setMessageBrokerConfigName(java.lang.String messageBrokerConfigName)
           
 void setProjectConfigDir(java.io.File projectConfigDir)
           
 void setProjectDir(java.io.File dir)
           
 void writeDocumentToFile(java.io.File file, org.dom4j.Document doc)
           
 java.io.File writeStringToFile(java.lang.String name, java.lang.String content, boolean isConfigFile)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProjectContext

public ProjectContext()
Method Detail

getGlobalInstance

public static ProjectContext getGlobalInstance()

getProjectName

public java.lang.String getProjectName()

getAbsolutePath

public java.io.File getAbsolutePath(java.lang.String relativePath)

getRelativePath

public java.lang.String getRelativePath(java.io.File path)

readFromFile

public org.dom4j.Document readFromFile(java.lang.String name,
                                       boolean isConfigFile)
                                throws MactorException
Throws:
MactorException

readFromFile

public org.dom4j.Document readFromFile(java.io.File path)
                                throws MactorException
Throws:
MactorException

writeDocumentToFile

public void writeDocumentToFile(java.io.File file,
                                org.dom4j.Document doc)
                         throws MactorException
Throws:
MactorException

writeStringToFile

public java.io.File writeStringToFile(java.lang.String name,
                                      java.lang.String content,
                                      boolean isConfigFile)
                               throws MactorException
Throws:
MactorException

readStringFromFile

public java.lang.String readStringFromFile(java.lang.String name,
                                           boolean isConfigFile)
                                    throws MactorException
Throws:
MactorException

renameFile

public java.io.File renameFile(java.io.File oldFile,
                               java.lang.String newFilename)
                        throws MactorException
Throws:
MactorException

duplicateFile

public java.io.File duplicateFile(java.io.File file)
                           throws MactorException
Throws:
MactorException

deleteFile

public void deleteFile(java.io.File file)
                throws MactorException
Throws:
MactorException

getNextFilename

public java.lang.String getNextFilename(java.lang.String filename,
                                        boolean isConfigFile)

getProjectDir

public java.io.File getProjectDir()

getProjectConfigDir

public java.io.File getProjectConfigDir()

setProjectDir

public void setProjectDir(java.io.File dir)

setGlobalConfigName

public void setGlobalConfigName(java.lang.String globalConfigName)

setMessageBrokerConfigName

public void setMessageBrokerConfigName(java.lang.String messageBrokerConfigName)

setProjectConfigDir

public void setProjectConfigDir(java.io.File projectConfigDir)

loadGlobalConfig

public GlobalConfig loadGlobalConfig()
                              throws MactorException
Throws:
MactorException

loadMessageBrokersConfig

public MessageBrokersConfig loadMessageBrokersConfig()
                                              throws MactorException
Throws:
MactorException

getGlobalConfigName

public java.lang.String getGlobalConfigName()

getMessageBrokerConfigName

public java.lang.String getMessageBrokerConfigName()

isDirty

public boolean isDirty()

setDirty

public void setDirty(boolean dirty)

getListener

public ProjectContext.ProjectContextListener getListener()

setListener

public void setListener(ProjectContext.ProjectContextListener listener)


Copyright © 2008. All Rights Reserved.