当前位置: 首页>>代码示例>>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;未经允许,请勿转载。