Fisheye: Tag 9d017688cf84d7a7c26203a3b0e13a5301b9c756 refers to a dead (removed) revision in file `lams_common/src/java/org/lamsfoundation/lams/contentrepository/ITicket.java'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_common/src/java/org/lamsfoundation/lams/contentrepository/client/IToolContentHandler.java =================================================================== diff -u -r46fe95e04d6fbe8fec9e41f054a711e23c1e064c -r9d017688cf84d7a7c26203a3b0e13a5301b9c756 --- lams_common/src/java/org/lamsfoundation/lams/contentrepository/client/IToolContentHandler.java (.../IToolContentHandler.java) (revision 46fe95e04d6fbe8fec9e41f054a711e23c1e064c) +++ lams_common/src/java/org/lamsfoundation/lams/contentrepository/client/IToolContentHandler.java (.../IToolContentHandler.java) (revision 9d017688cf84d7a7c26203a3b0e13a5301b9c756) @@ -26,15 +26,12 @@ import java.io.IOException; import java.io.InputStream; -import java.util.Set; -import org.lamsfoundation.lams.contentrepository.ITicket; import org.lamsfoundation.lams.contentrepository.NodeKey; import org.lamsfoundation.lams.contentrepository.exception.FileException; import org.lamsfoundation.lams.contentrepository.exception.InvalidParameterException; import org.lamsfoundation.lams.contentrepository.exception.ItemNotFoundException; import org.lamsfoundation.lams.contentrepository.exception.RepositoryCheckedException; -import org.lamsfoundation.lams.contentrepository.service.IRepositoryService; /** * IToolContentHandler defines the ContentHandler interface used by the tools. @@ -49,33 +46,6 @@ public interface IToolContentHandler { /** - * @return Returns the repositoryWorkspaceName. - */ - public abstract String getRepositoryWorkspaceName(); - - /** - * @return Returns the repositoryUser. - */ - public abstract String getRepositoryUser(); - - /** - * @return Returns the repository identification string. This is the - * "password" field the credential. - */ - public abstract char[] getRepositoryId(); - - /** - * Get the ticket to access the repository. If the workspace/credential - * hasn't been set up, then it will be set up automatically. - * - * @param forceLogin - * set to true if tried to do something and got access denied. This may happen - * if the repository loses the ticket. - * @return the repository ticket - */ - public abstract ITicket getTicket(boolean forceLogin) throws RepositoryCheckedException; - - /** * Save a file in the content repository. * * @param stream @@ -92,7 +62,7 @@ * @throws RepositoryCheckedException * Some other error occured. */ - public abstract NodeKey uploadFile(InputStream stream, String fileName, String mimeType) + public NodeKey uploadFile(InputStream stream, String fileName, String mimeType) throws RepositoryCheckedException, InvalidParameterException, RepositoryCheckedException; /** @@ -116,7 +86,7 @@ * @throws RepositoryCheckedException * Some other error occured. */ - public abstract NodeKey updateFile(Long uuid, InputStream stream, String fileName, String mimeType) + public NodeKey updateFile(Long uuid, InputStream stream, String fileName, String mimeType) throws RepositoryCheckedException, InvalidParameterException, RepositoryCheckedException; /** @@ -136,7 +106,7 @@ * @throws RepositoryCheckedException * Some other error occured. */ - public abstract NodeKey uploadPackage(String dirPath, String startFile) + public NodeKey uploadPackage(String dirPath, String startFile) throws RepositoryCheckedException, InvalidParameterException, RepositoryCheckedException; /** @@ -149,21 +119,9 @@ * @throws RepositoryCheckedException * Some other error occured. */ - public abstract void deleteFile(Long uuid) throws InvalidParameterException, RepositoryCheckedException; + public void deleteFile(Long uuid) throws InvalidParameterException, RepositoryCheckedException; /** - * Copy an entry in the content repository. - * - * @param uuid - * id of the file node. Mandatory - * @throws ItemNotFoundException - * Node to copy cannot be found - * @throws RepositoryCheckedException - * Some other error occured. - */ - public abstract NodeKey copyFile(Long uuid) throws ItemNotFoundException, RepositoryCheckedException; - - /** * Get the file, as an inputstream. * * @param uuid @@ -175,11 +133,9 @@ * @throws RepositoryCheckedException * Some other error occured. */ - public abstract InputStream getFileInputStream(Long uuid) + public InputStream getFileInputStream(Long uuid) throws ItemNotFoundException, FileException, RepositoryCheckedException; - public abstract IRepositoryService getRepositoryService(); - /** * Save content in repository into local file by given toFileName. * Fisheye: Tag 9d017688cf84d7a7c26203a3b0e13a5301b9c756 refers to a dead (removed) revision in file `lams_common/src/java/org/lamsfoundation/lams/contentrepository/client/ToolContentHandler.java'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 9d017688cf84d7a7c26203a3b0e13a5301b9c756 refers to a dead (removed) revision in file `lams_common/src/java/org/lamsfoundation/lams/contentrepository/service/IRepositoryService.java'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 46fe95e04d6fbe8fec9e41f054a711e23c1e064c refers to a dead (removed) revision in file `lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/ITicket.java'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/client/IToolContentFullHandler.java =================================================================== diff -u --- lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/client/IToolContentFullHandler.java (revision 0) +++ lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/client/IToolContentFullHandler.java (revision 9d017688cf84d7a7c26203a3b0e13a5301b9c756) @@ -0,0 +1,69 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + + +package org.lamsfoundation.lams.contentrepository.client; + +import org.lamsfoundation.lams.contentrepository.ITicket; +import org.lamsfoundation.lams.contentrepository.NodeKey; +import org.lamsfoundation.lams.contentrepository.exception.ItemNotFoundException; +import org.lamsfoundation.lams.contentrepository.exception.RepositoryCheckedException; +import org.lamsfoundation.lams.contentrepository.service.IRepositoryService; + +/** + * IToolContentHandler defines the ContentHandler interface used by the tools. + * This interface exists so that the ToolDownload servlet can get to the + * Repository via ToolContentHandler. It needs to call the tool's + * concrete class, which must be defined in the servlet's init parameters. + * + * @see org.lamsfoundation.lams.contentrepository.client.ToolContentHandler + * @see org.lamsfoundation.lams.contentrepository.client.Download + * @author Fiona Malikoff + */ +public interface IToolContentFullHandler extends IToolContentHandler { + + /** + * Get the ticket to access the repository. If the workspace/credential + * hasn't been set up, then it will be set up automatically. + * + * @param forceLogin + * set to true if tried to do something and got access denied. This may happen + * if the repository loses the ticket. + * @return the repository ticket + */ + public ITicket getTicket(boolean forceLogin) throws RepositoryCheckedException; + + /** + * Copy an entry in the content repository. + * + * @param uuid + * id of the file node. Mandatory + * @throws ItemNotFoundException + * Node to copy cannot be found + * @throws RepositoryCheckedException + * Some other error occured. + */ + public NodeKey copyFile(Long uuid) throws ItemNotFoundException, RepositoryCheckedException; + + public IRepositoryService getRepositoryService(); +} \ No newline at end of file Fisheye: Tag 46fe95e04d6fbe8fec9e41f054a711e23c1e064c refers to a dead (removed) revision in file `lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/client/ToolContentHandler.java'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/client/ToolDownload.java =================================================================== diff -u -rb67c428939ed96f08f56192d54b8ee55d8ab89d2 -r9d017688cf84d7a7c26203a3b0e13a5301b9c756 --- lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/client/ToolDownload.java (.../ToolDownload.java) (revision b67c428939ed96f08f56192d54b8ee55d8ab89d2) +++ lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/client/ToolDownload.java (.../ToolDownload.java) (revision 9d017688cf84d7a7c26203a3b0e13a5301b9c756) @@ -21,7 +21,6 @@ * **************************************************************** */ - package org.lamsfoundation.lams.contentrepository.client; import org.lamsfoundation.lams.contentrepository.ITicket; @@ -104,51 +103,38 @@ /** The name of the servlet parameter used to define the implementation bean name */ public final static String TOOL_CONTENT_HANDLER_BEAN_NAME = "toolContentHandlerBeanName"; - /* - * (non-Javadoc) - * - * @see org.lamsfoundation.lams.contentrepository.client.Download#getTicket() - */ @Override public ITicket getTicket() throws RepositoryCheckedException { - IToolContentHandler toolContentHandler = getToolContentHandler(); // make sure it is set up + IToolContentFullHandler toolContentHandler = getToolContentHandler(); // make sure it is set up return toolContentHandler != null ? toolContentHandler.getTicket(false) : null; } @Override public ITicket getTicket(String toolContentHandlerName) throws RepositoryCheckedException { - IToolContentHandler toolContentHandler = getToolContentHandler(toolContentHandlerName); // make sure it is set - // up + IToolContentFullHandler toolContentHandler = getToolContentHandler(toolContentHandlerName); // make sure it is set up return toolContentHandler != null ? toolContentHandler.getTicket(false) : null; } - /* - * (non-Javadoc) - * - * @see org.lamsfoundation.lams.contentrepository.client.Download#getRepositoryService() - */ @Override public IRepositoryService getRepositoryService() throws RepositoryCheckedException { - IToolContentHandler toolContentHandler = getToolContentHandler(); // make sure it is set up + IToolContentFullHandler toolContentHandler = getToolContentHandler(); // make sure it is set up return toolContentHandler != null ? toolContentHandler.getRepositoryService() : null; } - protected IToolContentHandler getToolContentHandler() { + protected IToolContentFullHandler getToolContentHandler() { + log.debug("ToolDownload servlet calling context and getting repository singleton."); - Download.log.debug("ToolDownload servlet calling context and getting repository singleton."); - String toolContentHandlerBeanName = getInitParameter(ToolDownload.TOOL_CONTENT_HANDLER_BEAN_NAME); if (toolContentHandlerBeanName == null) { - Download.log - .error("Accessing Download servlet but tool content handler bean has not been defined. Please define init parameter" + log.error("Accessing Download servlet but tool content handler bean has not been defined. Please define init parameter" + ToolDownload.TOOL_CONTENT_HANDLER_BEAN_NAME + "."); return null; } return getToolContentHandler(toolContentHandlerBeanName); } - protected IToolContentHandler getToolContentHandler(String toolContentHandlerName) { + protected IToolContentFullHandler getToolContentHandler(String toolContentHandlerName) { WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(getServletContext()); - return (IToolContentHandler) wac.getBean(toolContentHandlerName); + return (IToolContentFullHandler) wac.getBean(toolContentHandlerName); } } \ No newline at end of file Fisheye: Tag 46fe95e04d6fbe8fec9e41f054a711e23c1e064c refers to a dead (removed) revision in file `lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/service/IRepositoryService.java'. Fisheye: No comparison available. Pass `N' to diff?