Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public void listen(String requestUriPattern, HttpRequestHandler handler) {
try {
as2ServerConnection.listen(requestUriPattern, handler);
} catch (IOException e) {
LOG.error("Failed to listen for '" + requestUriPattern + "' requests: " + e.getMessage(), e);
LOG.error("Failed to listen for '{}' requests: {}", requestUriPattern, e.getMessage(), e);
throw new RuntimeException("Failed to listen for '" + requestUriPattern + "' requests: " + e.getMessage(), e);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public SWFActivityConsumer(SWFEndpoint endpoint, Processor processor, SWFConfigu
}

public Object processActivity(Object[] inputParameters, String taskToken) throws Exception {
LOGGER.debug("Processing activity task: " + Arrays.toString(inputParameters));
LOGGER.debug("Processing activity task: {}", Arrays.toString(inputParameters));

Exchange exchange = endpoint.createExchange(inputParameters, SWFConstants.EXECUTE_ACTION);
exchange.getIn().setHeader(SWFConstants.TASK_TOKEN, taskToken);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public SWFActivityProducer(SWFEndpoint endpoint, CamelSWFActivityClient camelSWF
public void process(Exchange exchange) throws Exception {
String eventName = getEventName(exchange);
String version = getVersion(exchange);
LOG.debug("scheduleActivity : " + eventName + " : " + version);
LOG.debug("scheduleActivity : {} : {}", eventName, version);

Object result = camelSWFClient.scheduleActivity(eventName, version, exchange.getIn().getBody());
endpoint.setResult(exchange, result);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public SWFWorkflowConsumer(SWFEndpoint endpoint, Processor processor, SWFConfigu
}

public Object processWorkflow(Object[] parameters, long startTime, boolean replaying) throws Exception {
LOGGER.debug("Processing workflow task: " + Arrays.toString(parameters));
LOGGER.debug("Processing workflow task: {}", Arrays.toString(parameters));
Exchange exchange = endpoint.createExchange(parameters, SWFConstants.EXECUTE_ACTION);
exchange.getIn().setHeader(SWFConstants.WORKFLOW_START_TIME, startTime);
exchange.getIn().setHeader(SWFConstants.WORKFLOW_REPLAYING, replaying);
Expand All @@ -53,15 +53,15 @@ public Object processWorkflow(Object[] parameters, long startTime, boolean repla
}

public void signalReceived(Object[] parameters) throws Exception {
LOGGER.debug("signalReceived: " + Arrays.toString(parameters));
LOGGER.debug("signalReceived: {}", Arrays.toString(parameters));

Exchange exchange = endpoint.createExchange(parameters, SWFConstants.SIGNAL_RECEIVED_ACTION);
exchange.setPattern(InOnly);
getProcessor().process(exchange);
}

public Object getWorkflowState(Object parameters) throws Exception {
LOGGER.debug("getWorkflowState: " + parameters);
LOGGER.debug("getWorkflowState: {}", parameters);

Exchange exchange = endpoint.createExchange(parameters, SWFConstants.GET_STATE_ACTION);
getProcessor().process(exchange);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public SWFWorkflowProducer(SWFEndpoint endpoint, CamelSWFWorkflowClient camelSWF

@Override
public void process(Exchange exchange) throws Exception {
LOG.debug("processing workflow task " + exchange);
LOG.debug("processing workflow task {}", exchange);

try {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public Processor createBeanProcessor(
LOG.debug("Attempting to create new bean instance from class: {} via auto-wiring enabled", clazz);
bean = CamelContextHelper.newInstance(camelContext, clazz);
} catch (Throwable e) {
LOG.debug("Error creating new bean instance from class: " + clazz + ". This exception is ignored", e);
LOG.debug("Error creating new bean instance from class: {}. This exception is ignored", clazz, e);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@ public BoxCollaboration addFolderCollaboration(
if (collaborator == null) {
throw new IllegalArgumentException("Parameter 'collaborator' can not be null");
}
LOG.debug("Creating collaborations for folder(id=" + folderId + ") with collaborator("
+ collaborator.getID() + ")");
LOG.debug("Creating collaborations for folder(id={}) with collaborator({})", folderId, collaborator.getID());
if (role == null) {
throw new IllegalArgumentException("Parameter 'role' can not be null");
}
Expand All @@ -113,7 +112,7 @@ public BoxCollaboration addFolderCollaboration(
*/
public BoxCollaboration addFolderCollaborationByEmail(String folderId, String email, BoxCollaboration.Role role) {
try {
LOG.debug("Creating collaborations for folder(id=" + folderId + ") with collaborator(" + email + ")");
LOG.debug("Creating collaborations for folder(id={}) with collaborator({})", folderId, email);
if (folderId == null) {
throw new IllegalArgumentException("Parameter 'folderId' can not be null");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public BoxCommentsManager(BoxAPIConnection boxConnection) {
*/
public BoxFile addFileComment(String fileId, String message) {
try {
LOG.debug("Adding comment to file(id=" + fileId + ") to '" + message + "'");
LOG.debug("Adding comment to file(id={}) to '{}'", fileId, message);
if (fileId == null) {
throw new IllegalArgumentException("Parameter 'fileId' can not be null");
}
Expand Down Expand Up @@ -126,7 +126,7 @@ public BoxComment.Info getCommentInfo(String commentId) {
*/
public BoxComment replyToComment(String commentId, String message) {
try {
LOG.debug("Replying to comment(id=" + commentId + ") with message=" + message);
LOG.debug("Replying to comment(id={}) with message={}", commentId, message);
if (commentId == null) {
throw new IllegalArgumentException("Parameter 'commentId' can not be null");
}
Expand All @@ -150,7 +150,7 @@ public BoxComment replyToComment(String commentId, String message) {
*/
public BoxComment changeCommentMessage(String commentId, String message) {
try {
LOG.debug("Changing comment(id=" + commentId + ") message=" + message);
LOG.debug("Changing comment(id={}) message={}", commentId, message);
if (commentId == null) {
throw new IllegalArgumentException("Parameter 'commentId' can not be null");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ public BoxEventLogsManager(BoxAPIConnection boxConnection) {
*/
public List<BoxEvent> getEnterpriseEvents(String position, Date after, Date before, BoxEvent.Type... types) {
try {
LOG.debug("Getting all enterprise events occuring between "
+ (after == null ? after : DateFormat.getDateTimeInstance().format(after)) + " and "
+ (before == null ? before : DateFormat.getDateTimeInstance().format(before))
+ (position == null ? position : (" starting at " + position)));
LOG.debug("Getting all enterprise events occurring between {} and {} {}",
after == null ? "unspecified date" : DateFormat.getDateTimeInstance().format(after),
before == null ? "unspecified date" : DateFormat.getDateTimeInstance().format(before),
position == null ? "" : (" starting at " + position));

if (after == null) {
throw new IllegalArgumentException("Parameter 'after' can not be null");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,11 @@ public BoxEventsManager(BoxAPIConnection boxConnection) {
*/
public void listen(EventListener listener, Long startingPosition) {
try {
LOG.debug("Listening for events with listener=" + listener + " at startingPosition=" + startingPosition);

if (listener == null) {
LOG.debug("Parameter 'listener' is null: will not listen for events");
return;
}
LOG.debug("Listening for events with listener={} at startingPosition={}", listener, startingPosition);

if (startingPosition != null) {
eventStream = new EventStream(boxConnection, startingPosition);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,15 @@ public BoxFile uploadFile(
String parentFolderId, InputStream content, String fileName, Date created, Date modified,
Long size, Boolean check, ProgressListener listener) {
try {
LOG.debug("Uploading file with name '" + fileName + "' to parent_folder(id=" + parentFolderId + ")");
LOG.debug("Uploading file with name '{}}' to parent_folder(id={}})", fileName, parentFolderId);
if (parentFolderId == null) {
throw new IllegalArgumentException("Parameter 'parentFolderId' can not be null");
}
if (content == null) {
throw new IllegalArgumentException("Paramerer 'content' can not be null");
throw new IllegalArgumentException("Parameter 'content' can not be null");
}
if (fileName == null) {
throw new IllegalArgumentException("Paramerer 'fileName' can not be null");
throw new IllegalArgumentException("Parameter 'fileName' can not be null");
}
BoxFile boxFile = null;
boolean uploadNewFile = true;
Expand Down Expand Up @@ -241,7 +241,7 @@ public BoxFile uploadNewFileVersion(
throw new IllegalArgumentException("Parameter 'fileId' can not be null");
}
if (fileContent == null) {
throw new IllegalArgumentException("Paramerer 'fileContent' can not be null");
throw new IllegalArgumentException("Parameter 'fileContent' can not be null");
}

BoxFile file = new BoxFile(boxConnection, fileId);
Expand Down Expand Up @@ -347,7 +347,7 @@ public OutputStream downloadPreviousFileVersion(
String fileId, Integer version, OutputStream output,
ProgressListener listener) {
try {
LOG.debug("Downloading file(id=" + fileId + ", version=" + version + ")");
LOG.debug("Downloading file(id={}, version={})", fileId, version);
if (fileId == null) {
throw new IllegalArgumentException("Parameter 'fileId' can not be null");
}
Expand Down Expand Up @@ -384,7 +384,7 @@ public OutputStream downloadPreviousFileVersion(
*/
public BoxFileVersion promoteFileVersion(String fileId, Integer version) {
try {
LOG.debug("Promoting file(id=" + fileId + ", version=" + version + ")");
LOG.debug("Promoting file(id={}, version={})", fileId, version);
if (fileId == null) {
throw new IllegalArgumentException("Parameter 'fileId' can not be null");
}
Expand Down Expand Up @@ -415,8 +415,9 @@ public BoxFileVersion promoteFileVersion(String fileId, Integer version) {
*/
public BoxFile copyFile(String fileId, String destinationFolderId, String newName) {
try {
LOG.debug("Copying file(id=" + fileId + ") to destination_folder(id=" + destinationFolderId + ")"
+ (newName == null ? "" : " with new name '" + newName + "'"));
LOG.debug("Copying file(id={}) to destination_folder(id={}) {}",
fileId, destinationFolderId,
newName == null ? "" : " with new name '" + newName + "'");
if (fileId == null) {
throw new IllegalArgumentException("Parameter 'fileId' can not be null");
}
Expand Down Expand Up @@ -447,8 +448,9 @@ public BoxFile copyFile(String fileId, String destinationFolderId, String newNam
*/
public BoxFile moveFile(String fileId, String destinationFolderId, String newName) {
try {
LOG.debug("Moving file(id=" + fileId + ") to destination_folder(id=" + destinationFolderId + ")"
+ (newName == null ? "" : " with new name '" + newName + "'"));
LOG.debug("Moving file(id={}) to destination_folder(id={}) {}",
fileId, destinationFolderId,
newName == null ? "" : " with new name '" + newName + "'");
if (fileId == null) {
throw new IllegalArgumentException("Parameter 'fileId' can not be null");
}
Expand Down Expand Up @@ -477,7 +479,7 @@ public BoxFile moveFile(String fileId, String destinationFolderId, String newNam
*/
public BoxFile renameFile(String fileId, String newFileName) {
try {
LOG.debug("Renaming file(id=" + fileId + ") to '" + newFileName + "'");
LOG.debug("Renaming file(id={}) to '{}'", fileId, newFileName);
if (fileId == null) {
throw new IllegalArgumentException("Parameter 'fileId' can not be null");
}
Expand Down Expand Up @@ -521,7 +523,7 @@ public void deleteFile(String fileId) {
*/
public void deleteFileVersion(String fileId, Integer version) {
try {
LOG.debug("Deleting file(id=" + fileId + ", version=" + version + ")");
LOG.debug("Deleting file(id={}, version={})", fileId, version);
if (fileId == null) {
throw new IllegalArgumentException("Parameter 'fileId' can not be null");
}
Expand Down Expand Up @@ -555,11 +557,11 @@ public BoxSharedLink createFileSharedLink(
String fileId, BoxSharedLink.Access access, Date unshareDate,
BoxSharedLink.Permissions permissions) {
try {
LOG.debug("Creating shared link for file(id=" + fileId + ") with access=" + access
+ (unshareDate == null
? ""
: " unsharedDate=" + DateFormat.getDateTimeInstance().format(unshareDate)
+ " permissions=" + permissions));
LOG.debug("Creating shared link for file(id={}) with access={} {}",
fileId, access, unshareDate == null
? ""
: " unsharedDate=" + DateFormat.getDateTimeInstance().format(unshareDate)
+ " permissions=" + permissions);

if (fileId == null) {
throw new IllegalArgumentException("Parameter 'fileId' can not be null");
Expand Down Expand Up @@ -640,8 +642,8 @@ public byte[] getFileThumbnail(
String fileId, BoxFile.ThumbnailFileType fileType, Integer minWidth,
Integer minHeight, Integer maxWidth, Integer maxHeight) {
try {
LOG.debug("Getting thumbnail for file(id=" + fileId + ") fileType=" + fileType + " minWidth=" + minWidth
+ " minHeight=" + minHeight + " maxWidth=" + maxWidth + " maxHeight=" + maxHeight);
LOG.debug("Getting thumbnail for file(id={}) fileType={} minWidth={} minHeight={} maxWidth={} maxHeight={}",
fileId, fileType, minWidth, minHeight, maxWidth, maxHeight);

if (fileId == null) {
throw new IllegalArgumentException("Parameter 'fileId' can not be null");
Expand Down Expand Up @@ -787,7 +789,7 @@ public void deleteFileMetadata(String fileId) {
*/
public void checkUpload(String fileName, String parentFolderId, Long size) {
try {
LOG.debug("Preflight check file with name '" + fileName + "' to parent_folder(id=" + parentFolderId + ")");
LOG.debug("Preflight check file with name '{}' to parent_folder(id={})", fileName, parentFolderId);
if (parentFolderId == null) {
throw new IllegalArgumentException("Parameter 'parentFolderId' can not be null");
}
Expand Down
Loading