conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
auth -> SliceFromConfig.build(settings, auth, config, aliases)
=======
auth -> SliceFromConfig.build(
settings, new LoggingAuth(auth),
config, vertx, aliases
)
>>>>>>>
auth -> SliceFromConfig.build(
settings, new LoggingAuth(auth),
config, aliases
) |
<<<<<<<
final JButton documentationButton = WidgetFactory.createDefaultButton("Documentation",
IconUtils.MENU_DOCUMENTATION);
documentationButton.addActionListener(new ComponentReferenceDocumentationActionListener(_componentBuilder
.getAnalysisJobBuilder().getConfiguration(), _componentBuilder.getDescriptor()));
banner.add(documentationButton);
banner.add(new ChangeRequirementButton(_componentBuilder));
=======
if (ChangeRequirementMenu.isRelevant(_componentBuilder)) {
banner.add(new ChangeRequirementButton(_componentBuilder));
}
>>>>>>>
final JButton documentationButton = WidgetFactory.createDefaultButton("Documentation",
IconUtils.MENU_DOCUMENTATION);
documentationButton.addActionListener(new ComponentReferenceDocumentationActionListener(_componentBuilder
.getAnalysisJobBuilder().getConfiguration(), _componentBuilder.getDescriptor()));
banner.add(documentationButton);
if (ChangeRequirementMenu.isRelevant(_componentBuilder)) {
banner.add(new ChangeRequirementButton(_componentBuilder));
} |
<<<<<<<
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.lang.reflect.Field;
import java.lang.reflect.Type;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import org.apache.commons.io.IOUtils;
import org.datacleaner.api.ComponentCategory;
=======
import java.io.UnsupportedEncodingException;
import java.lang.reflect.Field;
import java.lang.reflect.Type;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
>>>>>>>
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.lang.reflect.Field;
import java.lang.reflect.Type;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import org.apache.commons.io.IOUtils;
import org.datacleaner.api.ComponentCategory;
<<<<<<<
import org.datacleaner.desktop.api.HiddenProperty;
import org.datacleaner.monitor.configuration.ComponentCache;
import org.datacleaner.monitor.configuration.ComponentCacheConfigWrapper;
import org.datacleaner.monitor.configuration.ComponentCacheMapImpl;
import org.datacleaner.monitor.configuration.ComponentHandlerFactory;
import org.datacleaner.monitor.configuration.ComponentStoreHolder;
import org.datacleaner.monitor.configuration.TenantContext;
import org.datacleaner.monitor.configuration.TenantContextFactory;
import org.datacleaner.monitor.server.components.ComponentHandler;
import org.datacleaner.restclient.ComponentController;
import org.datacleaner.restclient.ComponentList;
import org.datacleaner.restclient.ComponentNotFoundException;
import org.datacleaner.restclient.CreateInput;
import org.datacleaner.restclient.OutputColumns;
import org.datacleaner.restclient.ProcessInput;
import org.datacleaner.restclient.ProcessOutput;
import org.datacleaner.restclient.ProcessResult;
import org.datacleaner.restclient.ProcessStatelessInput;
import org.datacleaner.restclient.ProcessStatelessOutput;
import org.datacleaner.util.IconUtils;
=======
import org.datacleaner.desktop.api.HiddenProperty;
import org.datacleaner.monitor.configuration.ComponentCache;
import org.datacleaner.monitor.configuration.ComponentCacheConfigWrapper;
import org.datacleaner.monitor.configuration.ComponentCacheMapImpl;
import org.datacleaner.monitor.configuration.ComponentHandlerFactory;
import org.datacleaner.monitor.configuration.ComponentStoreHolder;
import org.datacleaner.monitor.configuration.TenantContext;
import org.datacleaner.monitor.configuration.TenantContextFactory;
import org.datacleaner.monitor.server.components.ComponentHandler;
import org.datacleaner.restclient.ComponentController;
import org.datacleaner.restclient.ComponentList;
import org.datacleaner.restclient.ComponentNotFoundException;
import org.datacleaner.restclient.CreateInput;
import org.datacleaner.restclient.OutputColumns;
import org.datacleaner.restclient.ProcessInput;
import org.datacleaner.restclient.ProcessOutput;
import org.datacleaner.restclient.ProcessResult;
import org.datacleaner.restclient.ProcessStatelessInput;
import org.datacleaner.restclient.ProcessStatelessOutput;
import org.datacleaner.restclient.ComponentsRestClientUtils;
>>>>>>>
import org.datacleaner.desktop.api.HiddenProperty;
import org.datacleaner.monitor.configuration.ComponentCache;
import org.datacleaner.monitor.configuration.ComponentCacheConfigWrapper;
import org.datacleaner.monitor.configuration.ComponentCacheMapImpl;
import org.datacleaner.monitor.configuration.ComponentHandlerFactory;
import org.datacleaner.monitor.configuration.ComponentStoreHolder;
import org.datacleaner.monitor.configuration.TenantContext;
import org.datacleaner.monitor.configuration.TenantContextFactory;
import org.datacleaner.monitor.server.components.ComponentHandler;
import org.datacleaner.restclient.ComponentController;
import org.datacleaner.restclient.ComponentList;
import org.datacleaner.restclient.ComponentNotFoundException;
import org.datacleaner.restclient.CreateInput;
import org.datacleaner.restclient.OutputColumns;
import org.datacleaner.restclient.ProcessInput;
import org.datacleaner.restclient.ProcessOutput;
import org.datacleaner.restclient.ProcessResult;
import org.datacleaner.restclient.ProcessStatelessInput;
import org.datacleaner.restclient.ProcessStatelessOutput;
import org.datacleaner.util.IconUtils;
import org.datacleaner.restclient.ComponentsRestClientUtils;
<<<<<<<
@ResponseBody
@RequestMapping(method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
public ComponentList getAllComponents(@PathVariable(PARAMETER_NAME_TENANT) final String tenant,
@RequestParam(value = PARAMETER_NAME_ICON_DATA, required = false, defaultValue = "false") boolean iconData) {
=======
@ResponseBody
@RequestMapping(method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
public ComponentList getAllComponents(@PathVariable(PARAMETER_NAME_TENANT) final String tenant) {
>>>>>>>
@ResponseBody
@RequestMapping(method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
public ComponentList getAllComponents(@PathVariable(PARAMETER_NAME_TENANT) final String tenant,
@RequestParam(value = PARAMETER_NAME_ICON_DATA, required = false, defaultValue = "false") boolean iconData) {
<<<<<<<
componentList.add(createComponentInfo(tenant, descriptor, iconData));
=======
componentList.add(createComponentInfo(tenant, descriptor));
>>>>>>>
componentList.add(createComponentInfo(tenant, descriptor, iconData));
<<<<<<<
@PathVariable(PARAMETER_NAME_NAME) String name,
@RequestParam(value = PARAMETER_NAME_ICON_DATA, required = false, defaultValue = "false") boolean iconData) {
name = unURLify(name);
logger.debug("Informing about '" + name + "'");
=======
@PathVariable("name") String name) {
name = ComponentsRestClientUtils.unescapeComponentName(name);
LOGGER.debug("Informing about '{}'", name);
>>>>>>>
@PathVariable(PARAMETER_NAME_NAME) String name,
@RequestParam(value = PARAMETER_NAME_ICON_DATA, required = false, defaultValue = "false") boolean iconData) {
name = ComponentsRestClientUtils.unescapeComponentName(name);
LOGGER.debug("Informing about '{}'", name);
<<<<<<<
String decodedName = unURLify(name);
logger.debug("Running '" + decodedName + "'");
=======
String decodedName = ComponentsRestClientUtils.unescapeComponentName(name);
LOGGER.debug("One-shot processing '{}'", decodedName);
>>>>>>>
String decodedName = ComponentsRestClientUtils.unescapeComponentName(name);
LOGGER.debug("One-shot processing '{}'", decodedName);
<<<<<<<
private JsonNode getJsonNode(Object value) {
return objectMapper.convertValue(value, JsonNode.class);
}
=======
private JsonNode getJsonNode(Object value) {
if(value == null) { return null; }
return objectMapper.valueToTree(value);
}
>>>>>>>
private JsonNode getJsonNode(Object value) {
if(value == null) { return null; }
return objectMapper.valueToTree(value);
} |
<<<<<<<
=======
import com.artipie.docker.proxy.ClientSlice;
import com.artipie.docker.proxy.ProxyDocker;
import com.artipie.files.FileProxySlice;
>>>>>>>
import com.artipie.files.FileProxySlice; |
<<<<<<<
public static ComponentHandler createComponent(TenantContext tenantContext,
String componentName,
ComponentConfiguration configuration,
RemoteComponentsConfiguration remoteComponentsConfiguration)
throws RuntimeException {
ComponentHandler handler = new ComponentHandler(
tenantContext.getConfiguration(),
componentName, remoteComponentsConfiguration);
=======
public static ComponentHandler createComponent(TenantContext tenantContext, String componentName,
ComponentConfiguration configuration) throws RuntimeException {
ComponentHandler handler = new ComponentHandler(tenantContext.getConfiguration(), componentName);
>>>>>>>
public static ComponentHandler createComponent(TenantContext tenantContext, String componentName,
ComponentConfiguration configuration) throws RuntimeException {
ComponentHandler handler = new ComponentHandler(tenantContext.getConfiguration(), componentName);
public static ComponentHandler createComponent(TenantContext tenantContext,
String componentName,
ComponentConfiguration configuration,
RemoteComponentsConfiguration remoteComponentsConfiguration)
throws RuntimeException {
ComponentHandler handler = new ComponentHandler(
tenantContext.getConfiguration(),
componentName, remoteComponentsConfiguration); |
<<<<<<<
/**
* Adds remotes to config.
* @param remotes Remotes yaml sequence
* @return Itself
*/
public RepoConfigYaml withRemotes(final YamlSequenceBuilder remotes) {
this.builder = this.builder.add("remotes", remotes.build());
return this;
}
=======
/**
* Adds remote uri with authentication to config.
* @param uri URI
* @param username Username
* @param password Password
* @return Itself
*/
public RepoConfigYaml withRemoteUri(
final String uri,
final String username,
final String password
) {
this.builder = this.builder.add(
"settings",
Yaml.createYamlMappingBuilder()
.add("remote_uri", uri)
.add("remote_username", username)
.add("remote_password", password)
.build()
);
return this;
}
>>>>>>>
/**
* Adds remotes to config.
* @param remotes Remotes yaml sequence
* @return Itself
*/
public RepoConfigYaml withRemotes(final YamlSequenceBuilder remotes) {
this.builder = this.builder.add("remotes", remotes.build());
return this;
}
/**
* Adds remote uri with authentication to config.
* @param uri URI
* @param username Username
* @param password Password
* @return Itself
*/
public RepoConfigYaml withRemoteUri(
final String uri,
final String username,
final String password
) {
this.builder = this.builder.add(
"settings",
Yaml.createYamlMappingBuilder()
.add("remote_uri", uri)
.add("remote_username", username)
.add("remote_password", password)
.build()
);
return this;
} |
<<<<<<<
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.io.File;
import java.io.FileInputStream;
=======
>>>>>>>
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
<<<<<<<
// don't show the preview if no newlines where found (it may try to
// treat the whole file as a single row)
=======
// don't show the preview if no newlines were found (it may try to treat the whole file as a single row)
>>>>>>>
// don't show the preview if no newlines were found (it may try to treat the whole file as a single row)
<<<<<<<
protected FixedWidthDatastore getPreviewDatastore(String filename) {
return createDatastore("Preview", filename, false, _skipEbcdicHeaderCheckBox.isSelected(), _eolPresentCheckBox
.isSelected());
=======
protected FixedWidthDatastore getPreviewDatastore(Resource resource) {
return createDatastore("Preview", resource, false, _skipEbcdicHeaderCheckBox.isSelected(), _eolPresentCheckBox
.isSelected());
>>>>>>>
protected FixedWidthDatastore getPreviewDatastore(Resource resource) {
return createDatastore("Preview", resource, false, _skipEbcdicHeaderCheckBox.isSelected(), _eolPresentCheckBox.isSelected());
<<<<<<<
return new FixedWidthDatastore(name, filename, _encodingComboBox.getSelectedItem(), getValueWidths(true),
failOnInconsistencies, skipEbcdicHeader, eolPresent, getHeaderLine(), _columnNamesWidget
.getColumnNames());
=======
final int[] valueWidths = getValueWidths(true);
try {
return new FixedWidthDatastore(name, resource, resource.getQualifiedPath(), _encodingComboBox
.getSelectedItem(), valueWidths, failOnInconsistencies, skipEbcdicHeader, eolPresent,
getHeaderLine());
} catch (NumberFormatException e) {
throw new IllegalStateException("Value width must be a valid number.");
}
>>>>>>>
final int[] valueWidths = getValueWidths(true);
try {
return new FixedWidthDatastore(name, resource, resource.getQualifiedPath(), _encodingComboBox
.getSelectedItem(), valueWidths, failOnInconsistencies, skipEbcdicHeader, eolPresent,
getHeaderLine(), _columnNamesWidget.getColumnNames());
} catch (NumberFormatException e) {
throw new IllegalStateException("Value width must be a valid number.");
}
<<<<<<<
final int[] valueWidths = new int[_valueWidthTextFields.size()];
try {
for (int i = 0; i < valueWidths.length; i++) {
String text = _valueWidthTextFields.get(i).getText();
=======
final int[] valueWidths = new int[_valueWidthTextFields.size()];
>>>>>>>
final int[] valueWidths = new int[_valueWidthTextFields.size()];
<<<<<<<
private void registerColumnNameFields() {
_columnNamesWidget.getColumnNameFields().stream().filter(field -> !_columnNameFields.contains(field)).forEach(
field -> {
field.addKeyListener(new KeyAdapter() {
@Override
public void keyTyped(KeyEvent e) {
onSettingsUpdated(false);
}
});
_columnNameFields.add(field);
});
}
=======
@Override
protected void initializeFileFilters(ResourceSelector resourceSelector) {
final FileFilter combinedFilter = FileFilters.combined("Any text, data or EBCDIC files (.txt, .dat, .ebc)",
FileFilters.TXT, FileFilters.DAT, FileFilters.EBC);
resourceSelector.addChoosableFileFilter(combinedFilter);
resourceSelector.addChoosableFileFilter(FileFilters.TXT);
resourceSelector.addChoosableFileFilter(FileFilters.DAT);
resourceSelector.addChoosableFileFilter(FileFilters.EBC);
resourceSelector.setSelectedFileFilter(combinedFilter);
resourceSelector.addListener(new ResourceTypePresenter.Listener() {
@Override
public void onResourceSelected(ResourceTypePresenter<?> presenter, Resource resource) {
onSettingsUpdated(true);
}
@Override
public void onPathEntered(ResourceTypePresenter<?> presenter, String path) {
}
});
}
>>>>>>>
private void registerColumnNameFields() {
_columnNamesWidget.getColumnNameFields().stream().filter(field -> !_columnNameFields.contains(field)).forEach(
field -> {
field.addKeyListener(new KeyAdapter() {
@Override
public void keyTyped(KeyEvent e) {
onSettingsUpdated(false);
}
});
_columnNameFields.add(field);
});
}
@Override
protected void initializeFileFilters(ResourceSelector resourceSelector) {
final FileFilter combinedFilter = FileFilters.combined("Any text, data or EBCDIC files (.txt, .dat, .ebc)",
FileFilters.TXT, FileFilters.DAT, FileFilters.EBC);
resourceSelector.addChoosableFileFilter(combinedFilter);
resourceSelector.addChoosableFileFilter(FileFilters.TXT);
resourceSelector.addChoosableFileFilter(FileFilters.DAT);
resourceSelector.addChoosableFileFilter(FileFilters.EBC);
resourceSelector.setSelectedFileFilter(combinedFilter);
resourceSelector.addListener(new ResourceTypePresenter.Listener() {
@Override
public void onResourceSelected(ResourceTypePresenter<?> presenter, Resource resource) {
onSettingsUpdated(true);
}
@Override
public void onPathEntered(ResourceTypePresenter<?> presenter, String path) {
}
});
} |
<<<<<<<
import org.n52.iceland.exception.CodedException;
import org.n52.iceland.exception.ows.OwsExceptionReport;
import org.n52.iceland.ogc.ows.OWSConstants.ExtendedIndeterminateTime;
import org.n52.iceland.util.CollectionHelper;
=======
import org.n52.sos.ds.hibernate.dao.observation.AbstractValueDAO;
>>>>>>>
import org.n52.sos.ds.hibernate.dao.observation.AbstractValueDAO;
import org.n52.iceland.exception.CodedException;
import org.n52.iceland.exception.ows.OwsExceptionReport;
import org.n52.iceland.ogc.ows.OWSConstants.ExtendedIndeterminateTime;
import org.n52.iceland.util.CollectionHelper;
<<<<<<<
return (ObservationValueTime) getValueCriteriaFor(request, procedure, observableProperty, featureOfInterest,
temporalFilterCriterion, ExtendedIndeterminateTime.first, session).uniqueResult();
=======
return (TemporalReferencedLegacyObservation) getValueCriteriaFor(request, procedure, observableProperty, featureOfInterest,
temporalFilterCriterion, SosIndeterminateTime.first, session).uniqueResult();
>>>>>>>
return (TemporalReferencedLegacyObservation) getValueCriteriaFor(request, procedure, observableProperty, featureOfInterest,
temporalFilterCriterion, ExtendedIndeterminateTime.first, session).uniqueResult();
<<<<<<<
return (ObservationValueTime) getValueCriteriaFor(request, procedure, observableProperty, featureOfInterest,
temporalFilterCriterion, ExtendedIndeterminateTime.latest, session).uniqueResult();
=======
return (TemporalReferencedLegacyObservation) getValueCriteriaFor(request, procedure, observableProperty, featureOfInterest,
temporalFilterCriterion, SosIndeterminateTime.latest, session).uniqueResult();
>>>>>>>
return (TemporalReferencedLegacyObservation) getValueCriteriaFor(request, procedure, observableProperty, featureOfInterest,
temporalFilterCriterion, ExtendedIndeterminateTime.latest, session).uniqueResult();
<<<<<<<
return (ObservationValueTime) getValueCriteriaFor(request, procedure, observableProperty, featureOfInterest, null,
ExtendedIndeterminateTime.first, session).uniqueResult();
=======
return (TemporalReferencedLegacyObservation) getValueCriteriaFor(request, procedure, observableProperty, featureOfInterest, null,
SosIndeterminateTime.first, session).uniqueResult();
>>>>>>>
return (TemporalReferencedLegacyObservation) getValueCriteriaFor(request, procedure, observableProperty, featureOfInterest, null,
ExtendedIndeterminateTime.first, session).uniqueResult();
<<<<<<<
return (ObservationValueTime) getValueCriteriaFor(request, procedure, observableProperty, featureOfInterest, null,
ExtendedIndeterminateTime.latest, session).uniqueResult();
=======
return (TemporalReferencedLegacyObservation) getValueCriteriaFor(request, procedure, observableProperty, featureOfInterest, null,
SosIndeterminateTime.latest, session).uniqueResult();
>>>>>>>
return (TemporalReferencedLegacyObservation) getValueCriteriaFor(request, procedure, observableProperty, featureOfInterest, null,
ExtendedIndeterminateTime.latest, session).uniqueResult(); |
<<<<<<<
import java.net.URI;
=======
import java.io.OutputStream;
>>>>>>>
<<<<<<<
import org.apache.hadoop.conf.Configuration;
=======
import org.apache.commons.lang.SerializationUtils;
import org.apache.log4j.Logger;
import org.apache.metamodel.util.FileHelper;
>>>>>>>
<<<<<<<
import org.datacleaner.result.AnalysisResult;
import org.datacleaner.result.save.AnalysisResultSaveHandler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
=======
import org.datacleaner.result.SimpleAnalysisResult;
import org.datacleaner.spark.utils.ResultFilePathUtils;
>>>>>>>
import org.datacleaner.result.AnalysisResult;
import org.datacleaner.result.save.AnalysisResultSaveHandler;
import org.datacleaner.spark.utils.ResultFilePathUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
<<<<<<<
private static final Logger logger = LoggerFactory.getLogger(Main.class);
=======
private static final Logger logger = Logger.getLogger(Main.class);
>>>>>>>
private static final Logger logger = LoggerFactory.getLogger(Main.class);
<<<<<<<
final String resultJobFilePath = getResultJobFilePath(sparkContext, sparkJobContext);
logger.info("Writing result to {}", resultJobFilePath);
=======
final Map<ComponentJob, AnalyzerResult> resultMap = result.getResultMap();
final SimpleAnalysisResult simpleAnalysisResult = new SimpleAnalysisResult(resultMap,
result.getCreationDate());
>>>>>>>
<<<<<<<
=======
} finally {
logger.info("The result of the job was written to " + resultJobFilePath);
FileHelper.safeClose(out);
>>>>>>> |
<<<<<<<
import org.datacleaner.api.ComponentCategory;
import org.datacleaner.api.ComponentSuperCategory;
import org.datacleaner.bootstrap.WindowContext;
=======
import org.datacleaner.bootstrap.WindowContext;
>>>>>>>
import org.datacleaner.api.ComponentCategory;
import org.datacleaner.api.ComponentSuperCategory;
import org.datacleaner.bootstrap.WindowContext;
<<<<<<<
import org.datacleaner.descriptors.ComponentDescriptor;
import org.datacleaner.descriptors.DescriptorProvider;
=======
>>>>>>>
import org.datacleaner.descriptors.ComponentDescriptor;
import org.datacleaner.descriptors.DescriptorProvider;
<<<<<<<
private DefaultMutableTreeNode createToolbox() {
DefaultMutableTreeNode toolboxRoot = new DefaultMutableTreeNode("Toolbox");
final DescriptorProvider descriptorProvider = _analysisJobBuilder.getConfiguration().getDescriptorProvider();
final Set<ComponentSuperCategory> superCategories = descriptorProvider.getComponentSuperCategories();
for (ComponentSuperCategory superCategory : superCategories) {
final DefaultMutableTreeNode schemaNode = new DefaultMutableTreeNode(superCategory);
toolboxRoot.add(schemaNode);
final Collection<? extends ComponentDescriptor<?>> componentDescriptors = _analysisJobBuilder
.getConfiguration().getDescriptorProvider().getComponentDescriptorsOfSuperCategory(superCategory);
final Map<ComponentCategory, DefaultMutableTreeNode> categoryTreeNodes = new HashMap<>();
MenuCallback menuCallback = new MenuCallback() {
@Override
public void addCategory(ComponentCategory category) {
final DefaultMutableTreeNode treeNode = new DefaultMutableTreeNode(category);
categoryTreeNodes.put(category, treeNode);
schemaNode.add(treeNode);
}
@Override
public void addComponentDescriptor(ComponentDescriptor<?> descriptor) {
boolean placedInSubmenu = false;
for (ComponentCategory category : descriptor.getComponentCategories()) {
if (categoryTreeNodes.containsKey(category)) {
placedInSubmenu = true;
final DefaultMutableTreeNode treeNode = new DefaultMutableTreeNode(descriptor);
categoryTreeNodes.get(category).add(treeNode);
}
}
if (!placedInSubmenu) {
schemaNode.add(new DefaultMutableTreeNode(descriptor));
}
}
};
DescriptorMenuBuilder.createMenuStructure(menuCallback, componentDescriptors, true);
}
return toolboxRoot;
}
=======
>>>>>>>
private DefaultMutableTreeNode createToolbox() {
DefaultMutableTreeNode toolboxRoot = new DefaultMutableTreeNode("Toolbox");
final DescriptorProvider descriptorProvider = _analysisJobBuilder.getConfiguration().getDescriptorProvider();
final Set<ComponentSuperCategory> superCategories = descriptorProvider.getComponentSuperCategories();
for (ComponentSuperCategory superCategory : superCategories) {
final DefaultMutableTreeNode schemaNode = new DefaultMutableTreeNode(superCategory);
toolboxRoot.add(schemaNode);
final Collection<? extends ComponentDescriptor<?>> componentDescriptors = _analysisJobBuilder
.getConfiguration().getDescriptorProvider().getComponentDescriptorsOfSuperCategory(superCategory);
final Map<ComponentCategory, DefaultMutableTreeNode> categoryTreeNodes = new HashMap<>();
MenuCallback menuCallback = new MenuCallback() {
@Override
public void addCategory(ComponentCategory category) {
final DefaultMutableTreeNode treeNode = new DefaultMutableTreeNode(category);
categoryTreeNodes.put(category, treeNode);
schemaNode.add(treeNode);
}
@Override
public void addComponentDescriptor(ComponentDescriptor<?> descriptor) {
boolean placedInSubmenu = false;
for (ComponentCategory category : descriptor.getComponentCategories()) {
if (categoryTreeNodes.containsKey(category)) {
placedInSubmenu = true;
final DefaultMutableTreeNode treeNode = new DefaultMutableTreeNode(descriptor);
categoryTreeNodes.get(category).add(treeNode);
}
}
if (!placedInSubmenu) {
schemaNode.add(new DefaultMutableTreeNode(descriptor));
}
}
};
DescriptorMenuBuilder.createMenuStructure(menuCallback, componentDescriptors, true);
}
return toolboxRoot;
} |
<<<<<<<
private List<SourceRecordByDescriptionIdentifier> _pendingSourceDeletes;
private List<String> _pendingGoldenRecordDeletes;
=======
>>>>>>>
private List<SourceRecordByDescriptionIdentifier> _pendingSourceDeletes;
private List<String> _pendingGoldenRecordDeletes;
<<<<<<<
_pendingSourceDeletes = null;
_pendingGoldenRecordDeletes = null;
=======
>>>>>>>
_pendingSourceDeletes = null;
_pendingGoldenRecordDeletes = null;
<<<<<<<
}
/**
* Closes the callback. All remaining updates and deletes are flushed.
*/
@Override
public void close() {
flushUpdates();
flushSourceDeletes();
flushGoldenRecordDeletes();
=======
>>>>>>>
}
/**
* Deletes a golden record by its golden record id. The deletes are buffered
* and executed in batches.
*
* @param grId
* The golden record id to delete.
*/
public void executeDeleteGoldenRecord(String grId) {
if (_pendingGoldenRecordDeletes == null) {
_pendingGoldenRecordDeletes = new ArrayList<String>();
}
_pendingGoldenRecordDeletes.add(grId);
if (_pendingGoldenRecordDeletes.size() >= DELETE_BATCH_SIZE) {
flushGoldenRecordDeletes();
}
}
/**
* Delete a DataHub source record. The deletes are buffered and sent to
* DataHub in batches.
*
* @param source
* The name of the source system
* @param id
* The source record identifier.
* @param recordType
* The record type.
*/
public void executeDeleteSourceRecord(String source, String id, String recordType) {
if (_pendingSourceDeletes == null) {
_pendingSourceDeletes = new ArrayList<SourceRecordByDescriptionIdentifier>();
}
_pendingSourceDeletes.add(new SourceRecordByDescriptionIdentifier());
if (_pendingSourceDeletes.size() >= DELETE_BATCH_SIZE) {
flushSourceDeletes();
}
}
/**
* Closes the callback. All remaining updates and deletes are flushed.
*/
@Override
public void close() {
flushUpdates();
flushSourceDeletes();
flushGoldenRecordDeletes(); |
<<<<<<<
b.setUI(DarkButtonUI.get());
=======
b.setFocusPainted(false);
return b;
}
public static JButton createPrimaryButton(String text, String imagePath) {
return createPrimaryButton(text, getButtonIcon(imagePath));
}
public static JButton createPrimaryButton(String text, Icon icon) {
final JButton b = createBasicButton(text, icon);
WidgetUtils.setPrimaryButtonStyle(b);
return b;
}
public static JButton createDefaultButton(String text) {
return createDefaultButton(text, (Icon) null);
}
public static JButton createDefaultButton(String text, String imagePath) {
return createDefaultButton(text, getButtonIcon(imagePath));
}
public static JButton createDefaultButton(String text, Icon icon) {
final JButton b = createBasicButton(text, icon);
WidgetUtils.setDefaultButtonStyle(b);
return b;
}
public static JButton createDarkButton(String text, String imagePath) {
return createDarkButton(text, getButtonIcon(imagePath));
}
public static JButton createDarkButton(String text, Icon icon) {
final JButton b = createBasicButton(text, icon);
b.setUI(new MetalButtonUI());
b.setBackground(WidgetUtils.BG_COLOR_DARKEST);
b.setForeground(WidgetUtils.BG_COLOR_BRIGHTEST);
>>>>>>>
b.setFocusPainted(false);
return b;
}
public static JButton createPrimaryButton(String text, String imagePath) {
return createPrimaryButton(text, getButtonIcon(imagePath));
}
public static JButton createPrimaryButton(String text, Icon icon) {
final JButton b = createBasicButton(text, icon);
WidgetUtils.setPrimaryButtonStyle(b);
return b;
}
public static JButton createDefaultButton(String text) {
return createDefaultButton(text, (Icon) null);
}
public static JButton createDefaultButton(String text, String imagePath) {
return createDefaultButton(text, getButtonIcon(imagePath));
}
public static JButton createDefaultButton(String text, Icon icon) {
final JButton b = createBasicButton(text, icon);
WidgetUtils.setDefaultButtonStyle(b);
return b;
}
public static JButton createDarkButton(String text, String imagePath) {
return createDarkButton(text, getButtonIcon(imagePath));
}
public static JButton createDarkButton(String text, Icon icon) {
final JButton b = createBasicButton(text, icon);
b.setUI(DarkButtonUI.get()); |
<<<<<<<
import java.util.Collection;
=======
import org.datacleaner.api.AnalyzerResult;
>>>>>>>
import java.util.Collection;
import org.datacleaner.api.AnalyzerResult; |
<<<<<<<
appendElement(ds, "tenantname", datastore.getTenantName());
appendElement(ds, "https", datastore.isHttps());
appendElement(ds, "acceptunverifiedsslpeers", datastore.isAcceptUnverifiedSslPeers());
=======
appendElement(ds, "https", datastore.https());
appendElement(ds, "acceptunverifiedsslpeers", datastore.acceptUnverifiedSslPeers());
>>>>>>>
appendElement(ds, "https", datastore.isHttps());
appendElement(ds, "acceptunverifiedsslpeers", datastore.isAcceptUnverifiedSslPeers()); |
<<<<<<<
import org.datacleaner.guice.DCModule;
=======
import org.datacleaner.database.DatabaseDriverDescriptor;
import org.datacleaner.guice.InjectorBuilder;
>>>>>>>
import org.datacleaner.database.DatabaseDriverDescriptor;
import org.datacleaner.guice.DCModule; |
<<<<<<<
import org.datacleaner.descriptors.ProvidedPropertyDescriptor;
=======
>>>>>>>
import org.datacleaner.descriptors.ProvidedPropertyDescriptor;
<<<<<<<
private final StringConverter _stringConverter;
private final ComponentDescriptor<?> descriptor;
private final Map<String, MutableColumn> columns;
private final Map<String, InputColumn<?>> inputColumns;
private final MutableTable table;
private final Component component;
private final LifeCycleHelper lifeCycleHelper;
=======
private StringConverter _stringConverter;
>>>>>>>
private StringConverter _stringConverter;
private final ComponentDescriptor<?> descriptor;
private final Map<String, MutableColumn> columns;
private final Map<String, InputColumn<?>> inputColumns;
private final MutableTable table;
private final Component component;
private final LifeCycleHelper lifeCycleHelper;
<<<<<<<
_stringConverter = new StringConverter(dcConfiguration);
=======
}
>>>>>>>
}
<<<<<<<
private ComponentDescriptor<?> resolveDescriptor(String componentName) {
ComponentDescriptor<?> descriptor = _dcConfiguration.getEnvironment().getDescriptorProvider()
.getTransformerDescriptorByDisplayName(componentName);
if (descriptor == null) {
descriptor = _dcConfiguration.getEnvironment().getDescriptorProvider()
.getAnalyzerDescriptorByDisplayName(componentName);
}
if (descriptor == null) {
throw ComponentNotFoundException.createTypeNotFound(componentName);
}
return descriptor;
}
private static class ThreadLocalOutputListener implements ThreadLocalOutputRowCollector.Listener {
private final List<Object[]> outputRows = new ArrayList<>();
@Override
public void onValues(Object[] values) {
outputRows.add(values);
}
}
=======
protected StringConverter getStringConverter() {
if(_stringConverter == null) {
_stringConverter = new StringConverter(_dcConfiguration);
}
return _stringConverter;
}
>>>>>>>
protected StringConverter getStringConverter() {
if(_stringConverter == null) {
_stringConverter = new StringConverter(_dcConfiguration);
}
return _stringConverter;
}
private ComponentDescriptor<?> resolveDescriptor(String componentName) {
ComponentDescriptor<?> descriptor = _dcConfiguration.getEnvironment().getDescriptorProvider()
.getTransformerDescriptorByDisplayName(componentName);
if (descriptor == null) {
descriptor = _dcConfiguration.getEnvironment().getDescriptorProvider()
.getAnalyzerDescriptorByDisplayName(componentName);
}
if (descriptor == null) {
throw ComponentNotFoundException.createTypeNotFound(componentName);
}
return descriptor;
}
private static class ThreadLocalOutputListener implements ThreadLocalOutputRowCollector.Listener {
private final List<Object[]> outputRows = new ArrayList<>();
@Override
public void onValues(Object[] values) {
outputRows.add(values);
}
} |
<<<<<<<
import org.datacleaner.util.WindowSizePreferences;
import org.datacleaner.widgets.DCPersistentSizedPanel;
import org.datacleaner.widgets.tabs.CloseableTabbedPane;
=======
>>>>>>>
import org.datacleaner.util.WindowSizePreferences;
import org.datacleaner.widgets.DCPersistentSizedPanel; |
<<<<<<<
@PostConstruct
public void init() {
_componentsCache = new ComponentsCache(_tenantContextFactory);
}
=======
private ComponentsCache _componentsCache = new ComponentsCache();
>>>>>>>
@PostConstruct
public void init() {
_componentsCache = new ComponentsCache(_tenantContextFactory);
}
<<<<<<<
LOGGER.debug("Running '" + name + "'");
TenantContext tenantContext = _tenantContextFactory.getContext(tenant);
ComponentHandler handler = ComponentsFactory.createComponent(tenantContext, name, processStatelessInput.configuration);
=======
String decodedName = unURLify(name);
LOGGER.debug("Running '" + decodedName + "'");
ComponentHandler handler = createComponent(tenant, decodedName, processStatelessInput.configuration);
>>>>>>>
String decodedName = unURLify(name);
LOGGER.debug("Running '" + decodedName + "'");
TenantContext tenantContext = _tenantContextFactory.getContext(tenant);
ComponentHandler handler = ComponentsFactory.createComponent(tenantContext, decodedName, processStatelessInput.configuration);
<<<<<<<
=======
String decodedName = unURLify(name);
ComponentHandler handler = createComponent(tenant, decodedName, createInput.configuration);
String id = UUID.randomUUID().toString();
>>>>>>>
String decodedName = unURLify(name);
<<<<<<<
_componentsCache.putComponent(
tenant,
tenantContext,
new ComponentsStoreHolder(longTimeout, createInput, id, name)
);
=======
store.storeConfiguration(new ComponentsStoreHolder(longTimeout, createInput, id, decodedName));
_componentsCache.putComponent(new ComponentConfigHolder(longTimeout, createInput, id, decodedName, handler));
>>>>>>>
_componentsCache.putComponent(
tenant,
tenantContext,
new ComponentsStoreHolder(longTimeout, createInput, id, decodedName)
);
<<<<<<<
=======
private ComponentHandler createComponent(String tenant, String componentName, ComponentConfiguration configuration) {
ComponentHandler handler = new ComponentHandler(
_tenantContextFactory.getContext(tenant).getConfiguration(),
componentName);
handler.createComponent(configuration);
return handler;
}
private String unURLify(String url) {
return url.replace("%2F", "/");
}
>>>>>>>
private String unURLify(String url) {
return url.replace("%2F", "/");
} |
<<<<<<<
mPrefs = getSharedPreferences(Constants.PREFERENCES, MODE_PRIVATE);
mPostList = (ListView) findViewById(R.id.thread_posts);
mTitle = (TextView) findViewById(R.id.title);
mNext = (ImageButton) findViewById(R.id.next_page);
mReply = (ImageButton) findViewById(R.id.reply);
mPageIndicator = (RelativeLayout) findViewById(R.id.page_indicator);
mPageNumbers = (TextView) findViewById(R.id.page_text);
=======
mPrefs = PreferenceManager.getDefaultSharedPreferences(this);
mDefaultPostFontSize = mPrefs.getInt("default_post_font_size", 15);
mDefaultPostFontColor = mPrefs.getInt("default_post_font_color", getResources().getColor(R.color.default_post_font));
mPostList = (ListView) findViewById(R.id.thread_posts);
mTitle = (TextView) findViewById(R.id.title);
mNext = (ImageButton) findViewById(R.id.next_page);
mReply = (ImageButton) findViewById(R.id.reply);
>>>>>>>
mPrefs = PreferenceManager.getDefaultSharedPreferences(this);
mDefaultPostFontSize = mPrefs.getInt("default_post_font_size", 15);
mDefaultPostFontColor = mPrefs.getInt("default_post_font_color", getResources().getColor(R.color.default_post_font));
mPostList = (ListView) findViewById(R.id.thread_posts);
mTitle = (TextView) findViewById(R.id.title);
mNext = (ImageButton) findViewById(R.id.next_page);
mReply = (ImageButton) findViewById(R.id.reply);
mPageIndicator = (RelativeLayout) findViewById(R.id.page_indicator);
mPageNumbers = (TextView) findViewById(R.id.page_text); |
<<<<<<<
import android.support.v4.app.DialogFragment;
=======
import android.widget.Toast;
import android.support.v4.app.ListFragment;
>>>>>>>
import android.widget.Toast;
import android.support.v4.app.DialogFragment;
<<<<<<<
private SharedPreferences mPrefs;
public static UserCPFragment newInstance(boolean aModal) {
UserCPFragment fragment = new UserCPFragment();
// Supply num input as an argument.
Bundle args = new Bundle();
args.putBoolean(Constants.MODAL, aModal);
fragment.setArguments(args);
fragment.setShowsDialog(false);
fragment.setStyle(DialogFragment.STYLE_NO_TITLE, 0);
return fragment;
}
=======
private SharedPreferences mPrefs;
private ImageButton mRefresh;
>>>>>>>
private SharedPreferences mPrefs;
private ImageButton mRefresh;
public static UserCPFragment newInstance(boolean aModal) {
UserCPFragment fragment = new UserCPFragment();
// Supply num input as an argument.
Bundle args = new Bundle();
args.putBoolean(Constants.MODAL, aModal);
fragment.setArguments(args);
fragment.setShowsDialog(false);
fragment.setStyle(DialogFragment.STYLE_NO_TITLE, 0);
return fragment;
}
<<<<<<<
=======
mTitle = (TextView) result.findViewById(R.id.title);
mHome = (ImageButton) result.findViewById(R.id.home);
mRefresh = (ImageButton) result.findViewById(R.id.refresh);
>>>>>>>
<<<<<<<
=======
mHome.setOnClickListener(onButtonClick);
mRefresh.setOnClickListener(onButtonClick);
>>>>>>>
<<<<<<<
}
=======
}
@Override
public void loadingFailed() {
Log.e(TAG, "Loading failed.");
mRefresh.setVisibility(View.VISIBLE);
mRefresh.setAnimation(null);
mRefresh.setImageResource(android.R.drawable.ic_dialog_alert);
mRefresh.startAnimation(adapt.getBlinkingAnimation());
Toast.makeText(getActivity(), "Loading Failed!", Toast.LENGTH_LONG).show();
}
@Override
public void loadingStarted() {
Log.e(TAG, "Loading started.");
mRefresh.setVisibility(View.VISIBLE);
mRefresh.setImageResource(R.drawable.ic_menu_refresh);
mRefresh.startAnimation(adapt.getRotateAnimation());
}
@Override
public void loadingSucceeded() {
Log.e(TAG, "Loading succeeded.");
mRefresh.setAnimation(null);
mRefresh.setVisibility(View.GONE);
}
>>>>>>>
}
@Override
public void loadingFailed() {
Log.e(TAG, "Loading failed.");
if (!isHoneycomb()) {
mRefresh.setVisibility(View.VISIBLE);
mRefresh.setAnimation(null);
mRefresh.setImageResource(android.R.drawable.ic_dialog_alert);
mRefresh.startAnimation(adapt.getBlinkingAnimation());
}
Toast.makeText(getActivity(), "Loading Failed!", Toast.LENGTH_LONG).show();
}
@Override
public void loadingStarted() {
Log.e(TAG, "Loading started.");
if (!isHoneycomb()) {
mRefresh.setVisibility(View.VISIBLE);
mRefresh.setImageResource(R.drawable.ic_menu_refresh);
mRefresh.startAnimation(adapt.getRotateAnimation());
}
}
@Override
public void loadingSucceeded() {
Log.e(TAG, "Loading succeeded.");
if (!isHoneycomb()) {
mRefresh.setAnimation(null);
mRefresh.setVisibility(View.GONE);
}
} |
<<<<<<<
private int threadid;//thread id for this activity, since we will only use this activity with a single thread
private ThreadDisplayFragment display;//no need to juggle fragments here
private ThreadListAdapter adapt;
private LeftNavBar mLeftNavBar;
=======
>>>>>>>
private LeftNavBar mLeftNavBar;
<<<<<<<
if (isTV()) {
LeftNavBar bar = (LeftNavBarService.instance()).getLeftNavBar(this);
bar.setBackgroundDrawable(getResources().getDrawable(R.drawable.bar_tv));
setupBar();
}
configureAdapter(savedInstanceState);
=======
configureFragment(savedInstanceState);
>>>>>>>
if (isTV()) {
LeftNavBar bar = (LeftNavBarService.instance()).getLeftNavBar(this);
bar.setBackgroundDrawable(getResources().getDrawable(R.drawable.bar_tv));
setupBar();
}
configureFragment(savedInstanceState);
<<<<<<<
private LeftNavBar getLeftNavBar() {
if (mLeftNavBar == null) {
mLeftNavBar = new LeftNavBar(this);
mLeftNavBar.setOnClickHomeListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// This is called when the app icon is selected in the left navigation bar
// Doing nothing.
}
});
}
return mLeftNavBar;
}
private void setupBar() {
LeftNavBar bar = getLeftNavBar();
bar.setTitle(R.string.app_name);
bar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
bar.setTitleBackground(getResources().getDrawable(R.drawable.bar));
bar.setShowHideAnimationEnabled(true);
bar.setDisplayOptions(
LeftNavBar.DISPLAY_AUTO_EXPAND|
ActionBar.DISPLAY_SHOW_HOME|
LeftNavBar.DISPLAY_USE_LOGO_WHEN_EXPANDED
);
setupTabs();
}
private void setupTabs() {
ActionBar bar = getLeftNavBar();
bar.removeAllTabs();
ActionBar.Tab home = bar.newTab().setText(R.string.home).setIcon(R.drawable.ic_action_home)
.setTabListener(new ActionBar.TabListener() {
@Override
public void onTabUnselected(ActionBar.Tab tab, android.app.FragmentTransaction ft) {}
@Override
public void onTabSelected(ActionBar.Tab tab, android.app.FragmentTransaction ft) {
ForumsIndexFragment fragment = ForumsIndexFragment.newInstance();
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
transaction.replace(R.id.content, fragment);
transaction.commit();
}
@Override
public void onTabReselected(ActionBar.Tab tab, android.app.FragmentTransaction ft) {}
});
ActionBar.Tab usercp = bar.newTab().setText(R.string.usercp).setIcon(R.drawable.gear)
.setTabListener(new ActionBar.TabListener() {
@Override
public void onTabUnselected(ActionBar.Tab tab, android.app.FragmentTransaction ft) {}
@Override
public void onTabSelected(ActionBar.Tab tab, android.app.FragmentTransaction ft) {
UserCPFragment fragment =
UserCPFragment.newInstance(false);
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
transaction.replace(R.id.content, fragment);
transaction.commit();
}
@Override
public void onTabReselected(ActionBar.Tab tab, android.app.FragmentTransaction ft) {
}
});
ActionBar.Tab pm = bar.newTab().setText(R.string.private_message).setIcon(R.drawable.ic_action_private_message)
.setTabListener(new ActionBar.TabListener() {
@Override
public void onTabUnselected(ActionBar.Tab tab, android.app.FragmentTransaction ft) {}
@Override
public void onTabSelected(ActionBar.Tab tab, android.app.FragmentTransaction ft) {}
@Override
public void onTabReselected(ActionBar.Tab tab, android.app.FragmentTransaction ft) {}
});
bar.addTab(home, true);
bar.addTab(usercp, false);
bar.addTab(pm, false);
}
=======
public void refreshInfo() {
getFragment().refreshInfo();
}
>>>>>>>
private LeftNavBar getLeftNavBar() {
if (mLeftNavBar == null) {
mLeftNavBar = new LeftNavBar(this);
mLeftNavBar.setOnClickHomeListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// This is called when the app icon is selected in the left navigation bar
// Doing nothing.
}
});
}
return mLeftNavBar;
}
private void setupBar() {
LeftNavBar bar = getLeftNavBar();
bar.setTitle(R.string.app_name);
bar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
bar.setTitleBackground(getResources().getDrawable(R.drawable.bar));
bar.setShowHideAnimationEnabled(true);
bar.setDisplayOptions(
LeftNavBar.DISPLAY_AUTO_EXPAND|
ActionBar.DISPLAY_SHOW_HOME|
LeftNavBar.DISPLAY_USE_LOGO_WHEN_EXPANDED
);
setupTabs();
}
private void setupTabs() {
ActionBar bar = getLeftNavBar();
bar.removeAllTabs();
ActionBar.Tab home = bar.newTab().setText(R.string.home).setIcon(R.drawable.ic_action_home)
.setTabListener(new ActionBar.TabListener() {
@Override
public void onTabUnselected(ActionBar.Tab tab, android.app.FragmentTransaction ft) {}
@Override
public void onTabSelected(ActionBar.Tab tab, android.app.FragmentTransaction ft) {
ForumsIndexFragment fragment = ForumsIndexFragment.newInstance();
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
transaction.replace(R.id.content, fragment);
transaction.commit();
}
@Override
public void onTabReselected(ActionBar.Tab tab, android.app.FragmentTransaction ft) {}
});
ActionBar.Tab usercp = bar.newTab().setText(R.string.usercp).setIcon(R.drawable.gear)
.setTabListener(new ActionBar.TabListener() {
@Override
public void onTabUnselected(ActionBar.Tab tab, android.app.FragmentTransaction ft) {}
@Override
public void onTabSelected(ActionBar.Tab tab, android.app.FragmentTransaction ft) {
UserCPFragment fragment =
UserCPFragment.newInstance(false);
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
transaction.replace(R.id.content, fragment);
transaction.commit();
}
@Override
public void onTabReselected(ActionBar.Tab tab, android.app.FragmentTransaction ft) {
}
});
ActionBar.Tab pm = bar.newTab().setText(R.string.private_message).setIcon(R.drawable.ic_action_private_message)
.setTabListener(new ActionBar.TabListener() {
@Override
public void onTabUnselected(ActionBar.Tab tab, android.app.FragmentTransaction ft) {}
@Override
public void onTabSelected(ActionBar.Tab tab, android.app.FragmentTransaction ft) {}
@Override
public void onTabReselected(ActionBar.Tab tab, android.app.FragmentTransaction ft) {}
});
bar.addTab(home, true);
bar.addTab(usercp, false);
bar.addTab(pm, false);
}
public void refreshInfo() {
getFragment().refreshInfo();
} |
<<<<<<<
try {
result = AwfulForum.getForums(ForumsIndexActivity.this);
} catch (Exception e) {
e.printStackTrace();
Log.i(TAG, e.toString());
=======
if (!isCancelled()) {
try {
result = AwfulForum.getForums();
} catch (Exception e) {
e.printStackTrace();
Log.i(TAG, e.toString());
}
>>>>>>>
if (!isCancelled()) {
try {
result = AwfulForum.getForums(ForumsIndexActivity.this);
} catch (Exception e) {
e.printStackTrace();
Log.i(TAG, e.toString());
} |
<<<<<<<
public void onDestroy() {
super.onDestroy();
mBookmarkList.setAdapter(null);
=======
public void onDetach() {
super.onDetach();
setListAdapter(null);
>>>>>>>
public void onDetach() {
super.onDetach();
mBookmarkList.setAdapter(null);
<<<<<<<
@Override
public void dataUpdate(boolean pageChange) {
if(pageChange && this.isAdded()){
mBookmarkList.setSelection(0);
=======
@Override
public void dataUpdate(boolean pageChange) {
if(pageChange && this.isAdded() && adapt.getCount() >0){
getListView().setSelection(0);
>>>>>>>
@Override
public void dataUpdate(boolean pageChange) {
if(pageChange && this.isAdded() && adapt.getCount() >0){
mBookmarkList.setSelection(0); |
<<<<<<<
private SharedPreferences mPrefs;
public static ForumDisplayFragment newInstance(int aForum) {
ForumDisplayFragment fragment = new ForumDisplayFragment();
// Supply index input as an argument.
Bundle args = new Bundle();
args.putInt(Constants.FORUM, aForum);
fragment.setArguments(args);
return fragment;
}
@Override
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
=======
private SharedPreferences mPrefs;
@Override
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
>>>>>>>
private SharedPreferences mPrefs;
public static ForumDisplayFragment newInstance(int aForum) {
ForumDisplayFragment fragment = new ForumDisplayFragment();
// Supply index input as an argument.
Bundle args = new Bundle();
args.putInt(Constants.FORUM, aForum);
fragment.setArguments(args);
return fragment;
}
@Override
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
<<<<<<<
if (!isHoneycomb()) {
View actionbar = ((ViewStub) result.findViewById(R.id.actionbar)).inflate();
mTitle = (TextView) actionbar.findViewById(R.id.title);
mUserCp = (ImageButton) actionbar.findViewById(R.id.user_cp);
=======
mTitle = (TextView) result.findViewById(R.id.title);
mUserCp = (ImageButton) result.findViewById(R.id.user_cp);
mRefresh = (ImageButton) result.findViewById(R.id.refresh);
>>>>>>>
if (!isHoneycomb()) {
View actionbar = ((ViewStub) result.findViewById(R.id.actionbar)).inflate();
mTitle = (TextView) actionbar.findViewById(R.id.title);
mUserCp = (ImageButton) actionbar.findViewById(R.id.user_cp);
mRefresh = (ImageButton) actionbar.findViewById(R.id.refresh);
<<<<<<<
mUserCp.setOnClickListener(onButtonClick);
}
}
private boolean isHoneycomb() {
return (getActivity() instanceof ForumsTabletActivity);
=======
mUserCp.setOnClickListener(onButtonClick);
mRefresh.setOnClickListener(onButtonClick);
>>>>>>>
mUserCp.setOnClickListener(onButtonClick);
mRefresh.setOnClickListener(onButtonClick);
}
}
private boolean isHoneycomb() {
return (getActivity() instanceof ForumsTabletActivity);
<<<<<<<
}
=======
}
@Override
public void loadingFailed() {
Log.e(TAG, "Loading failed.");
mRefresh.setVisibility(View.VISIBLE);
mRefresh.setAnimation(null);
mRefresh.setImageResource(android.R.drawable.ic_dialog_alert);
mRefresh.startAnimation(adapt.getBlinkingAnimation());
Toast.makeText(getActivity(), "Loading Failed!", Toast.LENGTH_LONG).show();
}
@Override
public void loadingStarted() {
Log.e(TAG, "Loading started.");
mRefresh.setVisibility(View.VISIBLE);
mRefresh.setImageResource(R.drawable.ic_menu_refresh);
mRefresh.startAnimation(adapt.getRotateAnimation());
}
@Override
public void loadingSucceeded() {
Log.e(TAG, "Loading succeeded.");
mRefresh.setAnimation(null);
mRefresh.setVisibility(View.GONE);
}
>>>>>>>
}
@Override
public void loadingFailed() {
Log.e(TAG, "Loading failed.");
if (!isHoneycomb()) {
mRefresh.setVisibility(View.VISIBLE);
mRefresh.setAnimation(null);
mRefresh.setImageResource(android.R.drawable.ic_dialog_alert);
mRefresh.startAnimation(adapt.getBlinkingAnimation());
}
Toast.makeText(getActivity(), "Loading Failed!", Toast.LENGTH_LONG).show();
}
@Override
public void loadingStarted() {
Log.e(TAG, "Loading started.");
if (!isHoneycomb()) {
mRefresh.setVisibility(View.VISIBLE);
mRefresh.setImageResource(R.drawable.ic_menu_refresh);
mRefresh.startAnimation(adapt.getRotateAnimation());
}
}
@Override
public void loadingSucceeded() {
Log.e(TAG, "Loading succeeded.");
if (!isHoneycomb()) {
mRefresh.setAnimation(null);
mRefresh.setVisibility(View.GONE);
}
} |
<<<<<<<
private ImageButton mNext;
private ImageButton mReply;
private ProgressDialog mDialog;
=======
private ImageButton mNext;
private ImageButton mReply;
private ImageButton mRefresh;
private TextView mTitle;
private ProgressDialog mDialog;
>>>>>>>
private ImageButton mNext;
private ImageButton mReply;
private ImageButton mRefresh;
private TextView mTitle;
private ProgressDialog mDialog;
<<<<<<<
if (!isHoneycomb()) {
View actionbar = ((ViewStub) result.findViewById(R.id.actionbar)).inflate();
=======
mTitle = (TextView) result.findViewById(R.id.title);
mNext = (ImageButton) result.findViewById(R.id.next_page);
mReply = (ImageButton) result.findViewById(R.id.reply);
mRefresh = (ImageButton) result.findViewById(R.id.refresh);
>>>>>>>
if (!isHoneycomb()) {
View actionbar = ((ViewStub) result.findViewById(R.id.actionbar)).inflate();
<<<<<<<
if (!isHoneycomb()) {
mNext.setOnClickListener(onButtonClick);
mReply.setOnClickListener(onButtonClick);
}
getListView().setOnScrollListener(this);
}
private boolean isHoneycomb() {
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB;
}
private void setActionbarTitle(String aTitle) {
if (!isHoneycomb()) {
mTitle.setText(Html.fromHtml(aTitle));
} else {
((ThreadDisplayActivity) getActivity()).setThreadTitle(aTitle);
}
=======
mNext.setOnClickListener(onButtonClick);
mReply.setOnClickListener(onButtonClick);
mRefresh.setOnClickListener(onButtonClick);
getListView().setOnScrollListener(this);
>>>>>>>
if (!isHoneycomb()) {
mNext.setOnClickListener(onButtonClick);
mReply.setOnClickListener(onButtonClick);
mRefresh.setOnClickListener(onButtonClick);
}
getListView().setOnScrollListener(this);
}
private boolean isHoneycomb() {
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB;
}
private void setActionbarTitle(String aTitle) {
if (!isHoneycomb()) {
mTitle.setText(Html.fromHtml(aTitle));
} else {
((ThreadDisplayActivity) getActivity()).setThreadTitle(aTitle);
}
<<<<<<<
public void refresh() {
adapt.refresh();
}
=======
private View.OnClickListener onButtonClick = new View.OnClickListener() {
public void onClick(View aView) {
switch (aView.getId()) {
case R.id.next_page:
if (adapt.getPage() < adapt.getLastPage()) {
adapt.goToPage(adapt.getPage()+1);
}
break;
case R.id.reply:
Intent postReply = new Intent().setClass(getActivity(),
PostReplyActivity.class);
postReply.putExtra(Constants.THREAD, adapt.getState().getID()+"");
startActivityForResult(postReply, 0);
break;
case R.id.refresh:
adapt.refresh();
break;
}
}
};
>>>>>>>
public void refresh() {
adapt.refresh();
}
<<<<<<<
@Override
public void dataUpdate(boolean pageChange) {
if(!this.isResumed()){
queueDataUpdate = true;
return;
}else{
queueDataUpdate = false;
handler.post(new RunDataUpdate(pageChange));
}
}
public void delayedDataUpdate(boolean pageChange) {
setActionbarTitle(adapt.getTitle());
int last = adapt.getLastReadPost();
if(savedPage == adapt.getPage() && savedPos >0 && savedPos < adapt.getCount()){
getListView().setSelection(savedPos);
}else{
if(!pageChange && last >= 0 && last < adapt.getCount()){
getListView().setSelection(last);
savedPos = last;
}
if(pageChange && adapt.getCount() > 0){
getListView().setSelection(0);
}
}
if (!isHoneycomb()) {
if (adapt.getPage() == adapt.getLastPage()) {
mNext.setVisibility(View.GONE);
} else {
mNext.setVisibility(View.VISIBLE);
}
}
}
public int getSavedPage() {
return savedPage;
}
@Override
public void onScroll(AbsListView view, int firstVisibleItem,
int visibleItemCount, int totalItemCount) {
if(visibleItemCount>0 && firstVisibleItem >0){
savedPos = firstVisibleItem+1;
}
}
@Override
public void onScrollStateChanged(AbsListView view, int scrollState) {
}
=======
@Override
public void dataUpdate(boolean pageChange) {
if(!this.isResumed()){
queueDataUpdate = true;
return;
}else{
queueDataUpdate = false;
handler.post(new RunDataUpdate(pageChange));
}
}
public void delayedDataUpdate(boolean pageChange) {
mTitle.setText(Html.fromHtml(adapt.getTitle()));
int last = adapt.getLastReadPost();
if(savedPage == adapt.getPage() && savedPos >0 && savedPos < adapt.getCount()){
getListView().setSelection(savedPos);
}else{
if(!pageChange && last >= 0 && last < adapt.getCount()){
getListView().setSelection(last);
savedPos = last;
}
if(pageChange && adapt.getCount() > 0){
getListView().setSelection(0);
}
}
if(adapt.getPage() == adapt.getLastPage()){
mNext.setVisibility(View.GONE);
}else{
mNext.setVisibility(View.VISIBLE);
}
}
public int getSavedPage() {
return savedPage;
}
@Override
public void onScroll(AbsListView view, int firstVisibleItem,
int visibleItemCount, int totalItemCount) {
if(visibleItemCount>0 && firstVisibleItem >0){
savedPos = firstVisibleItem+1;
}
}
@Override
public void onScrollStateChanged(AbsListView view, int scrollState) {
}
@Override
public void loadingFailed() {
Log.e(TAG, "Loading failed.");
mRefresh.setVisibility(View.VISIBLE);
mRefresh.setAnimation(null);
mRefresh.setImageResource(android.R.drawable.ic_dialog_alert);
mRefresh.startAnimation(adapt.getBlinkingAnimation());
Toast.makeText(getActivity(), "Loading Failed!", Toast.LENGTH_LONG).show();
}
@Override
public void loadingStarted() {
Log.e(TAG, "Loading started.");
mRefresh.setVisibility(View.VISIBLE);
mRefresh.setImageResource(R.drawable.ic_menu_refresh);
mRefresh.startAnimation(adapt.getRotateAnimation());
}
@Override
public void loadingSucceeded() {
Log.e(TAG, "Loading succeeded.");
mRefresh.setAnimation(null);
mRefresh.setVisibility(View.GONE);
}
>>>>>>>
@Override
public void dataUpdate(boolean pageChange) {
if(!this.isResumed()){
queueDataUpdate = true;
return;
}else{
queueDataUpdate = false;
handler.post(new RunDataUpdate(pageChange));
}
}
public void delayedDataUpdate(boolean pageChange) {
setActionbarTitle(adapt.getTitle());
int last = adapt.getLastReadPost();
if(savedPage == adapt.getPage() && savedPos >0 && savedPos < adapt.getCount()){
getListView().setSelection(savedPos);
}else{
if(!pageChange && last >= 0 && last < adapt.getCount()){
getListView().setSelection(last);
savedPos = last;
}
if(pageChange && adapt.getCount() > 0){
getListView().setSelection(0);
}
}
if (!isHoneycomb()) {
if (adapt.getPage() == adapt.getLastPage()) {
mNext.setVisibility(View.GONE);
} else {
mNext.setVisibility(View.VISIBLE);
}
}
}
public int getSavedPage() {
return savedPage;
}
@Override
public void onScroll(AbsListView view, int firstVisibleItem,
int visibleItemCount, int totalItemCount) {
if(visibleItemCount>0 && firstVisibleItem >0){
savedPos = firstVisibleItem+1;
}
}
@Override
public void onScrollStateChanged(AbsListView view, int scrollState) {
}
@Override
public void loadingFailed() {
Log.e(TAG, "Loading failed.");
if (!isHoneycomb()) {
mRefresh.setVisibility(View.VISIBLE);
mRefresh.setAnimation(null);
mRefresh.setImageResource(android.R.drawable.ic_dialog_alert);
mRefresh.startAnimation(adapt.getBlinkingAnimation());
}
Toast.makeText(getActivity(), "Loading Failed!", Toast.LENGTH_LONG).show();
}
@Override
public void loadingStarted() {
Log.e(TAG, "Loading started.");
if (!isHoneycomb()) {
mRefresh.setVisibility(View.VISIBLE);
mRefresh.setImageResource(R.drawable.ic_menu_refresh);
mRefresh.startAnimation(adapt.getRotateAnimation());
}
}
@Override
public void loadingSucceeded() {
Log.e(TAG, "Loading succeeded.");
if (!isHoneycomb()) {
mRefresh.setAnimation(null);
mRefresh.setVisibility(View.GONE);
}
} |
<<<<<<<
boolean avatar = aPrefs.avatarsEnabled != false && post.getAvatar() != null;
=======
boolean avatar = aPrefs.canLoadAvatars() && post.getAvatar() != null;
if (post.isPreviouslyRead()) {
background =
ColorPickerPreference.convertToARGB(light ? aPrefs.postReadBackgroundColor : aPrefs.postReadBackgroundColor2);
} else {
background =
ColorPickerPreference.convertToARGB(light ? aPrefs.postBackgroundColor : aPrefs.postBackgroundColor2);
}
if(aPrefs.alternateBackground == true){
light = !light;
}
buffer.append("<tr class='" + (post.isPreviouslyRead() ? "read" : "unread") + " phone " + post.getId() + "' id='" + post.getId() + "' >\n");
buffer.append(" <td class='userinfo-row' style='width: 100%; color: "+ColorPickerPreference.convertToARGB(aPrefs.postHeaderFontColor)+"; border-color:"+ColorPickerPreference.convertToARGB(aPrefs.postDividerColor)+";background-color:"+(post.isOp()?ColorPickerPreference.convertToARGB(aPrefs.postOPColor):ColorPickerPreference.convertToARGB(aPrefs.postHeaderBackgroundColor))+"'>\n");
if((aPrefs.canLoadAvatars() && post.getAvatar() != null && post.getAvatar().length()>0)){
buffer.append(" <div class='avatar' style='background-image:url("+post.getAvatar()+");'>\n");
buffer.append(" </div>\n");
}
buffer.append(" <div class='userinfo'>\n");
buffer.append(" <h4 class='username' >\n");
buffer.append(" "+post.getUsername() + (post.isMod()?"<img src='file:///android_res/drawable/ic_star_blue.png' />":"")+ (post.isAdmin()?"<img src='file:///android_res/drawable/ic_star_red.png' />":"") + "\n");
buffer.append(" </h4>");
buffer.append(" <div class='postdate' >\n");
buffer.append(" " + post.getDate());
buffer.append(" </div>\n");
buffer.append(" </div>\n");
buffer.append(" <div class='action-button' >\n");
buffer.append(" <img src='file:///android_res/drawable/"+aPrefs.icon_theme+"_inline_more.png' />\n");
buffer.append(" </div>\n");
buffer.append(" </td>\n");
buffer.append("</tr>\n");
buffer.append("<tr class='" + (post.isPreviouslyRead() ? "read" : "unread") + " phone' >\n");
buffer.append(" <td class='post-buttons' style='border-color:"+ColorPickerPreference.convertToARGB(aPrefs.postDividerColor)+";background: "+(post.isOp()?ColorPickerPreference.convertToARGB(aPrefs.postOPColor):ColorPickerPreference.convertToARGB(aPrefs.postHeaderBackgroundColor))+";'>\n");
buffer.append(" <div class='avatar-text' style='width:98%;display:none;float: right;overflow: hidden; color: "+ColorPickerPreference.convertToARGB(aPrefs.postHeaderFontColor)+";'>\n");
if(post.getRegDate() != null){
buffer.append(" <div class='postdate'>\n");
buffer.append(" Registered: "+post.getRegDate()+"<br/>\n");
buffer.append(" </div>\n");
}
if(post.getAvatarText()!= null){
buffer.append(post.getAvatarText()+"<br/>\n");
}
if(!aPrefs.isOnProbation()){
if(post.isEditable()){
buffer.append(" <div class='"+(threadLocked?"":"edit_button ")+"inline-button' id='" + post.getId() + "' />\n");
buffer.append(" <img src='file:///android_res/drawable/"+aPrefs.icon_theme+"_inline_edit.png' style='position:relative;vertical-align:middle;' /> "+(threadLocked?"Locked":"Edit"));
buffer.append(" </div>\n");
}
buffer.append(" <div class='"+(threadLocked?"":"quote_button ")+"inline-button' id='" + post.getId() + "' />\n");
buffer.append(" <img src='file:///android_res/drawable/"+aPrefs.icon_theme+"_inline_quote.png' style='position:relative;vertical-align:middle;' /> "+(threadLocked?"Locked":"Quote"));
buffer.append("\n </div>\n");
}
buffer.append(" <div class='lastread_button inline-button' lastreadurl='" + post.getLastReadUrl() + "' />\n");
buffer.append(" <img src='file:///android_res/drawable/"+aPrefs.icon_theme+"_inline_lastread.png' style='position:relative;vertical-align:middle;' />Last Read\n");
buffer.append(" </div>\n");
buffer.append(" <div class='more_button inline-button' id='" + post.getId() + "' username='" + post.getUsername() + "' userid='" + post.getUserId() + "' >\n");
buffer.append(" <img src='file:///android_res/drawable/"+aPrefs.icon_theme+"_inline_more.png' style='position:relative;vertical-align:middle;' /> More\n");
buffer.append(" </div>\n");
buffer.append(" </div>\n");
buffer.append(" </td>\n");
buffer.append("</tr>\n");
buffer.append("<tr class='" + (post.isPreviouslyRead() ? "read" : "unread")+" " + post.getId() + "' >\n");
buffer.append(" <td class='avatar-cell tablet' style='background: " + background +";"+(avatar?"":"display:hidden;")+"'>\n");
if (avatar) {
buffer.append(" <div class='avatar gif' style='background-image:url(" + post.getAvatar() + ");' />\n");
}
buffer.append(" </td>\n");
buffer.append(" <td class='post-cell' style='background: " + background + ";'>\n");
//tablet user column
buffer.append(" <div class='usercolumn tablet' style='background: " + background +";color: " + ColorPickerPreference.convertToARGB(aPrefs.postFontColor) + ";'>\n");
buffer.append(" <div class='userinfo'>\n");
buffer.append(" <div class='menu_button inline-button' id='" + post.getId() + "' username='" + post.getUsername() + "' userid='" + post.getUserId() + "' lastreadurl='" + post.getLastReadUrl() + "' editable='"+(post.isEditable()?"true":"false")+"' >\n");
buffer.append(" <img src='file:///android_res/drawable/post_action_icon.png' />");
buffer.append(" </div>\n");
buffer.append(" <div class='tablet username' " + (post.isOp() ? "style='color: " + ColorPickerPreference.convertToARGB(aPrefs.postOPColor) + ";'" : "") + ">\n");
buffer.append(" <h4>" + post.getUsername() + ((post.isMod())?"<img src='file:///android_res/drawable/ic_star_blue.png' />":"")+ ((post.isAdmin())?"<img src='file:///android_res/drawable/ic_star_red.png' />":"") + "</h4>\n");
buffer.append(" </div>");
buffer.append(" <div class='tablet postdate' " + (post.isOp() ? "style='color: " + ColorPickerPreference.convertToARGB(aPrefs.postOPColor) + ";'" : "") + ">\n");
buffer.append(" " + post.getDate());
buffer.append(" </div>\n");
buffer.append(" </div>\n");
buffer.append(" <div class='avatar-text' style='display:none; overflow: hidden;'>");
if(post.getRegDate()!= null){
buffer.append(" <div class='postdate'>");
buffer.append(" Registered: "+post.getRegDate()+"<br/>");
buffer.append(" </div>");
}
if(post.getAvatarText()!= null){
buffer.append(post.getAvatarText()+"<br/>");
}
buffer.append(" <hr />\n");
buffer.append(" </div>\n");
buffer.append(" </div>\n");
buffer.append(" </div>\n");
>>>>>>>
boolean avatar = aPrefs.canLoadAvatars() && post.getAvatar() != null; |
<<<<<<<
private String mThreadId;
=======
private AwfulThread mThread;
private String mFormCookie;
>>>>>>>
private String mThreadId;
private String mFormCookie;
<<<<<<<
mFetchTask = new FetchFormKeyTask();
mFetchTask.execute(mThreadId);
=======
>>>>>>>
<<<<<<<
mFormKey, mThreadId, getIntent().getStringExtra(Constants.POST_ID));
=======
mFormKey, mFormCookie, mThread.getThreadId(), getIntent().getStringExtra(Constants.POST_ID));
>>>>>>>
mFormKey, mFormCookie, mThread.getThreadId(), getIntent().getStringExtra(Constants.POST_ID));
<<<<<<<
mFormKey, mThreadId);
=======
mFormKey, mFormCookie, mThread.getThreadId());
>>>>>>>
mFormKey, mFormCookie, mThread.getThreadId()); |
<<<<<<<
=======
if(mUserId.equals(mThread.getAuthorID())){
RelativeLayout posthead = (RelativeLayout) tmp.findViewById(R.id.posthead);
posthead.setBackgroundColor(mPrefs.postOPColor);
}
>>>>>>>
if(mUserId.equals(mThread.getAuthorID())){
RelativeLayout posthead = (RelativeLayout) tmp.findViewById(R.id.posthead);
posthead.setBackgroundColor(mPrefs.postOPColor);
}
<<<<<<<
if (isEven()) {
postRow.setBackgroundColor(mPrefs.postReadBackgroundColor);
=======
if (!mPrefs.alternateBackground || isEven()) {
postBody.setBackgroundColor(mPrefs.postReadBackgroundColor);
>>>>>>>
if (!mPrefs.alternateBackground || isEven()) {
postRow.setBackgroundColor(mPrefs.postReadBackgroundColor);
<<<<<<<
if (isEven()) {
postRow.setBackgroundColor(mPrefs.postBackgroundColor);
=======
if (!mPrefs.alternateBackground || isEven()) {
postBody.setBackgroundColor(mPrefs.postBackgroundColor);
>>>>>>>
if (!mPrefs.alternateBackground || isEven()) {
postRow.setBackgroundColor(mPrefs.postBackgroundColor); |
<<<<<<<
// file doesn't exist or not a .hprof file
externalFileHintLabel.setText(INVALID_FILE_MSG);
=======
// file doesn't exist
externalFileHintLabel.setText(Bundle.CompareSnapshotsHelper_InvalidFileMsg());
>>>>>>>
// file doesn't exist or not a .hprof file
externalFileHintLabel.setText(Bundle.CompareSnapshotsHelper_InvalidFileMsg()); |
<<<<<<<
import com.monke.monkeybook.utils.NetworkUtil;
import com.monke.monkeybook.utils.RxUtils;
=======
import com.monke.monkeybook.model.analyzeRule.assit.Global;
import com.monke.monkeybook.utils.NetworkUtil;
>>>>>>>
import com.monke.monkeybook.utils.NetworkUtil;
<<<<<<<
if (StringUtils.isTrimEmpty(url)) return null;
url = url.trim();
if (NetworkUtil.isIPv4Address(url)) {
url = String.format("http://%s:65501", url);
}
if (StringUtils.isJsonType(url)) {
return importBookSourceO(url.trim())
.compose(RxUtils::toSimpleSingle);
}
if (NetworkUtil.isUrl(url)) {
AnalyzeUrl analyzeUrl = new AnalyzeUrl(StringUtils.getBaseUrl(url), url);
return SimpleModel.getResponse(analyzeUrl)
.flatMap(rsp -> importBookSourceO(rsp.body()))
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread());
}
=======
url = url.trim();
if (NetworkUtil.isIPv4Address(url)) {
url = String.format("http://%s:65501", url);
}
if (StringUtils.isJsonType(url)) {
return importBookSourceO(url.trim())
.subscribeOn(Schedulers.single())
.observeOn(AndroidSchedulers.mainThread());
}
if (URLUtils.isUrl(url)) {
AnalyzeUrl analyzeUrl = new AnalyzeUrl(StringUtils.getBaseUrl(url), url);
return SimpleModel.getResponse(analyzeUrl)
.flatMap(rsp -> importBookSourceO(rsp.body()))
.subscribeOn(Schedulers.single())
.observeOn(AndroidSchedulers.mainThread());
}
throw new IllegalArgumentException("url is invalid");
>>>>>>>
url = url.trim();
if (NetworkUtil.isIPv4Address(url)) {
url = String.format("http://%s:65501", url);
}
if (NetworkUtil.isUrl(url)) {
AnalyzeUrl analyzeUrl = new AnalyzeUrl(StringUtils.getBaseUrl(url), url);
return SimpleModel.getResponse(analyzeUrl)
.flatMap(rsp -> importBookSourceO(rsp.body()))
.subscribeOn(Schedulers.single())
.observeOn(AndroidSchedulers.mainThread());
}
if (URLUtils.isUrl(url)) {
AnalyzeUrl analyzeUrl = new AnalyzeUrl(StringUtils.getBaseUrl(url), url);
return SimpleModel.getResponse(analyzeUrl)
.flatMap(rsp -> importBookSourceO(rsp.body()))
.subscribeOn(Schedulers.single())
.observeOn(AndroidSchedulers.mainThread());
}
throw new IllegalArgumentException("url is invalid"); |
<<<<<<<
import com.aptana.index.core.IFileStoreIndexingParticipant;
=======
import com.aptana.editor.js.parsing.ast.JSParseRootNode;
import com.aptana.editor.js.sdoc.model.DocumentationBlock;
import com.aptana.index.core.IFileIndexingParticipant;
>>>>>>>
import com.aptana.editor.js.parsing.ast.JSParseRootNode;
import com.aptana.editor.js.sdoc.model.DocumentationBlock;
import com.aptana.index.core.IFileStoreIndexingParticipant;
<<<<<<<
private void processParseResults(Index index, IFileStore file, JSParseState parseState)
=======
private void processParseResults(Index index, IFile file, IParseNode ast)
>>>>>>>
private void processParseResults(Index index, IFileStore file, IParseNode ast)
<<<<<<<
String location = file.toURI().getPath();
Scope<JSNode> globals = parseState.getGlobalScope();
=======
String location = file.getProjectRelativePath().toPortableString();
Scope<JSNode> globals = ((JSParseRootNode) ast).getGlobalScope();
>>>>>>>
String location = file.toURI().getPath();
Scope<JSNode> globals = ((JSParseRootNode) ast).getGlobalScope(); |
<<<<<<<
public String SINGLE_QUOTED_STRING_SCOPE = "string.quoted.single.ruby"; //$NON-NLS-1$
public String DOUBLE_QUOTED_STRING_SCOPE = "string.quoted.double.ruby"; //$NON-NLS-1$
public String LINE_COMMENT_SCOPE = "comment.line.number-sign.ruby"; //$NON-NLS-1$
public String BLOCK_COMMENT_SCOPE = "comment.block.documentation.ruby"; //$NON-NLS-1$
=======
/**
* ID of the marker/annotation type used to highlight do/end, def/end, class/end, module/end pairs
*/
public String BLOCK_PAIR_OCCURRENCES_ID = "com.aptana.ruby.blockPair.occurrences"; //$NON-NLS-1$
>>>>>>>
public String SINGLE_QUOTED_STRING_SCOPE = "string.quoted.single.ruby"; //$NON-NLS-1$
public String DOUBLE_QUOTED_STRING_SCOPE = "string.quoted.double.ruby"; //$NON-NLS-1$
public String LINE_COMMENT_SCOPE = "comment.line.number-sign.ruby"; //$NON-NLS-1$
public String BLOCK_COMMENT_SCOPE = "comment.block.documentation.ruby"; //$NON-NLS-1$
/**
* ID of the marker/annotation type used to highlight do/end, def/end, class/end, module/end pairs
*/
public String BLOCK_PAIR_OCCURRENCES_ID = "com.aptana.ruby.blockPair.occurrences"; //$NON-NLS-1$ |
<<<<<<<
import com.aptana.core.IScopeReference;
=======
import com.aptana.core.util.CollectionsUtil;
>>>>>>>
import com.aptana.core.IScopeReference;
import com.aptana.core.util.CollectionsUtil; |
<<<<<<<
List<String> args = CollectionsUtil.newList(CONFIG, GET, PREFIX); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
// TODO: should cache this value as config prefix path ?
IStatus npmStatus = runNpmConfig(args, password, global, workingDirectory, monitor);
if (npmStatus.isOK())
=======
args.add(npmPath.toOSString());
}
CollectionsUtil.addToList(args, INSTALL, packageName, COLOR, FALSE);
Map<String, String> environment;
if (PlatformUtil.isWindows())
{
environment = new HashMap<String, String>(System.getenv());
}
else
{
environment = ShellExecutable.getEnvironment();
}
args.addAll(proxySettings(environment));
environment.put(ProcessUtil.REDIRECT_ERROR_STREAM, StringUtil.EMPTY);
// HACK for TISTUD-4101
if (PlatformUtil.isWindows())
{
IPath pythonExe = ExecutableUtil.find("pythonw.exe", false, null); //$NON-NLS-1$
if (pythonExe == null)
>>>>>>>
List<String> args = CollectionsUtil.newList(CONFIG, GET, PREFIX);
// TODO: should cache this value as config prefix path ?
IStatus npmStatus = runNpmConfig(args, password, global, workingDirectory, monitor);
if (npmStatus.isOK()) |
<<<<<<<
=======
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionAdapter;
>>>>>>>
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionAdapter;
<<<<<<<
searchText.addKeyListener(this);
=======
searchText.addKeyListener(new KeyListener()
{
@Override
public void keyReleased(KeyEvent e)
{
}
@Override
public void keyPressed(KeyEvent e)
{
if (!e.doit)
{
return;
}
if (searchOnEnter && e.keyCode == SWT.CR)
{
searchText();
e.doit = false;
}
}
});
searchText.addModifyListener(new ModifyListener() {
@Override
public void modifyText(ModifyEvent e) {
if (!searchOnEnter) {
searchText();
}
}
});
>>>>>>>
searchText.addKeyListener(new KeyListener()
{
@Override
public void keyReleased(KeyEvent e)
{
}
@Override
public void keyPressed(KeyEvent e)
{
if (!e.doit)
{
return;
}
if (searchOnEnter && e.keyCode == SWT.CR)
{
searchText();
e.doit = false;
}
}
});
searchText.addModifyListener(new ModifyListener() {
@Override
public void modifyText(ModifyEvent e) {
if (!searchOnEnter) {
searchText();
}
}
});
<<<<<<<
caseSensitiveMenuItem.setSelection(caseSensitiveSearch);
caseSensitiveMenuItem.addSelectionListener(this);
=======
caseSensitiveMenuItem.setSelection(lastCaseSensitiveState);
caseSensitiveMenuItem.addSelectionListener(new SelectionAdapter()
{
@Override
public void widgetSelected(SelectionEvent e)
{
searchText.setFocus();
if (!searchOnEnter) {
searchText();
}
}
});
>>>>>>>
caseSensitiveMenuItem.setSelection(lastCaseSensitiveState);
caseSensitiveMenuItem.addSelectionListener(new SelectionAdapter()
{
@Override
public void widgetSelected(SelectionEvent e)
{
searchText.setFocus();
if (!searchOnEnter) {
searchText();
}
}
});
<<<<<<<
regularExressionMenuItem.setSelection(regularExpressionSearch);
regularExressionMenuItem.addSelectionListener(this);
=======
regularExressionMenuItem.setSelection(lastRegularExpressionState);
regularExressionMenuItem.addSelectionListener(new SelectionAdapter()
{
@Override
public void widgetSelected(SelectionEvent e)
{
searchText.setFocus();
if (!searchOnEnter) {
searchText();
}
}
});
>>>>>>>
regularExressionMenuItem.setSelection(lastRegularExpressionState);
regularExressionMenuItem.addSelectionListener(new SelectionAdapter()
{
@Override
public void widgetSelected(SelectionEvent e)
{
searchText.setFocus();
if (!searchOnEnter) {
searchText();
}
}
}); |
<<<<<<<
import org.eclipse.jface.text.ITextViewerExtension;
=======
import org.eclipse.jface.text.ITextSelection;
>>>>>>>
import org.eclipse.jface.text.ITextSelection;
import org.eclipse.jface.text.ITextViewerExtension;
<<<<<<<
import org.eclipse.jface.text.source.SourceViewerConfiguration;
=======
import org.eclipse.jface.text.source.IVerticalRuler;
import org.eclipse.jface.text.source.LineNumberRulerColumn;
import org.eclipse.jface.text.source.SourceViewer;
>>>>>>>
import org.eclipse.jface.text.source.IVerticalRuler;
import org.eclipse.jface.text.source.LineNumberRulerColumn;
import org.eclipse.jface.text.source.SourceViewer;
import org.eclipse.jface.text.source.SourceViewerConfiguration;
<<<<<<<
import com.aptana.editor.common.actions.ExecuteLineInsertingResultAction;
import com.aptana.editor.common.actions.FilterThroughCommandAction;
=======
>>>>>>>
import com.aptana.editor.common.actions.ExecuteLineInsertingResultAction;
import com.aptana.editor.common.actions.FilterThroughCommandAction;
<<<<<<<
import com.aptana.editor.common.scripting.snippets.ExpandSnippetVerifyKeyListener;
=======
import com.aptana.editor.common.preferences.IPreferenceConstants;
>>>>>>>
import com.aptana.editor.common.preferences.IPreferenceConstants;
import com.aptana.editor.common.scripting.snippets.ExpandSnippetVerifyKeyListener; |
<<<<<<<
package com.aptana.terminal.server;
import java.io.File;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import com.aptana.terminal.Activator;
import com.aptana.util.ResourceUtils;
/**
* BuiltinCygwinConfiguration
*/
public class WindowsCygwinConfiguration implements ProcessConfiguration
{
private static final String CYGWIN_ROOT = "/cygwin/";
private static final String REDTTY_EXE = "/redttyw.exe";
/**
* BuiltinCygwinConfiguration
*/
public WindowsCygwinConfiguration()
{
}
/*
* @see com.aptana.terminal.server.ProcessConfiguration#afterStart(com.aptana.terminal.server.ProcessWrapper)
*/
@Override
public void afterStart(ProcessWrapper wrapper)
{
}
/*
* @see com.aptana.terminal.server.ProcessConfiguration#beforeStart(com.aptana.terminal.server.ProcessWrapper, java.lang.ProcessBuilder)
*/
@Override
public void beforeStart(ProcessWrapper wrapper, ProcessBuilder builder)
{
}
/*
* @see com.aptana.terminal.server.ProcessConfiguration#getCommandLineArguments()
*/
@Override
public List<String> getCommandLineArguments()
{
List<String> list = new ArrayList<String>();
list.add("\"\\\"C:\\Program Files\\Git\\bin\\sh.exe\\\" --login -i\"");
return list;
}
/*
* @see com.aptana.terminal.server.ProcessConfiguration#getPlatform()
*/
@Override
public String getPlatform()
{
return Platform.OS_WIN32;
}
/*
* @see com.aptana.terminal.server.ProcessConfiguration#getProcessName()
*/
@Override
public String getProcessName()
{
URL url = FileLocator.find(Activator.getDefault().getBundle(), new Path(REDTTY_EXE), null); //$NON-NLS-1$
return ResourceUtils.resourcePathToString(url);
}
/**
* @see com.aptana.terminal.server.ProcessConfiguration#isValid()
*/
@Override
public boolean isValid()
{
return true;
}
/*
* @see com.aptana.terminal.server.ProcessConfiguration#setupEnvironment(java.util.Map)
*/
@Override
public void setupEnvironment(Map<String, String> env)
{
if (1 == 1) return;
URL url = FileLocator.find(Activator.getDefault().getBundle(), new Path(CYGWIN_ROOT), null); //$NON-NLS-1$
String root = ResourceUtils.resourcePathToString(url);
if (root != null)
{
String usrLocalBin = root + "\\usr\\local\\bin";
String usrBin = root + "\\usr\\bin";
String bin = root + "\\bin";
String path = usrLocalBin + File.pathSeparator + usrBin + File.pathSeparator + bin;
if (env.containsKey("Path"))
{
path += File.pathSeparator + env.get("Path");
}
env.put("Path", path);
}
env.put("TERM", "xterm-color"); //$NON-NLS-1$ //$NON-NLS-2$
}
}
=======
package com.aptana.terminal.server;
import java.io.File;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import java.util.regex.Pattern;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import com.aptana.terminal.Activator;
import com.aptana.util.ResourceUtils;
/**
* BuiltinCygwinConfiguration
*/
public class WindowsCygwinConfiguration implements ProcessConfiguration
{
private static final String CYGWIN_ROOT = "/cygwin/";
private static final String REDTTY_EXE = "/cygwin/bin/redtty.exe";
/**
* BuiltinCygwinConfiguration
*/
public WindowsCygwinConfiguration()
{
}
/*
* @see com.aptana.terminal.server.ProcessConfiguration#afterStart(com.aptana.terminal.server.ProcessWrapper)
*/
@Override
public void afterStart(ProcessWrapper wrapper)
{
// Turn on filtering
String marker = UUID.randomUUID().toString();
Pattern filter = Pattern.compile("^" + marker + "[\\r\\n]+", Pattern.MULTILINE);
wrapper.setStandardOutputFilter(filter);
// Set current directory, if needed
String startingDirectory = wrapper.getStartingDirectory();
if (startingDirectory != null && startingDirectory.length() > 0)
{
File dir = new File(startingDirectory);
if (dir.exists())
{
wrapper.sendText("cd \"`cygpath \"" + dir.getAbsolutePath() + "\"`\"\n");
}
}
wrapper.sendText("echo " + marker + "\n");
}
/*
* @see com.aptana.terminal.server.ProcessConfiguration#beforeStart(com.aptana.terminal.server.ProcessWrapper, java.lang.ProcessBuilder)
*/
@Override
public void beforeStart(ProcessWrapper wrapper, ProcessBuilder builder)
{
}
/*
* @see com.aptana.terminal.server.ProcessConfiguration#getCommandLineArguments()
*/
@Override
public List<String> getCommandLineArguments()
{
return new ArrayList<String>();
}
/*
* @see com.aptana.terminal.server.ProcessConfiguration#getPlatform()
*/
@Override
public String getPlatform()
{
return Platform.OS_WIN32;
}
/*
* @see com.aptana.terminal.server.ProcessConfiguration#getProcessName()
*/
@Override
public String getProcessName()
{
URL url = FileLocator.find(Activator.getDefault().getBundle(), new Path(REDTTY_EXE), null); //$NON-NLS-1$
return ResourceUtils.resourcePathToString(url);
}
/**
* @see com.aptana.terminal.server.ProcessConfiguration#isValid()
*/
@Override
public boolean isValid()
{
return true;
}
/*
* @see com.aptana.terminal.server.ProcessConfiguration#setupEnvironment(java.util.Map)
*/
@Override
public void setupEnvironment(Map<String, String> env)
{
URL url = FileLocator.find(Activator.getDefault().getBundle(), new Path(CYGWIN_ROOT), null); //$NON-NLS-1$
String root = ResourceUtils.resourcePathToString(url);
if (root != null)
{
String usrLocalBin = root + "\\usr\\local\\bin";
String usrBin = root + "\\usr\\bin";
String bin = root + "\\bin";
String path = usrLocalBin + File.pathSeparator + usrBin + File.pathSeparator + bin;
if (env.containsKey("Path"))
{
path += File.pathSeparator + env.get("Path");
}
env.put("Path", path);
}
env.put("TERM", "xterm-color"); //$NON-NLS-1$ //$NON-NLS-2$
}
}
>>>>>>>
package com.aptana.terminal.server;
import java.io.File;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import java.util.regex.Pattern;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import com.aptana.terminal.Activator;
import com.aptana.util.ResourceUtils;
/**
* BuiltinCygwinConfiguration
*/
public class WindowsCygwinConfiguration implements ProcessConfiguration
{
private static final String CYGWIN_ROOT = "/cygwin/";
private static final String REDTTY_EXE = "/redttyw.exe";
/**
* BuiltinCygwinConfiguration
*/
public WindowsCygwinConfiguration()
{
}
/*
* @see com.aptana.terminal.server.ProcessConfiguration#afterStart(com.aptana.terminal.server.ProcessWrapper)
*/
@Override
public void afterStart(ProcessWrapper wrapper)
{
// Turn on filtering
String marker = UUID.randomUUID().toString();
Pattern filter = Pattern.compile("^" + marker + "[\\r\\n]+", Pattern.MULTILINE);
wrapper.setStandardOutputFilter(filter);
// Set current directory, if needed
String startingDirectory = wrapper.getStartingDirectory();
if (startingDirectory != null && startingDirectory.length() > 0)
{
File dir = new File(startingDirectory);
if (dir.exists())
{
wrapper.sendText("cd \"`cygpath \"" + dir.getAbsolutePath() + "\"`\"\n");
}
}
wrapper.sendText("echo " + marker + "\n");
}
/*
* @see com.aptana.terminal.server.ProcessConfiguration#beforeStart(com.aptana.terminal.server.ProcessWrapper, java.lang.ProcessBuilder)
*/
@Override
public void beforeStart(ProcessWrapper wrapper, ProcessBuilder builder)
{
}
/*
* @see com.aptana.terminal.server.ProcessConfiguration#getCommandLineArguments()
*/
@Override
public List<String> getCommandLineArguments()
{
List<String> list = new ArrayList<String>();
list.add("\"\\\"C:\\Program Files\\Git\\bin\\sh.exe\\\" --login -i\"");
return list;
}
/*
* @see com.aptana.terminal.server.ProcessConfiguration#getPlatform()
*/
@Override
public String getPlatform()
{
return Platform.OS_WIN32;
}
/*
* @see com.aptana.terminal.server.ProcessConfiguration#getProcessName()
*/
@Override
public String getProcessName()
{
URL url = FileLocator.find(Activator.getDefault().getBundle(), new Path(REDTTY_EXE), null); //$NON-NLS-1$
return ResourceUtils.resourcePathToString(url);
}
/**
* @see com.aptana.terminal.server.ProcessConfiguration#isValid()
*/
@Override
public boolean isValid()
{
return true;
}
/*
* @see com.aptana.terminal.server.ProcessConfiguration#setupEnvironment(java.util.Map)
*/
@Override
public void setupEnvironment(Map<String, String> env)
{
if (1 == 1) return;
URL url = FileLocator.find(Activator.getDefault().getBundle(), new Path(CYGWIN_ROOT), null); //$NON-NLS-1$
String root = ResourceUtils.resourcePathToString(url);
if (root != null)
{
String usrLocalBin = root + "\\usr\\local\\bin";
String usrBin = root + "\\usr\\bin";
String bin = root + "\\bin";
String path = usrLocalBin + File.pathSeparator + usrBin + File.pathSeparator + bin;
if (env.containsKey("Path"))
{
path += File.pathSeparator + env.get("Path");
}
env.put("Path", path);
}
env.put("TERM", "xterm-color"); //$NON-NLS-1$ //$NON-NLS-2$
}
} |
<<<<<<<
import com.aptana.index.core.IndexActivator;
=======
import com.aptana.usage.EventLogger;
>>>>>>>
import com.aptana.usage.EventLogger;
import com.aptana.index.core.IndexActivator; |
<<<<<<<
/**
* Items related to zip utils
*/
String ZIPUTIL = CorePlugin.PLUGIN_ID + "/debug/ziputil"; //$NON-NLS-1$
=======
/**
* Items related to firefox-specific configuration
*/
String FIREFOX = CorePlugin.PLUGIN_ID + "/debug/firefox"; //$NON-NLS-1$
>>>>>>>
/**
* Items related to zip utils
*/
String ZIPUTIL = CorePlugin.PLUGIN_ID + "/debug/ziputil"; //$NON-NLS-1$
/**
* Items related to firefox-specific configuration
*/
String FIREFOX = CorePlugin.PLUGIN_ID + "/debug/firefox"; //$NON-NLS-1$ |
<<<<<<<
import org.eclipse.core.resources.IResourceDelta;
import org.eclipse.core.resources.IResourceDeltaVisitor;
=======
import org.eclipse.core.resources.IResourceDeltaVisitor;
>>>>>>>
import org.eclipse.core.resources.IResourceDelta;
import org.eclipse.core.resources.IResourceDeltaVisitor;
<<<<<<<
=======
import com.aptana.scripting.ResourceDeltaVisitor;
>>>>>>>
<<<<<<<
public class BundleManager implements IResourceChangeListener, IResourceDeltaVisitor
=======
public class BundleManager implements IResourceChangeListener
>>>>>>>
public class BundleManager implements IResourceChangeListener, IResourceDeltaVisitor
<<<<<<<
=======
private static final IResourceDeltaVisitor deltaVistor = new ResourceDeltaVisitor();
>>>>>>>
<<<<<<<
private List<Bundle> _bundles;
private Map<String, Bundle> _bundlesByPath;
=======
>>>>>>>
<<<<<<<
/*
* (non-Javadoc)
* @see org.eclipse.core.resources.IResourceChangeListener#resourceChanged(org.eclipse.core.resources.IResourceChangeEvent)
*/
public void resourceChanged(IResourceChangeEvent event)
{
try
{
event.getDelta().accept(this);
}
catch (CoreException e)
{
// log an error in the error log
}
}
=======
/*
* (non-Javadoc)
* @see org.eclipse.core.resources.IResourceChangeListener#resourceChanged(org.eclipse.core.resources.IResourceChangeEvent)
*/
public void resourceChanged(IResourceChangeEvent event)
{
try
{
event.getDelta().accept(deltaVistor);
}
catch (CoreException e)
{
// log an error in the error log
}
}
>>>>>>>
/*
* (non-Javadoc)
* @see org.eclipse.core.resources.IResourceChangeListener#resourceChanged(org.eclipse.core.resources.IResourceChangeEvent)
*/
public void resourceChanged(IResourceChangeEvent event)
{
try
{
event.getDelta().accept(this);
}
catch (CoreException e)
{
// log an error in the error log
}
} |
<<<<<<<
ftpcp.setHost(getConfig().getProperty("ftp.host", "10.10.1.60")); //$NON-NLS-1$ //$NON-NLS-2$
ftpcp.setLogin(getConfig().getProperty("ftp.username", "ftpuser")); //$NON-NLS-1$ //$NON-NLS-2$
ftpcp.setPassword(getConfig().getProperty("ftp.password", //$NON-NLS-1$
String.valueOf(new char[] { 'l', 'e', 't', 'm', 'e', 'i', 'n'})).toCharArray());
=======
ftpcp.setHost("10.10.1.60"); //$NON-NLS-1$
ftpcp.setLogin("ftpuser"); //$NON-NLS-1$
ftpcp.setPassword(new char[] { 'l', 'e', 't', 'm', 'e', 'i', 'n'});
ConnectionContext context = new ConnectionContext();
context.put(ConnectionContext.COMMAND_LOG, System.out);
CoreIOPlugin.setConnectionContext(ftpcp, context);
>>>>>>>
ftpcp.setHost(getConfig().getProperty("ftp.host", "10.10.1.60")); //$NON-NLS-1$ //$NON-NLS-2$
ftpcp.setLogin(getConfig().getProperty("ftp.username", "ftpuser")); //$NON-NLS-1$ //$NON-NLS-2$
ftpcp.setPassword(getConfig().getProperty("ftp.password", //$NON-NLS-1$
String.valueOf(new char[] { 'l', 'e', 't', 'm', 'e', 'i', 'n'})).toCharArray());
ConnectionContext context = new ConnectionContext();
context.put(ConnectionContext.COMMAND_LOG, System.out);
CoreIOPlugin.setConnectionContext(ftpcp, context); |
<<<<<<<
import org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener;
import org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent;
import org.eclipse.core.runtime.preferences.InstanceScope;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.jface.text.TextAttribute;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IStartup;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;
=======
>>>>>>>
<<<<<<<
=======
HashMap<MessageConsoleStream, String> themeConsoleStreamToColor = new HashMap<MessageConsoleStream, String>();
themeConsoleStreamToColor.put(outputConsoleStream, ConsoleThemer.CONSOLE_OUTPUT);
themeConsoleStreamToColor.put(errorConsoleStream, ConsoleThemer.CONSOLE_ERROR);
themeConsoleStreamToColor.put(infoConsoleStream, ConsoleThemer.CONSOLE_INFO);
themeConsoleStreamToColor.put(warningConsoleStream, ConsoleThemer.CONSOLE_WARNING);
themeConsoleStreamToColor.put(traceConsoleStream, ConsoleThemer.CONSOLE_TRACE);
// Will be used later on by the ConsoleThemePageParticipant to properly set the colors
// following the theme.
console.setAttribute(ConsoleThemePageParticipant.THEME_CONSOLE_STREAM_TO_COLOR_ATTRIBUTE, themeConsoleStreamToColor);
>>>>>>>
HashMap<MessageConsoleStream, String> themeConsoleStreamToColor = new HashMap<MessageConsoleStream, String>();
themeConsoleStreamToColor.put(outputConsoleStream, ConsoleThemer.CONSOLE_OUTPUT);
themeConsoleStreamToColor.put(errorConsoleStream, ConsoleThemer.CONSOLE_ERROR);
themeConsoleStreamToColor.put(infoConsoleStream, ConsoleThemer.CONSOLE_INFO);
themeConsoleStreamToColor.put(warningConsoleStream, ConsoleThemer.CONSOLE_WARNING);
themeConsoleStreamToColor.put(traceConsoleStream, ConsoleThemer.CONSOLE_TRACE);
// Will be used later on by the ConsoleThemePageParticipant to properly set the colors
// following the theme.
console.setAttribute(ConsoleThemePageParticipant.THEME_CONSOLE_STREAM_TO_COLOR_ATTRIBUTE, themeConsoleStreamToColor);
<<<<<<<
new InstanceScope().getNode(CommonEditorPlugin.PLUGIN_ID)
.addPreferenceChangeListener(this._themeChangeListener);
}
/**
* refresh
*/
public void refresh()
{
// refresh the display
ConsolePlugin.getDefault().getConsoleManager().refresh(console);
}
=======
>>>>>>> |
<<<<<<<
addTranslation(new QualifiedContentType("com.aptana.radrails.contenttype.ruby"), new QualifiedContentType("source.ruby.rails"));
=======
addTranslation(new QualifiedContentType("com.aptana.radrails.contenttype.ruby"), new QualifiedContentType("source.ruby")); //$NON-NLS-1$ //$NON-NLS-2$
>>>>>>>
addTranslation(new QualifiedContentType("com.aptana.radrails.contenttype.ruby"), new QualifiedContentType("source.ruby.rails")); //$NON-NLS-1$ //$NON-NLS-2$ |
<<<<<<<
=======
public static String CommonEditorPreferencePage_LBL_TabPolicy;
>>>>>>>
public static String CommonEditorPreferencePage_LBL_TabPolicy;
<<<<<<<
public static String EditorsPreferencePage_Content_Assist_Auto_Insert;
=======
/**
* EditorsPreferencePage_Formatting
*/
>>>>>>>
public static String EditorsPreferencePage_Content_Assist_Auto_Insert;
<<<<<<<
=======
/**
* EditorsPreferencePage_MarkOccurrences
*/
>>>>>>>
<<<<<<<
=======
/**
* EditorsPreferencePage_GeneralTextEditorPrefLink
*/
>>>>>>> |
<<<<<<<
=======
import org.eclipse.jface.layout.TableColumnLayout;
>>>>>>>
import org.eclipse.jface.layout.TableColumnLayout;
<<<<<<<
GridData gridData = new GridData();
gridData.heightHint = 200;
table.setLayoutData(gridData);
TableLayout layout = new TableLayout();
table.setLayout(layout);
=======
>>>>>>>
gridData = new GridData();
gridData.heightHint = 200;
table.setLayoutData(gridData);
layout = new TableLayout();
table.setLayout(layout); |
<<<<<<<
import com.aptana.editor.js.contentassist.index.IJSIndexConstants;
import com.aptana.editor.js.contentassist.model.FunctionElement;
import com.aptana.editor.js.contentassist.model.ParameterElement;
import com.aptana.editor.js.contentassist.model.PropertyElement;
import com.aptana.editor.js.inferencing.JSNodeTypeInferrer;
import com.aptana.editor.js.inferencing.JSPropertyCollection;
import com.aptana.editor.js.inferencing.JSScope;
import com.aptana.editor.js.inferencing.JSTypeUtil;
import com.aptana.editor.js.parsing.JSFlexLexemeProvider;
import com.aptana.editor.js.parsing.JSFlexScanner;
import com.aptana.editor.js.parsing.JSParseState;
import com.aptana.editor.js.parsing.ast.IJSNodeTypes;
import com.aptana.editor.js.parsing.ast.JSArgumentsNode;
import com.aptana.editor.js.parsing.ast.JSAssignmentNode;
import com.aptana.editor.js.parsing.ast.JSFunctionNode;
import com.aptana.editor.js.parsing.ast.JSGetPropertyNode;
import com.aptana.editor.js.parsing.ast.JSNode;
import com.aptana.editor.js.parsing.ast.JSObjectNode;
import com.aptana.editor.js.parsing.ast.JSParseRootNode;
import com.aptana.editor.js.parsing.lexer.JSTokenType;
=======
import com.aptana.editor.js.internal.JSModelUtil;
import com.aptana.editor.js.text.JSFlexLexemeProvider;
>>>>>>>
import com.aptana.editor.js.internal.JSModelUtil;
import com.aptana.editor.js.text.JSFlexLexemeProvider;
<<<<<<<
private static Set<String> AUTO_ACTIVATION_PARTITION_TYPES;
{
AUTO_ACTIVATION_PARTITION_TYPES = CollectionsUtil.newSet(JSSourceConfiguration.DEFAULT,
IDocument.DEFAULT_CONTENT_TYPE);
}
=======
private static Set<String> AUTO_ACTIVATION_PARTITION_TYPES = CollectionsUtil.newSet(JSSourceConfiguration.DEFAULT,
IDocument.DEFAULT_CONTENT_TYPE);
>>>>>>>
/**
* Filters out functions that are constructors.
*/
private static final IFilter<PropertyElement> isNotConstructorFilter = new IFilter<PropertyElement>()
{
public boolean include(PropertyElement item)
{
if (!(item instanceof FunctionElement))
{
return true;
}
return !((FunctionElement) item).isConstructor();
}
};
private static Set<String> AUTO_ACTIVATION_PARTITION_TYPES = CollectionsUtil.newSet(JSSourceConfiguration.DEFAULT,
IDocument.DEFAULT_CONTENT_TYPE);
<<<<<<<
* addCoreGlobals
*
* @param proposals
* @param offset
*/
private void addCoreGlobals(Set<ICompletionProposal> proposals, int offset)
{
Collection<PropertyElement> globals = indexHelper.getCoreGlobals(getProject(), getFilename());
if (!CollectionsUtil.isEmpty(globals))
{
for (PropertyElement property : CollectionsUtil.filter(globals, isVisibleFilter))
{
addProposal(proposals, property, offset, null, Messages.JSContentAssistProcessor_KeywordLocation);
}
}
}
/**
=======
>>>>>>>
<<<<<<<
Collection<PropertyElement> properties = indexHelper.getTypeProperties(getIndex(), type);
=======
Collection<PropertyElement> properties = getQueryHelper().getTypeProperties(type);
>>>>>>>
Collection<PropertyElement> properties = getQueryHelper().getTypeProperties(type);
<<<<<<<
Collection<PropertyElement> projectGlobals = indexHelper.getGlobals(getIndex(), getProject(), getFilename());
=======
Collection<PropertyElement> projectGlobals = getQueryHelper().getGlobals(getFilename());
>>>>>>>
Collection<PropertyElement> projectGlobals = getQueryHelper().getGlobals(getFilename());
<<<<<<<
Collection<PropertyElement> properties = indexHelper.getTypeMembers(index, allTypes);
=======
Collection<PropertyElement> properties = getQueryHelper().getTypeMembers(allTypes);
>>>>>>>
Collection<PropertyElement> properties = getQueryHelper().getTypeMembers(allTypes);
<<<<<<<
switch (location)
{
case IN_VARIABLE_NAME:
{
typeName = JSTypeUtil.getGlobalType(getProject(), getFilename());
methodName = node.getParent().getFirstChild().getText();
break;
}
=======
// grab the content assist location type for the symbol before the arguments list
int functionOffset = node.getStartingOffset();
LocationType location = getLocationType(viewer.getDocument(), functionOffset);
>>>>>>>
// grab the content assist location type for the symbol before the arguments list
int functionOffset = node.getStartingOffset();
LocationType location = getLocationType(viewer.getDocument(), functionOffset);
<<<<<<<
Collection<PropertyElement> properties = indexHelper.getTypeMembers(getIndex(), typeName, methodName);
=======
JSGetPropertyNode propertyNode = ParseUtil.getGetPropertyNode(node,
((JSNode) node).getContainingStatementNode());
List<String> types = getParentObjectTypes(propertyNode, offset);
>>>>>>>
JSGetPropertyNode propertyNode = ParseUtil.getGetPropertyNode(node,
((JSNode) node).getContainingStatementNode());
List<String> types = getParentObjectTypes(propertyNode, offset); |
<<<<<<<
@Override
public void send(String phoneNumber, String notification) {
Assert.notNull(phoneNumber);
log.info(String.format("send sms, the notification is: %s", notification));
SendSmsContentRequest arg = new SendSmsContentRequest();
HashSet<String> phoneSet = new HashSet<>(1);
phoneSet.add(phoneNumber);
arg.setCellphones(phoneSet);
arg.setContent(notification);
ResponseMsg<String> response = null;
try {
response = smsClient.sendContent(this.notificationUserKey, arg);
} catch (Throwable t) {
log.warn(
String.format("failed send sms to %s, the content is:%s", phoneNumber, notification));
throw new SendNotificationFailedException(
String.format("failed send sms to %s, the content is:%s", phoneNumber, notification), t);
}
if (response == null || !response.isSuccess()) {
log.warn(
String.format("failed send sms to %s, the content is:%s", phoneNumber, notification));
throw new SendNotificationFailedException(
String.format("failed send sms to %s, the content is:%s", phoneNumber, notification));
} else {
log.info(String.format("success send sms to %s", phoneNumber));
=======
@Override
public void send(String phoneNumber, String notification) {
Assert.notNull(phoneNumber);
log.info(String.format("send sms to phone %s", phoneNumber));
SendSmsContentRequest arg = new SendSmsContentRequest();
HashSet<String> phoneSet = new HashSet<>(1);
phoneSet.add(phoneNumber);
arg.setCellphones(phoneSet);
arg.setContent(notification);
ResponseMsg<String> response = null;
try {
response = smsClient.sendContent(this.notificationUserKey, arg);
} catch (Throwable t) {
log.warn(String.format("failed send sms to %s, the content is:%s", phoneNumber, notification));
throw new SendNotificationFailedException(String.format("failed send sms to %s", phoneNumber), t);
}
if (response == null || !response.isSuccess()) {
log.warn(String.format("failed send sms to %s, the content is:%s", phoneNumber, notification));
throw new SendNotificationFailedException(String.format("failed send sms to %s", phoneNumber));
} else {
log.info(String.format("success send sms to %s", phoneNumber));
}
>>>>>>>
@Override
public void send(String phoneNumber, String notification) {
Assert.notNull(phoneNumber);
log.info(String.format("send sms to phone %s", phoneNumber));
SendSmsContentRequest arg = new SendSmsContentRequest();
HashSet<String> phoneSet = new HashSet<>(1);
phoneSet.add(phoneNumber);
arg.setCellphones(phoneSet);
arg.setContent(notification);
ResponseMsg<String> response = null;
try {
response = smsClient.sendContent(this.notificationUserKey, arg);
} catch (Throwable t) {
log.warn(
String.format("failed send sms to %s, the content is:%s", phoneNumber, notification));
throw new SendNotificationFailedException(String.format("failed send sms to %s", phoneNumber),
t);
}
if (response == null || !response.isSuccess()) {
log.warn(
String.format("failed send sms to %s, the content is:%s", phoneNumber, notification));
throw new SendNotificationFailedException(
String.format("failed send sms to %s", phoneNumber));
} else {
log.info(String.format("success send sms to %s", phoneNumber)); |
<<<<<<<
=======
import com.aptana.core.resources.TaskTag;
import com.aptana.core.util.IOUtil;
import com.aptana.core.util.StringUtil;
import com.aptana.editor.js.IDebugScopes;
import com.aptana.editor.js.IJSConstants;
>>>>>>>
import com.aptana.editor.js.IDebugScopes;
<<<<<<<
URI location = context.getURI();
=======
>>>>>>> |
<<<<<<<
=======
import javafx.scene.Node;
import javafx.scene.input.MouseEvent;
import javafx.stage.Stage;
>>>>>>>
import javafx.scene.input.MouseEvent; |
<<<<<<<
private static final Logger logger = LogManager.getLogger(ModCollection.class);
=======
/**
* All the AIs to initialize.
*/
>>>>>>>
private static final Logger logger = LogManager.getLogger(ModCollection.class);
/**
* All the AIs to initialize.
*/ |
<<<<<<<
private final Predicate<Entity> isB0T = e -> ctype.has(e) && ctype.get(e).getCreatureType().equals("B0T");
=======
private final Predicate<Entity> isCreature = entity -> entity.hasComponent(CreatureTypeComponent.class);
>>>>>>>
private final Predicate<Entity> isB0T = e -> ctype.has(e) && ctype.get(e).getCreatureType().equals("B0T");
private final Predicate<Entity> isCreature = entity -> entity.hasComponent(CreatureTypeComponent.class);
<<<<<<<
game.setRandomSeed(41);
PhrancisGame.createGame(game);
=======
game.setRandomSeed(42);
ECSMod mod = new PhrancisGame();
mod.declareConfiguration(game);
// TODO: Configure decks
Set<Entity> configEntities = game.getEntitiesWithComponent(ConfigComponent.class);
for (Entity configEntity : configEntities) {
ConfigComponent config = configEntity.getComponent(ConfigComponent.class);
DeckConfig deckConf = config.getConfig(DeckConfig.class);
addCard(deckConf, isCreature.and(manaCost(1)));
addCard(deckConf, e -> scrapCost.getFor(e) == 1);
addCard(deckConf, isCreature.and(manaCost(1)));
addCard(deckConf, isCreature.and(manaCost(3)));
addCard(deckConf, isCreature.and(manaCost(1)));
addCard(deckConf, isCreature.and(manaCost(1)));
addCard(deckConf, isCreatureType("Bio").and(health(4)));
addCard(deckConf, e -> scrapCost.getFor(e) == 1 && health.getFor(e) == 1);
}
mod.setupGame(game);
>>>>>>>
game.setRandomSeed(42);
ECSMod mod = new PhrancisGame();
mod.declareConfiguration(game);
// TODO: Configure decks
Set<Entity> configEntities = game.getEntitiesWithComponent(ConfigComponent.class);
for (Entity configEntity : configEntities) {
ConfigComponent config = configEntity.getComponent(ConfigComponent.class);
DeckConfig deckConf = config.getConfig(DeckConfig.class);
addCard(deckConf, isCreature.and(manaCost(1)));
addCard(deckConf, e -> scrapCost.getFor(e) == 1);
addCard(deckConf, isCreature.and(manaCost(1)));
addCard(deckConf, isCreature.and(manaCost(3)));
addCard(deckConf, isCreature.and(manaCost(1)));
addCard(deckConf, isCreature.and(manaCost(1)));
addCard(deckConf, isCreatureType("Bio").and(health(4)));
addCard(deckConf, e -> scrapCost.getFor(e) == 1 && health.getFor(e) == 1);
}
mod.setupGame(game); |
<<<<<<<
public class Zone implements IdEntity {
=======
public class Zone {
public final LuaValue data = LuaValue.tableOf();
>>>>>>>
public class Zone implements IdEntity {
public final LuaTable data = new ExtLuaTable(this::onChange);
<<<<<<<
public final LuaTable data = new ExtLuaTable(this::onChange);
=======
>>>>>>>
<<<<<<<
private void onChange(Object key, Object value) {
System.out.println(this + ": " + key + " = " + value);
getGame().broadcastChange(this, key, value);
}
Zone(Player owner, String name, int id) {
Objects.requireNonNull(owner);
this.id = id;
=======
//TODO intended to be package private?
Zone(final Player owner, final String name) {
Objects.requireNonNull(owner, "owner");
Objects.requireNonNull(name, "name");
>>>>>>>
private void onChange(Object key, Object value) {
System.out.println(this + ": " + key + " = " + value);
getGame().broadcastChange(this, key, value);
}
Zone(final Player owner, final String name, final int id) {
this.id = id;
<<<<<<<
this.cards = new LinkedList<>();
=======
>>>>>>>
<<<<<<<
@Override
public int getId() {
return id;
}
public int size() {
return cards.size();
}
=======
@Override
public String toString() {
return "{Zone " + this.name + " (" + this.cards.size() + ") owned by " + this.owner + "}";
}
>>>>>>>
@Override
public int getId() {
return id;
}
public int size() {
return cards.size();
}
public String toString() {
return "{Zone " + this.name + " (" + this.cards.size() + ") owned by " + this.owner + "}";
} |
<<<<<<<
=======
import com.odoo.addons.partners.Partners;
import com.odoo.support.OModule;
>>>>>>>
<<<<<<<
// OModule library = new OModule(Library.class).setDefault();
=======
OModule partners = new OModule(Partners.class).setDefault();
>>>>>>>
// OModule partners = new OModule(Partners.class).setDefault(); |
<<<<<<<
=======
import com.odoo.addons.partners.model.ResCountryState;
import com.odoo.addons.partners.model.ResPartnerCategory;
>>>>>>>
<<<<<<<
=======
// Extra Demo Module Columns
OColumn date = new OColumn("Date", ODateTime.class)
.setParsePattern(ODate.DEFAULT_FORMAT);
@Odoo.hasDomainFilter
OColumn state_id = new OColumn("State", ResCountryState.class,
RelationType.ManyToOne).addDomain("country_id", "=", this);
@Odoo.onChange(method = "onChange_Company_id")
OColumn parent_id = new OColumn("Related Company", ResPartner.class,
RelationType.ManyToOne).addDomain("is_company", "=", true);
OColumn child_ids = new OColumn("Contacts", ResPartner.class,
RelationType.OneToMany).setRelatedColumn("parent_id");
OColumn comment = new OColumn("Notes", OText.class);
OColumn category_id = new OColumn("Tags", ResPartnerCategory.class,
RelationType.ManyToMany);
OColumn customer = new OColumn("Customer", OBoolean.class);
OColumn supplier = new OColumn("Supplier", OBoolean.class);
OColumn country_id = new OColumn("Country", ResCountry.class,
RelationType.ManyToOne);
>>>>>>> |
<<<<<<<
scope = new AppScope((MainActivity) MainActivity.context);
=======
scope = new AppScope(MainActivity.userContext,
(MainActivity) MainActivity.context);
getActionBar().setHomeButtonEnabled(true);
getActionBar().setDisplayHomeAsUpEnabled(true);
>>>>>>>
scope = new AppScope((MainActivity) MainActivity.context);
getActionBar().setHomeButtonEnabled(true);
getActionBar().setDisplayHomeAsUpEnabled(true); |
<<<<<<<
=======
import com.odoo.addons.partners.PartnersCursorLoader;
import com.odoo.support.OModule;
>>>>>>>
<<<<<<<
// OModule partners = new OModule(Partners.class).setDefault();
=======
OModule partners = new OModule(PartnersCursorLoader.class).setDefault();
>>>>>>>
// OModule partners = new OModule(PartnersCursorLoader.class).setDefault(); |
<<<<<<<
import com.openerp.support.OEUser;
import com.openerp.support.menu.OEMenu;
import com.openerp.util.HTMLHelper;
=======
>>>>>>>
import com.openerp.support.OEUser;
import com.openerp.util.HTMLHelper;
<<<<<<<
handleArguments((Bundle) getArguments());
=======
>>>>>>> |
<<<<<<<
public Set doDemarshall(final EJArray o, final MarshallingSession ctx) {
=======
public Set[] getEmptyArray() {
return EMPTY_ARRAY;
}
@Override
public Set doDemarshall(EJArray o, MarshallingSession ctx) {
>>>>>>>
public Set[] getEmptyArray() {
return EMPTY_ARRAY;
}
@Override
public Set doDemarshall(final EJArray o, final MarshallingSession ctx) { |
<<<<<<<
import com.dianrong.common.uniauth.client.config.UniauthSecurityConfig;
=======
import com.dianrong.common.uniauth.client.config.UniauthSecurityConfig;
>>>>>>>
import com.dianrong.common.uniauth.client.config.UniauthSecurityConfig;
<<<<<<<
* 自定义spring security 配置.
*
=======
* 自定义spring security 配置.
*
>>>>>>>
* 自定义spring security 配置. |
<<<<<<<
import org.jboss.errai.ioc.rebind.ioc.codegen.Statement;
=======
import org.jboss.errai.ioc.rebind.ioc.codegen.meta.MetaClassFactory;
>>>>>>>
import org.jboss.errai.ioc.rebind.ioc.codegen.Statement;
import org.jboss.errai.ioc.rebind.ioc.codegen.meta.MetaClassFactory; |
<<<<<<<
return callback.callback(null, new DefModifiers(Modifier.Abstract), throwsDeclaration);
=======
return callback.callback(null, null, modifiers, throwsDeclaration);
>>>>>>>
return callback.callback(null, null, new DefModifiers(Modifier.Abstract), throwsDeclaration);
<<<<<<<
return callback.callback(null, new DefModifiers(Modifier.Abstract), throwsDeclaration);
=======
return callback.callback(null, null, modifiers, throwsDeclaration);
>>>>>>>
return callback.callback(null, null, new DefModifiers(Modifier.Abstract), throwsDeclaration);
<<<<<<<
return callback.callback(null, new DefModifiers(Modifier.Abstract), throwsDeclaration);
=======
return callback.callback(null, null, modifiers, throwsDeclaration);
>>>>>>>
return callback.callback(null, null, new DefModifiers(Modifier.Abstract), throwsDeclaration); |
<<<<<<<
final MetaClass targetType = GenUtil.getPrimitiveWrapper(mapping.getType());
final MetaClass compType = targetType.isArray() ? targetType.getOuterComponentType().asBoxed() : targetType.asBoxed();
if (!targetType.isInterface() &&!targetType.isEnum() && !context.canMarshal(compType.getFullyQualifiedName())) {
=======
MetaClass targetType = GenUtil.getPrimitiveWrapper(mapping.getType());
MetaClass compType = targetType.isArray() ? targetType.getOuterComponentType().asBoxed() : targetType.asBoxed();
if (!(targetType.isAbstract() || targetType.isInterface() || targetType.isEnum()) && !context.canMarshal(compType.getFullyQualifiedName())) {
>>>>>>>
final MetaClass targetType = GenUtil.getPrimitiveWrapper(mapping.getType());
final MetaClass compType = targetType.isArray() ? targetType.getOuterComponentType().asBoxed() : targetType.asBoxed();
if (!(targetType.isAbstract() || targetType.isInterface() || targetType.isEnum()) && !context.canMarshal(compType.getFullyQualifiedName())) { |
<<<<<<<
@SuppressWarnings("unchecked")
=======
@Override
>>>>>>>
@SuppressWarnings("unchecked")
<<<<<<<
public Object demarshall(final EJValue a0, final MarshallingSession a1) {
=======
@Override
public Object demarshall(EJValue a0, MarshallingSession a1) {
>>>>>>>
public Object demarshall(final EJValue a0, final MarshallingSession a1) {
<<<<<<<
public String marshall(final Object a0, final MarshallingSession a1) {
=======
@Override
public String marshall(Object a0, MarshallingSession a1) {
>>>>>>>
@Override
public String marshall(final Object a0, final MarshallingSession a1) { |
<<<<<<<
*
* @param clazz the class to import, must not be null
=======
*
* @param clazz
* the class to import, must not be null. If it is an array type (of any number of dimensions), its non-array
* component type will be imported.
>>>>>>>
*
* @param clazz
* the class to import, must not be null. If it is an array type (of any number of dimensions), its non-array
* component type will be imported.
* |
<<<<<<<
public void addDefinition(final MappingDefinition definition) {
MAPPING_DEFINITIONS.put(definition.getMappingClass().getFullyQualifiedName(), definition);
=======
public void addDefinition(MappingDefinition definition) {
putDefinitionIfAbsent(definition.getMappingClass().getFullyQualifiedName(), definition);
>>>>>>>
public void addDefinition(final MappingDefinition definition) {
putDefinitionIfAbsent(definition.getMappingClass().getFullyQualifiedName(), definition); |
<<<<<<<
import com.dianrong.common.uniauth.sharerw.message.EmailSender;
import com.google.code.kaptcha.Constants;
import com.google.code.kaptcha.Producer;
import com.google.code.kaptcha.impl.WaterRipple;
import com.google.code.kaptcha.util.Config;
=======
import com.dianrong.platform.challenge.domain.ChallengeResult;
import com.dianrong.platform.challenge.facade.DefaultChallengeClient;
import com.dianrong.platform.challenge.facade.EventType;
import com.dianrong.platform.notification.email.EmailHttpClient;
import com.dianrong.platform.notification.email.SendEmailRequest;
import com.dianrong.platform.notification.sms.SendSmsRequest;
import com.dianrong.platform.notification.sms.SmsHttpClient;
import com.google.code.kaptcha.CaptchaProducer;
import com.google.code.kaptcha.util.Helper;
>>>>>>>
import com.dianrong.common.uniauth.sharerw.message.EmailSender;
import com.google.code.kaptcha.Constants;
import com.google.code.kaptcha.Producer;
import com.google.code.kaptcha.impl.WaterRipple;
import com.google.code.kaptcha.util.Config;
import com.dianrong.platform.challenge.domain.ChallengeResult;
import com.dianrong.platform.challenge.facade.DefaultChallengeClient;
import com.dianrong.platform.challenge.facade.EventType;
import com.dianrong.platform.notification.email.EmailHttpClient;
import com.dianrong.platform.notification.email.SendEmailRequest;
import com.dianrong.platform.notification.sms.SendSmsRequest;
import com.dianrong.platform.notification.sms.SmsHttpClient;
import com.google.code.kaptcha.CaptchaProducer;
import com.google.code.kaptcha.util.Helper;
<<<<<<<
=======
return null;
}
/**
* image captcha
* @param request
* @param response
*/
private void captcha(HttpServletRequest request, HttpServletResponse response) {
Properties props = new Properties();
props.put("cap.border", "n.");
props.put("cap.char.arr", "0,2,3,4,5,6,8,9");
props.put("cap.background.c.to", "white");
props.put("cap.background.c.from", "white");
props.put("cap.obscurificator", "com.google.code.kaptcha.impl.WaterRiple");
props.put("cap.noise.c", "255,96,0");
CaptchaProducer captchaProducer = (CaptchaProducer) Helper.ThingFactory.loadImpl(6, props);
>>>>>>>
return null;
}
/**
* image captcha
* @param request
* @param response
*/
private void captcha(HttpServletRequest request, HttpServletResponse response) { |
<<<<<<<
@Override
public OTEntity getEntity(final Integer id) {
return entityMap.get(id);
=======
public OTEntity getEntity(final int id) {
return entityMap.get(id);
>>>>>>>
@Override
public OTEntity getEntity(final int id) {
return entityMap.get(id);
<<<<<<<
@Override
public void addEntity(final OTEntity<?> entity) {
entityMap.put(entity.getState(), entity);
=======
public void addEntity(final OTEntity entity) {
>>>>>>>
@Override
public void addEntity(final OTEntity entity) { |
<<<<<<<
import org.jboss.errai.config.util.ClassScanner;
=======
import org.jboss.errai.codegen.meta.MetaClassFactory;
>>>>>>>
import org.jboss.errai.codegen.meta.MetaClassFactory;
import org.jboss.errai.config.util.ClassScanner;
<<<<<<<
final MetaClass compType = type.getOuterComponentType().asBoxed();
=======
MetaClass compType = type.getOuterComponentType();
>>>>>>>
MetaClass compType = type.getOuterComponentType().asBoxed(); |
<<<<<<<
final Object o = message.get(clazz, CDIProtocol.OBJECT_REF);
=======
final Object o = message.get(Object.class, CDIProtocol.OBJECT_REF);
>>>>>>>
final Object o = message.get(Object.class, CDIProtocol.OBJECT_REF);
<<<<<<<
Set<String> qualifierNames = message.get(Set.class, CDIProtocol.QUALIFIERS);
List<Annotation> qualifiers = null;
if(qualifierNames!=null) {
for(String qualifierName : qualifierNames) {
if(qualifiers==null) {
qualifiers = new ArrayList<Annotation>();
}
Annotation qualifier=allQualifiers.get(qualifierName);
if(qualifier!=null) {
qualifiers.add(qualifier);
}
}
}
if(qualifiers!=null) {
beanManager.fireEvent(o, qualifiers.toArray(new Annotation[qualifiers.size()]));
} else {
beanManager.fireEvent(o);
}
if (conversationalEvents.containsKey(clazz)) {
final Class outType = conversationalEvents.get(clazz);
final String outTypeStr = outType.getName();
final String sessionId = Util.getSessionId(message);
/**
* TODO: This effectively hard-codes us to Weld. But the CDI specification has no way
* of calling dynamically qualified types from BeanManager.
*/
((BeanManagerImpl) beanManager)
.fireEvent(new ParameterizedType() {
public Type[] getActualTypeArguments() {
return new Type[]{clazz, outType};
}
public Type getRawType() {
return ConversationalEvent.class;
}
public Type getOwnerType() {
return ConversationalEvent.class;
}
}, new ConversationalEvent<Object, Object>() {
public Object getEvent() {
return o;
}
public void fire(Object o) {
MessageBuilder.createMessage()
.toSubject("cdi.event:" + outTypeStr)
.command(CDICommands.CDIEvent)
.with(MessageParts.SessionID, sessionId)
.with(CDIProtocol.TYPE, outTypeStr)
.with(CDIProtocol.OBJECT_REF, o)
.noErrorHandling().sendNowWith(bus);
}
});
}
=======
beanManager.fireEvent(o);
>>>>>>>
Set<String> qualifierNames = message.get(Set.class, CDIProtocol.QUALIFIERS);
List<Annotation> qualifiers = null;
if(qualifierNames!=null) {
for(String qualifierName : qualifierNames) {
if(qualifiers==null) {
qualifiers = new ArrayList<Annotation>();
}
Annotation qualifier=allQualifiers.get(qualifierName);
if(qualifier!=null) {
qualifiers.add(qualifier);
}
}
}
if(qualifiers!=null) {
beanManager.fireEvent(o, qualifiers.toArray(new Annotation[qualifiers.size()]));
} else {
beanManager.fireEvent(o);
} |
<<<<<<<
.newObject(new JavaReflectionClass(String.class));
=======
.newObject(Integer.class);
>>>>>>>
.newObject(String.class);
<<<<<<<
.newObject(new JavaReflectionClass(Object.class));
String foreachWithListOfStrings = StatementBuilder.create()
.loadVariable("list", new JavaReflectionClass(new TypeLiteral<List<String>>(){}))
.foreach("element")
.execute(createObject)
.generate();
String foreachWithStringArray = StatementBuilder.create()
.loadVariable("list", new JavaReflectionClass(String[].class))
.foreach("element")
.execute(createObject)
.generate();
String foreachWithList = StatementBuilder.create()
.loadVariable("list", new JavaReflectionClass(List.class))
.foreach("element")
.execute(createObject)
.execute(createAnotherObject)
.generate();
assertEquals(FOREACH_RESULT_STRING_IN_LIST, foreachWithListOfStrings);
assertEquals(FOREACH_RESULT_STRING_IN_LIST, foreachWithStringArray);
assertEquals(FOREACH_RESULT_OBJECT_IN_LIST_TWO_STATEMENTS, foreachWithList);
=======
.newObject(Integer.class);
Statement loop = StatementBuilder.create()
.loadVariable("list", new TypeLiteral<List<String>>() {
})
.foreach("element")
.addStatement(createObject)
.addStatement(createAnotherObject);
Statement loopWithArray = StatementBuilder.create()
.loadVariable("list", String[].class)
.foreach("element")
.addStatement(createObject)
.addStatement(createAnotherObject);
Statement loopWithList = StatementBuilder.create()
.loadVariable("list", List.class)
.foreach("element")
.addStatement(createObject)
.addStatement(createAnotherObject);
System.out.println(loop.generate());
System.out.println(loopWithArray.generate());
System.out.println(loopWithList.generate());
>>>>>>>
.newObject(Object.class);
String foreachWithListOfStrings = StatementBuilder.create()
.loadVariable("list", new TypeLiteral<List<String>>(){})
.foreach("element")
.execute(createObject)
.generate();
/* String foreachWithStringArray = StatementBuilder.create()
.loadVariable("list", String[].class)
.foreach("element")
.execute(createObject)
.generate();
String foreachWithList = StatementBuilder.create()
.loadVariable("list", List.class)
.foreach("element")
.execute(createObject)
.execute(createAnotherObject)
.generate();*/
assertEquals(FOREACH_RESULT_STRING_IN_LIST, foreachWithListOfStrings);
//assertEquals(FOREACH_RESULT_STRING_IN_LIST, foreachWithStringArray);
//assertEquals(FOREACH_RESULT_OBJECT_IN_LIST_TWO_STATEMENTS, foreachWithList);
<<<<<<<
public void testNestedForeachLoops() throws Exception {
Statement createObject = StatementBuilder.create().newObject(
new JavaReflectionClass(Integer.class));
=======
public void testNestedLoops() throws Exception {
Statement createObject = StatementBuilder.create().newObject(Integer.class);
>>>>>>>
public void testNestedForeachLoops() throws Exception {
Statement createObject = StatementBuilder.create().newObject(Integer.class);
<<<<<<<
.loadVariable("list", new JavaReflectionClass(List.class))
.foreach("element", "list")
.execute(StatementBuilder.create()
.loadVariable("list2", new JavaReflectionClass(new TypeLiteral<List<String>>(){}))
.foreach("element2", "listDoesNotExist")
.execute(createObject)
)
.generate();
=======
.loadVariable("list", List.class)
.foreach("element", "list")
.addStatement(StatementBuilder.create()
.loadVariable("list2", new TypeLiteral<List<String>>() {
})
.foreach("element2", "listDoesNotExist")
.addStatement(createObject)
)
.generate();
>>>>>>>
.loadVariable("list", List.class)
.foreach("element", "list")
.execute(StatementBuilder.create()
.loadVariable("list2", new TypeLiteral<List<String>>(){})
.foreach("element2", "listDoesNotExist")
.execute(createObject)
)
.generate();
<<<<<<<
.loadVariable("list", new JavaReflectionClass(String.class))
.foreach("element")
.generate();
=======
.loadVariable("list", String.class)
.foreach("element")
.generate();
>>>>>>>
.loadVariable("list", String.class)
.foreach("element")
.generate(); |
<<<<<<<
import org.openmrs.Obs;
=======
import org.openmrs.Encounter;
import org.openmrs.Patient;
>>>>>>>
import org.openmrs.Obs;
import org.openmrs.Patient;
<<<<<<<
Disjunction orClause = Restrictions.disjunction();
orClause.add(ge("dateCreated", date));
if (includeVoided) {
orClause.add(ge("dateVoided", date));
}
criteria.add(orClause);
=======
criteria.add(ge("dateCreated", date));
}
//noinspection unchecked
return criteria.list();
}
@Override
public List<Patient> getPatientsModifiedAtOrAfter(@Nullable Date date, boolean includeVoided) {
Criteria criteria = sessionFactory.getCurrentSession().createCriteria(Patient.class);
if (!includeVoided) {
criteria.add(eq("personVoided", false));
}
if (date != null) {
Disjunction orClause = Restrictions.disjunction();
orClause.add(ge("personDateChanged", date))
.add(ge("personDateCreated", date));
if (includeVoided) {
orClause.add(ge("personDateVoided", date));
}
criteria.add(orClause);
>>>>>>>
Disjunction orClause = Restrictions.disjunction();
orClause.add(ge("dateCreated", date));
if (includeVoided) {
orClause.add(ge("dateVoided", date));
}
criteria.add(orClause);
}
//noinspection unchecked
return criteria.list();
}
@Override
public List<Patient> getPatientsModifiedAtOrAfter(@Nullable Date date, boolean includeVoided) {
Criteria criteria = sessionFactory.getCurrentSession().createCriteria(Patient.class);
if (!includeVoided) {
criteria.add(eq("personVoided", false));
}
if (date != null) {
Disjunction orClause = Restrictions.disjunction();
orClause.add(ge("personDateChanged", date))
.add(ge("personDateCreated", date));
if (includeVoided) {
orClause.add(ge("personDateVoided", date));
}
criteria.add(orClause); |
<<<<<<<
import javax.annotation.Nullable;
import javax.validation.constraints.Null;
=======
import javax.annotation.Nullable;
>>>>>>>
import javax.annotation.Nullable;
<<<<<<<
public static @Nullable User getUserFromProvider(@Nullable Provider provider) {
if (provider == null) {
return null;
}
Person person = provider.getPerson();
if (person == null) {
throw new IllegalStateException(
"Should not be possible to get null person from provider.");
}
List<User> users = Context.getUserService().getUsersByPerson(person, false);
if (users.size() < 1) {
// This is a server error.
throw new IllegalStateException("There is no user for the associated provider");
}
return users.get(0);
}
public static @Nullable User getUserFromProviderUuid(@Nullable String providerUuid) {
if (providerUuid == null) {
return null;
}
Provider provider = Context.getProviderService().getProviderByUuid(providerUuid);
return getUserFromProvider(provider);
}
=======
public static @Nullable Provider getProviderFromUser(@Nullable User user) {
if (user == null) {
return null;
}
Person person = user.getPerson();
Iterator<Provider> providers =
Context.getProviderService().getProvidersByPerson(person).iterator();
if (providers.hasNext()) {
return providers.next();
} else {
return null;
}
}
>>>>>>>
public static @Nullable User getUserFromProvider(@Nullable Provider provider) {
if (provider == null) {
return null;
}
Person person = provider.getPerson();
if (person == null) {
throw new IllegalStateException(
"Should not be possible to get null person from provider.");
}
List<User> users = Context.getUserService().getUsersByPerson(person, false);
if (users.size() < 1) {
// This is a server error.
throw new IllegalStateException("There is no user for the associated provider");
}
return users.get(0);
}
public static @Nullable User getUserFromProviderUuid(@Nullable String providerUuid) {
if (providerUuid == null) {
return null;
}
Provider provider = Context.getProviderService().getProviderByUuid(providerUuid);
return getUserFromProvider(provider);
}
public static @Nullable Provider getProviderFromUser(@Nullable User user) {
if (user == null) {
return null;
}
Person person = user.getPerson();
Iterator<Provider> providers =
Context.getProviderService().getProvidersByPerson(person).iterator();
if (providers.hasNext()) {
return providers.next();
} else {
return null;
}
} |
<<<<<<<
=======
private static final String EBOLA_STATUS_PROGRAM_NAME = "Ebola status program";
private static final String EBOLA_STATUS_PROGRAM_UUID = "849c86fa-6f3d-11e4-b2f4-040ccecfdba4";
private static final String EBOLA_STATUS_PROGRAM_CONCEPT_UUID = "8c00e1b5-6f35-11e4-a3fa-040ccecfdba4";
private static final String EBOLA_STATUS_WORKFLOW_CONCEPT_UUID = "107f9c7a-6f3b-11e4-ba22-040ccecfdba4";
private static final String EBOLA_STATUS_WORKFLOW_NAME = "Ebola status workflow";
// The elements of each triple are:
// 1. The key, which is how the status is represented in JSON.
// 2. The concept name, which is a short phrase to avoid collision with other concepts.
// 3. The UUID of the ProgramWorkflowState that represents the status.
private static final String[][] EBOLA_STATUS_KEYS_NAMES_AND_UUIDS = {
{"suspected", "suspected ebola case", "041a7b80-6f13-11e4-b6d3-040ccecfdba4"},
{"probable", "probable ebola case", "0ae8fd9c-6f13-11e4-9ad7-040ccecfdba4"},
{"confirmed", "confirmed ebola case", "11a8a9c0-6f13-11e4-8c91-040ccecfdba4"},
{"non-case", "not an ebola case", "b517037a-6f13-11e4-b5f2-040ccecfdba4"},
{"convalescent", "convalescing at ebola facility", "c1349bd7-6f13-11e4-b315-040ccecfdba4"},
{"can be discharged", "ready for discharge from ebola facility", "e45ef19e-6f13-11e4-b630-040ccecfdba4"},
{"discharged", "discharged from ebola facility", "e4a20c4a-6f13-11e4-b315-040ccecfdba4"},
{"suspected dead", "suspected death at ebola facility", "e4c09b7d-6f13-11e4-b315-040ccecfdba4"},
{"confirmed dead", "confirmed death at ebola facility", "e4da31e1-6f13-11e4-b315-040ccecfdba4"},
};
private static Map<String, String> EBOLA_STATUS_KEYS_BY_UUID = new HashMap<>();
private static Map<String, String> EBOLA_STATUS_UUIDS_BY_KEY = new HashMap<>();
static {
for (String[] keyNameUuid : EBOLA_STATUS_KEYS_NAMES_AND_UUIDS) {
EBOLA_STATUS_KEYS_BY_UUID.put(keyNameUuid[2], keyNameUuid[0]);
EBOLA_STATUS_UUIDS_BY_KEY.put(keyNameUuid[0], keyNameUuid[2]);
}
}
public static final Location LOCATION = new Location(1);
>>>>>>>
private static final String EBOLA_STATUS_PROGRAM_NAME = "Ebola status program";
private static final String EBOLA_STATUS_PROGRAM_UUID = "849c86fa-6f3d-11e4-b2f4-040ccecfdba4";
private static final String EBOLA_STATUS_PROGRAM_CONCEPT_UUID = "8c00e1b5-6f35-11e4-a3fa-040ccecfdba4";
private static final String EBOLA_STATUS_WORKFLOW_CONCEPT_UUID = "107f9c7a-6f3b-11e4-ba22-040ccecfdba4";
private static final String EBOLA_STATUS_WORKFLOW_NAME = "Ebola status workflow";
// The elements of each triple are:
// 1. The key, which is how the status is represented in JSON.
// 2. The concept name, which is a short phrase to avoid collision with other concepts.
// 3. The UUID of the ProgramWorkflowState that represents the status.
private static final String[][] EBOLA_STATUS_KEYS_NAMES_AND_UUIDS = {
{"suspected", "suspected ebola case", "041a7b80-6f13-11e4-b6d3-040ccecfdba4"},
{"probable", "probable ebola case", "0ae8fd9c-6f13-11e4-9ad7-040ccecfdba4"},
{"confirmed", "confirmed ebola case", "11a8a9c0-6f13-11e4-8c91-040ccecfdba4"},
{"non-case", "not an ebola case", "b517037a-6f13-11e4-b5f2-040ccecfdba4"},
{"convalescent", "convalescing at ebola facility", "c1349bd7-6f13-11e4-b315-040ccecfdba4"},
{"can be discharged", "ready for discharge from ebola facility", "e45ef19e-6f13-11e4-b630-040ccecfdba4"},
{"discharged", "discharged from ebola facility", "e4a20c4a-6f13-11e4-b315-040ccecfdba4"},
{"suspected dead", "suspected death at ebola facility", "e4c09b7d-6f13-11e4-b315-040ccecfdba4"},
{"confirmed dead", "confirmed death at ebola facility", "e4da31e1-6f13-11e4-b315-040ccecfdba4"},
};
private static Map<String, String> EBOLA_STATUS_KEYS_BY_UUID = new HashMap<>();
private static Map<String, String> EBOLA_STATUS_UUIDS_BY_KEY = new HashMap<>();
static {
for (String[] keyNameUuid : EBOLA_STATUS_KEYS_NAMES_AND_UUIDS) {
EBOLA_STATUS_KEYS_BY_UUID.put(keyNameUuid[2], keyNameUuid[0]);
EBOLA_STATUS_UUIDS_BY_KEY.put(keyNameUuid[0], keyNameUuid[2]);
}
}
public static final Location LOCATION = new Location(1);
<<<<<<<
PatientIdentifierType identifierType = patientService.getPatientIdentifierTypeByName(MSF_IDENTIFIER);
jsonForm.add(ID, patient.getPatientIdentifier(identifierType));
jsonForm.add(GIVEN_NAME, patient.getGivenName());
jsonForm.add(FAMILY_NAME, patient.getFamilyName());
jsonForm.add("status", "probable" /* TODO(nfortescue): work out how to store this */);
jsonForm.add(GENDER, patient.getGender());
jsonForm.add("created_timestamp_utc", patient.getDateCreated().getTime());
=======
if (patient != null) {
PatientIdentifier patientIdentifier =
patient.getPatientIdentifier(getMsfIdentifierType());
if (patientIdentifier != null) {
jsonForm.add(ID, patientIdentifier.getIdentifier());
}
jsonForm.add(GENDER, patient.getGender());
double age = birthDateToAge(patient.getBirthdate());
if (age < 1.0) {
jsonForm.add(AGE, (int) Math.floor(age * 12));
jsonForm.add(AGE_UNIT, "months");
} else {
jsonForm.add(AGE, (int) Math.floor(age));
jsonForm.add(AGE_UNIT, "years");
}
jsonForm.add(GIVEN_NAME, patient.getGivenName());
jsonForm.add(FAMILY_NAME, patient.getFamilyName());
PatientProgram patientProgram = getEbolaStatusPatientProgram(patient);
PatientState patientState = patientProgram.getCurrentState(
getEbolaStatusProgramWorkflow());
if (patientState != null) {
jsonForm.add(STATUS, getKeyByState(patientState.getState()));
}
jsonForm.add("created_timestamp_utc", patient.getDateCreated().getTime());
}
>>>>>>>
if (patient != null) {
PatientIdentifier patientIdentifier =
patient.getPatientIdentifier(getMsfIdentifierType());
if (patientIdentifier != null) {
jsonForm.add(ID, patientIdentifier.getIdentifier());
}
jsonForm.add(GENDER, patient.getGender());
double age = birthDateToAge(patient.getBirthdate());
if (age < 1.0) {
jsonForm.add(AGE, (int) Math.floor(age * 12));
jsonForm.add(AGE_UNIT, "months");
} else {
jsonForm.add(AGE, (int) Math.floor(age));
jsonForm.add(AGE_UNIT, "years");
}
jsonForm.add(GIVEN_NAME, patient.getGivenName());
jsonForm.add(FAMILY_NAME, patient.getFamilyName());
PatientProgram patientProgram = getEbolaStatusPatientProgram(patient);
PatientState patientState = patientProgram.getCurrentState(
getEbolaStatusProgramWorkflow());
if (patientState != null) {
jsonForm.add(STATUS, getKeyByState(patientState.getState()));
}
jsonForm.add("created_timestamp_utc", patient.getDateCreated().getTime());
}
<<<<<<<
=======
identifier.setLocation(LOCATION);
>>>>>>>
identifier.setLocation(LOCATION);
<<<<<<<
=======
private List<Patient> filterPatients(String query, boolean searchUuid, List<Patient> allPatients) {
List<Patient> filteredPatients = new ArrayList<>();
// Filter patients by id, name, and MSF id. Don't use patientService.getPatients() for
// this, as the behavior does not match the expected behavior from the API docs.
PatientIdentifierType msfIdentifierType = patientService.getPatientIdentifierTypeByName(MSF_IDENTIFIER);
for (Patient patient : allPatients) {
boolean match = false;
// First check the patient's full name.
for (PersonName name : patient.getNames()) {
if(StringUtils.containsIgnoreCase(name.getFullName(), query)) {
match = true;
break;
}
}
// Short-circuit on name match.
if (match) {
filteredPatients.add(patient);
continue;
}
// Next check the patient's MSF id.
for (PatientIdentifier identifier : patient.getPatientIdentifiers(msfIdentifierType)) {
if (StringUtils.containsIgnoreCase(identifier.getIdentifier(), query)) {
match = true;
break;
}
}
if (match || (searchUuid && StringUtils.containsIgnoreCase(patient.getUuid(), query))) {
filteredPatients.add(patient);
}
}
return filteredPatients;
}
private SimpleObject getSimpleObjectFromPatientList(List<Patient> patients) {
List<SimpleObject> jsonResults = new ArrayList<>();
for (Patient patient : patients) {
SimpleObject jsonForm = patientToJson(patient);
jsonResults.add(jsonForm);
}
SimpleObject list = new SimpleObject();
list.add("results", jsonResults);
return list;
}
>>>>>>>
private List<Patient> filterPatients(String query, boolean searchUuid, List<Patient> allPatients) {
List<Patient> filteredPatients = new ArrayList<>();
// Filter patients by id, name, and MSF id. Don't use patientService.getPatients() for
// this, as the behavior does not match the expected behavior from the API docs.
PatientIdentifierType msfIdentifierType = patientService.getPatientIdentifierTypeByName(MSF_IDENTIFIER);
for (Patient patient : allPatients) {
boolean match = false;
// First check the patient's full name.
for (PersonName name : patient.getNames()) {
if(StringUtils.containsIgnoreCase(name.getFullName(), query)) {
match = true;
break;
}
}
// Short-circuit on name match.
if (match) {
filteredPatients.add(patient);
continue;
}
// Next check the patient's MSF id.
for (PatientIdentifier identifier : patient.getPatientIdentifiers(msfIdentifierType)) {
if (StringUtils.containsIgnoreCase(identifier.getIdentifier(), query)) {
match = true;
break;
}
}
if (match || (searchUuid && StringUtils.containsIgnoreCase(patient.getUuid(), query))) {
filteredPatients.add(patient);
}
}
return filteredPatients;
}
private SimpleObject getSimpleObjectFromPatientList(List<Patient> patients) {
List<SimpleObject> jsonResults = new ArrayList<>();
for (Patient patient : patients) {
SimpleObject jsonForm = patientToJson(patient);
jsonResults.add(jsonForm);
}
SimpleObject list = new SimpleObject();
list.add("results", jsonResults);
return list;
} |
<<<<<<<
@Override
public void beforeFlush(HttpServletResponse response, BufferedServletResponseWrapper wrapper, String mimeTypeMagic) throws IOException {
=======
public void beforeFlush(HttpServletResponse response, BufferedServletResponseWrapper wrapper) throws IOException {
>>>>>>>
public void beforeFlush(HttpServletResponse response, BufferedServletResponseWrapper wrapper, String mimeTypeMagic) throws IOException { |
<<<<<<<
import android.os.Handler;
=======
import android.preference.PreferenceManager;
>>>>>>>
import android.os.Handler;
import android.preference.PreferenceManager;
<<<<<<<
public class MainActivity extends BaseActivity implements OnDateSetListener, OnTimeSetListener {
=======
public class MainActivity extends BaseActivity implements OnDateSetListener, OnTimeSetListener, SharedPreferences.OnSharedPreferenceChangeListener {
>>>>>>>
public class MainActivity extends BaseActivity implements OnDateSetListener, OnTimeSetListener, SharedPreferences.OnSharedPreferenceChangeListener {
<<<<<<<
=======
EventBus.getDefault().register(this);
prefs.registerOnSharedPreferenceChangeListener(this);
>>>>>>>
EventBus.getDefault().register(this);
prefs.registerOnSharedPreferenceChangeListener(this);
<<<<<<<
/**
* Performs auto-backup into file of a modified note
* @param notesUpdatedEvent Event containing updated note
*/
public void onEventAsync(NotesUpdatedEvent notesUpdatedEvent) {
autobackupUpdate(notesUpdatedEvent.notes);
}
private void autobackupUpdate(List<Note> updatedNotes) {
if (prefs.getBoolean(Constants.PREF_ENABLE_AUTOBACKUP, false)) {
File autoBackupDir = StorageHelper.getBackupDir(Constants.AUTO_BACKUP_DIR);
for (Note note : updatedNotes) {
BackupHelper.exportNote(autoBackupDir, note);
BackupHelper.exportAttachments(null, new File(autoBackupDir, StorageHelper.getAttachmentDir().getName()),
note.getAttachmentsList(), note.getAttachmentsListOld());
}
}
}
/**
* Performs deletion from auto-backup folder of a permanently deleted note
* @param notesDeletedEvent Event containing deleted note
*/
public void onEventAsync(NotesDeletedEvent notesDeletedEvent) {
autobackupDeletion(notesDeletedEvent.notes);
}
private void autobackupDeletion(List<Note> deletedNotes) {
if (prefs.getBoolean(Constants.PREF_ENABLE_AUTOBACKUP, false)) {
File autoBackupDir = StorageHelper.getBackupDir(Constants.AUTO_BACKUP_DIR);
for (Note note : deletedNotes) {
BackupHelper.deleteNoteBackup(autoBackupDir, note);
}
}
}
=======
@Override
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
prefsChanged = true;
}
>>>>>>>
@Override
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
prefsChanged = true;
} |
<<<<<<<
=======
import android.widget.Toast;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.io.filefilter.FileFilterUtils;
import org.apache.commons.io.filefilter.RegexFileFilter;
import org.apache.commons.io.filefilter.TrueFileFilter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.MalformedURLException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import exceptions.ImportException;
>>>>>>>
import java.io.File;
<<<<<<<
import it.feio.android.omninotes.utils.Constants;
import it.feio.android.omninotes.utils.NotificationsHelper;
import it.feio.android.omninotes.utils.ReminderHelper;
import it.feio.android.omninotes.utils.StorageHelper;
import java.io.File;
=======
import it.feio.android.omninotes.utils.Constants;
import it.feio.android.omninotes.utils.GeocodeHelper;
import it.feio.android.omninotes.utils.ReminderHelper;
import it.feio.android.omninotes.utils.StorageHelper;
import it.feio.android.omninotes.utils.TextHelper;
import it.feio.android.omninotes.utils.notifications.NotificationChannels;
import it.feio.android.omninotes.utils.notifications.NotificationsHelper;
import it.feio.android.springpadimporter.Importer;
import it.feio.android.springpadimporter.models.SpringpadAttachment;
import it.feio.android.springpadimporter.models.SpringpadComment;
import it.feio.android.springpadimporter.models.SpringpadElement;
import it.feio.android.springpadimporter.models.SpringpadItem;
>>>>>>>
import it.feio.android.omninotes.utils.Constants;
import it.feio.android.omninotes.utils.ReminderHelper;
import it.feio.android.omninotes.utils.StorageHelper;
import it.feio.android.omninotes.utils.notifications.NotificationChannels;
import it.feio.android.omninotes.utils.notifications.NotificationsHelper;
<<<<<<<
boolean importLegacy = ACTION_DATA_IMPORT_LEGACY.equals(intent.getAction());
// Gets backup folder
=======
>>>>>>>
boolean importLegacy = ACTION_DATA_IMPORT_LEGACY.equals(intent.getAction());
// Gets backup folder
<<<<<<<
=======
/**
* Export database to backup folder
*
* @return True if success, false otherwise
*/
private boolean exportDB(File backupDir) {
File database = getDatabasePath(Constants.DATABASE_NAME);
return (StorageHelper.copyFile(database, new File(backupDir, Constants.DATABASE_NAME)));
}
private void exportNotes(File backupDir) {
for (Note note : DbHelper.getInstance().getAllNotes(false)) {
File noteFile = new File(backupDir, String.valueOf(note.get_id()));
try {
FileUtils.write(noteFile, note.toJSON());
} catch (IOException e) {
Log.e(Constants.TAG, "Error creating backup for note: " + note.get_id());
}
}
}
/**
* Export attachments to backup folder
*
* @return True if success, false otherwise
*/
private boolean exportAttachments(File backupDir) {
boolean result = true;
File attachmentsDir = StorageHelper.getAttachmentDir();
File destinationattachmentsDir = new File(backupDir, attachmentsDir.getName());
DbHelper db = DbHelper.getInstance();
ArrayList<Attachment> list = db.getAllAttachments();
int exported = 0;
for (Attachment attachment : list) {
try {
StorageHelper.copyToBackupDir(destinationattachmentsDir, FilenameUtils.getName(attachment.getUriPath()), getContentResolver().openInputStream(attachment.getUri()));
mNotificationsHelper.setMessage(TextHelper.capitalize(getString(R.string.attachment)) + " " + exported++ + "/" + list.size())
.show();
} catch (FileNotFoundException e) {
Log.w(Constants.TAG, "Attachment not found during backup: " + attachment.getUriPath());
result = false;
}
}
return result;
}
/**
* Exports settings if required
*/
private boolean exportSettings(File backupDir) {
File preferences = StorageHelper.getSharedPreferencesFile(this);
return (StorageHelper.copyFile(preferences, new File(backupDir, preferences.getName())));
}
/**
* Imports settings
*/
private boolean importSettings(File backupDir) {
File preferences = StorageHelper.getSharedPreferencesFile(this);
File preferenceBackup = new File(backupDir, preferences.getName());
return (StorageHelper.copyFile(preferenceBackup, preferences));
}
>>>>>>>
<<<<<<<
=======
/**
* Import database from backup folder
*/
private boolean importDB(File backupDir) {
File database = getDatabasePath(Constants.DATABASE_NAME);
if (database.exists()) {
database.delete();
}
return (StorageHelper.copyFile(new File(backupDir, Constants.DATABASE_NAME), database));
}
private void importNotes(File backupDir) {
for (File file : FileUtils.listFiles(backupDir, new RegexFileFilter("\\d{13}"), TrueFileFilter.INSTANCE)) {
try {
Note note = new Note();
note.buildFromJson(FileUtils.readFileToString(file));
if (note.getCategory() != null) {
DbHelper.getInstance().updateCategory(note.getCategory());
}
// Observable.from(note.getAttachmentsList())
// .map((Func1<BaseAttachment, Attachment>) Attachment::new)
// .flatMap((Func1<Attachment, Observable<?>>) attachment -> {
// DbHelper.getInstance().updateAttachment(attachment);
// return Observable.just(attachment);
// })
// .doOnCompleted(() -> DbHelper.getInstance().updateNote(note, false))
// .subscribe();
for (Attachment attachment : note.getAttachmentsList()) {
DbHelper.getInstance().updateAttachment(attachment);
}
DbHelper.getInstance().updateNote(note, false);
} catch (IOException e) {
Log.e(Constants.TAG, "Error parsing note json");
}
}
}
/**
* Import attachments from backup folder
*/
private void importAttachments(File backupDir) {
File attachmentsDir = StorageHelper.getAttachmentDir();
File backupAttachmentsDir = new File(backupDir, attachmentsDir.getName());
if (!backupAttachmentsDir.exists()) {
return;
}
Collection list = FileUtils.listFiles(backupAttachmentsDir, FileFilterUtils.trueFileFilter(),
TrueFileFilter.INSTANCE);
Iterator i = list.iterator();
int imported = 0;
File file = null;
while (i.hasNext()) {
try {
file = (File) i.next();
FileUtils.copyFileToDirectory(file, attachmentsDir, true);
mNotificationsHelper.setMessage(TextHelper.capitalize(getString(R.string.attachment)) + " " + imported++ + "/" + list.size())
.show();
} catch (IOException e) {
Log.e(Constants.TAG, "Error importing the attachment " + file.getName());
}
}
}
>>>>>>> |
<<<<<<<
import com.dianrong.common.uniauth.common.bean.dto.DomainDto;
import com.dianrong.common.uniauth.common.bean.dto.GroupDto;
import com.dianrong.common.uniauth.common.bean.dto.RoleCodeDto;
import com.dianrong.common.uniauth.common.bean.dto.RoleDto;
import com.dianrong.common.uniauth.common.bean.dto.StakeholderDto;
=======
import com.dianrong.common.uniauth.common.bean.dto.*;
import com.dianrong.common.uniauth.server.data.entity.*;
>>>>>>>
import com.dianrong.common.uniauth.common.bean.dto.DomainDto;
import com.dianrong.common.uniauth.common.bean.dto.GroupDto;
import com.dianrong.common.uniauth.common.bean.dto.RoleCodeDto;
import com.dianrong.common.uniauth.common.bean.dto.RoleDto;
import com.dianrong.common.uniauth.common.bean.dto.StakeholderDto;
import com.dianrong.common.uniauth.common.bean.dto.UserDto;
<<<<<<<
import com.dianrong.common.uniauth.common.bean.request.StakeholderParam;
import com.dianrong.common.uniauth.server.data.entity.Domain;
import com.dianrong.common.uniauth.server.data.entity.Grp;
import com.dianrong.common.uniauth.server.data.entity.Role;
import com.dianrong.common.uniauth.server.data.entity.RoleCode;
import com.dianrong.common.uniauth.server.data.entity.Stakeholder;
=======
>>>>>>>
import com.dianrong.common.uniauth.common.bean.request.StakeholderParam;
import com.dianrong.common.uniauth.server.data.entity.Domain;
import com.dianrong.common.uniauth.server.data.entity.Grp;
import com.dianrong.common.uniauth.server.data.entity.Role;
import com.dianrong.common.uniauth.server.data.entity.RoleCode;
import com.dianrong.common.uniauth.server.data.entity.Stakeholder;
import com.dianrong.common.uniauth.server.data.entity.User;
<<<<<<<
public static Stakeholder convert(StakeholderParam stakeholderParam) {
if(stakeholderParam == null) {
return null;
} else {
Stakeholder stakeholder = new Stakeholder();
stakeholder.setDomainId(stakeholderParam.getDomainId());
stakeholder.setEmail(stakeholderParam.getEmail());
//stakeholder.setId(stakeholderParam.getId());
stakeholder.setJobtitle(stakeholderParam.getJobtitle());
stakeholder.setName(stakeholderParam.getName());
stakeholder.setPhone(stakeholderParam.getPhone());
return stakeholder;
}
}
=======
public static UserDto convert(User user) {
if(user == null) {
return null;
} else {
UserDto userDto = new UserDto();
userDto.setName(user.getName()).
setEmail(user.getEmail()).
setId(user.getId()).
setPhone(user.getPhone());
return userDto;
}
}
>>>>>>>
public static Stakeholder convert(StakeholderParam stakeholderParam) {
if(stakeholderParam == null) {
return null;
} else {
Stakeholder stakeholder = new Stakeholder();
stakeholder.setDomainId(stakeholderParam.getDomainId());
stakeholder.setEmail(stakeholderParam.getEmail());
//stakeholder.setId(stakeholderParam.getId());
stakeholder.setJobtitle(stakeholderParam.getJobtitle());
stakeholder.setName(stakeholderParam.getName());
stakeholder.setPhone(stakeholderParam.getPhone());
return stakeholder;
}
}
public static UserDto convert(User user) {
if(user == null) {
return null;
} else {
UserDto userDto = new UserDto();
userDto.setName(user.getName()).
setEmail(user.getEmail()).
setId(user.getId()).
setPhone(user.getPhone());
return userDto;
}
} |
<<<<<<<
protected SharedPreferences prefs;
private final String DB_PATH_REGEX = ".*it\\.feio\\.android\\.omninotes.*\\/databases\\/test_omni-notes.*";
=======
private final static String DB_PATH_REGEX = ".*it\\.feio\\.android\\.omninotes.*\\/databases\\/test_omni-notes.*";
private final static String DB_PREFIX = "test_";
>>>>>>>
protected SharedPreferences prefs;
private final static String DB_PATH_REGEX = ".*it\\.feio\\.android\\.omninotes.*\\/databases\\/test_omni-notes.*";
private final static String DB_PREFIX = "test_";
<<<<<<<
testContext = new RenamingDelegatingContext(InstrumentationRegistry.getTargetContext(), "test_");
prefs = testContext.getSharedPreferences(Constants.PREFS_NAME, Context.MODE_MULTI_PROCESS);
=======
testContext = new RenamingDelegatingContext(InstrumentationRegistry.getTargetContext(), DB_PREFIX);
>>>>>>>
testContext = new RenamingDelegatingContext(InstrumentationRegistry.getTargetContext(), DB_PREFIX);
prefs = testContext.getSharedPreferences(Constants.PREFS_NAME, Context.MODE_MULTI_PROCESS); |
<<<<<<<
/*******************************************************************************
* Copyright 2014 Federico Iosue ([email protected])
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************/
package it.feio.android.omninotes.utils;
public interface Constants {
final String TAG = "Omni Notes";
final String DATABASE_NAME = "omni-notes";
final String PREFS_FILE_NAME = "omni-notes.prefs";
final String APP_STORAGE_DIRECTORY = TAG;
final String APP_STORAGE_DIRECTORY_ATTACHMENTS = "attachments";
// Splash screen timer
static int SPLASH_TIME_OUT = 1400;
static long SPLASH_MIN_OFFSET = 60*60*1000; // 1 hour
final String DEV_EMAIL = "[email protected]";
// Used for updates retrieval
final String PS_METADATA_FETCHER_URL = "http://www.iosue.it/federico/apps/PSMetadataFetcher/get_app_data.php?url=";
final String PLAY_STORE_URL = "https://play.google.com/store/apps/details?id=";
static long UPDATE_MIN_FREQUENCY = 24*60*60*1000; // 1 hour
// Used for ACRA
final String ACRA_MAILER_URL = "http://www.iosue.it/federico/apps/acramailer/acra.php?email=";
final int THUMBNAIL_SIZE = 300;
final String DATE_SEPARATOR = "/";
final String TIME_SEPARATOR = ":";
final String DATE_FORMAT_EU = "dd/MM/yyyy HH:mm";
final String DATE_FORMAT_ISO8601 = "YYYY-MM-DD HH:mm:SS.SSS";
final String DATE_FORMAT_SHORT = "d MMM HH:mm";
// final String DATE_FORMAT_SHORT_12 = "d MMM hh:mma";
final String DATE_FORMAT_SHORT_DATE = "d MMM yyyy";
final String DATE_FORMAT_SHORT_TIME = "HH" + TIME_SEPARATOR + "mm";
// final String DATE_FORMAT_SHORT_TIME_12 = "hh" + TIME_SEPARATOR + "mma";
final String DATE_FORMAT_SORTABLE = "yyyyMMddHHmmssS";
final String DATE_FORMAT_SORTABLE_OLD = "yyyyMMddHHmmss";
final String DATE_FORMAT_EXPORT = "yyyy.MM.dd-HH.mm";
final String INTENT_KEY = "note_id";
final String INTENT_NOTE = "note";
final String INTENT_MANAGING_SHARE = "managing_share"; // Used when handling received data
final String INTENT_IMAGE = "image";
final int INTENT_ALARM_CODE = 12345;
final String INTENT_BACKUP_NAME = "backup_name";
final String INTENT_TAG = "tag";
final String INTENT_DETAIL_RESULT_CODE = "detail_result_code";
final String INTENT_DETAIL_RESULT_MESSAGE = "detail_result_message";
// Custom intent actions
final String ACTION_DATA_EXPORT = "action_data_export";
final String ACTION_DATA_IMPORT = "action_data_import";
final String ACTION_DATA_DELETE = "action_data_delete";
final String ACTION_START_APP = "action_start_app";
final String ACTION_DISMISS = "action_dismiss";
final String ACTION_SNOOZE = "action_snooze";
final String ACTION_SHORTCUT = "action_shortcut";
final String MESSAGE = "message";
final String PREF_FIRST_RUN = "first_run";
final String PREF_LAST_UPDATE_CHECK = "last_update_check";
final String PREF_NAVIGATION = "navigation";
final String PREF_SORTING_COLUMN = "sorting_column";
final String PREF_SORTING_ORDER = "sorting_direction";
final String PREF_PASSWORD = "password";
final String PREF_PASSWORD_QUESTION = "password_question";
final String PREF_PASSWORD_ANSWER = "password_answer";
final String PREF_RATE_DISMISSED = "rate_dismissed";
final String PREF_LAUNCH_COUNT = "launch_count";
final String PREF_FIRST_LAUNCH = "first_launch";
final String PREF_KEEP_CHECKED = "keep_checked";
final String PREF_KEEP_CHECKMARKS = "show_checkmarks";
final String PREF_INSTRUCTIONS_PREFIX = "tour_";
final String PREF_EXPANDED_VIEW = "expanded_view";
final String EXPORT_FILE_NAME = TAG;
final String MIME_TYPE_IMAGE = "image/jpeg";
final String MIME_TYPE_AUDIO = "audio/3gp";
final String MIME_TYPE_VIDEO = "video/mp4";
final String MIME_TYPE_IMAGE_EXT = ".jpeg";
final String MIME_TYPE_AUDIO_EXT = ".3gp";
final String MIME_TYPE_VIDEO_EXT = ".mp4";
final int ERROR_NOTE_NOT_DELETED = -1;
final int ERROR_ATTACHMENTS_NOT_DELETED = -2;
final String SECURITY_ALGORITHM = "MD5";
final String TIMESTAMP_NEVER = "13910051406040"; // I really don't believe we'll reach 10/17/2410 1:10:06 AM
}
=======
/*******************************************************************************
* Copyright 2014 Federico Iosue ([email protected])
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************/
package it.feio.android.omninotes.utils;
public interface Constants {
final String TAG = "Omni Notes";
final String DATABASE_NAME = "omni-notes";
final String PREFS_FILE_NAME = "omni-notes.prefs";
final String APP_STORAGE_DIRECTORY = TAG;
final String APP_STORAGE_DIRECTORY_ATTACHMENTS = "attachments";
// Splash screen timer
static int SPLASH_TIME_OUT = 1400;
static long SPLASH_MIN_OFFSET = 60*60*1000; // 1 hour
final String DEV_EMAIL = "[email protected]";
// Used for updates retrieval
final String PS_METADATA_FETCHER_URL = "http://www.iosue.it/federico/apps/PSMetadataFetcher/get_app_data.php?url=";
final String PLAY_STORE_URL = "https://play.google.com/store/apps/details?id=";
static long UPDATE_MIN_FREQUENCY = 24*60*60*1000; // 1 hour
// Used for ACRA
final String ACRA_MAILER_URL = "http://www.iosue.it/federico/apps/acramailer/acra.php?email=";
final int THUMBNAIL_SIZE = 300;
final String DATE_SEPARATOR = "/";
final String TIME_SEPARATOR = ":";
final String DATE_FORMAT_EU = "dd/MM/yyyy HH:mm";
final String DATE_FORMAT_ISO8601 = "YYYY-MM-DD HH:mm:SS.SSS";
final String DATE_FORMAT_SHORT = "d MMM HH:mm";
// final String DATE_FORMAT_SHORT_12 = "d MMM hh:mma";
final String DATE_FORMAT_SHORT_DATE = "d MMM yyyy";
final String DATE_FORMAT_SHORT_TIME = "HH" + TIME_SEPARATOR + "mm";
// final String DATE_FORMAT_SHORT_TIME_12 = "hh" + TIME_SEPARATOR + "mma";
final String DATE_FORMAT_SORTABLE = "yyyyMMddHHmmssS";
final String DATE_FORMAT_SORTABLE_OLD = "yyyyMMddHHmmss";
final String DATE_FORMAT_EXPORT = "yyyy.MM.dd-HH.mm";
final String INTENT_KEY = "note_id";
final String INTENT_NOTE = "note";
final String INTENT_MANAGING_SHARE = "managing_share"; // Used when handling received data
final String INTENT_IMAGE = "image";
final int INTENT_ALARM_CODE = 12345;
final String INTENT_BACKUP_NAME = "backup_name";
final String INTENT_BACKUP_INCLUDE_SETTINGS = "backup_include_settings";
final String INTENT_TAG = "tag";
final String INTENT_DETAIL_RESULT_CODE = "detail_result_code";
final String INTENT_DETAIL_RESULT_MESSAGE = "detail_result_message";
// Custom intent actions
final String ACTION_DATA_EXPORT = "action_data_export";
final String ACTION_DATA_IMPORT = "action_data_import";
final String ACTION_DATA_DELETE = "action_data_delete";
final String ACTION_START_APP = "action_start_app";
final String ACTION_DISMISS = "action_dismiss";
final String ACTION_SNOOZE = "action_snooze";
final String ACTION_SHORTCUT = "action_shortcut";
final String MESSAGE = "message";
final String PREF_FIRST_RUN = "first_run";
final String PREF_LAST_UPDATE_CHECK = "last_update_check";
final String PREF_NAVIGATION = "navigation";
final String PREF_SORTING_COLUMN = "sorting_column";
final String PREF_SORTING_ORDER = "sorting_direction";
final String PREF_PASSWORD = "password";
final String PREF_RATE_DISMISSED = "rate_dismissed";
final String PREF_LAUNCH_COUNT = "launch_count";
final String PREF_FIRST_LAUNCH = "first_launch";
final String PREF_KEEP_CHECKED = "keep_checked";
final String PREF_KEEP_CHECKMARKS = "show_checkmarks";
final String PREF_INSTRUCTIONS_PREFIX = "tour_";
final String PREF_EXPANDED_VIEW = "expanded_view";
final String EXPORT_FILE_NAME = TAG;
final String MIME_TYPE_IMAGE = "image/jpeg";
final String MIME_TYPE_AUDIO = "audio/3gp";
final String MIME_TYPE_VIDEO = "video/mp4";
final String MIME_TYPE_IMAGE_EXT = ".jpeg";
final String MIME_TYPE_AUDIO_EXT = ".3gp";
final String MIME_TYPE_VIDEO_EXT = ".mp4";
final int ERROR_NOTE_NOT_DELETED = -1;
final int ERROR_ATTACHMENTS_NOT_DELETED = -2;
final String SECURITY_ALGORITHM = "MD5";
final String TIMESTAMP_NEVER = "13910051406040"; // I really don't believe we'll reach 10/17/2410 1:10:06 AM
}
>>>>>>>
/*******************************************************************************
* Copyright 2014 Federico Iosue ([email protected])
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************/
package it.feio.android.omninotes.utils;
public interface Constants {
final String TAG = "Omni Notes";
final String DATABASE_NAME = "omni-notes";
final String PREFS_FILE_NAME = "omni-notes.prefs";
final String APP_STORAGE_DIRECTORY = TAG;
final String APP_STORAGE_DIRECTORY_ATTACHMENTS = "attachments";
// Splash screen timer
static int SPLASH_TIME_OUT = 1400;
static long SPLASH_MIN_OFFSET = 60*60*1000; // 1 hour
final String DEV_EMAIL = "[email protected]";
// Used for updates retrieval
final String PS_METADATA_FETCHER_URL = "http://www.iosue.it/federico/apps/PSMetadataFetcher/get_app_data.php?url=";
final String PLAY_STORE_URL = "https://play.google.com/store/apps/details?id=";
static long UPDATE_MIN_FREQUENCY = 24*60*60*1000; // 1 hour
// Used for ACRA
final String ACRA_MAILER_URL = "http://www.iosue.it/federico/apps/acramailer/acra.php?email=";
final int THUMBNAIL_SIZE = 300;
final String DATE_SEPARATOR = "/";
final String TIME_SEPARATOR = ":";
final String DATE_FORMAT_EU = "dd/MM/yyyy HH:mm";
final String DATE_FORMAT_ISO8601 = "YYYY-MM-DD HH:mm:SS.SSS";
final String DATE_FORMAT_SHORT = "d MMM HH:mm";
// final String DATE_FORMAT_SHORT_12 = "d MMM hh:mma";
final String DATE_FORMAT_SHORT_DATE = "d MMM yyyy";
final String DATE_FORMAT_SHORT_TIME = "HH" + TIME_SEPARATOR + "mm";
// final String DATE_FORMAT_SHORT_TIME_12 = "hh" + TIME_SEPARATOR + "mma";
final String DATE_FORMAT_SORTABLE = "yyyyMMddHHmmssS";
final String DATE_FORMAT_SORTABLE_OLD = "yyyyMMddHHmmss";
final String DATE_FORMAT_EXPORT = "yyyy.MM.dd-HH.mm";
final String INTENT_KEY = "note_id";
final String INTENT_NOTE = "note";
final String INTENT_MANAGING_SHARE = "managing_share"; // Used when handling received data
final String INTENT_IMAGE = "image";
final int INTENT_ALARM_CODE = 12345;
final String INTENT_BACKUP_NAME = "backup_name";
final String INTENT_BACKUP_INCLUDE_SETTINGS = "backup_include_settings";
final String INTENT_TAG = "tag";
final String INTENT_DETAIL_RESULT_CODE = "detail_result_code";
final String INTENT_DETAIL_RESULT_MESSAGE = "detail_result_message";
// Custom intent actions
final String ACTION_DATA_EXPORT = "action_data_export";
final String ACTION_DATA_IMPORT = "action_data_import";
final String ACTION_DATA_DELETE = "action_data_delete";
final String ACTION_START_APP = "action_start_app";
final String ACTION_DISMISS = "action_dismiss";
final String ACTION_SNOOZE = "action_snooze";
final String ACTION_SHORTCUT = "action_shortcut";
final String MESSAGE = "message";
final String PREF_FIRST_RUN = "first_run";
final String PREF_LAST_UPDATE_CHECK = "last_update_check";
final String PREF_NAVIGATION = "navigation";
final String PREF_SORTING_COLUMN = "sorting_column";
final String PREF_SORTING_ORDER = "sorting_direction";
final String PREF_PASSWORD = "password";
final String PREF_PASSWORD_QUESTION = "password_question";
final String PREF_PASSWORD_ANSWER = "password_answer";
final String PREF_RATE_DISMISSED = "rate_dismissed";
final String PREF_LAUNCH_COUNT = "launch_count";
final String PREF_FIRST_LAUNCH = "first_launch";
final String PREF_KEEP_CHECKED = "keep_checked";
final String PREF_KEEP_CHECKMARKS = "show_checkmarks";
final String PREF_INSTRUCTIONS_PREFIX = "tour_";
final String PREF_EXPANDED_VIEW = "expanded_view";
final String EXPORT_FILE_NAME = TAG;
final String MIME_TYPE_IMAGE = "image/jpeg";
final String MIME_TYPE_AUDIO = "audio/3gp";
final String MIME_TYPE_VIDEO = "video/mp4";
final String MIME_TYPE_IMAGE_EXT = ".jpeg";
final String MIME_TYPE_AUDIO_EXT = ".3gp";
final String MIME_TYPE_VIDEO_EXT = ".mp4";
final int ERROR_NOTE_NOT_DELETED = -1;
final int ERROR_ATTACHMENTS_NOT_DELETED = -2;
final String SECURITY_ALGORITHM = "MD5";
final String TIMESTAMP_NEVER = "13910051406040"; // I really don't believe we'll reach 10/17/2410 1:10:06 AM
} |
<<<<<<<
import org.apache.commons.lang.StringUtils;
import java.io.File;
import java.io.IOException;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Collections;
import java.util.List;
=======
>>>>>>>
import java.io.File;
import java.io.IOException;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Collections;
import java.util.List; |
<<<<<<<
import at.orz.arangodb.entity.AdminLogEntity;
import at.orz.arangodb.entity.ArangoUnixTime;
import at.orz.arangodb.entity.ArangoVersion;
import at.orz.arangodb.entity.BooleanResultEntity;
import at.orz.arangodb.entity.CollectionEntity;
import at.orz.arangodb.entity.CollectionKeyOption;
import at.orz.arangodb.entity.CollectionType;
import at.orz.arangodb.entity.CollectionsEntity;
import at.orz.arangodb.entity.CursorEntity;
import at.orz.arangodb.entity.DatabaseEntity;
import at.orz.arangodb.entity.DefaultEntity;
import at.orz.arangodb.entity.DeletedEntity;
import at.orz.arangodb.entity.Direction;
import at.orz.arangodb.entity.DocumentEntity;
import at.orz.arangodb.entity.DocumentResultEntity;
import at.orz.arangodb.entity.EdgeDefinitionEntity;
import at.orz.arangodb.entity.EdgeDefinitionsEntity;
import at.orz.arangodb.entity.EdgeEntity;
import at.orz.arangodb.entity.Endpoint;
import at.orz.arangodb.entity.ExplainEntity;
import at.orz.arangodb.entity.FilterCondition;
import at.orz.arangodb.entity.GraphEntity;
import at.orz.arangodb.entity.GraphsEntity;
import at.orz.arangodb.entity.ImportResultEntity;
import at.orz.arangodb.entity.IndexEntity;
import at.orz.arangodb.entity.IndexType;
import at.orz.arangodb.entity.IndexesEntity;
import at.orz.arangodb.entity.Policy;
import at.orz.arangodb.entity.ReplicationApplierConfigEntity;
import at.orz.arangodb.entity.ReplicationApplierStateEntity;
import at.orz.arangodb.entity.ReplicationInventoryEntity;
import at.orz.arangodb.entity.ReplicationLoggerConfigEntity;
import at.orz.arangodb.entity.ReplicationLoggerStateEntity;
import at.orz.arangodb.entity.ReplicationSyncEntity;
import at.orz.arangodb.entity.RestrictType;
import at.orz.arangodb.entity.ScalarExampleEntity;
import at.orz.arangodb.entity.SimpleByResultEntity;
import at.orz.arangodb.entity.StatisticsDescriptionEntity;
import at.orz.arangodb.entity.StatisticsEntity;
import at.orz.arangodb.entity.StringsResultEntity;
import at.orz.arangodb.entity.UserEntity;
=======
import at.orz.arangodb.entity.*;
>>>>>>>
import at.orz.arangodb.entity.AdminLogEntity;
import at.orz.arangodb.entity.ArangoUnixTime;
import at.orz.arangodb.entity.ArangoVersion;
import at.orz.arangodb.entity.BooleanResultEntity;
import at.orz.arangodb.entity.CollectionEntity;
import at.orz.arangodb.entity.CollectionKeyOption;
import at.orz.arangodb.entity.CollectionType;
import at.orz.arangodb.entity.CollectionsEntity;
import at.orz.arangodb.entity.CursorEntity;
import at.orz.arangodb.entity.DatabaseEntity;
import at.orz.arangodb.entity.DefaultEntity;
import at.orz.arangodb.entity.DeletedEntity;
import at.orz.arangodb.entity.Direction;
import at.orz.arangodb.entity.DocumentEntity;
import at.orz.arangodb.entity.DocumentResultEntity;
import at.orz.arangodb.entity.EdgeDefinitionEntity;
import at.orz.arangodb.entity.EdgeDefinitionsEntity;
import at.orz.arangodb.entity.EdgeEntity;
import at.orz.arangodb.entity.Endpoint;
import at.orz.arangodb.entity.FilterCondition;
import at.orz.arangodb.entity.GraphEntity;
import at.orz.arangodb.entity.GraphsEntity;
import at.orz.arangodb.entity.ImportResultEntity;
import at.orz.arangodb.entity.IndexEntity;
import at.orz.arangodb.entity.IndexType;
import at.orz.arangodb.entity.IndexesEntity;
import at.orz.arangodb.entity.Policy;
import at.orz.arangodb.entity.ReplicationApplierConfigEntity;
import at.orz.arangodb.entity.ReplicationApplierStateEntity;
import at.orz.arangodb.entity.ReplicationInventoryEntity;
import at.orz.arangodb.entity.ReplicationLoggerConfigEntity;
import at.orz.arangodb.entity.ReplicationLoggerStateEntity;
import at.orz.arangodb.entity.ReplicationSyncEntity;
import at.orz.arangodb.entity.RestrictType;
import at.orz.arangodb.entity.ScalarExampleEntity;
import at.orz.arangodb.entity.SimpleByResultEntity;
import at.orz.arangodb.entity.StatisticsDescriptionEntity;
import at.orz.arangodb.entity.StatisticsEntity;
import at.orz.arangodb.entity.StringsResultEntity;
import at.orz.arangodb.entity.UserEntity;
import at.orz.arangodb.entity.*; |
<<<<<<<
=======
>>>>>>> |
<<<<<<<
/**
* Must be invoked in {@code Activity.onRequestPermissionsResult}
* <p>
* The method will find the pending requests and emit the response to the
* matching observables.
*/
=======
>>>>>>> |
<<<<<<<
// Allow an existing file to be selected under MODE_NEW_FILE
public static final String KEY_ALLOW_EXISTING_FILE = "KEY_ALLOW_EXISTING_FILE";
=======
// If file can be selected by clicking only and checkboxes are not visible
public static final String KEY_SINGLE_CLICK = "KEY_SINGLE_CLICK";
>>>>>>>
// Allow an existing file to be selected under MODE_NEW_FILE
public static final String KEY_ALLOW_EXISTING_FILE = "KEY_ALLOW_EXISTING_FILE";
// If file can be selected by clicking only and checkboxes are not visible
public static final String KEY_SINGLE_CLICK = "KEY_SINGLE_CLICK";
<<<<<<<
protected boolean allowExistingFile = true;
=======
protected boolean singleClick = false;
>>>>>>>
protected boolean allowExistingFile = true;
protected boolean singleClick = false;
<<<<<<<
final boolean allowMultiple, final boolean allowDirCreate,
final boolean allowExistingFile) {
// Validate some assumptions so users don't get surprised (or get surprised early)
if (mode == MODE_NEW_FILE && allowMultiple) {
throw new IllegalArgumentException(
"MODE_NEW_FILE does not support 'allowMultiple'");
}
=======
final boolean allowMultiple, final boolean allowDirCreate, boolean singleClick) {
>>>>>>>
final boolean allowMultiple, final boolean allowDirCreate,
final boolean allowExistingFile, final boolean singleClick) {
// Validate some assumptions so users don't get surprised (or get surprised early)
if (mode == MODE_NEW_FILE && allowMultiple) {
throw new IllegalArgumentException(
"MODE_NEW_FILE does not support 'allowMultiple'");
}
<<<<<<<
b.putBoolean(KEY_ALLOW_EXISTING_FILE, allowExistingFile);
=======
b.putBoolean(KEY_SINGLE_CLICK, singleClick);
>>>>>>>
b.putBoolean(KEY_ALLOW_EXISTING_FILE, allowExistingFile);
b.putBoolean(KEY_SINGLE_CLICK, singleClick);
<<<<<<<
allowExistingFile = savedInstanceState
.getBoolean(KEY_ALLOW_EXISTING_FILE, allowExistingFile);
=======
singleClick = savedInstanceState
.getBoolean(KEY_SINGLE_CLICK, singleClick);
>>>>>>>
allowExistingFile = savedInstanceState
.getBoolean(KEY_ALLOW_EXISTING_FILE, allowExistingFile);
singleClick = savedInstanceState
.getBoolean(KEY_SINGLE_CLICK, singleClick);
<<<<<<<
allowExistingFile = getArguments()
.getBoolean(KEY_ALLOW_EXISTING_FILE, allowExistingFile);
=======
singleClick = getArguments()
.getBoolean(KEY_SINGLE_CLICK, singleClick);
>>>>>>>
allowExistingFile = getArguments()
.getBoolean(KEY_ALLOW_EXISTING_FILE, allowExistingFile);
singleClick = getArguments()
.getBoolean(KEY_SINGLE_CLICK, singleClick);
<<<<<<<
setModeView();
refresh();
=======
if (singleClick) {
getActivity().findViewById(R.id.nnf_button_ok).setVisibility(View.GONE);
}
// If still null
if (mCurrentPath == null) {
mCurrentPath = getRoot();
}
refresh(mCurrentPath);
>>>>>>>
setModeView();
// If still null
if (mCurrentPath == null) {
mCurrentPath = getRoot();
}
refresh(mCurrentPath); |
<<<<<<<
Call<ResponseBody> responseDatetime(@Header("scenario") String scenario);
=======
Response responseDatetime(@Header("scenario") String scenario) throws ServiceException;
@POST("/header/response/prim/datetime")
void responseDatetimeAsync(@Header("scenario") String scenario, ServiceResponseCallback cb);
@POST("/header/param/prim/duration")
Response paramDuration(@Header("scenario") String scenario, @Header("value") Period value) throws ServiceException;
@POST("/header/param/prim/duration")
void paramDurationAsync(@Header("scenario") String scenario, @Header("value") Period value, ServiceResponseCallback cb);
@POST("/header/response/prim/duration")
Response responseDuration(@Header("scenario") String scenario) throws ServiceException;
@POST("/header/response/prim/duration")
void responseDurationAsync(@Header("scenario") String scenario, ServiceResponseCallback cb);
@POST("/header/param/prim/byte")
Response paramByte(@Header("scenario") String scenario, @Header("value") String value) throws ServiceException;
>>>>>>>
Call<ResponseBody> responseDatetime(@Header("scenario") String scenario);
@POST("/header/param/prim/duration")
Call<ResponseBody> paramDuration(@Header("scenario") String scenario, @Header("value") Period value);
@POST("/header/response/prim/duration")
Call<ResponseBody> responseDuration(@Header("scenario") String scenario);
<<<<<<<
=======
* Send a post request with header values "scenario": "positive", "value": 1 or "scenario": "negative", "value": -2
>>>>>>>
* Send a post request with header values "scenario": "positive", "value": 1 or "scenario": "negative", "value": -2
<<<<<<<
=======
* Send a post request with header values "scenario": "positive", "value": 1 or "scenario": "negative", "value": -2
>>>>>>>
* Send a post request with header values "scenario": "positive", "value": 1 or "scenario": "negative", "value": -2
<<<<<<<
=======
* Send a post request with header values "scenario": "positive", "value": 105 or "scenario": "negative", "value": -2
>>>>>>>
* Send a post request with header values "scenario": "positive", "value": 105 or "scenario": "negative", "value": -2
<<<<<<<
=======
* Send a post request with header values "scenario": "positive", "value": 105 or "scenario": "negative", "value": -2
>>>>>>>
* Send a post request with header values "scenario": "positive", "value": 105 or "scenario": "negative", "value": -2
<<<<<<<
=======
* Send a post request with header values "scenario": "positive", "value": 0.07 or "scenario": "negative", "value": -3.0
>>>>>>>
* Send a post request with header values "scenario": "positive", "value": 0.07 or "scenario": "negative", "value": -3.0
<<<<<<<
=======
* Send a post request with header values "scenario": "positive", "value": 0.07 or "scenario": "negative", "value": -3.0
>>>>>>>
* Send a post request with header values "scenario": "positive", "value": 0.07 or "scenario": "negative", "value": -3.0
<<<<<<<
=======
* Send a post request with header values "scenario": "positive", "value": 7e120 or "scenario": "negative", "value": -3.0
>>>>>>>
* Send a post request with header values "scenario": "positive", "value": 7e120 or "scenario": "negative", "value": -3.0
<<<<<<<
=======
* Send a post request with header values "scenario": "positive", "value": 7e120 or "scenario": "negative", "value": -3.0
>>>>>>>
* Send a post request with header values "scenario": "positive", "value": 7e120 or "scenario": "negative", "value": -3.0
<<<<<<<
=======
* Send a post request with header values "scenario": "true", "value": true or "scenario": "false", "value": false
>>>>>>>
* Send a post request with header values "scenario": "true", "value": true or "scenario": "false", "value": false
<<<<<<<
=======
* Send a post request with header values "scenario": "true", "value": true or "scenario": "false", "value": false
>>>>>>>
* Send a post request with header values "scenario": "true", "value": true or "scenario": "false", "value": false
<<<<<<<
=======
* Send a post request with header values "scenario": "valid", "value": "The quick brown fox jumps over the lazy dog" or "scenario": "null", "value": null or "scenario": "empty", "value": ""
>>>>>>>
* Send a post request with header values "scenario": "valid", "value": "The quick brown fox jumps over the lazy dog" or "scenario": "null", "value": null or "scenario": "empty", "value": ""
<<<<<<<
=======
* Send a post request with header values "scenario": "valid", "value": "The quick brown fox jumps over the lazy dog" or "scenario": "null", "value": null or "scenario": "empty", "value": ""
>>>>>>>
* Send a post request with header values "scenario": "valid", "value": "The quick brown fox jumps over the lazy dog" or "scenario": "null", "value": null or "scenario": "empty", "value": ""
<<<<<<<
=======
* Get a response with header values "The quick brown fox jumps over the lazy dog" or null or ""
>>>>>>>
* Get a response with header values "The quick brown fox jumps over the lazy dog" or null or ""
<<<<<<<
=======
* Get a response with header values "The quick brown fox jumps over the lazy dog" or null or ""
>>>>>>>
* Get a response with header values "The quick brown fox jumps over the lazy dog" or null or ""
<<<<<<<
=======
* Send a post request with header values "scenario": "valid", "value": "2010-01-01" or "scenario": "min", "value": "0001-01-01"
>>>>>>>
* Send a post request with header values "scenario": "valid", "value": "2010-01-01" or "scenario": "min", "value": "0001-01-01"
<<<<<<<
=======
* Send a post request with header values "scenario": "valid", "value": "2010-01-01" or "scenario": "min", "value": "0001-01-01"
>>>>>>>
* Send a post request with header values "scenario": "valid", "value": "2010-01-01" or "scenario": "min", "value": "0001-01-01"
<<<<<<<
=======
* Send a post request with header values "scenario": "valid", "value": "2010-01-01T12:34:56Z" or "scenario": "min", "value": "0001-01-01T00:00:00Z"
>>>>>>>
* Send a post request with header values "scenario": "valid", "value": "2010-01-01T12:34:56Z" or "scenario": "min", "value": "0001-01-01T00:00:00Z"
<<<<<<<
=======
* Send a post request with header values "scenario": "valid", "value": "2010-01-01T12:34:56Z" or "scenario": "min", "value": "0001-01-01T00:00:00Z"
>>>>>>>
* Send a post request with header values "scenario": "valid", "value": "2010-01-01T12:34:56Z" or "scenario": "min", "value": "0001-01-01T00:00:00Z"
<<<<<<<
=======
* Get a response with header values "2010-01-01T12:34:56Z" or "0001-01-01T00:00:00Z"
>>>>>>>
* Get a response with header values "2010-01-01T12:34:56Z" or "0001-01-01T00:00:00Z"
<<<<<<<
=======
* Get a response with header values "2010-01-01T12:34:56Z" or "0001-01-01T00:00:00Z"
>>>>>>>
* Get a response with header values "2010-01-01T12:34:56Z" or "0001-01-01T00:00:00Z"
<<<<<<<
=======
* Send a post request with header values "scenario": "valid", "value": "P123DT22H14M12.011S"
*
* @param scenario Send a post request with header values "scenario": "valid"
* @param value Send a post request with header values "P123DT22H14M12.011S"
* @throws ServiceException the exception wrapped in ServiceException if failed.
*/
void paramDuration(String scenario, Period value) throws ServiceException;
/**
* Send a post request with header values "scenario": "valid", "value": "P123DT22H14M12.011S"
*
* @param scenario Send a post request with header values "scenario": "valid"
* @param value Send a post request with header values "P123DT22H14M12.011S"
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
*/
void paramDurationAsync(String scenario, Period value, final ServiceCallback<Void> serviceCallback);
/**
* Get a response with header values "P123DT22H14M12.011S"
*
* @param scenario Send a post request with header values "scenario": "valid"
* @throws ServiceException the exception wrapped in ServiceException if failed.
*/
void responseDuration(String scenario) throws ServiceException;
/**
* Get a response with header values "P123DT22H14M12.011S"
*
* @param scenario Send a post request with header values "scenario": "valid"
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
*/
void responseDurationAsync(String scenario, final ServiceCallback<Void> serviceCallback);
/**
* Send a post request with header values "scenario": "valid", "value": "啊齄丂狛狜隣郎隣兀﨩"
>>>>>>>
* Send a post request with header values "scenario": "valid", "value": "P123DT22H14M12.011S"
*
* @param scenario Send a post request with header values "scenario": "valid"
* @param value Send a post request with header values "P123DT22H14M12.011S"
* @throws ServiceException the exception wrapped in ServiceException if failed.
*/
void paramDuration(String scenario, Period value) throws ServiceException;
/**
* Send a post request with header values "scenario": "valid", "value": "P123DT22H14M12.011S"
*
* @param scenario Send a post request with header values "scenario": "valid"
* @param value Send a post request with header values "P123DT22H14M12.011S"
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @return the {@link Call} object
*/
Call<ResponseBody> paramDurationAsync(String scenario, Period value, final ServiceCallback<Void> serviceCallback);
/**
* Get a response with header values "P123DT22H14M12.011S"
*
* @param scenario Send a post request with header values "scenario": "valid"
* @throws ServiceException the exception wrapped in ServiceException if failed.
*/
void responseDuration(String scenario) throws ServiceException;
/**
* Get a response with header values "P123DT22H14M12.011S"
*
* @param scenario Send a post request with header values "scenario": "valid"
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @return the {@link Call} object
*/
Call<ResponseBody> responseDurationAsync(String scenario, final ServiceCallback<Void> serviceCallback);
/**
* Send a post request with header values "scenario": "valid", "value": "啊齄丂狛狜隣郎隣兀﨩"
<<<<<<<
=======
* Send a post request with header values "scenario": "valid", "value": "啊齄丂狛狜隣郎隣兀﨩"
>>>>>>>
* Send a post request with header values "scenario": "valid", "value": "啊齄丂狛狜隣郎隣兀﨩"
<<<<<<<
=======
* Send a post request with header values "scenario": "valid", "value": "GREY" or "scenario": "null", "value": null
>>>>>>>
* Send a post request with header values "scenario": "valid", "value": "GREY" or "scenario": "null", "value": null
<<<<<<<
=======
* Send a post request with header values "scenario": "valid", "value": "GREY" or "scenario": "null", "value": null
>>>>>>>
* Send a post request with header values "scenario": "valid", "value": "GREY" or "scenario": "null", "value": null
<<<<<<<
=======
* Send x-ms-client-request-id = 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0 in the header of the request
>>>>>>>
* Send x-ms-client-request-id = 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0 in the header of the request
<<<<<<<
=======
* Send x-ms-client-request-id = 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0 in the header of the request
>>>>>>>
* Send x-ms-client-request-id = 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0 in the header of the request |
<<<<<<<
import com.microsoft.azure.management.resources.fluentcore.utils.Utils;
import com.microsoft.rest.ServiceCall;
import com.microsoft.rest.ServiceCallback;
=======
import com.microsoft.azure.management.resources.implementation.ResourceManager;
>>>>>>>
import com.microsoft.azure.management.resources.fluentcore.utils.Utils;
import com.microsoft.rest.ServiceCall;
import com.microsoft.rest.ServiceCallback;
import com.microsoft.azure.management.resources.implementation.ResourceManager;
<<<<<<<
public AvailabilitySetImpl create() throws Exception {
super.creatablesCreate();
return this;
}
@Override
public ServiceCall createAsync(ServiceCallback<AvailabilitySet> callback) {
return super.creatablesCreateAsync(Utils.toVoidCallback(this, callback));
}
@Override
public AvailabilitySetImpl update() throws Exception {
return this;
}
@Override
=======
>>>>>>> |
<<<<<<<
boolean allowExistingFile,
=======
boolean singleClick,
>>>>>>>
boolean allowExistingFile,
boolean singleClick,
<<<<<<<
fragment.setArgs(startPath, mode, allowMultiple, allowCreateDir, allowExistingFile);
=======
fragment.setArgs(startPath, mode, allowMultiple, allowCreateDir, singleClick);
>>>>>>>
fragment.setArgs(startPath, mode, allowMultiple, allowCreateDir,
allowExistingFile, singleClick); |
<<<<<<<
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.n52.iceland.coding.encode.EncoderKey;
import org.n52.iceland.exception.ows.NoApplicableCodeException;
import org.n52.iceland.exception.ows.OwsExceptionReport;
import org.n52.iceland.exception.ows.concrete.UnsupportedEncoderInputException;
import org.n52.iceland.ogc.gml.GmlConstants;
import org.n52.iceland.ogc.om.OmConstants;
import org.n52.iceland.ogc.ows.OWSConstants.HelperValues;
import org.n52.iceland.ogc.sos.ConformanceClasses;
import org.n52.iceland.ogc.sos.Sos2Constants;
import org.n52.iceland.ogc.sos.SosConstants;
import org.n52.iceland.ogc.swe.SweConstants;
import org.n52.iceland.service.ServiceConstants.SupportedType;
import org.n52.iceland.util.StringHelper;
import org.n52.iceland.util.http.MediaType;
import org.n52.iceland.w3c.SchemaLocation;
import org.n52.sos.coding.encode.EncodingValues;
=======
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
>>>>>>>
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.n52.iceland.coding.encode.EncoderKey;
import org.n52.iceland.exception.ows.NoApplicableCodeException;
import org.n52.iceland.exception.ows.OwsExceptionReport;
import org.n52.iceland.exception.ows.concrete.UnsupportedEncoderInputException;
import org.n52.iceland.ogc.om.OmConstants;
import org.n52.iceland.ogc.ows.OWSConstants.HelperValues;
import org.n52.iceland.ogc.sos.ConformanceClasses;
import org.n52.iceland.ogc.sos.Sos2Constants;
import org.n52.iceland.ogc.sos.SosConstants;
import org.n52.iceland.ogc.swe.SweConstants;
import org.n52.iceland.service.ServiceConstants.SupportedType;
import org.n52.iceland.util.StringHelper;
import org.n52.iceland.util.http.MediaType;
import org.n52.iceland.w3c.SchemaLocation;
import org.n52.sos.coding.encode.EncodingValues;
<<<<<<<
=======
import org.n52.sos.exception.ows.NoApplicableCodeException;
import org.n52.sos.exception.ows.concrete.UnsupportedEncoderInputException;
>>>>>>>
<<<<<<<
=======
import org.n52.sos.ogc.om.values.UnknownValue;
import org.n52.sos.ogc.om.values.visitor.ValueVisitor;
import org.n52.sos.ogc.ows.OwsExceptionReport;
>>>>>>>
import org.n52.sos.ogc.om.values.UnknownValue;
import org.n52.sos.ogc.om.values.visitor.ValueVisitor;
<<<<<<<
import org.n52.sos.util.XmlOptionsHelper;
=======
import org.n52.sos.util.http.MediaType;
import org.n52.sos.w3c.SchemaLocation;
>>>>>>>
<<<<<<<
/**
* @since 4.0.0
*
*/
=======
>>>>>>>
/**
* @since 4.0.0
*
*/
<<<<<<<
private static final Set<String> CONFORMANCE_CLASSES = Sets.newHashSet(
ConformanceClasses.OM_V2_MEASUREMENT,
ConformanceClasses.OM_V2_CATEGORY_OBSERVATION,
ConformanceClasses.OM_V2_COUNT_OBSERVATION,
ConformanceClasses.OM_V2_TRUTH_OBSERVATION,
ConformanceClasses.OM_V2_GEOMETRY_OBSERVATION,
ConformanceClasses.OM_V2_TEXT_OBSERVATION);
=======
private static final Set<String> CONFORMANCE_CLASSES = Sets.newHashSet(ConformanceClasses.OM_V2_MEASUREMENT,
ConformanceClasses.OM_V2_CATEGORY_OBSERVATION, ConformanceClasses.OM_V2_COUNT_OBSERVATION,
ConformanceClasses.OM_V2_TRUTH_OBSERVATION, ConformanceClasses.OM_V2_GEOMETRY_OBSERVATION,
ConformanceClasses.OM_V2_TEXT_OBSERVATION, ConformanceClasses.OM_V2_COMPLEX_OBSERVATION);
>>>>>>>
private static final Set<String> CONFORMANCE_CLASSES = Sets.newHashSet(
ConformanceClasses.OM_V2_MEASUREMENT,
ConformanceClasses.OM_V2_CATEGORY_OBSERVATION,
ConformanceClasses.OM_V2_COUNT_OBSERVATION,
ConformanceClasses.OM_V2_TRUTH_OBSERVATION,
ConformanceClasses.OM_V2_GEOMETRY_OBSERVATION,
ConformanceClasses.OM_V2_TEXT_OBSERVATION, ConformanceClasses.OM_V2_COMPLEX_OBSERVATION);
<<<<<<<
private XmlObject createSingleObservationToResult(SingleObservationValue<?> observationValue) throws OwsExceptionReport {
final String observationType;
if (observationValue.isSetObservationType()) {
observationType = observationValue.getObservationType();
} else {
observationType = OMHelper.getObservationTypeFor(observationValue.getValue());
=======
private XmlObject createSingleObservationToResult(final SingleObservationValue<?> observationValue) throws OwsExceptionReport {
final String observationType;
if (observationValue.isSetObservationType()) {
observationType = observationValue.getObservationType();
} else {
observationType = OMHelper.getObservationTypeFor(observationValue.getValue());
}
if (observationType.equals(OmConstants.OBS_TYPE_SWE_ARRAY_OBSERVATION)) {
SweDataArray dataArray = SweHelper.createSosSweDataArray(observationValue);
Map<HelperValues, String> additionalValues = new EnumMap<>(SosConstants.HelperValues.class);
additionalValues.put(HelperValues.FOR_OBSERVATION, null);
return encodeSWE(dataArray, additionalValues);
}
return observationValue.getValue().accept(new ResultValueVisitor(observationType, observationValue.getObservationID()));
}
private XmlObject createMultiObservationValueToResult(MultiObservationValues<?> observationValue) throws OwsExceptionReport {
// TODO create SosSweDataArray
SweDataArray dataArray = SweHelper.createSosSweDataArray(observationValue);
Map<HelperValues, String> additionalValues = new EnumMap<>(SosConstants.HelperValues.class);
additionalValues.put(HelperValues.FOR_OBSERVATION, null);
Object encodedObj = CodingHelper.encodeObjectToXml(SweConstants.NS_SWE_20, dataArray, additionalValues);
if (encodedObj instanceof XmlObject) {
return (XmlObject) encodedObj;
} else {
throw new NoApplicableCodeException().withMessage(
"Encoding of observation value of type \"%s\" failed. Result: %s",
observationValue.getValue() != null ? observationValue.getValue().getClass().getName()
: observationValue.getValue(), encodedObj != null ? encodedObj.getClass().getName()
: encodedObj);
}
}
protected static XmlObject encodeSWE(Object o) throws OwsExceptionReport {
return CodingHelper.encodeObjectToXml(SweConstants.NS_SWE_20, o);
}
protected static XmlObject encodeSWE(Object o, Map<HelperValues, String> additionalValues) throws OwsExceptionReport {
return CodingHelper.encodeObjectToXml(SweConstants.NS_SWE_20, o, additionalValues);
}
protected static XmlString createXmlString() {
return XmlString.Factory.newInstance(getXmlOptions());
}
protected static XmlInteger createXmlInteger() {
return XmlInteger.Factory.newInstance(getXmlOptions());
}
protected static XmlBoolean createXmlBoolean() {
return XmlBoolean.Factory.newInstance(getXmlOptions());
}
private static class ResultValueVisitor implements ValueVisitor<XmlObject> {
private final String observationType;
private final String observationId;
ResultValueVisitor(String observationType,
String observationId) {
this.observationType = observationType;
this.observationId = observationId;
>>>>>>>
private XmlObject createSingleObservationToResult(final SingleObservationValue<?> observationValue) throws OwsExceptionReport {
final String observationType;
if (observationValue.isSetObservationType()) {
observationType = observationValue.getObservationType();
} else {
observationType = OMHelper.getObservationTypeFor(observationValue.getValue());
}
if (observationType.equals(OmConstants.OBS_TYPE_SWE_ARRAY_OBSERVATION)) {
SweDataArray dataArray = SweHelper.createSosSweDataArray(observationValue);
Map<HelperValues, String> additionalValues = new EnumMap<>(SosConstants.HelperValues.class);
additionalValues.put(HelperValues.FOR_OBSERVATION, null);
return encodeSWE(dataArray, additionalValues);
}
return observationValue.getValue().accept(new ResultValueVisitor(observationType, observationValue.getObservationID()));
}
private XmlObject createMultiObservationValueToResult(MultiObservationValues<?> observationValue) throws OwsExceptionReport {
// TODO create SosSweDataArray
SweDataArray dataArray = SweHelper.createSosSweDataArray(observationValue);
Map<HelperValues, String> additionalValues = new EnumMap<>(SosConstants.HelperValues.class);
additionalValues.put(HelperValues.FOR_OBSERVATION, null);
Object encodedObj = CodingHelper.encodeObjectToXml(SweConstants.NS_SWE_20, dataArray, additionalValues);
if (encodedObj instanceof XmlObject) {
return (XmlObject) encodedObj;
} else {
throw new NoApplicableCodeException().withMessage(
"Encoding of observation value of type \"%s\" failed. Result: %s",
observationValue.getValue() != null ? observationValue.getValue().getClass().getName()
: observationValue.getValue(), encodedObj != null ? encodedObj.getClass().getName()
: encodedObj);
}
}
protected static XmlObject encodeSWE(Object o) throws OwsExceptionReport {
return CodingHelper.encodeObjectToXml(SweConstants.NS_SWE_20, o);
}
protected static XmlObject encodeSWE(Object o, Map<HelperValues, String> additionalValues) throws OwsExceptionReport {
return CodingHelper.encodeObjectToXml(SweConstants.NS_SWE_20, o, additionalValues);
}
protected XmlString createXmlString() {
return XmlString.Factory.newInstance(getXmlOptions());
}
protected XmlInteger createXmlInteger() {
return XmlInteger.Factory.newInstance(getXmlOptions());
}
protected XmlBoolean createXmlBoolean() {
return XmlBoolean.Factory.newInstance(getXmlOptions());
}
private class ResultValueVisitor implements ValueVisitor<XmlObject> {
private final String observationType;
private final String observationId;
ResultValueVisitor(String observationType,
String observationId) {
this.observationType = observationType;
this.observationId = observationId; |
<<<<<<<
assertEquals("com.microsoft.rest.v2.SwaggerMethodParserTests$TestInterface2.testMethod2", methodParser.fullyQualifiedMethodName());
assertEquals(null, methodParser.httpMethod());
=======
assertEquals("com.microsoft.rest.v2.SwaggerMethodParserTests.TestInterface2.testMethod2", methodParser.fullyQualifiedMethodName());
assertEquals("PATCH", methodParser.httpMethod());
>>>>>>>
assertEquals("com.microsoft.rest.v2.SwaggerMethodParserTests$TestInterface2.testMethod2", methodParser.fullyQualifiedMethodName());
assertEquals("PATCH", methodParser.httpMethod());
<<<<<<<
assertEquals("com.microsoft.rest.v2.SwaggerMethodParserTests$TestInterface3.testMethod3", methodParser.fullyQualifiedMethodName());
assertEquals(null, methodParser.httpMethod());
=======
assertEquals("com.microsoft.rest.v2.SwaggerMethodParserTests.TestInterface3.testMethod3", methodParser.fullyQualifiedMethodName());
assertEquals("PATCH", methodParser.httpMethod());
>>>>>>>
assertEquals("com.microsoft.rest.v2.SwaggerMethodParserTests$TestInterface3.testMethod3", methodParser.fullyQualifiedMethodName());
assertEquals("PATCH", methodParser.httpMethod()); |
<<<<<<<
import com.microsoft.azure.management.resources.fluentcore.utils.Utils;
import com.microsoft.rest.ServiceCall;
import com.microsoft.rest.ServiceCallback;
=======
import com.microsoft.azure.management.resources.implementation.ResourceManager;
>>>>>>>
import com.microsoft.azure.management.resources.fluentcore.utils.Utils;
import com.microsoft.rest.ServiceCall;
import com.microsoft.rest.ServiceCallback;
import com.microsoft.azure.management.resources.implementation.ResourceManager; |
<<<<<<<
Completable deallocateAsync();
=======
@Beta
Completable deallocateAsync() throws CloudException, IOException, InterruptedException;
>>>>>>>
@Beta
Completable deallocateAsync();
<<<<<<<
ServiceFuture<Void> deallocateAsync(ServiceCallback<Void> callback);
=======
@Beta
ServiceFuture<Void> deallocateAsync(ServiceCallback<Void> callback) throws CloudException, IOException, InterruptedException;
>>>>>>>
@Beta
ServiceFuture<Void> deallocateAsync(ServiceCallback<Void> callback);
<<<<<<<
Completable powerOffAsync();
=======
@Beta
Completable powerOffAsync() throws CloudException, IOException, InterruptedException;
>>>>>>>
@Beta
Completable powerOffAsync();
<<<<<<<
ServiceFuture<Void> powerOffAsync(ServiceCallback<Void> callback);
=======
@Beta
ServiceFuture<Void> powerOffAsync(ServiceCallback<Void> callback) throws CloudException, IOException, InterruptedException;
>>>>>>>
@Beta
ServiceFuture<Void> powerOffAsync(ServiceCallback<Void> callback);
<<<<<<<
Completable restartAsync();
=======
@Beta
Completable restartAsync() throws CloudException, IOException, InterruptedException;
>>>>>>>
@Beta
Completable restartAsync();
<<<<<<<
ServiceFuture<Void> restartAsync(ServiceCallback<Void> callback);
=======
@Beta
ServiceFuture<Void> restartAsync(ServiceCallback<Void> callback) throws CloudException, IOException, InterruptedException;
>>>>>>>
@Beta
ServiceFuture<Void> restartAsync(ServiceCallback<Void> callback);
<<<<<<<
Completable startAsync();
=======
@Beta
Completable startAsync() throws CloudException, IOException, InterruptedException;
>>>>>>>
@Beta
Completable startAsync();
<<<<<<<
ServiceFuture<Void> startAsync(ServiceCallback<Void> callback);
=======
@Beta
ServiceFuture<Void> startAsync(ServiceCallback<Void> callback) throws CloudException, IOException, InterruptedException;
>>>>>>>
@Beta
ServiceFuture<Void> startAsync(ServiceCallback<Void> callback);
<<<<<<<
Completable reimageAsync();
=======
@Beta
Completable reimageAsync() throws CloudException, IOException, InterruptedException;
>>>>>>>
@Beta
Completable reimageAsync();
<<<<<<<
ServiceFuture<Void> reimageAsync(ServiceCallback<Void> callback);
=======
@Beta
ServiceFuture<Void> reimageAsync(ServiceCallback<Void> callback) throws CloudException, IOException, InterruptedException;
>>>>>>>
@Beta
ServiceFuture<Void> reimageAsync(ServiceCallback<Void> callback); |
<<<<<<<
import com.microsoft.azure.credentials.ApplicationTokenCredentials;
=======
import com.microsoft.azure.management.compute.KnownWindowsVirtualMachineImage;
>>>>>>>
import com.microsoft.azure.credentials.ApplicationTokenCredentials;
import com.microsoft.azure.management.compute.KnownWindowsVirtualMachineImage; |
<<<<<<<
if (line.startsWith("@") && player.isInGroup(line.substring(1)))
return true;
if (line.equalsIgnoreCase(user))
=======
if (line.equalsIgnoreCase(user)) {
>>>>>>>
if (line.startsWith("@") && player.isInGroup(line.substring(1)))
return true;
if (line.equalsIgnoreCase(user)) {
<<<<<<<
if (line.startsWith("@") && player.isInGroup(line.substring(1)))
return true;
if (line.equalsIgnoreCase(user))
=======
if (line.equalsIgnoreCase(user)) {
>>>>>>>
if (line.startsWith("@") && player.isInGroup(line.substring(1)))
return true;
if (line.equalsIgnoreCase(user)) { |
<<<<<<<
void cancel(String resourceGroupName, String deploymentName) throws IOException, CloudException;
/**
* Filters deployments by a resource group.
*
* @param resourceGroup the resource group to filter by
* @return the instance for accessing deployments in a resource group
*/
InGroup resourceGroup(ResourceGroup resourceGroup);
/**
* Entry point to template deployment in a specific resource group.
*/
interface InGroup extends
SupportsListing<Deployment>,
SupportsGettingByName<Deployment>,
SupportsCreating<Deployment.DefinitionWithTemplate>,
SupportsDeleting {
/**
* Checks if a deployment exists in the resource group.
*
* @param deploymentName the deployment's name
* @return true if the deployment exists; false otherwise
* @throws IOException serialization failures
* @throws CloudException failures thrown from Azure
*/
boolean checkExistence(String deploymentName) throws IOException, CloudException;
}
=======
boolean checkExistence(String groupName, String deploymentName) throws IOException, CloudException;
>>>>>>>
void cancel(String resourceGroupName, String deploymentName) throws IOException, CloudException; |
<<<<<<<
final Class<?> returnType = methodParser.returnType();
if (returnType.equals(Void.TYPE) || methodParser.httpMethod().equalsIgnoreCase("HEAD")) {
=======
if (returnType.equals(Void.TYPE) || !response.hasBody() || methodDetails.httpMethod().equalsIgnoreCase("HEAD")) {
>>>>>>>
if (returnType.equals(Void.TYPE) || methodParser.httpMethod().equalsIgnoreCase("HEAD")) {
<<<<<<<
else {
final Single<? extends HttpResponse> asyncResponse = httpClient.sendRequestAsync(request);
final Class<?> methodReturnType = method.getReturnType();
if (methodReturnType.equals(Single.class)) {
result = asyncResponse.flatMap(new Func1<HttpResponse, Single<?>>() {
@Override
public Single<?> call(HttpResponse response) {
Single<?> asyncResult;
final Class<?> singleReturnType = methodParser.returnType();
if (methodParser.httpMethod().equalsIgnoreCase("HEAD")) {
asyncResult = Single.just(null);
} else if (singleReturnType.isAssignableFrom(InputStream.class)) {
asyncResult = response.bodyAsInputStreamAsync();
} else if (singleReturnType.isAssignableFrom(byte[].class)) {
asyncResult = response.bodyAsByteArrayAsync();
} else {
final Single<String> asyncResponseBodyString = response.bodyAsStringAsync();
asyncResult = asyncResponseBodyString.flatMap(new Func1<String, Single<Object>>() {
@Override
public Single<Object> call(String responseBodyString) {
try {
return Single.just(serializer.deserialize(responseBodyString, singleReturnType));
}
catch (IOException e) {
return Single.error(e);
}
}
});
}
return asyncResult;
}
});
}
else if (method.getReturnType().equals(Completable.class)) {
result = Completable.fromSingle(asyncResponse);
}
else if (method.getReturnType().equals(Observable.class)) {
result = asyncResponse.toObservable();
}
}
=======
>>>>>>>
<<<<<<<
final SwaggerInterfaceParser interfaceParser = new SwaggerInterfaceParser(swaggerInterface);
final RestProxy restProxy = new RestProxy(httpClient, serializer, interfaceParser);
=======
final String interfaceName = swaggerInterface.getCanonicalName();
final SwaggerInterfaceProxyDetails interfaceProxyDetails = new SwaggerInterfaceProxyDetails(interfaceName);
String host = null;
final Host hostAnnotation = swaggerInterface.getAnnotation(Host.class);
if (hostAnnotation != null) {
host = hostAnnotation.value();
}
final Method[] declaredMethods = swaggerInterface.getDeclaredMethods();
for (Method method : declaredMethods) {
final SwaggerMethodProxyDetails methodProxyDetails = interfaceProxyDetails.getMethodProxyDetails(method.getName());
if (method.isAnnotationPresent(GET.class)) {
methodProxyDetails.setMethodAndRelativePath("GET", method.getAnnotation(GET.class).value());
}
else if (method.isAnnotationPresent(PUT.class)) {
methodProxyDetails.setMethodAndRelativePath("PUT", method.getAnnotation(PUT.class).value());
}
else if (method.isAnnotationPresent(HEAD.class)) {
methodProxyDetails.setMethodAndRelativePath("HEAD", method.getAnnotation(HEAD.class).value());
}
else if (method.isAnnotationPresent(DELETE.class)) {
methodProxyDetails.setMethodAndRelativePath("DELETE", method.getAnnotation(DELETE.class).value());
}
else if (method.isAnnotationPresent(POST.class)) {
methodProxyDetails.setMethodAndRelativePath("POST", method.getAnnotation(POST.class).value());
}
else if (method.isAnnotationPresent(PATCH.class)) {
methodProxyDetails.setMethodAndRelativePath("PATCH", method.getAnnotation(PATCH.class).value());
}
if (method.isAnnotationPresent(Headers.class)) {
final Headers headersAnnotation = method.getAnnotation(Headers.class);
final String[] headers = headersAnnotation.value();
for (final String header : headers) {
final int colonIndex = header.indexOf(":");
if (colonIndex >= 0) {
final String headerName = header.substring(0, colonIndex).trim();
if (!headerName.isEmpty()) {
final String headerValue = header.substring(colonIndex + 1).trim();
if (!headerValue.isEmpty()) {
methodProxyDetails.addHeader(headerName, headerValue);
}
}
}
}
}
final Annotation[][] allParametersAnnotations = method.getParameterAnnotations();
for (int parameterIndex = 0; parameterIndex < allParametersAnnotations.length; ++parameterIndex) {
final Annotation[] parameterAnnotations = method.getParameterAnnotations()[parameterIndex];
for (final Annotation annotation : parameterAnnotations) {
final Type annotationType = annotation.annotationType();
if (annotationType.equals(HostParam.class)) {
final HostParam hostParamAnnotation = (HostParam) annotation;
methodProxyDetails.addHostSubstitution(hostParamAnnotation.value(), parameterIndex, !hostParamAnnotation.encoded());
}
else if (annotationType.equals(PathParam.class)) {
final PathParam pathParamAnnotation = (PathParam) annotation;
methodProxyDetails.addPathSubstitution(pathParamAnnotation.value(), parameterIndex, !pathParamAnnotation.encoded());
}
else if (annotationType.equals(QueryParam.class)) {
final QueryParam queryParamAnnotation = (QueryParam) annotation;
methodProxyDetails.addQuerySubstitution(queryParamAnnotation.value(), parameterIndex, !queryParamAnnotation.encoded());
}
else if (annotationType.equals(HeaderParam.class)) {
final HeaderParam headerParamAnnotation = (HeaderParam) annotation;
methodProxyDetails.addHeaderSubstitution(headerParamAnnotation.value(), parameterIndex);
}
else if (annotationType.equals(BodyParam.class)) {
methodProxyDetails.setBodyContentMethodParameterIndex(parameterIndex);
}
}
}
final Type returnType = method.getGenericReturnType();
methodProxyDetails.setReturnType(returnType);
}
RestProxy restProxy = new RestProxy(host, httpClient, serializer, interfaceProxyDetails);
>>>>>>>
final SwaggerInterfaceParser interfaceParser = new SwaggerInterfaceParser(swaggerInterface);
final RestProxy restProxy = new RestProxy(httpClient, serializer, interfaceParser); |
<<<<<<<
import com.microsoft.azure.serializer.AzureJacksonMapperAdapter;
import com.microsoft.rest.RestClient;
import com.microsoft.rest.serializer.JacksonMapperAdapter;
import okhttp3.OkHttpClient;
=======
import com.microsoft.azure.RestClient;
>>>>>>>
import com.microsoft.azure.serializer.AzureJacksonMapperAdapter;
import com.microsoft.azure.RestClient;
import com.microsoft.rest.serializer.JacksonMapperAdapter;
import okhttp3.OkHttpClient; |
<<<<<<<
import com.microsoft.windowsazure.services.media.implementation.content.AssetType;
import com.microsoft.windowsazure.services.media.models.AssetInfo;
=======
import com.microsoft.windowsazure.services.media.models.AssetInfo;
import com.microsoft.windowsazure.services.media.models.CreateAssetOptions;
import com.microsoft.windowsazure.services.media.models.ListAssetsOptions;
>>>>>>>
import com.microsoft.windowsazure.services.media.implementation.content.AssetType;
import com.microsoft.windowsazure.services.media.models.AssetInfo;
import com.microsoft.windowsazure.services.media.models.AssetInfo;
import com.microsoft.windowsazure.services.media.models.CreateAssetOptions;
import com.microsoft.windowsazure.services.media.models.ListAssetsOptions;
<<<<<<<
@Override
public AssetInfo createAsset(String name) throws ServiceException {
WebResource resource = getResource("Assets");
AssetType request = new AssetType();
request.setName(name);
return resource.type(MediaType.APPLICATION_ATOM_XML).accept(MediaType.APPLICATION_ATOM_XML)
.post(AssetInfo.class, request);
}
/* (non-Javadoc)
* @see com.microsoft.windowsazure.services.media.MediaContract#getAssets()
*/
@Override
public List<AssetInfo> getAssets() throws ServiceException {
WebResource resource = getResource("Assets");
return resource.type(MediaType.APPLICATION_ATOM_XML).accept(MediaType.APPLICATION_ATOM_XML)
.get(new GenericType<List<AssetInfo>>() {
});
}
=======
/* (non-Javadoc)
* @see com.microsoft.windowsazure.services.media.MediaContract#createAsset(java.lang.String)
*/
@Override
public AssetInfo createAsset(String assetName) {
CreateAssetOptions createAssetOptions = new CreateAssetOptions();
return createAsset(assetName, createAssetOptions);
}
/* (non-Javadoc)
* @see com.microsoft.windowsazure.services.media.MediaContract#createAsset(java.lang.String, com.microsoft.windowsazure.services.media.models.CreateAssetOptions)
*/
@Override
public AssetInfo createAsset(String assetName, CreateAssetOptions createAssetOptions) {
return null;
}
/* (non-Javadoc)
* @see com.microsoft.windowsazure.services.media.MediaContract#getAsset(java.lang.String)
*/
@Override
public AssetInfo getAsset(String assetId) {
return null;
}
/* (non-Javadoc)
* @see com.microsoft.windowsazure.services.media.MediaContract#listAssets(com.microsoft.windowsazure.services.media.models.ListAssetsOptions)
*/
@Override
public List<AssetInfo> listAssets(ListAssetsOptions listAssetsOptions) {
List<AssetInfo> listAssetsResult = new ArrayList<AssetInfo>();
return listAssetsResult;
}
/* (non-Javadoc)
* @see com.microsoft.windowsazure.services.media.MediaContract#listAssets()
*/
@Override
public List<AssetInfo> listAssets() {
ListAssetsOptions listAssetsOptions = new ListAssetsOptions();
return listAssets(listAssetsOptions);
}
/* (non-Javadoc)
* @see com.microsoft.windowsazure.services.media.MediaContract#updateAsset(com.microsoft.windowsazure.services.media.models.AssetInfo)
*/
@Override
public AssetInfo updateAsset(AssetInfo updatedAssetInfo) {
return null;
}
/* (non-Javadoc)
* @see com.microsoft.windowsazure.services.media.MediaContract#deleteAsset(java.lang.String)
*/
@Override
public void deleteAsset(String assetId) {
}
/* (non-Javadoc)
* @see com.microsoft.windowsazure.services.media.MediaContract#deleteAsset(com.microsoft.windowsazure.services.media.models.AssetInfo)
*/
@Override
public void deleteAsset(AssetInfo assetInfo) {
this.deleteAsset(assetInfo.getId());
}
/* (non-Javadoc)
* @see com.microsoft.windowsazure.services.media.MediaContract#createAsset(com.microsoft.windowsazure.services.media.models.AssetInfo)
*/
@Override
public AssetInfo createAsset(AssetInfo assetInfo) {
// TODO Auto-generated method stub
return null;
}
>>>>>>>
@Override
public AssetInfo createAsset(String name) throws ServiceException {
WebResource resource = getResource("Assets");
AssetType request = new AssetType();
request.setName(name);
return resource.type(MediaType.APPLICATION_ATOM_XML).accept(MediaType.APPLICATION_ATOM_XML)
.post(AssetInfo.class, request);
}
/* (non-Javadoc)
* @see com.microsoft.windowsazure.services.media.MediaContract#getAssets()
*/
@Override
public List<AssetInfo> getAssets() throws ServiceException {
WebResource resource = getResource("Assets");
return resource.type(MediaType.APPLICATION_ATOM_XML).accept(MediaType.APPLICATION_ATOM_XML)
.get(new GenericType<List<AssetInfo>>() {
});
}
/* (non-Javadoc)
* @see com.microsoft.windowsazure.services.media.MediaContract#createAsset(java.lang.String)
*/
@Override
public AssetInfo createAsset(String assetName) {
CreateAssetOptions createAssetOptions = new CreateAssetOptions();
return createAsset(assetName, createAssetOptions);
}
/* (non-Javadoc)
* @see com.microsoft.windowsazure.services.media.MediaContract#createAsset(java.lang.String, com.microsoft.windowsazure.services.media.models.CreateAssetOptions)
*/
@Override
public AssetInfo createAsset(String assetName, CreateAssetOptions createAssetOptions) {
return null;
}
/* (non-Javadoc)
* @see com.microsoft.windowsazure.services.media.MediaContract#getAsset(java.lang.String)
*/
@Override
public AssetInfo getAsset(String assetId) {
return null;
}
/* (non-Javadoc)
* @see com.microsoft.windowsazure.services.media.MediaContract#listAssets(com.microsoft.windowsazure.services.media.models.ListAssetsOptions)
*/
@Override
public List<AssetInfo> listAssets(ListAssetsOptions listAssetsOptions) {
List<AssetInfo> listAssetsResult = new ArrayList<AssetInfo>();
return listAssetsResult;
}
/* (non-Javadoc)
* @see com.microsoft.windowsazure.services.media.MediaContract#listAssets()
*/
@Override
public List<AssetInfo> listAssets() {
ListAssetsOptions listAssetsOptions = new ListAssetsOptions();
return listAssets(listAssetsOptions);
}
/* (non-Javadoc)
* @see com.microsoft.windowsazure.services.media.MediaContract#updateAsset(com.microsoft.windowsazure.services.media.models.AssetInfo)
*/
@Override
public AssetInfo updateAsset(AssetInfo updatedAssetInfo) {
return null;
}
/* (non-Javadoc)
* @see com.microsoft.windowsazure.services.media.MediaContract#deleteAsset(java.lang.String)
*/
@Override
public void deleteAsset(String assetId) {
}
/* (non-Javadoc)
* @see com.microsoft.windowsazure.services.media.MediaContract#deleteAsset(com.microsoft.windowsazure.services.media.models.AssetInfo)
*/
@Override
public void deleteAsset(AssetInfo assetInfo) {
this.deleteAsset(assetInfo.getId());
}
/* (non-Javadoc)
* @see com.microsoft.windowsazure.services.media.MediaContract#createAsset(com.microsoft.windowsazure.services.media.models.AssetInfo)
*/
@Override
public AssetInfo createAsset(AssetInfo assetInfo) {
// TODO Auto-generated method stub
return null;
} |
<<<<<<<
/** Currently not a documented return type. */
TRAVEL_AGENCY("travel_agency"),
=======
/** Currently not a documented return type. */
BEAUTY_SALON("beauty_salon"),
/** Currently not a documented return type. */
HAIR_CARE("hair_care"),
/** Currently not a documented return type. */
SPA("spa"),
/** Currently not a documented return type. */
SHOE_STORE("shoe_store"),
/** Currently not a documented return type. */
BAKERY("bakery"),
/** Currently not a documented return type. */
PHARMACY("pharmacy"),
/** Currently not a documented return type. */
SCHOOL("school"),
/** Currently not a documented return type. */
BOOK_STORE("book_store"),
/** Currently not a documented return type. */
DEPARTMENT_STORE("department_store"),
/** Currently not a documented return type. */
RESTAURANT("restaurant"),
/** Currently not a documented return type. */
REAL_ESTATE_AGENCY("real_estate_agency"),
/** Currently not a documented return type. */
BAR("bar"),
/** Currently not a documented return type. */
DOCTOR("doctor"),
/** Currently not a documented return type. */
HOSPITAL("hospital"),
/** Currently not a documented return type. */
FIRE_STATION("fire_station"),
/** Currently not a documented return type. */
SUPERMARKET("supermarket"),
>>>>>>>
/** Currently not a documented return type. */
TRAVEL_AGENCY("travel_agency"),
/** Currently not a documented return type. */
BEAUTY_SALON("beauty_salon"),
/** Currently not a documented return type. */
HAIR_CARE("hair_care"),
/** Currently not a documented return type. */
SPA("spa"),
/** Currently not a documented return type. */
SHOE_STORE("shoe_store"),
/** Currently not a documented return type. */
BAKERY("bakery"),
/** Currently not a documented return type. */
PHARMACY("pharmacy"),
/** Currently not a documented return type. */
SCHOOL("school"),
/** Currently not a documented return type. */
BOOK_STORE("book_store"),
/** Currently not a documented return type. */
DEPARTMENT_STORE("department_store"),
/** Currently not a documented return type. */
RESTAURANT("restaurant"),
/** Currently not a documented return type. */
REAL_ESTATE_AGENCY("real_estate_agency"),
/** Currently not a documented return type. */
BAR("bar"),
/** Currently not a documented return type. */
DOCTOR("doctor"),
/** Currently not a documented return type. */
HOSPITAL("hospital"),
/** Currently not a documented return type. */
FIRE_STATION("fire_station"),
/** Currently not a documented return type. */
SUPERMARKET("supermarket"), |
<<<<<<<
import com.microsoft.azure.management.network.NetworkSecurityGroups;
=======
import com.microsoft.azure.management.network.NetworkInterfaces;
>>>>>>>
import com.microsoft.azure.management.network.NetworkSecurityGroups;
import com.microsoft.azure.management.network.NetworkInterfaces; |
<<<<<<<
}
}
@Override
public void execute() throws Exception {
DAGNode<TaskItem<T>> nextNode = dag.getNext();
if (nextNode == null) {
return;
}
if (dag.isRootNode(nextNode)) {
executeRootTask(nextNode.data());
} else {
nextNode.data().execute(this, nextNode);
}
}
@Override
public ServiceCall executeAsync(final ServiceCallback<Void> callback) {
final DAGNode<TaskItem<T>> nextNode = dag.getNext();
if (nextNode == null) {
return null;
}
if (dag.isRootNode(nextNode)) {
return executeRootTaskAsync(nextNode.data(), callback);
} else {
return nextNode.data().executeAsync(this, nextNode, callback);
=======
DAGNode<U> nextNode = dag.getNext();
while (nextNode != null) {
if (dag.isRootNode(nextNode)) {
executeRootTask(nextNode.data());
} else {
// TaskGroupBase::execute will be called both in update and create
// scenarios, so run the task only if it not not executed already.
if (nextNode.data().result() == null) {
nextNode.data().execute();
}
}
dag.reportedCompleted(nextNode);
nextNode = dag.getNext();
}
>>>>>>>
}
}
@Override
public void execute() throws Exception {
DAGNode<TaskItem<T>> nextNode = dag.getNext();
if (nextNode == null) {
return;
}
if (dag.isRootNode(nextNode)) {
executeRootTask(nextNode.data());
} else {
// TaskGroupBase::execute will be called both in update and create
// scenarios, so run the task only if it not not executed already.
if (nextNode.data().result() == null) {
nextNode.data().execute(this, nextNode);
}
}
}
@Override
public ServiceCall executeAsync(final ServiceCallback<Void> callback) {
final DAGNode<TaskItem<T>> nextNode = dag.getNext();
if (nextNode == null) {
return null;
}
if (dag.isRootNode(nextNode)) {
return executeRootTaskAsync(nextNode.data(), callback);
} else {
// TaskGroupBase::execute will be called both in update and create
// scenarios, so run the task only if it not not executed already.
if (nextNode.data().result() == null) {
return nextNode.data().executeAsync(this, nextNode, callback);
} else {
return null;
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.