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

[APPS-3172] Update License Header #3124

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
  •  
  •  
  •  
14 changes: 7 additions & 7 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
"filename": "amps/ags/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/base/TestData.java",
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
"is_verified": false,
"line_number": 57,
"line_number": 58,
"is_secret": false
}
],
Expand All @@ -176,7 +176,7 @@
"filename": "amps/ags/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/retentionschedule/RetentionScheduleStepTests.java",
"hashed_secret": "e3557f3b0f2189660980d213f75d1a7828d56af1",
"is_verified": false,
"line_number": 83,
"line_number": 85,
"is_secret": false
}
],
Expand Down Expand Up @@ -1599,15 +1599,15 @@
"filename": "repository/src/test/java/org/alfresco/repo/security/authentication/identityservice/IdentityServiceFacadeFactoryBeanTest.java",
"hashed_secret": "c4b66dbe168ad1d2b19119494a0da063801bc3bb",
"is_verified": false,
"line_number": 83,
"line_number": 82,
"is_secret": false
},
{
"type": "JSON Web Token",
"filename": "repository/src/test/java/org/alfresco/repo/security/authentication/identityservice/IdentityServiceFacadeFactoryBeanTest.java",
"hashed_secret": "c5aad1895e1dcff195992938f1bcc9954d575ac9",
"is_verified": false,
"line_number": 92,
"line_number": 91,
"is_secret": false
}
],
Expand All @@ -1627,7 +1627,7 @@
"filename": "repository/src/test/java/org/alfresco/repo/security/authentication/identityservice/SpringBasedIdentityServiceFacadeUnitTest.java",
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
"is_verified": false,
"line_number": 46,
"line_number": 47,
"is_secret": false
}
],
Expand Down Expand Up @@ -1888,5 +1888,5 @@
}
]
},
"generated_at": "2024-12-19T08:58:42Z"
}
"generated_at": "2025-01-07T10:56:22Z"
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2024 Alfresco Software Limited
* Copyright (C) 2005 - 2025 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
Expand All @@ -26,12 +26,11 @@
*/
package org.alfresco.rest.core;

import lombok.Getter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

import lombok.Getter;

