/**
* Verifies if there is a pending user registration process with the
* specified user identifier. Throws an
* <code>IllegalArgumentException</code> if the subscription identifier is
* <code>null</code>.
*
* @param userId
* the user identifier to be registered.
* @return <code>true</code> if the there is such pending process, otherwise
* <code>false</code>.
*/
public boolean isRegisterOwnUserPending(String userId) {
ArgumentValidator.notNull("userId", userId);
ArgumentValidator.notEmptyString("userId", userId);
Query query = ds
.createNamedQuery("TriggerProcessIdentifier.isRegisterOwnUserPending");
query.setParameter("pendingStates",
TriggerProcess.getUnfinishedStatus());
query.setParameter("triggerType", TriggerType.REGISTER_OWN_USER);
query.setParameter("orgKeyName",
TriggerProcessIdentifierName.ORGANIZATION_KEY);
query.setParameter("orgKey",
String.valueOf(ds.getCurrentUser().getOrganization().getKey()));
query.setParameter("userIdName", TriggerProcessIdentifierName.USER_ID);
query.setParameter("userId", userId);
return ((Long) query.getSingleResult()).longValue() > 0;
}
TriggerProcessValidator.java 文件源码
java
阅读 29
收藏 0
点赞 0
评论 0
项目:oscm
作者:
评论列表
文章目录