Projects >> SOCIETIES-Platform >>3a85645ee7a103428351031da8aa1ca974b04435

Chunk
Conflicting content
public interface ICisManager {
	public String methodsArray[] = {"createCis(String client, String cisName, String cisType, String description, List criteria, String privacyPolicy)",
							 		"deleteCis(String client, String cisId)",
<<<<<<< HEAD
							 		"getCisList(String client, String query)",
=======
							 		"Community[] getCisList(String client, String query)",
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
		//					 		"subscribeToCommunity(String client, String name, String cisId)",
		//					 		"unsubscribeFromCommunity(String client, String cisId)",
							 		"removeMember(String client, String cisId, String memberJid)"
Solution content
public interface ICisManager {
	public String methodsArray[] = {"createCis(String client, String cisName, String cisType, String description, List criteria, String privacyPolicy)",
							 		"deleteCis(String client, String cisId)",
							 		"getCisList(String client, String query)",
		//					 		"subscribeToCommunity(String client, String name, String cisId)",
		//					 		"unsubscribeFromCommunity(String client, String cisId)",
							 		"removeMember(String client, String cisId, String memberJid)"
File
ICisManager.java
Developer's decision
Version 1
Kind of conflict
Other
Chunk
Conflicting content
	};
	
	public static AServiceImplementation convertServiceImplementation(ServiceImplementation serviceImpl) {
<<<<<<< HEAD:api/android/external/src/main/java/org/societies/android/api/servicelifecycle/AServiceImplementation.java
		if(serviceImpl == null) return new AServiceImplementation();

=======
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63:api/android/external/src/main/java/org/societies/android/api/servicelifecycle/AServiceImplementation.java
		AServiceImplementation aservImpl = new AServiceImplementation();
		aservImpl.setServiceClient(serviceImpl.getServiceClient());
		aservImpl.setServiceNameSpace(serviceImpl.getServiceNameSpace());
Solution content
	public static AServiceImplementation convertServiceImplementation(ServiceImplementation serviceImpl) {
		if(serviceImpl == null) return new AServiceImplementation();

	};
	
		AServiceImplementation aservImpl = new AServiceImplementation();
		aservImpl.setServiceClient(serviceImpl.getServiceClient());
		aservImpl.setServiceNameSpace(serviceImpl.getServiceNameSpace());
File
AServiceImplementation.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
	};
	
	public static AServiceResourceIdentifier convertServiceResourceIdentifier(ServiceResourceIdentifier sri) {
<<<<<<< HEAD:api/android/external/src/main/java/org/societies/android/api/servicelifecycle/AServiceResourceIdentifier.java
		if (sri==null) return new AServiceResourceIdentifier();
		
=======
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63:api/android/external/src/main/java/org/societies/android/api/servicelifecycle/AServiceResourceIdentifier.java
		AServiceResourceIdentifier asri = new AServiceResourceIdentifier();
		asri.setIdentifier(sri.getIdentifier());
		asri.setServiceInstanceIdentifier(sri.getServiceInstanceIdentifier());
Solution content
	};
	
	public static AServiceResourceIdentifier convertServiceResourceIdentifier(ServiceResourceIdentifier sri) {
		if (sri==null) return new AServiceResourceIdentifier();
		
		AServiceResourceIdentifier asri = new AServiceResourceIdentifier();
		asri.setIdentifier(sri.getIdentifier());
		asri.setServiceInstanceIdentifier(sri.getServiceInstanceIdentifier());
File
AServiceResourceIdentifier.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
			"changeCSSNodeStatus(String client, AndroidCSSRecord profile)",
			"synchProfile(String client, AndroidCSSRecord profile)",
			"setPresenceStatus(String client, AndroidCSSRecord profile)",
<<<<<<< HEAD
			"findForAllCss(String client, String searchTerm)",
			"findAllCssAdvertisementRecords(String client)",
			"getCssFriends(String client)",
			"getSuggestedFriends(String client)",
			"readProfileRemote(String client, String cssId)",
			"sendFriendRequest(String client, String cssId)",
	};
=======
			"readCSSRecord(String client)",						//TODO
			"getCssFriends(String client)", 					//TODO
			"getSuggestedFriends(String client)",				//TODO
			"readProfileRemote(String client, String cssId)",	//TODO
			"sendFriendRequest(String client, String cssId)"	//TODO
			};
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
	/**
	 * Register with chosen Domain Server
	 * 
Solution content
			"changeCSSNodeStatus(String client, AndroidCSSRecord profile)",
			"synchProfile(String client, AndroidCSSRecord profile)",
			"setPresenceStatus(String client, AndroidCSSRecord profile)",
			"findForAllCss(String client, String searchTerm)",
			"findAllCssAdvertisementRecords(String client)",
			"getCssFriends(String client)",
			"getSuggestedFriends(String client)",
			"readProfileRemote(String client, String cssId)",
			"sendFriendRequest(String client, String cssId)",
	};
	/**
	 * Register with chosen Domain Server
	 * 
File
IAndroidCSSManager.java
Developer's decision
Version 1
Kind of conflict
Comment
Chunk
Conflicting content
	private static CtxModelBeanTranslator instance = new CtxModelBeanTranslator();

	private CtxModelBeanTranslator() {}
<<<<<<< HEAD
	
	/** The logging facility. */
	private static final Logger LOG = LoggerFactory.getLogger(CtxModelBeanTranslator.class);
	
=======

>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
	public static synchronized CtxModelBeanTranslator getInstance() {

		return instance;
Solution content
	private static CtxModelBeanTranslator instance = new CtxModelBeanTranslator();

	private CtxModelBeanTranslator() {}
	
	/** The logging facility. */
	private static final Logger LOG = LoggerFactory.getLogger(CtxModelBeanTranslator.class);
	
	public static synchronized CtxModelBeanTranslator getInstance() {

		return instance;
File
CtxModelBeanTranslator.java
Developer's decision
Version 1
Kind of conflict
Attribute
Comment
Method invocation
Chunk
Conflicting content
			ctxIdBean = new CtxAssociationIdentifierBean(); 
			ctxIdBean.setString(identifier.toString());
		}
<<<<<<< HEAD
		LOG.info("translator ctxIdBean  2 "+ctxIdBean.getString());
		
=======

>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
		return ctxIdBean;
	}
Solution content
			ctxIdBean = new CtxAssociationIdentifierBean(); 
			ctxIdBean.setString(identifier.toString());
		}
		LOG.info("translator ctxIdBean  2 "+ctxIdBean.getString());
		
		return ctxIdBean;
	}
File
CtxModelBeanTranslator.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Chunk
Conflicting content
 public Future> getCssFriends();
 
 public Future> suggestedFriends();
<<<<<<< HEAD
 
 public Future> getFriendRequests();
=======
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
 
 
}
Solution content
 public Future> getCssFriends();
 
 public Future> suggestedFriends();
 
 public Future> getFriendRequests();
 
 
}
File
ICSSLocalManager.java
Developer's decision
Version 1
Kind of conflict
Method interface
Chunk
Conflicting content
		/* Get a list of suggested Friends from cloud Css Manger */
		void suggestedFriends(ICSSManagerCallback callback);
		
<<<<<<< HEAD
		/* Get a list of Pending CSS Friend Requests */
		void getFriendRequests(ICSSManagerCallback callback);
		
=======
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
}
Solution content
		/* Get a list of suggested Friends from cloud Css Manger */
		void suggestedFriends(ICSSManagerCallback callback);
		
		/* Get a list of Pending CSS Friend Requests */
		void getFriendRequests(ICSSManagerCallback callback);
		
}
File
ICSSRemoteManager.java
Developer's decision
Version 1
Kind of conflict
Comment
Method interface
Chunk
Conflicting content
	IServiceControlRemote iServCtrlRemote = null;
	@Transient
	IPrivacyPolicyManager privacyPolicyManager = null;
<<<<<<< HEAD
	
	
	
=======
	@Transient
	IPrivacyDataManager privacyDataManager = null;
	
	
	
	public IPrivacyDataManager getPrivacyDataManager() {
		return privacyDataManager;
	}

	public void setPrivacyDataManager(IPrivacyDataManager privacyDataManager) {
		this.privacyDataManager = privacyDataManager;
	}

>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
	public void setPrivacyPolicyManager(IPrivacyPolicyManager privacyPolicyManager) {
		this.privacyPolicyManager = privacyPolicyManager;
	}
Solution content
	IServiceControlRemote iServCtrlRemote = null;
	@Transient
	IPrivacyPolicyManager privacyPolicyManager = null;
	@Transient
	IPrivacyDataManager privacyDataManager = null;
	
	
	
	public IPrivacyDataManager getPrivacyDataManager() {
		return privacyDataManager;
	}

	public void setPrivacyDataManager(IPrivacyDataManager privacyDataManager) {
		this.privacyDataManager = privacyDataManager;
	}

	public void setPrivacyPolicyManager(IPrivacyPolicyManager privacyPolicyManager) {
		this.privacyPolicyManager = privacyPolicyManager;
	}
File
Cis.java
Developer's decision
Version 2
Kind of conflict
Annotation
Attribute
Method declaration
Chunk
Conflicting content
		cis.fillMembershipCritXMPPobj(m);
		cisAd.setMembershipCrit(m);
		cisAd.setName(cis.getName());
<<<<<<< HEAD
		cisAd.setCssownerid(cis.getCisId());
=======
		cisAd.setCssownerid(cis.getOwnerId());
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
		cisAd.setType(cis.getCisType());
		cisAd.setId(cis.getCisId()); // TODO: check if the id or uri needs the jid
		this.iCisDirRemote.addCisAdvertisementRecord(cisAd);
Solution content
		cis.fillMembershipCritXMPPobj(m);
		cisAd.setMembershipCrit(m);
		cisAd.setName(cis.getName());
		cisAd.setCssownerid(cis.getCisId());
		cisAd.setType(cis.getCisType());
		cisAd.setId(cis.getCisId()); // TODO: check if the id or uri needs the jid
		this.iCisDirRemote.addCisAdvertisementRecord(cisAd);
File
CisManager.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Chunk
Conflicting content
			// client Request for join
			if (c.getAskCisManagerForJoin() != null) {
				CommunityManager response = new CommunityManager();
<<<<<<< HEAD
				AskCisManagerForJoinResponse ar = new AskCisManagerForJoinResponse();
				response.setAskCisManagerForJoinResponse(ar);
=======
				JoinResponse j = new JoinResponse();
				response.setJoinResponse(j);
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
				LOG.info("android request for join received in CIS manager");
				String senderjid = stanza.getFrom().getBareJid();
				LOG.info("sender JID = " + senderjid); 
Solution content
			// client Request for join
			if (c.getAskCisManagerForJoin() != null) {
				CommunityManager response = new CommunityManager();
				AskCisManagerForJoinResponse ar = new AskCisManagerForJoinResponse();
				response.setAskCisManagerForJoinResponse(ar);
				LOG.info("android request for join received in CIS manager");
				String senderjid = stanza.getFrom().getBareJid();
				LOG.info("sender JID = " + senderjid); 
File
CisManager.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
				CisAdvertisementRecord ad = c.getAskCisManagerForJoin().getCisAdv();
				
				if(ad == null){
<<<<<<< HEAD
					ar.setStatus("error");
					return response;
				}
				else{
					JoinCallBackToAndroid jCallback = new JoinCallBackToAndroid(stanza.getFrom(),this.iCommMgr,ad.getId());
					this.joinRemoteCIS(ad, jCallback);// the real return will come in the callback
					
					ar.setStatus("pending");
					return response;
				}
			}
			// END OF client Request for join
=======
					j.setResult(false);
					return response;
				}
				else{
					JoinCallBack jCallback = new JoinCallBack(j);
					this.joinRemoteCIS(ad, jCallback);
				

					// TODO: REMOVE THIS SLEEP
					while(j.getCommunity()== null){// wait for callback
						try {
							Thread.sleep(5 * 1000);
						} catch (InterruptedException e) {
							// TODO Auto-generated catch block
							e.printStackTrace();
						}
					}
					

					return response;
				}
			}
			// END OF DELETE
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
				

			// client Request for leave
Solution content
				CisAdvertisementRecord ad = c.getAskCisManagerForJoin().getCisAdv();
				
				if(ad == null){
					ar.setStatus("error");
					return response;
				}
				else{
					JoinCallBackToAndroid jCallback = new JoinCallBackToAndroid(stanza.getFrom(),this.iCommMgr,ad.getId());
					this.joinRemoteCIS(ad, jCallback);// the real return will come in the callback
					
					ar.setStatus("pending");
					return response;
				}
			}
			// END OF client Request for join
				

			// client Request for leave
File
CisManager.java
Developer's decision
Version 1
Kind of conflict
Comment
Method invocation
Return statement
Variable
While statement
Chunk
Conflicting content
	}


<<<<<<< HEAD
=======
public class JoinCallBack implements ICisManagerCallback{
		
	JoinResponse resp;
	
	public JoinCallBack(JoinResponse resp){
		this.resp = resp;
	}

	@Override
	public void receiveResult(CommunityMethods communityResultObject) {
		if(communityResultObject == null || communityResultObject.getJoinResponse() == null){
			LOG.info("null return on JoinCallBack");
			resp.setResult(false);
		}
		else{
			LOG.info("Result Status: joined CIS " + communityResultObject.getJoinResponse().isResult());
			resp = communityResultObject.getJoinResponse();
		}
	}
}
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
	
	
Solution content
	}


public class JoinCallBack implements ICisManagerCallback{
		
	JoinResponse resp;
	
	public JoinCallBack(JoinResponse resp){
		this.resp = resp;
	}

	@Override
	public void receiveResult(CommunityMethods communityResultObject) {
		if(communityResultObject == null || communityResultObject.getJoinResponse() == null){
			LOG.info("null return on JoinCallBack");
			resp.setResult(false);
		}
		else{
			LOG.info("Result Status: joined CIS " + communityResultObject.getJoinResponse().isResult());
			resp = communityResultObject.getJoinResponse();
		}
	}
}
	
	
	
	
File
CisManager.java
Developer's decision
Version 2
Kind of conflict
Class declaration
Chunk
Conflicting content
			LOG.info("[Dependency Injection] Missing IIdentityManager");
			return false;
		}
<<<<<<< HEAD

		//TODO: add service ones
=======
		if (null == ccmFactory) {
			LOG.info("[Dependency Injection] Missing ICISCommunicationMgrFactory");
			return false;
		}
		if (null == sessionFactory) {
			LOG.info("[Dependency Injection] Missing SessionFactory");
			return false;
		}

