Search in sources :

Example 1 with CreateWorkspaceAction

use of org.apache.jackrabbit.core.cluster.WorkspaceRecord.CreateWorkspaceAction in project jackrabbit by apache.

the class ClusterNode method process.

public void process(WorkspaceRecord record) {
    if (createWorkspaceListener == null) {
        String msg = "Create Workspace listener unavailable.";
        log.error(msg);
        return;
    }
    try {
        if (record.getActionType() == WorkspaceRecord.CREATE_WORKSPACE_ACTION_TYPE) {
            CreateWorkspaceAction action = record.getCreateWorkspaceAction();
            createWorkspaceListener.externalWorkspaceCreated(record.getWorkspace(), action.getInputSource());
        }
    } catch (RepositoryException e) {
        String msg = "Unable to create workspace: " + e.getMessage();
        log.error(msg);
    }
}
Also used : CreateWorkspaceAction(org.apache.jackrabbit.core.cluster.WorkspaceRecord.CreateWorkspaceAction) RepositoryException(javax.jcr.RepositoryException)

Aggregations

RepositoryException (javax.jcr.RepositoryException)1 CreateWorkspaceAction (org.apache.jackrabbit.core.cluster.WorkspaceRecord.CreateWorkspaceAction)1