Package com.openindex.openestate.tool
Class ImmoToolProject
- java.lang.Object
-
- com.openindex.openestate.tool.ImmoToolProject
-
- Direct Known Subclasses:
ImmoToolLocalProject
,ImmoToolRemoteProject
public abstract class ImmoToolProject extends Object
ImmoToolProject.- Author:
- Andreas Rudolph
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ImmoToolProject.Type
-
Constructor Summary
Constructors Modifier Constructor Description protected
ImmoToolProject()
-
Method Summary
-
-
-
Method Detail
-
create
public static ImmoToolProject create(File projectDir, ImmoToolProject.Type projectType) throws IOException
Create a new project.- Parameters:
projectDir
- project directoryprojectType
- type of project- Returns:
- created project
- Throws:
IOException
- IO-error
-
getAgent
public ImmoToolAgent getAgent()
Get locally stored agent.- Returns:
- agent, or null if not loaded
-
getAgentLogo
public File getAgentLogo()
Get locally stored agent logo.- Returns:
- agent logo, or null if not loaded
-
getAppDbConnection
public static Connection getAppDbConnection() throws SQLException
- Throws:
SQLException
-
getAppDbDriver
public static AbstractDbDriver getAppDbDriver()
-
getAppDbExtension
public static DbExtension getAppDbExtension()
-
getAppInstance
public static ImmoToolProject getAppInstance()
-
getAppUser
public static DbUser getAppUser()
-
getDbConnection
public final Connection getDbConnection() throws SQLException
- Throws:
SQLException
-
getDbConnection
public final Connection getDbConnection(Properties props) throws SQLException
- Throws:
SQLException
-
getDbDriver
public abstract AbstractDbDriver getDbDriver()
-
getDbExtension
public final DbExtension getDbExtension()
-
getDbPlugins
public final DbPlugin[] getDbPlugins()
-
getDbPluginNames
public final String[] getDbPluginNames()
-
getDirectory
public final File getDirectory()
-
getIncompatiblePlugins
public final String[] getIncompatiblePlugins()
-
getName
public final String getName()
-
getProperties
public final Properties getProperties()
-
getTempDirectory
public final File getTempDirectory()
-
getType
public abstract ImmoToolProject.Type getType()
-
getUser
public final DbUser getUser()
-
init
protected void init() throws IOException
- Throws:
IOException
-
isLocalProject
public final boolean isLocalProject()
-
isPluginEnabled
public final boolean isPluginEnabled(String pluginId)
-
isPluginIncompatible
public final boolean isPluginIncompatible(String pluginId)
-
isPluginInstalled
public final boolean isPluginInstalled(String pluginId)
-
isPluginUsable
public final boolean isPluginUsable(String pluginId)
-
isPluginUsable
public final boolean isPluginUsable(org.pf4j.PluginWrapper plugin)
-
isPluginUsable
public final boolean isPluginUsable(org.pf4j.Plugin plugin)
-
isRemoteProject
public final boolean isRemoteProject()
-
isValidProjectDirectory
public static boolean isValidProjectDirectory(File dir)
Überprüfung, ob ein gültiges Projekt-Verzeichnis vorliegt.- Parameters:
dir
- Verzeichnis- Returns:
- true, wenn das Verzeichnis existiert und eine project.properties darin vorliegt.
-
load
public void load(Connection c, DbUser user) throws SQLException, IOException
- Throws:
SQLException
IOException
-
lookupProjectType
public static String lookupProjectType(Properties props)
-
open
public static ImmoToolProject open(File projectDir) throws IOException, ImmoToolException
Bestehendes Projekt öffnen.- Parameters:
projectDir
- Projekt-Verzeichnis.- Returns:
- Projekt.
- Throws:
IOException
- IO-FehlerImmoToolException
- interner Fehler.
-
openProjectProperties
public static Properties openProjectProperties(File projectDir) throws IOException
- Throws:
IOException
-
reloadAgent
public final void reloadAgent() throws SQLException
- Throws:
SQLException
-
reloadAgent
public final void reloadAgent(Connection c) throws SQLException
- Throws:
SQLException
-
reloadAgentLogo
public final void reloadAgentLogo() throws SQLException, IOException
- Throws:
SQLException
IOException
-
reloadAgentLogo
public final void reloadAgentLogo(Connection c) throws IOException
- Throws:
IOException
-
reloadPlugins
public final void reloadPlugins() throws SQLException
- Throws:
SQLException
-
reloadPlugins
public final void reloadPlugins(Connection c) throws SQLException
- Throws:
SQLException
-
save
public final void save() throws IOException
Projekt-Konfiguration speichern.- Throws:
IOException
- IO-Fehler
-
saveAgent
public final void saveAgent() throws SQLException
- Throws:
SQLException
-
saveAgentLogo
public final void saveAgentLogo(BufferedImage image) throws SQLException, IOException
- Throws:
SQLException
IOException
-
setDirectory
public void setDirectory(File directory)
-
setProperties
protected void setProperties(Properties props)
-
unload
public void unload() throws IOException
- Throws:
IOException
-
-