ACS-3687: Execute rules API: Remove field "isEachInheritedRuleExecuted" (#262)

This commit is contained in:
krdabrowski
2022-10-07 14:27:45 +02:00
committed by GitHub
parent dac17894c7
commit 3d39b49d43
3 changed files with 6 additions and 129 deletions

View File

@@ -1,106 +0,0 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* Copyright (C) 2005 - 2022 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.rest.model;
import java.util.List;
import java.util.Objects;
import org.alfresco.rest.core.IRestModel;
import org.alfresco.utility.model.TestModel;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Generated by 'krystian' on '2022-09-28 11:33' from 'Alfresco Content Services REST API' swagger file
* Generated from 'Alfresco Content Services REST API' swagger file
* Base Path {@linkplain /alfresco/api/-default-/public/alfresco/versions/1}
*/
public class RestRuleExecutionBodyModel extends TestModel implements IRestModel<RestRuleExecutionBodyModel>
{
@JsonProperty(value = "entry")
RestRuleExecutionBodyModel model;
@Override
public RestRuleExecutionBodyModel onModel()
{
return model;
}
/**
Execute rules against the given folder and all sub-folders
*/
private boolean isEachSubFolderIncluded;
/**
Execute also inherited rules
*/
private boolean isEachInheritedRuleExecuted;
public boolean getIsEachSubFolderIncluded()
{
return this.isEachSubFolderIncluded;
}
public void setIsEachSubFolderIncluded(boolean isEachSubFolderIncluded)
{
this.isEachSubFolderIncluded = isEachSubFolderIncluded;
}
public boolean getIsEachInheritedRuleExecuted()
{
return this.isEachInheritedRuleExecuted;
}
public void setIsEachInheritedRuleExecuted(boolean isEachInheritedRuleExecuted)
{
this.isEachInheritedRuleExecuted = isEachInheritedRuleExecuted;
}
@Override
public String toString()
{
return "RestRuleExecutionBodyModel{" + "isEachSubFolderIncluded=" + isEachSubFolderIncluded + ", isEachInheritedRuleExecuted=" + isEachInheritedRuleExecuted + '}';
}
@Override
public boolean equals(Object o)
{
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
RestRuleExecutionBodyModel that = (RestRuleExecutionBodyModel) o;
return isEachSubFolderIncluded == that.isEachSubFolderIncluded && isEachInheritedRuleExecuted == that.isEachInheritedRuleExecuted;
}
@Override
public int hashCode()
{
return Objects.hash(isEachSubFolderIncluded, isEachInheritedRuleExecuted);
}
}

View File

@@ -49,17 +49,11 @@ public class RestRuleExecutionModel extends TestModel implements IRestModel<Rest
} }
/** /**
Whether the rules were executed also against sub-folders Whether to execute rules also against sub-folders
*/ */
@JsonProperty(required = true) @JsonProperty(required = true)
private boolean isEachSubFolderIncluded; private boolean isEachSubFolderIncluded;
/**
Whether the inherited rules were also executed
*/
@JsonProperty(required = true)
private boolean isEachInheritedRuleExecuted;
public boolean getIsEachSubFolderIncluded() public boolean getIsEachSubFolderIncluded()
{ {
@@ -69,22 +63,12 @@ public class RestRuleExecutionModel extends TestModel implements IRestModel<Rest
public void setIsEachSubFolderIncluded(boolean isEachSubFolderIncluded) public void setIsEachSubFolderIncluded(boolean isEachSubFolderIncluded)
{ {
this.isEachSubFolderIncluded = isEachSubFolderIncluded; this.isEachSubFolderIncluded = isEachSubFolderIncluded;
}
public boolean getIsEachInheritedRuleExecuted()
{
return this.isEachInheritedRuleExecuted;
}
public void setIsEachInheritedRuleExecuted(boolean isEachInheritedRuleExecuted)
{
this.isEachInheritedRuleExecuted = isEachInheritedRuleExecuted;
} }
@Override @Override
public String toString() public String toString()
{ {
return "RestRuleExecutionModel{" + "isEachSubFolderIncluded=" + isEachSubFolderIncluded + ", isEachInheritedRuleExecuted=" + isEachInheritedRuleExecuted + '}'; return "RestRuleExecutionModel{" + "isEachSubFolderIncluded=" + isEachSubFolderIncluded + '}';
} }
@Override @Override
@@ -95,13 +79,13 @@ public class RestRuleExecutionModel extends TestModel implements IRestModel<Rest
if (o == null || getClass() != o.getClass()) if (o == null || getClass() != o.getClass())
return false; return false;
RestRuleExecutionModel that = (RestRuleExecutionModel) o; RestRuleExecutionModel that = (RestRuleExecutionModel) o;
return isEachSubFolderIncluded == that.isEachSubFolderIncluded && isEachInheritedRuleExecuted == that.isEachInheritedRuleExecuted; return isEachSubFolderIncluded == that.isEachSubFolderIncluded;
} }
@Override @Override
public int hashCode() public int hashCode()
{ {
return Objects.hash(isEachSubFolderIncluded, isEachInheritedRuleExecuted); return Objects.hash(isEachSubFolderIncluded);
} }
} }

View File

@@ -55,7 +55,6 @@ import org.alfresco.rest.model.RestRatingModel;
import org.alfresco.rest.model.RestRatingModelsCollection; import org.alfresco.rest.model.RestRatingModelsCollection;
import org.alfresco.rest.model.RestRenditionInfoModel; import org.alfresco.rest.model.RestRenditionInfoModel;
import org.alfresco.rest.model.RestRenditionInfoModelCollection; import org.alfresco.rest.model.RestRenditionInfoModelCollection;
import org.alfresco.rest.model.RestRuleExecutionBodyModel;
import org.alfresco.rest.model.RestRuleExecutionModel; import org.alfresco.rest.model.RestRuleExecutionModel;
import org.alfresco.rest.model.RestRuleSetLinkModel; import org.alfresco.rest.model.RestRuleSetLinkModel;
import org.alfresco.rest.model.RestRuleSetModel; import org.alfresco.rest.model.RestRuleSetModel;
@@ -1102,7 +1101,7 @@ public class Node extends ModelRequest<Node>
* @param body - rules execution request * @param body - rules execution request
* @return execution result * @return execution result
*/ */
public RestRuleExecutionModel executeRules(RestRuleExecutionBodyModel body) public RestRuleExecutionModel executeRules(RestRuleExecutionModel body)
{ {
RestRequest request = RestRequest.requestWithBody(HttpMethod.POST, body.toJson(), "nodes/{nodeId}/rule-executions", repoModel.getNodeRef()); RestRequest request = RestRequest.requestWithBody(HttpMethod.POST, body.toJson(), "nodes/{nodeId}/rule-executions", repoModel.getNodeRef());
return restWrapper.processModel(RestRuleExecutionModel.class, request); return restWrapper.processModel(RestRuleExecutionModel.class, request);