mirror of
https://github.com/Alfresco/alfresco-transform-core.git
synced 2025-08-14 17:58:27 +00:00
Save point: [skip ci]
* probes and refactored 3 transform methods in TransformManager so they all use a TransformProcess class.
This commit is contained in:
@@ -25,22 +25,40 @@ import org.springframework.http.HttpStatus;
|
||||
|
||||
public class TransformException extends RuntimeException
|
||||
{
|
||||
private final HttpStatus statusCode;
|
||||
private final HttpStatus status;
|
||||
|
||||
public TransformException(HttpStatus statusCode, String message)
|
||||
{
|
||||
super(message);
|
||||
this.statusCode = statusCode;
|
||||
this.status = statusCode;
|
||||
}
|
||||
|
||||
public TransformException(HttpStatus statusCode, String message, Throwable cause)
|
||||
public TransformException(HttpStatus status, String message, Throwable cause)
|
||||
{
|
||||
super(message, cause);
|
||||
this.statusCode = statusCode;
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public HttpStatus getStatusCode()
|
||||
@Deprecated
|
||||
public TransformException(int statusCode, String message)
|
||||
{
|
||||
return statusCode;
|
||||
this(HttpStatus.valueOf(statusCode), message);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public TransformException(int statusCode, String message, Throwable cause)
|
||||
{
|
||||
this(HttpStatus.valueOf(statusCode), message, cause);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public int getStatusCode()
|
||||
{
|
||||
return status.value();
|
||||
}
|
||||
|
||||
public HttpStatus getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
}
|
||||
|
@@ -104,7 +104,14 @@ public class TransformerDebug
|
||||
InternalContext internalContext = reply.getInternalContext();
|
||||
String reference = TransformStack.getReference(internalContext);
|
||||
long elapsedTime = TransformStack.getElapsedTime(internalContext);
|
||||
popTransform(reference, elapsedTime);
|
||||
}
|
||||
}
|
||||
|
||||
public void popTransform(String reference, long elapsedTime)
|
||||
{
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
String message = getPaddedReference(reference) + "Finished in " + ms(elapsedTime);
|
||||
if (isTopLevel(reference) || isTEngine())
|
||||
{
|
||||
@@ -118,15 +125,6 @@ public class TransformerDebug
|
||||
}
|
||||
}
|
||||
|
||||
public void popTransform(String reference, long elapsedTime)
|
||||
{
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
String message = getPaddedReference(reference) + "Finished in " + ms(elapsedTime);
|
||||
logger.debug(message);
|
||||
}
|
||||
}
|
||||
|
||||
public void logOptions(TransformRequest request)
|
||||
{
|
||||
RepositoryClientData repositoryClientData = new RepositoryClientData(request.getClientData());
|
||||
|
Reference in New Issue
Block a user