Source Code Cross Referenced for Repository.java in  » Content-Management-System » apache-lenya-2.0 » org » apache » cocoon » components » repository » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Content Management System » apache lenya 2.0 » org.apache.cocoon.components.repository 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Licensed to the Apache Software Foundation (ASF) under one or more
003:         * contributor license agreements.  See the NOTICE file distributed with
004:         * this work for additional information regarding copyright ownership.
005:         * The ASF licenses this file to You under the Apache License, Version 2.0
006:         * (the "License"); you may not use this file except in compliance with
007:         * the License.  You may obtain a copy of the License at
008:         * 
009:         *      http://www.apache.org/licenses/LICENSE-2.0
010:         * 
011:         * Unless required by applicable law or agreed to in writing, software
012:         * distributed under the License is distributed on an "AS IS" BASIS,
013:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014:         * See the License for the specific language governing permissions and
015:         * limitations under the License.
016:         */
017:        package org.apache.cocoon.components.repository;
018:
019:        import java.io.InputStream;
020:
021:        import org.apache.cocoon.ProcessingException;
022:        import org.apache.cocoon.components.repository.helpers.CredentialsToken;
023:        import org.apache.cocoon.components.repository.helpers.RepositoryTransactionHelper;
024:        import org.apache.cocoon.components.repository.helpers.RepositoryPropertyHelper;
025:        import org.apache.cocoon.components.repository.helpers.RepositoryVersioningHelper;
026:        import org.apache.excalibur.source.Source;
027:        import org.w3c.dom.Document;
028:        import org.w3c.dom.Node;
029:
030:        /**
031:         * A repository interface intended to be used by flowscripts or corresponding wrapper components.
032:         */
033:        public interface Repository {
034:
035:            /**
036:             * get content as String
037:             * 
038:             * @param uri  the uri of the resource.
039:             * @return  the content as a String.
040:             * @throws ProcessingException
041:             */
042:            String getContentString(String uri) throws ProcessingException;
043:
044:            /**
045:             * get content as Stream
046:             * 
047:             * @param uri  the uri of the resource.
048:             * @return  the content as a InputStream.
049:             * @throws ProcessingException
050:             */
051:            InputStream getContentStream(String uri) throws ProcessingException;
052:
053:            /**
054:             * get content as DOM
055:             * 
056:             * @param uri  the uri of the resource.
057:             * @return  the content as a W3C Document object.
058:             * @throws ProcessingException
059:             */
060:            Document getContentDOM(String uri) throws ProcessingException;
061:
062:            /**
063:             * save content
064:             * 
065:             * @param uri  the uri of the resource.
066:             * @param content  the to be saved content given as a String.
067:             * @return  a boolean indicating success.
068:             * @throws ProcessingException
069:             */
070:            boolean saveContent(String uri, String content)
071:                    throws ProcessingException;
072:
073:            /**
074:             * save content
075:             * 
076:             * @param uri  the uri of the resource.
077:             * @param node  the to be saved content given as a W3C Node object.
078:             * @return  a boolean indicating success.
079:             * @throws ProcessingException
080:             */
081:            boolean saveContent(String uri, Node node)
082:                    throws ProcessingException;
083:
084:            /**
085:             * save content
086:             * 
087:             * @param uri  the uri of the resource.
088:             * @param source  the to be saved content given as a Excalibur Source object.
089:             * @return  a boolean indicating success.
090:             * @throws ProcessingException
091:             */
092:            boolean saveContent(String uri, Source source)
093:                    throws ProcessingException;
094:
095:            /**
096:             * create a new resource
097:             * 
098:             * @param uri  the uri of the resource.
099:             * @param content  the content to initialize the resource with.
100:             * @return  a boolean indicating success.
101:             * @throws ProcessingException
102:             */
103:            boolean createResource(String uri, String content)
104:                    throws ProcessingException;
105:
106:            /**
107:             * copy a resource
108:             * 
109:             * @param uri  the uri of the resource.
110:             * @param dest  the destination of the copy.
111:             * @param recurse  if true recursively creates parent collections if not existant
112:             * @param overwrite  whether to overwrite the destination if it exists.
113:             * @return  a boolean indicating success.
114:             * @throws ProcessingException
115:             */
116:            boolean copy(String uri, String dest, boolean recurse,
117:                    boolean overwrite) throws ProcessingException;
118:
119:            /**
120:             * move a resource
121:             * 
122:             * @param uri  the uri of the resource.
123:             * @param dest  the destination of the move.
124:             * @param recurse  if true recursively creates parent collections if not existant
125:             * @param overwrite  whether to overwrite the destination if it exists.
126:             * @return  a boolean indicating success.
127:             * @throws ProcessingException
128:             */
129:            boolean move(String uri, String dest, boolean recurse,
130:                    boolean overwrite) throws ProcessingException;
131:
132:            /**
133:             * remove resource
134:             * 
135:             * @param uri  the uri of the resource.
136:             * @return  a boolean indicating success.
137:             * @throws ProcessingException
138:             */
139:            boolean remove(String uri) throws ProcessingException;
140:
141:            /**
142:             * checks wether resource exists
143:             * 
144:             * @param uri  the uri of the document.
145:             * @return  a boolean indicating existance of the resource.
146:             * @throws ProcessingException
147:             */
148:            public boolean exists(String uri) throws ProcessingException;
149:
150:            /**
151:             * make collection
152:             * 
153:             * @param uri  the uri of the collection.
154:             * @param recursive  a boolean indicating wether
155:             *        the operation should fail if the parent
156:             *        collection does not exist or wether the
157:             *        complete path should be created. 
158:             * @return  a boolean indicating success.
159:             * @throws ProcessingException
160:             */
161:            boolean makeCollection(String uri, boolean recursive)
162:                    throws ProcessingException;
163:
164:            /**
165:             * get a property helper
166:             * 
167:             * @return  the property helper.
168:             *          Returns null if the Repository does not support properties.
169:             */
170:            RepositoryPropertyHelper getPropertyHelper();
171:
172:            /**
173:             * get a transaction helper
174:             * 
175:             * @return  a transaction helper.
176:             *          Returns null if the Repository does neither support transactions nor locks.
177:             */
178:            RepositoryTransactionHelper getTransactionHelper();
179:
180:            /**
181:             * get a versioning helper
182:             * 
183:             * @return  a versioning helper.
184:             *          Returns null if the Repository does not support versioning.
185:             */
186:            RepositoryVersioningHelper getVersioningHelper();
187:
188:            /**
189:             * get the credentials used against the repository
190:             * 
191:             * @return  the credentials in use.
192:             */
193:            CredentialsToken getCredentials();
194:
195:            /**
196:             * set the credentials to be used against the repository
197:             * 
198:             * @param credentials  the credentials to use.
199:             */
200:            void setCredentials(CredentialsToken credentials);
201:
202:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.