/**
* Extends {@link RestProperties} to be able to change/add properties
*
Expand All @@ -45,18 +44,18 @@
@PropertySource(value = "classpath:local.properties", ignoreResourceNotFound = true)
public class RMRestProperties extends RestProperties
{
@Value ("${alfresco.scheme}")
@Value("${alfresco.scheme}")
private String scheme;

@Value ("${alfresco.server}")
@Value("${alfresco.server}")
private String server;

@Value ("${alfresco.port}")
@Value("${alfresco.port}")
private String port;

@Value ("${rest.rmPath}")
@Value("${rest.rmPath}")
private String restRmPath;

@Value ("${docker.host}")
@Value("${docker.host}")
private String dockerHost;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2024 Alfresco Software Limited
* Copyright (C) 2005 - 2025 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
Expand All @@ -27,6 +27,11 @@
package org.alfresco.rest.core;

import io.restassured.builder.RequestSpecBuilder;
import lombok.Getter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Service;

import org.alfresco.rest.exception.EmptyJsonResponseException;
import org.alfresco.rest.model.RestErrorModel;
Expand All @@ -38,12 +43,6 @@
import org.alfresco.rest.rm.community.requests.gscore.GSCoreAPI;
import org.alfresco.utility.model.StatusModel;
import org.alfresco.utility.model.UserModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Service;

import lombok.Getter;

/**
* Extends {@link RestWrapper} in order to call GS APIs with our own properties
Expand Down Expand Up @@ -153,15 +152,18 @@ public SearchAPI withSearchAPI()
}

/**
* You can handle the request sent to server by calling this method.
* If for example you want to sent multipart form data you can use: <pre>
* You can handle the request sent to server by calling this method. If for example you want to sent multipart form data you can use:
*
* <pre>
* restClient.configureRequestSpec()
* .addMultiPart("filedata", Utility.getResourceTestDataFile("restapi-resource"))
* .addFormParam("renditions", "doclib")
* .addFormParam("autoRename", true);
* .addMultiPart("filedata", Utility.getResourceTestDataFile("restapi-resource"))
* .addFormParam("renditions", "doclib")
* .addFormParam("autoRename", true);
*
* restClient.withCoreAPI().usingNode(ContentModel.my()).createNode();
* </pre> This will create the node using the multipart data defined.
* </pre>
*
* This will create the node using the multipart data defined.
*/
public RequestSpecBuilder configureRequestSpec()
{
Expand All @@ -171,7 +173,8 @@ public RequestSpecBuilder configureRequestSpec()
/**
* Process a response that returns a html
*
* @throws EmptyJsonResponseException If there is no response from the server.
* @throws EmptyJsonResponseException
* If there is no response from the server.
*/
public RestHtmlResponse processHtmlResponse(RestRequest simpleRequest)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2024 Alfresco Software Limited
* Copyright (C) 2005 - 2025 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
Expand Down Expand Up @@ -32,6 +32,10 @@

import lombok.Getter;
import lombok.Setter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

import org.alfresco.rest.requests.Node;
import org.alfresco.rest.requests.coreAPI.RestCoreAPI;
import org.alfresco.rest.requests.search.SearchAPI;
Expand All @@ -45,17 +49,14 @@
import org.alfresco.rest.rm.community.requests.gscore.api.RecordCategoryAPI;
import org.alfresco.rest.rm.community.requests.gscore.api.RecordFolderAPI;
import org.alfresco.rest.rm.community.requests.gscore.api.RecordsAPI;
import org.alfresco.rest.rm.community.requests.gscore.api.RetentionScheduleAPI;
import org.alfresco.rest.rm.community.requests.gscore.api.TransferAPI;
import org.alfresco.rest.rm.community.requests.gscore.api.TransferContainerAPI;
import org.alfresco.rest.rm.community.requests.gscore.api.UnfiledContainerAPI;
import org.alfresco.rest.rm.community.requests.gscore.api.UnfiledRecordFolderAPI;
import org.alfresco.rest.rm.community.requests.gscore.api.RetentionScheduleAPI;
import org.alfresco.utility.data.DataUserAIS;
import org.alfresco.utility.model.RepoTestModel;
import org.alfresco.utility.model.UserModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

/**
* REST API Factory which provides access to the APIs
Expand All @@ -68,7 +69,7 @@
public class RestAPIFactory
{
@Autowired
@Getter (value = PROTECTED)
@Getter(value = PROTECTED)
private DataUserAIS dataUser;

@Resource(name = "RMRestWrapper")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2024 Alfresco Software Limited
* Copyright (C) 2005 - 2025 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
Expand Down Expand Up @@ -44,11 +44,13 @@ public SearchRequestBuilder()
{
new SearchRequest();
}

/**
* Set the sql statement for the SearchRequest
*
* @param query sql statement
* @return search request
* @param query
* sql statement
* @return search request
*/
public SearchRequestBuilder setQueryBuilder(RestRequestQueryModel query)
{
Expand All @@ -59,7 +61,8 @@ public SearchRequestBuilder setQueryBuilder(RestRequestQueryModel query)
/**
* Set the paging statement for the SearchRequest
*
* @param paging pagination requested
* @param paging
* pagination requested
* @return search request
*/
public SearchRequestBuilder setPagingBuilder(Pagination paging)
Expand All @@ -82,7 +85,8 @@ public Pagination setPagination(Integer maxItems, Integer skipCount)
/**
* Set the requested fields for the SearchRequest
*
* @param fields requested fields
* @param fields
* requested fields
* @return search request
*/
public SearchRequestBuilder setFieldsBuilder(List<String> fields)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2024 Alfresco Software Limited
* Copyright (C) 2005 - 2025 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
Expand All @@ -26,12 +26,12 @@
*/
package org.alfresco.rest.core.v0;

import jakarta.json.Json;
import jakarta.json.JsonReader;
import java.io.IOException;
import java.io.InputStream;
import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeFormatterBuilder;
import jakarta.json.Json;
import jakarta.json.JsonReader;

import org.apache.commons.io.IOUtils;
import org.apache.http.HttpEntity;
Expand All @@ -52,20 +52,20 @@ public class APIUtils
{
/** Logger for this class. */
private static final Logger LOGGER = LoggerFactory.getLogger(APIUtils.class);
/** The ISO instant formatter that formats or parses an instant in UTC, such as '2011-12-03T10:15:305Z'
* similar with {@link DateTimeFormatter#ISO_INSTANT}, but with only 3 nanoseconds*/
public static final DateTimeFormatter ISO_INSTANT_FORMATTER =
new DateTimeFormatterBuilder().appendInstant(3).toFormatter();
/**
* The ISO instant formatter that formats or parses an instant in UTC, such as '2011-12-03T10:15:305Z' similar with {@link DateTimeFormatter#ISO_INSTANT}, but with only 3 nanoseconds
*/
public static final DateTimeFormatter ISO_INSTANT_FORMATTER = new DateTimeFormatterBuilder().appendInstant(3).toFormatter();

/** Private constructor for helper class. */
private APIUtils()
{
}
{}

/**
* Extract the body of a HTTP response as a JSON object.
*
* @param httpResponse The HTTP response.
* @param httpResponse
* The HTTP response.
* @return A JSON representation of the object.
*/
public static JSONObject convertHTTPResponseToJSON(HttpResponse httpResponse)
Expand All @@ -86,7 +86,8 @@ public static JSONObject convertHTTPResponseToJSON(HttpResponse httpResponse)
/**
* Util method to extract the message string from the HTTP response
*
* @param httpResponse http response
* @param httpResponse
* http response
* @return error message from the http response
*/
public static String extractErrorMessageFromHttpResponse(HttpResponse httpResponse)
Expand Down
Loading
Loading