本文整理匯總了Java中org.kuali.rice.kim.impl.group.GroupBo類的典型用法代碼示例。如果您正苦於以下問題:Java GroupBo類的具體用法?Java GroupBo怎麽用?Java GroupBo使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
GroupBo類屬於org.kuali.rice.kim.impl.group包,在下文中一共展示了GroupBo類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: performSearch
import org.kuali.rice.kim.impl.group.GroupBo; //導入依賴的package包/類
@Override
public Collection<?> performSearch(LookupForm form, Map<String, String> searchCriteria, boolean bounded) {
// removed blank search values and decrypt any encrypted search values
Map<String, String> nonBlankSearchCriteria = processSearchCriteria(form, searchCriteria);
List<String> wildcardAsLiteralSearchCriteria = identifyWildcardDisabledFields(form, nonBlankSearchCriteria);
Integer searchResultsLimit = null;
if (bounded) {
searchResultsLimit = LookupUtils.getSearchResultsLimit(getDataObjectClass(), form);
}
Class<?> dataObjectClass = null;
if ("P".equals(MapUtils.getString(searchCriteria, KIMPropertyConstants.KimMember.MEMBER_TYPE_CODE))) {
dataObjectClass = PrincipalBo.class;
} else if ("G".equals(MapUtils.getString(searchCriteria, KIMPropertyConstants.KimMember.MEMBER_TYPE_CODE))) {
dataObjectClass = GroupBo.class;
} else if ("R".equals(MapUtils.getString(searchCriteria, KIMPropertyConstants.KimMember.MEMBER_TYPE_CODE))) {
dataObjectClass = RoleBo.class;
}
return getLookupService().findCollectionBySearchHelper(dataObjectClass, nonBlankSearchCriteria,
wildcardAsLiteralSearchCriteria, !bounded, searchResultsLimit);
}
示例2: getMember
import org.kuali.rice.kim.impl.group.GroupBo; //導入依賴的package包/類
public Object getMember(String memberTypeCode, String memberId){
Class<? extends Object> roleMemberTypeClass = null;
if(MemberType.PRINCIPAL.getCode().equals(memberTypeCode)){
roleMemberTypeClass = PrincipalBo.class;
Principal principalInfo = getIdentityService().getPrincipal(memberId);
if (principalInfo != null) {
}
} else if(MemberType.GROUP.getCode().equals(memberTypeCode)){
roleMemberTypeClass = GroupBo.class;
Group groupInfo = null;
groupInfo = getGroupService().getGroup(memberId);
if (groupInfo != null) {
}
} else if(MemberType.ROLE.getCode().equals(memberTypeCode)){
roleMemberTypeClass = RoleBo.class;
Role role = getRoleService().getRole(memberId);
if (role != null) {
}
}
return getDataObjectService().find(roleMemberTypeClass, memberId);
}
示例3: buildExportDataSet
import org.kuali.rice.kim.impl.group.GroupBo; //導入依賴的package包/類
/**
* Builds the ExportDataSet based on the BusinessObjects passed in.
*/
protected ExportDataSet buildExportDataSet(Class<?> dataObjectClass, List<? extends Object> dataObjects) {
KewExportDataSet dataSet = new KewExportDataSet();
for (Object dataObject : dataObjects) {
if (dataObjectClass.equals(RuleAttribute.class)) {
dataSet.getRuleAttributes().add((RuleAttribute)dataObject);
} else if (dataObjectClass.equals(RuleTemplateBo.class)) {
dataSet.getRuleTemplates().add((RuleTemplateBo)dataObject);
} else if (dataObjectClass.equals(DocumentType.class)) {
dataSet.getDocumentTypes().add((DocumentType)dataObject);
} else if (dataObjectClass.equals(RuleBaseValues.class)) {
dataSet.getRules().add((RuleBaseValues)dataObject);
} else if (dataObjectClass.equals(RuleDelegationBo.class)) {
dataSet.getRuleDelegations().add((RuleDelegationBo)dataObject);
} else if (dataObjectClass.equals(GroupBo.class)) {
Group group = GroupBo.to((GroupBo)dataObject);
dataSet.getGroups().add(group);
}
}
ExportDataSet exportDataSet = new ExportDataSet();
dataSet.populateExportDataSet(exportDataSet);
return exportDataSet;
}
示例4: getExternalizableBusinessObjectsListForLookup
import org.kuali.rice.kim.impl.group.GroupBo; //導入依賴的package包/類
/***
* @see org.kuali.rice.krad.service.ModuleService#getExternalizableBusinessObjectsListForLookup(java.lang.Class, java.util.Map, boolean)
*/
@SuppressWarnings("unchecked")
@Override
public <T extends ExternalizableBusinessObject> List<T> getExternalizableBusinessObjectsListForLookup(
Class<T> externalizableBusinessObjectClass, Map<String, Object> fieldValues, boolean unbounded) {
// for Person objects (which are not real PersistableBOs) pull them through the person service
if ( Person.class.isAssignableFrom( externalizableBusinessObjectClass ) ) {
return (List)getPersonService().findPeople( (Map)fieldValues, unbounded );
} else if ( RoleContract.class.isAssignableFrom( externalizableBusinessObjectClass ) ) {
List<Role> roles = getKimRoleService().findRoles(toQuery(fieldValues)).getResults();
List<RoleEbo> roleEbos = new ArrayList<RoleEbo>(roles.size());
for (Role role : roles) {
roleEbos.add(RoleBo.from(role));
}
return (List<T>)roleEbos;
} else if (GroupContract.class.isAssignableFrom( externalizableBusinessObjectClass)) {
List<Group> groups = getGroupService().findGroups(toQuery(fieldValues)).getResults();
List<GroupEbo> groupEbos = new ArrayList<GroupEbo>(groups.size());
for (Group group : groups) {
groupEbos.add(GroupBo.from(group));
}
return (List<T>)groupEbos;
}
// otherwise, use the default implementation
return super.getExternalizableBusinessObjectsListForLookup(externalizableBusinessObjectClass, fieldValues, unbounded);
}
示例5: getEditGroupUrl
import org.kuali.rice.kim.impl.group.GroupBo; //導入依賴的package包/類
protected HtmlData getEditGroupUrl(GroupBo groupBo) {
String href = "";
Properties parameters = new Properties();
parameters.put(KRADConstants.DISPATCH_REQUEST_PARAMETER, KRADConstants.DOC_HANDLER_METHOD);
parameters.put(KRADConstants.PARAMETER_COMMAND, KewApiConstants.INITIATE_COMMAND);
parameters.put(KRADConstants.DOCUMENT_TYPE_NAME, KimConstants.KimUIConstants.KIM_GROUP_DOCUMENT_TYPE_NAME);
parameters.put(KimConstants.PrimaryKeyConstants.GROUP_ID, groupBo.getId());
if (StringUtils.isNotBlank(getReturnLocation())) {
parameters.put(KRADConstants.RETURN_LOCATION_PARAMETER, getReturnLocation());
}
href = UrlFactory.parameterizeUrl(KimCommonUtilsInternal.getKimBasePath()+KimConstants.KimUIConstants.KIM_GROUP_DOCUMENT_ACTION, parameters);
HtmlData.AnchorHtmlData anchorHtmlData = new HtmlData.AnchorHtmlData(href,
KRADConstants.DOC_HANDLER_METHOD, KRADConstants.MAINTENANCE_EDIT_METHOD_TO_CALL);
return anchorHtmlData;
}
示例6: getMember
import org.kuali.rice.kim.impl.group.GroupBo; //導入依賴的package包/類
public BusinessObject getMember(MemberType memberType, String memberId){
Class<? extends BusinessObject> roleMemberTypeClass = null;
String roleMemberIdName = "";
if(MemberType.PRINCIPAL.equals(memberType)) {
roleMemberTypeClass = PrincipalBo.class;
roleMemberIdName = KimConstants.PrimaryKeyConstants.PRINCIPAL_ID;
} else if(MemberType.GROUP.equals(memberType)){
roleMemberTypeClass = GroupBo.class;
roleMemberIdName = KimConstants.PrimaryKeyConstants.GROUP_ID;
} else if(MemberType.ROLE.equals(memberType)){
roleMemberTypeClass = RoleBo.class;
roleMemberIdName = KimConstants.PrimaryKeyConstants.ROLE_ID;
}
Map<String, String> criteria = new HashMap<String, String>();
criteria.put(roleMemberIdName, memberId);
return getBusinessObjectService().findByPrimaryKey(roleMemberTypeClass, criteria);
}
示例7: getGroupBo
import org.kuali.rice.kim.impl.group.GroupBo; //導入依賴的package包/類
public GroupBo getGroupBo() {
GroupBo groupBo = null;
if (StringUtils.isNotBlank(getGroupReviewerName())) {
if ( groupBo == null ) {
groupBo = GroupBo.from(KimApiServiceLocator.getGroupService().getGroupByNamespaceCodeAndName(
getGroupReviewerNamespace(), getGroupReviewerName()));
}
}
return groupBo;
}
示例8: getGroupBo
import org.kuali.rice.kim.impl.group.GroupBo; //導入依賴的package包/類
public GroupBo getGroupBo() {
Group grp = null;
if (isUsingGroup()) {
grp = KimApiServiceLocator.getGroupService().getGroupByNamespaceCodeAndName(getNamespaceCode(),getName());
}
if(null != grp){
return GroupBo.from(grp);
} else {
return null;
}
}
示例9: getGroupBo
import org.kuali.rice.kim.impl.group.GroupBo; //導入依賴的package包/類
public GroupBo getGroupBo() {
GroupBo groupBo = null;
if (StringUtils.isNotBlank(getGroupReviewerName()) && StringUtils.isNotBlank(getGroupReviewerNamespace()) ) {
if ( groupBo == null ) {
groupBo = GroupBo.from(KimApiServiceLocator.getGroupService().getGroupByNamespaceCodeAndName(
getGroupReviewerNamespace(), getGroupReviewerName()));
}
}
return groupBo;
}
示例10: getGroupViewer
import org.kuali.rice.kim.impl.group.GroupBo; //導入依賴的package包/類
public GroupBo getGroupViewer() {
if (groupViewerId == null) {
return null;
}
Group grp = KimApiServiceLocator.getGroupService().getGroup(groupViewerId);
if (null != grp){
return GroupBo.from(grp);
} else {
return null;
}
}
示例11: getMemberBusinessObjectName
import org.kuali.rice.kim.impl.group.GroupBo; //導入依賴的package包/類
protected String getMemberBusinessObjectName(String memberTypeCode){
if(MemberType.PRINCIPAL.getCode().equals(memberTypeCode)) {
return PersonImpl.class.getName();
}
else if(MemberType.ROLE.getCode().equals(memberTypeCode)) {
return RoleBo.class.getName();
}
else if(MemberType.GROUP.getCode().equals(memberTypeCode)) {
return GroupBo.class.getName();
}
return "";
}
示例12: getExternalizableBusinessObjectsList
import org.kuali.rice.kim.impl.group.GroupBo; //導入依賴的package包/類
/**
* This overridden method ...
*
* @see org.kuali.rice.krad.service.impl.ModuleServiceBase#getExternalizableBusinessObjectsList(java.lang.Class, java.util.Map)
*/
@SuppressWarnings("unchecked")
@Override
public <T extends ExternalizableBusinessObject> List<T> getExternalizableBusinessObjectsList(
Class<T> externalizableBusinessObjectClass, Map<String, Object> fieldValues) {
// for Person objects (which are not real PersistableBOs) pull them through the person service
if ( Person.class.isAssignableFrom( externalizableBusinessObjectClass ) ) {
return (List)getPersonService().findPeople( (Map)fieldValues );
}
else if ( RoleContract.class.isAssignableFrom( externalizableBusinessObjectClass ) ) {
List<Role> roles = getKimRoleService().findRoles(toQuery(fieldValues)).getResults();
List<RoleEbo> roleEbos = new ArrayList<RoleEbo>(roles.size());
for (Role role : roles) {
roleEbos.add(RoleBo.from(role));
}
return (List<T>)roleEbos;
} else if ( GroupContract.class.isAssignableFrom(externalizableBusinessObjectClass) ) {
List<Group> groups = getGroupService().findGroups(toQuery(fieldValues)).getResults();
List<GroupEbo> groupEbos = new ArrayList<GroupEbo>(groups.size());
for (Group group : groups) {
groupEbos.add(GroupBo.from(group));
}
return (List<T>)groupEbos;
}
// otherwise, use the default implementation
return super.getExternalizableBusinessObjectsList( externalizableBusinessObjectClass, fieldValues );
}
示例13: getCustomActionUrls
import org.kuali.rice.kim.impl.group.GroupBo; //導入依賴的package包/類
@Override
public List<HtmlData> getCustomActionUrls(BusinessObject bo, List pkNames) {
GroupBo groupImpl = (GroupBo) bo;
List<HtmlData> anchorHtmlDataList = new ArrayList<HtmlData>();
if(allowsNewOrCopyAction(KimConstants.KimUIConstants.KIM_GROUP_DOCUMENT_TYPE_NAME)){
anchorHtmlDataList.add(getEditGroupUrl(groupImpl));
}
return anchorHtmlDataList;
}
示例14: getMember
import org.kuali.rice.kim.impl.group.GroupBo; //導入依賴的package包/類
public BusinessObject getMember(String memberTypeCode, String memberId){
Class<? extends BusinessObject> roleMemberTypeClass = null;
String roleMemberIdName = "";
if(MemberType.PRINCIPAL.getCode().equals(memberTypeCode)){
roleMemberTypeClass = PrincipalBo.class;
roleMemberIdName = KimConstants.PrimaryKeyConstants.PRINCIPAL_ID;
Principal principalInfo = getIdentityService().getPrincipal(memberId);
if (principalInfo != null) {
}
} else if(MemberType.GROUP.getCode().equals(memberTypeCode)){
roleMemberTypeClass = GroupBo.class;
roleMemberIdName = KimConstants.PrimaryKeyConstants.GROUP_ID;
Group groupInfo = null;
groupInfo = getGroupService().getGroup(memberId);
if (groupInfo != null) {
}
} else if(MemberType.ROLE.getCode().equals(memberTypeCode)){
roleMemberTypeClass = RoleBo.class;
roleMemberIdName = KimConstants.PrimaryKeyConstants.ROLE_ID;
Role role = getRoleService().getRole(memberId);
if (role != null) {
}
}
Map<String, String> criteria = new HashMap<String, String>();
criteria.put(roleMemberIdName, memberId);
return getBusinessObjectService().findByPrimaryKey(roleMemberTypeClass, criteria);
}
示例15: getMemberName
import org.kuali.rice.kim.impl.group.GroupBo; //導入依賴的package包/類
public String getMemberName(MemberType memberType, BusinessObject member){
String roleMemberName = "";
if(MemberType.PRINCIPAL.equals(memberType)){
roleMemberName = ((PrincipalBo)member).getPrincipalName();
} else if(MemberType.GROUP.equals(memberType)){
roleMemberName = ((GroupBo)member).getName();
} else if(MemberType.ROLE.equals(memberType)){
roleMemberName = ((RoleBo)member).getName();
}
return roleMemberName;
}