public static WaveletSetTitleService create() { return new WaveletSetTitleService(); } }
@Override protected void setUp() throws Exception { service = WaveletSetTitleService.create(); helper = new OperationServiceHelper(WAVELET_NAME, ALEX); ObservableConversationBlip rootBlip = getRootBlip(); LineContainers.appendToLastLine( rootBlip.getContent(), XmlStringBuilder.createText(INITIAL_CONTENT)); }
public void testSetTitle() throws Exception { String title = "Some title"; OperationRequest operation = new OperationRequest(OperationType.WAVELET_SET_TITLE.method(), WAVELET_ID.getId(), Parameter.of( ParamsProperty.WAVELET_TITLE, title), Parameter.of( ParamsProperty.WAVE_ID, LegacyIdSerialiser.INSTANCE.serialiseWaveId(WAVE_ID)), Parameter.of( ParamsProperty.WAVELET_ID, LegacyIdSerialiser.INSTANCE.serialiseWaveletId(WAVELET_ID))); service.execute(operation, helper.getContext(), ALEX); String annotation = getRootBlip().getContent().getAnnotation(0, TitleHelper.TITLE_KEY); assertEquals("Expected conv/title annotation on range (0,1)", title, annotation); }
@Override protected void setUp() throws Exception { service = WaveletSetTitleService.create(); helper = new OperationServiceHelper(WAVELET_NAME, ALEX); ObservableConversationBlip rootBlip = getRootBlip(); LineContainers.appendToLastLine( rootBlip.getContent(), XmlStringBuilder.createText(INITIAL_CONTENT)); }
public void testSetTitle() throws Exception { String title = "Some title"; OperationRequest operation = new OperationRequest(OperationType.WAVELET_SET_TITLE.method(), WAVELET_ID.getId(), Parameter.of( ParamsProperty.WAVELET_TITLE, title), Parameter.of( ParamsProperty.WAVE_ID, LegacyIdSerialiser.INSTANCE.serialiseWaveId(WAVE_ID)), Parameter.of( ParamsProperty.WAVELET_ID, LegacyIdSerialiser.INSTANCE.serialiseWaveletId(WAVELET_ID))); service.execute(operation, helper.getContext(), ALEX); String annotation = getRootBlip().getContent().getAnnotation(0, TitleHelper.TITLE_KEY); assertEquals("Expected conv/title annotation on range (0,1)", title, annotation); }
register(OperationType.DOCUMENT_MODIFY, DocumentModifyService.create()); register(OperationType.ROBOT_SEARCH, injector.getInstance(SearchService.class)); register(OperationType.WAVELET_SET_TITLE, WaveletSetTitleService.create()); register(OperationType.ROBOT_FOLDER_ACTION, FolderActionService.create()); register(OperationType.ROBOT_FETCH_PROFILES, injector.getInstance(FetchProfilesService.class));
register(OperationType.DOCUMENT_MODIFY, DocumentModifyService.create()); register(OperationType.ROBOT_SEARCH, injector.getInstance(SearchService.class)); register(OperationType.WAVELET_SET_TITLE, WaveletSetTitleService.create()); register(OperationType.ROBOT_FOLDER_ACTION, FolderActionService.create()); register(OperationType.ROBOT_FETCH_PROFILES, injector.getInstance(FetchProfilesService.class));
@SuppressWarnings("deprecation") @Inject OperationServiceRegistryImpl(NotifyOperationService notifyOpService) { super(); // Register all the OperationProviders register(OperationType.ROBOT_NOTIFY, notifyOpService); register(OperationType.ROBOT_NOTIFY_CAPABILITIES_HASH, notifyOpService); register(OperationType.WAVELET_ADD_PARTICIPANT_NEWSYNTAX, ParticipantServices.create()); register(OperationType.WAVELET_APPEND_BLIP, BlipOperationServices.create()); register(OperationType.WAVELET_REMOVE_PARTICIPANT_NEWSYNTAX, ParticipantServices.create()); register(OperationType.BLIP_CONTINUE_THREAD, BlipOperationServices.create()); register(OperationType.BLIP_CREATE_CHILD, BlipOperationServices.create()); register(OperationType.BLIP_DELETE, BlipOperationServices.create()); register(OperationType.DOCUMENT_APPEND_INLINE_BLIP, BlipOperationServices.create()); register(OperationType.DOCUMENT_APPEND_MARKUP, BlipOperationServices.create()); register(OperationType.DOCUMENT_INSERT_INLINE_BLIP, BlipOperationServices.create()); register(OperationType.DOCUMENT_INSERT_INLINE_BLIP_AFTER_ELEMENT, BlipOperationServices.create()); register(OperationType.WAVELET_CREATE, CreateWaveletService.create()); register(OperationType.DOCUMENT_MODIFY, DocumentModifyService.create()); register(OperationType.WAVELET_SET_TITLE, WaveletSetTitleService.create()); register(OperationType.ROBOT_FOLDER_ACTION, FolderActionService.create()); } }