Search in sources :

Example 1 with INodeGroupExtensionPoint

use of org.jumpmind.symmetric.ext.INodeGroupExtensionPoint in project symmetric-ds by JumpMind.

the class ExtensionService method initializeExtension.

protected boolean initializeExtension(IExtensionPoint ext) {
    boolean shouldInstall = false;
    if (ext instanceof ISymmetricEngineAware) {
        ((ISymmetricEngineAware) ext).setSymmetricEngine(engine);
    }
    if (ext instanceof INodeGroupExtensionPoint) {
        String nodeGroupId = parameterService.getNodeGroupId();
        INodeGroupExtensionPoint nodeExt = (INodeGroupExtensionPoint) ext;
        String[] ids = nodeExt.getNodeGroupIdsToApplyTo();
        if (ids != null) {
            for (String targetNodeGroupId : ids) {
                if (nodeGroupId.equals(targetNodeGroupId)) {
                    shouldInstall = true;
                }
            }
        } else {
            shouldInstall = true;
        }
    } else {
        shouldInstall = true;
    }
    return shouldInstall;
}
Also used : INodeGroupExtensionPoint(org.jumpmind.symmetric.ext.INodeGroupExtensionPoint) ISymmetricEngineAware(org.jumpmind.symmetric.ext.ISymmetricEngineAware)

Aggregations

INodeGroupExtensionPoint (org.jumpmind.symmetric.ext.INodeGroupExtensionPoint)1 ISymmetricEngineAware (org.jumpmind.symmetric.ext.ISymmetricEngineAware)1