本文整理汇总了Java中org.kuali.rice.krad.maintenance.MaintenanceDocumentAuthorizerBase类的典型用法代码示例。如果您正苦于以下问题:Java MaintenanceDocumentAuthorizerBase类的具体用法?Java MaintenanceDocumentAuthorizerBase怎么用?Java MaintenanceDocumentAuthorizerBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MaintenanceDocumentAuthorizerBase类属于org.kuali.rice.krad.maintenance包,在下文中一共展示了MaintenanceDocumentAuthorizerBase类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isValidUser
import org.kuali.rice.krad.maintenance.MaintenanceDocumentAuthorizerBase; //导入依赖的package包/类
/**
* This method check to see if the user can create the account maintenance document and set the user session
*
* @param String principalId
* @return boolean
*/
protected boolean isValidUser(String principalId) {
try {
Person user = personService.getPerson(principalId);
DocumentAuthorizer documentAuthorizer = new MaintenanceDocumentAuthorizerBase();
if (documentAuthorizer.canInitiate(maintenanceDocumentDictionaryService.getDocumentTypeName(Account.class), user)) {
// set the user session so that the user name can be displayed in the saved document
GlobalVariables.setUserSession(new UserSession(user.getPrincipalName()));
return true;
}
else {
return false;
}
}
catch (Exception ex) {
LOG.error( KcUtils.getErrorMessage(KcConstants.BudgetAdjustmentService.ERROR_KC_DOCUMENT_INVALID_USER, new String[]{principalId}));
return false;
}
}
示例2: MaintenanceDocumentEntry
import org.kuali.rice.krad.maintenance.MaintenanceDocumentAuthorizerBase; //导入依赖的package包/类
public MaintenanceDocumentEntry() {
super();
setDocumentClass(getStandardDocumentBaseClass());
documentAuthorizerClass = MaintenanceDocumentAuthorizerBase.class;
documentPresentationControllerClass = MaintenanceDocumentPresentationControllerBase.class;
}