use of org.craftercms.studio.api.v2.utils.StudioConfiguration.CLUSTERING_NODE_REGISTRATION in project studio by craftercms.
the class GitContentRepository method insertClusterRemoteRepository.
public void insertClusterRemoteRepository(RemoteRepository remoteRepository) {
HierarchicalConfiguration<ImmutableNode> registrationData = studioConfiguration.getSubConfig(CLUSTERING_NODE_REGISTRATION);
if (registrationData != null && !registrationData.isEmpty()) {
String localAddress = registrationData.getString(CLUSTER_MEMBER_LOCAL_ADDRESS);
ClusterMember member = clusterDao.getMemberByLocalAddress(localAddress);
if (member != null) {
retryingOperationFacade.addClusterRemoteRepository(member.getId(), remoteRepository.getId());
}
}
}
use of org.craftercms.studio.api.v2.utils.StudioConfiguration.CLUSTERING_NODE_REGISTRATION in project studio by craftercms.
the class GitContentRepository method insertClusterRemoteRepository.
@RetryingOperation
public void insertClusterRemoteRepository(RemoteRepository remoteRepository) {
HierarchicalConfiguration<ImmutableNode> registrationData = studioConfiguration.getSubConfig(CLUSTERING_NODE_REGISTRATION);
if (registrationData != null && !registrationData.isEmpty()) {
String localAddress = registrationData.getString(CLUSTER_MEMBER_LOCAL_ADDRESS);
ClusterMember member = clusterDao.getMemberByLocalAddress(localAddress);
if (member != null) {
clusterDao.addClusterRemoteRepository(member.getId(), remoteRepository.getId());
}
}
}
use of org.craftercms.studio.api.v2.utils.StudioConfiguration.CLUSTERING_NODE_REGISTRATION in project studio by craftercms.
the class AuditServiceInternalImpl method createAuditLogEntry.
@Override
public AuditLog createAuditLogEntry() {
AuditLog auditLog = new AuditLog();
String clusterNodeId = StringUtils.EMPTY;
HierarchicalConfiguration<ImmutableNode> clusterNodeData = studioConfiguration.getSubConfig(CLUSTERING_NODE_REGISTRATION);
if (clusterNodeData != null && !clusterNodeData.isEmpty()) {
clusterNodeId = clusterNodeData.getString(CLUSTER_MEMBER_LOCAL_ADDRESS);
}
auditLog.setOrganizationId(1);
auditLog.setOrigin(ORIGIN_API);
auditLog.setClusterNodeId(clusterNodeId);
return auditLog;
}
Aggregations