public String sync() {
// Test the content source connection before proceeding.
ContentSourceManagerLocal contentSourceManager = LookupUtil.getContentSourceManager();
try {
contentSourceManager.testContentSourceConnection(this.contentSource.getId());
} catch (Exception e) {
FacesContextUtility.addMessage(FacesMessage.SEVERITY_ERROR,
"Failed to connect to the remote repository for [" + this.contentSource.getName()
+ "] - check the configuration and make sure the remote repository is up and reachable. Details: "
+ ThrowableUtil.getAllMessages(e));