当前位置: 首页>>代码示例>>Java>>正文


Java DefaultSelectableValueHolderCollection.add方法代码示例

本文整理汇总了Java中framework.utils.DefaultSelectableValueHolderCollection.add方法的典型用法代码示例。如果您正苦于以下问题:Java DefaultSelectableValueHolderCollection.add方法的具体用法?Java DefaultSelectableValueHolderCollection.add怎么用?Java DefaultSelectableValueHolderCollection.add使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在framework.utils.DefaultSelectableValueHolderCollection的用法示例。


在下文中一共展示了DefaultSelectableValueHolderCollection.add方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getLCMilestoneAsVHByLCProcess

import framework.utils.DefaultSelectableValueHolderCollection; //导入方法依赖的package包/类
/**
 * Get all life cycle milestones of a process as value holder collection.
 * 
 * @param lifeCycleProcessId
 *            the life cycle process id
 */
public static ISelectableValueHolderCollection<Long> getLCMilestoneAsVHByLCProcess(Long lifeCycleProcessId) {

    DefaultSelectableValueHolderCollection<Long> valueHolderCollection = new DefaultSelectableValueHolderCollection<>();
    List<LifeCycleMilestone> list = findLifeCycleMilestone.where().eq("deleted", false).eq("lifeCycleProcess.id", lifeCycleProcessId).findList();
    for (LifeCycleMilestone lifeCycleMilestone : list) {
        String name = lifeCycleMilestone.getShortName();
        if (lifeCycleMilestone.getName() != null && !lifeCycleMilestone.getName().equals("")) {
            name += " (" + lifeCycleMilestone.getName() + ")";
        }
        valueHolderCollection.add(new DefaultSelectableValueHolder<>(lifeCycleMilestone.id, name));

    }
    return valueHolderCollection;

}
 
开发者ID:theAgileFactory,项目名称:maf-desktop-app,代码行数:22,代码来源:LifeCycleMilestoneDao.java

示例2: getLCMilestoneActiveAsVH

import framework.utils.DefaultSelectableValueHolderCollection; //导入方法依赖的package包/类
/**
 * Get all active life cycle milestones (of all active processes) as value
 * holder collection.
 */
public static ISelectableValueHolderCollection<Long> getLCMilestoneActiveAsVH() {

    DefaultSelectableValueHolderCollection<Long> valueHolderCollection = new DefaultSelectableValueHolderCollection<>();
    List<LifeCycleMilestone> list = findLifeCycleMilestone.where().eq("deleted", false).eq("isActive", true).eq("lifeCycleProcess.deleted", false)
            .eq("lifeCycleProcess.isActive", true).findList();
    for (LifeCycleMilestone lifeCycleMilestone : list) {
        valueHolderCollection.add(new DefaultSelectableValueHolder<>(lifeCycleMilestone.id,
                lifeCycleMilestone.lifeCycleProcess.getShortName() + " - " + lifeCycleMilestone.getName()));

    }
    return valueHolderCollection;

}
 
开发者ID:theAgileFactory,项目名称:maf-desktop-app,代码行数:18,代码来源:LifeCycleMilestoneDao.java

示例3: getPEReportStatusTypeActiveAsCssVH

import framework.utils.DefaultSelectableValueHolderCollection; //导入方法依赖的package包/类
/**
 * Get all selectable status types as a value holder collection with the CSS
 * implementation.
 */
public static DefaultSelectableValueHolderCollection<CssValueForValueHolder> getPEReportStatusTypeActiveAsCssVH() {
    DefaultSelectableValueHolderCollection<CssValueForValueHolder> selectablePortfolioEntryReportStatusTypes;
    selectablePortfolioEntryReportStatusTypes = new DefaultSelectableValueHolderCollection<>();
    List<PortfolioEntryReportStatusType> list = findPortfolioEntryReportStatusType.orderBy("id").where().eq("deleted", false).eq("selectable", true)
            .findList();
    for (PortfolioEntryReportStatusType portfolioEntryReportStatusType : list) {
        selectablePortfolioEntryReportStatusTypes.add(new DefaultSelectableValueHolder<>(
                new CssValueForValueHolder(String.valueOf(portfolioEntryReportStatusType.id), portfolioEntryReportStatusType.getName(),
                        portfolioEntryReportStatusType.cssClass),
                String.valueOf(portfolioEntryReportStatusType.id)));

    }
    return selectablePortfolioEntryReportStatusTypes;
}
 
