Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LPS-33017 #121

Closed
wants to merge 102 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
e7560f3
Test Fixes - portlet/wikidisplay
brianwulbern Feb 5, 2013
0c39ded
Test Fixes - portlet/wikidisplay
rsrisamang Feb 8, 2013
a4e6f3c
Test Fixes - portlet/wikidisplay
rsrisamang Feb 12, 2013
bda4a2d
LPS-32990 Wrong message for the container name in search results
ealonso Feb 13, 2013
22817f1
Lang keys
brianchandotcom Feb 13, 2013
2cc4dca
LPS-31833 Fix bug with custom sql
ealonso Feb 13, 2013
051ae48
LPS-30124
LeventeHudak Jan 29, 2013
18fb730
LPS-30124 source formatting
juliocamarero Feb 13, 2013
16e9956
LPS-30124 Source formatting
brianchandotcom Feb 13, 2013
5cf6af6
SourceFormatter - check for incorrect tabs after opening curly brace
hhuijser Feb 13, 2013
0cc6324
Source formatting
hhuijser Feb 13, 2013
4d0679f
LPS-29544 - typo on destroyEntry method
Feb 7, 2013
e144629
LPS-32720 Support export/import of scope settings from remote staging
Feb 13, 2013
b834f0a
LPS-32720 Source formatting
brianchandotcom Feb 13, 2013
f9eeb9b
Test Fixes - asset/assetpublisher
brianchiu Feb 12, 2013
0b4a24c
LPS-32606
tschuhler Feb 8, 2013
a0ca0ee
LPS-32606 Test Formatting
rsrisamang Feb 12, 2013
cc405f8
LPS-29503 Javadocs
Feb 10, 2013
dcb0cbc
LPS-29503 Edit Javadoc
Feb 12, 2013
bd6a29b
LPS-29503 Regenerate
brianchandotcom Feb 13, 2013
06d4667
LPS-32480 Source formatting
Feb 7, 2013
7a61096
LPS-32151 Test
ealonso Feb 13, 2013
fdb71aa
LPS-32151 Source formatting
brianchandotcom Feb 13, 2013
f017681
LPS-32944 Asset Publisher's filter categories doesn't work WITH a cat…
Feb 12, 2013
734b116
LPS-32944 Source formatting
Feb 12, 2013
c6f6e44
LPS-32879 Added title attributes
ericchin Feb 12, 2013
6b8d95f
LPS-32879 source formatting - keep the tag "search" since the taglib …
juliocamarero Feb 13, 2013
f119d47
LPS-32879 Source formatting
brianchandotcom Feb 13, 2013
3d01788
LPS-32881 Added focused attribute to 'access from desktop' dialog
ericchin Feb 13, 2013
1bd4c17
LPS-32881 we need to do the focus manually because the dialog compone…
juliocamarero Feb 13, 2013
dc0c2ac
LPS-32960 Team Permissions in Site Memberships does not display site …
Feb 12, 2013
3759ac4
LPS-32617 Assign User Roles in Site Memberships displays organization…
Feb 12, 2013
5964462
LPS-32966 Cannot edit a global web content from a web content display
Feb 12, 2013
9d017d0
LPS-30300 Support search in title and description in AssetEntryQuery
ealonso Feb 12, 2013
c231160
LPS-30300 source formatting - not needed
juliocamarero Feb 13, 2013
1c4260c
LPS-30300 Add cssClass param to app-view-entry-taglib
ealonso Feb 12, 2013
c6ff84b
LPS-30300 missing style
juliocamarero Feb 13, 2013
c78955e
LPS-30300 Support for show thumbnails in Assets
ealonso Feb 12, 2013
a43b507
LPS-30300 Source formatting
brianchandotcom Feb 14, 2013
e39299c
LPS-32182 Fix Typo
juanferrub Jan 22, 2013
ffad025
LPS-32182 New methods to update structure default values
juanferrub Feb 12, 2013
9ff1e4f
LPS-32182 Add refererPortletName and custom action for journal
juanferrub Feb 12, 2013
6f00849
LPS-32182 Regenerate
juanferrub Feb 12, 2013
90b69ea
LPS-32182 Add Javadocs
juanferrub Feb 12, 2013
d661976
LPS-32182 Source formatting, remove JavaDocs, they are not in complet…
brianchandotcom Feb 14, 2013
3e39c4c
LPS-32949 Add interpreters for ActivitySets
matthewkong Feb 13, 2013
2354976
LPS-32949 Autogenerated
matthewkong Feb 13, 2013
d97c64e
LPS-32949 Source formatting
brianchandotcom Feb 14, 2013
14797b2
LPS-32742 Fundamentals to make our web services able to work in the n…
Feb 8, 2013
27410e3
LPS-32742 Handling static resources in the new web applications which…
Feb 8, 2013
1f7af08
LPS-32742 Source formatting
brianchandotcom Feb 14, 2013
dfedb7e
LPS-32110 Fix "test-sample-sql".
tinatian Feb 14, 2013
9174ee0
Revert "LPS-32110 Fix "test-sample-sql"."
brianchandotcom Feb 14, 2013
7cc5955
LPS-32110 Better fix?
brianchandotcom Feb 14, 2013
c1a8968
LPS-32182 Add Javadocs
juanferrub Feb 12, 2013
552fb86
LPS-32182 Re-add Javadoc for update methods
Feb 14, 2013
791e9f6
LPS-32182 Autogenerated
Feb 14, 2013
a24ef53
LPS-30768
Feb 6, 2013
0f546fb
LPS-30768 - Source Formatting
Feb 7, 2013
618d97b
LPS-30768 - Source formatting
natecavanaugh Feb 14, 2013
e7ed670
LPS-32392 Wording of documents and media search button is truncated i…
Jan 21, 2013
cac971a
LPS-32392 - Source formatting
natecavanaugh Feb 14, 2013
3dca378
LPS-32529 Properly escape Asset Category description in Search Portle…
Jan 23, 2013
d3e9f2a
LPS-32529 - Escape Asset Category description on enumerating terms
ipeychev Jan 28, 2013
993854b
LPS-32529 Prevent XSS in Search Portlet Facets
Jan 28, 2013
6e63056
LPS-32529 Escape on the JS side and add parameter for html input not …
Feb 7, 2013
2aea742
LPS-32529 - Source formatting
natecavanaugh Feb 14, 2013
150594a
LPS-31500 HTML fields data in DDMStructures are not being stored when…
Feb 8, 2013
2116b4c
LPS-32844 Apply same small image pattern from DDM Templates to Journa…
juanferrub Feb 6, 2013
153b3fd
LPS-32844 avoid using tables
juliocamarero Feb 6, 2013
408b3eb
LPS-32844 Remove table
juanferrub Feb 7, 2013
e8561f4
LPS-32844 - Source formatting
natecavanaugh Feb 14, 2013
8678504
LPS-32777 added initial discovery json document for our JSON web serv…
igr Feb 8, 2013
46657d2
LPS-32777 add support for plugins
igr Feb 8, 2013
7f1c22d
LPS-32777 fix for objects
igr Feb 8, 2013
7ca0890
LPS-32777 better name for service attributes, match google
igr Feb 8, 2013
6faa156
LPS-32777 Source formatting
hhuijser Feb 8, 2013
cf7b6fc
LPS-32777 Will use comma by default
hhuijser Feb 8, 2013
25e9568
LPS-32777 Fix size of stringbundler
hhuijser Feb 8, 2013
ae8687f
LPS-32777 Source formatting - no change
rotty3000 Feb 13, 2013
c411079
LPS-32777 Source formatting
brianchandotcom Feb 14, 2013
95f681c
LPS-32777 Rename to *Discover*
brianchandotcom Feb 14, 2013
6bd2e2c
LPS-32110 Proper fix
brianchandotcom Feb 14, 2013
c746d96
LPS-32879 fix format source
juliocamarero Feb 14, 2013
98758aa
LPS-32999 JournalConverterUtil has a bad mapping from old types to ne…
Feb 14, 2013
42b258f
LPS-32879 source formatting
juliocamarero Feb 14, 2013
d9ee52d
LPS-32182 Source formatting
juanferrub Feb 14, 2013
811eba7
LPS-32973 There are some tests that are leaving unused data in the da…
mdelapenya Feb 13, 2013
bb3d99f
LPS-33011 PACL - Rule generation API
rotty3000 Feb 14, 2013
c5aed1a
LPS-33011 Source formatting
brianchandotcom Feb 14, 2013
a4abe40
LPS-33010 PACL - Expose methods to get specific checkers
rotty3000 Feb 14, 2013
019f241
LPS-33010 Source formatting
brianchandotcom Feb 14, 2013
127a9ef
LPS-33009 PACL - Read and track state by enum
rotty3000 Feb 14, 2013
38a72d8
LPS-33009 Order an enum like it's a class, see com.liferay.portal.ker…
brianchandotcom Feb 14, 2013
d6c5a7d
LPS-32884 Added title attribute to form field for basic search; for a…
Feb 13, 2013
8d2c5c8
LPS-32884 source formatting
juliocamarero Feb 14, 2013
8474292
LPS-32887 Added title attr to input field on DocLib; added title attr…
Feb 14, 2013
434676b
LPS-32887 source formatting - we can use the label this time, since w…
juliocamarero Feb 14, 2013
d0058be
LPS-33000 Export and import the hidden attribute of the mount folder …
Feb 14, 2013
fd4ae64
LPS-33000 Source formatting
brianchandotcom Feb 14, 2013
4362334
LPS-32887 Source formatting
brianchandotcom Feb 14, 2013
4095aed
LPS-33017 Revert LPS-31148
pure59 Feb 14, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
@@ -0,0 +1,81 @@
/**
* Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
*
* This library 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 2.1 of the License, or (at your option)
* any later version.
*
* This library 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.
*/