>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
		
		if (level >= 1) {
			if (null == iCisDirRemote) {
Solution content
			LOG.info("[Dependency Injection] Missing IIdentityManager");
			return false;
		}
		if (null == ccmFactory) {
			LOG.info("[Dependency Injection] Missing ICISCommunicationMgrFactory");
			return false;
		}
		if (null == sessionFactory) {
			LOG.info("[Dependency Injection] Missing SessionFactory");
			return false;
		}

		
		if (level >= 1) {
			if (null == iCisDirRemote) {
File
CisManager.java
Developer's decision
Version 2
Kind of conflict
Comment
If statement
Chunk
Conflicting content
				LOG.info("[Dependency Injection] Missing IPrivacyPolicyManager");
				return false;
			}
<<<<<<< HEAD
=======
			if (null == privacyDataManager) {
				LOG.info("[Dependency Injection] Missing IPrivacyDataManager");
				return false;
			}

			if (null == negotiator) {
				LOG.info("[Dependency Injection] Missing INegotiation");
				return false;
			}

>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
			if (null == internalCtxBroker) {
				LOG.info("[Dependency Injection] Missing Context Broker");
				return false;
Solution content
				LOG.info("[Dependency Injection] Missing IPrivacyPolicyManager");
				return false;
			}
			if (null == privacyDataManager) {
				LOG.info("[Dependency Injection] Missing IPrivacyDataManager");
				return false;
			}

			if (null == negotiator) {
				LOG.info("[Dependency Injection] Missing INegotiation");
				return false;
			}

			if (null == internalCtxBroker) {
				LOG.info("[Dependency Injection] Missing Context Broker");
				return false;
File
CisManager.java
Developer's decision
Version 2
Kind of conflict
If statement
Chunk
Conflicting content
			crit.setValue1("married");
			l.add(crit);
			
<<<<<<< HEAD
			com.setMembershipCrit(m);*/
=======
			com.setPrivacyPolicy(policy);
			
			com.setMembershipCrit(m);
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
			
			
	
Solution content
			crit.setValue1("married");
			l.add(crit);
			
			com.setMembershipCrit(m);*/
			
			
	
File
CisMgmtTester.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Chunk
Conflicting content
		
	

<<<<<<< HEAD
		@Override
		public void receiveResult(Activityfeed activityFeedObject) {
			if(activityFeedObject ==null || activityFeedObject.getGetActivitiesResponse() == null){
				LOG.info("callback response was empty");
				return;
			}
			if (activityFeedObject.getGetActivitiesResponse().getActivity() != null ){
				if (activityFeedObject.getGetActivitiesResponse().getActivity().size() < 1){
					LOG.info("empty list");
				}else{
					if(activityFeedObject.getGetActivitiesResponse().getActivity().get(0) == null)
						LOG.info("null activity in non null list");
					else
						LOG.info("activity eq " + activityFeedObject.getGetActivitiesResponse().getActivity().get(0).getVerb());
					return;
				}
=======
		public void receiveResult(CommunityMethods communityResultObject) {
			if(communityResultObject == null){
				LOG.info("null return on GetListMembersCallBack");
				return;
			}
			else{
				LOG.info("good return on GetActivitiesCallBack  Callback");
				//LOG.info("Result Status: GetListMembersCallBack from CIS " + communityResultObject.getCommunityJid());
			/*	List l = communityResultObject.getGetActivitiesResponse().getActivity();

				int[] memberCheck = {0,0,0};
				
				Iterator it = l.iterator();
				
				while(it.hasNext()){
					org.societies.api.schema.activity.Activity element = it.next();
					LOG.info("actor " + element.getActor() + " target "  + element.getTarget() + " time "  + element.getPublished() );
			     }*/
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
				
			}else{
				LOG.info("no list object");
Solution content
		
	

		@Override
		public void receiveResult(Activityfeed activityFeedObject) {
			if(activityFeedObject ==null || activityFeedObject.getGetActivitiesResponse() == null){
				LOG.info("callback response was empty");
				return;
			}
			if (activityFeedObject.getGetActivitiesResponse().getActivity() != null ){
				if (activityFeedObject.getGetActivitiesResponse().getActivity().size() < 1){
					LOG.info("empty list");
				}else{
					if(activityFeedObject.getGetActivitiesResponse().getActivity().get(0) == null)
						LOG.info("null activity in non null list");
					else
						LOG.info("activity eq " + activityFeedObject.getGetActivitiesResponse().getActivity().get(0).getVerb());
					return;
				}
				
			}else{
				LOG.info("no list object");
File
CisMgmtTester.java
Developer's decision
Version 1
Kind of conflict
Annotation
Comment
If statement
Method invocation
Method signature
Return statement
Chunk
Conflicting content
	/** The logging facility. */
	private static final Logger LOG = LoggerFactory.getLogger(CommunityCtxInferenceMgr.class);

<<<<<<< HEAD
	@Autowired(required=false)
	private ICtxBroker internalCtxBroker;
	
	@Autowired(required=false)
	private ICommunityCtxEstimationMgr communityContextEstimation;
	
	@Autowired(required=false)
	private ICommManager commMgr;
	
	CommunityCtxInferenceMgr(){
	
		LOG.info(this.getClass() + "instantiated ");
		
		//this.internalCtxBroker = internalCtxBroker;
		//LOG.info(this.getClass() + "internalCtxBroker instantiated "+ this.internalCtxBroker);

		//this.commMgr = commMgr;
		//LOG.info(this.getClass() + "commMgr instantiated " +this.commMgr);
	
		//this.communityCtxEstimation = communityCtxEstimation; 
		//LOG.info(this.getClass() + "communityCtxEstimation instantiated " +this.communityCtxEstimation);
=======
	@Autowired(required=true)
	private ICtxBroker internalCtxBroker;

	@Autowired(required=true)
	private ICommManager commMgr;

	CommunityCtxInferenceMgr(){

		LOG.info(this.getClass() + " instantiated");
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
	}

	@Override
Solution content
	/** The logging facility. */
	private static final Logger LOG = LoggerFactory.getLogger(CommunityCtxInferenceMgr.class);

	@Autowired(required=false)
	private ICtxBroker internalCtxBroker;
	
	@Autowired(required=false)
	private ICommunityCtxEstimationMgr communityContextEstimation;
	
	@Autowired(required=false)
	private ICommManager commMgr;
	
	CommunityCtxInferenceMgr(){
	
		LOG.info(this.getClass() + "instantiated ");
		
		//this.internalCtxBroker = internalCtxBroker;
		//LOG.info(this.getClass() + "internalCtxBroker instantiated "+ this.internalCtxBroker);

		//this.commMgr = commMgr;
		//LOG.info(this.getClass() + "commMgr instantiated " +this.commMgr);
	
		//this.communityCtxEstimation = communityCtxEstimation; 
		//LOG.info(this.getClass() + "communityCtxEstimation instantiated " +this.communityCtxEstimation);
	}

	@Override
File
CommunityCtxInferenceMgr.java
Developer's decision
Version 1
Kind of conflict
Annotation
Attribute
Comment
Method invocation
Method signature
Chunk
Conflicting content
import java.util.Set;
import java.util.concurrent.Future;

<<<<<<< HEAD
=======
import javax.xml.datatype.DatatypeConfigurationException;
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63

import org.societies.api.comm.xmpp.interfaces.ICommManager;
import org.societies.api.context.CtxException;
Solution content
import java.util.Set;
import java.util.concurrent.Future;


import org.societies.api.comm.xmpp.interfaces.ICommManager;
import org.societies.api.context.CtxException;
File
CtxBroker.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
import org.societies.api.context.model.CtxEntityIdentifier;
import org.societies.api.context.model.CtxHistoryAttribute;
import org.societies.api.context.model.CtxIdentifier;
<<<<<<< HEAD

=======
import org.societies.api.context.model.CtxModelBeanTranslator;
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
import org.societies.api.context.model.CtxModelObject;
import org.societies.api.context.model.CtxModelType;
import org.societies.api.internal.context.broker.ICtxBroker;
Solution content
import org.societies.api.context.model.CtxEntityIdentifier;
import org.societies.api.context.model.CtxHistoryAttribute;
import org.societies.api.context.model.CtxIdentifier;

import org.societies.api.context.model.CtxModelObject;
import org.societies.api.context.model.CtxModelType;
import org.societies.api.internal.context.broker.ICtxBroker;
File
CtxBroker.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
import org.societies.api.internal.privacytrust.privacyprotection.model.privacyassessment.IPrivacyLogAppender;
import org.societies.api.identity.IIdentity;
import org.societies.api.identity.IIdentityManager;
<<<<<<< HEAD
=======
import org.societies.api.identity.INetworkNode;
import org.societies.api.identity.IdentityType;
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
import org.societies.api.identity.InvalidFormatException;
import org.societies.api.identity.Requestor;
import org.societies.api.schema.context.model.CtxEntityBean;
Solution content
import org.societies.api.internal.privacytrust.privacyprotection.model.privacyassessment.IPrivacyLogAppender;
import org.societies.api.identity.IIdentity;
import org.societies.api.identity.IIdentityManager;
import org.societies.api.identity.InvalidFormatException;
import org.societies.api.identity.Requestor;
File
CtxBroker.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
import org.societies.api.schema.context.model.CtxEntityBean;
import org.societies.context.broker.api.CtxBrokerException;
import org.societies.context.broker.api.security.ICtxAccessController;
<<<<<<< HEAD
=======
import org.societies.context.broker.impl.comm.CtxBrokerClient;
import org.societies.context.broker.impl.comm.ICtxCallback;
import org.societies.context.broker.impl.comm.callbacks.CreateAttributeCallback;
import org.societies.context.broker.impl.comm.callbacks.CreateEntityCallback;
import org.societies.context.broker.impl.comm.callbacks.LookupCallback;
import org.societies.context.broker.impl.comm.callbacks.RetrieveCtxCallback;
import org.societies.context.broker.impl.comm.callbacks.UpdateCtxCallback;
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Solution content
import org.societies.context.broker.api.CtxBrokerException;
import org.societies.context.broker.api.security.ICtxAccessController;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
File
CtxBroker.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
	public Future createEntity(Requestor requestor, 
			final IIdentity targetCss, final String type) throws CtxException {

<<<<<<< HEAD
		return internalCtxBroker.createEntity(requestor, targetCss, type);
=======
		CtxEntity entity = null;

		if (idMgr.isMine(targetCss)) {

			Future localEntity = internalCtxBroker.createEntity(type);

			return localEntity;

		} else {

			final CreateEntityCallback callback = new CreateEntityCallback();

			// change target to local identity for testing
			//LOG.info("createEntity remote call: target id changed to local" + this.getLocalID());
			//ctxBrokerClient.createRemoteEntity(requestor, this.getLocalID(), type, callback);

			ctxBrokerClient.createRemoteEntity(requestor, targetCss, type, callback);

			synchronized (callback) {
				try {
					callback.wait();
					entity = callback.getResult();
				} catch (InterruptedException e) {

					throw new CtxBrokerException("Interrupted while waiting for remote createEntity");
				}
			}
			//end of remote comm code
		}
		return new AsyncResult(entity);
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
	}

Solution content
	public Future createEntity(Requestor requestor, 
			final IIdentity targetCss, final String type) throws CtxException {

		return internalCtxBroker.createEntity(requestor, targetCss, type);
	}

File
CtxBroker.java
Developer's decision
Version 1
Kind of conflict
If statement
Method invocation
Return statement
Variable
Chunk
Conflicting content
			//end of remote code
	public Future createAttribute( Requestor requestor,
			final CtxEntityIdentifier scope, final String type) throws CtxException {

<<<<<<< HEAD
		return this.internalCtxBroker.createAttribute(requestor, scope,  type);
=======
		if (requestor == null)
			throw new NullPointerException("requestor can't be null");
		if (scope == null)
			throw new NullPointerException("scope can't be null");
		if (type == null)
			throw new NullPointerException("type can't be null");

		CtxAttribute ctxAttribute = null;

		IIdentity targetCss = null; 

		//LOG.info("createAttribute requestor" + requestor);
		//LOG.info("createAttribute scope" + scope.getOwnerId().toString());
		try {
			// change target to local identity for testing
			if(scope.getOwnerId().equals("local")) {
				targetCss = this.getLocalID();
			} else	targetCss = this.idMgr.fromJid(scope.getOwnerId());
			//LOG.info("createAttribute targetCss" + targetCss);

		} catch (InvalidFormatException ife) {
			throw new CtxBrokerException("Could not create IIdentity from JID", ife);
		}

		if (this.idMgr.isMine(targetCss)) {
			//LOG.info("createAttribute local: ");
			try {
				ctxAttribute = internalCtxBroker.createAttribute(scope, type).get();

			} catch (Exception e) {

				throw new CtxBrokerException("Could not create context attribute with scope"
						+ scope + " and type " + type + ": " + e.getLocalizedMessage(), e);
			}

		} else {
			// remote call
			final CreateAttributeCallback callback = new CreateAttributeCallback();

			LOG.info("createAttribute perform remote call targetCSS:"+targetCss +" type:"+type);
			ctxBrokerClient.createRemoteAttribute(requestor, targetCss, scope, type, callback);
			//LOG.info("createAttribute remote call performed ");

			synchronized (callback) {
				try {
					//LOG.info("Attribute creation Callback wait");
					callback.wait();
					ctxAttribute = callback.getResult();
					//LOG.info("ctxAttribute retrieved from callback : "+ctxAttribute.getId());
				} catch (InterruptedException e) {

					throw new CtxBrokerException("Interrupted while waiting for remote ctxAttribute");
				}
			}
		}
		return new AsyncResult(ctxAttribute);
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
	}

	@Override
Solution content
	public Future createAttribute( Requestor requestor,
			final CtxEntityIdentifier scope, final String type) throws CtxException {

		return this.internalCtxBroker.createAttribute(requestor, scope,  type);
	}

	@Override
File
CtxBroker.java
Developer's decision
Version 1
Kind of conflict
Comment
If statement
Method invocation
Return statement
Try statement
Variable
Chunk
Conflicting content
		}
	public Future retrieve( Requestor requestor,
			final CtxIdentifier identifier) throws CtxException {

<<<<<<< HEAD
		return this.internalCtxBroker.retrieve(requestor, identifier);
=======
		if (requestor == null)
			throw new NullPointerException("requestor can't be null");
		if (identifier == null)
			throw new NullPointerException("identifier can't be null");

		if (LOG.isDebugEnabled())
			LOG.debug("Retrieving context model object with id " +  identifier);

		CtxModelObject obj = null;

		IIdentity target;
		try {
			target = this.idMgr.fromJid(identifier.getOwnerId());
		} catch (InvalidFormatException ife) {
			throw new CtxBrokerException("Could not create IIdentity from JID '"
					+ identifier.getOwnerId() + "':" + ife.getLocalizedMessage(), ife);
		}
		this.logRequest(requestor, target);

		// target is a CIS code starts 
		if (IdentityType.CIS.equals(target.getType())) {
			LOG.info("target is a CIS " +target.getJid());
			try {
				// TODO check if CIS is locally maintained or a remote call is necessary
				// TODO add access control (?)
				obj = internalCtxBroker.retrieve(identifier).get();
			} catch (Exception e) {				
				throw new CtxBrokerException(
						"Platform context broker failed to retrieve context model object with id " 
								+ identifier + ": " +  e.getLocalizedMessage(), e);
			}
			return new AsyncResult(obj);

			//target is a CSS code end 
		} else if (IdentityType.CSS.equals(target.getType()) 
				|| IdentityType.CSS_RICH.equals(target.getType())
				|| IdentityType.CSS_LIGHT.equals(target.getType())){


			if (this.idMgr.isMine(target)) {

				this.ctxAccessController.checkPermission(requestor, target,
						new CtxPermission(identifier, CtxPermission.READ));
				try {
					obj = internalCtxBroker.retrieve(identifier).get();
				} catch (Exception e) {
					throw new CtxBrokerException(
							"Platform context broker failed to retrieve context model object with id " 
									+ identifier + ": " +  e.getLocalizedMessage(), e);
				}
				return new AsyncResult(obj);

			} else {
				final RetrieveCtxCallback callback = new RetrieveCtxCallback();
				LOG.info("retrieve CSS context object remote call identifier " +identifier.toString());
				ctxBrokerClient.retrieveRemote(requestor, identifier, callback); 
				///LOG.info("RetrieveCtx remote call performed ");

				synchronized (callback) {
					try {
						//LOG.info("RetrieveCtx remote call result received 1 ");
						callback.wait();
						obj = callback.getResult();
						//LOG.info("RetrieveCtx remote call result received 2 " +obj.getId().toString());
					} catch (InterruptedException e) {

						throw new CtxBrokerException("Interrupted while waiting for remote ctxAttribute");
					}
				}//end of remote code											
			}
		return new AsyncResult(obj);
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
	}

Solution content
	public Future retrieve( Requestor requestor,
			final CtxIdentifier identifier) throws CtxException {

		return this.internalCtxBroker.retrieve(requestor, identifier);
	}

File
CtxBroker.java
Developer's decision
Version 1
Kind of conflict
Comment
If statement
Method invocation
Return statement
Try statement
Variable
Chunk
Conflicting content
	public Future retrieveIndividualEntityId(
			Requestor requestor, final IIdentity cssId) throws CtxException {

<<<<<<< HEAD

		return this.internalCtxBroker.retrieveIndividualEntityId(requestor, cssId);
=======
		if (requestor == null)
			throw new NullPointerException("requestor can't be null");
		if (cssId == null)
			throw new NullPointerException("cssId can't be null");
		if (!IdentityType.CSS.equals(cssId.getType()) && 
				!IdentityType.CSS_RICH.equals(cssId.getType()) &&
				!IdentityType.CSS_LIGHT.equals(cssId.getType()))
			throw new IllegalArgumentException("cssId IdentityType is not CSS");

		if (LOG.isDebugEnabled())
			LOG.debug("Retrieving the CtxEntityIdentifier for CSS " + cssId);

		CtxEntityIdentifier individualEntityId = null;

		if (this.idMgr.isMine(cssId)) {

			IndividualCtxEntity individualEntity;
			try {
				individualEntity = this.internalCtxBroker.retrieveIndividualEntity(cssId).get();
				if (individualEntity != null)
					individualEntityId = individualEntity.getId();
			} catch (Exception e) {

				throw new CtxBrokerException(
						"Could not retrieve IndividualCtxEntity from platform Context Broker: "
								+ e.getLocalizedMessage(), e);
			}
		} else {
			LOG.warn("remote call");

		}

		return new AsyncResult(individualEntityId);
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
	}

Solution content
	public Future retrieveIndividualEntityId(
			Requestor requestor, final IIdentity cssId) throws CtxException {


		return this.internalCtxBroker.retrieveIndividualEntityId(requestor, cssId);
	}

File
CtxBroker.java
Developer's decision
Version 1
Kind of conflict
If statement
Method invocation
Return statement
Variable
Chunk
Conflicting content
		return hocObj;
	}

<<<<<<< HEAD
=======
	/*
	 * @see org.societies.api.context.broker.ICtxBroker#update(org.societies.api.identity.Requestor, org.societies.api.context.model.CtxModelObject)
	 */
	@Override
	@Async
	public Future update(final Requestor requestor,
			final CtxModelObject object) throws CtxException {

		if (object == null)
			throw new NullPointerException("object can't be null");

		CtxModelObject updatedObject = null;
		IIdentity target;
		try {
			target = this.idMgr.fromJid(object.getId().getOwnerId());
		} catch (InvalidFormatException ife) {
			throw new CtxBrokerException("Could not create IIdentity from JID", ife);
		}


		if (IdentityType.CSS.equals(target.getType()) 
				|| IdentityType.CSS_RICH.equals(target.getType())
				|| IdentityType.CSS_LIGHT.equals(target.getType())) {

			if (idMgr.isMine(target)) {

				this.ctxAccessController.checkPermission(requestor, target,	
						new CtxPermission(object.getId(), CtxPermission.WRITE));
				try {
					updatedObject = internalCtxBroker.update(object).get();
				} catch (Exception e) {
					throw new CtxBrokerException(
							"Platform context broker failed to update context model object with id "
									+ object.getId() + ": " +  e.getLocalizedMessage(), e);
				}
				return new AsyncResult(updatedObject);

			} else {
				final UpdateCtxCallback callback = new UpdateCtxCallback();
				LOG.info("update method remote call ctx object id:"+object.getId());
				ctxBrokerClient.updateRemote(requestor, object, callback);
				//LOG.info("UpdateCtx remote call performed ");

				synchronized (callback) {
					try {
						//LOG.info("UpdateCtx remote call result received 1 ");
						callback.wait();
						updatedObject = callback.getResult();
						//LOG.info("UpdateCtx remote call result received 2 " +updatedObject.getId().toString());
					} catch (InterruptedException e) {

						throw new CtxBrokerException("Interrupted while waiting for remote ctxAttribute");
					}
				}
			}
		}else if (IdentityType.CIS.equals(target.getType())){
			try {
				updatedObject = internalCtxBroker.update(object).get();
			} catch (Exception e) {
				throw new CtxBrokerException(
						"Platform context broker failed to update context model object with id "
								+ object.getId() + ": " +  e.getLocalizedMessage(), e);
			}
		}

		return new AsyncResult(updatedObject);
	}

	@Override
	@Async
	public Future retrieveAdministratingCSS(
			final Requestor requestor, CtxEntityIdentifier communityEntId) throws CtxException {

		// change return type
		//Future admEntity = internalCtxBroker.retrieveAdministratingCSS(communityEntId);
		return null;
	}
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63

	@Override
	@Async
Solution content
		return hocObj;
	}


	@Override
	@Async
File
CtxBroker.java
Developer's decision
Version 1
Kind of conflict
Annotation
Comment
Method declaration
Chunk
Conflicting content


<<<<<<< HEAD
=======
	/*
	 * @see org.societies.api.context.broker.ICtxBroker#lookup(org.societies.api.identity.Requestor, org.societies.api.identity.IIdentity, org.societies.api.context.model.CtxModelType, java.lang.String)
	 */
	@Override
	@Async
	public Future> lookup(final Requestor requestor,
			final IIdentity target, final CtxModelType modelType,
			final String type) throws CtxException {

		if (requestor == null)
			throw new NullPointerException("requestor can't be null");
		if (target == null)
			throw new NullPointerException("target can't be null");
		if (modelType == null)
			throw new NullPointerException("modelType can't be null");
		if (type == null)
			throw new NullPointerException("type can't be null");

		final List localCtxIdListResult = new ArrayList();
		List remoteCtxIdListResult = new ArrayList();

		//LOG.info("lookup method called requestor:"+ requestor.toString());
		//LOG.info("lookup method called target:"+ target.getJid());
		//LOG.info("lookup method called modelType:"+ modelType.toString());
		//LOG.info("lookup method called type:"+ type);


		if (this.idMgr.isMine(target)) {
			//LOG.info("lookup local call 1");
			List ctxIdListFromDb;
			try {
				ctxIdListFromDb = internalCtxBroker.lookup(modelType, type).get();

				//if (ctxIdListFromDb != null) LOG.info("lookup local call 2 data before access control : " + ctxIdListFromDb);


			} catch (Exception e) {
				throw new CtxBrokerException("Platform context broker failed to lookup " 
						+ modelType	+ " objects of type " + type + ": " 
						+  e.getLocalizedMessage(), e);
			} 
			if (!ctxIdListFromDb.isEmpty()) {

				for (final CtxIdentifier ctxId : ctxIdListFromDb) {		
					try {
						this.ctxAccessController.checkPermission(requestor, target,
								new CtxPermission(ctxId, CtxPermission.READ));
						localCtxIdListResult.add(ctxId);


					} catch (CtxAccessControlException cace) {
						// do nothing
					}
				}
				if (localCtxIdListResult.isEmpty())
					throw new CtxAccessControlException("Could not lookup " 
							+ modelType	+ " objects of type " + type 
							+ ": Access denied");

				if (localCtxIdListResult!=null)	LOG.info("lookup local call 3: " + localCtxIdListResult);


				return new AsyncResult>(localCtxIdListResult);
			}
		} else {
			//LOG.info("lookup remote call 1 requestor" + requestor);
			//LOG.info("lookup remote call 1 target" + target);

			final LookupCallback callback = new LookupCallback();

			// Testing code : change target to local identity 
			//LOG.info("lookup remote call: target id changed to local " + this.getLocalID());
			//ctxBrokerClient.lookupRemote(requestor,  this.getLocalID() , modelType, type, callback);
			LOG.info("lookup remote call target id:" + target.toString());
			//real code
			ctxBrokerClient.lookupRemote(requestor, target, modelType, type, callback);
			//LOG.info("lookup remote call 2");
			synchronized (callback) {

				try {
					callback.wait();
					remoteCtxIdListResult = callback.getResult();
					//LOG.info("lookup remote call 3" + callback.getResult());
				} catch (InterruptedException e) {

					throw new CtxBrokerException("Interrupted while waiting for remote createEntity");
				}
			}
		}

		return new AsyncResult>(remoteCtxIdListResult);
	}

	@Override
	@Async
	public Future> lookupEntities(
			final Requestor requestor, final IIdentity targetCss, 
			final String entityType, final String attribType,
			final Serializable minAttribValue, final Serializable maxAttribValue)
					throws CtxException {

		Future> entIdList = null;

		if (idMgr.isMine(targetCss)){
			entIdList = internalCtxBroker.lookupEntities(entityType, attribType, minAttribValue, maxAttribValue);
		}else{
			LOG.info("remote call");
		}
		return entIdList;
	}

	/*
	 * @see org.societies.api.context.broker.ICtxBroker#registerForChanges(org.societies.api.identity.IIdentity, org.societies.api.context.event.CtxChangeEventListener, org.societies.api.context.model.CtxIdentifier)
	 */
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
	@Override
	@Async
	public void registerForChanges(final Requestor requestor,
Solution content


	@Override
	@Async
	public void registerForChanges(final Requestor requestor,
File
CtxBroker.java
Developer's decision
Version 1
Kind of conflict
Annotation
Comment
Method declaration
Chunk
Conflicting content
		return obj;
	}

<<<<<<< HEAD

	@Override
	@Async
	public Future> retrieveFuture(
			final Requestor requestor, CtxAttributeIdentifier attrId, Date date) throws CtxException {

		Future> futureObj = null;

		IIdentity targetCss;
		try {
			targetCss = this.idMgr.fromJid(attrId.getOwnerId());
		} catch (InvalidFormatException ife) {
			throw new CtxBrokerException("Could not create IIdentity from JID '"
					+ attrId.getOwnerId() + "': " + ife.getLocalizedMessage(), ife);
		}

		this.logRequest(requestor, targetCss);

		if (idMgr.isMine(targetCss)) {

			futureObj = internalCtxBroker.retrieveFuture(attrId, date);
		} else {

			LOG.info("remote call");
		}
		return futureObj;
	}

	@Override
	@Async
	public Future> retrieveFuture(
			final Requestor requestor, CtxAttributeIdentifier attrId,
			int modificationIndex) throws CtxException {

		Future> futureObj = null;

		IIdentity targetCss;
		try {
			targetCss = this.idMgr.fromJid(attrId.getOwnerId());
		} catch (InvalidFormatException ife) {
			throw new CtxBrokerException("Could not create IIdentity from JID '"
					+ attrId.getOwnerId() + "': " + ife.getLocalizedMessage(), ife);
		}

		this.logRequest(requestor, targetCss);

		if (idMgr.isMine(targetCss)) {

			futureObj = internalCtxBroker.retrieveFuture(attrId, modificationIndex);
		} else {

			LOG.info("remote call");
		}
		return futureObj;
	}


	/**
	 * Sets the IIdentity Mgmt service reference.
	 * 
	 * @param idMgr
	 *            the IIdentity Mgmt service reference to set.
	 */
	public void setIdentityMgr(IIdentityManager idMgr) {

		this.idMgr = idMgr;
	}


=======
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
	private void logRequest(final Requestor requestor, final IIdentity target) {

		try {
Solution content
		return obj;
	}


	@Override
	@Async
	public Future> retrieveFuture(
			final Requestor requestor, CtxAttributeIdentifier attrId, Date date) throws CtxException {

		Future> futureObj = null;

		IIdentity targetCss;
		try {
			targetCss = this.idMgr.fromJid(attrId.getOwnerId());
		} catch (InvalidFormatException ife) {
			throw new CtxBrokerException("Could not create IIdentity from JID '"
					+ attrId.getOwnerId() + "': " + ife.getLocalizedMessage(), ife);
		}

		this.logRequest(requestor, targetCss);

		if (idMgr.isMine(targetCss)) {

			futureObj = internalCtxBroker.retrieveFuture(attrId, date);
		} else {

			LOG.info("remote call");
		}
		return futureObj;
	}

	@Override
	@Async
	public Future> retrieveFuture(
			final Requestor requestor, CtxAttributeIdentifier attrId,
			int modificationIndex) throws CtxException {

		Future> futureObj = null;

		IIdentity targetCss;
		try {
			targetCss = this.idMgr.fromJid(attrId.getOwnerId());
		} catch (InvalidFormatException ife) {
			throw new CtxBrokerException("Could not create IIdentity from JID '"
					+ attrId.getOwnerId() + "': " + ife.getLocalizedMessage(), ife);
		}

		this.logRequest(requestor, targetCss);

		if (idMgr.isMine(targetCss)) {

			futureObj = internalCtxBroker.retrieveFuture(attrId, modificationIndex);
		} else {

			LOG.info("remote call");
		}
		return futureObj;
	}


	/**
	 * Sets the IIdentity Mgmt service reference.
	 * 
	 * @param idMgr
	 *            the IIdentity Mgmt service reference to set.
	 */
	public void setIdentityMgr(IIdentityManager idMgr) {

		this.idMgr = idMgr;
	}


	private void logRequest(final Requestor requestor, final IIdentity target) {

		try {
File
CtxBroker.java
Developer's decision
Version 1
Kind of conflict
Annotation
Comment
Method declaration
Chunk
Conflicting content
		}
	}

<<<<<<< HEAD
	/**
	 * Sets the {@link ICtxAccessController} service reference.
	 *
	 * @param ctxAccessController
	 * the {@link ICtxAccessController} service reference to set
	 */
	public void setCtxAccessController(ICtxAccessController ctxAccessController) {

		this.ctxAccessController = ctxAccessController;
	}


=======
	/*
	 * 
	 */
	private IIdentity getLocalID(){
		INetworkNode cssNodeId = this.idMgr.getThisNetworkNode();
		IIdentity localID = null;
		try {
			localID = this.idMgr.fromJid(cssNodeId.getBareJid());
			//LOG.info("changed to local id " + localID);
		} catch (InvalidFormatException e1) {
			// TODO Auto-generated catch block
			e1.printStackTrace();
		}
		return localID;
	}

>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
}
Solution content
		}
	}

	/**
	 * Sets the {@link ICtxAccessController} service reference.
	 *
	 * @param ctxAccessController
	 * the {@link ICtxAccessController} service reference to set
	 */
	public void setCtxAccessController(ICtxAccessController ctxAccessController) {

		this.ctxAccessController = ctxAccessController;
	}


}
File
CtxBroker.java
Developer's decision
Version 1
Kind of conflict
Comment
Method declaration
Chunk
Conflicting content
	public Future createAttribute(CtxEntityIdentifier scope,
			String type) throws CtxException {

<<<<<<< HEAD
		return this.createAttribute(null, scope, type);
=======
		CtxAttribute attribute = null;

		try {
			IIdentity scopeID = this.idMgr.fromJid(scope.getOwnerId());

			if (IdentityType.CSS.equals(scopeID.getType()) 
					|| IdentityType.CSS_RICH.equals(scopeID.getType())
					|| IdentityType.CSS_LIGHT.equals(scopeID.getType())) {

				attribute =	this.userCtxDBMgr.createAttribute(scope, type);	
				LOG.info("Context CREATE ATTRIBUTE performed for context ID:"+attribute.getId()+" of type:"+attribute.getType());			
				//TODO origin type should be set in db manager
				if (attribute.getQuality().getOriginType() == null) {
					attribute.getQuality().setOriginType(CtxOriginType.MANUALLY_SET);
				}
				
				
			} else if (IdentityType.CIS.equals(scopeID.getType())){

				attribute =	this.communityCtxDBMgr.createCommunityAttribute(scope, type);
				LOG.info("Community Context CREATE ATTRIBUTE performed for context ID:"+attribute.getId()+" of type:"+attribute.getType());
			} 
		} catch (InvalidFormatException ife) {

			throw new CtxBrokerException(scope.getOwnerId()
					+ ": Invalid owner IIdentity String: " 
					+ ife.getLocalizedMessage(), ife);
		}

		return new AsyncResult(attribute);
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
	}

Solution content
	public Future createAttribute(CtxEntityIdentifier scope,
			String type) throws CtxException {

		return this.createAttribute(null, scope, type);
	}

File
InternalCtxBroker.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Return statement
Try statement
Variable
Chunk
Conflicting content
	@Async
	public Future createEntity(String type) throws CtxException {

<<<<<<< HEAD

		return this.createEntity(null, null, type);
=======
		final CtxEntity entity = 
				this.userCtxDBMgr.createEntity(type);
		
		LOG.info("Context CREATE ENTITY performed for context ID:"+entity.getId()+" of type:"+entity.getType());
		return new AsyncResult(entity);
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
	}

	@Override
Solution content
	@Async
	public Future createEntity(String type) throws CtxException {


		return this.createEntity(null, null, type);
	}

	@Override
File
InternalCtxBroker.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Return statement
Variable
Chunk
Conflicting content
<<<<<<< HEAD
			} else {

				cssOwnerEnt = this.userCtxDBMgr.createIndividualCtxEntity(ownerType); 

=======
			
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
				final CtxAttribute cssIdAttr = this.userCtxDBMgr.createAttribute(
						cssOwnerEnt.getId(), CtxAttributeTypes.ID); 
Solution content
			} else {

				cssOwnerEnt = this.userCtxDBMgr.createIndividualCtxEntity(ownerType); 

				final CtxAttribute cssIdAttr = this.userCtxDBMgr.createAttribute(
						cssOwnerEnt.getId(), CtxAttributeTypes.ID); 
File
InternalCtxBroker.java
Developer's decision
Version 1
Kind of conflict
Blank
Chunk
Conflicting content
	@Async
	public Future retrieve(CtxIdentifier identifier) throws CtxException {

<<<<<<< HEAD
		return this.retrieve(null, identifier);
=======
		
		if (identifier == null)
			throw new NullPointerException("identifier can't be null");
		
		
		final CtxModelObject modelObjReturn;
		//CtxAttribute inferenceOutcome;
		final IIdentity targetCss;

		try {
			targetCss = this.idMgr.fromJid(identifier.getOwnerId());
		} catch (InvalidFormatException ife) {
			throw new CtxBrokerException("Could not create IIdentity from JID '"
					+ identifier.getOwnerId() + "': " + ife.getLocalizedMessage(), ife);
		}
		
		this.logRequest(null, targetCss);

		if (IdentityType.CSS.equals(targetCss.getType()) 
				|| IdentityType.CSS_RICH.equals(targetCss.getType())
				|| IdentityType.CSS_LIGHT.equals(targetCss.getType())){

		//	LOG.info("retrieving css " + targetCss.getType());
			modelObjReturn = this.userCtxDBMgr.retrieve(identifier);	

		}else if (IdentityType.CIS.equals(targetCss.getType())){

	//		LOG.info("retrieving cis " + targetCss.getType());
			modelObjReturn = this.communityCtxDBMgr.retrieve(identifier);

		} else throw new CtxBrokerException("objects identifier does not correspond to a css or a cis");

		// TO DO following lines initiate inference, uncomment when inference code is ready
		/*
		if ( modelObjReturn != null && modelObjReturn instanceof CtxAttribute){
			inferenceOutcome = this.initiateInference((CtxAttribute) modelObjReturn);
		} // TO DO integrate inference outcome with returned value
		 */
		
		LOG.info("Context RETRIEVE performed for context ID:"+modelObjReturn.getId());
		return new AsyncResult(modelObjReturn);
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
	}	

Solution content
	@Async
	public Future retrieve(CtxIdentifier identifier) throws CtxException {

		return this.retrieve(null, identifier);
	}	

File
InternalCtxBroker.java
Developer's decision
Version 1
Kind of conflict
Comment
If statement
Method invocation
Return statement
Try statement
Variable
Chunk
Conflicting content
			attributeReturn = (CtxAttribute) this.update(currentAttribute).get();
			String valueString = CtxBrokerUtils.attributeValueAsString(value);
			LOG.info("Context UPDATE performed for context ID:"+attributeReturn.getId()+" of type:"+attributeReturn.getType()+" with value:" + valueString);
<<<<<<< HEAD

=======
			
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
		} catch (InterruptedException e) {
			throw new CtxBrokerException("updateAttribute including value failed " + e.getLocalizedMessage());
		} catch (ExecutionException e) {
Solution content
			attributeReturn = (CtxAttribute) this.update(currentAttribute).get();
			String valueString = CtxBrokerUtils.attributeValueAsString(value);
			LOG.info("Context UPDATE performed for context ID:"+attributeReturn.getId()+" of type:"+attributeReturn.getType()+" with value:" + valueString);

		} catch (InterruptedException e) {
			throw new CtxBrokerException("updateAttribute including value failed " + e.getLocalizedMessage());
		} catch (ExecutionException e) {
File
InternalCtxBroker.java
Developer's decision
Version 1
Kind of conflict
Blank
Chunk
Conflicting content
		try {
			final CommunityCtxEntity communityEntity = (CommunityCtxEntity) this.retrieve(communityId).get();

<<<<<<< HEAD
			Set commMembersSet = communityEntity.getMembers();
			result = new ArrayList(commMembersSet);

=======
		return new AsyncResult(communityEntityId);
	}
	
	@Override
	public Future> retrieveCommunityMembers(
			CtxEntityIdentifier communityId) throws CtxException {
		
		List result = null; 
		
		if (communityId == null)
			throw new NullPointerException("communityId can't be null");
		
		try {
			final CommunityCtxEntity communityEntity = (CommunityCtxEntity) this.retrieve(communityId).get();
			
			Set commMembersSet = communityEntity.getMembers();
			result = new ArrayList(commMembersSet);
	
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
Solution content
		try {
			final CommunityCtxEntity communityEntity = (CommunityCtxEntity) this.retrieve(communityId).get();

			Set commMembersSet = communityEntity.getMembers();
			result = new ArrayList(commMembersSet);

		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
File
InternalCtxBroker.java
Developer's decision
Version 1
Kind of conflict
Annotation
Cast expression
If statement
Method invocation
Method signature
Return statement
Try statement
Variable
Chunk
Conflicting content
	//createEntity(final Requestor requestor,final IIdentity targetCss, final String type)
	public void createRemoteEntity(Requestor requestor,IIdentity targetCss, String type, ICtxCallback callback) throws CtxException{
<<<<<<< HEAD

=======
		
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
		INetworkNode cssNodeId = this.commManager.getIdManager().getThisNetworkNode();
		final String cssOwnerStr = cssNodeId.getBareJid();
			
Solution content
	//createEntity(final Requestor requestor,final IIdentity targetCss, final String type)
	public void createRemoteEntity(Requestor requestor,IIdentity targetCss, String type, ICtxCallback callback) throws CtxException{

		INetworkNode cssNodeId = this.commManager.getIdManager().getThisNetworkNode();
		final String cssOwnerStr = cssNodeId.getBareJid();
File
CtxBrokerClient.java
Developer's decision
Version 1
Kind of conflict
Blank
Chunk
Conflicting content
		final String cssOwnerStr = cssNodeId.getBareJid();
			
		IIdentity toIdentity;
<<<<<<< HEAD

=======
		
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
		try {
			//to be removed
			//toIdentity = this.commManager.getIdManager().fromJid(cssOwnerStr);
Solution content
		final String cssOwnerStr = cssNodeId.getBareJid();

		IIdentity toIdentity;

		try {
			//to be removed
			//toIdentity = this.commManager.getIdManager().fromJid(cssOwnerStr);
File
CtxBrokerClient.java
Developer's decision
Version 1
Kind of conflict
Blank
Chunk
Conflicting content
			//to be removed
			//toIdentity = this.commManager.getIdManager().fromJid(cssOwnerStr);
			//LOG.error(" toIdentity " + toIdentity);
<<<<<<< HEAD

=======
			
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
			toIdentity = targetCss;
			LOG.info("toIdentity " + toIdentity);
Solution content
			//to be removed
			//toIdentity = this.commManager.getIdManager().fromJid(cssOwnerStr);
			//LOG.error(" toIdentity " + toIdentity);

			toIdentity = targetCss;
			LOG.info("toIdentity " + toIdentity);
File
CtxBrokerClient.java
Developer's decision
Version 1
Kind of conflict
Blank
Chunk
Conflicting content
			//create the message to be sent
			Stanza stanza = new Stanza(toIdentity);
<<<<<<< HEAD
			//		LOG.error("SKATA stanza " + stanza.getTo());
			CtxBrokerRequestBean cbPacket = new CtxBrokerRequestBean();
			cbPacket.setMethod(BrokerMethodBean.CREATE_ENTITY);
			// use the create entity method : createCtxEntity(String type)
			//	LOG.error("SKATA 1 " );
			CtxBrokerCreateEntityBean ctxBrokerCreateEntityBean = new CtxBrokerCreateEntityBean();
			//LOG.error("SKATA 2 " );
			RequestorBean requestorBean = createRequestorBean(requestor);
			//			LOG.error("SKATA 3 " );
			ctxBrokerCreateEntityBean.setRequestor(requestorBean);
			//		LOG.error("SKATA 4 " );
			ctxBrokerCreateEntityBean.setTargetCss(toIdentity.getBareJid());
			//	LOG.error("SKATA 5 " );
			ctxBrokerCreateEntityBean.setType(type);
			//LOG.info("SKATA 6 before ");
			cbPacket.setCreateEntity(ctxBrokerCreateEntityBean);
			//	LOG.info("SKATA 7 before sendIQGet"+ctxBrokerCreateEntityBean);

			this.ctxBrokerCommCallback.addRequestingClient(stanza.getId(), callback);
			//	LOG.info("SKATA 8 before addRequestingClient "+stanza.getId());

			this.commManager.sendIQGet(stanza, cbPacket, this.ctxBrokerCommCallback);
			//	LOG.info("SKATA 7 CreateEntity send  ");

=======
	//		LOG.error("SKATA stanza " + stanza.getTo());
			CtxBrokerRequestBean cbPacket = new CtxBrokerRequestBean();
			cbPacket.setMethod(BrokerMethodBean.CREATE_ENTITY);
			// use the create entity method : createCtxEntity(String type)
		//	LOG.error("SKATA 1 " );
			CtxBrokerCreateEntityBean ctxBrokerCreateEntityBean = new CtxBrokerCreateEntityBean();
			//LOG.error("SKATA 2 " );
			RequestorBean requestorBean = createRequestorBean(requestor);
//			LOG.error("SKATA 3 " );
			ctxBrokerCreateEntityBean.setRequestor(requestorBean);
	//		LOG.error("SKATA 4 " );
			ctxBrokerCreateEntityBean.setTargetCss(toIdentity.getBareJid());
		//	LOG.error("SKATA 5 " );
			ctxBrokerCreateEntityBean.setType(type);
		//LOG.info("SKATA 6 before ");
			cbPacket.setCreateEntity(ctxBrokerCreateEntityBean);
		//	LOG.info("SKATA 7 before sendIQGet"+ctxBrokerCreateEntityBean);

			this.ctxBrokerCommCallback.addRequestingClient(stanza.getId(), callback);
		//	LOG.info("SKATA 8 before addRequestingClient "+stanza.getId());

			this.commManager.sendIQGet(stanza, cbPacket, this.ctxBrokerCommCallback);
		//	LOG.info("SKATA 7 CreateEntity send  ");
	
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
		} catch (Exception e) {

			throw new CtxBrokerException("Could not create remote entity: "
Solution content
			//create the message to be sent
			Stanza stanza = new Stanza(toIdentity);
			//		LOG.error("SKATA stanza " + stanza.getTo());
			CtxBrokerRequestBean cbPacket = new CtxBrokerRequestBean();
			cbPacket.setMethod(BrokerMethodBean.CREATE_ENTITY);
			// use the create entity method : createCtxEntity(String type)
			//	LOG.error("SKATA 1 " );
			CtxBrokerCreateEntityBean ctxBrokerCreateEntityBean = new CtxBrokerCreateEntityBean();
			//LOG.error("SKATA 2 " );
			RequestorBean requestorBean = createRequestorBean(requestor);
			//			LOG.error("SKATA 3 " );
			ctxBrokerCreateEntityBean.setRequestor(requestorBean);
			//		LOG.error("SKATA 4 " );
			ctxBrokerCreateEntityBean.setTargetCss(toIdentity.getBareJid());
			//	LOG.error("SKATA 5 " );
			ctxBrokerCreateEntityBean.setType(type);
			//LOG.info("SKATA 6 before ");
			cbPacket.setCreateEntity(ctxBrokerCreateEntityBean);
			//	LOG.info("SKATA 7 before sendIQGet"+ctxBrokerCreateEntityBean);

			this.ctxBrokerCommCallback.addRequestingClient(stanza.getId(), callback);
			//	LOG.info("SKATA 8 before addRequestingClient "+stanza.getId());

			this.commManager.sendIQGet(stanza, cbPacket, this.ctxBrokerCommCallback);
			//	LOG.info("SKATA 7 CreateEntity send  ");

		} catch (Exception e) {

			throw new CtxBrokerException("Could not create remote entity: "
File
CtxBrokerClient.java
Developer's decision
Version 1
Kind of conflict
Comment
Method invocation
Variable
Chunk
Conflicting content
	}

		// creating the identity of the CtxBroker that will be contacted
		IIdentity toIdentity = null;
<<<<<<< HEAD

		try {
			//toIdentity = this.commManager.getIdManager().fromJid("john.societies.local");
			toIdentity = targetCss;

			//create the message to be sent
			Stanza stanza = new Stanza(toIdentity);

			CtxBrokerRequestBean cbPacket = new CtxBrokerRequestBean();

			cbPacket.setMethod(BrokerMethodBean.LOOKUP);
			CtxBrokerLookupBean ctxBrokerLookupBean = new CtxBrokerLookupBean();
			//lookup(final Requestor requestor,final IIdentity target, final CtxModelType modelType,final String type)
			// four params 

			//1.requestor
			RequestorBean requestorBean = createRequestorBean(requestor);
			ctxBrokerLookupBean.setRequestor(requestorBean);

			//2. target id
			ctxBrokerLookupBean.setTargetCss(toIdentity.getBareJid());
			//LOG.info("2 CtxBrokerLookupBean toIdentity.getBareJid() "+toIdentity.getBareJid());

			//3. model type
			CtxModelBeanTranslator ctxBeanTranslator = CtxModelBeanTranslator.getInstance();
			CtxModelTypeBean modelTypeBeanValue = ctxBeanTranslator.CtxModelTypeBeanFromCtxModelType(modelType);
			ctxBrokerLookupBean.setModelType(modelTypeBeanValue);

			// 4 . type
			ctxBrokerLookupBean.setType(type);
			//LOG.info("1 CtxBrokerLookupBean type "+type);

			//	LOG.info("CtxBrokerLookupBean ready "+cbPacket.getLookup());
			cbPacket.setLookup(ctxBrokerLookupBean);

			//LOG.info("3 CtxBrokerLookupBean before sendIQGet");

			this.ctxBrokerCommCallback.addRequestingClient(stanza.getId(), callback);
			//	LOG.info("4 CtxBrokerLookupBean before sendIQGet stanza.getId() "+stanza.getId());

			this.commManager.sendIQGet(stanza, cbPacket, this.ctxBrokerCommCallback);
			//		LOG.info("5  IQGet send");
		} catch (CommunicationException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 
=======

		try {
			//toIdentity = this.commManager.getIdManager().fromJid("john.societies.local");
			toIdentity = targetCss;

			//create the message to be sent
			Stanza stanza = new Stanza(toIdentity);

			CtxBrokerRequestBean cbPacket = new CtxBrokerRequestBean();

			cbPacket.setMethod(BrokerMethodBean.LOOKUP);
			CtxBrokerLookupBean ctxBrokerLookupBean = new CtxBrokerLookupBean();
			//lookup(final Requestor requestor,final IIdentity target, final CtxModelType modelType,final String type)
			// four params 

			//1.requestor
			RequestorBean requestorBean = createRequestorBean(requestor);
			ctxBrokerLookupBean.setRequestor(requestorBean);

			//2. target id
			ctxBrokerLookupBean.setTargetCss(toIdentity.getBareJid());
			//LOG.info("2 CtxBrokerLookupBean toIdentity.getBareJid() "+toIdentity.getBareJid());

			//3. model type
			CtxModelBeanTranslator ctxBeanTranslator = CtxModelBeanTranslator.getInstance();
			CtxModelTypeBean modelTypeBeanValue = ctxBeanTranslator.CtxModelTypeBeanFromCtxModelType(modelType);
			ctxBrokerLookupBean.setModelType(modelTypeBeanValue);

			// 4 . type
			ctxBrokerLookupBean.setType(type);
			//LOG.info("1 CtxBrokerLookupBean type "+type);

		//	LOG.info("CtxBrokerLookupBean ready "+cbPacket.getLookup());
			cbPacket.setLookup(ctxBrokerLookupBean);

			//LOG.info("3 CtxBrokerLookupBean before sendIQGet");

			this.ctxBrokerCommCallback.addRequestingClient(stanza.getId(), callback);
		//	LOG.info("4 CtxBrokerLookupBean before sendIQGet stanza.getId() "+stanza.getId());

			this.commManager.sendIQGet(stanza, cbPacket, this.ctxBrokerCommCallback);
	//		LOG.info("5  IQGet send");
		} catch (CommunicationException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 

	public void retrieveRemote(Requestor requestor, CtxIdentifier identifier, ICtxCallback callback){

		// creating the identity of the CtxBroker that will be contacted
		IIdentity toIdentity = null;
		//comment after testing
		try {
			//real code
			toIdentity = this.commManager.getIdManager().fromJid(identifier.getOwnerId());

			//testing code
			//toIdentity = this.commManager.getIdManager().fromJid("john.societies.local");
		} catch (InvalidFormatException e1) {
			e1.printStackTrace();
		}

		try {		
			//create the message to be sent
			Stanza stanza = new Stanza(toIdentity);
			CtxBrokerRequestBean cbPacket = new CtxBrokerRequestBean();
			cbPacket.setMethod(BrokerMethodBean.RETRIEVE);

			// use the method : retrieve
			CtxBrokerRetrieveBean ctxBrokerRetrieveBean = new CtxBrokerRetrieveBean();

			CtxModelBeanTranslator ctxBeanTranslator = CtxModelBeanTranslator.getInstance();
			// add the signatures of the method
			CtxIdentifierBean ctxIdBean = ctxBeanTranslator.fromCtxIdentifier(identifier);
			ctxBrokerRetrieveBean.setId(ctxIdBean);

			RequestorBean requestorBean = createRequestorBean(requestor);
			ctxBrokerRetrieveBean.setRequestor(requestorBean);

			cbPacket.setRetrieve(ctxBrokerRetrieveBean);
		//	LOG.info("ctxBrokerRetrieveBean ready "+cbPacket.getRetrieve());

			this.ctxBrokerCommCallback.addRequestingClient(stanza.getId(), callback);

			this.commManager.sendIQGet(stanza, cbPacket, this.ctxBrokerCommCallback);
		} catch (CommunicationException e1) {
			// TODO Auto-generated catch block
			e1.printStackTrace();
		}
	}

	public void updateRemote(Requestor requestor, CtxModelObject object, ICtxCallback callback){
		
		IIdentity toIdentity = null;
		try {
			//real code
			toIdentity = this.commManager.getIdManager().fromJid(object.getOwnerId());
			//testing code
			//toIdentity = this.commManager.getIdManager().fromJid("john.societies.local");
		} catch (InvalidFormatException e1) {
			e1.printStackTrace();
		}

		try {
			//create the message to be sent
			Stanza stanza = new Stanza(toIdentity);
			CtxBrokerRequestBean cbPacket = new CtxBrokerRequestBean();
			cbPacket.setMethod(BrokerMethodBean.UPDATE);
			
			CtxBrokerUpdateBean ctxBrokerUpdateBean = new CtxBrokerUpdateBean();
			
			RequestorBean requestorBean = createRequestorBean(requestor);
			ctxBrokerUpdateBean.setRequestor(requestorBean);

			CtxModelBeanTranslator ctxBeanTranslator = CtxModelBeanTranslator.getInstance();
			CtxModelObjectBean objectBean = ctxBeanTranslator.fromCtxModelObject(object);
			
	//		LOG.info("updateRemote 1 ctxBrokerUpdateBean  "+objectBean.getId());
			ctxBrokerUpdateBean.setCtxModelOject(objectBean);

		//	LOG.info("updateRemote 2 ctxBrokerUpdateBean  "+objectBean.getId());
			cbPacket.setUpdate(ctxBrokerUpdateBean);
			
	//		LOG.info("updateRemote 3 ctxBrokerUpdateBean  "+cbPacket.getUpdate());
			
			this.ctxBrokerCommCallback.addRequestingClient(stanza.getId(), callback);

			this.commManager.sendIQGet(stanza, cbPacket, this.ctxBrokerCommCallback);
		} catch (CommunicationException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
	}

	public void retrieveRemoteIndividualEntId(Requestor requestor, IIdentity targetCss, ICtxCallback callback){
Solution content
		// creating the identity of the CtxBroker that will be contacted
		IIdentity toIdentity = null;

		try {
			//toIdentity = this.commManager.getIdManager().fromJid("john.societies.local");
			toIdentity = targetCss;

			//create the message to be sent
			Stanza stanza = new Stanza(toIdentity);

			CtxBrokerRequestBean cbPacket = new CtxBrokerRequestBean();

			cbPacket.setMethod(BrokerMethodBean.LOOKUP);
			CtxBrokerLookupBean ctxBrokerLookupBean = new CtxBrokerLookupBean();
			//lookup(final Requestor requestor,final IIdentity target, final CtxModelType modelType,final String type)
			// four params 

			//1.requestor
			RequestorBean requestorBean = createRequestorBean(requestor);
			ctxBrokerLookupBean.setRequestor(requestorBean);

			//2. target id
			ctxBrokerLookupBean.setTargetCss(toIdentity.getBareJid());
			//LOG.info("2 CtxBrokerLookupBean toIdentity.getBareJid() "+toIdentity.getBareJid());

			//3. model type
			CtxModelBeanTranslator ctxBeanTranslator = CtxModelBeanTranslator.getInstance();
			CtxModelTypeBean modelTypeBeanValue = ctxBeanTranslator.CtxModelTypeBeanFromCtxModelType(modelType);
			ctxBrokerLookupBean.setModelType(modelTypeBeanValue);

			// 4 . type
			ctxBrokerLookupBean.setType(type);
			//LOG.info("1 CtxBrokerLookupBean type "+type);

			//	LOG.info("CtxBrokerLookupBean ready "+cbPacket.getLookup());
			cbPacket.setLookup(ctxBrokerLookupBean);

			//LOG.info("3 CtxBrokerLookupBean before sendIQGet");

			this.ctxBrokerCommCallback.addRequestingClient(stanza.getId(), callback);
			//	LOG.info("4 CtxBrokerLookupBean before sendIQGet stanza.getId() "+stanza.getId());

			this.commManager.sendIQGet(stanza, cbPacket, this.ctxBrokerCommCallback);
			//		LOG.info("5  IQGet send");
		} catch (CommunicationException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 
	}

	public void retrieveRemoteIndividualEntId(Requestor requestor, IIdentity targetCss, ICtxCallback callback){
File
CtxBrokerClient.java
Developer's decision
Version 1
Kind of conflict
Method declaration
Method signature
Try statement
Variable
Chunk
Conflicting content
	public void retrieveRemoteIndividualEntId(Requestor requestor, IIdentity targetCss, ICtxCallback callback){

<<<<<<< HEAD
=======
	public void createRemoteAssociation(Requestor requestor, String type, ICtxCallback callback){

		final CtxAssociation association = null;

		// creating the identity of the CtxBroker that will be contacted
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
		IIdentity toIdentity = null;

		try {
Solution content
	public void retrieveRemoteIndividualEntId(Requestor requestor, IIdentity targetCss, ICtxCallback callback){

		IIdentity toIdentity = null;

		try {
File
CtxBrokerClient.java
Developer's decision
Version 1
Kind of conflict
Comment
Method signature
Variable
Chunk
Conflicting content
	}

<<<<<<< HEAD

	public void retrieveRemote(Requestor requestor, CtxIdentifier identifier, ICtxCallback callback){
=======
	public void removeRemote(Requestor requestor, CtxIdentifier identifier, ICtxCallback callback){
		//remove(Identity requester, CtxIdentifier identifier)
		final CtxModelObject model = null;
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63

		// creating the identity of the CtxBroker that will be contacted
		IIdentity toIdentity = null;
Solution content
	}


	public void retrieveRemote(Requestor requestor, CtxIdentifier identifier, ICtxCallback callback){

		// creating the identity of the CtxBroker that will be contacted
		IIdentity toIdentity = null;
File
CtxBrokerClient.java
Developer's decision
Version 1
Kind of conflict
Comment
Method signature
Variable
Chunk
Conflicting content
		}
	}

<<<<<<< HEAD
	public void updateRemote(Requestor requestor, CtxModelObject object, ICtxCallback callback){

		IIdentity toIdentity = null;
		try {
			//real code
			toIdentity = this.commManager.getIdManager().fromJid(object.getOwnerId());
			//testing code
			//toIdentity = this.commManager.getIdManager().fromJid("john.societies.local");
		} catch (InvalidFormatException e1) {
			e1.printStackTrace();
		}

		try {
			//create the message to be sent
			Stanza stanza = new Stanza(toIdentity);
			CtxBrokerRequestBean cbPacket = new CtxBrokerRequestBean();
			cbPacket.setMethod(BrokerMethodBean.UPDATE);

			CtxBrokerUpdateBean ctxBrokerUpdateBean = new CtxBrokerUpdateBean();

			RequestorBean requestorBean = createRequestorBean(requestor);
			ctxBrokerUpdateBean.setRequestor(requestorBean);

			CtxModelBeanTranslator ctxBeanTranslator = CtxModelBeanTranslator.getInstance();
			CtxModelObjectBean objectBean = ctxBeanTranslator.fromCtxModelObject(object);

			//		LOG.info("updateRemote 1 ctxBrokerUpdateBean  "+objectBean.getId());
			ctxBrokerUpdateBean.setCtxModelOject(objectBean);

			//	LOG.info("updateRemote 2 ctxBrokerUpdateBean  "+objectBean.getId());
			cbPacket.setUpdate(ctxBrokerUpdateBean);

			//		LOG.info("updateRemote 3 ctxBrokerUpdateBean  "+cbPacket.getUpdate());

			this.ctxBrokerCommCallback.addRequestingClient(stanza.getId(), callback);

			this.commManager.sendIQGet(stanza, cbPacket, this.ctxBrokerCommCallback);
		} catch (CommunicationException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

=======
	public void updateRemoteAttribute(Requestor requestor, CtxAttributeIdentifier attributeId, Serializable value, ICtxCallback callback){
		//updateAttribute(CtxAttributeIdentifier attributeId, Serializable value)
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63

	public void createRemoteAssociation(Requestor requestor, String type, ICtxCallback callback){
Solution content
		}
	}

	public void updateRemote(Requestor requestor, CtxModelObject object, ICtxCallback callback){

		IIdentity toIdentity = null;
		try {
			//real code
			toIdentity = this.commManager.getIdManager().fromJid(object.getOwnerId());
			//testing code
			//toIdentity = this.commManager.getIdManager().fromJid("john.societies.local");
		} catch (InvalidFormatException e1) {
			e1.printStackTrace();
		}

		try {
			//create the message to be sent
			Stanza stanza = new Stanza(toIdentity);
			CtxBrokerRequestBean cbPacket = new CtxBrokerRequestBean();
			cbPacket.setMethod(BrokerMethodBean.UPDATE);

			CtxBrokerUpdateBean ctxBrokerUpdateBean = new CtxBrokerUpdateBean();

			RequestorBean requestorBean = createRequestorBean(requestor);
			ctxBrokerUpdateBean.setRequestor(requestorBean);

			CtxModelBeanTranslator ctxBeanTranslator = CtxModelBeanTranslator.getInstance();
			CtxModelObjectBean objectBean = ctxBeanTranslator.fromCtxModelObject(object);

			//		LOG.info("updateRemote 1 ctxBrokerUpdateBean  "+objectBean.getId());
			ctxBrokerUpdateBean.setCtxModelOject(objectBean);

			//	LOG.info("updateRemote 2 ctxBrokerUpdateBean  "+objectBean.getId());
			cbPacket.setUpdate(ctxBrokerUpdateBean);

			//		LOG.info("updateRemote 3 ctxBrokerUpdateBean  "+cbPacket.getUpdate());

			this.ctxBrokerCommCallback.addRequestingClient(stanza.getId(), callback);

			this.commManager.sendIQGet(stanza, cbPacket, this.ctxBrokerCommCallback);
		} catch (CommunicationException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}


	public void createRemoteAssociation(Requestor requestor, String type, ICtxCallback callback){
File
CtxBrokerClient.java
Developer's decision
Version 1
Kind of conflict
Comment
Method declaration
Method signature
Chunk
Conflicting content
		RequestorBean requestorBean = createRequestorBean(requestor);
		ctxBrokerCreateAssociationBean.setRequestor(requestorBean);

<<<<<<< HEAD

		ctxBrokerCreateAssociationBean.setType(type);
		cbPacket.setCreateAssociation(ctxBrokerCreateAssociationBean);
=======
		ctxBrokerUpdateAttributeBean.setValue((byte[]) value);
		cbPacket.setUpdateAttribute(ctxBrokerUpdateAttributeBean);
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63

		//CtxBrokerCommCallback commCallback = new CtxBrokerCommCallback(stanza.getId(), callback);
		this.ctxBrokerCommCallback.addRequestingClient(stanza.getId(), callback);
Solution content
		RequestorBean requestorBean = createRequestorBean(requestor);
		ctxBrokerCreateAssociationBean.setRequestor(requestorBean);


		ctxBrokerCreateAssociationBean.setType(type);
		cbPacket.setCreateAssociation(ctxBrokerCreateAssociationBean);

		//CtxBrokerCommCallback commCallback = new CtxBrokerCommCallback(stanza.getId(), callback);
		this.ctxBrokerCommCallback.addRequestingClient(stanza.getId(), callback);
File
CtxBrokerClient.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Chunk
Conflicting content
		//return new AsyncResult(association);
	}

<<<<<<< HEAD
	public void removeRemote(Requestor requestor, CtxIdentifier identifier, ICtxCallback callback){
		//remove(Identity requester, CtxIdentifier identifier)
		final CtxModelObject model = null;

		// creating the identity of the CtxBroker that will be contacted
		IIdentity toIdentity = null;
		try {
			toIdentity = idMgr.fromJid("XCManager.societies.local");
		} catch (InvalidFormatException e1) {
			e1.printStackTrace();
		}

		//create the message to be sent
		Stanza stanza = new Stanza(toIdentity);
		CtxBrokerRequestBean cbPacket = new CtxBrokerRequestBean();
		// use the method : remove(CtxIdentifier identifier)
		CtxBrokerRemoveBean ctxBrokerRemoveBean = new CtxBrokerRemoveBean();
		// add the signatures of the method
		//ctxBrokerRemoveBean.setRequester("FOO");
		RequestorBean requestorBean = createRequestorBean(requestor);
		ctxBrokerRemoveBean.setRequestor(requestorBean);

		//create the bean
		CtxModelBeanTranslator ctxBeanTranslator = CtxModelBeanTranslator.getInstance();
		// add the signatures of the method
		CtxIdentifierBean ctxIdBean=ctxBeanTranslator.fromCtxIdentifier(identifier);

		ctxIdBean.setString(identifier.toString());
		ctxBrokerRemoveBean.setId(ctxIdBean);
		cbPacket.setRemove(ctxBrokerRemoveBean);

		//CtxBrokerCommCallback commCallback = new CtxBrokerCommCallback(stanza.getId(), callback);
		this.ctxBrokerCommCallback.addRequestingClient(stanza.getId(), callback);
		//send the message
		try {
			this.commManager.sendIQGet(stanza, ctxBrokerRemoveBean, this);
			//this.commManager.sendMessage(stanza, ctxBrokerRemoveBean);
		} catch (CommunicationException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		//return new AsyncResult(model);
	}

	public void updateRemoteAttribute(Requestor requestor, CtxAttributeIdentifier attributeId, Serializable value, ICtxCallback callback){
		//updateAttribute(CtxAttributeIdentifier attributeId, Serializable value)

		final CtxModelObject model = null;

		// creating the identity of the CtxBroker that will be contacted
		IIdentity toIdentity = null;
		try {
			toIdentity = idMgr.fromJid("XCManager.societies.local");
		} catch (InvalidFormatException e1) {
			e1.printStackTrace();
		}

		//create the message to be sent
		Stanza stanza = new Stanza(toIdentity);
		CtxBrokerRequestBean cbPacket = new CtxBrokerRequestBean();
		// use the method : remove(CtxIdentifier identifier)
		CtxBrokerUpdateAttributeBean ctxBrokerUpdateAttributeBean = new CtxBrokerUpdateAttributeBean();
		// add the signatures of the method
		CtxAttributeIdentifierBean ctxAttrIdBean = new CtxAttributeIdentifierBean();
		ctxAttrIdBean.setString(attributeId.toString());
		ctxBrokerUpdateAttributeBean.setAttrId(ctxAttrIdBean);

		//ctxBrokerUpdateAttributeBean.setRequester("FOO");
		RequestorBean requestorBean = createRequestorBean(requestor);
		ctxBrokerUpdateAttributeBean.setRequestor(requestorBean);

		ctxBrokerUpdateAttributeBean.setValue((byte[]) value);
		cbPacket.setUpdateAttribute(ctxBrokerUpdateAttributeBean);

		//CtxBrokerCommCallback commCallback = new CtxBrokerCommCallback(stanza.getId(), callback);
		this.ctxBrokerCommCallback.addRequestingClient(stanza.getId(), callback);

		//send the message
		try {
			this.commManager.sendIQGet(stanza, ctxBrokerUpdateAttributeBean, this);
			//this.commManager.sendMessage(stanza, ctxBrokerUpdateAttributeBean);
		} catch (CommunicationException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		//return new AsyncResult(model);
	}

=======
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
	private RequestorBean createRequestorBean(Requestor requestor){
		if (requestor instanceof RequestorCis){
			RequestorCisBean cisRequestorBean = new RequestorCisBean();
Solution content
		//return new AsyncResult(association);
	}

	public void removeRemote(Requestor requestor, CtxIdentifier identifier, ICtxCallback callback){
		//remove(Identity requester, CtxIdentifier identifier)
		final CtxModelObject model = null;

		// creating the identity of the CtxBroker that will be contacted
		IIdentity toIdentity = null;
		try {
			toIdentity = idMgr.fromJid("XCManager.societies.local");
		} catch (InvalidFormatException e1) {
			e1.printStackTrace();
		}

		//create the message to be sent
		Stanza stanza = new Stanza(toIdentity);
		CtxBrokerRequestBean cbPacket = new CtxBrokerRequestBean();
		// use the method : remove(CtxIdentifier identifier)
		CtxBrokerRemoveBean ctxBrokerRemoveBean = new CtxBrokerRemoveBean();
		// add the signatures of the method
		//ctxBrokerRemoveBean.setRequester("FOO");
		RequestorBean requestorBean = createRequestorBean(requestor);
		ctxBrokerRemoveBean.setRequestor(requestorBean);

		//create the bean
		CtxModelBeanTranslator ctxBeanTranslator = CtxModelBeanTranslator.getInstance();
		// add the signatures of the method
		CtxIdentifierBean ctxIdBean=ctxBeanTranslator.fromCtxIdentifier(identifier);

		ctxIdBean.setString(identifier.toString());
		ctxBrokerRemoveBean.setId(ctxIdBean);
		cbPacket.setRemove(ctxBrokerRemoveBean);

		//CtxBrokerCommCallback commCallback = new CtxBrokerCommCallback(stanza.getId(), callback);
		this.ctxBrokerCommCallback.addRequestingClient(stanza.getId(), callback);
		//send the message
		try {
			this.commManager.sendIQGet(stanza, ctxBrokerRemoveBean, this);
			//this.commManager.sendMessage(stanza, ctxBrokerRemoveBean);
		} catch (CommunicationException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		//return new AsyncResult(model);
	}

	public void updateRemoteAttribute(Requestor requestor, CtxAttributeIdentifier attributeId, Serializable value, ICtxCallback callback){
		//updateAttribute(CtxAttributeIdentifier attributeId, Serializable value)

		final CtxModelObject model = null;

		// creating the identity of the CtxBroker that will be contacted
		IIdentity toIdentity = null;
		try {
			toIdentity = idMgr.fromJid("XCManager.societies.local");
		} catch (InvalidFormatException e1) {
			e1.printStackTrace();
		}

		//create the message to be sent
		Stanza stanza = new Stanza(toIdentity);
		CtxBrokerRequestBean cbPacket = new CtxBrokerRequestBean();
		// use the method : remove(CtxIdentifier identifier)
		CtxBrokerUpdateAttributeBean ctxBrokerUpdateAttributeBean = new CtxBrokerUpdateAttributeBean();
		// add the signatures of the method
		CtxAttributeIdentifierBean ctxAttrIdBean = new CtxAttributeIdentifierBean();
		ctxAttrIdBean.setString(attributeId.toString());
		ctxBrokerUpdateAttributeBean.setAttrId(ctxAttrIdBean);

		//ctxBrokerUpdateAttributeBean.setRequester("FOO");
		RequestorBean requestorBean = createRequestorBean(requestor);
		ctxBrokerUpdateAttributeBean.setRequestor(requestorBean);

		ctxBrokerUpdateAttributeBean.setValue((byte[]) value);
		cbPacket.setUpdateAttribute(ctxBrokerUpdateAttributeBean);

		//CtxBrokerCommCallback commCallback = new CtxBrokerCommCallback(stanza.getId(), callback);
		this.ctxBrokerCommCallback.addRequestingClient(stanza.getId(), callback);

		//send the message
		try {
			this.commManager.sendIQGet(stanza, ctxBrokerUpdateAttributeBean, this);
			//this.commManager.sendMessage(stanza, ctxBrokerUpdateAttributeBean);
		} catch (CommunicationException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		//return new AsyncResult(model);
	}

	private RequestorBean createRequestorBean(Requestor requestor){
		if (requestor instanceof RequestorCis){
			RequestorCisBean cisRequestorBean = new RequestorCisBean();
File
CtxBrokerClient.java
Developer's decision
Version 1
Kind of conflict
Method declaration
Chunk
Conflicting content
import org.societies.api.comm.xmpp.interfaces.ICommCallback;
import org.societies.api.context.model.CtxAttribute;
import org.societies.api.context.model.CtxEntity;
<<<<<<< HEAD
import org.societies.api.context.model.CtxEntityIdentifier;
=======
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
import org.societies.api.context.model.CtxIdentifier;
import org.societies.api.context.model.CtxModelBeanTranslator;
import org.societies.api.context.model.CtxModelObject;
Solution content
import org.societies.api.comm.xmpp.interfaces.ICommCallback;
import org.societies.api.context.model.CtxAttribute;
import org.societies.api.context.model.CtxEntity;
import org.societies.api.context.model.CtxEntityIdentifier;
import org.societies.api.context.model.CtxIdentifier;
import org.societies.api.context.model.CtxModelBeanTranslator;
import org.societies.api.context.model.CtxModelObject;
File
CtxBrokerCommCallback.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
		//			LOG.info("inside receiveResult LOOKUP method 4"+ resultListIdentifiers);
					ctxCallbackClient.onLookupCallback(resultListIdentifiers);
							
<<<<<<< HEAD
				} else if(payload.getRetrieveIndividualEntityIdBeanResult() != null){
					
					LOG.info("inside receiveResult RetrieveIndividualEntityId method 1 ");
					CtxIdentifierBean indiEntIdBean = payload.getRetrieveIndividualEntityIdBeanResult();
					LOG.info("inside receiveResult RetrieveIndividualEntityId method 2 ");
					ICtxCallback ctxCallbackClient = getRequestingClient(returnStanza.getId());
					LOG.info("inside receiveResult RetrieveIndividualEntityId method 3 ");
					CtxIdentifier ctxId = CtxModelBeanTranslator.getInstance().fromCtxIdentifierBean(indiEntIdBean);
					LOG.info("inside receiveResult RetrieveIndividualEntityId method 4 ");
					if(ctxId instanceof CtxEntityIdentifier){
						CtxEntityIdentifier ctxEntityId = 	(CtxEntityIdentifier) ctxId;
						ctxCallbackClient.onRetrieveIndiEnt(ctxEntityId);
					} else LOG.error ("Returned ctxIdentifier is not a CtxEntityIdentifier");
										
					
=======
									
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
				}  else 
					LOG.error("The payload is not appropriate for the CtxBrokerCommCallback receiveResult method!");
			} catch (Exception e) {
Solution content
		//			LOG.info("inside receiveResult LOOKUP method 4"+ resultListIdentifiers);
					ctxCallbackClient.onLookupCallback(resultListIdentifiers);
							
				} else if(payload.getRetrieveIndividualEntityIdBeanResult() != null){
					
					LOG.info("inside receiveResult RetrieveIndividualEntityId method 1 ");
					CtxIdentifierBean indiEntIdBean = payload.getRetrieveIndividualEntityIdBeanResult();
					LOG.info("inside receiveResult RetrieveIndividualEntityId method 2 ");
					ICtxCallback ctxCallbackClient = getRequestingClient(returnStanza.getId());
					LOG.info("inside receiveResult RetrieveIndividualEntityId method 3 ");
					CtxIdentifier ctxId = CtxModelBeanTranslator.getInstance().fromCtxIdentifierBean(indiEntIdBean);
					LOG.info("inside receiveResult RetrieveIndividualEntityId method 4 ");
					if(ctxId instanceof CtxEntityIdentifier){
						CtxEntityIdentifier ctxEntityId = 	(CtxEntityIdentifier) ctxId;
						ctxCallbackClient.onRetrieveIndiEnt(ctxEntityId);
					} else LOG.error ("Returned ctxIdentifier is not a CtxEntityIdentifier");
										
					
				}  else 
					LOG.error("The payload is not appropriate for the CtxBrokerCommCallback receiveResult method!");
			} catch (Exception e) {
File
CtxBrokerCommCallback.java
Developer's decision
Version 1
Kind of conflict
If statement
Method invocation
Variable
Chunk
Conflicting content
	@Override
	public Object getQuery(Stanza stanza, Object payload) throws XMPPError {

<<<<<<< HEAD
		//		LOG.error("Context Broker server received stanza:"+ stanza );
		//		LOG.error("Context Broker server received payload: "+payload.getClass() );
=======
//		LOG.error("Context Broker server received stanza:"+ stanza );
//		LOG.error("Context Broker server received payload: "+payload.getClass() );
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
		CtxBrokerResponseBean beanResponse = new CtxBrokerResponseBean();
		CtxModelBeanTranslator ctxBeanTranslator = CtxModelBeanTranslator.getInstance();
Solution content
	@Override
	public Object getQuery(Stanza stanza, Object payload) throws XMPPError {

		//		LOG.error("Context Broker server received stanza:"+ stanza );
		//		LOG.error("Context Broker server received payload: "+payload.getClass() );
		CtxBrokerResponseBean beanResponse = new CtxBrokerResponseBean();
		CtxModelBeanTranslator ctxBeanTranslator = CtxModelBeanTranslator.getInstance();
File
CtxBrokerServer.java
Developer's decision
Version 1
Kind of conflict
Comment
Chunk
Conflicting content
			LOG.error("CtxBrokerRequestBean.getMethod() can't be null");
			throw new XMPPError(StanzaError.bad_request, "CtxBrokerRequestBean.getMethod() can't be null");
		}
<<<<<<< HEAD

=======
		
		
		
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
		switch (cbPayload.getMethod()) {
		//BrokerMethodBean.RETRIEVEINDIVIDUALENTITYID
		case CREATE_ENTITY:
Solution content
			LOG.error("CtxBrokerRequestBean.getMethod() can't be null");
			throw new XMPPError(StanzaError.bad_request, "CtxBrokerRequestBean.getMethod() can't be null");
		}

		switch (cbPayload.getMethod()) {
		//BrokerMethodBean.RETRIEVEINDIVIDUALENTITYID
		case CREATE_ENTITY:
File
CtxBrokerServer.java
Developer's decision
Version 1
Kind of conflict
Blank
Chunk
Conflicting content
		switch (cbPayload.getMethod()) {
		//BrokerMethodBean.RETRIEVEINDIVIDUALENTITYID
		case CREATE_ENTITY:
<<<<<<< HEAD
			
			LOG.info("CREATE_ENTITY");
			String targetIdentityString = cbPayload.getCreateEntity().getTargetCss().toString();

			RequestorBean reqBeanCreateEntity = cbPayload.getCreateEntity().getRequestor();
			Requestor requestorCreateEntity = getRequestorFromBean(reqBeanCreateEntity);

=======
			//LOG.info(" beanResponse ready:" +beanResponse.getMethod().toString());
			
			String targetIdentityString = cbPayload.getCreateEntity().getTargetCss().toString();
			
			RequestorBean reqBeanCreateEntity = cbPayload.getCreateEntity().getRequestor();
			Requestor requestorCreateEntity = getRequestorFromBean(reqBeanCreateEntity);
			
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
			//LOG.info("CREATE_ENTITY   brokerserver targetIdentityString: "+targetIdentityString);
			IIdentity targetIdentity;
			try {
Solution content
		switch (cbPayload.getMethod()) {
		//BrokerMethodBean.RETRIEVEINDIVIDUALENTITYID
		case CREATE_ENTITY:
			
			LOG.info("CREATE_ENTITY");
			String targetIdentityString = cbPayload.getCreateEntity().getTargetCss().toString();

			RequestorBean reqBeanCreateEntity = cbPayload.getCreateEntity().getRequestor();
			Requestor requestorCreateEntity = getRequestorFromBean(reqBeanCreateEntity);

			//LOG.info("CREATE_ENTITY   brokerserver targetIdentityString: "+targetIdentityString);
			IIdentity targetIdentity;
			try {
File
CtxBrokerServer.java
Developer's decision
Version 1
Kind of conflict
Comment
Method invocation
Variable
Chunk
Conflicting content
				//create the response based on the created CtxEntity - the response should be a result bean
				//CtxModelBeanTranslator ctxBeanTranslator = CtxModelBeanTranslator.getInstance();
				CtxEntityBean ctxBean = ctxBeanTranslator.fromCtxEntity(newCtxEntity);
<<<<<<< HEAD
				//				LOG.info("CREATE_ENTITY  ctxBean created :" +ctxBean);
				//setup the CtxEntityBean from CtxEntity				
				beanResponse.setCtxBrokerCreateEntityBeanResult(ctxBean);
				//			LOG.info("CREATE_ENTITY entity beanResponse:" +beanResponse);
=======
//				LOG.info("CREATE_ENTITY  ctxBean created :" +ctxBean);
				//setup the CtxEntityBean from CtxEntity				
				beanResponse.setCtxBrokerCreateEntityBeanResult(ctxBean);
	//			LOG.info("CREATE_ENTITY entity beanResponse:" +beanResponse);
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63

			} catch (CtxException e) {
				// TODO Auto-generated catch block
Solution content
				//create the response based on the created CtxEntity - the response should be a result bean
				//CtxModelBeanTranslator ctxBeanTranslator = CtxModelBeanTranslator.getInstance();
				CtxEntityBean ctxBean = ctxBeanTranslator.fromCtxEntity(newCtxEntity);
				//				LOG.info("CREATE_ENTITY  ctxBean created :" +ctxBean);
				//setup the CtxEntityBean from CtxEntity				
				beanResponse.setCtxBrokerCreateEntityBeanResult(ctxBean);
				//			LOG.info("CREATE_ENTITY entity beanResponse:" +beanResponse);

			} catch (CtxException e) {
				// TODO Auto-generated catch block
File
CtxBrokerServer.java
Developer's decision
Version 1
Kind of conflict
Comment
Method invocation
Chunk
Conflicting content
			break;

		case CREATE_ATTRIBUTE:
<<<<<<< HEAD
			
			LOG.info("CREATE_ATTRIBUTE");
=======

>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
			//LOG.info(" beanResponse ready:" +beanResponse.getMethod().toString());
			try {
				String ctxEntityScopeBean =  cbPayload.getCreateAttribute().getScope().getString();
Solution content
			break;

		case CREATE_ATTRIBUTE:
			
			LOG.info("CREATE_ATTRIBUTE");
			//LOG.info(" beanResponse ready:" +beanResponse.getMethod().toString());
			try {
				String ctxEntityScopeBean =  cbPayload.getCreateAttribute().getScope().getString();
File
CtxBrokerServer.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Chunk
Conflicting content
			break;

		case LOOKUP:
<<<<<<< HEAD

			LOG.info("LOOKUP");
			//	LOG.info("LOOKUP 1 :");
			//CtxModelBeanTranslator ctxBeanTranslator = CtxModelBeanTranslator.getInstance();

			RequestorBean reqBeanLookup = cbPayload.getLookup().getRequestor();
			Requestor requestor = getRequestorFromBean(reqBeanLookup);

=======
			
		//	LOG.info(" beanResponse ready:" +beanResponse.getMethod().toString());
		//	LOG.info("LOOKUP 1 :");
			//CtxModelBeanTranslator ctxBeanTranslator = CtxModelBeanTranslator.getInstance();

			RequestorBean reqBeanLookup = cbPayload.getLookup().getRequestor();
			Requestor requestor = getRequestorFromBean(reqBeanLookup);

>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
			String targetCssString = cbPayload.getLookup().getTargetCss();
			IIdentity targetCss;
Solution content
			break;

		case LOOKUP:

			LOG.info("LOOKUP");
			//	LOG.info("LOOKUP 1 :");
			//CtxModelBeanTranslator ctxBeanTranslator = CtxModelBeanTranslator.getInstance();

			RequestorBean reqBeanLookup = cbPayload.getLookup().getRequestor();
			Requestor requestor = getRequestorFromBean(reqBeanLookup);

			String targetCssString = cbPayload.getLookup().getTargetCss();
			IIdentity targetCss;
File
CtxBrokerServer.java
Developer's decision
Version 1
Kind of conflict
Comment
Method invocation
Variable
Chunk
Conflicting content
			try {
				targetCss = this.identMgr.fromJid(targetCssString);

<<<<<<< HEAD
				//	LOG.info("LOOKUP 1 :" +beanResponse);
=======
			//	LOG.info("LOOKUP 1 :" +beanResponse);
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
				CtxModelType modelType = ctxBeanTranslator.CtxModelTypeFromCtxModelTypeBean(cbPayload.getLookup().getModelType());

				//LOG.info("LOOKUP 2 modelType:" +modelType);
Solution content
			try {
				targetCss = this.identMgr.fromJid(targetCssString);

				//	LOG.info("LOOKUP 1 :" +beanResponse);
				CtxModelType modelType = ctxBeanTranslator.CtxModelTypeFromCtxModelTypeBean(cbPayload.getLookup().getModelType());

				//LOG.info("LOOKUP 2 modelType:" +modelType);
File
CtxBrokerServer.java
Developer's decision
Version 1
Kind of conflict
Comment
Chunk
Conflicting content
					List identBeanList = new ArrayList(); 

					for(CtxIdentifier identifier :lookupResultsList){
<<<<<<< HEAD
						///	LOG.info("LOOKUP 5  identifier.toString():" +identifier.toString());
=======
					///	LOG.info("LOOKUP 5  identifier.toString():" +identifier.toString());
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
						if (identifier.getModelType().equals(CtxModelType.ATTRIBUTE)){
							CtxAttributeIdentifier attrId = (CtxAttributeIdentifier) identifier;
							CtxAttributeIdentifierBean attrIdBean = (CtxAttributeIdentifierBean) ctxBeanTranslator.fromCtxIdentifier(attrId);
Solution content
					List identBeanList = new ArrayList(); 

					for(CtxIdentifier identifier :lookupResultsList){
						///	LOG.info("LOOKUP 5  identifier.toString():" +identifier.toString());
						if (identifier.getModelType().equals(CtxModelType.ATTRIBUTE)){
							CtxAttributeIdentifier attrId = (CtxAttributeIdentifier) identifier;
							CtxAttributeIdentifierBean attrIdBean = (CtxAttributeIdentifierBean) ctxBeanTranslator.fromCtxIdentifier(attrId);
File
CtxBrokerServer.java
Developer's decision
Version 1
Kind of conflict
Comment
Chunk
Conflicting content
				}

					}
					//LOG.info("LOOKUP 6 identBeanList :" +identBeanList);
					beanResponse.setCtxBrokerLookupBeanResult(identBeanList);
<<<<<<< HEAD
					//	LOG.info("LOOKUP 7 beanResponse get lookupResult:" +beanResponse.getCtxBrokerLookupBeanResult());
=======
				//	LOG.info("LOOKUP 7 beanResponse get lookupResult:" +beanResponse.getCtxBrokerLookupBeanResult());
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
			} catch (InvalidFormatException e) {
Solution content
					}
					//LOG.info("LOOKUP 6 identBeanList :" +identBeanList);
					beanResponse.setCtxBrokerLookupBeanResult(identBeanList);
					//	LOG.info("LOOKUP 7 beanResponse get lookupResult:" +beanResponse.getCtxBrokerLookupBeanResult());
				}

			} catch (InvalidFormatException e) {
File
CtxBrokerServer.java
Developer's decision
Version 1
Kind of conflict
Comment
Chunk
Conflicting content
			break;

		case RETRIEVE:
<<<<<<< HEAD

			LOG.info("RETRIEVE");
=======
		
		///	LOG.info(" beanResponse ready:" +beanResponse.getMethod().toString());
		//	LOG.info("RETRIEVE 1 :");

>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
			CtxModelBeanTranslator ctxBeanTranslator2 = CtxModelBeanTranslator.getInstance();

			try {
Solution content
			break;

		case RETRIEVE:

			LOG.info("RETRIEVE");
			CtxModelBeanTranslator ctxBeanTranslator2 = CtxModelBeanTranslator.getInstance();

			try {
File
CtxBrokerServer.java
Developer's decision
Version 1
Kind of conflict
Comment
Method invocation
Chunk
Conflicting content
				CtxIdentifier ctxIdentifier = ctxBeanTranslator2.fromCtxIdentifierBean(ctxIdentRetrieveBean);

				CtxModelObject retrievedObj = this.ctxbroker.retrieve(requestorRetrieve, ctxIdentifier).get();
<<<<<<< HEAD
				//	LOG.info("retrieved object "+ retrievedObj.getId().toString());
=======
			//	LOG.info("retrieved object "+ retrievedObj.getId().toString());
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
				// object retrieved locally 
				// create response bean
Solution content
				CtxIdentifier ctxIdentifier = ctxBeanTranslator2.fromCtxIdentifierBean(ctxIdentRetrieveBean);

				CtxModelObject retrievedObj = this.ctxbroker.retrieve(requestorRetrieve, ctxIdentifier).get();
				//	LOG.info("retrieved object "+ retrievedObj.getId().toString());
				// object retrieved locally 
				// create response bean
File
CtxBrokerServer.java
Developer's decision
Version 1
Kind of conflict
Comment
Chunk
Conflicting content
				CtxModelObjectBean ctxObjBean = ctxBeanTranslator2.fromCtxModelObject(retrievedObj);
				beanResponse.setCtxBrokerRetrieveBeanResult(ctxObjBean);
<<<<<<< HEAD
				//	LOG.info("retrieved object beanResponse.setCtxBrokerRetrieveBeanResult "+ beanResponse.getCtxBrokerRetrieveBeanResult().toString());
=======
			//	LOG.info("retrieved object beanResponse.setCtxBrokerRetrieveBeanResult "+ beanResponse.getCtxBrokerRetrieveBeanResult().toString());
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63

			} catch (MalformedCtxIdentifierException e) {
				// TODO Auto-generated catch block
Solution content
				CtxModelObjectBean ctxObjBean = ctxBeanTranslator2.fromCtxModelObject(retrievedObj);
				beanResponse.setCtxBrokerRetrieveBeanResult(ctxObjBean);
				//	LOG.info("retrieved object beanResponse.setCtxBrokerRetrieveBeanResult "+ beanResponse.getCtxBrokerRetrieveBeanResult().toString());

			} catch (MalformedCtxIdentifierException e) {
				// TODO Auto-generated catch block
File
CtxBrokerServer.java
Developer's decision
Version 1
Kind of conflict
Comment
Chunk
Conflicting content
		case UPDATE:
			
<<<<<<< HEAD
			LOG.info("UPDATE");
			CtxModelBeanTranslator ctxBeanTranslator3 = CtxModelBeanTranslator.getInstance();
			//	LOG.info("UPDATE 1  "+ cbPayload.getUpdate().toString());

			RequestorBean reqBeanUpdate = cbPayload.getUpdate().getRequestor();
			//	LOG.info("UPDATE 2 reqBeanUpdate "+ reqBeanUpdate);
			Requestor requestorUpdate = getRequestorFromBean(reqBeanUpdate);

			CtxModelObjectBean ctxModelObjBean = cbPayload.getUpdate().getCtxModelOject();
			//		LOG.info("UPDATE 3 reqBeanUpdate "+ ctxModelObjBean);
			CtxModelObject ctxModelObject = ctxBeanTranslator3.fromCtxModelObjectBean(ctxModelObjBean);

			//		LOG.info("UPDATE 4 reqBeanUpdate ctxModelObject "+ ctxModelObject);
			try {
				CtxModelObject updatedObj = this.ctxbroker.update(requestorUpdate, ctxModelObject).get();
				//			LOG.info("UPDATE 5 locally updated object "+ updatedObj.getId().toString());

				CtxModelObjectBean ctxObjBean = ctxBeanTranslator3.fromCtxModelObject(updatedObj);
				//		LOG.info("UPDATE 6 locally object converter to bean "+ ctxObjBean.getId().toString());
=======
		//	LOG.info(" beanResponse ready:" +beanResponse.getMethod().toString());
			CtxModelBeanTranslator ctxBeanTranslator3 = CtxModelBeanTranslator.getInstance();
		//	LOG.info("UPDATE 1  "+ cbPayload.getUpdate().toString());
			
			RequestorBean reqBeanUpdate = cbPayload.getUpdate().getRequestor();
		//	LOG.info("UPDATE 2 reqBeanUpdate "+ reqBeanUpdate);
			Requestor requestorUpdate = getRequestorFromBean(reqBeanUpdate);

			CtxModelObjectBean ctxModelObjBean = cbPayload.getUpdate().getCtxModelOject();
	//		LOG.info("UPDATE 3 reqBeanUpdate "+ ctxModelObjBean);
			CtxModelObject ctxModelObject = ctxBeanTranslator3.fromCtxModelObjectBean(ctxModelObjBean);
			
	//		LOG.info("UPDATE 4 reqBeanUpdate ctxModelObject "+ ctxModelObject);
			try {
				CtxModelObject updatedObj = this.ctxbroker.update(requestorUpdate, ctxModelObject).get();
	//			LOG.info("UPDATE 5 locally updated object "+ updatedObj.getId().toString());

				CtxModelObjectBean ctxObjBean = ctxBeanTranslator3.fromCtxModelObject(updatedObj);
		//		LOG.info("UPDATE 6 locally object converter to bean "+ ctxObjBean.getId().toString());
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
				beanResponse.setCtxBrokerUpdateBeanResult(ctxObjBean);

			} catch (InterruptedException e) {
Solution content
		case UPDATE:
			
			LOG.info("UPDATE");
			CtxModelBeanTranslator ctxBeanTranslator3 = CtxModelBeanTranslator.getInstance();
			//	LOG.info("UPDATE 1  "+ cbPayload.getUpdate().toString());

			RequestorBean reqBeanUpdate = cbPayload.getUpdate().getRequestor();
			//	LOG.info("UPDATE 2 reqBeanUpdate "+ reqBeanUpdate);
			Requestor requestorUpdate = getRequestorFromBean(reqBeanUpdate);

			CtxModelObjectBean ctxModelObjBean = cbPayload.getUpdate().getCtxModelOject();
			//		LOG.info("UPDATE 3 reqBeanUpdate "+ ctxModelObjBean);
			CtxModelObject ctxModelObject = ctxBeanTranslator3.fromCtxModelObjectBean(ctxModelObjBean);

			//		LOG.info("UPDATE 4 reqBeanUpdate ctxModelObject "+ ctxModelObject);
			try {
				CtxModelObject updatedObj = this.ctxbroker.update(requestorUpdate, ctxModelObject).get();
				//			LOG.info("UPDATE 5 locally updated object "+ updatedObj.getId().toString());

				CtxModelObjectBean ctxObjBean = ctxBeanTranslator3.fromCtxModelObject(updatedObj);
				//		LOG.info("UPDATE 6 locally object converter to bean "+ ctxObjBean.getId().toString());
				beanResponse.setCtxBrokerUpdateBeanResult(ctxObjBean);

			} catch (InterruptedException e) {
File
CtxBrokerServer.java
Developer's decision
Version 1
Kind of conflict
Comment
Method invocation
Try statement
Variable
Chunk
Conflicting content
		
			}

			break;
<<<<<<< HEAD
=======
		default: 
			throw new XMPPError(StanzaError.bad_request, "Nothing to do");
		}
		//LOG.error(" beanResponse ready:" +beanResponse.getMethod().toString());
		return beanResponse;
	}
		/*
		else if (cbPayload.getCreateAssoc()!=null) {
			RequestorBean reqBean = cbPayload.getCreateAssoc().getRequestor();
			Requestor requestor = getRequestorFromBean(reqBean);
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63

		case RETRIEVE_INDIVIDUAL_ENTITY_ID:
			
Solution content
			}

			break;

		case RETRIEVE_INDIVIDUAL_ENTITY_ID:
			
File
CtxBrokerServer.java
Developer's decision
Version 1
Kind of conflict
Case statement
Comment
Return statement
Throw statement
Variable
Chunk
Conflicting content
			
			IIdentity cssId;
			try {
<<<<<<< HEAD
				cssId = this.identMgr.fromJid(individualEntityIdentityString);
				LOG.info("identity "+cssId );
				LOG.info("requestorRetrieveIndiEntID "+requestorRetrieveIndiEntID.toString() );
				CtxEntityIdentifier entID = this.ctxbroker.retrieveIndividualEntityId(requestorRetrieveIndiEntID, cssId).get();
				LOG.info("retrieved entity id  local:  "+entID.toString() );
			
				CtxIdentifierBean ctxIdentBean = ctxBeanTranslator4.fromCtxIdentifier(entID);
				LOG.info("identifier converted to bean :  "+ctxIdentBean.toString() );
	
				//check if id or object are returned
				
				
				beanResponse.setRetrieveIndividualEntityIdBeanResult(ctxIdentBean);
				
				//CtxIdentifierBean entIdBean = beanResponse.getRetrieveIndividualEntityIdBeanResult();
				
				//LOG.info("verify bean :  "+ entIdBean.toString());
				
			} catch (InvalidFormatException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
=======
				String targetIdentityString = cbPayload.getCreateAssoc().getTargetCss();
				IIdentity requesterIdentity = this.identMgr.fromJid(targetIdentityString);

				Future newAssociationFuture = ctxbroker.createAssociation(requestor, requesterIdentity, cbPayload.getCreateAssoc().getType());
				CtxAssociation newCtxAssociation = newAssociationFuture.get();
				// the association is created
				//create the response based on the created CtxAssociation - the response should be a result bean
				CtxModelBeanTranslator ctxBeanTranslator = CtxModelBeanTranslator.getInstance();
				CtxAssociationBean ctxBean = ctxBeanTranslator.fromCtxAssociation(newCtxAssociation);			
				beanResponse.setCtxBrokerCreateAssociationBeanResult(ctxBean);

>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
			} catch (CtxException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
Solution content
			
			IIdentity cssId;
			try {
				cssId = this.identMgr.fromJid(individualEntityIdentityString);
				LOG.info("identity "+cssId );
				LOG.info("requestorRetrieveIndiEntID "+requestorRetrieveIndiEntID.toString() );
				CtxEntityIdentifier entID = this.ctxbroker.retrieveIndividualEntityId(requestorRetrieveIndiEntID, cssId).get();
				LOG.info("retrieved entity id  local:  "+entID.toString() );
			
				CtxIdentifierBean ctxIdentBean = ctxBeanTranslator4.fromCtxIdentifier(entID);
				LOG.info("identifier converted to bean :  "+ctxIdentBean.toString() );
	
				//check if id or object are returned
				
				
				beanResponse.setRetrieveIndividualEntityIdBeanResult(ctxIdentBean);
				
				//CtxIdentifierBean entIdBean = beanResponse.getRetrieveIndividualEntityIdBeanResult();
				
				//LOG.info("verify bean :  "+ entIdBean.toString());
				
			} catch (InvalidFormatException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			} catch (CtxException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
File
CtxBrokerServer.java
Developer's decision
Version 1
Kind of conflict
Catch clause
Comment
Method invocation
Variable
Chunk
Conflicting content
		default: 
			throw new XMPPError(StanzaError.bad_request, "Nothing to do");
		}
<<<<<<< HEAD
		//LOG.error(" beanResponse ready:" +beanResponse.getMethod().toString());
		return beanResponse;
	}
	/*
		else if (cbPayload.getCreateAssoc()!=null) {
			RequestorBean reqBean = cbPayload.getCreateAssoc().getRequestor();
=======

		//checks if the payload contains the createAttribute method


		//checks if the payload contains the remove method
		else if (cbPayload.getRemove()!=null) {

			RequestorBean reqBean = cbPayload.getRemove().getRequestor();
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
			Requestor requestor = getRequestorFromBean(reqBean);
			// get the identity based on Jid and the identity manager
			//				String xmppIdentityJid = cbPayload.getRemove().getRequester();
Solution content
		default: 
			throw new XMPPError(StanzaError.bad_request, "Nothing to do");
		}
		//LOG.error(" beanResponse ready:" +beanResponse.getMethod().toString());
		return beanResponse;
	}
	/*
		else if (cbPayload.getCreateAssoc()!=null) {
			RequestorBean reqBean = cbPayload.getCreateAssoc().getRequestor();
			Requestor requestor = getRequestorFromBean(reqBean);
File
CtxBrokerServer.java
Developer's decision
Version 1
Kind of conflict
Comment
Return statement
Variable
Chunk
Conflicting content
			// get the identity based on Jid and the identity manager
			//				String xmppIdentityJid = cbPayload.getRemove().getRequester();
			try {
<<<<<<< HEAD
				String targetIdentityString = cbPayload.getCreateAssoc().getTargetCss();
				IIdentity requesterIdentity = this.identMgr.fromJid(targetIdentityString);

				Future newAssociationFuture = ctxbroker.createAssociation(requestor, requesterIdentity, cbPayload.getCreateAssoc().getType());
				CtxAssociation newCtxAssociation = newAssociationFuture.get();
				// the association is created
				//create the response based on the created CtxAssociation - the response should be a result bean
				CtxModelBeanTranslator ctxBeanTranslator = CtxModelBeanTranslator.getInstance();
				CtxAssociationBean ctxBean = ctxBeanTranslator.fromCtxAssociation(newCtxAssociation);			
				beanResponse.setCtxBrokerCreateAssociationBeanResult(ctxBean);
=======

				//				IIdentity requesterIdentity = this.identMgr.fromJid(xmppIdentityJid);
				Future removeModelObjectFuture = ctxbroker.remove(requestor,new CtxEntityIdentifier(cbPayload.getRemove().getId().getString()));
				//new CtxEntityIdentifier(cbPayload.getRemove().toString()));

				CtxModelObject removedModelObject = removeModelObjectFuture.get();
				// the object has been removed

				//create the response based on the removed model object
				CtxModelBeanTranslator ctxBeanTranslator = CtxModelBeanTranslator.getInstance();
				CtxEntityIdentifierBean ctxBean = (CtxEntityIdentifierBean) ctxBeanTranslator.fromCtxModelObject(removedModelObject);			
				beanResponse.setCtxBrokerRemoveBeanResult(ctxBean);
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63

			} catch (CtxException e) {
				// TODO Auto-generated catch block
Solution content
			try {
				String targetIdentityString = cbPayload.getCreateAssoc().getTargetCss();
				IIdentity requesterIdentity = this.identMgr.fromJid(targetIdentityString);

				Future newAssociationFuture = ctxbroker.createAssociation(requestor, requesterIdentity, cbPayload.getCreateAssoc().getType());
				CtxAssociation newCtxAssociation = newAssociationFuture.get();
				// the association is created
				//create the response based on the created CtxAssociation - the response should be a result bean
				CtxModelBeanTranslator ctxBeanTranslator = CtxModelBeanTranslator.getInstance();
				CtxAssociationBean ctxBean = ctxBeanTranslator.fromCtxAssociation(newCtxAssociation);			
				beanResponse.setCtxBrokerCreateAssociationBeanResult(ctxBean);

			} catch (CtxException e) {
				// TODO Auto-generated catch block
File
CtxBrokerServer.java
Developer's decision
Version 1
Kind of conflict
Comment
Chunk
Conflicting content
			} catch (ExecutionException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
<<<<<<< HEAD
			} catch (InvalidFormatException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			} catch (DatatypeConfigurationException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}

		//checks if the payload contains the createAttribute method

=======
			}
		}


		//checks if the payload contains the update method
		else if (cbPayload.getUpdate()!=null) {
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63

		//checks if the payload contains the remove method
		else if (cbPayload.getRemove()!=null) {
Solution content
			} catch (ExecutionException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			} catch (InvalidFormatException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			} catch (DatatypeConfigurationException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}

		//checks if the payload contains the createAttribute method


		//checks if the payload contains the remove method
		else if (cbPayload.getRemove()!=null) {
File
CtxBrokerServer.java
Developer's decision
Version 1
Kind of conflict
Comment
Chunk
Conflicting content
			}
		}

<<<<<<< HEAD

		*/
=======
		//checks if the payload contains the updateAttr method
		else if (cbPayload.getUpdateAttr()!=null) {
			/
			 * add the code for update attribute method here.
			 * the problem is that the external broker does not allow the update of an attribute, whereas the internal does allow that action.
			 * therefore no update attribute server side call can be implemented.
			 *
			 */
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63


	@Override
Solution content
			}
		}


		*/


	@Override
File
CtxBrokerServer.java
Developer's decision
Version 1
Kind of conflict
Comment
Chunk
Conflicting content
import org.societies.api.context.model.CtxAttribute;
import org.societies.api.context.model.CtxEntity;
<<<<<<< HEAD
import org.societies.api.context.model.CtxEntityIdentifier;
=======
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
import org.societies.api.context.model.CtxIdentifier;
import org.societies.api.context.model.CtxModelObject;
Solution content
import org.societies.api.context.model.CtxAttribute;
import org.societies.api.context.model.CtxEntity;
import org.societies.api.context.model.CtxEntityIdentifier;
import org.societies.api.context.model.CtxIdentifier;
import org.societies.api.context.model.CtxModelObject;
File
ICtxCallback.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
		when(mockRequestor.toString()).thenReturn(OWNER_IDENTITY_STRING);
		when(mockNetworkNode.toString()).thenReturn(NETWORK_NODE_STRING);

<<<<<<< HEAD
		when(mockIdentityMgr.isMine(mockIdentityLocal)).thenReturn(true);
	
		
=======
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
		//when(mockIdentityLocal.toString()).thenReturn(OWNER_IDENTITY_STRING);
		when(mockIdentityLocal.getType()).thenReturn(IdentityType.CSS);
	}
Solution content
		when(mockRequestor.toString()).thenReturn(OWNER_IDENTITY_STRING);
		when(mockNetworkNode.toString()).thenReturn(NETWORK_NODE_STRING);

		when(mockIdentityMgr.isMine(mockIdentityLocal)).thenReturn(true);
	
		
		//when(mockIdentityLocal.toString()).thenReturn(OWNER_IDENTITY_STRING);
		when(mockIdentityLocal.getType()).thenReturn(IdentityType.CSS);
	}
File
ExternalCtxBrokerTest.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Chunk
Conflicting content
		assertNotNull(ctxEntity.getId());
		assertEquals(mockIdentityLocal.toString(), ctxEntity.getOwnerId());
		assertEquals(CtxEntityTypes.DEVICE, ctxEntity.getType());
<<<<<<< HEAD

=======
	
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
	}

	/**
Solution content
		assertNotNull(ctxEntity.getId());
		assertEquals(mockIdentityLocal.toString(), ctxEntity.getOwnerId());
		assertEquals(CtxEntityTypes.DEVICE, ctxEntity.getType());

	}

	/**
File
ExternalCtxBrokerTest.java
Developer's decision
Version 1
Kind of conflict
Blank
Chunk
Conflicting content
	public void testCreateAssociationByString() throws Exception {

		Requestor requestor = new Requestor(mockIdentityLocal);
<<<<<<< HEAD
		//System.out.println("mockIdentityLocal ******************************");
=======
		System.out.println("mockIdentityLocal ******************************");
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
		CtxAssociation ctxAssocHasParam = 
				this.ctxBroker.createAssociation(requestor, mockIdentityLocal, CtxAssociationTypes.HAS_PARAMETERS).get();
		assertNotNull(ctxAssocHasParam);
Solution content
	public void testCreateAssociationByString() throws Exception {

		Requestor requestor = new Requestor(mockIdentityLocal);
		//System.out.println("mockIdentityLocal ******************************");
		CtxAssociation ctxAssocHasParam = 
				this.ctxBroker.createAssociation(requestor, mockIdentityLocal, CtxAssociationTypes.HAS_PARAMETERS).get();
		assertNotNull(ctxAssocHasParam);
File
ExternalCtxBrokerTest.java
Developer's decision
Version 1
Kind of conflict
Comment
Method invocation
Chunk
Conflicting content
		assertNotNull(ctxAssocHasParam.getId());
		assertEquals(mockIdentityLocal.toString(), ctxAssocHasParam.getOwnerId());
		assertEquals(CtxAssociationTypes.HAS_PARAMETERS, ctxAssocHasParam.getType());
<<<<<<< HEAD

		System.out.println("1 mockIdentityLocal "+mockIdentityLocal);

=======
		
		System.out.println("1 mockIdentityLocal "+mockIdentityLocal);
		
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
		// mock checkPermission
		//doNothing().when()
		//when(getLocalRequestor()).thenReturn(new Requestor(mockIdentityLocal));
Solution content
		assertNotNull(ctxAssocHasParam.getId());
		assertEquals(mockIdentityLocal.toString(), ctxAssocHasParam.getOwnerId());
		assertEquals(CtxAssociationTypes.HAS_PARAMETERS, ctxAssocHasParam.getType());

		System.out.println("1 mockIdentityLocal "+mockIdentityLocal);

		// mock checkPermission
		//doNothing().when()
		//when(getLocalRequestor()).thenReturn(new Requestor(mockIdentityLocal));
File
ExternalCtxBrokerTest.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Chunk
Conflicting content
		doNothing().when(mockCtxAccessController).checkPermission(requestor, mockIdentityLocal, 
				new CtxPermission(ctxAssocHasParam.getId(), CtxPermission.READ));
		
<<<<<<< HEAD
		//doNothing().when(internalCtxBroker).getLocalRequestor()
		
		
=======
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
		final List assocIdentifierList =	this.ctxBroker.lookup(
				requestor, mockIdentityLocal, CtxModelType.ASSOCIATION, CtxAssociationTypes.HAS_PARAMETERS).get();
Solution content
		doNothing().when(mockCtxAccessController).checkPermission(requestor, mockIdentityLocal, 
				new CtxPermission(ctxAssocHasParam.getId(), CtxPermission.READ));
		
		//doNothing().when(internalCtxBroker).getLocalRequestor()
		
		
		final List assocIdentifierList =	this.ctxBroker.lookup(
				requestor, mockIdentityLocal, CtxModelType.ASSOCIATION, CtxAssociationTypes.HAS_PARAMETERS).get();
File
ExternalCtxBrokerTest.java
Developer's decision
Version 1
Kind of conflict
Comment
Chunk
Conflicting content
			e.printStackTrace();
		}
	}
<<<<<<< HEAD
	
	/* Get a list of suggested Friend from cloud Css Manger */
	public void getFriendRequests(ICSSManagerCallback callback)
	{
		
		LOG.debug("Remote call on getFriendRequests");

		Stanza stanza = new Stanza(commManager.getIdManager().getCloudNode());
		CssManagerMessageBean messageBean = new CssManagerMessageBean();

		messageBean.setMethod(MethodType.FIND_ALL_CSS_FRIEND_REQUESTS);
		CommsClientCallback commsCallback = new CommsClientCallback(
				stanza.getId(), callback);

		try {
			this.commManager.sendIQGet(stanza, messageBean, commsCallback);
		} catch (CommunicationException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	
	public void acceptCssFriendRequest(CssRequest request) {
		// TODO Auto-generated method stub
		LOG.debug("Remote call on AcceptCssFriendRequest");

		try {

			Stanza stanza = new Stanza(commManager.getIdManager().fromJid(
					request.getCssIdentity()));
			CssManagerMessageBean messageBean = new CssManagerMessageBean();

			request.setOrigin(CssRequestOrigin.REMOTE);
			
			messageBean.setMethod(MethodType.ACCEPT_CSS_FRIEND_REQUEST);
			messageBean.setRequestStatus(request.getRequestStatus());

			try {
				this.commManager.sendMessage(stanza, messageBean);
			} catch (CommunicationException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		} catch (InvalidFormatException e1) {
			// TODO Auto-generated catch block
			e1.printStackTrace();
		}
		
	}
=======
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
}
Solution content
			e.printStackTrace();
		}
	}
	
	/* Get a list of suggested Friend from cloud Css Manger */
	public void getFriendRequests(ICSSManagerCallback callback)
	{
		
		LOG.debug("Remote call on getFriendRequests");

		Stanza stanza = new Stanza(commManager.getIdManager().getCloudNode());
		CssManagerMessageBean messageBean = new CssManagerMessageBean();

		messageBean.setMethod(MethodType.FIND_ALL_CSS_FRIEND_REQUESTS);
		CommsClientCallback commsCallback = new CommsClientCallback(
				stanza.getId(), callback);

		try {
			this.commManager.sendIQGet(stanza, messageBean, commsCallback);
		} catch (CommunicationException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	
	public void acceptCssFriendRequest(CssRequest request) {
		// TODO Auto-generated method stub
		LOG.debug("Remote call on AcceptCssFriendRequest");

		try {

			Stanza stanza = new Stanza(commManager.getIdManager().fromJid(
					request.getCssIdentity()));
			CssManagerMessageBean messageBean = new CssManagerMessageBean();

			request.setOrigin(CssRequestOrigin.REMOTE);
			
			messageBean.setMethod(MethodType.ACCEPT_CSS_FRIEND_REQUEST);
			messageBean.setRequestStatus(request.getRequestStatus());

			try {
				this.commManager.sendMessage(stanza, messageBean);
			} catch (CommunicationException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		} catch (InvalidFormatException e1) {
			// TODO Auto-generated catch block
			e1.printStackTrace();
		}
		
	}
}
File
CommsClient.java
Developer's decision
Version 1
Kind of conflict
Comment
Method declaration
Chunk
Conflicting content
				break;
			case SUGGESTED_FRIENDS:
				asyncFriendsAdsResult = this.cssManager.suggestedFriends();
<<<<<<< HEAD
				break;
			case GET_FRIEND_REQUESTS:
				asyncFriendsAdsResult = this.cssManager.getFriendRequests(); 
=======
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
				break;
			default:
				break;
Solution content
				break;
			case SUGGESTED_FRIENDS:
				asyncFriendsAdsResult = this.cssManager.suggestedFriends();
				break;
			case GET_FRIEND_REQUESTS:
				asyncFriendsAdsResult = this.cssManager.getFriendRequests(); 
				break;
			default:
				break;
File
CommsServer.java
Developer's decision
Version 1
Kind of conflict
Break statement
Case statement
Method invocation
Variable
Chunk
Conflicting content
			try {
				switch (bean.getMethod()) {
				case GET_CSS_FRIENDS:
<<<<<<< HEAD
					friendsAdsResult = asyncFriendsAdsResult.get();
					LOG.debug("Number of actual friends: " + friendsAdsResult.size());
					break;
				case SUGGESTED_FRIENDS:
				case GET_FRIEND_REQUESTS:
					friendsAdsResult = asyncFriendsAdsResult.get();
					LOG.debug("Number of suggested friends: " + friendsAdsResult.size());
=======
				case SUGGESTED_FRIENDS:
					friendsAdsResult = asyncFriendsAdsResult.get();
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
					break;
				default:
					// Since everything else seems to use this!!
Solution content
			try {
				switch (bean.getMethod()) {
				case GET_CSS_FRIENDS:
					friendsAdsResult = asyncFriendsAdsResult.get();
					LOG.debug("Number of actual friends: " + friendsAdsResult.size());
					break;
				case SUGGESTED_FRIENDS:
				case GET_FRIEND_REQUESTS:
					friendsAdsResult = asyncFriendsAdsResult.get();
					LOG.debug("Number of suggested friends: " + friendsAdsResult.size());
					break;
				default:
					// Since everything else seems to use this!!
File
CommsServer.java
Developer's decision
Version 1
Kind of conflict
Break statement
Case statement
Method invocation
Variable
Chunk
Conflicting content
import org.societies.api.schema.servicelifecycle.model.Service;

import org.societies.api.internal.sns.ISocialConnector;
<<<<<<< HEAD
import org.societies.api.internal.sns.ISocialData;
//import org.societies.platform.socialdata.SocialData;

import org.apache.shindig.social.opensocial.model.Person;

import org.societies.api.osgi.event.EMSException;
import org.societies.api.osgi.event.EventTypes;
import org.societies.api.osgi.event.IEventMgr;
import org.societies.api.osgi.event.InternalEvent;
=======
import org.societies.api.internal.sns.ISocialConnector.SocialNetwork;
import org.societies.api.internal.sns.ISocialData;
//import org.societies.platform.socialdata.SocialData;

import org.apache.shindig.social.opensocial.model.ActivityEntry;
import org.apache.shindig.social.opensocial.model.Group;
import org.apache.shindig.social.opensocial.model.Person;

>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63

public class CSSManager implements ICSSLocalManager {
	private static Logger LOG = LoggerFactory.getLogger(CSSManager.class);
Solution content
import org.societies.api.schema.servicelifecycle.model.Service;

import org.societies.api.internal.sns.ISocialConnector;
import org.societies.api.internal.sns.ISocialData;
//import org.societies.platform.socialdata.SocialData;

import org.apache.shindig.social.opensocial.model.Person;

import org.societies.api.osgi.event.EMSException;
import org.societies.api.osgi.event.EventTypes;
import org.societies.api.osgi.event.IEventMgr;
import org.societies.api.osgi.event.InternalEvent;

public class CSSManager implements ICSSLocalManager {
	private static Logger LOG = LoggerFactory.getLogger(CSSManager.class);
File
CSSManager.java
Developer's decision
Version 1
Kind of conflict
Comment
Import
Chunk
Conflicting content
    private Random randomGenerator;
    
	private boolean pubsubInitialised = false;
<<<<<<< HEAD
	
	private IEventMgr eventMgr = null;
=======
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
	
	public void cssManagerInit() {
		LOG.debug("CSS Manager initialised");
Solution content
    private Random randomGenerator;
    
	private boolean pubsubInitialised = false;
	
	private IEventMgr eventMgr = null;
	
	public void cssManagerInit() {
		LOG.debug("CSS Manager initialised");
File
CSSManager.java
Developer's decision
Version 1
Kind of conflict
Attribute
Chunk
Conflicting content
        this.randomGenerator = new Random();
        
        this.pubsubID = idManager.getThisNetworkNode();
        
<<<<<<< HEAD
		this.createMinimalCSSRecord(idManager.getCloudNode().getJid());
=======
		CssRecord cssRecord = this.createMinimalCSSRecord(idManager.getCloudNode().getJid());

		try {
			this.cssRegistry.registerCss(cssRecord);
			LOG.debug("Registering CSS with local database");
		} catch (CssRegistrationException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
        
	}
Solution content
        
        this.pubsubID = idManager.getThisNetworkNode();
        
		this.createMinimalCSSRecord(idManager.getCloudNode().getJid());
        
        this.randomGenerator = new Random();
	}
File
CSSManager.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Try statement
Variable
Chunk
Conflicting content
	 */
	}

	/**
<<<<<<< HEAD
	 * 	 
	 * Create minimal CSSRecord and register it to the database
	 * 
	 * @param identity
	 */
	private void createMinimalCSSRecord(String identity) {
		LOG.debug("Creating minimal CSSRecord");
		
		//cloud node details
		CssNode cssNode = new CssNode();
		
=======
	 * Create minimal CSSRecord
	private CssRecord createMinimalCSSRecord(String identity) {
		
		//cloud node details
    	CssNode cssNode = new CssNode();
 		
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
		cssNode.setIdentity(identity);
		cssNode.setStatus(CSSManagerEnums.nodeStatus.Available.ordinal());
		cssNode.setType(CSSManagerEnums.nodeType.Cloud.ordinal());
Solution content
	}

	/**
	 * 	 
	 * Create minimal CSSRecord and register it to the database
	 * 
	 * @param identity
	 */
	private void createMinimalCSSRecord(String identity) {
		LOG.debug("Creating minimal CSSRecord");
		
		//cloud node details
		CssNode cssNode = new CssNode();
		
		cssNode.setIdentity(identity);
		cssNode.setStatus(CSSManagerEnums.nodeStatus.Available.ordinal());
		cssNode.setType(CSSManagerEnums.nodeType.Cloud.ordinal());
File
CSSManager.java
Developer's decision
Version 1
Kind of conflict
Comment
Method invocation
Method signature
Variable
Chunk
Conflicting content
		cssNode.setStatus(CSSManagerEnums.nodeStatus.Available.ordinal());
		cssNode.setType(CSSManagerEnums.nodeType.Cloud.ordinal());

<<<<<<< HEAD
		try {
			//if CssRecord does not exist create new CssRecord in persistance layer
			
			if (!this.cssRegistry.cssRecordExists()) {

				//Minimal CSS details
				CssRecord cssProfile = new CssRecord();
				cssProfile.getCssNodes().add(cssNode);
				cssProfile.setCssIdentity(identity);
				cssProfile.setCssInactivation("0");
				
				cssProfile.setCssRegistration(this.getDate());

				cssProfile.setStatus(CSSManagerEnums.cssStatus.Active.ordinal());
				cssProfile.setCssUpTime(0);
				cssProfile.setEmailID("");
				cssProfile.setEntity(CSSManagerEnums.entityType.Organisation.ordinal());
				cssProfile.setForeName("");
				cssProfile.setHomeLocation("");
				cssProfile.setIdentityName("");
				cssProfile.setImID("");
				cssProfile.setName("");
				cssProfile.setPassword("");
				cssProfile.setPresence(CSSManagerEnums.presenceType.Available.ordinal());
				cssProfile.setSex(CSSManagerEnums.genderType.Unspecified.ordinal());
				cssProfile.setSocialURI("");

				try {
					this.cssRegistry.registerCss(cssProfile);
					LOG.debug("Registering CSS with local database");
				} catch (CssRegistrationException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
				// internal eventing
				LOG.info(" :) :) :) :) Generating CSS_Record_Event to notify Record has been created");
				if(this.getEventMgr() != null){
					InternalEvent event = new InternalEvent(EventTypes.CSS_RECORD_EVENT, "CSS Record Created", this.idManager.getThisNetworkNode().toString(), cssProfile);
					try {
						LOG.info(":) :) :) :) Calling PublishInternalEvent with details :" +event.geteventType() +event.geteventName() +event.geteventSource() +event.geteventInfo());
						this.getEventMgr().publishInternalEvent(event);
					} catch (EMSException e) {
						// TODO Auto-generated catch block
						e.printStackTrace();
						LOG.error("error trying to internally publish SUBS CIS event");
					}
				}
			} else {
				// if CssRecord already persisted remove all nodes and add cloud node
				
				CssRecord cssRecord  = this.cssRegistry.getCssRecord();
				
				cssRecord.getCssNodes().clear();
				
				cssRecord.getCssNodes().add(cssNode);
				
				this.unregisterCSS(cssRecord);
				
			}
		} catch (CssRegistrationException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	/**
	 * Workaround for existing problem with database
	 * 
	 * @param update
	 * TODO : use normal CssRegistry update method when working
	 */
	private void updateCssRegistry(CssRecord update) {
		CssRecord existing;
		try {
			existing = this.cssRegistry.getCssRecord();
			if (null != existing) {
					this.cssRegistry.unregisterCss(existing);
					this.cssRegistry.registerCss(update);
			}
		} catch (CssRegistrationException e1) {
			// TODO Auto-generated catch block
			e1.printStackTrace();
		}
=======
		//Minimal CSS details
		CssRecord cssProfile = new CssRecord();
		cssProfile.getCssNodes().add(cssNode);
		cssProfile.setCssIdentity(identity);
		cssProfile.setCssInactivation("0");
		
		cssProfile.setCssRegistration(this.getDate());

		cssProfile.setStatus(CSSManagerEnums.cssStatus.Active.ordinal());
		cssProfile.setCssUpTime(0);
		cssProfile.setEmailID("");
		cssProfile.setEntity(CSSManagerEnums.entityType.Organisation.ordinal());
		cssProfile.setForeName("");
		cssProfile.setHomeLocation("");
		cssProfile.setIdentityName("");
		cssProfile.setImID("");
		cssProfile.setName("");
		cssProfile.setPassword("");
		cssProfile.setPresence(CSSManagerEnums.presenceType.Available.ordinal());
		cssProfile.setSex(CSSManagerEnums.genderType.Unspecified.ordinal());
		cssProfile.setSocialURI("");

		return cssProfile;
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
	}
	@Override
	public Future changeCSSNodeStatus(CssRecord profile) {
Solution content
		cssNode.setStatus(CSSManagerEnums.nodeStatus.Available.ordinal());
		cssNode.setType(CSSManagerEnums.nodeType.Cloud.ordinal());

		try {
			//if CssRecord does not exist create new CssRecord in persistance layer
			
			if (!this.cssRegistry.cssRecordExists()) {

				//Minimal CSS details
				CssRecord cssProfile = new CssRecord();
				cssProfile.getCssNodes().add(cssNode);
				cssProfile.setCssIdentity(identity);
				cssProfile.setCssInactivation("0");
				
				cssProfile.setCssRegistration(this.getDate());

				cssProfile.setStatus(CSSManagerEnums.cssStatus.Active.ordinal());
				cssProfile.setCssUpTime(0);
				cssProfile.setEmailID("");
				cssProfile.setEntity(CSSManagerEnums.entityType.Organisation.ordinal());
				cssProfile.setForeName("");
				cssProfile.setHomeLocation("");
				cssProfile.setIdentityName("");
				cssProfile.setImID("");
				cssProfile.setName("");
				cssProfile.setPassword("");
				cssProfile.setPresence(CSSManagerEnums.presenceType.Available.ordinal());
				cssProfile.setSex(CSSManagerEnums.genderType.Unspecified.ordinal());
				cssProfile.setSocialURI("");

				try {
					this.cssRegistry.registerCss(cssProfile);
					LOG.debug("Registering CSS with local database");
				} catch (CssRegistrationException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
				// internal eventing
				LOG.info(" :) :) :) :) Generating CSS_Record_Event to notify Record has been created");
				if(this.getEventMgr() != null){
					InternalEvent event = new InternalEvent(EventTypes.CSS_RECORD_EVENT, "CSS Record Created", this.idManager.getThisNetworkNode().toString(), cssProfile);
					try {
						LOG.info(":) :) :) :) Calling PublishInternalEvent with details :" +event.geteventType() +event.geteventName() +event.geteventSource() +event.geteventInfo());
						this.getEventMgr().publishInternalEvent(event);
					} catch (EMSException e) {
						// TODO Auto-generated catch block
						e.printStackTrace();
						LOG.error("error trying to internally publish SUBS CIS event");
					}
				}
			} else {
				// if CssRecord already persisted remove all nodes and add cloud node
				
				CssRecord cssRecord  = this.cssRegistry.getCssRecord();
				
				cssRecord.getCssNodes().clear();
				
				cssRecord.getCssNodes().add(cssNode);
				
				this.unregisterCSS(cssRecord);
				
			}
		} catch (CssRegistrationException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	/**
	 * Workaround for existing problem with database
	 * 
	 * @param update
	 * TODO : use normal CssRegistry update method when working
	 */
	private void updateCssRegistry(CssRecord update) {
		CssRecord existing;
		try {
			existing = this.cssRegistry.getCssRecord();
			if (null != existing) {
					this.cssRegistry.unregisterCss(existing);
					this.cssRegistry.registerCss(update);
			}
		} catch (CssRegistrationException e1) {
			// TODO Auto-generated catch block
			e1.printStackTrace();
		}
	}
	@Override
	public Future changeCSSNodeStatus(CssRecord profile) {
File
CSSManager.java
Developer's decision
Version 1
Kind of conflict
Comment
Method invocation
Method signature
Return statement
Try statement
Variable
Chunk
Conflicting content
			// add new node to login to cloud CssRecord
			cssRecord.getCssNodes().add(profile.getCssNodes().get(0));

<<<<<<< HEAD
			this.updateCssRegistry(cssRecord);
			LOG.debug("Updating CSS with local database");
=======
			try {
				this.cssRegistry.updateCssRecord(cssRecord);
				LOG.debug("Updating CSS with local database");
			} catch (CssRegistrationException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
			
			result.setProfile(cssRecord);
			result.setResultStatus(true);
Solution content
			// add new node to login to cloud CssRecord
			cssRecord.getCssNodes().add(profile.getCssNodes().get(0));

			this.updateCssRegistry(cssRecord);
			LOG.debug("Updating CSS with local database");
			
			result.setProfile(cssRecord);
			result.setResultStatus(true);
File
CSSManager.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Try statement
Chunk
Conflicting content
					iter.remove();
					break;
				}
<<<<<<< HEAD
			}

			result.setProfile(cssRecord);
			result.setResultStatus(true);
			
			this.updateCssRegistry(cssRecord);
			
			CssEvent event = new CssEvent();
			event.setType(CSSManagerEnums.DEPART_CSS_NODE);
			event.setDescription(CSSManagerEnums.DEPART_CSS_NODE_DESC);
			
			this.publishEvent(CSSManagerEnums.DEPART_CSS_NODE, event);

=======
			}

			result.setProfile(cssRecord);
			result.setResultStatus(true);
			
			try {
				this.cssRegistry.updateCssRecord(cssRecord);
			} catch (CssRegistrationException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			
			CssEvent event = new CssEvent();
			event.setType(CSSManagerEnums.DEPART_CSS_NODE);
			event.setDescription(CSSManagerEnums.DEPART_CSS_NODE_DESC);
			
			this.publishEvent(CSSManagerEnums.DEPART_CSS_NODE, event);

>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
		} catch (CssRegistrationException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
Solution content
					iter.remove();
					break;
				}
			}

			result.setProfile(cssRecord);
			result.setResultStatus(true);
			
			this.updateCssRegistry(cssRecord);
			
			CssEvent event = new CssEvent();
			event.setType(CSSManagerEnums.DEPART_CSS_NODE);
			event.setDescription(CSSManagerEnums.DEPART_CSS_NODE_DESC);
			
			this.publishEvent(CSSManagerEnums.DEPART_CSS_NODE, event);

		} catch (CssRegistrationException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
File
CSSManager.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Try statement
Variable
Chunk
Conflicting content
			cssRecord.setSex(profile.getSex());
			cssRecord.setHomeLocation(profile.getHomeLocation());
			cssRecord.setIdentityName(profile.getIdentityName());
<<<<<<< HEAD
			
			// internal eventing
			LOG.info(" :) :) :) :) Generating CSS_Record_Event to notify Record has changed");
			if(this.getEventMgr() != null){
				InternalEvent event = new InternalEvent(EventTypes.CSS_RECORD_EVENT, "CSS Record modified", this.idManager.getThisNetworkNode().toString(), cssRecord);
				try {
					LOG.info(":) :) :) :) Calling PublishInternalEvent with details :" +event.geteventType() +event.geteventName() +event.geteventSource() +event.geteventInfo());
					this.getEventMgr().publishInternalEvent(event);
				} catch (EMSException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
					LOG.error("error trying to internally publish SUBS CIS event");
				}
			}

			this.updateCssRegistry(cssRecord);
			LOG.debug("Updating CSS with local database");

=======

			try {
				this.cssRegistry.updateCssRecord(cssRecord);
				LOG.debug("Updating CSS with local database");
			} catch (CssRegistrationException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
			result.setProfile(cssRecord);
			result.setResultStatus(true);
			
Solution content
			cssRecord.setSex(profile.getSex());
			cssRecord.setHomeLocation(profile.getHomeLocation());
			cssRecord.setIdentityName(profile.getIdentityName());
			
			// internal eventing
			LOG.info(" :) :) :) :) Generating CSS_Record_Event to notify Record has changed");
			if(this.getEventMgr() != null){
				InternalEvent event = new InternalEvent(EventTypes.CSS_RECORD_EVENT, "CSS Record modified", this.idManager.getThisNetworkNode().toString(), cssRecord);
				try {
					LOG.info(":) :) :) :) Calling PublishInternalEvent with details :" +event.geteventType() +event.geteventName() +event.geteventSource() +event.geteventInfo());
					this.getEventMgr().publishInternalEvent(event);
				} catch (EMSException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
					LOG.error("error trying to internally publish SUBS CIS event");
				}
			}

			this.updateCssRegistry(cssRecord);
			LOG.debug("Updating CSS with local database");

			result.setProfile(cssRecord);
			result.setResultStatus(true);
			
File
CSSManager.java
Developer's decision
Version 1
Kind of conflict
Comment
If statement
Method invocation
Try statement
Chunk
Conflicting content
	getCssDirectoryRemote().findAllCssAdvertisementRecords(callback);
	recordList = callback.getResultList();
<<<<<<< HEAD
	
	for (CssAdvertisementRecord cssAdd : recordList) {
		LOG.info("@#@#@#@#@#@# ==== Comparing Id contains " +cssAdd.getId());
		if (cssAdd.getId().equalsIgnoreCase(MyId)) {
			LOG.info("This is my OWN ID not adding it #########  ");
		}else {
			cssFriends.add((cssAdd));
		}
		
		LOG.info("cssAdd.getName contains " +cssAdd.getName());
		LOG.info("cssFriends contains " +cssFriends +" entries");
	}
	
	LOG.info("cssFriends contains " +cssFriends);
	LOG.info("CSS Directory contains " +cssFriends.size() +" entries");
	
	LOG.info("Contacting SN Connector to get list");
	LOG.info("@@@@@@@@@@@@@@@@@@@@@@@ getSocialData() returns " +getSocialData());
	
	// Generate the connector
	Iterator it = socialdata.getSocialConnectors().iterator();
	socialdata.updateSocialData();
	
	while (it.hasNext()){
	  ISocialConnector conn = it.next();
  	  
	LOG.info("@@@@@@@@@@@@@@@@@@@@@@@ SocialNetwork connector contains " +conn.getConnectorName());
	
=======
	
	for (CssAdvertisementRecord cssAdd : recordList) {
		LOG.info("@#@#@#@#@#@# ==== Comparing Id contains " +cssAdd.getId());
		if (cssAdd.getId().equalsIgnoreCase(MyId)) {
			LOG.info("This is my OWN ID not adding it #########  ");
		}else {
			cssFriends.add((cssAdd));
		}
		
		LOG.info("cssAdd.getName contains " +cssAdd.getName());
		LOG.info("cssFriends contains " +cssFriends +" entries");
	}
	
	LOG.info("cssFriends contains " +cssFriends);
	LOG.info("CSS Directory contains " +cssFriends.size() +" entries");
	
	LOG.info("Contacting SN Connector to get list");
	LOG.info("@@@@@@@@@@@@@@@@@@@@@@@ getSocialData() returns " +getSocialData());
	
	// Generate the connector
	Iterator it = socialdata.getSocialConnectors().iterator();
	socialdata.updateSocialData();
	
	while (it.hasNext()){
	  ISocialConnector conn = it.next();
  	  
	LOG.info("@@@@@@@@@@@@@@@@@@@@@@@ SocialNetwork connector contains " +conn.getConnectorName());
	
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
	//socialdata.updateSocialData();
	}
	
Solution content
	getCssDirectoryRemote().findAllCssAdvertisementRecords(callback);
	recordList = callback.getResultList();
	
	for (CssAdvertisementRecord cssAdd : recordList) {
		LOG.info("@#@#@#@#@#@# ==== Comparing Id contains " +cssAdd.getId());
		if (cssAdd.getId().equalsIgnoreCase(MyId)) {
			LOG.info("This is my OWN ID not adding it #########  ");
		}else {
			cssFriends.add((cssAdd));
		}
		
		LOG.info("cssAdd.getName contains " +cssAdd.getName());
		LOG.info("cssFriends contains " +cssFriends +" entries");
	}
	
	LOG.info("cssFriends contains " +cssFriends);
	LOG.info("CSS Directory contains " +cssFriends.size() +" entries");
	
	LOG.info("Contacting SN Connector to get list");
	LOG.info("@@@@@@@@@@@@@@@@@@@@@@@ getSocialData() returns " +getSocialData());
	
	// Generate the connector
	Iterator it = socialdata.getSocialConnectors().iterator();
	socialdata.updateSocialData();
	
	while (it.hasNext()){
	  ISocialConnector conn = it.next();
  	  
	LOG.info("@@@@@@@@@@@@@@@@@@@@@@@ SocialNetwork connector contains " +conn.getConnectorName());
	
	//socialdata.updateSocialData();
	}
	
File
CSSManager.java
Developer's decision
Version 1
Kind of conflict
Comment
For statement
Method invocation
Variable
While statement
Chunk
Conflicting content
	@Override
		
		return date.toString();
	}
<<<<<<< HEAD

	public Future> getFriendRequests() {
		List pendingfriendList = new ArrayList();
		List friendReqList = new ArrayList();
		List recordList = new ArrayList();
		List pendingList = new ArrayList();	
		
		
		try {
			pendingfriendList = cssRegistry.getCssFriendRequests();
			
			for (CssRequest cssrequest : pendingfriendList) {
		    	LOG.info("[]][][][][][] CSS FriendRequest iterator List contains " +pendingfriendList);
		    	LOG.info("[]][][][][][] cssrequest status is: " +cssrequest.getRequestStatus());
		        if (cssrequest.getRequestStatus().value().equalsIgnoreCase("pending")) {
		        	//cssrequest.getCssIdentity();
		        	pendingList.add(cssrequest.getCssIdentity());
		        	LOG.info("[]][][][][][] pendingList size is now: " +pendingfriendList.size());
		        	LOG.info("[]][][][][][] pendingList entry is: " +cssrequest.getCssIdentity());
		        		
		        	}
		        	
		        }	
				
				
			// first get all the cssdirectory records
			CssDirectoryRemoteClient callback = new CssDirectoryRemoteClient();

			getCssDirectoryRemote().searchByID(pendingList, callback);
			friendReqList = callback.getResultList();

				
			} catch (CssRegistrationException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}

		return new AsyncResult>(friendReqList);
	}
=======
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
}
Solution content
		
		return date.toString();
	}

	@Override
	public Future> getFriendRequests() {
		List pendingfriendList = new ArrayList();
		List friendReqList = new ArrayList();
		List recordList = new ArrayList();
		List pendingList = new ArrayList();	
		
		
		try {
			pendingfriendList = cssRegistry.getCssFriendRequests();
			
			for (CssRequest cssrequest : pendingfriendList) {
		    	LOG.info("[]][][][][][] CSS FriendRequest iterator List contains " +pendingfriendList);
		    	LOG.info("[]][][][][][] cssrequest status is: " +cssrequest.getRequestStatus());
		        if (cssrequest.getRequestStatus().value().equalsIgnoreCase("pending")) {
		        	//cssrequest.getCssIdentity();
		        	pendingList.add(cssrequest.getCssIdentity());
		        	LOG.info("[]][][][][][] pendingList size is now: " +pendingfriendList.size());
		        	LOG.info("[]][][][][][] pendingList entry is: " +cssrequest.getCssIdentity());
		        		
		        	}
		        	
		        }	
				
				
			// first get all the cssdirectory records
			CssDirectoryRemoteClient callback = new CssDirectoryRemoteClient();

			getCssDirectoryRemote().searchByID(pendingList, callback);
			friendReqList = callback.getResultList();

				
			} catch (CssRegistrationException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}

		return new AsyncResult>(friendReqList);
	}
}
File
CSSManager.java
Developer's decision
Version 1
Kind of conflict
Annotation
Method declaration
Chunk
Conflicting content
				LOG.info("lookupAndRetrieveCtxAttributes : Retrieved ctxAttribute id " +ctxAttributeWeight.getId()+ "and value: "+ retrievedBlob.getSeed()+" (must be equal to '999' ");
			}

<<<<<<< HEAD
			List idsAttributesList2 = this.externalCtxBroker.lookup(requestorService, userIdentity, CtxModelType.ATTRIBUTE, CtxAttributeTypes.LOCATION_SYMBOLIC).get();
=======
			List idsAttributesList2 = this.ctxBroker.lookup(requestorService, userIdentity, CtxModelType.ATTRIBUTE, CtxAttributeTypes.LOCATION_SYMBOLIC).get();
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
			LOG.info("location attributes size : "+idsAttributesList2.size() );
			if( idsAttributesList2.size()>0 ){
				for(int i=0; i
Solution content
				LOG.info("lookupAndRetrieveCtxAttributes : Retrieved ctxAttribute id " +ctxAttributeWeight.getId()+ "and value: "+ retrievedBlob.getSeed()+" (must be equal to '999' ");
			}

			List idsAttributesList2 = this.externalCtxBroker.lookup(requestorService, userIdentity, CtxModelType.ATTRIBUTE, CtxAttributeTypes.LOCATION_SYMBOLIC).get();
			LOG.info("location attributes size : "+idsAttributesList2.size() );
			if( idsAttributesList2.size()>0 ){
				for(int i=0; i
File
ContextAware3pService.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
			if( idsAttributesList2.size()>0 ){
				for(int i=0; i>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
					String value = ctxAttributeLocation.getStringValue();
					LOG.info("lookupAndRetrieveCtxAttributes attr number:"+i +" ) Retrieved ctxAttribute id " +ctxAttributeLocation.getId()+ "and value: "+ value +" (must be equal to 'home' ");	
				}
Solution content
			if( idsAttributesList2.size()>0 ){
				for(int i=0; i
File
ContextAware3pService.java
Developer's decision
Version 1
Kind of conflict
Cast expression
Variable
Chunk
Conflicting content
			ctxCommunityEntityIdentifier = this.externalCtxBroker.retrieveCommunityEntityId(requestorService, cisID).get();
			LOG.info("communityEntityIdentifier retrieved: " +ctxCommunityEntityIdentifier.toString()+ " based on cisID: "+ cisID);

<<<<<<< HEAD
			CommunityCtxEntity commEntity = (CommunityCtxEntity) this.externalCtxBroker.retrieve(requestorService, ctxCommunityEntityIdentifier).get();
=======
			CommunityCtxEntity commEntity = (CommunityCtxEntity) this.ctxBroker.retrieve(requestorService, ctxCommunityEntityIdentifier).get();
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
			if(commEntity != null ){
				Set commEntityIds =  commEntity.getMembers();
				LOG.info("commEnt member size: "+commEntityIds.size());
Solution content
			ctxCommunityEntityIdentifier = this.externalCtxBroker.retrieveCommunityEntityId(requestorService, cisID).get();
			LOG.info("communityEntityIdentifier retrieved: " +ctxCommunityEntityIdentifier.toString()+ " based on cisID: "+ cisID);

			CommunityCtxEntity commEntity = (CommunityCtxEntity) this.externalCtxBroker.retrieve(requestorService, ctxCommunityEntityIdentifier).get();
			if(commEntity != null ){
				Set commEntityIds =  commEntity.getMembers();
				LOG.info("commEnt member size: "+commEntityIds.size());
File
ContextAware3pService.java
Developer's decision
Version 1
Kind of conflict
Cast expression
Variable
Chunk
Conflicting content
				for(CtxEntityIdentifier commMemberID :commEntityIds ){
					LOG.info("commEnt member Id:"+commMemberID.toString() );
					
<<<<<<< HEAD
					IndividualCtxEntity indiEnt = (IndividualCtxEntity) this.externalCtxBroker.retrieve(requestorService, commMemberID).get();
=======
					IndividualCtxEntity indiEnt = (IndividualCtxEntity) this.ctxBroker.retrieve(requestorService, commMemberID).get();
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
					LOG.info("commEnt member object :"+indiEnt.getId().toString() );
				}
				
Solution content
				for(CtxEntityIdentifier commMemberID :commEntityIds ){
					LOG.info("commEnt member Id:"+commMemberID.toString() );
					
					IndividualCtxEntity indiEnt = (IndividualCtxEntity) this.externalCtxBroker.retrieve(requestorService, commMemberID).get();
					LOG.info("commEnt member object :"+indiEnt.getId().toString() );
				}
				
File
ContextAware3pService.java
Developer's decision
Version 1
Kind of conflict
Cast expression
Variable
Chunk
Conflicting content
			
			
			
<<<<<<< HEAD
			List communityAttrIDList = this.externalCtxBroker.lookup(requestorService, ctxCommunityEntityIdentifier, CtxModelType.ATTRIBUTE, CtxAttributeTypes.INTERESTS).get();
=======
			List communityAttrIDList = this.ctxBroker.lookup(requestorService, ctxCommunityEntityIdentifier, CtxModelType.ATTRIBUTE, CtxAttributeTypes.INTERESTS).get();
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
			LOG.info("lookup results communityAttrIDList: "+ communityAttrIDList);		

			if(communityAttrIDList.size()>0 ){
Solution content
			
			
			
			List communityAttrIDList = this.externalCtxBroker.lookup(requestorService, ctxCommunityEntityIdentifier, CtxModelType.ATTRIBUTE, CtxAttributeTypes.INTERESTS).get();
			LOG.info("lookup results communityAttrIDList: "+ communityAttrIDList);		

			if(communityAttrIDList.size()>0 ){
File
ContextAware3pService.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
		}

	}
<<<<<<< HEAD
*/
=======

	
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
	
}
Solution content
		}

	}
*/
	
}
File
ExternalCtxBrokerExample.java
Developer's decision
Version 1
Kind of conflict
Other
Chunk
Conflicting content
import org.societies.api.identity.IdentityType;
import org.societies.api.identity.InvalidFormatException;
import org.societies.api.internal.context.broker.ICtxBroker;
<<<<<<< HEAD
import org.societies.api.internal.css.management.ICSSLocalManager;
import org.societies.api.schema.activity.Activity;
import org.societies.api.schema.cssmanagement.CssRecord;
=======
import org.societies.api.schema.activity.Activity;
import org.societies.api.activity.IActivityFeed;
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
import org.societies.api.comm.xmpp.exceptions.CommunicationException;
import org.societies.api.comm.xmpp.exceptions.XMPPError;
import org.societies.api.comm.xmpp.interfaces.ICommManager;
Solution content
import org.societies.api.identity.IdentityType;
import org.societies.api.identity.InvalidFormatException;
import org.societies.api.internal.context.broker.ICtxBroker;
import org.societies.api.internal.css.management.ICSSLocalManager;
import org.societies.api.schema.activity.Activity;
import org.societies.api.schema.cssmanagement.CssRecord;
import org.societies.api.comm.xmpp.exceptions.CommunicationException;
import org.societies.api.comm.xmpp.exceptions.XMPPError;
import org.societies.api.comm.xmpp.interfaces.ICommManager;
File
CtxBrokerExample.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
	private ICisOwned cisOwned  = null;

	private INetworkNode cssNodeId;
<<<<<<< HEAD
	
	
	private ICSSLocalManager cssManager;
	
=======

>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
	String cssPassword = "password.societies.local";

Solution content
	private ICisOwned cisOwned  = null;

	private INetworkNode cssNodeId;
	
	
	private ICSSLocalManager cssManager;
	
	String cssPassword = "password.societies.local";

File
CtxBrokerExample.java
Developer's decision
Version 1
Kind of conflict
Attribute
Chunk
Conflicting content
	private CtxIdentifier ctxAttributeBinaryIdentifier = null;

	@Autowired(required=true)
<<<<<<< HEAD
	public CtxBrokerExample(ICtxBroker internalCtxBroker, ICommManager commMgr, ICisManager cisManager,PubsubClient pubsubClient, ICSSLocalManager cssManager) throws InvalidFormatException {
=======
	public CtxBrokerExample(ICtxBroker internalCtxBroker, ICommManager commMgr, ICisManager cisManager,PubsubClient pubsubClient) throws InvalidFormatException {
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63

		LOG.info("*** CtxBrokerExample instantiated "+this.internalCtxBroker);
Solution content
	private CtxIdentifier ctxAttributeBinaryIdentifier = null;

	@Autowired(required=true)
	public CtxBrokerExample(ICtxBroker internalCtxBroker, ICommManager commMgr, ICisManager cisManager,PubsubClient pubsubClient, ICSSLocalManager cssManager) throws InvalidFormatException {

		LOG.info("*** CtxBrokerExample instantiated "+this.internalCtxBroker);
File
CtxBrokerExample.java
Developer's decision
Version 1
Kind of conflict
Method signature
Chunk
Conflicting content
		this.pubsubClient = pubsubClient;
		LOG.info("*** pubsubClient instantiated "+this.cisManager);

<<<<<<< HEAD
		this.cssManager = cssManager;
		LOG.info("*** cssManager instantiated "+this.cssManager);
		
=======
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
		this.cssNodeId = commMgr.getIdManager().getThisNetworkNode();
		LOG.info("*** cssNodeId = " + this.cssNodeId);
		
Solution content
		this.pubsubClient = pubsubClient;
		LOG.info("*** pubsubClient instantiated "+this.cisManager);

		this.cssManager = cssManager;
		LOG.info("*** cssManager instantiated "+this.cssManager);
		
		this.cssNodeId = commMgr.getIdManager().getThisNetworkNode();
		LOG.info("*** cssNodeId = " + this.cssNodeId);
		
File
CtxBrokerExample.java
Developer's decision
Version 1
Kind of conflict
Attribute
Method invocation
Chunk
Conflicting content
			
=======

			}

<<<<<<< HEAD
			
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
Solution content
			}

			
			
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
File
CtxBrokerExample.java
Developer's decision
Version 1
Kind of conflict
Blank
Chunk
Conflicting content
			if(attributesBooks.size()>0){
				for(CtxAttribute ctxAttr : attributesBooks){
					LOG.info("CtxAttribute books id:"+ctxAttr.getId() + "value"+ctxAttr.getStringValue() ) ;
<<<<<<< HEAD
=======
				}	
			}

			Set attributesAll = operator2.getAttributes();
			if(attributesAll.size()>0){
				for(CtxAttribute ctxAttr : attributesAll){
					LOG.info("ALL CtxAttribute  id:"+ctxAttr.getId()) ;
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
				}	
			}
Solution content
			if(attributesBooks.size()>0){
				for(CtxAttribute ctxAttr : attributesBooks){
					LOG.info("CtxAttribute books id:"+ctxAttr.getId() + "value"+ctxAttr.getStringValue() ) ;
				}	
			}
File
CtxBrokerExample.java
Developer's decision
Version 1
Kind of conflict
For statement
If statement
Method invocation
Variable
Chunk
Conflicting content
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
package org.societies.orchestration.CSM.main.java.GroupIdentfier;
<<<<<<< HEAD:intelligent-community-orchestration/CSM/src/main/java/org/societies/orchestration/CSM/main/java/GroupIdentfier/IcoRecommendtionEvent.java

import java.io.Serializable;

import org.societies.api.identity.IIdentity;
import org.societies.api.internal.orchestration.ICommunitySuggestion;

=======

import org.societies.api.identity.IIdentity;
import org.societies.api.internal.orchestration.ICommunitySuggestion;
import org.societies.api.personalisation.model.IAction;
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63:intelligent-community-orchestration/CSM/src/main/java/org/societies/orchestration/CSM/main/java/GroupIdentfier/IcoRecommendtionEvent.java

/**
 * Describe your class here...
Solution content
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
package org.societies.orchestration.CSM.main.java.GroupIdentfier;

import java.io.Serializable;

import org.societies.api.identity.IIdentity;
import org.societies.api.internal.orchestration.ICommunitySuggestion;


/**
 * Describe your class here...
File
IcoRecommendtionEvent.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
 * @author John
 *
 */
<<<<<<< HEAD:intelligent-community-orchestration/CSM/src/main/java/org/societies/orchestration/CSM/main/java/GroupIdentfier/IcoRecommendtionEvent.java
public class IcoRecommendtionEvent implements Serializable {

    /**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private IIdentity userId;
=======
public class IcoRecommendtionEvent {

    private IIdentity userId;
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63:intelligent-community-orchestration/CSM/src/main/java/org/societies/orchestration/CSM/main/java/GroupIdentfier/IcoRecommendtionEvent.java
    private ICommunitySuggestion cs;
    
    public IcoRecommendtionEvent(IIdentity userId,ICommunitySuggestion cs){
Solution content
 * @author John
 *
 */
public class IcoRecommendtionEvent implements Serializable {

    /**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private IIdentity userId;
    private ICommunitySuggestion cs;
    
    public IcoRecommendtionEvent(IIdentity userId,ICommunitySuggestion cs){
File
IcoRecommendtionEvent.java
Developer's decision
Version 1
Kind of conflict
Attribute
Class signature
Comment
Chunk
Conflicting content
import org.societies.api.cis.directory.ICisDirectory;
import org.societies.api.cis.attributes.MembershipCriteria;
import org.societies.api.cis.attributes.Rule;
<<<<<<< HEAD:intelligent-community-orchestration/CSM/src/main/java/org/societies/orchestration/CSM/main/java/Models/ModelManager.java
import org.societies.api.identity.IIdentity;
=======
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63:intelligent-community-orchestration/CSM/src/main/java/org/societies/orchestration/CSM/main/java/Models/ModelManager.java

//***
//	for unit testing only 
Solution content
import org.societies.api.cis.directory.ICisDirectory;
import org.societies.api.cis.attributes.MembershipCriteria;
import org.societies.api.cis.attributes.Rule;
import org.societies.api.identity.IIdentity;

//***
//	for unit testing only 
File
ModelManager.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
	//
	private Map> attModel;
	private HashMap modelAttRange;
<<<<<<< HEAD:intelligent-community-orchestration/CSM/src/main/java/org/societies/orchestration/CSM/main/java/Models/ModelManager.java
	private Map> userSubscribed;
=======
	private Map> userSubscribed;
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63:intelligent-community-orchestration/CSM/src/main/java/org/societies/orchestration/CSM/main/java/Models/ModelManager.java
	
	public ModelManager()  {
		// 
Solution content
	//
	private Map> attModel;
	private HashMap modelAttRange;
	private Map> userSubscribed;
	
	public ModelManager()  {
		// 
File
ModelManager.java
Developer's decision
Version 1
Kind of conflict
Attribute
Chunk
Conflicting content
		// TODO figure out later if needed phase 2
	}
	
<<<<<<< HEAD:intelligent-community-orchestration/CSM/src/main/java/org/societies/orchestration/CSM/main/java/Models/ModelManager.java
	public void updateSubscribed(IIdentity user, String model){
=======
	public void updateSubscribed(Integer user, String model){
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63:intelligent-community-orchestration/CSM/src/main/java/org/societies/orchestration/CSM/main/java/Models/ModelManager.java
		LOG.debug("ModelManager : update Subscribed ");
		ArrayList tmpList = new ArrayList();
		tmpList.add(model);
Solution content
		// TODO figure out later if needed phase 2
	}
	
	public void updateSubscribed(IIdentity user, String model){
		LOG.debug("ModelManager : update Subscribed ");
		ArrayList tmpList = new ArrayList();
		tmpList.add(model);
File
ModelManager.java
Developer's decision
Version 1
Kind of conflict
Method signature
Chunk
Conflicting content
	}
	
<<<<<<< HEAD:intelligent-community-orchestration/CSM/src/main/java/org/societies/orchestration/CSM/main/java/Models/ModelManager.java
	public ArrayList getSubscribed(IIdentity user){
=======
	public ArrayList getSubscribed(Integer user){
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63:intelligent-community-orchestration/CSM/src/main/java/org/societies/orchestration/CSM/main/java/Models/ModelManager.java
		LOG.debug("ModelManager : get Subscribed ");
		if (userSubscribed.containsKey(user)){
			return userSubscribed.get(user);
Solution content
	}
	
	public ArrayList getSubscribed(IIdentity user){
		LOG.debug("ModelManager : get Subscribed ");
		if (userSubscribed.containsKey(user)){
			return userSubscribed.get(user);
File
ModelManager.java
Developer's decision
Version 1
Kind of conflict
Method signature
Chunk
Conflicting content
		return null;
	}

<<<<<<< HEAD:intelligent-community-orchestration/CSM/src/main/java/org/societies/orchestration/CSM/main/java/Models/ModelManager.java
	public HashMap getUnSubscribed(IIdentity user){
=======
	public HashMap getUnSubscribed(Integer user){
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63:intelligent-community-orchestration/CSM/src/main/java/org/societies/orchestration/CSM/main/java/Models/ModelManager.java
		LOG.debug("ModelManager : get UN Subscribed ");
		HashMap tmpList = models.getModelNames();
		if (userSubscribed.containsKey(user)){
Solution content
		return null;
	}

	public HashMap getUnSubscribed(IIdentity user){
		LOG.debug("ModelManager : get UN Subscribed ");
		HashMap tmpList = models.getModelNames();
		if (userSubscribed.containsKey(user)){
File
ModelManager.java
Developer's decision
Version 1
Kind of conflict
Method signature
Chunk
Conflicting content
 */
package org.societies.orchestration.CSM.main.java.csm;

<<<<<<< HEAD:intelligent-community-orchestration/CSM/src/main/java/org/societies/orchestration/CSM/main/java/csm/CSM.java
//import local.test.dummy.interfaces.ICisDirectory;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.societies.api.cis.directory.ICisDirectory;
=======
import local.test.dummy.interfaces.ICisDirectory;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63:intelligent-community-orchestration/CSM/src/main/java/org/societies/orchestration/CSM/main/java/csm/CSM.java
import org.societies.api.context.broker.ICtxBroker;
import org.societies.api.identity.IIdentity;
import org.societies.api.osgi.event.CSSEvent;
Solution content
 */
package org.societies.orchestration.CSM.main.java.csm;

//import local.test.dummy.interfaces.ICisDirectory;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.societies.api.cis.directory.ICisDirectory;
import org.societies.api.context.broker.ICtxBroker;
import org.societies.api.identity.IIdentity;
import org.societies.api.osgi.event.CSSEvent;
File
CSM.java
Developer's decision
Version 1
Kind of conflict
Comment
Import
Chunk
Conflicting content
        intentFilter.addAction(LocalCSSManagerService.LOGIN_XMPP_SERVER);
        intentFilter.addAction(LocalCSSManagerService.LOGOUT_XMPP_SERVER);
        intentFilter.addAction(LocalCSSManagerService.MODIFY_ANDROID_CSS_RECORD);
<<<<<<< HEAD
        intentFilter.addAction(LocalCSSManagerService.SUGGESTED_FRIENDS);
        intentFilter.addAction(LocalCSSManagerService.GET_CSS_FRIENDS);
=======
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
        
        this.ctx.getContext().registerReceiver(new bReceiver(), intentFilter);
    	
Solution content
        intentFilter.addAction(LocalCSSManagerService.LOGIN_XMPP_SERVER);
        intentFilter.addAction(LocalCSSManagerService.LOGOUT_XMPP_SERVER);
        intentFilter.addAction(LocalCSSManagerService.MODIFY_ANDROID_CSS_RECORD);
        intentFilter.addAction(LocalCSSManagerService.SUGGESTED_FRIENDS);
        intentFilter.addAction(LocalCSSManagerService.GET_CSS_FRIENDS);
        
        this.ctx.getContext().registerReceiver(new bReceiver(), intentFilter);
    	
File
PluginCSSManager.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Chunk
Conflicting content
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
				} catch (JSONException e1) {
					Log.d(LOG_TAG, "parameter 1 - hosting location: " + data.getJSONObject(1).getString("cssHostingLocation"));
					Log.d(LOG_TAG, "parameter 1 - domain server: " + data.getJSONObject(1).getString("domainServer"));
					Log.d(LOG_TAG, "parameter 1 - password: " + data.getJSONObject(1).getString("password"));
<<<<<<< HEAD
=======
				} catch (JSONException e1) {
					// TODO Auto-generated catch block
					e1.printStackTrace();
				}

				try {
					Log.d(LOG_TAG, "parameter 1 - nodes: " + data.getJSONObject(1).getJSONArray("cssNodes").getJSONObject(0).getString("identity"));
					// TODO Auto-generated catch block
					e1.printStackTrace();
Solution content
					Log.d(LOG_TAG, "parameter 1 - hosting location: " + data.getJSONObject(1).getString("cssHostingLocation"));
					Log.d(LOG_TAG, "parameter 1 - domain server: " + data.getJSONObject(1).getString("domainServer"));
					Log.d(LOG_TAG, "parameter 1 - password: " + data.getJSONObject(1).getString("password"));
				} catch (JSONException e1) {
					// TODO Auto-generated catch block
					e1.printStackTrace();
File
PluginCSSManager.java
Developer's decision
Version 1
Kind of conflict
Catch clause
Method invocation
Try statement
Chunk
Conflicting content
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
<<<<<<< HEAD
			} else if (action.equals(ServiceMethodTranslator.getMethodName(IAndroidCSSManager.methodsArray, 17))) {
				try {
					Log.d(LOG_TAG, "parameter 0: " + data.getString(0));
				} catch (JSONException e1) {
					// TODO Auto-generated catch block
					e1.printStackTrace();
				}

				try {
					this.localCSSManager.getCssFriends(data.getString(0));
				} catch (Exception e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			} else if (action.equals(ServiceMethodTranslator.getMethodName(IAndroidCSSManager.methodsArray, 18))) {
				try {
					Log.d(LOG_TAG, "parameter 0: " + data.getString(0));
				} catch (JSONException e1) {
					// TODO Auto-generated catch block
					e1.printStackTrace();
				}

				try {
					this.localCSSManager.getSuggestedFriends(data.getString(0));
				} catch (Exception e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
=======
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
			}
			
			// Don't return any result now, since status results will be sent when events come in from broadcast receiver 
Solution content
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			} else if (action.equals(ServiceMethodTranslator.getMethodName(IAndroidCSSManager.methodsArray, 17))) {
				try {
					Log.d(LOG_TAG, "parameter 0: " + data.getString(0));
				} catch (JSONException e1) {
					// TODO Auto-generated catch block
					e1.printStackTrace();
				}

				try {
					this.localCSSManager.getCssFriends(data.getString(0));
				} catch (Exception e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			} else if (action.equals(ServiceMethodTranslator.getMethodName(IAndroidCSSManager.methodsArray, 18))) {
				try {
					Log.d(LOG_TAG, "parameter 0: " + data.getString(0));
				} catch (JSONException e1) {
					// TODO Auto-generated catch block
					e1.printStackTrace();
				}

				try {
					this.localCSSManager.getSuggestedFriends(data.getString(0));
				} catch (Exception e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			}
			
			// Don't return any result now, since status results will be sent when events come in from broadcast receiver 
File
PluginCSSManager.java
Developer's decision
Version 1
Kind of conflict
If statement
Try statement
Chunk
Conflicting content
				if (methodCallbackId != null) {
					PluginCSSManager.this.sendJavascriptResult(methodCallbackId, intent, mapKey);
				}
<<<<<<< HEAD
			} else if (intent.getAction().equals(LocalCSSManagerService.GET_CSS_FRIENDS)) {
				String mapKey = ServiceMethodTranslator.getMethodName(IAndroidCSSManager.methodsArray, 17);
				
				String methodCallbackId = PluginCSSManager.this.methodCallbacks.get(mapKey);
				if (methodCallbackId != null) {
					PluginCSSManager.this.sendJavascriptResult(methodCallbackId, intent, mapKey);
				}
			} else if (intent.getAction().equals(LocalCSSManagerService.SUGGESTED_FRIENDS)) {
				String mapKey = ServiceMethodTranslator.getMethodName(IAndroidCSSManager.methodsArray, 18);
				
				String methodCallbackId = PluginCSSManager.this.methodCallbacks.get(mapKey);
				if (methodCallbackId != null) {
					PluginCSSManager.this.sendJavascriptResult(methodCallbackId, intent, mapKey);
				}
=======
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
			} 
		}
	};
Solution content
				if (methodCallbackId != null) {
					PluginCSSManager.this.sendJavascriptResult(methodCallbackId, intent, mapKey);
				}
			} else if (intent.getAction().equals(LocalCSSManagerService.GET_CSS_FRIENDS)) {
				String mapKey = ServiceMethodTranslator.getMethodName(IAndroidCSSManager.methodsArray, 17);
				
				String methodCallbackId = PluginCSSManager.this.methodCallbacks.get(mapKey);
				if (methodCallbackId != null) {
					PluginCSSManager.this.sendJavascriptResult(methodCallbackId, intent, mapKey);
				}
			} else if (intent.getAction().equals(LocalCSSManagerService.SUGGESTED_FRIENDS)) {
				String mapKey = ServiceMethodTranslator.getMethodName(IAndroidCSSManager.methodsArray, 18);
				
				String methodCallbackId = PluginCSSManager.this.methodCallbacks.get(mapKey);
				if (methodCallbackId != null) {
					PluginCSSManager.this.sendJavascriptResult(methodCallbackId, intent, mapKey);
				}
			} 
		}
	};
File
PluginCSSManager.java
Developer's decision
Version 1
Kind of conflict
If statement
Method invocation
Variable
Chunk
Conflicting content
				Log.d(LOG_TAG, "Callback receiveResult sent return value: " + retValue);
				
				LocalCSSManagerService.this.ccm.unregister(LocalCSSManagerService.ELEMENT_NAMES, this);
<<<<<<< HEAD
=======
		        
				this.updateLocalPersistence(aRecord);
				
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
			}
		}
		
Solution content
				Log.d(LOG_TAG, "Callback receiveResult sent return value: " + retValue);
				
				LocalCSSManagerService.this.ccm.unregister(LocalCSSManagerService.ELEMENT_NAMES, this);
			}
		}
		
File
LocalCSSManagerService.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Chunk
Conflicting content
	

	private Subscriber subscriber = new Subscriber() {
<<<<<<< HEAD
		
=======
		@Override
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
		public void pubsubEvent(IIdentity identity, String node, String itemId,
				Object payload) {
			Log.d(LOG_TAG, "Received Pubsub event: " + node + " itemId: " + itemId);
Solution content
	

	private Subscriber subscriber = new Subscriber() {
		
		public void pubsubEvent(IIdentity identity, String node, String itemId,
				Object payload) {
			Log.d(LOG_TAG, "Received Pubsub event: " + node + " itemId: " + itemId);
File
LocalCSSManagerService.java
Developer's decision
Version 1
Kind of conflict
Annotation
Chunk
Conflicting content
			throw new RuntimeException(e);
		}     
    }
<<<<<<< HEAD

=======
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
}
Solution content
			throw new RuntimeException(e);
		}     
    }

}
File
LocalCSSManagerService.java
Developer's decision
Version 1
Kind of conflict
Blank
Chunk
Conflicting content
		else {
			try {
				// -- CIS Configuration
<<<<<<< HEAD
				Hashtable cisCriteria = null;
				if (cisCreationForm.getValue().isEmpty() == false){ 
					cisCriteria = new Hashtable (); 
					MembershipCriteria m = new MembershipCriteria();
					try {
						Rule r = new Rule(cisCreationForm.getOperator(), new ArrayList(Arrays.asList(cisCreationForm.getValue())));
						m.setRule(r);
						cisCriteria.put(cisCreationForm.getAttribute(), m);
					}
					catch(InvalidParameterException e){
						resultMsg.append("Warning: Can't retrieve the membership criterii.");
					}
				}
=======
				Hashtable cisCriteria = new Hashtable (); 
				MembershipCriteria m = new MembershipCriteria();
				try {
					Rule r = new Rule(cisCreationForm.getOperator(), new ArrayList(Arrays.asList(cisCreationForm.getValue())));
					m.setRule(r);
					cisCriteria.put(cisCreationForm.getAttribute(), m);
				}
				catch(InvalidParameterException e){
					resultMsg.append("Warning: Can't retrieve the membership criterii.");
				}

>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63

				// -- Generate Privacy Policy
				CisCreationForm cisData;
Solution content
		else {
			try {
				// -- CIS Configuration
				Hashtable cisCriteria = null;
				if (cisCreationForm.getValue().isEmpty() == false){ 
					cisCriteria = new Hashtable (); 
					MembershipCriteria m = new MembershipCriteria();
					try {
						Rule r = new Rule(cisCreationForm.getOperator(), new ArrayList(Arrays.asList(cisCreationForm.getValue())));
						m.setRule(r);
						cisCriteria.put(cisCreationForm.getAttribute(), m);
					}
					catch(InvalidParameterException e){
						resultMsg.append("Warning: Can't retrieve the membership criterii.");
					}
				}

				// -- Generate Privacy Policy
				CisCreationForm cisData;
File
CisManagerController.java
Developer's decision
Version 1
Kind of conflict
If statement
Method invocation
Try statement
Variable
Chunk
Conflicting content
import org.societies.api.internal.privacytrust.privacyprotection.remote.IPrivacyPolicyManagerRemote;
import org.societies.api.internal.servicelifecycle.IServiceDiscovery;
import org.societies.api.internal.servicelifecycle.ServiceDiscoveryException;
<<<<<<< HEAD
import org.societies.api.internal.servicelifecycle.ServiceModelUtils;
=======
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
import org.societies.api.schema.identity.DataIdentifierScheme;
import org.societies.api.schema.servicelifecycle.model.Service;
import org.societies.api.schema.servicelifecycle.model.ServiceResourceIdentifier;
Solution content
import org.societies.api.internal.privacytrust.privacyprotection.remote.IPrivacyPolicyManagerRemote;
import org.societies.api.internal.servicelifecycle.IServiceDiscovery;
import org.societies.api.internal.servicelifecycle.ServiceDiscoveryException;
import org.societies.api.internal.servicelifecycle.ServiceModelUtils;
import org.societies.api.schema.identity.DataIdentifierScheme;
import org.societies.api.schema.servicelifecycle.model.Service;
import org.societies.api.schema.servicelifecycle.model.ServiceResourceIdentifier;
File
PrivacyPolicyController.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
		// -- Retrieve the privacy policy
		RequestorService provider = null;
		RequestPolicy privacyPolicy = null;
<<<<<<< HEAD
		Service service = ServiceModelUtils.getServiceFromServiceInstance(serviceId, serviceDiscovery);
		//service.setServiceName(serviceId);
=======
		Service service = new Service();
		service.setServiceName(serviceId);
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
		try {
			IIdentity serviceOwnerIdentity = null;
			// Current node
Solution content
		// -- Retrieve the privacy policy
		RequestorService provider = null;
		RequestPolicy privacyPolicy = null;
		Service service = ServiceModelUtils.getServiceFromServiceInstance(serviceId, serviceDiscovery);
		//service.setServiceName(serviceId);
		try {
			IIdentity serviceOwnerIdentity = null;
			// Current node
File
PrivacyPolicyController.java
Developer's decision
Version 1
Kind of conflict
Comment
Method invocation
Variable
Chunk
Conflicting content
			else {
				serviceOwnerIdentity = commMngrRef.getIdManager().fromJid(serviceOwnerId);
			}
<<<<<<< HEAD
			ServiceResourceIdentifier serviceIdentity = service.getServiceIdentifier();
=======
			ServiceResourceIdentifier serviceIdentity = new ServiceResourceIdentifier();
			serviceIdentity.setServiceInstanceIdentifier(serviceId);
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
			provider = new RequestorService(serviceOwnerIdentity, serviceIdentity);
			privacyPolicy = privacyPolicyManager.getPrivacyPolicy(provider);
			Future serviceFuture = serviceDiscovery.getService(serviceIdentity);
Solution content
			else {
				serviceOwnerIdentity = commMngrRef.getIdManager().fromJid(serviceOwnerId);
			}
			ServiceResourceIdentifier serviceIdentity = service.getServiceIdentifier();
			provider = new RequestorService(serviceOwnerIdentity, serviceIdentity);
			privacyPolicy = privacyPolicyManager.getPrivacyPolicy(provider);
			Future serviceFuture = serviceDiscovery.getService(serviceIdentity);
File
PrivacyPolicyController.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
<<<<<<< HEAD
	private IPrivacyAgreementManagerInternal privacyAgreementManagerInternal;
	private IPrivacyDataManagerInternal privacyDataManagerInternal;
	
	private INegotiationAgentRemote negotiationAgentRemote;
=======
	private INegotiationAgentRemote negotiationAgent;
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
	
	private IIdentitySelection identitySelection;
	
Solution content
	private IPrivacyAgreementManagerInternal privacyAgreementManagerInternal;
	private IPrivacyDataManagerInternal privacyDataManagerInternal;
	
	private INegotiationAgentRemote negotiationAgentRemote;
	
	private IIdentitySelection identitySelection;
	
File
PrivacyPolicyNegotiationManager.java
Developer's decision
Version 1
Kind of conflict
Attribute
Chunk
Conflicting content
	/**
	 * @return the negotiationAgentRemote
	 */
<<<<<<< HEAD
	public INegotiationAgentRemote getNegotiationAgentRemote() {
		return negotiationAgentRemote;
=======
	public INegotiationAgentRemote getNegotiationAgent() {
		return negotiationAgent;
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
	}
	/**
	 * @param negotiationAgentRemote the negotiationAgentRemote to set
Solution content
	/**
	 * @return the negotiationAgentRemote
	 */
	public INegotiationAgentRemote getNegotiationAgentRemote() {
		return negotiationAgentRemote;
	}
	/**
	 * @param negotiationAgentRemote the negotiationAgentRemote to set
File
PrivacyPolicyNegotiationManager.java
Developer's decision
Version 1
Kind of conflict
Attribute
Method signature
Return statement
Chunk
Conflicting content
	/**
	 * @param negotiationAgentRemote the negotiationAgentRemote to set
	 */
<<<<<<< HEAD
	public void setNegotiationAgentRemote(INegotiationAgentRemote negotiationAgentRemote) {
		this.negotiationAgentRemote = negotiationAgentRemote;
		
		this.logging.debug("Set Remote Negotiation Agent : "+this.negotiationAgentRemote.getClass().getName());
=======
	public void setNegotiationAgent(INegotiationAgentRemote negotiationAgent) {
		this.negotiationAgent = negotiationAgent;
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
	}
	/**
	 * @return the identitySelection
Solution content
	/**
	 * @param negotiationAgentRemote the negotiationAgentRemote to set
	 */
	public void setNegotiationAgentRemote(INegotiationAgentRemote negotiationAgentRemote) {
		this.negotiationAgentRemote = negotiationAgentRemote;
		
		this.logging.debug("Set Remote Negotiation Agent : "+this.negotiationAgentRemote.getClass().getName());
	}
	/**
	 * @return the identitySelection
File
PrivacyPolicyNegotiationManager.java
Developer's decision
Version 1
Kind of conflict
Attribute
Method invocation
Method signature
Chunk
Conflicting content
import org.societies.api.internal.privacytrust.privacyprotection.model.privacypolicy.RequestPolicy;
import org.societies.api.internal.privacytrust.privacyprotection.model.privacypolicy.ResponseItem;
import org.societies.api.internal.privacytrust.privacyprotection.model.privacypolicy.ResponsePolicy;
<<<<<<< HEAD
import org.societies.api.internal.privacytrust.privacyprotection.remote.INegotiationAgentRemote;
=======
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
import org.societies.api.osgi.event.EMSException;
import org.societies.api.osgi.event.EventTypes;
import org.societies.api.osgi.event.IEventMgr;
Solution content
import org.societies.api.internal.privacytrust.privacyprotection.model.privacypolicy.RequestPolicy;
import org.societies.api.internal.privacytrust.privacyprotection.model.privacypolicy.ResponseItem;
import org.societies.api.internal.privacytrust.privacyprotection.model.privacypolicy.ResponsePolicy;
import org.societies.api.internal.privacytrust.privacyprotection.remote.INegotiationAgentRemote;
import org.societies.api.osgi.event.EMSException;
import org.societies.api.osgi.event.EventTypes;
import org.societies.api.osgi.event.IEventMgr;
File
NegotiationClient.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
public class NegotiationClient implements INegotiationClient {

	private Logger logging = LoggerFactory.getLogger(this.getClass());
<<<<<<< HEAD
	private final INegotiationAgentRemote negotiationAgentRemote;
=======
	private final INegotiationAgentRemote negotiationAgent;
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
	private RequestPolicy requestPolicy;
	private ICtxBroker ctxBroker;
	private IEventMgr eventMgr;
Solution content
public class NegotiationClient implements INegotiationClient {

	private Logger logging = LoggerFactory.getLogger(this.getClass());
	private final INegotiationAgentRemote negotiationAgentRemote;
	private RequestPolicy requestPolicy;
	private ICtxBroker ctxBroker;
	private IEventMgr eventMgr;
File
NegotiationClient.java
Developer's decision
Version 1
Kind of conflict
Attribute
Chunk
Conflicting content
	private IIdentity userIdentity;
	
	public NegotiationClient(INegotiationAgentRemote negotiationAgent, PrivacyPolicyNegotiationManager privacyPolicyNegotiationManager){
<<<<<<< HEAD
		this.negotiationAgentRemote = negotiationAgent;
=======
		this.negotiationAgent = negotiationAgent;
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
		this.policyMgr = privacyPolicyNegotiationManager;
		this.privacyPolicyManager = privacyPolicyNegotiationManager.getPrivacyPolicyManager();
		this.ctxBroker = privacyPolicyNegotiationManager.getCtxBroker();
Solution content
	private IIdentity userIdentity;
	
	public NegotiationClient(INegotiationAgentRemote negotiationAgent, PrivacyPolicyNegotiationManager privacyPolicyNegotiationManager){
		this.negotiationAgentRemote = negotiationAgent;
		this.policyMgr = privacyPolicyNegotiationManager;
		this.privacyPolicyManager = privacyPolicyNegotiationManager.getPrivacyPolicyManager();
		this.ctxBroker = privacyPolicyNegotiationManager.getCtxBroker();
File
NegotiationClient.java
Developer's decision
Version 1
Kind of conflict
Attribute
Variable
Chunk
Conflicting content
import org.societies.api.schema.identity.RequestorBean;
import org.societies.api.schema.identity.RequestorCisBean;
import org.societies.api.schema.identity.RequestorServiceBean;
<<<<<<< HEAD
=======
import org.societies.api.schema.servicelifecycle.model.ServiceResourceIdentifier;
import org.societies.api.comm.xmpp.datatypes.Stanza;
import org.societies.api.comm.xmpp.datatypes.XMPPInfo;
import org.societies.api.comm.xmpp.exceptions.CommunicationException;
import org.societies.api.comm.xmpp.exceptions.XMPPError;
import org.societies.api.comm.xmpp.interfaces.ICommCallback;
import org.societies.api.comm.xmpp.interfaces.ICommManager;
import org.societies.privacytrust.privacyprotection.api.remote.INegotiationAgentRemote;
import org.springframework.scheduling.annotation.Async;
>>>>>>> 7f688c00f09bad3775209b2cd0920f3cc3914b63
import org.springframework.scheduling.annotation.AsyncResult;
/**
 * Comms Client that initiates the remote communication
Solution content
import org.societies.api.schema.identity.RequestorBean;
import org.societies.api.schema.identity.RequestorCisBean;
import org.societies.api.schema.identity.RequestorServiceBean;
import org.springframework.scheduling.annotation.AsyncResult;
/**
 * Comms Client that initiates the remote communication
File
PrivacyNegotiationManagerCommClient.java
Developer's decision
Version 1
Kind of conflict
Import