本文整理匯總了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);
}
}
示例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);
}
示例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);
}
示例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("", "");
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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();
}