- updated exception package
This commit is contained in:
Lucian Tuca
2019-04-11 16:41:00 +03:00
parent eddfeb90a6
commit 279efd3071
13 changed files with 12 additions and 60 deletions

View File

@@ -41,7 +41,7 @@ import org.alfresco.transform.client.model.TransformReply;
import org.alfresco.transform.client.model.TransformRequest;
import org.alfresco.transform.client.model.TransformRequestValidator;
import org.alfresco.transformer.clients.AlfrescoSharedFileStoreClient;
import org.alfresco.transformer.exceptions.TransformException;
import org.alfresco.transform.exceptions.TransformException;
import org.alfresco.transformer.logging.LogEntry;
import org.alfresco.transformer.model.FileRefResponse;
import org.alfresco.util.TempFileProvider;

View File

@@ -13,7 +13,7 @@ import javax.servlet.http.HttpServletResponse;
import org.alfresco.transform.client.model.TransformReply;
import org.alfresco.transform.client.model.TransformRequest;
import org.alfresco.transformer.exceptions.TransformException;
import org.alfresco.transform.exceptions.TransformException;
import org.alfresco.transformer.logging.LogEntry;
import org.alfresco.transformer.probes.ProbeTestTransform;
import org.slf4j.Logger;

View File

@@ -9,7 +9,7 @@ package org.alfresco.transformer.clients;
import java.io.File;
import org.alfresco.transformer.exceptions.TransformException;
import org.alfresco.transform.exceptions.TransformException;
import org.alfresco.transformer.model.FileRefResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;

View File

@@ -1,48 +0,0 @@
/*
* #%L
* Alfresco Repository
* %%
* Copyright (C) 2005 - 2018 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.transformer.exceptions;
public class TransformException extends RuntimeException
{
private final int statusCode;
public TransformException(int statusCode, String message)
{
super(message);
this.statusCode = statusCode;
}
public TransformException(int statusCode, String message, Throwable cause)
{
super(message, cause);
this.statusCode = statusCode;
}
public int getStatusCode()
{
return statusCode;
}
}

View File

@@ -6,7 +6,7 @@ import static org.springframework.http.HttpStatus.INTERNAL_SERVER_ERROR;
import java.io.File;
import java.util.Map;
import org.alfresco.transformer.exceptions.TransformException;
import org.alfresco.transform.exceptions.TransformException;
import org.alfresco.util.exec.RuntimeExec;
import org.alfresco.util.exec.RuntimeExec.ExecutionResult;

View File

@@ -2,7 +2,7 @@ package org.alfresco.transformer.executors;
import java.io.File;
import org.alfresco.transformer.exceptions.TransformException;
import org.alfresco.transform.exceptions.TransformException;
/**
* Basic interface for executing transformations inside Java/JVM

View File

@@ -13,7 +13,7 @@ import java.util.Arrays;
import javax.servlet.http.HttpServletRequest;
import org.alfresco.transformer.exceptions.TransformException;
import org.alfresco.transform.exceptions.TransformException;
import org.alfresco.transformer.logging.LogEntry;
import org.alfresco.util.TempFileProvider;
import org.springframework.core.io.Resource;

View File

@@ -43,7 +43,7 @@ import java.util.concurrent.atomic.AtomicLong;
import javax.servlet.http.HttpServletRequest;
import org.alfresco.transformer.AbstractTransformerController;
import org.alfresco.transformer.exceptions.TransformException;
import org.alfresco.transform.exceptions.TransformException;
import org.alfresco.transformer.logging.LogEntry;
import org.alfresco.util.TempFileProvider;
import org.slf4j.Logger;