com.ibm.team.repository.client
![](http://jazz.net/_images/myphoto/647ddd76a082912b375b6f5af0a2b724.jpg)
Hi,
and i want to use this codes:
We are trying to develop a plugin, and that needs to get members by user id.
But its not working serverside.
i add:
"import com.ibm.team.repository.client.ITeamRepository" in advisor.java
and i add
com.ibm.team.repository.client in dependencies
and i want to use this codes:
ITeamRepository teamRepository = (ITeamRepository) currentOwner.getOrigin();
IContributorHandle User = teamRepository.contributorManager().fetchContributorByUserId("sample UI", null);
it isnt give any error but export plugin and restart tomcat its not working.
delete adding and codes. try again export and restart its working.
do you have any idea? please help me
3 answers
![](http://jazz.net/_images/myphoto/647ddd76a082912b375b6f5af0a2b724.jpg)
in the advisor plugin, the AdvisableOperation operation, parameter contains other objects
operation.getProcessArea().getMembers();
has a list of all the members of this project.
in the data is a link to the Auditable service
IAuditableCommon iac = ((ISaveParameter) data).getSaveOperationParameter().getAuditableCommon();
using the audiatble object and the contributor handles, you can retrieve the contributor records to get their info.
operation.getProcessArea().getMembers();
has a list of all the members of this project.
in the data is a link to the Auditable service
IAuditableCommon iac = ((ISaveParameter) data).getSaveOperationParameter().getAuditableCommon();
using the audiatble object and the contributor handles, you can retrieve the contributor records to get their info.
![](http://jazz.net/_images/myphoto/647ddd76a082912b375b6f5af0a2b724.jpg)
hi sam,
thanks for your answer, but i need to use "fetchContributorByUserId" or other way to search and get by user id
my imports:
package methodologyadvisor;
import java.util.List;
import org.eclipse.core.runtime.IProgressMonitor;
import services.GetConstraint;
import services.GetConstraintProxy;
import services.GetConstraintServiceLocator;
import services.IdealRule;
import java.rmi.RemoteException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import javax.xml.rpc.ServiceException;
import com.ibm.team.links.common.IReference;
import com.ibm.team.links.common.registry.IEndPointDescriptor;
import com.ibm.team.process.common.IProcessConfigurationElement;
import com.ibm.team.process.common.advice.AdvisableOperation;
import com.ibm.team.process.common.advice.IAdvisorInfo;
import com.ibm.team.process.common.advice.IAdvisorInfoCollector;
import com.ibm.team.process.common.advice.runtime.IOperationAdvisor;
import com.ibm.team.repository.client.ITeamRepository;
import com.ibm.team.repository.common.IAuditable;
import com.ibm.team.repository.common.IContributor;
import com.ibm.team.repository.common.IContributorHandle;
import com.ibm.team.repository.common.TeamRepositoryException;
import com.ibm.team.repository.service.AbstractService;
import com.ibm.team.repository.service.IRepositoryItemService;
import com.ibm.team.workitem.common.IAuditableCommon;
import com.ibm.team.workitem.common.ISaveParameter;
import com.ibm.team.workitem.common.model.IApproval;
import com.ibm.team.workitem.common.model.IApprovalDescriptor;
import com.ibm.team.workitem.common.model.IApprovals;
import com.ibm.team.workitem.common.model.IWorkItem;
import com.ibm.team.workitem.common.model.IWorkItemHandle;
import com.ibm.team.workitem.common.model.WorkItemApprovals;
import com.ibm.team.workitem.common.model.IWorkItemReferences;
Comments
sam detweiler
Dec 23 '13, 11:34 a.m.also, you can never use and .client methods in a plugin. those are client side only.
the design is
com.ibm.team.xxx.client --- client only
com.ibm.team.xxx.common --- client/and/or server
com.ibm.team.xxx.service --- server only