當前位置: 首頁>>代碼示例>>Java>>正文


Java IRepositoryItemService類代碼示例

本文整理匯總了Java中com.ibm.team.repository.service.IRepositoryItemService的典型用法代碼示例。如果您正苦於以下問題:Java IRepositoryItemService類的具體用法?Java IRepositoryItemService怎麽用?Java IRepositoryItemService使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


IRepositoryItemService類屬於com.ibm.team.repository.service包,在下文中一共展示了IRepositoryItemService類的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: execute

import com.ibm.team.repository.service.IRepositoryItemService; //導入依賴的package包/類
public void execute() throws IOException, URISyntaxException, AuthenticationException {
    Gson googleJson = new Gson();
    try {
        IProcessServerService processServerService = parentService.getService(IProcessServerService.class);
        IContributorHandle contribHandle = processServerService.getAuthenticatedContributor();
        IRepositoryItemService itemService = parentService.getService(IRepositoryItemService.class);
        IContributor contributor = (IContributor) itemService.fetchItem(contribHandle, null);
        Map<String, ProjectArea> projectAreas = new TreeMap<String, ProjectArea>();
        IProcessArea[] areas = processServerService.findProcessAreas(contributor, null, null);
        for(IProcessArea a : areas) {
            IProjectArea pa = (IProjectArea) itemService.fetchItem(a.getProjectArea(), null);
            String paId = pa.getItemId().toString();
            projectAreas.put(pa.getName(), new ProjectArea(paId, pa.getName()));
        }
        String projectAreasJson = googleJson.toJson(projectAreas);
        response.getWriter().write(projectAreasJson);
    } catch (Exception e) {
        response.setStatus(500);
    }
}
 
開發者ID:jazz-community,項目名稱:rtc-workitem-bulk-mover-service,代碼行數:21,代碼來源:ProjectAreaService.java

示例2: getTarget

import com.ibm.team.repository.service.IRepositoryItemService; //導入依賴的package包/類
@SuppressWarnings("restriction")
static AttributeValue getTarget(Object t_val, IAuditableServer auditSrv,
                                TeamRawService service, IProgressMonitor monitor) throws TeamRepositoryException {
    if(t_val == null)
        return new AttributeValue("", "");
    IRepositoryItemService itemService = service.getService(IRepositoryItemService.class);
    IIterationHandle iterHandle = (IIterationHandle)t_val;
    IIteration iteration = (IIteration) itemService.fetchItem(iterHandle, null);
    String name = iteration.getName();
    String fullId = IterationsHelper.createIterationPath(iterHandle, auditSrv, monitor);
    return new AttributeValue(fullId, name);
}
 
開發者ID:jazz-community,項目名稱:rtc-workitem-bulk-mover-service,代碼行數:13,代碼來源:TargetHelpers.java

示例3: getCategory

import com.ibm.team.repository.service.IRepositoryItemService; //導入依賴的package包/類
static AttributeValue getCategory(Object t_val,
                                  IWorkItemServer workItemServer, TeamRawService service, IProgressMonitor monitor) throws TeamRepositoryException {
    IRepositoryItemService itemService = service.getService(IRepositoryItemService.class);
    ICategoryHandle catHandle = (ICategoryHandle)t_val;
    ICategory category = (ICategory) itemService.fetchItem(catHandle, null);
    CategoryId id = category.getCategoryId();
    String idString = id.getInternalRepresentation();
    String fullPathname = workItemServer.resolveHierarchicalName(category, monitor);
    return new AttributeValue(idString, fullPathname);
}
 
開發者ID:jazz-community,項目名稱:rtc-workitem-bulk-mover-service,代碼行數:11,代碼來源:CategoryHelpers.java

示例4: getFoundIn

import com.ibm.team.repository.service.IRepositoryItemService; //導入依賴的package包/類
static AttributeValue getFoundIn(Object targetValue, TeamRawService service) throws TeamRepositoryException {
    IRepositoryItemService itemService = service.getService(IRepositoryItemService.class);
    IDeliverableHandle deliverableHandle = (IDeliverableHandle)targetValue;
    IDeliverable deliverable = (IDeliverable) itemService.fetchItem(deliverableHandle, null);

    if(targetValue != null && deliverable != null) {
        return new AttributeValue(deliverable.getName(), deliverable.getName());
    } else {
        return new AttributeValue("", "");
    }
}
 
