1 16 package org.apache.cocoon.components.repository; 17 18 import java.io.InputStream ; 19 20 import org.apache.cocoon.ProcessingException; 21 import org.apache.cocoon.components.repository.helpers.CredentialsToken; 22 import org.apache.cocoon.components.repository.helpers.RepositoryTransactionHelper; 23 import org.apache.cocoon.components.repository.helpers.RepositoryPropertyHelper; 24 import org.apache.cocoon.components.repository.helpers.RepositoryVersioningHelper; 25 import org.apache.excalibur.source.Source; 26 import org.w3c.dom.Document ; 27 import org.w3c.dom.Node ; 28 29 30 33 public interface Repository { 34 35 42 String getContentString(String uri) throws ProcessingException; 43 44 51 InputStream getContentStream(String uri) throws ProcessingException; 52 53 60 Document getContentDOM(String uri) throws ProcessingException; 61 62 70 boolean saveContent(String uri, String content) throws ProcessingException; 71 72 80 boolean saveContent(String uri, Node node) throws ProcessingException; 81 82 90 boolean saveContent(String uri, Source source) throws ProcessingException; 91 92 100 boolean createResource(String uri, String content) throws ProcessingException; 101 102 112 boolean copy(String uri, String dest, boolean recurse, boolean overwrite) throws ProcessingException; 113 114 124 boolean move(String uri, String dest, boolean recurse, boolean overwrite) throws ProcessingException; 125 126 133 boolean remove(String uri) throws ProcessingException; 134 135 142 public boolean exists(String uri) throws ProcessingException; 143 144 155 boolean makeCollection(String uri, boolean recursive) throws ProcessingException; 156 157 163 RepositoryPropertyHelper getPropertyHelper(); 164 165 171 RepositoryTransactionHelper getTransactionHelper(); 172 173 179 RepositoryVersioningHelper getVersioningHelper(); 180 181 186 CredentialsToken getCredentials(); 187 188 193 void setCredentials(CredentialsToken credentials); 194 195 } | Popular Tags |