开发者ID:theAgileFactory,项目名称:maf-desktop-app,代码行数:19,代码来源:PortfolioEntryReportDao.java

示例4: getPEAsVHByKeywords

import framework.utils.DefaultSelectableValueHolderCollection; //导入方法依赖的package包/类
/**
 * Get all selectable portfolio entry types as value holder collection.<br/>
 * @param key
 *            the search criteria (use % for wild cards)
 * @param limit 
 * 			   limit the number of entries (useful with auto-complete)
 */
public static ISelectableValueHolderCollection<Long> getPEAsVHByKeywords(String key, int limit) {
	DefaultSelectableValueHolderCollection<Long> valueHolderCollection=new DefaultSelectableValueHolderCollection<Long>();
	List<PortfolioEntry> PEList=getPEAsListByKeywords(key, limit);
	if(PEList!=null){
		for(PortfolioEntry pe : PEList){
			valueHolderCollection.add(new DefaultSelectableValueHolder<Long>(pe.id,pe.name));
		}
	}
	return valueHolderCollection;
}
 
开发者ID:theAgileFactory,项目名称:maf-desktop-app,代码行数:18,代码来源:PortfolioEntryDao.java

示例5: getPEPlanningPackageTypeActiveAsCssVH

import framework.utils.DefaultSelectableValueHolderCollection; //导入方法依赖的package包/类
/**
 * Get active types as a value holder collection with the CSS
 * implementation.
 */
public static DefaultSelectableValueHolderCollection<CssValueForValueHolder> getPEPlanningPackageTypeActiveAsCssVH() {
    DefaultSelectableValueHolderCollection<CssValueForValueHolder> selectablePortfolioEntryReportStatusTypes;
    selectablePortfolioEntryReportStatusTypes = new DefaultSelectableValueHolderCollection<>();
    for (PortfolioEntryPlanningPackageType type : getPEPlanningPackageTypeActiveAsList()) {
        selectablePortfolioEntryReportStatusTypes.add(new DefaultSelectableValueHolder<>(
                new CssValueForValueHolder(String.valueOf(type.id), type.getName(), type.cssClass), String.valueOf(type.id)));

    }
    return selectablePortfolioEntryReportStatusTypes;
}
 
开发者ID:theAgileFactory,项目名称:maf-desktop-app,代码行数:15,代码来源:PortfolioEntryPlanningPackageDao.java

示例6: getLifeCycleMilestoneTypeAsVHC

import framework.utils.DefaultSelectableValueHolderCollection; //导入方法依赖的package包/类
/**
 * Get the life cycle milestone types as a value holder collection.
 * 
 * Note: return null if there is no type.
 * 
 * @param isRelease
 *            true to get type for release process, false for initiative
 *            process.
 */
public static DefaultSelectableValueHolderCollection<String> getLifeCycleMilestoneTypeAsVHC(boolean isRelease) {
    DefaultSelectableValueHolderCollection<String> types = new DefaultSelectableValueHolderCollection<String>();
    for (LifeCycleMilestone.Type type : LifeCycleMilestone.Type.values()) {
        if (type.isRelease == isRelease) {
            types.add(new DefaultSelectableValueHolder<String>(type.name(), type.getLabel()));
        }
    }
    return types.getSortedValues().size() > 0 ? types : null;
}
 
开发者ID:theAgileFactory,项目名称:maf-desktop-app,代码行数:19,代码来源:ConfigurationGovernanceController.java

示例7: getVoteValues

import framework.utils.DefaultSelectableValueHolderCollection; //导入方法依赖的package包/类
/**
 * The possible vote values.
 */
public static DefaultSelectableValueHolderCollection<Boolean> getVoteValues() {
    DefaultSelectableValueHolderCollection<Boolean> voteValues = new DefaultSelectableValueHolderCollection<Boolean>();
    voteValues.add(new DefaultSelectableValueHolder<Boolean>(true, "<span class=\"a label label-success\">" + Msg.get("button.approve") + "</span>"));
    voteValues.add(new DefaultSelectableValueHolder<Boolean>(false, "<span class=\"b label label-danger\">" + Msg.get("button.reject") + "</span>"));
    return voteValues;
}
 
