本文整理汇总了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");
}
}
示例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
}
示例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");
}
}
}