package com.liferay.httpservice.servlet;

import java.util.Dictionary;
import java.util.Enumeration;
import java.util.Hashtable;

import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;

import org.osgi.service.http.HttpContext;

/**
* @author Raymond Augé
* @author Miguel Pastor
*/
public class BundleServletConfig implements ServletConfig {

public BundleServletConfig(
ServletContext servletContext, String servletName,
Dictionary<String, String> initParameters, HttpContext httpContext) {

_servletContext = servletContext;
_servletName = servletName;
_initParameters = initParameters;

if (_initParameters == null) {
_initParameters = new Hashtable<String, String>();
}

_httpContext = httpContext;
}

public HttpContext getHttpContext() {
return _httpContext;
}

public String getInitParameter(String name) {
return _initParameters.get(name);
}

@SuppressWarnings("rawtypes")
public Enumeration getInitParameterNames() {
return _initParameters.keys();
}

public Dictionary<String, String> getInitParameters() {
return _initParameters;
}

public ServletContext getServletContext() {
return _servletContext;
}

public String getServletName() {
return _servletName;
}

public void setInitParameter(String name, String value) {
_initParameters.put(name, value);
}

private HttpContext _httpContext;
private Dictionary<String, String> _initParameters;
private ServletContext _servletContext;
private String _servletName;

}
@@ -0,0 +1,165 @@
/**
* Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
*
* This library 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 2.1 of the License, or (at your option)
* any later version.
*
* This library 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.
*/

