01: /******************************************************************************
02: * JBoss, a division of Red Hat *
03: * Copyright 2006, Red Hat Middleware, LLC, and individual *
04: * contributors as indicated by the @authors tag. See the *
05: * copyright.txt in the distribution for a full listing of *
06: * individual contributors. *
07: * *
08: * This is free software; you can redistribute it and/or modify it *
09: * under the terms of the GNU Lesser General Public License as *
10: * published by the Free Software Foundation; either version 2.1 of *
11: * the License, or (at your option) any later version. *
12: * *
13: * This software is distributed in the hope that it will be useful, *
14: * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
16: * Lesser General Public License for more details. *
17: * *
18: * You should have received a copy of the GNU Lesser General Public *
19: * License along with this software; if not, write to the Free *
20: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
21: * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
22: ******************************************************************************/package org.jboss.portal.cms;
23:
24: import org.jboss.portal.cms.model.Content;
25: import org.jboss.portal.cms.model.File;
26: import org.jboss.portal.cms.model.Folder;
27: import org.jboss.portal.search.impl.jcr.JCRQuery;
28:
29: import java.io.InputStream;
30: import java.util.List;
31: import java.util.Locale;
32:
33: /**
34: * Factory to create commands for the cms service.
35: *
36: * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
37: * @version $Revision: 8332 $
38: */
39: public interface CommandFactory {
40: Command createNewFileCommand(File sFile, Content content);
41:
42: Command createUpdateFileCommand(File sFile, Content content,
43: boolean makeLive);
44:
45: Command createCopyCommand(String sFromPath, String sToPath);
46:
47: Command createMoveCommand(String sFromPath, String sToPath);
48:
49: Command createRenameCommand(String sPath, String sNewName);
50:
51: Command createDeleteCommand(String sPath);
52:
53: Command createFileSaveCommand(File file);
54:
55: Command createFileGetCommand(String sFilePath, Locale locale);
56:
57: Command createFileGetCommand(String sFilePath,
58: String sVersionNumber, Locale locale);
59:
60: Command createFileUpdateCommand(File file);
61:
62: Command createFolderSaveCommand(Folder folder);
63:
64: Command createFolderGetCommand(String sFolderPath);
65:
66: Command createFolderUpdateCommand(Folder folder);
67:
68: Command createContentGetVersionsCommand(String sFilePath);
69:
70: Command createFolderGetListCommand(String sFolderPath);
71:
72: Command createContentCreateNewVersionCommand(Content content,
73: boolean bMakeLive);
74:
75: Command createContentCreateNewVersionCommand(List contents,
76: boolean bMakeLive);
77:
78: Command createStoreArchiveCommand(String sRootPath, InputStream is,
79: String sLanguage);
80:
81: Command createItemExistsCommand(String sPath);
82:
83: Command createContentSaveCommand(File file);
84:
85: Command createContentGetCommand(String sFilePath,
86: String sVersionNumber, Locale locale);
87:
88: Command createFileGetListCommand(String sFilePath);
89:
90: Command createGetArchiveCommand(String sRootPath, String sLanguage);
91:
92: Command createSearchCommand(JCRQuery query);
93:
94: Command createMakeLiveVersionCommand(String filePath,
95: String language, String version);
96: }
|