mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Update dependencies (#191)
surf-webscripts 7.0 alfresco-core 7.10 alfresco-data-model 8.30 alfresco-repository 7.58
This commit is contained in:
8
pom.xml
8
pom.xml
@@ -35,13 +35,13 @@
|
||||
<dir.root>${project.build.directory}/alf_data</dir.root>
|
||||
<img.exe>convert</img.exe>
|
||||
|
||||
<dependency.alfresco-repository.version>7.57</dependency.alfresco-repository.version>
|
||||
<dependency.alfresco-core.version>7.9</dependency.alfresco-core.version>
|
||||
<dependency.alfresco-data-model.version>8.29</dependency.alfresco-data-model.version>
|
||||
<dependency.alfresco-repository.version>7.58</dependency.alfresco-repository.version>
|
||||
<dependency.alfresco-core.version>7.10</dependency.alfresco-core.version>
|
||||
<dependency.alfresco-data-model.version>8.30</dependency.alfresco-data-model.version>
|
||||
<dependency.alfresco-pdf-renderer.version>1.1</dependency.alfresco-pdf-renderer.version>
|
||||
<dependency.jackson.version>2.9.8</dependency.jackson.version>
|
||||
|
||||
<dependency.webscripts.version>6.21</dependency.webscripts.version>
|
||||
<dependency.webscripts.version>7.0</dependency.webscripts.version>
|
||||
<dependency.opencmis.version>1.0.0</dependency.opencmis.version>
|
||||
<dependency.spring.version>5.1.6.RELEASE</dependency.spring.version>
|
||||
<dependency.postgresql.version>42.2.5</dependency.postgresql.version>
|
||||
|
@@ -1,58 +0,0 @@
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Remote API
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2016 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* Alfresco is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Alfresco 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.repo.utils;
|
||||
|
||||
import javax.faces.context.FacesContext;
|
||||
|
||||
import org.alfresco.repo.web.scripts.FileTypeImageUtils;
|
||||
import org.alfresco.service.cmr.repository.FileTypeImageSize;
|
||||
import org.alfresco.service.cmr.repository.TemplateImageResolver;
|
||||
|
||||
/**
|
||||
* Default implementation of {@link TemplateImageResolver} interface, based on {@link FileTypeImageUtils} utility. It relies on availability of {@link FacesContext} instance
|
||||
*
|
||||
* @author Dmitry Velichkevich
|
||||
*/
|
||||
public class FacesImageResolver implements TemplateImageResolver
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.service.cmr.repository.TemplateImageResolver#resolveImagePathForName(java.lang.String, org.alfresco.service.cmr.repository.FileTypeImageSize)
|
||||
*/
|
||||
@Override
|
||||
public String resolveImagePathForName(String filename, FileTypeImageSize size)
|
||||
{
|
||||
if (FacesContext.getCurrentInstance() != null)
|
||||
{
|
||||
return FileTypeImageUtils.getFileTypeImage(FacesContext.getCurrentInstance(), filename, size);
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,34 +1,33 @@
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Remote API
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2016 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* Alfresco is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Alfresco 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
* #L%
|
||||
*/
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Remote API
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2016 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* Alfresco is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Alfresco 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.repo.web.scripts;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.faces.context.FacesContext;
|
||||
import javax.servlet.ServletContext;
|
||||
|
||||
import org.alfresco.api.AlfrescoPublicApi;
|
||||
@@ -52,49 +51,7 @@ public class FileTypeImageUtils
|
||||
private static final String DEFAULT_FILE_IMAGE64 = IMAGE_PREFIX64 + "_default" + IMAGE_POSTFIX_PNG;
|
||||
|
||||
private static final Map<String, String> s_fileExtensionMap = new HashMap<String, String>(89, 1.0f);
|
||||
|
||||
/**
|
||||
* Return the image path to the filetype icon for the specified file name string
|
||||
*
|
||||
* @param name File name to build filetype icon path for
|
||||
* @param small True for the small 16x16 icon or false for the large 32x32
|
||||
*
|
||||
* @return the image path for the specified node type or the default icon if not found
|
||||
*/
|
||||
public static String getFileTypeImage(String name, boolean small)
|
||||
{
|
||||
return getFileTypeImage(FacesContext.getCurrentInstance(), null, name,
|
||||
(small ? FileTypeImageSize.Small : FileTypeImageSize.Medium));
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the image path to the filetype icon for the specified file name string
|
||||
*
|
||||
* @param fc FacesContext
|
||||
* @param name File name to build filetype icon path for
|
||||
* @param small True for the small 16x16 icon or false for the large 32x32
|
||||
*
|
||||
* @return the image path for the specified node type or the default icon if not found
|
||||
*/
|
||||
public static String getFileTypeImage(FacesContext fc, String name, boolean small)
|
||||
{
|
||||
return getFileTypeImage(fc, null, name, (small ? FileTypeImageSize.Small : FileTypeImageSize.Medium));
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the image path to the filetype icon for the specified file name string
|
||||
*
|
||||
* @param fc FacesContext
|
||||
* @param name File name to build filetype icon path for
|
||||
* @param size Size of the icon to return
|
||||
*
|
||||
* @return the image path for the specified node type or the default icon if not found
|
||||
*/
|
||||
public static String getFileTypeImage(FacesContext fc, String name, FileTypeImageSize size)
|
||||
{
|
||||
return getFileTypeImage(fc, null, name, size);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return the image path to the filetype icon for the specified file name string
|
||||
*
|
||||
@@ -106,7 +63,7 @@ public class FileTypeImageUtils
|
||||
*/
|
||||
public static String getFileTypeImage(ServletContext sc, String name, boolean small)
|
||||
{
|
||||
return getFileTypeImage(null, sc, name, (small ? FileTypeImageSize.Small : FileTypeImageSize.Medium));
|
||||
return getFileTypeImage(sc, name, (small ? FileTypeImageSize.Small : FileTypeImageSize.Medium));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -119,11 +76,6 @@ public class FileTypeImageUtils
|
||||
* @return the image path for the specified node type or the default icon if not found
|
||||
*/
|
||||
public static String getFileTypeImage(ServletContext sc, String name, FileTypeImageSize size)
|
||||
{
|
||||
return getFileTypeImage(null, sc, name, size);
|
||||
}
|
||||
|
||||
private static String getFileTypeImage(FacesContext fc, ServletContext sc, String name, FileTypeImageSize size)
|
||||
{
|
||||
String image = null;
|
||||
String defaultImage = null;
|
||||
@@ -161,15 +113,14 @@ public class FileTypeImageUtils
|
||||
}
|
||||
|
||||
// does this image exist on the web-server?
|
||||
if ((fc != null && fc.getExternalContext().getResourceAsStream(image) != null) ||
|
||||
(sc != null && sc.getResourceAsStream(image) != null))
|
||||
if (sc != null && sc.getResourceAsStream(image) != null)
|
||||
{
|
||||
// found the image for this extension - save it for later
|
||||
s_fileExtensionMap.put(key, image);
|
||||
}
|
||||
else if ((fc == null) && (sc == null))
|
||||
else if (sc == null)
|
||||
{
|
||||
// we have neither FacesContext nor ServerContext so return the default image but don't cache it
|
||||
// we have no ServerContext so return the default image but don't cache it
|
||||
image = defaultImage;
|
||||
}
|
||||
else
|
||||
@@ -184,5 +135,4 @@ public class FileTypeImageUtils
|
||||
|
||||
return (image != null ? image : defaultImage);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -80,8 +80,6 @@
|
||||
<property name="eventPublisher" ref="eventPublisher" />
|
||||
</bean>
|
||||
|
||||
<bean id="defaultImageResolver" class="org.alfresco.repo.utils.FacesImageResolver" />
|
||||
|
||||
<bean id="webDAVHelper" class="org.alfresco.repo.webdav.WebDAVHelper" parent="baseWebDAVHelper" />
|
||||
|
||||
<!-- Content Streamer -->
|
||||
|
@@ -7,7 +7,6 @@
|
||||
<url>/search/keyword.atom?q={searchTerms}&p={startPage?}&c={count?}&l={language?}</url>
|
||||
<url>/api/search/keyword.rss?q={searchTerms}&p={startPage?}&c={count?}&l={language?}</url>
|
||||
<url>/search/keyword.rss?q={searchTerms}&p={startPage?}&c={count?}&l={language?}</url>
|
||||
<url>/api/search/keyword.portlet?q={searchTerms}&p={startPage?}&c={count?}&l={language?}</url>
|
||||
<authentication>guest</authentication>
|
||||
<transaction allow="readonly">required</transaction>
|
||||
<lifecycle>limited_support</lifecycle>
|
||||
|
@@ -7,7 +7,6 @@
|
||||
<url>/search/person.atom?q={searchTerms}&p={startPage?}&c={count?}&l={language?}</url>
|
||||
<url>/api/search/person.rss?q={searchTerms}&p={startPage?}&c={count?}&l={language?}</url>
|
||||
<url>/search/person.rss?q={searchTerms}&p={startPage?}&c={count?}&l={language?}</url>
|
||||
<url>/api/search/person.portlet?q={searchTerms}&p={startPage?}&c={count?}&l={language?}</url>
|
||||
<authentication>guest</authentication>
|
||||
<transaction allow="readonly">required</transaction>
|
||||
<lifecycle>limited_support</lifecycle>
|
||||
|
@@ -132,12 +132,6 @@ public class PersonSearchTest extends BaseWebScriptTest
|
||||
sendRequest(new GetRequest("/api/search/person?"), Status.STATUS_INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
|
||||
public void testPortletSearch() throws Exception
|
||||
{
|
||||
Response response = sendRequest(new GetRequest("/api/search/person.portlet?q=*"), Status.STATUS_OK);
|
||||
logger.debug(response.getContentAsString());
|
||||
}
|
||||
|
||||
public void testAtomSearch() throws Exception
|
||||
{
|
||||
Response response = sendRequest(new GetRequest("/api/search/person.atom?q=*"), Status.STATUS_OK);
|
||||
|
Reference in New Issue
Block a user