開發者ID:jazz-community,項目名稱:rtc-workitem-bulk-mover-service,代碼行數:12,代碼來源:FoundInHelpers.java

示例5: analyzeWorkItems2

import com.ibm.team.repository.service.IRepositoryItemService; //導入依賴的package包/類
private AttributeDefinitions analyzeWorkItems2(List<WorkItemMoveMapper> mappedWorkItems) throws TeamRepositoryException {
	AttributeDefinitions attributeDefinitions = new AttributeDefinitions();

	IRepositoryItemService itemService = service.getService(IRepositoryItemService.class);

	for(WorkItemMoveMapper mappedWorkItem : mappedWorkItems) {
		addWorkItemToAttributeDefinitions(attributeDefinitions, mappedWorkItem, itemService);
	}

	return attributeDefinitions;
}
 
開發者ID:jazz-community,項目名稱:rtc-workitem-bulk-mover-service,代碼行數:12,代碼來源:WorkItemMover.java

示例6: WorkItemInformationRetriever

import com.ibm.team.repository.service.IRepositoryItemService; //導入依賴的package包/類
public WorkItemInformationRetriever(IWorkItem workitem, IRepositoryItemService repositoryItemService, ILinkService linkService) {
	this.gson = new GsonBuilder().setDateFormat(TIMESTAMP_DATE_FORMAT).create();
	this.workItem = workitem;
	this.linkService = linkService;
	this.repositoryItemService = repositoryItemService;
}
 
開發者ID:jankoprowski,項目名稱:org.reviewboard.rtc,代碼行數:7,代碼來源:WorkItemInformationRetriever.java

示例7: constructReviewWorkItem

import com.ibm.team.repository.service.IRepositoryItemService; //導入依賴的package包/類
private WorkItemInformationRetriever constructReviewWorkItem(IWorkItem rtcWorkItem) {
	ILinkService linkService = getService(ILinkService.class);
	IRepositoryItemService repositoryItemService = getService(IRepositoryItemService.class);
	WorkItemInformationRetriever workItem = new WorkItemInformationRetriever(rtcWorkItem, repositoryItemService, linkService);
	return workItem;
}
 
開發者ID:jankoprowski,項目名稱:org.reviewboard.rtc,代碼行數:7,代碼來源:ReviewWorkItemParticipant.java

示例8: getChangeSets

import com.ibm.team.repository.service.IRepositoryItemService; //導入依賴的package包/類
public List<IChangeSet> getChangeSets() throws TeamRepositoryException {

		List<IChangeSetHandle> csHandles = getChangeSetHandles();

		IChangeSetHandle[] csHandlesArray = csHandles.toArray(new IChangeSetHandle[0]);

		IItem[] fetchItems = repositoryItemService.fetchItems(csHandlesArray, IRepositoryItemService.COMPLETE);
		List<IChangeSet> changeSets = new ArrayList<IChangeSet>();

		for (IItem iItem : fetchItems) {

			IChangeSet changeSet = (IChangeSet) iItem;

			if (changeSet == null) { // Access to change set is denied.
				continue;
			}

			Date lastChangeDate = changeSet.getLastChangeDate();
			if (this.lastCodeChange == null ||
				this.lastCodeChange.before(lastChangeDate)) {
				this.lastCodeChange = lastChangeDate;
			}

			changeSets.add(changeSet);
		}

		return changeSets;
	}
 
開發者ID:jankoprowski,項目名稱:org.reviewboard.rtc,代碼行數:29,代碼來源:WorkItemInformationRetriever.java

示例9: getProjectAreaName

import com.ibm.team.repository.service.IRepositoryItemService; //導入依賴的package包/類
private String getProjectAreaName() throws TeamRepositoryException {

		IProjectAreaHandle projectAreaHandle = workItem.getProjectArea();
		IProjectArea projectArea = (IProjectArea) repositoryItemService.fetchItem(projectAreaHandle, IRepositoryItemService.COMPLETE);

		return projectArea.getName();
	}
 
開發者ID:jankoprowski,項目名稱:org.reviewboard.rtc,代碼行數:8,代碼來源:WorkItemInformationRetriever.java


注:本文中的com.ibm.team.repository.service.IRepositoryItemService類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。