/** * {@inheritDoc} */ @Override public AbstractStorageLabel<?> getStorageLabel() { return new StringStorageLabel(textBox.getText().trim(), stringLabelType); }
public void testStorageLabels() throws IOException, SerializationException, BusinessException { RatingLabelType ratingLabelType = new RatingLabelType(); StringStorageLabel label = new StringStorageLabel(); label.setStorageLabelType(ratingLabelType); label.setStringValue("Rating"); label = new StringStorageLabel(); label.setStorageLabelType(ratingLabelType); label.setStringValue("Rating1"); storageManager.addLabelToStorage(storageData, label, true); for (StorageData storageToTest : storageManager.getExistingStorages()) { label = new StringStorageLabel(); label.setStorageLabelType(ratingLabelType); label.setStringValue("Rating2"); storageManager.addLabelToStorage(storageData, label, false); for (StorageData storageToTest : storageManager.getExistingStorages()) { label = new StringStorageLabel(); label.setStorageLabelType(ratingLabelType); label.setStringValue("Rating1"); assertThat(storageManager.removeLabelFromStorage(storageData, label), is(true)); for (StorageData storageToTest : storageManager.getExistingStorages()) {
if (ratingLabelList.isEmpty()) { this.saveLabel(new StringStorageLabel("Very Bad", ratingLabelType)); this.saveLabel(new StringStorageLabel("Bad", ratingLabelType)); this.saveLabel(new StringStorageLabel("Medium", ratingLabelType)); this.saveLabel(new StringStorageLabel("Good", ratingLabelType)); this.saveLabel(new StringStorageLabel("Very Good", ratingLabelType)); if (statusLabelList.isEmpty()) { this.saveLabel(new StringStorageLabel("Awaiting Review", statusLabelType)); this.saveLabel(new StringStorageLabel("In-Progress", statusLabelType)); this.saveLabel(new StringStorageLabel("Closed", statusLabelType));
try { if (null != systemUserName) { StringStorageLabel mountedByLabel = new StringStorageLabel(systemUserName, new ExploredByLabelType()); cmrRepositoryDefinition.getStorageService().addLabelToStorage(storageData, mountedByLabel, true);