當前位置: 首頁>>代碼示例>>Java>>正文


Java Validator.isUrl方法代碼示例

本文整理匯總了Java中com.liferay.portal.kernel.util.Validator.isUrl方法的典型用法代碼示例。如果您正苦於以下問題:Java Validator.isUrl方法的具體用法?Java Validator.isUrl怎麽用?Java Validator.isUrl使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.liferay.portal.kernel.util.Validator的用法示例。


在下文中一共展示了Validator.isUrl方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: validateUpdate

import com.liferay.portal.kernel.util.Validator; //導入方法依賴的package包/類
@Deprecated
private void validateUpdate(long groupId, long processStepId, String stepCode, long serviceProcessId,
		String sequenceNo, String dossierStatus, String dossierSubStatus, String customProcessUrl)
		throws PortalException {

	ProcessStep processStep = processStepPersistence.findByPrimaryKey(processStepId);

	if (!processStep.getStepCode().toLowerCase().contentEquals(stepCode.toLowerCase())) {
		validateAdd(groupId, processStepId, stepCode, serviceProcessId, sequenceNo, dossierStatus, dossierSubStatus,
				customProcessUrl);
	}

	if (Validator.isNotNull(customProcessUrl) && !Validator.isUrl(customProcessUrl)) {
		throw new DossierURLException("InvalidCustomProcessURL");
	}
}
 
開發者ID:VietOpenCPS,項目名稱:opencps-v2,代碼行數:17,代碼來源:ProcessStepLocalServiceImpl.java

示例2: validateAdd

import com.liferay.portal.kernel.util.Validator; //導入方法依賴的package包/類
private void validateAdd(long groupId, long processStepId, String stepCode, long serviceProcessId,
		String sequenceNo, String dossierStatus, String dossierSubStatus, String customProcessUrl)
		throws PortalException {

	if (Validator.isNull(stepCode)) {
		throw new RequiredStepNoException("RequiredStepCodeException");
	}

	ProcessStep processStep = processStepPersistence.fetchBySC_GID(stepCode, groupId, serviceProcessId);

	if (processStepId == 0) {
		if (Validator.isNotNull(processStep)) {
			throw new DuplicateStepNoException("DuplicateStepNoException");
		}

	} else {
		if (Validator.isNotNull(processStep) && processStep.getPrimaryKey() != processStepId) {
			throw new DuplicateStepNoException("DuplicateStepNoException");
		}
	}

	if (Validator.isNotNull(customProcessUrl) && !Validator.isUrl(customProcessUrl)) {
		throw new DossierURLException("InvalidCustomProcessURL");
	}

	// TODO add validate for DossierStatus and DossierSubStatus
}
 
開發者ID:VietOpenCPS,項目名稱:opencps-v2,代碼行數:28,代碼來源:ProcessStepLocalServiceImpl.java

示例3: validate

import com.liferay.portal.kernel.util.Validator; //導入方法依賴的package包/類
private void validate(long groupId, long serviceConfigId, long serviceInfoId, String govAgencyCode, int serviceLevel, String serviceUrl,
		JSONObject objName) throws PortalException {

	DictItem agc = DictCollectionUtils.getDictItemByCode(DataMGTConstants.GOVERNMENT_AGENCY, govAgencyCode,
			groupId);

	if (Validator.isNull(agc)) {
		throw new RequiredAgencyCodeException("RequiredAgencyCodeException");
	} else {
		objName.put("agencyName", agc.getItemName());
	}

	if (serviceLevel <= 1 || serviceLevel > 4) {
		throw new ServiceLevelException();
	}

	if (Validator.isNotNull(serviceUrl) && !Validator.isUrl(serviceUrl)) {
		throw new ServiceURLOnlineException("ServiceURLOnlineException");
	}

	try {
		serviceInfoPersistence.fetchByPrimaryKey(serviceInfoId);

	} catch (Exception e) {
		throw new RequiredServiceCodeException("RequiredServiceCodeException");
	}
	
	ServiceConfig config = serviceConfigPersistence.fetchByGID_SI_GAC(groupId, serviceInfoId, govAgencyCode);

	
	if (serviceConfigId == 0) {

		if (Validator.isNotNull(config)) {
			throw new HasExsistException("ServiceConfigHasExsist");
		}
	} else {
		
		if (Validator.isNotNull(config) && config.getPrimaryKey() != serviceConfigId) {
			throw new HasExsistException("ServiceConfigHasExsist");
		}
	}
	

}
 
開發者ID:VietOpenCPS,項目名稱:opencps-v2,代碼行數:45,代碼來源:ServiceConfigLocalServiceImpl.java


注:本文中的com.liferay.portal.kernel.util.Validator.isUrl方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。