本文整理汇总了Java中org.kuali.rice.kim.api.identity.Person.getPrincipalId方法的典型用法代码示例。如果您正苦于以下问题:Java Person.getPrincipalId方法的具体用法?Java Person.getPrincipalId怎么用?Java Person.getPrincipalId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.kuali.rice.kim.api.identity.Person
的用法示例。
在下文中一共展示了Person.getPrincipalId方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: canSuperUserTakeAction
import org.kuali.rice.kim.api.identity.Person; //导入方法依赖的package包/类
public boolean canSuperUserTakeAction(Document document, Person user) {
if (!document.getDocumentHeader().hasWorkflowDocument()) {
return false;
}
String principalId = user.getPrincipalId();
String documentTypeId = document.getDocumentHeader().getWorkflowDocument().getDocumentTypeId();
if (KewApiServiceLocator.getDocumentTypeService().isSuperUserForDocumentTypeId(principalId, documentTypeId)) {
return true;
}
String documentTypeName = document.getDocumentHeader().getWorkflowDocument().getDocumentTypeName();
List<RouteNodeInstance> routeNodeInstances = document.getDocumentHeader().getWorkflowDocument().getRouteNodeInstances();
String documentStatus = document.getDocumentHeader().getWorkflowDocument().getStatus().getCode();
return KewApiServiceLocator.getDocumentTypeService().canSuperUserApproveSingleActionRequest(
principalId, documentTypeName, routeNodeInstances, documentStatus);
}
示例2: canSuperUserApprove
import org.kuali.rice.kim.api.identity.Person; //导入方法依赖的package包/类
public boolean canSuperUserApprove(Document document, Person user) {
if (!document.getDocumentHeader().hasWorkflowDocument()) {
return false;
}
String principalId = user.getPrincipalId();
String documentTypeId = document.getDocumentHeader().getWorkflowDocument().getDocumentTypeId();
if (KewApiServiceLocator.getDocumentTypeService().isSuperUserForDocumentTypeId(principalId, documentTypeId)) {
return true;
}
String documentTypeName = document.getDocumentHeader().getWorkflowDocument().getDocumentTypeName();
List<RouteNodeInstance> routeNodeInstances = document.getDocumentHeader().getWorkflowDocument().getRouteNodeInstances();
String documentStatus = document.getDocumentHeader().getWorkflowDocument().getStatus().getCode();
return KewApiServiceLocator.getDocumentTypeService().canSuperUserApproveDocument(
principalId, documentTypeName, routeNodeInstances, documentStatus);
}
示例3: canSuperUserDisapprove
import org.kuali.rice.kim.api.identity.Person; //导入方法依赖的package包/类
public boolean canSuperUserDisapprove(Document document, Person user) {
if (!document.getDocumentHeader().hasWorkflowDocument()) {
return false;
}
String principalId = user.getPrincipalId();
String documentTypeId = document.getDocumentHeader().getWorkflowDocument().getDocumentTypeId();
if (KewApiServiceLocator.getDocumentTypeService().isSuperUserForDocumentTypeId(principalId, documentTypeId)) {
return true;
}
String documentTypeName = document.getDocumentHeader().getWorkflowDocument().getDocumentTypeName();
List<RouteNodeInstance> routeNodeInstances = document.getDocumentHeader().getWorkflowDocument().getRouteNodeInstances();
String documentStatus = document.getDocumentHeader().getWorkflowDocument().getStatus().getCode();
return KewApiServiceLocator.getDocumentTypeService().canSuperUserDisapproveDocument(
principalId, documentTypeName, routeNodeInstances, documentStatus);
}
示例4: canSuperUserTakeAction
import org.kuali.rice.kim.api.identity.Person; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public boolean canSuperUserTakeAction(Document document, Person user) {
if (!document.getDocumentHeader().hasWorkflowDocument()) {
return false;
}
String principalId = user.getPrincipalId();
String documentTypeId = document.getDocumentHeader().getWorkflowDocument().getDocumentTypeId();
if (KewApiServiceLocator.getDocumentTypeService().isSuperUserForDocumentTypeId(principalId, documentTypeId)) {
return true;
}
String documentTypeName = document.getDocumentHeader().getWorkflowDocument().getDocumentTypeName();
List<RouteNodeInstance> routeNodeInstances = document.getDocumentHeader().getWorkflowDocument().getRouteNodeInstances();
String documentStatus = document.getDocumentHeader().getWorkflowDocument().getStatus().getCode();
return KewApiServiceLocator.getDocumentTypeService().canSuperUserApproveSingleActionRequest(
principalId, documentTypeName, routeNodeInstances, documentStatus);
}
示例5: canSuperUserApprove
import org.kuali.rice.kim.api.identity.Person; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public boolean canSuperUserApprove(Document document, Person user) {
if (!document.getDocumentHeader().hasWorkflowDocument()) {
return false;
}
String principalId = user.getPrincipalId();
String documentTypeId = document.getDocumentHeader().getWorkflowDocument().getDocumentTypeId();
if (KewApiServiceLocator.getDocumentTypeService().isSuperUserForDocumentTypeId(principalId, documentTypeId)) {
return true;
}
String documentTypeName = document.getDocumentHeader().getWorkflowDocument().getDocumentTypeName();
List<RouteNodeInstance> routeNodeInstances = document.getDocumentHeader().getWorkflowDocument().getRouteNodeInstances();
String documentStatus = document.getDocumentHeader().getWorkflowDocument().getStatus().getCode();
return KewApiServiceLocator.getDocumentTypeService().canSuperUserApproveDocument(
principalId, documentTypeName, routeNodeInstances, documentStatus);
}
示例6: canSuperUserDisapprove
import org.kuali.rice.kim.api.identity.Person; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public boolean canSuperUserDisapprove(Document document, Person user) {
if (!document.getDocumentHeader().hasWorkflowDocument()) {
return false;
}
String principalId = user.getPrincipalId();
String documentTypeId = document.getDocumentHeader().getWorkflowDocument().getDocumentTypeId();
if (KewApiServiceLocator.getDocumentTypeService().isSuperUserForDocumentTypeId(principalId, documentTypeId)) {
return true;
}
String documentTypeName = document.getDocumentHeader().getWorkflowDocument().getDocumentTypeName();
List<RouteNodeInstance> routeNodeInstances = document.getDocumentHeader().getWorkflowDocument().getRouteNodeInstances();
String documentStatus = document.getDocumentHeader().getWorkflowDocument().getStatus().getCode();
return KewApiServiceLocator.getDocumentTypeService().canSuperUserDisapproveDocument(
principalId, documentTypeName, routeNodeInstances, documentStatus);
}
示例7: generateDocs
import org.kuali.rice.kim.api.identity.Person; //导入方法依赖的package包/类
private int generateDocs(String[] docTypes, Person user) throws Exception {
String principalId = user.getPrincipalId();
for (String docType: docTypes) {
WorkflowDocument document = WorkflowDocumentFactory.createDocument(principalId, docType);
document.setTitle("a title");
document.route("");
document = WorkflowDocumentFactory.createDocument(principalId, docType);
document.setTitle("a title");
document.route("");
document = WorkflowDocumentFactory.createDocument(principalId, docType);
document.setTitle("a title");
document.route("");
document = WorkflowDocumentFactory.createDocument(principalId, docType);
document.setTitle("a title");
document.route("");
document = WorkflowDocumentFactory.createDocument(principalId, docType);
document.setTitle("a title");
document.route("");
}
return 5 * docTypes.length;
}
示例8: transform
import org.kuali.rice.kim.api.identity.Person; //导入方法依赖的package包/类
private void transform(EDLContext edlContext, Document dom, HttpServletResponse response) throws Exception {
if (StringUtils.isNotBlank(edlContext.getRedirectUrl())) {
response.sendRedirect(edlContext.getRedirectUrl());
return;
}
response.setContentType("text/html; charset=UTF-8");
Transformer transformer = edlContext.getTransformer();
transformer.setOutputProperty("indent", "yes");
transformer.setOutputProperty(OutputKeys.INDENT, "yes");
String user = null;
String loggedInUser = null;
if (edlContext.getUserSession() != null) {
Person wu = edlContext.getUserSession().getPerson();
if (wu != null) user = wu.getPrincipalId();
wu = edlContext.getUserSession().getPerson();
if (wu != null) loggedInUser = wu.getPrincipalId();
}
transformer.setParameter("user", user);
transformer.setParameter("loggedInUser", loggedInUser);
if (LOG.isDebugEnabled()) {
LOG.debug("Transforming dom " + XmlJotter.jotNode(dom, true));
}
transformer.transform(new DOMSource(dom), new StreamResult(response.getOutputStream()));
}
示例9: isAdHocRouteCompletionToInitiator
import org.kuali.rice.kim.api.identity.Person; //导入方法依赖的package包/类
/**
* KULRICE-7419: Adhoc route completion validation rule (should not route to initiator for completion)
*
* determine whether the document initiator is the same as the adhoc recipient for completion
*/
protected boolean isAdHocRouteCompletionToInitiator(Document document, Person person, String actionRequestCode){
if(!StringUtils.equals(actionRequestCode, KewApiConstants.ACTION_REQUEST_COMPLETE_REQ)){
return false;
}
String documentInitiator = document.getDocumentHeader().getWorkflowDocument().getInitiatorPrincipalId();
String adhocRecipient = person.getPrincipalId();
return StringUtils.equals(documentInitiator, adhocRecipient);
}
示例10: PessimisticLock
import org.kuali.rice.kim.api.identity.Person; //导入方法依赖的package包/类
/**
* This constructs a lock object using the logged in user and given lock type
*/
public PessimisticLock(String documentNumber, String lockDescriptor, Person user, UserSession userSession) {
this.documentNumber = documentNumber;
this.ownedByPrincipalIdentifier = user.getPrincipalId();
this.lockDescriptor = lockDescriptor;
this.generatedTimestamp = CoreApiServiceLocator.getDateTimeService().getCurrentTimestamp();
this.sessionId = userSession.getKualiSessionId();
}
示例11: setPerson
import org.kuali.rice.kim.api.identity.Person; //导入方法依赖的package包/类
/**
* Sets the person attribute value.
* @param person The person to set.
*/
public void setPerson(Person person) {
this.person = person;
if ( person != null ) {
principalMemberPrincipalName = person.getPrincipalName();
principalMemberPrincipalId = person.getPrincipalId();
principalMemberName = person.getName();
} else {
principalMemberPrincipalId = "";
principalMemberPrincipalName = "";
principalMemberName = "";
}
}
示例12: getIdValue
import org.kuali.rice.kim.api.identity.Person; //导入方法依赖的package包/类
public static String getIdValue(String idType, Person user) {
if ("workflowId".equalsIgnoreCase(idType) || "w".equalsIgnoreCase(idType) || "principalId".equalsIgnoreCase(idType)) {
return user.getPrincipalId();
} else if ("authenticationId".equalsIgnoreCase(idType) || "a".equalsIgnoreCase(idType) || "principalName".equalsIgnoreCase(idType)) {
return user.getPrincipalName();
} else if ("emplId".equalsIgnoreCase(idType) || "e".equalsIgnoreCase(idType)) {
return user.getEmployeeId();
} else {
LOG.error("Could not determine ID Value for given id type!" + idType);
}
return null;
}
示例13: getCount
import org.kuali.rice.kim.api.identity.Person; //导入方法依赖的package包/类
private int getCount(HttpServletRequest request) {
try {
String id = request.getParameter("id");
if (id == null || id.equals("")) {
return 0;
}
String idType = request.getParameter("idType");
if (idType == null || idType.equals("")) {
idType = "a";
}
String principalId = null;
if ("emplId".equalsIgnoreCase(idType) || "e".equalsIgnoreCase(idType)) {
Person person = KimApiServiceLocator.getPersonService().getPersonByEmployeeId(id);
if (person != null) {
principalId = person.getPrincipalId();
}
} else if ("workflowId".equalsIgnoreCase(idType) || "w".equalsIgnoreCase(idType)) {
principalId = id;
} else if ("authenticationId".equalsIgnoreCase(idType) || "a".equalsIgnoreCase(idType)) {
Principal principal = KimApiServiceLocator.getIdentityService().getPrincipalByPrincipalName(id);
if (principal != null) {
principalId = principal.getPrincipalId();
}
}
if (principalId == null) {
return 0;
}
return KEWServiceLocator.getActionListService().getCount(principalId);
} catch (Throwable t) {
LOG.error("Fatal error when querying for Action List Count", t);
return 0;
}
}