KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > info > magnolia > module > admininterface > SaveHandler


1 /**
2  *
3  * Magnolia and its source-code is licensed under the LGPL.
4  * You may copy, adapt, and redistribute this file for commercial or non-commercial use.
5  * When copying, adapting, or redistributing this document in keeping with the guidelines above,
6  * you are required to provide proper attribution to obinary.
7  * If you reproduce or distribute the document without making any substantive modifications to its content,
8  * please use the following attribution line:
9  *
10  * Copyright 1993-2005 obinary Ltd. (http://www.obinary.com) All rights reserved.
11  *
12  */

13 package info.magnolia.module.admininterface;
14
15 import info.magnolia.cms.beans.runtime.MultipartForm;
16 import info.magnolia.cms.core.ItemType;
17
18
19 /**
20  * This class handels the saving in the dialogs.
21  * @author Philipp Bracher
22  * @version $Revision: 6341 $ ($Author: philipp $)
23  */

24 public interface SaveHandler {
25
26     /**
27      * Initialize this SaveHandler
28      */

29     public void init(MultipartForm form);
30
31     /**
32      * Save the data passed by init. Returns true if the save method succeeded
33      */

34     public abstract boolean save();
35
36     /**
37      * True if a not existing path should get created during the save process
38      * @return boolean
39      */

40     public abstract boolean isCreate();
41
42     /**
43      * Set true if a not existing node should get created during the save process
44      * @param create
45      */

46     public abstract void setCreate(boolean create);
47
48     /**
49      * Defines the node type to create if isCreate is true
50      * @return the ItemType
51      */

52     public abstract ItemType getCreationItemType();
53
54     /**
55      * Defines the node type to create if isCreate is true
56      * @param creationItemType
57      */

58     public abstract void setCreationItemType(ItemType creationItemType);
59
60     /**
61      * @return Returns the nodeCollectionName.
62      */

63     public abstract String JavaDoc getNodeCollectionName();
64
65     /**
66      * @param nodeCollectionName The nodeCollectionName to set.
67      */

68     public abstract void setNodeCollectionName(String JavaDoc nodeCollectionName);
69
70     /**
71      * @return Returns the nodeName.
72      */

73     public abstract String JavaDoc getNodeName();
74
75     /**
76      * @param nodeName The nodeName to set.
77      */

78     public abstract void setNodeName(String JavaDoc nodeName);
79
80     /**
81      * @return Returns the paragraph.
82      */

83     public abstract String JavaDoc getParagraph();
84
85     /**
86      * @param paragraph The paragraph to set.
87      */

88     public abstract void setParagraph(String JavaDoc paragraph);
89
90     /**
91      * @return Returns the path.
92      */

93     public abstract String JavaDoc getPath();
94
95     /**
96      * @param path The path to set.
97      */

98     public abstract void setPath(String JavaDoc path);
99
100     /**
101      * set the name of the repository saving to
102      * @param repository the name of the repository
103      */

104     public void setRepository(String JavaDoc repository);
105
106     /**
107      * get the name of thre repository saving to
108      * @return name
109      */

110     public String JavaDoc getRepository();
111
112 }
Popular Tags