本文整理匯總了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");
}
}
}