开发者ID:theAgileFactory,项目名称:maf-desktop-app,代码行数:10,代码来源:MilestoneApprovalController.java

示例8: getLanguagesAsVHC

import framework.utils.DefaultSelectableValueHolderCollection; //导入方法依赖的package包/类
public DefaultSelectableValueHolderCollection<String> getLanguagesAsVHC(II18nMessagesPlugin i18nMessagesPlugin) {
    DefaultSelectableValueHolderCollection<String> vhc = new DefaultSelectableValueHolderCollection<>();
    for (String code : this.languages.split(",")) {
        Language language = i18nMessagesPlugin.getLanguageByCode(code);
        if (language != null) {
            vhc.add(new DefaultSelectableValueHolder<>(code, language.getName()));
        }
    }
    return vhc;
}
 
开发者ID:theAgileFactory,项目名称:maf-desktop-datamodel,代码行数:11,代码来源:Reporting.java

示例9: getFormatsAsVHC

import framework.utils.DefaultSelectableValueHolderCollection; //导入方法依赖的package包/类
public DefaultSelectableValueHolderCollection<String> getFormatsAsVHC() {
    DefaultSelectableValueHolderCollection<String> vhc = new DefaultSelectableValueHolderCollection<>();
    for (String code : this.formats.split(",")) {
        try {
            Format format = Format.valueOf(code);
            if (format != null) {
                vhc.add(new DefaultSelectableValueHolder<>(code, format.getLabel()));
            }
        } catch (Exception e) {
            Logger.debug("impossible to find the report format " + code);
        }
    }
    return vhc;
}
 
开发者ID:theAgileFactory,项目名称:maf-desktop-datamodel,代码行数:15,代码来源:Reporting.java

示例10: getValueHolderCollection

import framework.utils.DefaultSelectableValueHolderCollection; //导入方法依赖的package包/类
/**
 * Get a value holder collection of all available formats.
 */
public static DefaultSelectableValueHolderCollection<String> getValueHolderCollection() {
    DefaultSelectableValueHolderCollection<String> vhc = new DefaultSelectableValueHolderCollection<>();
    for (Format format : Arrays.asList(Format.values())) {
        vhc.add(new DefaultSelectableValueHolder<>(format.name(), format.getLabel()));
    }
    return vhc;
}
 
开发者ID:theAgileFactory,项目名称:maf-desktop-datamodel,代码行数:11,代码来源:Reporting.java

示例11: getAllActiveRolesAsValueHolderCollection

import framework.utils.DefaultSelectableValueHolderCollection; //导入方法依赖的package包/类
public static DefaultSelectableValueHolderCollection<String> getAllActiveRolesAsValueHolderCollection() {
    DefaultSelectableValueHolderCollection<String> roles = new DefaultSelectableValueHolderCollection<String>();
    List<SystemLevelRoleType> list = getAllActiveRoles();
    for (SystemLevelRoleType role : list) {
        roles.add(new DefaultSelectableValueHolder<String>(role.name, role.name, Msg.get(role.description)));

    }
    return roles;
}
 
开发者ID:theAgileFactory,项目名称:app-framework,代码行数:10,代码来源:SystemLevelRoleType.java

示例12: getDistinctAttachmentsObjectTypes

import framework.utils.DefaultSelectableValueHolderCollection; //导入方法依赖的package包/类
/**
 * Returns the list of distinct object types linked to the attachments.
 * The returned value is a {@link ISelectableValueHolderCollection} which:
 * <ul>
 * <li>value = the object type name</li>
 * <li>name = the corresponding label taken from the {@link DataType}</li>
 * </ul>
 */
public static ISelectableValueHolderCollection<String> getDistinctAttachmentsObjectTypes() {
    DefaultSelectableValueHolderCollection<String> collection = new DefaultSelectableValueHolderCollection<>();

    List<Attachment> attachments = new Finder<>(Attachment.class).select("objectType").setDistinct(true).findList();
    for (Attachment attachment : attachments) {
    	DataType dt=DataType.getDataTypeFromClassName(attachment.objectType);
    	if(dt!=null){
    		collection.add(new DefaultSelectableValueHolder<>(attachment.objectType, dt.getLabel()));
    	}
    }

    return collection;
}
 
