Skip to content

Commit

Permalink
Merge pull request #41 from dotCMS/release-5.2
Browse files Browse the repository at this point in the history
Release 5.2
  • Loading branch information
jgambarios authored Sep 30, 2019
2 parents c896cec + 106901f commit 4cfc980
Show file tree
Hide file tree
Showing 22 changed files with 50 additions and 66 deletions.
2 changes: 1 addition & 1 deletion OSGi/com.dotcms.3rd.party/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repositories {

dependencies {
compile fileTree(dir: 'src/main/resources/libs', include: '*.jar')
compile('com.dotcms:dotcms:5.1.6') { transitive = true }
compile('com.dotcms:dotcms:5.2.0') { transitive = true }
}

import java.util.jar.*
Expand Down
2 changes: 1 addition & 1 deletion OSGi/com.dotcms.actionlet/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repositories {
}

dependencies {
compile('com.dotcms:dotcms:5.1.6') { transitive = true }
compile('com.dotcms:dotcms:5.2.0') { transitive = true }
}

import java.util.jar.*
Expand Down
7 changes: 5 additions & 2 deletions OSGi/com.dotcms.aop/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import java.util.jar.JarFile

plugins {
id 'biz.aQute.bnd.builder' version '3.3.0'
}
Expand Down Expand Up @@ -72,10 +74,11 @@ dependencies {

ajc "org.aspectj:aspectjtools:1.8.10"
providedCompile "org.aspectj:aspectjrt:1.8.10"
providedCompile (group: 'com.dotcms', name: 'dotcms', version: '5.1.6'){
providedCompile (group: 'com.dotcms', name: 'dotcms', version: '5.2.0'){
transitive = true
}
aspects (group: 'com.dotcms', name: 'dotcms', version: '5.1.6')
aspects (group: 'com.dotcms', name: 'dotcms', version: '5.2.0')

providedCompile "javax.servlet:javax.servlet-api:3.1.0"
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,81 +1,62 @@
package com.dotcms.plugin.aop.rest;

import com.dotcms.repackage.javax.ws.rs.*;
import com.dotcms.repackage.javax.ws.rs.core.Context;
import com.dotcms.repackage.javax.ws.rs.core.MediaType;
import com.dotcms.repackage.javax.ws.rs.core.Response;
import com.dotcms.repackage.org.glassfish.jersey.server.JSONP;
import com.dotcms.rest.InitDataObject;
import com.dotcms.rest.ResponseEntityView;
import com.dotcms.rest.WebResource;
import com.dotcms.rest.annotation.NoCache;
import com.dotcms.rest.exception.mapper.ExceptionMapperUtil;
import com.dotcms.util.LogTime;
import com.dotcms.vanityurl.business.VanityUrlAPI;
import com.dotmarketing.business.APILocator;
import com.dotmarketing.exception.DotDataException;
import com.dotmarketing.exception.DotSecurityException;
import com.dotmarketing.portlets.contentlet.business.ContentletAPI;
import com.dotmarketing.portlets.contentlet.model.Contentlet;
import com.liferay.portal.model.User;
import org.glassfish.jersey.server.JSONP;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.*;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

@Path("/v1/custom/content")
public class MyContentResource {

private final WebResource webResource = new WebResource();
private final MyContentService contentService = new MyContentService();
private final ContentletAPI contentletAPI = APILocator.getContentletAPI();
private final VanityUrlAPI vanityUrlAPI = APILocator.getVanityUrlAPI();

@GET
@Path("/inode/{inode}")
@Produces(MediaType.APPLICATION_JSON)
@LogTime
public Response getContentByInode(@Context final HttpServletRequest request,
@PathParam("inode") final String inode) {
@Context final HttpServletResponse response,
@PathParam("inode") final String inode) throws DotSecurityException, DotDataException {

final InitDataObject initData = this.webResource.init
(null, true, request, false, null);
(request, response, false);
final User user = initData.getUser();
Contentlet contentlet = null;
Response response = null;

try {

contentlet = this.contentService.hydrateContentLet
final Contentlet contentlet = this.contentService.hydrateContentLet
(this.contentletAPI.find(inode, user, true));

response = Response.ok(new ResponseEntityView (contentlet)).build();
} catch (Exception e) {
return Response.ok(new ResponseEntityView (contentlet)).build();

response = ExceptionMapperUtil.createResponse
(e, Response.Status.INTERNAL_SERVER_ERROR);
}

return response;
}

@Path("/lastMonth")
@DELETE
@JSONP
@NoCache
@Produces({MediaType.APPLICATION_JSON, "application/javascript"})
public Response deleteLastMonthContent(@Context final HttpServletRequest request) {
public Response deleteLastMonthContent(@Context final HttpServletRequest request,
@Context final HttpServletResponse response) throws DotDataException {

final InitDataObject initData = this.webResource.init
(null, true, request, true, null);
Response response = null;

try {

response = Response.ok(new ResponseEntityView
this.webResource.init
(request, response, false);
return Response.ok(new ResponseEntityView
(this.contentService.deleteLastMonthContent())).build();
} catch (DotDataException e) {
response = ExceptionMapperUtil.createResponse
(e, Response.Status.INTERNAL_SERVER_ERROR);
}

return response;
}
}
2 changes: 1 addition & 1 deletion OSGi/com.dotcms.custom.spring/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ configurations {
}

dependencies {
compile('com.dotcms:dotcms:5.1.6') { transitive = true }
compile('com.dotcms:dotcms:5.2.0') { transitive = true }
//Resolve dependencies. These jars can be downloaded from our Maven Repo
//In case you want to create a Controller using other Spring version,
//just change the version Attribute.
Expand Down
2 changes: 1 addition & 1 deletion OSGi/com.dotcms.dynamic.skeleton/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ dependencies {
// include all jars within the resource libs
compile fileTree(dir: 'src/main/resources/libs', include: '*.jar')
// Using all jar from artifactory part of the dotcms group
compile('com.dotcms:dotcms:5.1.6') { transitive = true }
compile('com.dotcms:dotcms:5.2.0') { transitive = true }
}

import java.util.jar.*
Expand Down
2 changes: 1 addition & 1 deletion OSGi/com.dotcms.fixasset/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repositories {
}

dependencies {
compile('com.dotcms:dotcms:5.1.6') { transitive = true }
compile('com.dotcms:dotcms:5.2.0') { transitive = true }
}

import java.util.jar.*
Expand Down
2 changes: 1 addition & 1 deletion OSGi/com.dotcms.hooks/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repositories {
}

dependencies {
compile('com.dotcms:dotcms:5.1.6') { transitive = true }
compile('com.dotcms:dotcms:5.2.0') { transitive = true }
}

import java.util.jar.*
Expand Down
2 changes: 1 addition & 1 deletion OSGi/com.dotcms.job/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repositories {
}

dependencies {
compile('com.dotcms:dotcms:5.1.6') { transitive = true }
compile('com.dotcms:dotcms:5.2.0') { transitive = true }
}

import java.util.jar.*
Expand Down
2 changes: 1 addition & 1 deletion OSGi/com.dotcms.override/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repositories {
}

dependencies {
compile('com.dotcms:dotcms:5.1.6') { transitive = true }
compile('com.dotcms:dotcms:5.2.0') { transitive = true }
}

import java.util.jar.*
Expand Down
2 changes: 1 addition & 1 deletion OSGi/com.dotcms.pushpublish.listener/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repositories {
}

dependencies {
compile('com.dotcms:dotcms:5.1.6') { transitive = true }
compile('com.dotcms:dotcms:5.2.0') { transitive = true }
}

import java.util.jar.*
Expand Down
2 changes: 1 addition & 1 deletion OSGi/com.dotcms.rest/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repositories {
}

dependencies {
compile('com.dotcms:dotcms:5.1.6') { transitive = true }
compile('com.dotcms:dotcms:5.2.0') { transitive = true }
}

import java.util.jar.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

import javax.servlet.http.HttpServletRequest;

import com.dotcms.repackage.javax.ws.rs.GET;
import com.dotcms.repackage.javax.ws.rs.POST;
import com.dotcms.repackage.javax.ws.rs.PUT;
import com.dotcms.repackage.javax.ws.rs.Path;
import com.dotcms.repackage.javax.ws.rs.PathParam;
import com.dotcms.repackage.javax.ws.rs.core.CacheControl;
import com.dotcms.repackage.javax.ws.rs.core.Context;
import com.dotcms.repackage.javax.ws.rs.core.Response;
import com.dotcms.repackage.javax.ws.rs.core.Response.ResponseBuilder;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.core.CacheControl;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.ResponseBuilder;
import com.dotcms.rest.InitDataObject;
import com.dotcms.rest.WebResource;
import com.dotmarketing.business.DotStateException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ configurations {
}

dependencies {
compile('com.dotcms:dotcms:5.1.6') { transitive = true }
compile('com.dotcms:dotcms:5.2.0') { transitive = true }

testCompile 'org.mockito:mockito-core:2.0.31-beta'
testCompile 'org.hamcrest:hamcrest-all:1.3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ configurations {
}

dependencies {
compile('com.dotcms:dotcms:5.1.6') { transitive = true }
compile('com.dotcms:dotcms:5.2.0') { transitive = true }

testCompile 'org.mockito:mockito-core:2.0.31-beta'
testCompile 'org.hamcrest:hamcrest-all:1.3'
Expand Down
2 changes: 1 addition & 1 deletion OSGi/com.dotcms.servlet/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repositories {

dependencies {
compile fileTree(dir: '../com.dotcms.simpleService/build/libs/', include: '*.jar')//As this example depends on the com.dotcms.simpleService example
compile('com.dotcms:dotcms:5.1.6') { transitive = true }
compile('com.dotcms:dotcms:5.2.0') { transitive = true }
}

import java.util.jar.*
Expand Down
2 changes: 1 addition & 1 deletion OSGi/com.dotcms.simpleService/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repositories {
}

dependencies {
compile('com.dotcms:dotcms:5.1.6') { transitive = true }
compile('com.dotcms:dotcms:5.2.0') { transitive = true }
}

import java.util.jar.*
Expand Down
2 changes: 1 addition & 1 deletion OSGi/com.dotcms.spring/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repositories {
}

dependencies {
compile('com.dotcms:dotcms:5.1.6') { transitive = true }
compile('com.dotcms:dotcms:5.2.0') { transitive = true }
}

import java.util.jar.*
Expand Down
2 changes: 1 addition & 1 deletion OSGi/com.dotcms.staticpublish.listener/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ configurations {
}

dependencies {
compile('com.dotcms:dotcms:5.1.6') { transitive = true }
compile('com.dotcms:dotcms:5.2.0') { transitive = true }

compileOnly('com.hierynomus:sshj:0.23.0'){
exclude group: 'org.bouncycastle' //Why we exlude? See README's important notes.
Expand Down
2 changes: 1 addition & 1 deletion OSGi/com.dotcms.tuckey/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repositories {
}

dependencies {
compile('com.dotcms:dotcms:5.1.6') { transitive = true }
compile('com.dotcms:dotcms:5.2.0') { transitive = true }
}

import java.util.jar.*
Expand Down
2 changes: 1 addition & 1 deletion OSGi/com.dotcms.viewtool/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repositories {
}

dependencies {
compile('com.dotcms:dotcms:5.1.6') { transitive = true }
compile('com.dotcms:dotcms:5.2.0') { transitive = true }
}

import java.util.jar.*
Expand Down
2 changes: 1 addition & 1 deletion OSGi/com.dotcms.webinterceptor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repositories {
}

dependencies {
compile('com.dotcms:dotcms:5.1.6') { transitive = true }
compile('com.dotcms:dotcms:5.2.0') { transitive = true }
}

import java.util.jar.*
Expand Down

0 comments on commit 4cfc980

Please sign in to comment.