use of org.eclipse.ecf.provider.generic.TCPClientSOContainer in project ecf by eclipse.
the class PresenceContainerAdapterFactory method getAdapter.
public Object getAdapter(Object adaptableObject, Class adapterType) {
if (adapterType.equals(IPresenceContainerAdapter.class)) {
TCPClientSOContainer container = (TCPClientSOContainer) adaptableObject;
ISharedObjectManager manager = container.getSharedObjectManager();
ID[] ids = manager.getSharedObjectIDs();
for (int i = 0; i < ids.length; i++) {
ISharedObject object = manager.getSharedObject(ids[i]);
if (object instanceof EclipseCollabSharedObject) {
EclipseCollabSharedObject ecso = (EclipseCollabSharedObject) object;
return ecso.getPresenceContainer();
}
}
}
return null;
}
Aggregations