本文整理汇总了Java中org.kuali.rice.core.api.exception.RiceIllegalArgumentException类的典型用法代码示例。如果您正苦于以下问题:Java RiceIllegalArgumentException类的具体用法?Java RiceIllegalArgumentException怎么用?Java RiceIllegalArgumentException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RiceIllegalArgumentException类属于org.kuali.rice.core.api.exception包,在下文中一共展示了RiceIllegalArgumentException类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: validateForCreate
import org.kuali.rice.core.api.exception.RiceIllegalArgumentException; //导入依赖的package包/类
protected void validateForCreate(PeopleFlowDefinition peopleFlow) {
if (peopleFlow == null) {
throw new RiceIllegalArgumentException("peopleFlow is null");
}
if (StringUtils.isNotBlank(peopleFlow.getId())) {
throw new RiceIllegalArgumentException("Attempted to create a new PeopleFlow definition with a specified peopleFlowId of '"
+ peopleFlow.getId() + "'. This is not allowed, when creating a new PeopleFlow definition, id must be null.");
}
if (peopleFlow.getVersionNumber() != null) {
throw new RiceIllegalArgumentException("The version number on the given PeopleFlow definition was not null, value was " + peopleFlow.getVersionNumber() +
" When creating a new PeopleFlow, the given version number must be null.");
}
validatePeopleFlowMembersForCreate(peopleFlow);
if (getPeopleFlowBoByName(peopleFlow.getNamespaceCode(), peopleFlow.getName()) != null) {
throw new RiceIllegalStateException("A PeopleFlow definition with the namespace code '" + peopleFlow.getNamespaceCode() +
"' and name '" + peopleFlow.getName() + "' already exists.");
}
}
开发者ID:kuali,项目名称:kc-rice,代码行数:19,代码来源:PeopleFlowServiceImpl.java
示例2: validateAttributesAgainstExisting
import org.kuali.rice.core.api.exception.RiceIllegalArgumentException; //导入依赖的package包/类
/**
* <p>This method validates the passed in attributes for a kewTypeId generating a List of
* {@link RemotableAttributeError}s. This method used the oldAttributes to aid in validation. This is useful for
* validating "new" or "updated" attributes.</p>
*
* @param kewTypeId the people flow type identifier. Must not be null or blank.
* @param newAttributes the kim type attributes to validate. Cannot be null.
* @param oldAttributes the old attributes to use for validation. Cannot be null.
* @return any errors that are discovered during validation. Will not return null.
* @throws RiceIllegalArgumentException
*/
@WebMethod(operationName="validateAttributesAgainstExisting")
@XmlElementWrapper(name = "attributeErrors", required = true)
@XmlElement(name = "attributeError", required = false)
@WebResult(name = "attributeErrors")
List<RemotableAttributeError> validateAttributesAgainstExisting(
@WebParam(name = "kewTypeId") String kewTypeId,
@WebParam(name = "newAttributes")
@XmlJavaTypeAdapter(value = MapStringStringAdapter.class)
Map<String, String> newAttributes,
@WebParam(name = "oldAttributes")
@XmlJavaTypeAdapter(value = MapStringStringAdapter.class)
Map<String, String> oldAttributes
) throws RiceIllegalArgumentException;
开发者ID:kuali,项目名称:kc-rice,代码行数:29,代码来源:PeopleFlowTypeService.java
示例3: findPostalCodes
import org.kuali.rice.core.api.exception.RiceIllegalArgumentException; //导入依赖的package包/类
@Override
public PostalCodeQueryResults findPostalCodes(QueryByCriteria queryByCriteria) throws RiceIllegalArgumentException {
incomingParamCheck(queryByCriteria, "queryByCriteria");
QueryResults<PostalCodeBo> results = getDataObjectService().findMatching(PostalCodeBo.class, queryByCriteria);
PostalCodeQueryResults.Builder builder = PostalCodeQueryResults.Builder.create();
builder.setMoreResultsAvailable(results.isMoreResultsAvailable());
builder.setTotalRowCount(results.getTotalRowCount());
final List<PostalCode.Builder> ims = new ArrayList<PostalCode.Builder>();
for (PostalCodeBo bo : results.getResults()) {
ims.add(PostalCode.Builder.create(bo));
}
builder.setResults(ims);
return builder.build();
}
开发者ID:kuali,项目名称:kc-rice,代码行数:19,代码来源:PostalCodeServiceImpl.java
示例4: customizeResults
import org.kuali.rice.core.api.exception.RiceIllegalArgumentException; //导入依赖的package包/类
@Override
public DocumentSearchResultValues customizeResults(DocumentSearchCriteria documentSearchCriteria,
List<DocumentSearchResult> defaultResults,
String customizerName) throws RiceIllegalArgumentException {
if (documentSearchCriteria == null) {
throw new RiceIllegalArgumentException("documentSearchCriteria was null");
}
if (defaultResults == null) {
throw new RiceIllegalArgumentException("defaultResults was null");
}
if (StringUtils.isBlank(customizerName)) {
throw new RiceIllegalArgumentException("customizerName was null or blank");
}
DocumentSearchCustomizer customizer = loadCustomizer(customizerName);
return customizer.customizeResults(documentSearchCriteria, defaultResults);
}
开发者ID:kuali,项目名称:kc-rice,代码行数:17,代码来源:DocumentSearchCustomizationHandlerServiceImpl.java
示例5: addCitizenshipToEntity
import org.kuali.rice.core.api.exception.RiceIllegalArgumentException; //导入依赖的package包/类
@Override
public EntityCitizenship addCitizenshipToEntity(
EntityCitizenship citizenship) throws RiceIllegalArgumentException, RiceIllegalStateException {
incomingParamCheck(citizenship, "citizenship");
if (StringUtils.isBlank(citizenship.getEntityId())) {
throw new RiceIllegalStateException("Citizenship's entityId must be populated before creation");
} else {
if (citizenship.getStatus() == null) {
throw new RiceIllegalStateException("Citizenship's status must be populated before creation");
}
if (getEntityCitizenshipBo(citizenship.getEntityId(), citizenship.getStatus().getCode()) != null) {
throw new RiceIllegalStateException("the EntityCitizenship to create already exists: " + citizenship);
}
}
EntityCitizenshipBo bo = EntityCitizenshipBo.from(citizenship);
return EntityCitizenshipBo.to(dataObjectService.save(bo));
}
开发者ID:kuali,项目名称:kc-rice,代码行数:20,代码来源:IdentityServiceImpl.java
示例6: addEntityTypeContactInfoToEntity
import org.kuali.rice.core.api.exception.RiceIllegalArgumentException; //导入依赖的package包/类
@Override
public EntityTypeContactInfo addEntityTypeContactInfoToEntity(
EntityTypeContactInfo entityTypeData) throws RiceIllegalArgumentException, RiceIllegalStateException {
incomingParamCheck(entityTypeData, "entityTypeData");
if (StringUtils.isBlank(entityTypeData.getEntityId())
|| StringUtils.isBlank(entityTypeData.getEntityTypeCode())) {
throw new RiceIllegalStateException(
"EntityTypeData's entityId and entityTypeCode must be populated before creation");
} else {
if (getEntityTypeDataBo(entityTypeData.getEntityId(), entityTypeData.getEntityTypeCode()) != null) {
throw new RiceIllegalStateException("the entityTypeData to create already exists: " + entityTypeData);
}
}
EntityTypeContactInfoBo bo = EntityTypeContactInfoBo.from(entityTypeData);
return EntityTypeContactInfoBo.to(dataObjectService.save(bo));
}
开发者ID:kuali,项目名称:kc-rice,代码行数:19,代码来源:IdentityServiceImpl.java
示例7: removePrincipalFromGroup
import org.kuali.rice.core.api.exception.RiceIllegalArgumentException; //导入依赖的package包/类
@Override
public boolean removePrincipalFromGroup(String principalId, String groupId) throws RiceIllegalArgumentException {
incomingParamCheck(principalId, "principalId");
incomingParamCheck(groupId, "groupId");
List<GroupMemberBo> groupMembers =
getActiveGroupMembers(groupId, principalId, KimConstants.KimGroupMemberTypes.PRINCIPAL_MEMBER_TYPE);
if(groupMembers.size() == 1) {
GroupMemberBo member = groupMembers.iterator().next();
member.setActiveToDateValue(new java.sql.Timestamp(DateTime.now().getMillis()));
this.dataObjectService.save(member);
KimImplServiceLocator.getGroupInternalService().updateForUserRemovedFromGroup(member.getMemberId(),
member.getGroupId());
return true;
}
return false;
}
开发者ID:kuali,项目名称:kc-rice,代码行数:20,代码来源:GroupServiceImpl.java
示例8: getTermSpecificationByNameAndNamespace
import org.kuali.rice.core.api.exception.RiceIllegalArgumentException; //导入依赖的package包/类
@Override
public TermSpecificationDefinition getTermSpecificationByNameAndNamespace(String name, String namespace)
throws RiceIllegalArgumentException {
if (name == null || name.trim().isEmpty()) {
throw new RiceIllegalArgumentException ("name is " + name);
}
if (namespace == null || namespace.trim().isEmpty()) {
throw new RiceIllegalArgumentException ("namespace is " + namespace);
}
for (TermSpecificationDefinition info : this.termSpecificationMap.values()) {
if (namespace.equals(info.getNamespace())) {
if (name.equals(info.getName())) {
return info;
}
}
}
return null;
}
开发者ID:kuali,项目名称:kc-rice,代码行数:19,代码来源:TermRepositoryServiceMockImpl.java
示例9: createParameter
import org.kuali.rice.core.api.exception.RiceIllegalArgumentException; //导入依赖的package包/类
@Override
@Transactional
public Parameter createParameter(Parameter parameter) {
if (parameter == null) {
throw new RiceIllegalArgumentException("parameter is null");
}
final ParameterKey key = ParameterKey.create(parameter.getApplicationId(), parameter.getNamespaceCode(), parameter.getComponentCode(), parameter.getName());
final Parameter existing = getParameter(key);
if (existing != null && existing.getApplicationId().equals(parameter.getApplicationId())) {
throw new RiceIllegalStateException("the parameter to create already exists: " + parameter);
}
//Parameter flush needed here to accomodate the fact that the version number is not set until flush
//and the immediate transform of the object loses its JPA context
ParameterBo parameterBo = getDataObjectService().save(ParameterBo.from(parameter), PersistenceOption.FLUSH);
return ParameterBo.to(parameterBo);
}
开发者ID:kuali,项目名称:kc-rice,代码行数:18,代码来源:ParameterRepositoryServiceImpl.java
示例10: getRuleFields
import org.kuali.rice.core.api.exception.RiceIllegalArgumentException; //导入依赖的package包/类
@Override
public WorkflowRuleAttributeFields getRuleFields(Map<String, String> parameters,
ExtensionDefinition extensionDefinition,
boolean required)
throws RiceIllegalArgumentException {
if (parameters == null) {
parameters = new HashMap<String, String>();
}
WorkflowRuleAttribute attribute = loadAttribute(extensionDefinition);
attribute.setRequired(required);
List<RemotableAttributeError> errors = attribute.validateRuleData(parameters);
List<RemotableAttributeField> fields = FieldUtils.convertRowsToAttributeFields(attribute.getRuleRows());
List<RuleExtensionValue> ruleExtensionValues = attribute.getRuleExtensionValues();
Map<String, String> ruleExtensionValuesMap = new HashMap<String, String>();
for (RuleExtensionValue ruleExtensionValue : ruleExtensionValues) {
ruleExtensionValuesMap.put(ruleExtensionValue.getKey(), ruleExtensionValue.getValue());
}
return WorkflowRuleAttributeFields.create(errors, fields, ruleExtensionValuesMap);
}
开发者ID:kuali,项目名称:kc-rice,代码行数:20,代码来源:WorkflowRuleAttributeHandlerServiceImpl.java
示例11: addExternalIdentifierToEntity
import org.kuali.rice.core.api.exception.RiceIllegalArgumentException; //导入依赖的package包/类
@Override
public EntityExternalIdentifier addExternalIdentifierToEntity(
EntityExternalIdentifier externalId) throws RiceIllegalArgumentException, RiceIllegalStateException {
incomingParamCheck(externalId, "externalId");
if (StringUtils.isBlank(externalId.getEntityId())
|| StringUtils.isBlank(externalId.getExternalIdentifierTypeCode())) {
throw new RiceIllegalStateException(
"EntityExternalIdentifier's entityId and entityTypeCode must be populated before creation");
} else {
if (getEntityExternalIdentifierBo(externalId.getEntityId(), externalId.getExternalIdentifierTypeCode())
!= null) {
throw new RiceIllegalStateException(
"the EntityExternalIdentifier to create already exists: " + externalId);
}
}
EntityExternalIdentifierBo bo = EntityExternalIdentifierBo.from(externalId);
return EntityExternalIdentifierBo.to(dataObjectService.save(bo));
}
开发者ID:kuali,项目名称:kc-rice,代码行数:21,代码来源:IdentityServiceImpl.java
示例12: createRule
import org.kuali.rice.core.api.exception.RiceIllegalArgumentException; //导入依赖的package包/类
@Override
public RuleDefinition createRule(RuleDefinition ruleDefinition)
throws RiceIllegalArgumentException {
// CREATE
if (ruleDefinition.getId() != null) {
RuleDefinition orig = this.getRule(ruleDefinition.getId());
if (orig != null) {
throw new RiceIllegalArgumentException(ruleDefinition.getId());
}
}
RuleDefinition.Builder copy = RuleDefinition.Builder.create(ruleDefinition);
if (copy.getId() == null) {
copy.setId(UUID.randomUUID().toString());
}
ruleDefinition = copy.build();
ruleMap.put(ruleDefinition.getId(), ruleDefinition);
return ruleDefinition;
}
开发者ID:kuali,项目名称:kc-rice,代码行数:19,代码来源:RuleManagementServiceMockImpl.java
示例13: getRoleMembersFromDerivedRole
import org.kuali.rice.core.api.exception.RiceIllegalArgumentException; //导入依赖的package包/类
@Override
public List<RoleMembership> getRoleMembersFromDerivedRole(String namespaceCode, String roleName, Map<String, String> qualification) {
if (StringUtils.isBlank(namespaceCode)) {
throw new RiceIllegalArgumentException("namespaceCode was null or blank");
}
if (StringUtils.isBlank(roleName)) {
throw new RiceIllegalArgumentException("roleName was null");
}
List<RoleMembership> members = new ArrayList<RoleMembership>();
if ( qualification != null && !qualification.isEmpty() ) {
String principalId = qualification.get(KimConstants.AttributeConstants.PRINCIPAL_ID);
if (qualification.containsKey(KimConstants.AttributeConstants.PRINCIPAL_ID)
&& hasDerivedRole(principalId, null, namespaceCode,
roleName, qualification)) {
members.add(RoleMembership.Builder.create(null/*roleId*/, null, principalId, MemberType.PRINCIPAL, null).build());
}
}
return members;
}
开发者ID:kuali,项目名称:kc-rice,代码行数:21,代码来源:ActionRequestDerivedRoleTypeServiceImpl.java
示例14: loadAttribute
import org.kuali.rice.core.api.exception.RiceIllegalArgumentException; //导入依赖的package包/类
private WorkflowRuleAttribute loadAttribute(ExtensionDefinition extensionDefinition) {
if (extensionDefinition == null) {
throw new RiceIllegalArgumentException("extensionDefinition was null or blank");
}
Object attribute = ExtensionUtils.loadExtension(extensionDefinition);
if (attribute == null) {
throw new RiceIllegalArgumentException("Failed to load WorkflowRuleAttribute for: " + extensionDefinition);
}
if (!WorkflowRuleAttribute.class.isAssignableFrom(attribute.getClass())) {
throw new RiceIllegalArgumentException("Failed to locate a WorkflowRuleAttribute with the given name: " + extensionDefinition.getName());
}
if (attribute instanceof XmlConfiguredAttribute) {
((XmlConfiguredAttribute) attribute).setExtensionDefinition(extensionDefinition);
}
return (WorkflowRuleAttribute) attribute;
}
开发者ID:kuali,项目名称:kc-rice,代码行数:17,代码来源:WorkflowRuleAttributeHandlerServiceImpl.java
示例15: getCounty
import org.kuali.rice.core.api.exception.RiceIllegalArgumentException; //导入依赖的package包/类
@Override
public County getCounty(String countryCode, String stateCode, String code) {
if (StringUtils.isBlank(countryCode)) {
throw new RiceIllegalArgumentException(("countryCode is null"));
}
if (StringUtils.isBlank(code)) {
throw new RiceIllegalArgumentException(("code is null"));
}
if (StringUtils.isBlank(stateCode)) {
throw new RiceIllegalArgumentException(("stateCode is null"));
}
final Map<String, Object> map = new HashMap<String, Object>();
map.put("countryCode", countryCode);
map.put("stateCode", stateCode);
map.put("code", code);
return CountyBo.to(getDataObjectService().find(CountyBo.class, new CompoundKey(map)));
}
开发者ID:kuali,项目名称:kc-rice,代码行数:22,代码来源:CountyServiceImpl.java
示例16: getFunctions
import org.kuali.rice.core.api.exception.RiceIllegalArgumentException; //导入依赖的package包/类
@Override
public List<FunctionDefinition> getFunctions(List<String> functionIds)
throws RiceIllegalArgumentException {
List<FunctionDefinition> list = new ArrayList<FunctionDefinition> ();
for (String id : functionIds) {
list.add (this.getFunction(id));
}
return list;
}
开发者ID:kuali,项目名称:kc-rice,代码行数:10,代码来源:FunctionRepositoryServiceMockImpl.java
示例17: getMatchingRoleMemberships
import org.kuali.rice.core.api.exception.RiceIllegalArgumentException; //导入依赖的package包/类
@Override
public List<RoleMembership> getMatchingRoleMemberships(Map<String, String> qualification,
List<RoleMembership> roleMemberList) {
if (qualification == null) {
throw new RiceIllegalArgumentException("qualification was null");
}
if (roleMemberList == null) {
throw new RiceIllegalArgumentException("roleMemberList was null");
}
return Collections.unmodifiableList(new ArrayList<RoleMembership>(roleMemberList));
}
开发者ID:kuali,项目名称:kc-rice,代码行数:14,代码来源:PassThruRoleTypeServiceBase.java
示例18: findCreateAgenda
import org.kuali.rice.core.api.exception.RiceIllegalArgumentException; //导入依赖的package包/类
@Override
public AgendaDefinition findCreateAgenda(AgendaDefinition agendaDefinition) throws RiceIllegalArgumentException {
AgendaDefinition agenda = this.getAgendaByNameAndContextId(agendaDefinition.getName(), agendaDefinition.getContextId());
if (agenda != null) {
return agenda;
}
return this.createAgenda(agendaDefinition);
}
开发者ID:kuali,项目名称:kc-rice,代码行数:9,代码来源:RuleManagementServiceMockImpl.java
示例19: testGetRules
import org.kuali.rice.core.api.exception.RiceIllegalArgumentException; //导入依赖的package包/类
/**
* Test testGetRules()
*
* This test focuses specifically on the RuleManagementServiceImpl .getRules(List<String> ruleIds) method
*/
@Test
public void testGetRules() {
// get a set of unique object names for use by this test (discriminator passed can be any unique value within this class)
RuleManagementBaseTestObjectNames t6 = new RuleManagementBaseTestObjectNames( CLASS_DISCRIMINATOR, "t6");
// build two rules for testing
buildTestRuleDefinition(t6.namespaceName, t6.object0);
buildTestRuleDefinition(t6.namespaceName, t6.object1);
// build List rule ids for the rules created
List<String> ruleIds = new ArrayList<String>();
ruleIds.add(t6.rule_0_Id);
ruleIds.add(t6.rule_1_Id);
// get test rules by List of rule ids
List<RuleDefinition> ruleDefinitions = ruleManagementService.getRules(ruleIds);
assertEquals("Two RuleDefintions should have been returned",2,ruleDefinitions.size());
for(RuleDefinition ruleDefinition : ruleDefinitions) {
if (!ruleIds.contains(ruleDefinition.getId())) {
fail("Invalid RuleDefinition returned");
}
}
try {
ruleManagementService.getRules(null);
fail("Should have failed with RiceIllegalArgumentException: ruleIds must not be null");
} catch (RiceIllegalArgumentException e) {
// throws RiceIllegalArgumentException: ruleIds must not be null
}
assertEquals("No RuleDefinitions should have been returned",0,
ruleManagementService.getRules(new ArrayList<String>()).size());
ruleIds = Arrays.asList("badValueId");
assertEquals("No RuleDefinitions should have been returned",0, ruleManagementService.getRules(ruleIds).size());
}
开发者ID:kuali,项目名称:kc-rice,代码行数:43,代码来源:RuleManagementRuleDefinitionTest.java
示例20: updateProposition
import org.kuali.rice.core.api.exception.RiceIllegalArgumentException; //导入依赖的package包/类
@Override
public void updateProposition(PropositionDefinition propositionDefinition) throws RiceIllegalArgumentException {
this.crossCheckPropositionParameters(propositionDefinition);
PropositionDefinition.Builder propBldr = PropositionDefinition.Builder.create(propositionDefinition);
propBldr = setSequenceOnCompoundPropositionsIfNeeded(propBldr);
propBldr = maintainTermValuesAndChildPropositions(propBldr);
propositionBoService.updateProposition(propBldr.build());
}
开发者ID:kuali,项目名称:kc-rice,代码行数:10,代码来源:RuleManagementServiceImpl.java
注:本文中的org.kuali.rice.core.api.exception.RiceIllegalArgumentException类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论