package com.liferay.httpservice.servlet;

import com.liferay.portal.kernel.servlet.HttpHeaders;
import com.liferay.portal.kernel.servlet.ServletResponseUtil;
import com.liferay.portal.kernel.util.GetterUtil;
import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.util.PortalUtil;
import com.liferay.portal.webserver.WebServerServlet;

import java.io.IOException;
import java.io.UnsupportedEncodingException;

import java.net.URL;
import java.net.URLConnection;
import java.net.URLDecoder;

import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.osgi.service.http.HttpContext;

/**
* @author Raymond Augé
* @author Miguel Pastor
*/
public class ResourceServlet extends WebServerServlet {

@Override
public void init(ServletConfig servletConfig) {
_bundleServletConfig = (BundleServletConfig)servletConfig;

_httpContext = _bundleServletConfig.getHttpContext();

_alias = GetterUtil.getString(
_bundleServletConfig.getInitParameter("alias"));
_name = GetterUtil.getString(
_bundleServletConfig.getInitParameter("name"));
}

@Override
public void service(
HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {

try {
String requestURI = getRequestURI(request);

int aliasIndex = requestURI.indexOf(_alias);

if (aliasIndex == 0) {
requestURI = requestURI.substring(_alias.length());
}

if (Validator.isNotNull(_name)) {
requestURI = _name.concat(requestURI);
}

URL url = _httpContext.getResource(requestURI);

if (url == null) {
response.setStatus(HttpServletResponse.SC_NOT_FOUND);

return;
}

URLConnection urlConnection = url.openConnection();

long lastModified = urlConnection.getLastModified();

if (lastModified > 0) {
long ifModifiedSince = request.getDateHeader(
HttpHeaders.IF_MODIFIED_SINCE);

if ((ifModifiedSince > 0) &&
(ifModifiedSince == lastModified)) {

response.setContentLength(0);

response.setDateHeader(
HttpHeaders.LAST_MODIFIED, lastModified);

String ifNoneMatch = request.getHeader(
HttpHeaders.IF_NONE_MATCH);

if (Validator.isNotNull(ifNoneMatch) &&
!ifNoneMatch.equals('0')) {

response.setHeader(HttpHeaders.ETAG, ifNoneMatch);
}

response.setStatus(HttpServletResponse.SC_NOT_MODIFIED);

return;
}
}

if (lastModified > 0) {
response.setDateHeader(HttpHeaders.LAST_MODIFIED, lastModified);
}

String fileName = getRequestURI(request);

int slashIndex = fileName.lastIndexOf(StringPool.SLASH);

if (slashIndex != -1) {
fileName = fileName.substring(slashIndex + 1);
}

String contentType = _httpContext.getMimeType(fileName);

if (isSupportsRangeHeader(contentType)) {
sendFileWithRangeHeader(
request, response, fileName, urlConnection.getInputStream(),
urlConnection.getContentLength(), contentType);
}
else {
ServletResponseUtil.sendFile(
request, response, fileName, urlConnection.getInputStream(),
urlConnection.getContentLength(), contentType);
}
}
catch (Exception e) {
PortalUtil.sendError(
HttpServletResponse.SC_NOT_FOUND, e, request, response);
}
}

protected String getRequestURI(HttpServletRequest request)
throws UnsupportedEncodingException {

String requestURI = URLDecoder.decode(
request.getRequestURI(), StringPool.UTF8);

String contextPath = request.getContextPath();

if (!contextPath.equals(StringPool.SLASH)) {
requestURI = requestURI.substring(contextPath.length());
}

return requestURI;
}

private String _alias;
private BundleServletConfig _bundleServletConfig;
private HttpContext _httpContext;
private String _name;

}
@@ -0,0 +1,42 @@
/**
* Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
*
* This library 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 2.1 of the License, or (at your option)
* any later version.
*
* This library 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.
*/

package com.liferay.httpservice.ws.axis;

import org.apache.axis.EngineConfiguration;
import org.apache.axis.EngineConfigurationFactory;
import org.apache.axis.configuration.EngineConfigurationFactoryDefault;

/**
* @author Raymond Augé
* @author Miguel Pastor
*/
public class AxisConfigurationFactory implements EngineConfigurationFactory {

public AxisConfigurationFactory() {
_engineConfigurationFactory =
EngineConfigurationFactoryDefault.newFactory(null);
}

public EngineConfiguration getClientEngineConfig() {
return _engineConfigurationFactory.getClientEngineConfig();
}

public EngineConfiguration getServerEngineConfig() {
return _engineConfigurationFactory.getServerEngineConfig();
}

private EngineConfigurationFactory _engineConfigurationFactory;

}