/*
 * Copyright 2017-2018 B2i Healthcare Pte Ltd, http://b2i.sg
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.b2international.snowowl.core.validation;

import com.b2international.snowowl.core.validation.issue.ValidationIssueRequests;
import com.b2international.snowowl.core.validation.rule.ValidationRuleRequests;
import com.b2international.snowowl.core.validation.whitelist.ValidationWhiteListRequests;

/**
 * @since 6.0
 */
public final class ValidationRequests {

	private ValidationRequests() {}
	
	public static ValidationIssueRequests issues() {
		return ValidationIssueRequests.INSTANCE;
	}
	
	public static ValidationRuleRequests rules() {
		return ValidationRuleRequests.INSTANCE;
	}

	public static ValidationWhiteListRequests whiteList() {
		return ValidationWhiteListRequests.INSTANCE;
	}

	public static ValidateRequestBuilder prepareValidate() {
		
		return new ValidateRequestBuilder();
	}

}
@@ -21,9 +21,9 @@
 -201
-8
+9
  B2i
@@ -675,16 +675,71 @@
 ation;%0A%0A
+import com.b2international.snowowl.core.branch.Branch;%0A
 import c
@@ -986,70 +986,229 @@
 ts;%0A
-%0A/**%0A * @since 6.0%0A */%0Apublic final class ValidationRequests %7B
+import com.b2international.snowowl.datastore.remotejobs.RemoteJobEntry;%0A%0A/**%0A * @since 6.0%0A */%0Apublic final class ValidationRequests %7B%0A%09%0A%09public static final String VALIDATION_JOB_ID_PREFIX = %22validation-%22 ; //$NON-NLS-N$
 %0A%0A%09p
@@ -1643,10 +1643,604 @@
 r();%0A%09%7D%0A
+%09%0A%09/**%0A%09 * Creates a unique validation id%0A%09 * %0A%09 * @param codeSystemEntry%0A%09 * @return the unique id.%0A%09 */%0A%09public static String createUniqueValidationId(String shortName, String branch) %7B%0A%09%09return String.format(%22%25s%25s%25s%25s%22, VALIDATION_JOB_ID_PREFIX, shortName, Branch.SEPARATOR, branch);%0A%09%7D%0A%09%0A%09public static boolean isValidationJob(RemoteJobEntry job) %7B%0A%09%09return job != null && job.getId().startsWith(ValidationRequests.VALIDATION_JOB_ID_PREFIX);%0A%09%7D%0A%09%0A%09public static boolean isRelatedBranch(RemoteJobEntry job, String branch) %7B%0A%09%09return isValidationJob(job) && job.getId().endsWith(branch);%0A%09%7D%0A%09
 %0A%7D

Move validation related logic to ValidationRequests from the UI