开发者ID:theAgileFactory,项目名称:app-framework,代码行数:22,代码来源:Attachment.java

示例13: getValueHolder

import framework.utils.DefaultSelectableValueHolderCollection; //导入方法依赖的package包/类
public static ISelectableValueHolderCollection<String> getValueHolder() {
    DefaultSelectableValueHolderCollection<String> valueHolders = new DefaultSelectableValueHolderCollection<String>();
    for (AccountType accountType : AccountType.values()) {
        valueHolders.add(new DefaultSelectableValueHolder<String>(accountType.name(), accountType.getLabel()));
    }
    return valueHolders;
}
 
开发者ID:theAgileFactory,项目名称:app-framework,代码行数:8,代码来源:IUserAccount.java

示例14: getObjectTypes

import framework.utils.DefaultSelectableValueHolderCollection; //导入方法依赖的package包/类
/**
 * The list of searchable entity types, its depends of the user permissions.
 * 
 * @param accountManagerPlugin
 *            the account manager service
 * @param userSessionManagerPlugin
 *            the user session manager service
 * @param preferenceManagerPlugin
 *            the preference manager service
 * @param securityService
 *            the security service
 */
public static DefaultSelectableValueHolderCollection<ObjectTypes> getObjectTypes(IAccountManagerPlugin accountManagerPlugin,
        IUserSessionManagerPlugin userSessionManagerPlugin, IPreferenceManagerPlugin preferenceManagerPlugin, ISecurityService securityService) {

    IUserAccount userAccount = null;
    try {
        userAccount = accountManagerPlugin.getUserAccountFromUid(userSessionManagerPlugin.getUserSessionId(ctx()));
    } catch (Exception e) {
        Logger.error("Impossible to get the current in user", e);
    }

    DefaultSelectableValueHolderCollection<ObjectTypes> objectTypes = new DefaultSelectableValueHolderCollection<ObjectTypes>();

    DefaultSelectableValueHolder<ObjectTypes> o1 = new DefaultSelectableValueHolder<ObjectTypes>(ObjectTypes.PORTFOLIO_ENTRY, Msg.get("core.search.type.portfolio_entry"));
    DefaultSelectableValueHolder<ObjectTypes> o2 = new DefaultSelectableValueHolder<ObjectTypes>(ObjectTypes.ACTOR, Msg.get("core.search.type.actor"));
    DefaultSelectableValueHolder<ObjectTypes> o3 = new DefaultSelectableValueHolder<ObjectTypes>(ObjectTypes.PORTFOLIO, Msg.get("core.search.type.portfolio"));
    DefaultSelectableValueHolder<ObjectTypes> o4 = new DefaultSelectableValueHolder<ObjectTypes>(ObjectTypes.ORGUNIT, Msg.get("core.search.type.org_unit"));
    DefaultSelectableValueHolder<ObjectTypes> o5 = new DefaultSelectableValueHolder<ObjectTypes>(ObjectTypes.PURCHASE_ORDER, Msg.get("core.search.type.purchase_order"));
    DefaultSelectableValueHolder<ObjectTypes> o6 = new DefaultSelectableValueHolder<ObjectTypes>(ObjectTypes.BUDGET_BUCKET, Msg.get("core.search.type.budget_bucket"));
    
    o1.setOrder(1); o2.setOrder(2); o3.setOrder(3); o4.setOrder(4);         
    objectTypes.add(o1);
    objectTypes.add(o2);
    objectTypes.add(o3);
    objectTypes.add(o4);

    if (PurchaseOrderDAO.isSystemPreferenceUsePurchaseOrder(preferenceManagerPlugin) && securityService.restrict(IMafConstants.PURCHASE_ORDER_VIEW_ALL_PERMISSION, userAccount)) {
        
        o5.setOrder(5);
        objectTypes.add(o5);
    }

    if (securityService.restrict(IMafConstants.BUDGET_BUCKET_VIEW_ALL_PERMISSION, userAccount)) {
        
        o6.setOrder(6);
        objectTypes.add(o6);
    }

    return objectTypes;

}
 
开发者ID:theAgileFactory,项目名称:maf-desktop-app,代码行数:53,代码来源:SearchController.java


注:本文中的framework.utils.DefaultSelectableValueHolderCollection.add方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。