org.mmbase.applications.packaging
Class ProjectManager

java.lang.Object
  extended byorg.mmbase.applications.packaging.ProjectManager

public class ProjectManager
extends java.lang.Object

project manager, keeps track of projects we are working on, Projects are not a MMBase defined object they are more like projects inside a IDE containers to keep track of the different projects you are working on.

Since:
MMBase-1.7
Author:
Daniel Ockeloen

Field Summary
static java.lang.String DTD_CREATORS_1_0
           
static java.lang.String DTD_PROJECTS_1_0
           
static java.lang.String PUBLIC_ID_CREATORS_1_0
           
static java.lang.String PUBLIC_ID_PROJECTS_1_0
           
 
Constructor Summary
ProjectManager()
           
 
Method Summary
static boolean addProject(java.lang.String name, java.lang.String path)
          add a new project to the projectlist (xml file) changes both the memory list and the file on disc.
static boolean changeProjectSettings(java.lang.String oldname, java.lang.String newname, java.lang.String newpath)
          change project name/path (xml file) changes both the memory list and the file on disc.
static boolean deleteProject(java.lang.String name)
          delete a project to the projectlist (xml file) changes both the memory list and the file on disc.
static CreatorInterface getCreatorByType(java.lang.String type)
          get a creator based on its mimetype
static java.util.Map getCreators()
          get all the defined creators we can use (xml file)
static Project getProject(java.lang.String name)
          get a Project based on its name
static java.util.Iterator getProjects()
          get all the projects we have defined (xml file)
static void init()
          start this manager, it reads all the defined creators and projects
static boolean isRunning()
          is this manager running ?
static void readCreators()
          read the Creators from disc, the file is defined in your config directory.
static void readProjects()
          read the Projects from disc, the file is defined in your config directory.
static boolean save()
          save/sync the projects file to disk.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DTD_PROJECTS_1_0

public static final java.lang.String DTD_PROJECTS_1_0
See Also:
Constant Field Values

DTD_CREATORS_1_0

public static final java.lang.String DTD_CREATORS_1_0
See Also:
Constant Field Values

PUBLIC_ID_PROJECTS_1_0

public static final java.lang.String PUBLIC_ID_PROJECTS_1_0
See Also:
Constant Field Values

PUBLIC_ID_CREATORS_1_0

public static final java.lang.String PUBLIC_ID_CREATORS_1_0
See Also:
Constant Field Values
Constructor Detail

ProjectManager

public ProjectManager()
Method Detail

init

public static void init()
start this manager, it reads all the defined creators and projects


isRunning

public static boolean isRunning()
is this manager running ?

Returns:
true if running, false if its not

getProjects

public static java.util.Iterator getProjects()
get all the projects we have defined (xml file)

Returns:
projects

getProject

public static Project getProject(java.lang.String name)
get a Project based on its name

Returns:
Project or null if not found

addProject

public static boolean addProject(java.lang.String name,
                                 java.lang.String path)
add a new project to the projectlist (xml file) changes both the memory list and the file on disc.

Returns:
true if the add worked, false if something went wrong

changeProjectSettings

public static boolean changeProjectSettings(java.lang.String oldname,
                                            java.lang.String newname,
                                            java.lang.String newpath)
change project name/path (xml file) changes both the memory list and the file on disc.

Returns:
true if the change worked, false if something went wrong

deleteProject

public static boolean deleteProject(java.lang.String name)
delete a project to the projectlist (xml file) changes both the memory list and the file on disc.

Returns:
true if the delete worked, false if something went wrong

readProjects

public static void readProjects()
read the Projects from disc, the file is defined in your config directory. Uses a xml reader and the dtd's found as resources.


readCreators

public static void readCreators()
read the Creators from disc, the file is defined in your config directory. Uses a xml reader and the dtd's found as resources.


getCreators

public static java.util.Map getCreators()
get all the defined creators we can use (xml file)

Returns:
creators

getCreatorByType

public static CreatorInterface getCreatorByType(java.lang.String type)
get a creator based on its mimetype

Returns:
creator or null if non is found for the asked mimetype

save

public static boolean save()
save/sync the projects file to disk.

Returns:
true if file saved/synced, false if something went wrong


packaging build MMBase-1_8_3