conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
=======
import com.google.common.collect.Lists;
>>>>>>>
<<<<<<<
import org.apache.isis.core.metamodel.adapter.concurrency.ConcurrencyChecking;
=======
import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager.ConcurrencyChecking;
import org.apache.isis.core.metamodel.deployment.DeploymentCategory;
import org.apache.isis.core.metamodel.spec.ObjectSpecId;
import org.apache.isis.core.metamodel.spec.ObjectSpecification;
>>>>>>>
import org.apache.isis.core.metamodel.adapter.concurrency.ConcurrencyChecking;
import org.apache.isis.core.metamodel.spec.ObjectSpecId;
import org.apache.isis.core.metamodel.spec.ObjectSpecification; |
<<<<<<<
import org.apache.isis.core.metamodel.facets.object.immutable.immutableannot.CopyImmutableFacetOntoMembersFactory;
=======
import org.apache.isis.core.metamodel.facets.object.immutable.immutablemarkerifc.ImmutableFacetMarkerInterfaceFactory;
import org.apache.isis.core.metamodel.facets.object.mask.annotation.MaskFacetOnTypeAnnotationFactory;
import org.apache.isis.core.metamodel.facets.object.maxlen.annotation.MaxLengthFacetOnTypeAnnotationFactory;
import org.apache.isis.core.metamodel.facets.object.membergroups.annotprop.MemberGroupLayoutFacetFactory;
>>>>>>>
import org.apache.isis.core.metamodel.facets.object.immutable.immutableannot.CopyImmutableFacetOntoMembersFactory;
<<<<<<<
import org.apache.isis.core.metamodel.facets.param.describedas.annotderived.DescribedAsFacetOnParameterAnnotationElseDerivedFromTypeFactory;
=======
>>>>>>>
<<<<<<<
import org.apache.isis.core.metamodel.facets.param.typicallen.fromtype.TypicalLengthFacetOnParameterDerivedFromTypeFacetFactory;
=======
import org.apache.isis.core.metamodel.facets.param.renderedasdaybefore.annotation.RenderedAsDayBeforeFacetOnParameterAnnotationFactory;
import org.apache.isis.core.metamodel.facets.param.typicallen.annotation.TypicalLengthFacetOnParameterAnnotationFactory;
import org.apache.isis.core.metamodel.facets.param.validating.maskannot.MaskFacetOnParameterAnnotationFactory;
>>>>>>>
import org.apache.isis.core.metamodel.facets.param.typicallen.fromtype.TypicalLengthFacetOnParameterDerivedFromTypeFacetFactory;
<<<<<<<
import org.apache.isis.core.metamodel.facets.properties.typicallen.fromtype.TypicalLengthFacetOnPropertyDerivedFromTypeFacetFactory;
=======
import org.apache.isis.core.metamodel.facets.properties.renderedasdaybefore.annotation.RenderedAsDayBeforeAnnotationOnPropertyFacetFactory;
import org.apache.isis.core.metamodel.facets.properties.typicallen.annotation.TypicalLengthOnPropertyFacetFactory;
>>>>>>>
import org.apache.isis.core.metamodel.facets.properties.typicallen.fromtype.TypicalLengthFacetOnPropertyDerivedFromTypeFacetFactory;
<<<<<<<
addFactory(new CopyImmutableFacetOntoMembersFactory());
=======
// addFactory(new CopyImmutableFacetOntoMembersFactory()); ... logic moved to post-processor
addFactory(new ImmutableFacetMarkerInterfaceFactory());
>>>>>>>
// addFactory(new CopyImmutableFacetOntoMembersFactory()); ... logic moved to post-processor |
<<<<<<<
this, facetProcessor);
=======
this, facetProcessor, layoutMetadataReaders, configService);
>>>>>>>
this, facetProcessor, configService); |
<<<<<<<
import com.google.common.collect.Ordering;
=======
import com.google.common.collect.ComparisonChain;
>>>>>>>
import com.google.common.collect.ComparisonChain;
<<<<<<<
@DomainObject() // objectType inferred from @PersistenceCapable#schema
@DomainObjectLayout() // to trigger UI events
@RequiredArgsConstructor
=======
@DomainObject(auditing = Auditing.ENABLED)
@DomainObjectLayout() // causes UI events to be triggered
@lombok.Getter @lombok.Setter
@lombok.RequiredArgsConstructor
>>>>>>>
@DomainObject(auditing = Auditing.ENABLED)
@DomainObjectLayout() // causes UI events to be triggered
@lombok.Getter @lombok.Setter
@lombok.RequiredArgsConstructor
<<<<<<<
@Action(semantics = SemanticsOf.IDEMPOTENT)
=======
@Action(semantics = SemanticsOf.IDEMPOTENT, command = CommandReification.ENABLED, publishing = Publishing.ENABLED)
>>>>>>>
@Action(semantics = SemanticsOf.IDEMPOTENT, command = CommandReification.ENABLED, publishing = Publishing.ENABLED)
<<<<<<<
=======
public TranslatableString validate0UpdateName(final String name) {
return name != null && name.contains("!") ? TranslatableString.tr("Exclamation mark is not allowed") : null;
}
>>>>>>>
public TranslatableString validate0UpdateName(final String name) {
return name != null && name.contains("!") ? TranslatableString.tr("Exclamation mark is not allowed") : null;
}
<<<<<<<
return Ordering.natural().onResultOf(SimpleObject::getName).compare(this, other);
=======
return ComparisonChain.start()
.compare(this.getName(), other.getName())
.result();
>>>>>>>
return ComparisonChain.start()
.compare(this.getName(), other.getName())
.result();
<<<<<<<
=======
@javax.jdo.annotations.NotPersistent
@lombok.Getter(AccessLevel.NONE) @lombok.Setter(AccessLevel.NONE)
>>>>>>>
@javax.jdo.annotations.NotPersistent
@lombok.Getter(AccessLevel.NONE) @lombok.Setter(AccessLevel.NONE)
<<<<<<<
=======
@javax.jdo.annotations.NotPersistent
@lombok.Getter(AccessLevel.NONE) @lombok.Setter(AccessLevel.NONE)
>>>>>>>
@javax.jdo.annotations.NotPersistent
@lombok.Getter(AccessLevel.NONE) @lombok.Setter(AccessLevel.NONE)
<<<<<<<
=======
@javax.jdo.annotations.NotPersistent
@lombok.Getter(AccessLevel.NONE) @lombok.Setter(AccessLevel.NONE)
>>>>>>>
@javax.jdo.annotations.NotPersistent
@lombok.Getter(AccessLevel.NONE) @lombok.Setter(AccessLevel.NONE) |
<<<<<<<
import org.springframework.stereotype.Service;
=======
import javax.inject.Inject;
import javax.inject.Singleton;
>>>>>>>
import javax.inject.Inject;
import org.springframework.stereotype.Service; |
<<<<<<<
=======
import org.apache.isis.core.metamodel.facets.object.domainobject.domainevents.ActionDomainEventDefaultFacetForDomainObjectAnnotation;
import org.apache.isis.core.metamodel.services.ServicesInjector;
>>>>>>>
import org.apache.isis.core.metamodel.facets.object.domainobject.domainevents.ActionDomainEventDefaultFacetForDomainObjectAnnotation;
<<<<<<<
=======
// // search for @PostsActionInvoked(value=...)
// if(postsActionInvokedEvent != null) {
// actionDomainEventType = postsActionInvokedEvent.value();
// actionDomainEventFacet = new ActionDomainEventFacetForPostsActionInvokedEventAnnotation(
// actionDomainEventType, servicesInjector, getSpecificationLoader(), holder);
// } else
// search for @ActionInteraction(value=...)
if(actionInteraction != null) {
actionDomainEventType = defaultFromDomainObjectIfRequired(typeSpec, actionInteraction.value());
actionDomainEventFacet = new ActionDomainEventFacetForActionInteractionAnnotation(
actionDomainEventType, servicesInjector, getSpecificationLoader(), holder);
} else
// search for @Action(domainEvent=...)
if(action != null) {
actionDomainEventType = defaultFromDomainObjectIfRequired(typeSpec, action.domainEvent());
actionDomainEventFacet = new ActionDomainEventFacetForActionAnnotation(
actionDomainEventType, servicesInjector, getSpecificationLoader(), holder);
} else
// else use default event type
{
actionDomainEventType = defaultFromDomainObjectIfRequired(typeSpec, ActionDomainEvent.Default.class);
actionDomainEventFacet = new ActionDomainEventFacetDefault(
actionDomainEventType, servicesInjector, getSpecificationLoader(), holder);
}
>>>>>>> |
<<<<<<<
import java.lang.reflect.Method;
import java.util.List;
import javax.annotation.Nullable;
import javax.validation.constraints.Pattern;
import org.apache.isis.applib.annotation.Property;
import org.apache.isis.applib.events.domain.PropertyDomainEvent;
import org.apache.isis.applib.services.HasUniqueId;
=======
import java.lang.reflect.Method;
import javax.annotation.Nullable;
import org.apache.isis.applib.annotation.Disabled;
import org.apache.isis.applib.annotation.Hidden;
import org.apache.isis.applib.annotation.Mandatory;
import org.apache.isis.applib.annotation.MaxLength;
import org.apache.isis.applib.annotation.MustSatisfy;
import org.apache.isis.applib.annotation.NotPersisted;
import org.apache.isis.applib.annotation.Optional;
import org.apache.isis.applib.annotation.PostsPropertyChangedEvent;
import org.apache.isis.applib.annotation.Property;
import org.apache.isis.applib.annotation.PropertyInteraction;
import org.apache.isis.applib.annotation.RegEx;
import org.apache.isis.applib.services.HasTransactionId;
import org.apache.isis.applib.services.eventbus.PropertyChangedEvent;
import org.apache.isis.applib.services.eventbus.PropertyDomainEvent;
>>>>>>>
import java.lang.reflect.Method;
import java.util.List;
import javax.annotation.Nullable;
import javax.validation.constraints.Pattern;
import org.apache.isis.applib.annotation.Property;
import org.apache.isis.applib.events.domain.PropertyDomainEvent;
import org.apache.isis.applib.services.HasUniqueId;
<<<<<<<
import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertyClearFacetForDomainEventFromDefault;
import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertyClearFacetForDomainEventFromPropertyAnnotation;
import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertyDomainEventFacetAbstract;
import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertyDomainEventFacetDefault;
import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertyDomainEventFacetForPropertyAnnotation;
import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertySetterFacetForDomainEventFromDefault;
import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertySetterFacetForDomainEventFromPropertyAnnotation;
=======
import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertyClearFacetForDomainEventFromDefault;
import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertyClearFacetForDomainEventFromPropertyAnnotation;
import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertyClearFacetForDomainEventFromPropertyInteractionAnnotation;
import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertyClearFacetForPostsPropertyChangedEventAnnotation;
import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertyDomainEventFacetAbstract;
import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertyDomainEventFacetDefault;
import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertyDomainEventFacetForPropertyAnnotation;
import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertyDomainEventFacetForPropertyInteractionAnnotation;
import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertySetterFacetForDomainEventFromDefault;
import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertySetterFacetForDomainEventFromPropertyAnnotation;
import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertySetterFacetForDomainEventFromPropertyInteractionAnnotation;
import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertySetterFacetForPostsPropertyChangedEventAnnotation;
import org.apache.isis.core.metamodel.facets.properties.property.mustsatisfy.MustSatisfySpecificationFacetForMustSatisfyAnnotationOnProperty;
>>>>>>>
import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertyClearFacetForDomainEventFromDefault;
import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertyClearFacetForDomainEventFromPropertyAnnotation;
import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertyDomainEventFacetAbstract;
import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertyDomainEventFacetDefault;
import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertyDomainEventFacetForPropertyAnnotation;
import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertySetterFacetForDomainEventFromDefault;
import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertySetterFacetForDomainEventFromPropertyAnnotation;
<<<<<<<
=======
import org.apache.isis.core.metamodel.services.ServicesInjector;
import org.apache.isis.core.metamodel.spec.ObjectSpecification;
>>>>>>>
import org.apache.isis.core.metamodel.spec.ObjectSpecification;
<<<<<<<
final List<Property> properties = Annotations.getAnnotations(method, Property.class);
// search for @Property(domainEvent=...), else use default event type
final PropertyDomainEventFacetAbstract propertyDomainEventFacet = properties.stream()
.map(Property::domainEvent)
.filter(domainEvent -> domainEvent != PropertyDomainEvent.Default.class)
.findFirst()
.map(domainEvent -> (PropertyDomainEventFacetAbstract) new PropertyDomainEventFacetForPropertyAnnotation(
domainEvent, getterFacet, servicesInjector, getSpecificationLoader(), holder))
.orElse(new PropertyDomainEventFacetDefault(
PropertyDomainEvent.Default.class, getterFacet, servicesInjector, getSpecificationLoader(),
holder));
=======
final PostsPropertyChangedEvent postsPropertyChangedEvent = Annotations.getAnnotation(method, PostsPropertyChangedEvent.class);
final PropertyInteraction propertyInteraction = Annotations.getAnnotation(method, PropertyInteraction.class);
final Property property = Annotations.getAnnotation(method, Property.class);
final Class<? extends PropertyDomainEvent<?, ?>> propertyDomainEventType;
final PropertyDomainEventFacetAbstract propertyDomainEventFacet;
// can't really do this, because would result in the event being fired for the
// hidden/disable/validate phases, most likely breaking existing code.
// if(postsPropertyChangedEvent != null) {
// propertyDomainEventType = postsPropertyChangedEvent.value();
// propertyDomainEventFacet = postsPropertyChangedEventValidator.flagIfPresent(
// new PropertyDomainEventFacetForPostsPropertyChangedEventAnnotation(
// propertyDomainEventType, getterFacet, servicesInjector, getSpecificationLoader(), holder));
// } else
// search for @PropertyInteraction(value=...)
if(propertyInteraction != null) {
propertyDomainEventType = defaultFromDomainObjectIfRequired(typeSpec, propertyInteraction.value());
propertyDomainEventFacet = propertyInteractionValidator.flagIfPresent(
new PropertyDomainEventFacetForPropertyInteractionAnnotation(
propertyDomainEventType, getterFacet, servicesInjector, getSpecificationLoader(), holder), processMethodContext);
} else
// search for @Property(domainEvent=...)
if(property != null) {
propertyDomainEventType = defaultFromDomainObjectIfRequired(typeSpec, property.domainEvent());
propertyDomainEventFacet = new PropertyDomainEventFacetForPropertyAnnotation(
propertyDomainEventType, getterFacet, servicesInjector, getSpecificationLoader(), holder);
} else
// else use default event type
{
propertyDomainEventType = defaultFromDomainObjectIfRequired(typeSpec, PropertyDomainEvent.Default.class);
propertyDomainEventFacet = new PropertyDomainEventFacetDefault(
propertyDomainEventType, getterFacet, servicesInjector, getSpecificationLoader(), holder);
}
>>>>>>>
final List<Property> properties = Annotations.getAnnotations(method, Property.class);
// search for @Property(domainEvent=...), else use default event type
final PropertyDomainEventFacetAbstract propertyDomainEventFacet = properties.stream()
.map(Property::domainEvent)
.filter(domainEvent -> domainEvent != PropertyDomainEvent.Default.class)
.findFirst()
.map(domainEvent -> (PropertyDomainEventFacetAbstract) new PropertyDomainEventFacetForPropertyAnnotation(
defaultFromDomainObjectIfRequired(typeSpec, domainEvent), getterFacet, servicesInjector, getSpecificationLoader(), holder))
.orElse(new PropertyDomainEventFacetDefault(
defaultFromDomainObjectIfRequired(typeSpec, PropertyDomainEvent.Default.class), getterFacet, servicesInjector, getSpecificationLoader(),
holder)); |
<<<<<<<
private final Set<Class<?>> classesToIgnore = _Sets.newHashSet();
private final Set<String> classNamesToIgnore = _Sets.newHashSet();
// /**
// * For any classes registered as ignored, {@link #getClass(Class)} will
// * return <tt>null</tt>.
// */
// private boolean ignore(final Class<?> q) {
// return classesToIgnore.add(q);
// }
=======
/**
* For any classes registered as ignored, {@link #getClass(Class)} will
* return <tt>null</tt>.
*/
private void ignore(final Class<?> q) {
classesToIgnore.add(q);
}
>>>>>>>
private final Set<Class<?>> classesToIgnore = _Sets.newHashSet();
private final Set<String> classNamesToIgnore = _Sets.newHashSet(); |
<<<<<<<
public <S> Class<? extends ActionDomainEvent<S>> getEventType() {
return _Casts.uncheckedCast(value());
}
=======
>>>>>>> |
<<<<<<<
import java.util.Objects;
import java.util.stream.Collectors;
=======
>>>>>>>
import java.util.Objects;
import java.util.stream.Collectors;
<<<<<<<
List<Specification> specifications = parameters.stream()
.map(Parameter::mustSatisfy)
.flatMap(classes ->
Arrays.stream(classes)
.map(MustSatisfySpecificationFacetAbstract::newSpecificationElseNull)
.filter(Objects::nonNull)
)
.filter(Objects::nonNull)
.collect(Collectors.toList());
return specifications.size() > 0
? new MustSatisfySpecificationFacetForParameterAnnotation(specifications, holder, servicesInjector)
: null;
=======
if (parameter == null) {
return null;
}
final Class<?>[] values = parameter.mustSatisfy();
final List<Specification> specifications = specificationsFor(values);
return specifications.size() > 0 ? new MustSatisfySpecificationFacetForParameterAnnotation(specifications, holder, servicesInjector) : null;
>>>>>>>
List<Specification> specifications = parameters.stream()
.map(Parameter::mustSatisfy)
.flatMap(classes ->
Arrays.stream(classes)
.map(MustSatisfySpecificationFacetAbstract::newSpecificationElseNull)
.filter(Objects::nonNull)
)
.collect(Collectors.toList());
return specifications.size() > 0
? new MustSatisfySpecificationFacetForParameterAnnotation(specifications, holder, servicesInjector)
: null; |
<<<<<<<
.getChoices(pendingArguments, getAuthenticationSession());
if(!choices.contains(pendingArg)) {
scalarModel.setObject(null);
scalarModel.setPending(null);
actionArgumentModel.setObject(null);
=======
.getChoices(pendingArguments, getAuthenticationSession(), getDeploymentCategory());
if(pendingArg.isValue()) {
// we have to do this if the ObjectAdapters are value type (eg a string)
// because we can end up with a different ObjectAdapter for the same underlying value
// (values have no intrinsic identity)
// it might not be necessary to have this special casing; we could probably use this code
// even for reference types
final Object pendingValue = pendingArg.getObject();
final List<Object> choiceValues = ObjectAdapter.Util.unwrap(choices);
if(!choiceValues.contains(pendingValue)) {
scalarModel.setObject(null);
scalarModel.setPending(null);
actionArgumentModel.setObject(null);
}
} else {
if(!choices.contains(pendingArg)) {
scalarModel.setObject(null);
scalarModel.setPending(null);
actionArgumentModel.setObject(null);
}
>>>>>>>
.getChoices(pendingArguments, getAuthenticationSession());
if(pendingArg.isValue()) {
// we have to do this if the ObjectAdapters are value type (eg a string)
// because we can end up with a different ObjectAdapter for the same underlying value
// (values have no intrinsic identity)
// it might not be necessary to have this special casing; we could probably use this code
// even for reference types
final Object pendingValue = pendingArg.getPojo();
final List<Object> choiceValues = ObjectAdapter.Util.unwrapPojoList(choices);
if(!choiceValues.contains(pendingValue)) {
scalarModel.setObject(null);
scalarModel.setPending(null);
actionArgumentModel.setObject(null);
}
} else {
if(!choices.contains(pendingArg)) {
scalarModel.setObject(null);
scalarModel.setPending(null);
actionArgumentModel.setObject(null);
}
<<<<<<<
final String disableReasonIfAny = scalarModel.whetherDisabled();
if (disableReasonIfAny != null) {
if(disableReasonIfAny.contains("Always disabled")) {
onInitializeWhenViewMode();
=======
final String disableReasonIfAny = scalarModel.whetherDisabled();
if (disableReasonIfAny != null) {
if(disableReasonIfAny.contains(DisabledFacet.ALWAYS_DISABLED_REASON)) {
onInitializeWhenViewMode();
} else {
onInitializeWhenDisabled(disableReasonIfAny);
}
} else {
if (scalarModel.isViewMode()) {
onInitializeWhenViewMode();
>>>>>>>
final String disableReasonIfAny = scalarModel.whetherDisabled();
if (disableReasonIfAny != null) {
if(disableReasonIfAny.contains(DisabledFacet.ALWAYS_DISABLED_REASON)) {
onInitializeWhenViewMode();
<<<<<<<
=======
>>>>>>> |
<<<<<<<
// -- toString
=======
@Override
public ObjectAdapter realTargetAdapter(final ObjectAdapter targetAdapter) {
return targetAdapter;
}
//endregion
//region > toString
>>>>>>>
// -- toString
@Override
public ObjectAdapter realTargetAdapter(final ObjectAdapter targetAdapter) {
return targetAdapter;
} |
<<<<<<<
import org.apache.isis.applib.events.domain.AbstractDomainEvent;
import org.apache.isis.applib.events.domain.PropertyDomainEvent;
=======
import java.util.Map;
import org.apache.isis.applib.events.UsabilityEvent;
import org.apache.isis.applib.events.ValidityEvent;
import org.apache.isis.applib.events.VisibilityEvent;
import org.apache.isis.applib.services.eventbus.AbstractDomainEvent;
import org.apache.isis.applib.services.eventbus.PropertyDomainEvent;
>>>>>>>
import org.apache.isis.applib.events.domain.AbstractDomainEvent;
import org.apache.isis.applib.events.domain.PropertyDomainEvent;
import java.util.Map; |
<<<<<<<
=======
import com.google.common.collect.Lists;
import org.reflections.vfs.SystemDir;
import org.reflections.vfs.Vfs;
>>>>>>>
<<<<<<<
=======
return urlTypes;
}
private Set<Class<?>> domainObjectTypes;
private Set<Class<?>> viewModelTypes;
private Set<Class<?>> xmlElementTypes;
public Set<Class<?>> getDomainObjectTypes() {
return domainObjectTypes;
}
public void setDomainObjectTypes(final Set<Class<?>> domainObjectTypes) {
this.domainObjectTypes = domainObjectTypes;
}
public Set<Class<?>> getViewModelTypes() {
return viewModelTypes;
}
public void setViewModelTypes(final Set<Class<?>> viewModelTypes) {
this.viewModelTypes = viewModelTypes;
}
public Set<Class<?>> getXmlElementTypes() {
return xmlElementTypes;
}
public void setXmlElementTypes(final Set<Class<?>> xmlElementTypes) {
this.xmlElementTypes = xmlElementTypes;
}
//endregion
private static class EmptyIfFileEndingsUrlType implements Vfs.UrlType {
private final List<String> fileEndings;
private EmptyIfFileEndingsUrlType(final String... fileEndings) {
this.fileEndings = Lists.newArrayList(fileEndings);
}
public boolean matches(URL url) {
final String protocol = url.getProtocol();
final String externalForm = url.toExternalForm();
if (!protocol.equals("file")) {
return false;
}
for (String fileEnding : fileEndings) {
if (externalForm.endsWith(fileEnding))
return true;
}
return false;
}
public Vfs.Dir createDir(final URL url) throws Exception {
return emptyVfsDir(url);
}
private static Vfs.Dir emptyVfsDir(final URL url) {
return new Vfs.Dir() {
@Override
public String getPath() {
return url.toExternalForm();
}
@Override
public Iterable<Vfs.File> getFiles() {
return Collections.emptyList();
}
@Override
public void close() {
//
}
};
}
}
private static class JettyConsoleUrlType implements Vfs.UrlType {
public boolean matches(URL url) {
final String protocol = url.getProtocol();
final String externalForm = url.toExternalForm();
final boolean matches = protocol.equals("file") && externalForm.contains("jetty-console") && externalForm.contains("-any-") && externalForm.endsWith("webapp/WEB-INF/classes/");
return matches;
}
public Vfs.Dir createDir(final URL url) throws Exception {
return new SystemDir(getFile(url));
}
/**
* try to get {@link java.io.File} from url
*
* <p>
* Copied from {@link Vfs} (not publicly accessible)
* </p>
*/
static java.io.File getFile(URL url) {
java.io.File file;
String path;
try {
path = url.toURI().getSchemeSpecificPart();
if ((file = new java.io.File(path)).exists()) return file;
} catch (URISyntaxException e) {
}
try {
path = URLDecoder.decode(url.getPath(), "UTF-8");
if (path.contains(".jar!")) path = path.substring(0, path.lastIndexOf(".jar!") + ".jar".length());
if ((file = new java.io.File(path)).exists()) return file;
} catch (UnsupportedEncodingException e) {
}
try {
path = url.toExternalForm();
if (path.startsWith("jar:")) path = path.substring("jar:".length());
if (path.startsWith("file:")) path = path.substring("file:".length());
if (path.contains(".jar!")) path = path.substring(0, path.indexOf(".jar!") + ".jar".length());
if ((file = new java.io.File(path)).exists()) return file;
path = path.replace("%20", " ");
if ((file = new java.io.File(path)).exists()) return file;
} catch (Exception e) {
}
return null;
}
}
>>>>>>>
private Set<Class<?>> domainObjectTypes;
private Set<Class<?>> viewModelTypes;
private Set<Class<?>> xmlElementTypes;
public Set<Class<?>> getDomainObjectTypes() {
return domainObjectTypes;
}
public void setDomainObjectTypes(final Set<Class<?>> domainObjectTypes) {
this.domainObjectTypes = domainObjectTypes;
}
public Set<Class<?>> getViewModelTypes() {
return viewModelTypes;
}
public void setViewModelTypes(final Set<Class<?>> viewModelTypes) {
this.viewModelTypes = viewModelTypes;
}
public Set<Class<?>> getXmlElementTypes() {
return xmlElementTypes;
}
public void setXmlElementTypes(final Set<Class<?>> xmlElementTypes) {
this.xmlElementTypes = xmlElementTypes;
}
//endregion |
<<<<<<<
import java.util.Collections;
=======
import java.lang.reflect.Method;
>>>>>>>
import java.lang.reflect.Method;
import java.util.Collections;
<<<<<<<
import org.apache.isis.commons.internal.collections._Lists;
import org.apache.isis.commons.internal.context._Context;
=======
import com.google.common.collect.FluentIterable;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;
import org.apache.isis.applib.annotation.Collection;
import org.apache.isis.applib.annotation.Property;
import org.apache.isis.applib.filter.Filters;
import org.apache.isis.applib.services.eventbus.ActionDomainEvent;
import org.apache.isis.applib.services.eventbus.CollectionDomainEvent;
import org.apache.isis.applib.services.eventbus.PropertyDomainEvent;
>>>>>>>
import org.apache.isis.applib.annotation.Collection;
import org.apache.isis.applib.annotation.Property;
import org.apache.isis.applib.events.domain.ActionDomainEvent;
import org.apache.isis.applib.events.domain.CollectionDomainEvent;
import org.apache.isis.applib.events.domain.PropertyDomainEvent;
import org.apache.isis.commons.internal.collections._Lists;
import org.apache.isis.commons.internal.context._Context;
<<<<<<<
private ObjectAdapterProvider adapterProvider;
=======
private PersistenceSessionServiceInternal adapterManager;
private ServicesInjector servicesInjector;
>>>>>>>
private ObjectAdapterProvider adapterProvider;
private ServicesInjector servicesInjector;
<<<<<<<
objectActions.forEach(objectAction -> {
=======
for (final ObjectAction objectAction : objectActions) {
>>>>>>>
objectActions.forEach(objectAction -> {
<<<<<<<
});
=======
tweakActionDomainEventForMixin(objectSpecification, objectAction);
}
>>>>>>>
tweakActionDomainEventForMixin(objectSpecification, objectAction);
});
<<<<<<<
});
=======
tweakPropertyMixinDomainEvent(objectSpecification, property);
}
>>>>>>>
tweakPropertyMixinDomainEvent(objectSpecification, property);
});
<<<<<<<
});
});
=======
}
deriveCollectionDomainEventForMixins(objectSpecification, collection);
}
}
private void tweakActionDomainEventForMixin(
final ObjectSpecification objectSpecification,
final ObjectAction objectAction) {
if(objectAction instanceof ObjectActionMixedIn) {
// unlike collection and property mixins, there is no need to create the DomainEventFacet, it will
// have been created in the ActionAnnotationFacetFactory
final ActionDomainEventDefaultFacetForDomainObjectAnnotation actionDomainEventDefaultFacet =
objectSpecification.getFacet(ActionDomainEventDefaultFacetForDomainObjectAnnotation.class);
if(actionDomainEventDefaultFacet != null) {
final ObjectActionMixedIn actionMixedIn = (ObjectActionMixedIn) objectAction;
final ActionDomainEventFacet actionFacet = actionMixedIn.getFacet(ActionDomainEventFacet.class);
if (actionFacet instanceof ActionDomainEventFacetAbstract) {
final ActionDomainEventFacetAbstract facetAbstract = (ActionDomainEventFacetAbstract) actionFacet;
if (facetAbstract.getEventType() == ActionDomainEvent.Default.class) {
final ActionDomainEventFacetAbstract existing = (ActionDomainEventFacetAbstract) actionFacet;
existing.setEventType(actionDomainEventDefaultFacet.getEventType());
}
}
}
}
}
private void deriveCollectionDomainEventForMixins(
final ObjectSpecification objectSpecification,
final OneToManyAssociation collection) {
if(collection instanceof OneToManyAssociationMixedIn) {
final OneToManyAssociationMixedIn collectionMixin = (OneToManyAssociationMixedIn) collection;
final FacetedMethod facetedMethod = collectionMixin.getFacetedMethod();
final Method method = facetedMethod != null ? facetedMethod.getMethod() : null;
if(method != null) {
// this is basically a subset of the code that is in CollectionAnnotationFacetFactory,
// ignoring stuff which is deprecated for Isis v2
final Collection collectionAnnot = Annotations.getAnnotation(method, Collection.class);
if(collectionAnnot != null) {
final Class<? extends CollectionDomainEvent<?, ?>> collectionDomainEventType =
CollectionAnnotationFacetFactory.defaultFromDomainObjectIfRequired(
objectSpecification, collectionAnnot.domainEvent());
final CollectionDomainEventFacetForCollectionAnnotation collectionDomainEventFacet = new CollectionDomainEventFacetForCollectionAnnotation(
collectionDomainEventType, servicesInjector, specificationLoader, collection);
FacetUtil.addFacet(collectionDomainEventFacet);
}
final CollectionDomainEventDefaultFacetForDomainObjectAnnotation collectionDomainEventDefaultFacet =
objectSpecification.getFacet(CollectionDomainEventDefaultFacetForDomainObjectAnnotation.class);
if(collectionDomainEventDefaultFacet != null) {
final CollectionDomainEventFacet collectionFacet = collection.getFacet(CollectionDomainEventFacet.class);
if (collectionFacet instanceof CollectionDomainEventFacetAbstract) {
final CollectionDomainEventFacetAbstract facetAbstract = (CollectionDomainEventFacetAbstract) collectionFacet;
if (facetAbstract.getEventType() == CollectionDomainEvent.Default.class) {
final CollectionDomainEventFacetAbstract existing = (CollectionDomainEventFacetAbstract) collectionFacet;
existing.setEventType(collectionDomainEventDefaultFacet.getEventType());
}
}
}
}
}
}
private void tweakPropertyMixinDomainEvent(
final ObjectSpecification objectSpecification,
final OneToOneAssociation property) {
if(property instanceof OneToOneAssociationMixedIn) {
final OneToOneAssociationMixedIn propertyMixin = (OneToOneAssociationMixedIn) property;
final FacetedMethod facetedMethod = propertyMixin.getFacetedMethod();
final Method method = facetedMethod != null ? facetedMethod.getMethod() : null;
if(method != null) {
// this is basically a subset of the code that is in CollectionAnnotationFacetFactory,
// ignoring stuff which is deprecated for Isis v2
final Property propertyAnnot = Annotations.getAnnotation(method, Property.class);
if(propertyAnnot != null) {
final Class<? extends PropertyDomainEvent<?, ?>> propertyDomainEventType =
PropertyAnnotationFacetFactory.defaultFromDomainObjectIfRequired(
objectSpecification, propertyAnnot.domainEvent());
final PropertyOrCollectionAccessorFacet getterFacetIfAny = null;
final PropertyDomainEventFacetForPropertyAnnotation propertyDomainEventFacet =
new PropertyDomainEventFacetForPropertyAnnotation(
propertyDomainEventType, getterFacetIfAny,
servicesInjector, specificationLoader, property);
FacetUtil.addFacet(propertyDomainEventFacet);
}
}
final PropertyDomainEventDefaultFacetForDomainObjectAnnotation propertyDomainEventDefaultFacet =
objectSpecification.getFacet(PropertyDomainEventDefaultFacetForDomainObjectAnnotation.class);
if(propertyDomainEventDefaultFacet != null) {
final PropertyDomainEventFacet propertyFacet = property.getFacet(PropertyDomainEventFacet.class);
if (propertyFacet instanceof PropertyDomainEventFacetAbstract) {
final PropertyDomainEventFacetAbstract facetAbstract = (PropertyDomainEventFacetAbstract) propertyFacet;
if (facetAbstract.getEventType() == PropertyDomainEvent.Default.class) {
final PropertyDomainEventFacetAbstract existing = (PropertyDomainEventFacetAbstract) propertyFacet;
existing.setEventType(propertyDomainEventDefaultFacet.getEventType());
}
}
}
}
>>>>>>>
});
deriveCollectionDomainEventForMixins(objectSpecification, collection);
});
}
private void tweakActionDomainEventForMixin(
final ObjectSpecification objectSpecification,
final ObjectAction objectAction) {
if(objectAction instanceof ObjectActionMixedIn) {
// unlike collection and property mixins, there is no need to create the DomainEventFacet, it will
// have been created in the ActionAnnotationFacetFactory
final ActionDomainEventDefaultFacetForDomainObjectAnnotation actionDomainEventDefaultFacet =
objectSpecification.getFacet(ActionDomainEventDefaultFacetForDomainObjectAnnotation.class);
if(actionDomainEventDefaultFacet != null) {
final ObjectActionMixedIn actionMixedIn = (ObjectActionMixedIn) objectAction;
final ActionDomainEventFacet actionFacet = actionMixedIn.getFacet(ActionDomainEventFacet.class);
if (actionFacet instanceof ActionDomainEventFacetAbstract) {
final ActionDomainEventFacetAbstract facetAbstract = (ActionDomainEventFacetAbstract) actionFacet;
if (facetAbstract.getEventType() == ActionDomainEvent.Default.class) {
final ActionDomainEventFacetAbstract existing = (ActionDomainEventFacetAbstract) actionFacet;
existing.setEventType(actionDomainEventDefaultFacet.getEventType());
}
}
}
}
}
private void deriveCollectionDomainEventForMixins(
final ObjectSpecification objectSpecification,
final OneToManyAssociation collection) {
if(collection instanceof OneToManyAssociationMixedIn) {
final OneToManyAssociationMixedIn collectionMixin = (OneToManyAssociationMixedIn) collection;
final FacetedMethod facetedMethod = collectionMixin.getFacetedMethod();
final Method method = facetedMethod != null ? facetedMethod.getMethod() : null;
if(method != null) {
// this is basically a subset of the code that is in CollectionAnnotationFacetFactory,
// ignoring stuff which is deprecated for Isis v2
final Collection collectionAnnot = Annotations.getAnnotation(method, Collection.class);
if(collectionAnnot != null) {
final Class<? extends CollectionDomainEvent<?, ?>> collectionDomainEventType =
CollectionAnnotationFacetFactory.defaultFromDomainObjectIfRequired(
objectSpecification, collectionAnnot.domainEvent());
final CollectionDomainEventFacetForCollectionAnnotation collectionDomainEventFacet = new CollectionDomainEventFacetForCollectionAnnotation(
collectionDomainEventType, servicesInjector, specificationLoader, collection);
FacetUtil.addFacet(collectionDomainEventFacet);
}
final CollectionDomainEventDefaultFacetForDomainObjectAnnotation collectionDomainEventDefaultFacet =
objectSpecification.getFacet(CollectionDomainEventDefaultFacetForDomainObjectAnnotation.class);
if(collectionDomainEventDefaultFacet != null) {
final CollectionDomainEventFacet collectionFacet = collection.getFacet(CollectionDomainEventFacet.class);
if (collectionFacet instanceof CollectionDomainEventFacetAbstract) {
final CollectionDomainEventFacetAbstract facetAbstract = (CollectionDomainEventFacetAbstract) collectionFacet;
if (facetAbstract.getEventType() == CollectionDomainEvent.Default.class) {
final CollectionDomainEventFacetAbstract existing = (CollectionDomainEventFacetAbstract) collectionFacet;
existing.setEventType(collectionDomainEventDefaultFacet.getEventType());
}
}
}
}
}
}
private void tweakPropertyMixinDomainEvent(
final ObjectSpecification objectSpecification,
final OneToOneAssociation property) {
if(property instanceof OneToOneAssociationMixedIn) {
final OneToOneAssociationMixedIn propertyMixin = (OneToOneAssociationMixedIn) property;
final FacetedMethod facetedMethod = propertyMixin.getFacetedMethod();
final Method method = facetedMethod != null ? facetedMethod.getMethod() : null;
if(method != null) {
// this is basically a subset of the code that is in CollectionAnnotationFacetFactory,
// ignoring stuff which is deprecated for Isis v2
final Property propertyAnnot = Annotations.getAnnotation(method, Property.class);
if(propertyAnnot != null) {
final Class<? extends PropertyDomainEvent<?, ?>> propertyDomainEventType =
PropertyAnnotationFacetFactory.defaultFromDomainObjectIfRequired(
objectSpecification, propertyAnnot.domainEvent());
final PropertyOrCollectionAccessorFacet getterFacetIfAny = null;
final PropertyDomainEventFacetForPropertyAnnotation propertyDomainEventFacet =
new PropertyDomainEventFacetForPropertyAnnotation(
propertyDomainEventType, getterFacetIfAny,
servicesInjector, specificationLoader, property);
FacetUtil.addFacet(propertyDomainEventFacet);
}
}
final PropertyDomainEventDefaultFacetForDomainObjectAnnotation propertyDomainEventDefaultFacet =
objectSpecification.getFacet(PropertyDomainEventDefaultFacetForDomainObjectAnnotation.class);
if(propertyDomainEventDefaultFacet != null) {
final PropertyDomainEventFacet propertyFacet = property.getFacet(PropertyDomainEventFacet.class);
if (propertyFacet instanceof PropertyDomainEventFacetAbstract) {
final PropertyDomainEventFacetAbstract facetAbstract = (PropertyDomainEventFacetAbstract) propertyFacet;
if (facetAbstract.getEventType() == PropertyDomainEvent.Default.class) {
final PropertyDomainEventFacetAbstract existing = (PropertyDomainEventFacetAbstract) propertyFacet;
existing.setEventType(propertyDomainEventDefaultFacet.getEventType());
}
}
}
}
<<<<<<<
=======
this.servicesInjector = servicesInjector;
deploymentCategoryProvider = servicesInjector.getDeploymentCategoryProvider();
>>>>>>>
this.servicesInjector = servicesInjector; |
<<<<<<<
import java.util.List;
=======
import java.util.Map;
>>>>>>>
import java.util.List;
import java.util.Map; |
<<<<<<<
import org.apache.isis.applib.services.wrapper.events.ValidityEvent;
=======
import java.util.Map;
import org.apache.isis.applib.events.ValidityEvent;
>>>>>>>
import org.apache.isis.applib.services.wrapper.events.ValidityEvent;
import java.util.Map; |
<<<<<<<
return String.join("\n", readLines);
} catch (IOException | IllegalArgumentException e) {
=======
return Joiner.on("\n").join(readLines);
} catch (Exception e) {
>>>>>>>
return String.join("\n", readLines);
} catch (Exception e) { |
<<<<<<<
LOG.info("DebugDiskDataStore registered; access via ~/wicket/internal/debug/diskDataStore");
LOG.info("DebugDiskDataStore: eg, http://localhost:8080/wicket/wicket/internal/debug/diskDataStore");
=======
LOG.debug("DebugDiskDataStore registered; access via ~/wicket/internal/debug/diskDataStore");
LOG.debug("DebugDiskDataStore: eg, http://localhost:8080/wicket/wicket/internal/debug/diskDataStore");
}
>>>>>>>
LOG.debug("DebugDiskDataStore registered; access via ~/wicket/internal/debug/diskDataStore");
LOG.debug("DebugDiskDataStore: eg, http://localhost:8080/wicket/wicket/internal/debug/diskDataStore"); |
<<<<<<<
=======
import org.apache.isis.core.metamodel.facets.actions.notinservicemenu.method.NotInServiceMenuFacetViaMethodFactory;
import org.apache.isis.core.metamodel.facets.param.disable.method.ActionParameterDisabledFacetViaMethodFactory;
import org.apache.isis.core.metamodel.facets.param.hide.method.ActionParameterHiddenFacetViaMethodFactory;
import org.apache.isis.core.metamodel.facets.param.validate.method.ActionParameterValidationFacetViaMethodFactory;
>>>>>>>
<<<<<<<
=======
addFactory(new ActionParameterHiddenFacetViaMethodFactory());
addFactory(new ActionParameterDisabledFacetViaMethodFactory());
>>>>>>>
addFactory(new ActionParameterHiddenFacetViaMethodFactory());
addFactory(new ActionParameterDisabledFacetViaMethodFactory()); |
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
public static class Filters {
private Filters(){}
/**
* Filters only parameters that are for objects (ie 1:1 associations)
*/
public static final Filter<ObjectActionParameter> PARAMETER_ASSOCIATIONS = new Filter<ObjectActionParameter>() {
@Override
public boolean accept(final ObjectActionParameter parameter) {
return parameter.getSpecification().isNotCollection();
}
};
}
>>>>>>> |
<<<<<<<
import javax.inject.Inject;
=======
import com.google.common.collect.Lists;
>>>>>>>
import javax.inject.Inject;
import com.google.common.collect.Lists; |
<<<<<<<
=======
import com.google.common.base.Function;
import com.google.common.base.Predicate;
import com.google.common.collect.Maps;
>>>>>>>
import com.google.common.base.Predicate; |
<<<<<<<
import com.google.common.base.Predicate;
import org.apache.isis.applib.layout.component.Grid;
=======
import org.apache.isis.applib.filter.Filter;
import org.apache.isis.applib.filter.Filters;
import org.apache.isis.applib.layout.grid.Grid;
>>>>>>>
import org.apache.isis.applib.layout.grid.Grid; |
<<<<<<<
collections.forEach(collection->{
=======
for (final OneToManyAssociation collection : collections) {
derivePropertyOrCollectionDescribedAsFromType(collection);
derivePropertyOrCollectionImmutableFromSpec(collection);
deriveCollectionDisabledFromImmutable(collection);
>>>>>>>
collections.forEach(collection->{
derivePropertyOrCollectionDescribedAsFromType(collection);
derivePropertyOrCollectionImmutableFromSpec(collection);
deriveCollectionDisabledFromImmutable(collection);
<<<<<<<
new ActionParameterChoicesFacetFromParentedCollection(
scalarOrCollectionParam, otma,
getDeploymentCategory(), specificationLoader,
authenticationSessionProvider, adapterProvider ));
=======
new PropertyChoicesFacetDerivedFromChoicesFacet(facetedMethodFor(property), specificationLoader));
>>>>>>>
new PropertyChoicesFacetDerivedFromChoicesFacet(facetedMethodFor(property), specificationLoader)); |
<<<<<<<
final Grid grid = gridFacet.getGrid();
final Map<String, Integer> propertyIdOrderWithinGrid = new HashMap<>();
grid.getAllPropertiesById().forEach((propertyId, __)->{
propertyIdOrderWithinGrid.put(propertyId, propertyIdOrderWithinGrid.size());
});
// if propertyId is mentioned within grid, put into first 'half' ordered by
// occurrence within grid
// if propertyId is not mentioned within grid, put into second 'half' ordered by
// propertyId (String) in natural order
propertyIdComparator = Comparator
.<String>comparingInt(propertyId->
propertyIdOrderWithinGrid.getOrDefault(propertyId, Integer.MAX_VALUE))
.thenComparing(Comparator.naturalOrder());
} else {
propertyIdComparator = null;
=======
final EntityModel entityModel = getModel().getEntityModel();
final ObjectAdapter objectAdapterIfAny = entityModel != null ? entityModel.getObject() : null;
final Grid unused = gridFacet.getGrid(objectAdapterIfAny);
>>>>>>>
final EntityModel entityModel = getModel().getEntityModel();
final ObjectAdapter objectAdapterIfAny = entityModel != null ? entityModel.getObject() : null;
final Grid grid = gridFacet.getGrid(objectAdapterIfAny);
final Map<String, Integer> propertyIdOrderWithinGrid = new HashMap<>();
grid.getAllPropertiesById().forEach((propertyId, __)->{
propertyIdOrderWithinGrid.put(propertyId, propertyIdOrderWithinGrid.size());
});
// if propertyId is mentioned within grid, put into first 'half' ordered by
// occurrence within grid
// if propertyId is not mentioned within grid, put into second 'half' ordered by
// propertyId (String) in natural order
propertyIdComparator = Comparator
.<String>comparingInt(propertyId->
propertyIdOrderWithinGrid.getOrDefault(propertyId, Integer.MAX_VALUE))
.thenComparing(Comparator.naturalOrder());
} else {
propertyIdComparator = null; |
<<<<<<<
List<LinkAndLabel> linkAndLabels =
LinkAndLabelUtil.asActionLinksForAssociation(this.scalarModel);
=======
// find associated actions for this scalar property (only properties will have any.)
final ScalarModel.AssociatedActions associatedActionsIfProperty =
scalarModel.associatedActionsIfProperty(getDeploymentCategory());
final ObjectAction inlineActionIfAny =
associatedActionsIfProperty.getFirstAssociatedWithInlineAsIfEdit();
final List<ObjectAction> remainingAssociated = associatedActionsIfProperty.getRemainingAssociated();
// convert those actions into UI layer widgets
final List<LinkAndLabel> linkAndLabels = LinkAndLabelUtil.asActionLinks(this.scalarModel, remainingAssociated);
>>>>>>>
// find associated actions for this scalar property (only properties will have any.)
final ScalarModel.AssociatedActions associatedActionsIfProperty =
scalarModel.associatedActionsIfProperty();
final ObjectAction inlineActionIfAny =
associatedActionsIfProperty.getFirstAssociatedWithInlineAsIfEdit();
final List<ObjectAction> remainingAssociated = associatedActionsIfProperty.getRemainingAssociated();
// convert those actions into UI layer widgets
final List<LinkAndLabel> linkAndLabels = LinkAndLabelUtil.asActionLinks(this.scalarModel, remainingAssociated);
<<<<<<<
if(linkAndLabelAsIfEdit != null) {
// irrespective of whether the property is itself editable, if the action is annotated as
// INLINE_AS_IF_EDIT then we never render it as an action
linkAndLabels = _Lists.newArrayList(linkAndLabels);
linkAndLabels.remove(linkAndLabelAsIfEdit);
}
=======
>>>>>>>
<<<<<<<
final ObjectSpecification specification = scalarModel.getObject().getSpecification();
final MetaModelService metaModelService = getServiceRegistry()
.lookupServiceElseFail(MetaModelService.class);
final ManagedObjectSort sort = metaModelService.sortOf(specification.getCorrespondingClass(), MetaModelService.Mode.RELAXED);
=======
final ObjectSpecification specification = scalarModel.getTypeOfSpecification();
final MetaModelService2 metaModelService2 = getIsisSessionFactory().getServicesInjector()
.lookupService(MetaModelService2.class);
final MetaModelService2.Sort sort = metaModelService2.sortOf(specification.getCorrespondingClass());
>>>>>>>
final ObjectSpecification specification = scalarModel.getTypeOfSpecification();
final MetaModelService metaModelService = getServiceRegistry()
.lookupServiceElseFail(MetaModelService.class);
final ManagedObjectSort sort = metaModelService.sortOf(specification.getCorrespondingClass(), MetaModelService.Mode.RELAXED); |
<<<<<<<
import org.apache.isis.core.webapp.IsisWebAppConfigProvider;
import org.apache.isis.schema.utils.ChangesDtoUtils;
import org.apache.isis.schema.utils.CommandDtoUtils;
import org.apache.isis.schema.utils.InteractionDtoUtils;
=======
import org.apache.isis.core.webapp.IsisWebAppBootstrapper;
import org.apache.isis.core.webapp.WebAppConstants;
>>>>>>>
import org.apache.isis.core.webapp.IsisWebAppConfigProvider;
<<<<<<<
return ThreadPoolSupport.getInstance().invokeAll(_Lists.<Callable<Object>>of(
Executors.callable(this::configureWebJars),
Executors.callable(this::configureWicketBootstrap),
Executors.callable(this::configureWicketSelect2),
Executors.callable(ChangesDtoUtils::init),
Executors.callable(InteractionDtoUtils::init),
Executors.callable(CommandDtoUtils::init)
));
=======
return ThreadPoolSupport.getInstance().invokeAll(
new Callable<Object>() {
@Override
public Object call() throws Exception {
configureWebJars();
return null;
}
public String toString() {
return "configureWebJars()";
}
},
new Callable<Object>() {
@Override
public Object call() throws Exception {
configureWicketBootstrap();
return null;
}
public String toString() {
return "configureWicketBootstrap()";
}
},
new Callable<Object>() {
@Override
public Object call() throws Exception {
configureWicketSelect2();
return null;
}
public String toString() {
return "configureWicketSelect2()";
}
}
);
>>>>>>>
return ThreadPoolSupport.getInstance().invokeAll(
Executors.callable(this::configureWebJars),
Executors.callable(this::configureWicketBootstrap),
Executors.callable(this::configureWicketSelect2)
); |
<<<<<<<
=======
import java.util.Map;
import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
>>>>>>>
import java.util.Map;
import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
<<<<<<<
public String cssClass(final ManagedObject objectAdapter) {
return value;
=======
public String cssClass(final ObjectAdapter objectAdapter) {
return cssClass;
}
@Override public void appendAttributesTo(final Map<String, Object> attributeMap) {
super.appendAttributesTo(attributeMap);
attributeMap.put("cssClass", cssClass);
>>>>>>>
public String cssClass(final ManagedObject objectAdapter) {
return cssClass;
}
@Override public void appendAttributesTo(final Map<String, Object> attributeMap) {
super.appendAttributesTo(attributeMap);
attributeMap.put("cssClass", cssClass); |
<<<<<<<
=======
import com.google.common.collect.Sets;
>>>>>>>
<<<<<<<
//private final String msgId;
private final SortedSet<String> contexts = _Sets.newTreeSet();
=======
private final SortedSet<String> contexts = Sets.newTreeSet();
>>>>>>>
private final SortedSet<String> contexts = _Sets.newTreeSet();
<<<<<<<
private Block(/*final String msgId*/) {
//this.msgId = msgId;
}
=======
private Block() { }
>>>>>>>
private Block() { } |
<<<<<<<
.addProperty("hibernate.search.default.directory_provider", "ram")
.addProperty("hibernate.search.lucene_version", "LUCENE_CURRENT");
return TestCacheManagerFactory.createCacheManager(c, true);
=======
.addProperty("hibernate.search.default.directory_provider", "ram");
return TestCacheManagerFactory.createCacheManager(c);
>>>>>>>
.addProperty("hibernate.search.default.directory_provider", "ram")
.addProperty("hibernate.search.lucene_version", "LUCENE_CURRENT");
return TestCacheManagerFactory.createCacheManager(c); |
<<<<<<<
public void injectDependencies(DistributionManager distributionManager, CommandsFactory cf,
DataContainer dataContainer, EntryFactory entryFactory, L1Manager l1Manager, LockManager lockManager) {
=======
public void injectDependencies(DistributionManager distributionManager, StateTransferLock stateTransferLock,
CommandsFactory cf, DataContainer dataContainer, EntryFactory entryFactory,
L1Manager l1Manager) {
>>>>>>>
public void injectDependencies(DistributionManager distributionManager, StateTransferLock stateTransferLock,
CommandsFactory cf, DataContainer dataContainer, EntryFactory entryFactory,
L1Manager l1Manager, LockManager lockManager) { |
<<<<<<<
InvocationContext ctx = icc.createNonTxInvocationContext();
if (ctx.hasFlag(REMOVE_DATA_ON_STOP)) {
=======
InvocationContext ctx = icc.getInvocationContext(true);
if (ctx != null && ctx.hasFlag(REMOVE_DATA_ON_STOP)) {
>>>>>>>
InvocationContext ctx = icc.createNonTxInvocationContext();
if (ctx != null && ctx.hasFlag(REMOVE_DATA_ON_STOP)) { |
<<<<<<<
import org.infinispan.transaction.LockingMode;
=======
import org.infinispan.test.fwk.TransportFlags;
>>>>>>>
import org.infinispan.transaction.LockingMode;
import org.infinispan.test.fwk.TransportFlags; |
<<<<<<<
=======
>>>>>>> |
<<<<<<<
/**
* <p>getFilesInDirectory.</p>
*
* @param directory a {@link java.nio.file.Path} object.
* @return a {@link java.util.List} object.
* @throws java.io.IOException if any.
*/
public static List<Path> getFilesInDirectory(Path directory) throws IOException {
List<Path> files = new ArrayList<>();
DirectoryStream<Path> dirStream;
dirStream = Files.newDirectoryStream(directory);
for (Path entry : dirStream) {
files.add(entry);
}
dirStream.close();
return files;
}
/**
* <p>replaceInFiles.</p>
*
* @param replace a {@link java.lang.String} object.
* @param with a {@link java.lang.String} object.
* @param files a {@link java.util.Collection} object.
* @throws java.io.IOException if any.
*/
=======
>>>>>>>
/**
* <p>replaceInFiles.</p>
*
* @param replace a {@link java.lang.String} object.
* @param with a {@link java.lang.String} object.
* @param files a {@link java.util.Collection} object.
* @throws java.io.IOException if any.
*/
<<<<<<<
/**
* <p>replaceInFile.</p>
*
* @param replace a {@link java.lang.String} object.
* @param with a {@link java.lang.String} object.
* @param file a {@link java.nio.file.Path} object.
* @throws java.io.IOException if any.
*/
public static void replaceInFile(String replace, String with, Path file) throws IOException {
=======
public static void replaceInFile(String replace, String with, File file) throws IOException {
>>>>>>>
/**
* <p>replaceInFile.</p>
*
* @param replace a {@link java.lang.String} object.
* @param with a {@link java.lang.String} object.
* @param file a {@link java.nio.file.Path} object.
* @throws java.io.IOException if any.
*/
public static void replaceInFile(String replace, String with, File file) throws IOException {
<<<<<<<
byte[] fileAsBytes = Files.readAllBytes(file);
String fileAsString = new String(fileAsBytes);
fileAsString = fileAsString.replaceAll(replace, with);
Files.write(file, fileAsString.getBytes());
}
/**
* <p>writeFile.</p>
*
* @param targetFile a {@link java.nio.file.Path} object.
* @param bytes an array of byte.
* @param options a {@link java.nio.file.OpenOption} object.
* @throws java.io.IOException if any.
*/
public static void writeFile(Path targetFile, byte[] bytes, OpenOption... options) throws IOException {
createDirsIfNotExists(targetFile.getParent());
if (!Files.exists(targetFile)) {
Files.createFile(targetFile);
=======
String fileAsString = "";
try (FileInputStream fis = new FileInputStream(file);) {
fileAsString = IOUtils.toString(fis, StandardCharsets.UTF_8.name());
fileAsString = fileAsString.replaceAll(replace, with);
>>>>>>>
String fileAsString = "";
try (FileInputStream fis = new FileInputStream(file);) {
fileAsString = IOUtils.toString(fis, StandardCharsets.UTF_8.name());
fileAsString = fileAsString.replaceAll(replace, with); |
<<<<<<<
package org.owasp.webgoat.util;
import org.springframework.context.support.ReloadableResourceBundleMessageSource;
import org.springframework.core.io.Resource;
import org.springframework.core.io.ResourceLoader;
import org.springframework.core.io.UrlResource;
import org.springframework.stereotype.Component;
import org.springframework.util.DefaultPropertiesPersister;
import javax.inject.Singleton;
import java.net.MalformedURLException;
import java.nio.file.Path;
import java.util.Arrays;
import java.util.List;
import java.util.Locale;
/**
* *************************************************************************************************
*
*
* This file is part of WebGoat, an Open Web Application Security Project
* utility. For details, please see http://www.owasp.org/
*
* Copyright (c) 2002 - 20014 Bruce Mayhew
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place - Suite 330, Boston, MA 02111-1307, USA.
*
* Getting Source ==============
*
* Source for this application is maintained at https://github.com/WebGoat/WebGoat, a repository
* for free software projects.
*
* For details, please see http://webgoat.github.io
*
* @version $Id: $Id
*/
@Component
@Singleton
public class LabelProvider {
/** Constant <code>DEFAULT_LANGUAGE="Locale.ENGLISH.getLanguage()"</code> */
public final static String DEFAULT_LANGUAGE = Locale.ENGLISH.getLanguage();
private static final List<Locale> SUPPORTED = Arrays.asList(Locale.GERMAN, Locale.FRENCH, Locale.ENGLISH,
Locale.forLanguageTag("ru"));
private final ReloadableResourceBundleMessageSource labels = new ReloadableResourceBundleMessageSource();
private static final ReloadableResourceBundleMessageSource pluginLabels = new ReloadableResourceBundleMessageSource();
/**
* <p>Constructor for LabelProvider.</p>
*/
public LabelProvider() {
labels.setBasename("classpath:/i18n/WebGoatLabels");
labels.setFallbackToSystemLocale(false);
labels.setUseCodeAsDefaultMessage(true);
pluginLabels.setParentMessageSource(labels);
pluginLabels.setPropertiesPersister(new DefaultPropertiesPersister() {
});
}
/**
* <p>updatePluginResources.</p>
*
* @param propertyFile a {@link java.nio.file.Path} object.
*/
public static void updatePluginResources(final Path propertyFile) {
pluginLabels.setBasename("WebGoatLabels");
pluginLabels.setFallbackToSystemLocale(false);
pluginLabels.setUseCodeAsDefaultMessage(true);
pluginLabels.setResourceLoader(new ResourceLoader() {
@Override
public Resource getResource(String location) {
try {
return new UrlResource(propertyFile.toUri());
} catch (MalformedURLException e) {
throw new RuntimeException(e);
}
}
@Override
public ClassLoader getClassLoader() {
return Thread.currentThread().getContextClassLoader();
}
});
}
/**
* <p>refresh.</p>
*/
public static void refresh() {
pluginLabels.clearCache();
}
/**
* <p>get.</p>
*
* @param locale a {@link java.util.Locale} object.
* @param strName a {@link java.lang.String} object.
* @return a {@link java.lang.String} object.
*/
public String get(Locale locale, String strName) {
return pluginLabels.getMessage(strName, null, useLocaleOrFallbackToEnglish(locale));
}
private Locale useLocaleOrFallbackToEnglish(Locale locale) {
return SUPPORTED.contains(locale) ? Locale.ENGLISH : locale;
}
}
=======
=======
* <p>
* Source for this application is maintained at https://github.com/WebGoat/WebGoat, a repository for
* free software projects.
* <p>
* For details, please see http://webgoat.github.io
*/
@Component
@Singleton
public class LabelProvider {
public final static String DEFAULT_LANGUAGE = Locale.ENGLISH.getLanguage();
private static final List<Locale> SUPPORTED = Arrays.asList(Locale.GERMAN, Locale.FRENCH, Locale.ENGLISH,
Locale.forLanguageTag("ru"));
private final ReloadableResourceBundleMessageSource labels = new ReloadableResourceBundleMessageSource();
private static final ReloadableResourceBundleMessageSource pluginLabels = new ReloadableResourceBundleMessageSource();
public LabelProvider() {
labels.setBasename("classpath:/i18n/WebGoatLabels");
labels.setFallbackToSystemLocale(false);
labels.setUseCodeAsDefaultMessage(true);
pluginLabels.setParentMessageSource(labels);
pluginLabels.setPropertiesPersister(new DefaultPropertiesPersister() {
});
}
public static void updatePluginResources(final Path propertyFile) {
pluginLabels.setBasename("WebGoatLabels");
pluginLabels.setFallbackToSystemLocale(false);
pluginLabels.setUseCodeAsDefaultMessage(true);
pluginLabels.setResourceLoader(new ResourceLoader() {
@Override
public Resource getResource(String location) {
try {
return new UrlResource(propertyFile.toUri());
} catch (MalformedURLException e) {
throw new RuntimeException(e);
}
}
@Override
public ClassLoader getClassLoader() {
return Thread.currentThread().getContextClassLoader();
}
});
}
public static void refresh() {
pluginLabels.clearCache();
}
public String get(Locale locale, String strName) {
return pluginLabels.getMessage(strName, null, useLocaleOrFallbackToEnglish(locale));
}
private Locale useLocaleOrFallbackToEnglish(Locale locale) {
return SUPPORTED.contains(locale) ? Locale.ENGLISH : locale;
}
}
=======
package org.owasp.webgoat.util;
import org.springframework.context.support.ReloadableResourceBundleMessageSource;
import org.springframework.core.io.Resource;
import org.springframework.core.io.ResourceLoader;
import org.springframework.core.io.UrlResource;
import org.springframework.stereotype.Component;
import javax.inject.Singleton;
import java.net.MalformedURLException;
import java.nio.file.Path;
import java.util.Arrays;
import java.util.List;
import java.util.Locale;
/**
* ************************************************************************************************
* <p>
* <p>
* This file is part of WebGoat, an Open Web Application Security Project utility. For details,
* please see http://www.owasp.org/
* <p>
* Copyright (c) 2002 - 20014 Bruce Mayhew
* <p>
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License along with this program; if
* not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
* <p>
* Getting Source ==============
* <p>
* Source for this application is maintained at https://github.com/WebGoat/WebGoat, a repository for
* free software projects.
* <p>
* For details, please see http://webgoat.github.io
*/
@Component
@Singleton
public class LabelProvider {
public final static String DEFAULT_LANGUAGE = Locale.ENGLISH.getLanguage();
private static final List<Locale> SUPPORTED = Arrays.asList(Locale.GERMAN, Locale.FRENCH, Locale.ENGLISH,
Locale.forLanguageTag("ru"));
private final ReloadableResourceBundleMessageSource labels = new ReloadableResourceBundleMessageSource();
private static final ReloadableResourceBundleMessageSource pluginLabels = new ReloadableResourceBundleMessageSource();
public LabelProvider() {
labels.setBasename("classpath:/i18n/WebGoatLabels");
labels.setFallbackToSystemLocale(false);
labels.setUseCodeAsDefaultMessage(true);
pluginLabels.setParentMessageSource(labels);
}
public static void updatePluginResources(final Path propertyFile) {
pluginLabels.setBasename("WebGoatLabels");
pluginLabels.setFallbackToSystemLocale(false);
pluginLabels.setUseCodeAsDefaultMessage(true);
pluginLabels.setResourceLoader(new ResourceLoader() {
@Override
public Resource getResource(String location) {
try {
return new UrlResource(propertyFile.toUri());
} catch (MalformedURLException e) {
throw new RuntimeException(e);
}
}
@Override
public ClassLoader getClassLoader() {
return Thread.currentThread().getContextClassLoader();
}
});
pluginLabels.clearCache();
}
public String get(Locale locale, String strName) {
return pluginLabels.getMessage(strName, null, useLocaleOrFallbackToEnglish(locale));
}
private Locale useLocaleOrFallbackToEnglish(Locale locale) {
return SUPPORTED.contains(locale) ? Locale.ENGLISH : locale;
}
}
>>>>>>>
package org.owasp.webgoat.util;
import org.springframework.context.support.ReloadableResourceBundleMessageSource;
import org.springframework.core.io.Resource;
import org.springframework.core.io.ResourceLoader;
import org.springframework.core.io.UrlResource;
import org.springframework.stereotype.Component;
import javax.inject.Singleton;
import java.net.MalformedURLException;
import java.nio.file.Path;
import java.util.Arrays;
import java.util.List;
import java.util.Locale;
/**
* *************************************************************************************************
*
*
* This file is part of WebGoat, an Open Web Application Security Project
* utility. For details, please see http://www.owasp.org/
*
* Copyright (c) 2002 - 20014 Bruce Mayhew
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place - Suite 330, Boston, MA 02111-1307, USA.
*
* Getting Source ==============
*
* Source for this application is maintained at https://github.com/WebGoat/WebGoat, a repository
* for free software projects.
*
* For details, please see http://webgoat.github.io
*
* @version $Id: $Id
*/
@Component
@Singleton
public class LabelProvider {
/** Constant <code>DEFAULT_LANGUAGE="Locale.ENGLISH.getLanguage()"</code> */
public final static String DEFAULT_LANGUAGE = Locale.ENGLISH.getLanguage();
private static final List<Locale> SUPPORTED = Arrays.asList(Locale.GERMAN, Locale.FRENCH, Locale.ENGLISH,
Locale.forLanguageTag("ru"));
private final ReloadableResourceBundleMessageSource labels = new ReloadableResourceBundleMessageSource();
private static final ReloadableResourceBundleMessageSource pluginLabels = new ReloadableResourceBundleMessageSource();
/**
* <p>Constructor for LabelProvider.</p>
*/
public LabelProvider() {
labels.setBasename("classpath:/i18n/WebGoatLabels");
labels.setFallbackToSystemLocale(false);
labels.setUseCodeAsDefaultMessage(true);
pluginLabels.setParentMessageSource(labels);
}
/**
* <p>updatePluginResources.</p>
*
* @param propertyFile a {@link java.nio.file.Path} object.
*/
public static void updatePluginResources(final Path propertyFile) {
pluginLabels.setBasename("WebGoatLabels");
pluginLabels.setFallbackToSystemLocale(false);
pluginLabels.setUseCodeAsDefaultMessage(true);
pluginLabels.setResourceLoader(new ResourceLoader() {
@Override
public Resource getResource(String location) {
try {
return new UrlResource(propertyFile.toUri());
} catch (MalformedURLException e) {
throw new RuntimeException(e);
}
}
@Override
public ClassLoader getClassLoader() {
return Thread.currentThread().getContextClassLoader();
}
});
/**
* <p>refresh.</p>
*/
public static void refresh() {
pluginLabels.clearCache();
}
/**
* <p>get.</p>
*
* @param locale a {@link java.util.Locale} object.
* @param strName a {@link java.lang.String} object.
* @return a {@link java.lang.String} object.
*/
public String get(Locale locale, String strName) {
return pluginLabels.getMessage(strName, null, useLocaleOrFallbackToEnglish(locale));
}
private Locale useLocaleOrFallbackToEnglish(Locale locale) {
return SUPPORTED.contains(locale) ? Locale.ENGLISH : locale;
}
} |
<<<<<<<
public final boolean videosEnabled;
public final int videoLengthLimit;
public final int videoThumbnailOverlayColor;
public final int videoIconTintColor;
=======
public final boolean backBtnInMainActivity;
>>>>>>>
public final boolean videosEnabled;
public final int videoLengthLimit;
public final int videoThumbnailOverlayColor;
public final int videoIconTintColor;
public final boolean backBtnInMainActivity;
<<<<<<<
videosEnabled = builder.mVideosEnabled;
videoLengthLimit = builder.mVideoLengthLimit;
videoThumbnailOverlayColor = builder.mVideoThumbnailOverlayColor;
videoIconTintColor = builder.mVideoIconTintColor;
=======
backBtnInMainActivity = builder.mBackBtnInMainActivity;
>>>>>>>
videosEnabled = builder.mVideosEnabled;
videoLengthLimit = builder.mVideoLengthLimit;
videoThumbnailOverlayColor = builder.mVideoThumbnailOverlayColor;
videoIconTintColor = builder.mVideoIconTintColor;
backBtnInMainActivity = builder.mBackBtnInMainActivity;
<<<<<<<
private boolean mVideosEnabled;
private int mVideoLengthLimit;
private int mVideoThumbnailOverlayColor;
private int mVideoIconTintColor;
=======
private boolean mBackBtnInMainActivity;
>>>>>>>
private boolean mVideosEnabled;
private int mVideoLengthLimit;
private int mVideoThumbnailOverlayColor;
private int mVideoIconTintColor;
private boolean mBackBtnInMainActivity;
<<<<<<<
public Picker.Builder setVideosEnabled(final boolean enabled) {
mVideosEnabled = enabled;
return this;
}
public Picker.Builder setVideoLengthLimitInMilliSeconds(final int limit) {
mVideoLengthLimit = limit;
return this;
}
public Picker.Builder setVideoThumbnailOverlayColor(@ColorInt final int color) {
mVideoThumbnailOverlayColor = color;
return this;
}
public Picker.Builder setVideoIconTintColor(@ColorInt final int color) {
mVideoIconTintColor = color;
return this;
}
=======
public Picker.Builder setBackBtnInMainActivity(final boolean backBtn) {
mBackBtnInMainActivity = backBtn;
return this;
}
>>>>>>>
public Picker.Builder setBackBtnInMainActivity(final boolean backBtn) {
mBackBtnInMainActivity = backBtn;
return this;
}
public Picker.Builder setVideosEnabled(final boolean enabled) {
mVideosEnabled = enabled;
return this;
}
public Picker.Builder setVideoLengthLimitInMilliSeconds(final int limit) {
mVideoLengthLimit = limit;
return this;
}
public Picker.Builder setVideoThumbnailOverlayColor(@ColorInt final int color) {
mVideoThumbnailOverlayColor = color;
return this;
}
public Picker.Builder setVideoIconTintColor(@ColorInt final int color) {
mVideoIconTintColor = color;
return this;
} |
<<<<<<<
@Graph.OptIn(Graph.OptIn.SUITE_GROOVY_ENVIRONMENT)
public class TinkerGraph implements Graph, Serializable {
=======
public class TinkerGraph implements Graph {
>>>>>>>
@Graph.OptIn(Graph.OptIn.SUITE_GROOVY_ENVIRONMENT)
public class TinkerGraph implements Graph { |
<<<<<<<
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
=======
import org.apache.hadoop.io.Text;
import org.apache.log4j.Logger;
>>>>>>>
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.hadoop.io.Text; |
<<<<<<<
=======
private static void publishImpl(Video video, final OnPublishListener onPublishListener)
{
Session session = getOpenSession();
Request request = new Request(session, "me/videos", video.getBundle(), HttpMethod.POST, new Request.Callback()
{
@Override
public void onCompleted(Response response)
{
GraphObject graphObject = response.getGraphObject();
if (graphObject != null)
{
JSONObject graphResponse = graphObject.getInnerJSONObject();
String postId = null;
try
{
postId = graphResponse.getString("id");
}
catch (JSONException e)
{
// log
logError("JSON error", e);
}
FacebookRequestError error = response.getError();
if (error != null)
{
// log
logError("Failed to publish", error.getException());
// callback with 'exception'
if (onPublishListener != null)
{
onPublishListener.onException(error.getException());
}
}
else
{
// callback with 'complete'
if (onPublishListener != null)
{
onPublishListener.onComplete(postId);
}
}
}
else
{
// log
logError("The GraphObject in Response of publish action has null value. Response=" + response.toString(), null);
if (onPublishListener != null)
{
onPublishListener.onComplete("0");
}
}
}
});
RequestAsyncTask task = new RequestAsyncTask(request);
task.execute();
}
>>>>>>>
private static void publishImpl(Video video, final OnPublishListener onPublishListener)
{
Session session = getOpenSession();
Request request = new Request(session, "me/videos", video.getBundle(), HttpMethod.POST, new Request.Callback()
{
@Override
public void onCompleted(Response response)
{
GraphObject graphObject = response.getGraphObject();
if (graphObject != null)
{
JSONObject graphResponse = graphObject.getInnerJSONObject();
String postId = null;
try
{
postId = graphResponse.getString("id");
}
catch (JSONException e)
{
// log
logError("JSON error", e);
}
FacebookRequestError error = response.getError();
if (error != null)
{
// log
logError("Failed to publish", error.getException());
// callback with 'exception'
if (onPublishListener != null)
{
onPublishListener.onException(error.getException());
}
}
else
{
// callback with 'complete'
if (onPublishListener != null)
{
onPublishListener.onComplete(postId);
}
}
}
else
{
// log
logError("The GraphObject in Response of publish action has null value. Response=" + response.toString(), null);
if (onPublishListener != null)
{
onPublishListener.onComplete("0");
}
}
}
});
RequestAsyncTask task = new RequestAsyncTask(request);
task.execute();
} |
<<<<<<<
@OnClick(R.id.profile_notifysetting_view)
public void onNotifySettingClick() {
Utils.goActivity(ctx, ProfileNotifySettingActivity.class);
}
@OnClick(R.id.profile_logout_btn)
public void onLogoutClick() {
RoomsTable.DBHelper.getCurrentUserInstance().closeHelper();
chatManager.closeWithCallback(new AVIMClientCallback() {
@Override
public void done(AVIMClient avimClient, AVException e) {
}
});
AVUser.logOut();
getActivity().finish();
Utils.goActivity(ctx, EntryLoginActivity.class);
}
@OnClick(R.id.profile_avatar_layout)
public void onAvatarClick() {
Intent intent = new Intent(Intent.ACTION_PICK, null);
intent.setDataAndType(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, "image/*");
startActivityForResult(intent, IMAGE_PICK_REQUEST);
=======
@Override
public void onClick(View v) {
int id = v.getId();
if (id == R.id.avatarLayout) {
Intent intent = new Intent(Intent.ACTION_PICK, null);
intent.setDataAndType(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, "image/*");
startActivityForResult(intent, IMAGE_PICK_REQUEST);
} else if (id == R.id.logoutLayout) {
chatManager.closeWithCallback(new AVIMClientCallback() {
@Override
public void done(AVIMClient avimClient, AVException e) {
}
});
AVUser.logOut();
getActivity().finish();
Utils.goActivity(ctx, EntryLoginActivity.class);
} else if (id == R.id.notifyLayout) {
Utils.goActivity(ctx, ProfileNotifySettingActivity.class);
} else if (id == R.id.updateLayout) {
UpdateService updateService = UpdateService.getInstance(getActivity());
updateService.showSureUpdateDialog();
}
>>>>>>>
@OnClick(R.id.profile_notifysetting_view)
public void onNotifySettingClick() {
Utils.goActivity(ctx, ProfileNotifySettingActivity.class);
}
@OnClick(R.id.profile_logout_btn)
public void onLogoutClick() {
chatManager.closeWithCallback(new AVIMClientCallback() {
@Override
public void done(AVIMClient avimClient, AVException e) {
}
});
AVUser.logOut();
getActivity().finish();
Utils.goActivity(ctx, EntryLoginActivity.class);
}
@OnClick(R.id.profile_avatar_layout)
public void onAvatarClick() {
Intent intent = new Intent(Intent.ACTION_PICK, null);
intent.setDataAndType(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, "image/*");
startActivityForResult(intent, IMAGE_PICK_REQUEST); |
<<<<<<<
import com.avoscloud.leanchatlib.utils.Utils;
=======
import com.avoscloud.leanchatlib.utils.LogUtils;
>>>>>>>
import com.avoscloud.leanchatlib.utils.Utils;
import com.avoscloud.leanchatlib.utils.LogUtils;
<<<<<<<
if (selfId != null && ChatActivity.getCurrentChattingConvid() == null || !ChatActivity.getCurrentChattingConvid().equals(message
.getConversationId())) {
=======
if (currentChattingConvid == null
|| !currentChattingConvid.equals(message.getConversationId())) {
>>>>>>>
if (currentChattingConvid == null
|| !currentChattingConvid.equals(message.getConversationId())) {
<<<<<<<
public AVIMConversationQuery getQuery() {
if (null != imClient) {
return imClient.getQuery();
}
return null;
=======
/**
* 获取和 userId 的对话,先去服务器查之前两人有没创建过对话,没有的话,创建一个
*
* @param userId
* @param callback
*/
public void fetchConversationWithUserId(String userId, final AVIMConversationCreatedCallback callback) {
final List<String> members = new ArrayList<>();
members.add(userId);
members.add(selfId);
AVIMConversationQuery query = imClient.getQuery();
query.withMembers(members);
query.whereEqualTo(ConversationType.ATTR_TYPE_KEY, ConversationType.Single.getValue());
query.orderByDescending(KEY_UPDATED_AT);
query.limit(1);
query.findInBackground(new AVIMConversationQueryCallback() {
@Override
public void done(List<AVIMConversation> conversations, AVException e) {
if (e != null) {
callback.done(null, e);
} else {
if (conversations.size() > 0) {
callback.done(conversations.get(0), null);
} else {
Map<String, Object> attrs = new HashMap<>();
attrs.put(ConversationType.TYPE_KEY, ConversationType.Single.getValue());
imClient.createConversation(members, attrs, callback);
}
}
}
});
}
/**
* 获取 AVIMConversationQuery,用来查询对话
*
* @return
*/
public AVIMConversationQuery getConversationQuery() {
return imClient.getQuery();
>>>>>>>
/**
* 获取和 userId 的对话,先去服务器查之前两人有没创建过对话,没有的话,创建一个
*
* @param userId
* @param callback
*/
public void fetchConversationWithUserId(String userId, final AVIMConversationCreatedCallback callback) {
final List<String> members = new ArrayList<>();
members.add(userId);
members.add(selfId);
AVIMConversationQuery query = imClient.getQuery();
query.withMembers(members);
query.whereEqualTo(ConversationType.ATTR_TYPE_KEY, ConversationType.Single.getValue());
query.orderByDescending(KEY_UPDATED_AT);
query.limit(1);
query.findInBackground(new AVIMConversationQueryCallback() {
@Override
public void done(List<AVIMConversation> conversations, AVException e) {
if (e != null) {
callback.done(null, e);
} else {
if (conversations.size() > 0) {
callback.done(conversations.get(0), null);
} else {
Map<String, Object> attrs = new HashMap<>();
attrs.put(ConversationType.TYPE_KEY, ConversationType.Single.getValue());
imClient.createConversation(members, attrs, callback);
}
}
}
});
}
/**
* 获取 AVIMConversationQuery,用来查询对话
*
* @return
*/
public AVIMConversationQuery getConversationQuery() {
return imClient.getQuery(); |
<<<<<<<
// instead of splicing synonyms into the original query string, ie
// dog bite
// canine familiaris bite
// dog chomp
// canine familiaris chomp
// do this:
// dog bite
// "canine familiaris" chomp
// with phrases off:
// dog bite canine familiaris chomp
public static final String SYNONYMS_BAG = "synonyms.bag";
=======
public static final String SYNONYMS_IGNORE_QUERY_OPERATORS = "synonyms.ignoreQueryOperators";
>>>>>>>
public static final String SYNONYMS_IGNORE_QUERY_OPERATORS = "synonyms.ignoreQueryOperators";
// instead of splicing synonyms into the original query string, ie
// dog bite
// canine familiaris bite
// dog chomp
// canine familiaris chomp
// do this:
// dog bite
// "canine familiaris" chomp
// with phrases off:
// dog bite canine familiaris chomp
public static final String SYNONYMS_BAG = "synonyms.bag"; |
<<<<<<<
* Class {@code InterController} is the UI in charge of dealing with Inters (addition,
* removal, modifications) to correct OMR output, with the ability to undo & redo at
* will.
=======
* Class {@code InterController} is the UI in charge of dealing with Inter and
* Relation instances (addition, removal, modifications) to correct OMR output,
* with the ability to undo & redo at will.
>>>>>>>
* Class {@code InterController} is the UI in charge of dealing with Inter and
* Relation instances (addition, removal, modifications) to correct OMR output,
* with the ability to undo and redo at will.
<<<<<<<
* Finally, a proper InterTask is allocated, inserted in controller's history, and run.
* Undo and redo actions operate on this history.
=======
* User actions are processed asynchronously in background.
>>>>>>>
* User actions are processed asynchronously in background.
<<<<<<<
* @param ghost the populated inter (staff & bounds are already set)
* @param center the target location for inter center
* @return the task that carries out additional processing
=======
* @param ghost the populated inter (staff & bounds are already set)
* @param center the target location for inter center (TODO: useful?)
>>>>>>>
* @param ghost the populated inter (staff & bounds are already set)
* @param center the target location for inter center (could be useful) |
<<<<<<<
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.lang.reflect.Field;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import static com.sdl.odata.JsonConstants.CONTEXT;
import static com.sdl.odata.JsonConstants.COUNT;
import static com.sdl.odata.JsonConstants.ID;
import static com.sdl.odata.JsonConstants.TYPE;
import static com.sdl.odata.JsonConstants.VALUE;
import static com.sdl.odata.ODataRendererUtils.checkNotNull;
import static com.sdl.odata.ODataRendererUtils.isForceExpandParamSet;
import static com.sdl.odata.api.edm.model.MetaType.COMPLEX;
import static com.sdl.odata.api.edm.model.MetaType.ENTITY;
import static com.sdl.odata.api.parser.ODataUriUtil.asJavaList;
import static com.sdl.odata.api.parser.ODataUriUtil.getSimpleExpandPropertyNames;
import static com.sdl.odata.api.parser.ODataUriUtil.hasCountOption;
import static com.sdl.odata.util.edm.EntityDataModelUtil.formatEntityKey;
import static com.sdl.odata.util.edm.EntityDataModelUtil.getEntityName;
import static com.sdl.odata.util.edm.EntityDataModelUtil.visitProperties;
=======
>>>>>>>
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.lang.reflect.Field;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import static com.sdl.odata.JsonConstants.CONTEXT;
import static com.sdl.odata.JsonConstants.COUNT;
import static com.sdl.odata.JsonConstants.ID;
import static com.sdl.odata.JsonConstants.TYPE;
import static com.sdl.odata.JsonConstants.VALUE;
import static com.sdl.odata.ODataRendererUtils.checkNotNull;
import static com.sdl.odata.ODataRendererUtils.isForceExpandParamSet;
import static com.sdl.odata.api.edm.model.MetaType.COMPLEX;
import static com.sdl.odata.api.edm.model.MetaType.ENTITY;
import static com.sdl.odata.api.parser.ODataUriUtil.asJavaList;
import static com.sdl.odata.api.parser.ODataUriUtil.getSimpleExpandPropertyNames;
import static com.sdl.odata.api.parser.ODataUriUtil.hasCountOption;
import static com.sdl.odata.util.edm.EntityDataModelUtil.formatEntityKey;
import static com.sdl.odata.util.edm.EntityDataModelUtil.getEntityName;
import static com.sdl.odata.util.edm.EntityDataModelUtil.visitProperties;
<<<<<<<
NavigationProperty navProperty = (NavigationProperty) property;
if (forceExpand || isExpandedProperty(navProperty)) {
=======
final NavigationProperty navProperty = (NavigationProperty) property;
if (isExpandedProperty(navProperty)) {
>>>>>>>
final NavigationProperty navProperty = (NavigationProperty) property;
if (forceExpand || isExpandedProperty(navProperty)) { |
<<<<<<<
LOG.debug("Given property is collection of complex values");
jsonGenerator.writeStartArray();
=======
LOG.trace("Given property is collection of complex values");
generator.writeStartArray();
>>>>>>>
LOG.trace("Given property is collection of complex values");
jsonGenerator.writeStartArray();
<<<<<<<
LOG.debug("Given property is single complex value");
writeAllProperties(data, type);
=======
LOG.trace("Given property is single complex value");
writeAllProperties(data, type, generator);
>>>>>>>
LOG.trace("Given property is single complex value");
writeAllProperties(data, type); |
<<<<<<<
new SimpleKeyPredicate(new StringLiteral("1")), noneSubPath);
EntityCollectionPath collectionPath = new EntityCollectionPath(none,
Option.<PathSegment>apply(keyPredicatePath));
=======
new SimpleKeyPredicate(new NumberLiteral(BigDecimal.valueOf(1))), noneSubPath);
EntityCollectionPath collectionPath = new EntityCollectionPath(none, Option.apply(keyPredicatePath));
>>>>>>>
new SimpleKeyPredicate(new StringLiteral("1")), noneSubPath);
EntityCollectionPath collectionPath = new EntityCollectionPath(none, Option.apply(keyPredicatePath)); |
<<<<<<<
String seamark();
=======
String errSaveChanges();
String applyToAllDevices();
>>>>>>>
String errSaveChanges();
String applyToAllDevices();
String seamark(); |
<<<<<<<
import org.gwtopenmaps.openlayers.client.Bounds;
=======
import com.sencha.gxt.data.shared.ListStore;
>>>>>>>
import com.sencha.gxt.data.shared.ListStore;
import org.gwtopenmaps.openlayers.client.Bounds;
<<<<<<<
public static native JSObject getTileURL() /*-{
return $wnd.getTileURL;
}-*/;
public MapView(MapHandler mapHandler) {
=======
public MapView(MapHandler mapHandler, ListStore<Device> deviceStore) {
>>>>>>>
public static native JSObject getTileURL() /*-{
return $wnd.getTileURL;
}-*/;
public MapView(MapHandler mapHandler, ListStore<Device> deviceStore) { |
<<<<<<<
Device removeDevice(Device device) throws AccessDeniedException;
=======
Boolean isDeviceUsedInEventRules(Device device);
Device removeDevice(Device device);
>>>>>>>
Boolean isDeviceUsedInEventRules(Device device);
Device removeDevice(Device device) throws AccessDeniedException; |
<<<<<<<
String importData();
String fileToImport();
String log();
String importingData();
=======
String changePassword();
String enterNewPassword(String p0);
>>>>>>>
String changePassword();
String enterNewPassword(String p0);
String importData();
String fileToImport();
String log();
String importingData(); |
<<<<<<<
String seamark();
=======
String disallowDeviceManagementByUsers();
String idleWhenSpeedIsLE();
>>>>>>>
String disallowDeviceManagementByUsers();
String idleWhenSpeedIsLE();
String seamark(); |
<<<<<<<
this.defaultUserSettingsHandler = defaultUserSettingsHandler;
=======
this.geoFenceController = geoFenceController;
this.deviceController = deviceController;
eventRuleHandler = new EventRuleHandlerImpl();
>>>>>>>
this.defaultUserSettingsHandler = defaultUserSettingsHandler;
this.geoFenceController = geoFenceController;
this.deviceController = deviceController;
eventRuleHandler = new EventRuleHandlerImpl();
<<<<<<<
@Override
public void onDefaultPreferencesSelected() {
Application.getDataService().getDefaultUserSettings(new BaseAsyncCallback<UserSettings>(i18n) {
@Override
public void onSuccess(UserSettings result) {
new UserSettingsDialog(result, defaultUserSettingsHandler).show();
}
});
}
=======
public static class EventRuleHandlerImpl implements UserDialog.EventRuleHandler {
final EventRuleServiceAsync service = GWT.create(EventRuleService.class);
private Messages i18n = GWT.create(Messages.class);
@Override
public void onShowEventRules(final ListStore<EventRule> eventRulesStore,User user) {
final EventRuleServiceAsync service = GWT.create(EventRuleService.class);
service.getEventRules(user, new BaseAsyncCallback<List<EventRule>>(i18n) {
@Override
public void onSuccess(List<EventRule> result) {
eventRulesStore.replaceAll(result);
}
});
}
@Override
public void onSave(final ListStore<EventRule> eventRulesStore, User user) {
for (Store<EventRule>.Record record : eventRulesStore.getModifiedRecords()) {
final EventRule originalEventRule = record.getModel();
EventRule eventRule = new EventRule().copyFromClient(originalEventRule);
for (Store.Change<EventRule, ?> change : record.getChanges()) {
change.modify(eventRule);
}
eventRule.setTimeZoneShift((long) new Date().getTimezoneOffset()*60*1000);
if (eventRule.getId() <= 0) {
eventRule.setId(0);
service.addEventRule(user, eventRule, new BaseAsyncCallback<EventRule>(i18n) {
@Override
public void onSuccess(EventRule result) {
eventRulesStore.remove(originalEventRule);
eventRulesStore.add(result);
}
});
} else {
service.updateEventRule(user, eventRule, new BaseAsyncCallback<EventRule>(i18n) {
@Override
public void onSuccess(EventRule result) {
eventRulesStore.update(result);
}
});
}
}
}
@Override
public void onRemove(final ListStore<EventRule> eventRulesStore, final EventRule eventRule) {
service.removeEventRule(eventRule, new BaseAsyncCallback<Void>(i18n) {
@Override
public void onSuccess(Void result) {
eventRulesStore.remove(eventRule);
}
});
}
}
>>>>>>>
@Override
public void onDefaultPreferencesSelected() {
Application.getDataService().getDefaultUserSettings(new BaseAsyncCallback<UserSettings>(i18n) {
@Override
public void onSuccess(UserSettings result) {
new UserSettingsDialog(result, defaultUserSettingsHandler).show();
}
});
}
public static class EventRuleHandlerImpl implements UserDialog.EventRuleHandler {
final EventRuleServiceAsync service = GWT.create(EventRuleService.class);
private Messages i18n = GWT.create(Messages.class);
@Override
public void onShowEventRules(final ListStore<EventRule> eventRulesStore,User user) {
final EventRuleServiceAsync service = GWT.create(EventRuleService.class);
service.getEventRules(user, new BaseAsyncCallback<List<EventRule>>(i18n) {
@Override
public void onSuccess(List<EventRule> result) {
eventRulesStore.replaceAll(result);
}
});
}
@Override
public void onSave(final ListStore<EventRule> eventRulesStore, User user) {
for (Store<EventRule>.Record record : eventRulesStore.getModifiedRecords()) {
final EventRule originalEventRule = record.getModel();
EventRule eventRule = new EventRule().copyFromClient(originalEventRule);
for (Store.Change<EventRule, ?> change : record.getChanges()) {
change.modify(eventRule);
}
eventRule.setTimeZoneShift((long) new Date().getTimezoneOffset()*60*1000);
if (eventRule.getId() <= 0) {
eventRule.setId(0);
service.addEventRule(user, eventRule, new BaseAsyncCallback<EventRule>(i18n) {
@Override
public void onSuccess(EventRule result) {
eventRulesStore.remove(originalEventRule);
eventRulesStore.add(result);
}
});
} else {
service.updateEventRule(user, eventRule, new BaseAsyncCallback<EventRule>(i18n) {
@Override
public void onSuccess(EventRule result) {
eventRulesStore.update(result);
}
});
}
}
}
@Override
public void onRemove(final ListStore<EventRule> eventRulesStore, final EventRule eventRule) {
service.removeEventRule(eventRule, new BaseAsyncCallback<Void>(i18n) {
@Override
public void onSuccess(Void result) {
eventRulesStore.remove(eventRule);
}
});
}
} |
<<<<<<<
String seamark();
=======
String deviceEventType(@Select DeviceEventType type);
String event();
String accessToken();
>>>>>>>
String deviceEventType(@Select DeviceEventType type);
String event();
String accessToken();
String seamark(); |
<<<<<<<
String zoomToTrack();
=======
String exportData();
String errNoDeviceNameOrId();
>>>>>>>
String zoomToTrack();
String exportData();
String errNoDeviceNameOrId(); |
<<<<<<<
odometer = device.odometer;
autoUpdateOdometer = device.autoUpdateOdometer;
maintenances = new ArrayList<Maintenance>(device.maintenances.size());
for (Maintenance maintenance : device.maintenances) {
maintenances.add(new Maintenance(maintenance));
}
=======
icon = device.getIcon();
>>>>>>>
icon = device.getIcon();
odometer = device.odometer;
autoUpdateOdometer = device.autoUpdateOdometer;
maintenances = new ArrayList<Maintenance>(device.maintenances.size());
for (Maintenance maintenance : device.maintenances) {
maintenances.add(new Maintenance(maintenance));
}
<<<<<<<
// contains current odometer value in kilometers
@Column(nullable = true)
private double odometer;
public double getOdometer() {
return odometer;
}
public void setOdometer(double odometer) {
this.odometer = odometer;
}
// indicates that odometer must be updated automatically by positions history
@Column(nullable = true)
private boolean autoUpdateOdometer;
public boolean isAutoUpdateOdometer() {
return autoUpdateOdometer;
}
public void setAutoUpdateOdometer(boolean autoUpdateOdometer) {
this.autoUpdateOdometer = autoUpdateOdometer;
}
@Transient
private List<Maintenance> maintenances;
public List<Maintenance> getMaintenances() {
return maintenances;
}
public void setMaintenances(List<Maintenance> maintenances) {
this.maintenances = maintenances;
}
=======
@Expose
@ManyToOne
@JoinColumn(foreignKey = @ForeignKey(name = "devices_fkey_icon_id"))
private DeviceIcon icon;
public DeviceIcon getIcon() {
return icon;
}
public void setIcon(DeviceIcon icon) {
this.icon = icon;
}
>>>>>>>
@Expose
@ManyToOne
@JoinColumn(foreignKey = @ForeignKey(name = "devices_fkey_icon_id"))
private DeviceIcon icon;
public DeviceIcon getIcon() {
return icon;
}
public void setIcon(DeviceIcon icon) {
this.icon = icon;
}
// contains current odometer value in kilometers
@Column(nullable = true)
private double odometer;
public double getOdometer() {
return odometer;
}
public void setOdometer(double odometer) {
this.odometer = odometer;
}
// indicates that odometer must be updated automatically by positions history
@Column(nullable = true)
private boolean autoUpdateOdometer;
public boolean isAutoUpdateOdometer() {
return autoUpdateOdometer;
}
public void setAutoUpdateOdometer(boolean autoUpdateOdometer) {
this.autoUpdateOdometer = autoUpdateOdometer;
}
@Transient
private List<Maintenance> maintenances;
public List<Maintenance> getMaintenances() {
return maintenances;
}
public void setMaintenances(List<Maintenance> maintenances) {
this.maintenances = maintenances;
} |
<<<<<<<
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
=======
>>>>>>>
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
<<<<<<<
public abstract <T> T accept(GeoJsonObjectVisitor<T> geoJsonObjectVisitor);
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (!(o instanceof GeoJsonObject))
return false;
GeoJsonObject that = (GeoJsonObject)o;
if (!Arrays.equals(bbox, that.bbox)) {
return false;
}
if (crs != null ? !crs.equals(that.crs) : that.crs != null) {
return false;
}
return !(properties != null ? !properties.equals(that.properties) : that.properties != null);
}
@Override
public int hashCode() {
int result = crs != null ? crs.hashCode() : 0;
result = 31 * result + (bbox != null ? Arrays.hashCode(bbox) : 0);
result = 31 * result + (properties != null ? properties.hashCode() : 0);
return result;
}
=======
@Override
public String toString() {
return "GeoJsonObject{" + "properties=" + properties + "}";
}
>>>>>>>
public abstract <T> T accept(GeoJsonObjectVisitor<T> geoJsonObjectVisitor);
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (!(o instanceof GeoJsonObject))
return false;
GeoJsonObject that = (GeoJsonObject)o;
if (!Arrays.equals(bbox, that.bbox)) {
return false;
}
if (crs != null ? !crs.equals(that.crs) : that.crs != null) {
return false;
}
return !(properties != null ? !properties.equals(that.properties) : that.properties != null);
}
@Override
public int hashCode() {
int result = crs != null ? crs.hashCode() : 0;
result = 31 * result + (bbox != null ? Arrays.hashCode(bbox) : 0);
result = 31 * result + (properties != null ? properties.hashCode() : 0);
return result;
}
@Override
public String toString() {
return "GeoJsonObject{" + "properties=" + properties + "}";
} |
<<<<<<<
private void whereClause(Context context, WhereClause whereClause) throws IOException {
if (whereClause.hasQuery()) {
visitor.process(whereClause.query(), context);
=======
private void whereClause(Context context, Optional<Function> whereClause) throws IOException {
context.builder.startObject("query");
if (whereClause.isPresent()) {
/**
* normalize to optimize queries like eq(1, 1)
*/
Symbol normalizedClause = normalizer.process(whereClause.get(), null);
visitor.process(normalizedClause, context);
>>>>>>>
private void whereClause(Context context, WhereClause whereClause) throws IOException {
context.builder.startObject("query");
if (whereClause.hasQuery()) {
visitor.process(whereClause.query(), context); |
<<<<<<<
=======
import org.cratedb.sql.TableUnknownException;
>>>>>>>
import org.cratedb.sql.TableUnknownException;
<<<<<<<
=======
import org.elasticsearch.indices.IndexMissingException;
>>>>>>>
import org.elasticsearch.indices.IndexMissingException;
<<<<<<<
=======
>>>>>>>
<<<<<<<
public NodeExecutionContext(IndicesService indicesService,
ClusterService clusterService,
AnalyzerService analyzerService,
QueryPlanner queryPlanner) {
this.indicesService = indicesService;
=======
public NodeExecutionContext(ClusterService clusterService,
IndicesService indicesService, QueryPlanner queryPlanner) {
>>>>>>>
public NodeExecutionContext(IndicesService indicesService,
ClusterService clusterService,
AnalyzerService analyzerService,
QueryPlanner queryPlanner) {
this.indicesService = indicesService;
<<<<<<<
this.analyzerService = analyzerService;
=======
this.indicesService = indicesService;
>>>>>>>
this.analyzerService = analyzerService; |
<<<<<<<
import org.cratedb.action.sql.analyzer.ClusterUpdateCrateSettingsAction;
import org.cratedb.action.sql.analyzer.TransportClusterUpdateCrateSettingsAction;
=======
import org.cratedb.service.SQLParseService;
>>>>>>>
import org.cratedb.action.sql.analyzer.ClusterUpdateCrateSettingsAction;
import org.cratedb.action.sql.analyzer.TransportClusterUpdateCrateSettingsAction;
import org.cratedb.service.SQLParseService; |
<<<<<<<
private final TransportBulkAction transportBulkAction;
=======
private final TransportDeleteByQueryAction transportDeleteByQueryAction;
>>>>>>>
private final TransportDeleteByQueryAction transportDeleteByQueryAction;
private final TransportBulkAction transportBulkAction;
<<<<<<<
TransportService transportService, TransportSearchAction transportSearchAction,
TransportIndexAction transportIndexAction, TransportBulkAction transportBulkAction) {
=======
TransportService transportService,
TransportSearchAction transportSearchAction,
TransportDeleteByQueryAction transportDeleteByQueryAction,
TransportIndexAction transportIndexAction) {
>>>>>>>
TransportService transportService,
TransportSearchAction transportSearchAction,
TransportDeleteByQueryAction transportDeleteByQueryAction,
TransportIndexAction transportIndexAction,
TransportBulkAction transportBulkAction) {
<<<<<<<
this.transportBulkAction = transportBulkAction;
=======
this.transportDeleteByQueryAction = transportDeleteByQueryAction;
>>>>>>>
this.transportDeleteByQueryAction = transportDeleteByQueryAction;
this.transportBulkAction = transportBulkAction;
<<<<<<<
private class BulkResponseListener implements ActionListener<BulkResponse> {
private final ActionListener<SQLResponse> delegate;
private final ParsedStatement stmt;
public BulkResponseListener(ParsedStatement stmt, ActionListener<SQLResponse> listener) {
delegate = listener;
this.stmt = stmt;
}
@Override
public void onResponse(BulkResponse bulkResponse) {
delegate.onResponse(stmt.buildResponse(bulkResponse));
}
@Override
public void onFailure(Throwable e) {
delegate.onFailure(e);
}
}
=======
private class DeleteResponseListener implements ActionListener<DeleteByQueryResponse> {
private final ActionListener<SQLResponse> delegate;
private final ParsedStatement stmt;
public DeleteResponseListener(ParsedStatement stmt, ActionListener<SQLResponse> listener) {
this.delegate = listener;
this.stmt = stmt;
}
@Override
public void onResponse(DeleteByQueryResponse deleteByQueryResponses) {
delegate.onResponse(stmt.buildResponse(deleteByQueryResponses));
}
@Override
public void onFailure(Throwable e) {
delegate.onFailure(e);
}
}
>>>>>>>
private class DeleteResponseListener implements ActionListener<DeleteByQueryResponse> {
private final ActionListener<SQLResponse> delegate;
private final ParsedStatement stmt;
public DeleteResponseListener(ParsedStatement stmt, ActionListener<SQLResponse> listener) {
this.delegate = listener;
this.stmt = stmt;
}
@Override
public void onResponse(DeleteByQueryResponse deleteByQueryResponses) {
delegate.onResponse(stmt.buildResponse(deleteByQueryResponses));
}
@Override
public void onFailure(Throwable e) {
delegate.onFailure(e);
}
}
private class BulkResponseListener implements ActionListener<BulkResponse> {
private final ActionListener<SQLResponse> delegate;
private final ParsedStatement stmt;
public BulkResponseListener(ParsedStatement stmt, ActionListener<SQLResponse> listener) {
delegate = listener;
this.stmt = stmt;
}
@Override
public void onResponse(BulkResponse bulkResponse) {
delegate.onResponse(stmt.buildResponse(bulkResponse));
}
@Override
public void onFailure(Throwable e) {
delegate.onFailure(e);
}
}
<<<<<<<
case ParsedStatement.BULK_ACTION:
BulkRequest bulkRequest = stmt.buildBulkRequest();
transportBulkAction.execute(bulkRequest, new BulkResponseListener(stmt, listener));
break;
=======
case NodeTypes.DELETE_NODE:
deleteRequest = stmt.buildDeleteRequest();
transportDeleteByQueryAction.execute(deleteRequest, new DeleteResponseListener(stmt, listener));
break;
>>>>>>>
case ParsedStatement.DELETE_ACTION:
deleteRequest = stmt.buildDeleteRequest();
transportDeleteByQueryAction.execute(deleteRequest, new DeleteResponseListener(stmt, listener));
break;
case ParsedStatement.BULK_ACTION:
BulkRequest bulkRequest = stmt.buildBulkRequest();
transportBulkAction.execute(bulkRequest, new BulkResponseListener(stmt, listener));
break; |
<<<<<<<
import org.cratedb.core.collections.LimitingCollectionIterator;
=======
import org.cratedb.core.concurrent.FutureConcurrentMap;
import org.cratedb.sql.CrateException;
import org.cratedb.sql.SQLReduceJobTimeoutException;
import org.elasticsearch.action.support.PlainListenableActionFuture;
import org.elasticsearch.cache.recycler.CacheRecycler;
>>>>>>>
import org.cratedb.core.collections.LimitingCollectionIterator;
import org.cratedb.core.concurrent.FutureConcurrentMap;
import org.cratedb.sql.CrateException;
import org.cratedb.sql.SQLReduceJobTimeoutException;
import org.elasticsearch.action.support.PlainListenableActionFuture;
import org.elasticsearch.cache.recycler.CacheRecycler;
<<<<<<<
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
=======
import java.util.UUID;
import java.util.concurrent.*;
import java.util.concurrent.atomic.AtomicInteger;
>>>>>>>
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
import java.util.UUID;
import java.util.concurrent.*;
import java.util.concurrent.atomic.AtomicInteger;
<<<<<<<
private Rows reducedRows;
private final AtomicInteger failures = new AtomicInteger(0);
CountDownLatch shardsToProcess;
=======
public final List<Integer> seenIdxMapper;
public ConcurrentMap<GroupByKey, GroupByRow> reducedResult;
private ReduceJobStatusContext reduceJobStatusContext;
private UUID contextId;
AtomicInteger shardsToProcess;
>>>>>>>
private Rows reducedRows;
private final AtomicInteger failures = new AtomicInteger(0);
private ReduceJobStatusContext reduceJobStatusContext;
private UUID contextId;
AtomicInteger shardsToProcess;
<<<<<<<
//this.reducedResult = ConcurrentCollections.newConcurrentMap();
this.shardsToProcess = new CountDownLatch(shardsToProcess);
=======
this.seenIdxMapper = GroupByHelper.getSeenIdxMap(parsedStatement.aggregateExpressions);
this.reducedResult = reducedResult;
>>>>>>> |
<<<<<<<
import io.crate.metadata.sys.SysNodesTableInfo;
=======
import io.crate.metadata.sys.SystemReferences;
import org.apache.lucene.util.BytesRef;
>>>>>>>
import io.crate.metadata.sys.SysNodesTableInfo;
import org.apache.lucene.util.BytesRef; |
<<<<<<<
private final PageCacheRecycler pageCacheRecycler;
private final Functions functions;
private final ReferenceResolver referenceResolver;
=======
>>>>>>>
private final PageCacheRecycler pageCacheRecycler; |
<<<<<<<
import io.crate.exceptions.SchemaUnknownException;
import io.crate.exceptions.TableUnknownException;
import io.crate.testing.MockedClusterServiceModule;
=======
>>>>>>>
import io.crate.testing.MockedClusterServiceModule; |
<<<<<<<
import io.crate.analyze.CreateTableAnalysis;
import io.crate.analyze.CreateTableStatementAnalyzer;
import io.crate.metadata.*;
import io.crate.metadata.table.SchemaInfo;
import io.crate.sql.parser.SqlParser;
import io.crate.sql.tree.Statement;
import io.crate.types.DataTypes;
import io.crate.types.GeoPointType;
import org.elasticsearch.action.admin.indices.template.put.TransportPutIndexTemplateAction;
import org.elasticsearch.cluster.ClusterService;
=======
import io.crate.DataType;
import io.crate.metadata.ColumnIdent;
import io.crate.metadata.ReferenceInfo;
import io.crate.metadata.TableIdent;
import org.elasticsearch.action.admin.indices.template.put.PutIndexTemplateRequest;
import org.elasticsearch.action.admin.indices.template.put.TransportPutIndexTemplateAction;
import org.elasticsearch.cluster.metadata.AliasMetaData;
>>>>>>>
import io.crate.analyze.CreateTableAnalysis;
import io.crate.analyze.CreateTableStatementAnalyzer;
import io.crate.metadata.*;
import io.crate.metadata.table.SchemaInfo;
import io.crate.sql.parser.SqlParser;
import io.crate.sql.tree.Statement;
import io.crate.types.DataTypes;
import io.crate.types.GeoPointType;
import org.elasticsearch.action.admin.indices.template.put.PutIndexTemplateRequest;
import org.elasticsearch.action.admin.indices.template.put.TransportPutIndexTemplateAction;
import org.elasticsearch.cluster.ClusterService;
import org.elasticsearch.cluster.metadata.AliasMetaData;
<<<<<<<
import static org.mockito.Mockito.mock;
=======
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
>>>>>>>
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
<<<<<<<
@Test
public void testGeoPointType() throws Exception {
Statement statement = SqlParser.createStatement("create table foo (p geo_point)");
CreateTableStatementAnalyzer analyzer = new CreateTableStatementAnalyzer();
ClusterService clusterService = mock(ClusterService.class);
CreateTableAnalysis analysis = new CreateTableAnalysis(
new ReferenceInfos(
ImmutableMap.<String, SchemaInfo>of("doc", new DocSchemaInfo(clusterService, mock(TransportPutIndexTemplateAction.class)))),
new FulltextAnalyzerResolver(clusterService, mock(IndicesAnalysisService.class)),
new Object[0]
);
ImmutableSettings.Builder settingsBuilder = ImmutableSettings.builder()
.put("index.number_of_shards", 1)
.put("index.number_of_replicas", 0)
.put(analysis.indexSettings());
analyzer.process(statement, analysis);
IndexMetaData indexMetaData = IndexMetaData.builder(analysis.tableIdent().name())
.settings(settingsBuilder)
.putMapping(new MappingMetaData(Constants.DEFAULT_MAPPING_TYPE, analysis.mapping()))
.build();
DocIndexMetaData md = newMeta(indexMetaData, "foo");
assertThat(md.columns().size(), is(1));
ReferenceInfo referenceInfo = md.columns().get(0);
assertThat((GeoPointType) referenceInfo.type(), equalTo(DataTypes.GEO_POINT));
}
=======
@Test
public void testTemplateUpdate() throws Exception {
// regression test: alias must be set in the updated template
Settings settings = ImmutableSettings.builder()
.put("index.number_of_shards", 1)
.put("index.number_of_replicas", 0)
.build();
IndexMetaData md1 = IndexMetaData.builder("t1")
.settings(settings)
.build();
DocIndexMetaData docIndexMd1 = new DocIndexMetaData(md1, new TableIdent("doc", "t1")).build();
XContentBuilder builder = XContentFactory.jsonBuilder()
.startObject()
.startObject("properties")
.startObject("id")
.field("type", "integer")
.endObject()
.endObject()
.endObject();
DocIndexMetaData docIndexMd2 = newMeta(getIndexMetaData(
"t2", builder, ImmutableSettings.EMPTY, AliasMetaData.builder("tables").build()), "t2");
TransportPutIndexTemplateAction transportPutIndexTemplateAction = mock(TransportPutIndexTemplateAction.class);
ArgumentCaptor<PutIndexTemplateRequest> argumentCaptor = ArgumentCaptor.forClass(PutIndexTemplateRequest.class);
docIndexMd1.merge(docIndexMd2, transportPutIndexTemplateAction, true);
verify(transportPutIndexTemplateAction).execute(argumentCaptor.capture());
PutIndexTemplateRequest request = argumentCaptor.getValue();
Field aliasesField = PutIndexTemplateRequest.class.getDeclaredField("aliases");
aliasesField.setAccessible(true);
Set aliases = (Set)aliasesField.get(request);
assertThat(aliases.size(), is(1));
}
>>>>>>>
@Test
public void testGeoPointType() throws Exception {
Statement statement = SqlParser.createStatement("create table foo (p geo_point)");
CreateTableStatementAnalyzer analyzer = new CreateTableStatementAnalyzer();
ClusterService clusterService = mock(ClusterService.class);
CreateTableAnalysis analysis = new CreateTableAnalysis(
new ReferenceInfos(
ImmutableMap.<String, SchemaInfo>of("doc", new DocSchemaInfo(clusterService, mock(TransportPutIndexTemplateAction.class)))),
new FulltextAnalyzerResolver(clusterService, mock(IndicesAnalysisService.class)),
new Object[0]
);
ImmutableSettings.Builder settingsBuilder = ImmutableSettings.builder()
.put("index.number_of_shards", 1)
.put("index.number_of_replicas", 0)
.put(analysis.indexSettings());
analyzer.process(statement, analysis);
IndexMetaData indexMetaData = IndexMetaData.builder(analysis.tableIdent().name())
.settings(settingsBuilder)
.putMapping(new MappingMetaData(Constants.DEFAULT_MAPPING_TYPE, analysis.mapping()))
.build();
DocIndexMetaData md = newMeta(indexMetaData, "foo");
assertThat(md.columns().size(), is(1));
ReferenceInfo referenceInfo = md.columns().get(0);
assertThat((GeoPointType) referenceInfo.type(), equalTo(DataTypes.GEO_POINT));
}
@Test
public void testTemplateUpdate() throws Exception {
// regression test: alias must be set in the updated template
Settings settings = ImmutableSettings.builder()
.put("index.number_of_shards", 1)
.put("index.number_of_replicas", 0)
.build();
IndexMetaData md1 = IndexMetaData.builder("t1")
.settings(settings)
.build();
DocIndexMetaData docIndexMd1 = new DocIndexMetaData(md1, new TableIdent("doc", "t1")).build();
XContentBuilder builder = XContentFactory.jsonBuilder()
.startObject()
.startObject("properties")
.startObject("id")
.field("type", "integer")
.endObject()
.endObject()
.endObject();
DocIndexMetaData docIndexMd2 = newMeta(getIndexMetaData(
"t2", builder, ImmutableSettings.EMPTY, AliasMetaData.builder("tables").build()), "t2");
TransportPutIndexTemplateAction transportPutIndexTemplateAction = mock(TransportPutIndexTemplateAction.class);
ArgumentCaptor<PutIndexTemplateRequest> argumentCaptor = ArgumentCaptor.forClass(PutIndexTemplateRequest.class);
docIndexMd1.merge(docIndexMd2, transportPutIndexTemplateAction, true);
verify(transportPutIndexTemplateAction).execute(argumentCaptor.capture());
PutIndexTemplateRequest request = argumentCaptor.getValue();
Field aliasesField = PutIndexTemplateRequest.class.getDeclaredField("aliases");
aliasesField.setAccessible(true);
Set aliases = (Set)aliasesField.get(request);
assertThat(aliases.size(), is(1));
} |
<<<<<<<
=======
import org.elasticsearch.action.admin.indices.template.put.TransportPutIndexTemplateAction;
import org.elasticsearch.cluster.ClusterService;
import org.elasticsearch.cluster.ClusterState;
import org.elasticsearch.cluster.metadata.IndexTemplateMetaData;
import org.elasticsearch.cluster.metadata.MetaData;
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.common.collect.ImmutableOpenMap;
import org.elasticsearch.common.inject.AbstractModule;
>>>>>>>
<<<<<<<
=======
/**
* borrowed from {@link io.crate.operation.reference.sys.TestGlobalSysExpressions}
* // TODO share it
*/
static class TestModule extends AbstractModule {
@Override
protected void configure() {
ClusterService clusterService = mock(ClusterService.class);
ClusterState state = mock(ClusterState.class);
MetaData metaData = mock(MetaData.class);
when(metaData.settings()).thenReturn(ImmutableSettings.EMPTY);
when(metaData.persistentSettings()).thenReturn(ImmutableSettings.EMPTY);
when(metaData.transientSettings()).thenReturn(ImmutableSettings.EMPTY);
when(metaData.concreteAllOpenIndices()).thenReturn(new String[0]);
when(metaData.getTemplates()).thenReturn(ImmutableOpenMap.<String, IndexTemplateMetaData>of());
when(metaData.templates()).thenReturn(ImmutableOpenMap.<String, IndexTemplateMetaData>of());
when(state.metaData()).thenReturn(metaData);
when(clusterService.state()).thenReturn(state);
bind(ClusterService.class).toInstance(clusterService);
bind(Settings.class).toInstance(ImmutableSettings.EMPTY);
OsService osService = mock(OsService.class);
OsStats osStats = mock(OsStats.class);
when(osService.stats()).thenReturn(osStats);
when(osStats.loadAverage()).thenReturn(new double[]{1, 5, 15});
bind(OsService.class).toInstance(osService);
Discovery discovery = mock(Discovery.class);
bind(Discovery.class).toInstance(discovery);
DiscoveryNode node = mock(DiscoveryNode.class);
when(discovery.localNode()).thenReturn(node);
when(node.getId()).thenReturn("node-id-1");
when(node.getName()).thenReturn("node 1");
bind(TransportPutIndexTemplateAction.class).toInstance(mock(TransportPutIndexTemplateAction.class));
}
}
>>>>>>> |
<<<<<<<
import org.elasticsearch.client.Client;
import org.elasticsearch.cluster.ClusterService;
=======
import org.elasticsearch.cluster.ClusterService;
>>>>>>>
import org.elasticsearch.cluster.ClusterService;
<<<<<<<
StatsTables statsTables,
ClusterService clusterService) {
=======
StatsTables statsTables) {
this.clusterService = clusterService;
this.settings = settings;
this.transportShardBulkAction = transportShardBulkAction;
>>>>>>>
StatsTables statsTables,
ClusterService clusterService) {
this.settings = settings;
this.transportShardBulkAction = transportShardBulkAction;
<<<<<<<
this.clientProvider = clientProvider;
=======
this.transportCreateAliasAction = transportCreateAliasAction;
>>>>>>> |
<<<<<<<
=======
import io.crate.planner.symbol.Reference;
import io.crate.planner.symbol.Symbol;
import io.crate.planner.symbol.SymbolFormatter;
import io.crate.planner.symbol.SymbolVisitor;
>>>>>>>
<<<<<<<
=======
class Context {
final public List<Reference> outputs = new ArrayList<>();
final public Set<String> indices = new HashSet<>();
}
static class Visitor extends SymbolVisitor<Context, Void> {
@Override
public Void visitReference(Reference symbol, Context context) {
context.outputs.add(symbol);
context.indices.add(symbol.info().ident().tableIdent().name());
return null;
}
@Override
protected Void visitSymbol(Symbol symbol, Context context) {
throw new UnsupportedOperationException(SymbolFormatter.format("Symbol %s not supported", symbol));
}
}
>>>>>>> |
<<<<<<<
import io.crate.PartitionName;
import io.crate.analyze.WhereClause;
=======
import io.crate.metadata.PartitionName;
import io.crate.analyze.AbstractDataAnalyzedStatement;
>>>>>>>
import io.crate.analyze.WhereClause;
import io.crate.metadata.PartitionName;
<<<<<<<
tableInfo.ident().name(), partitionIdent).stringValue());
=======
analysis.table().ident().schema(), analysis.table().ident().name(), partitionIdent).stringValue());
>>>>>>>
tableInfo.ident().schema(), tableInfo.ident().name(), partitionIdent).stringValue()); |
<<<<<<<
private static PrimaryKeyVisitor primaryKeyVisitor = new PrimaryKeyVisitor();
private static OutputNameFormatter outputNameFormatter = new OutputNameFormatter();
=======
protected static OutputNameFormatter outputNameFormatter = new OutputNameFormatter();
>>>>>>>
protected static OutputNameFormatter outputNameFormatter = new OutputNameFormatter();
<<<<<<<
protected Symbol visitQualifiedNameReference(QualifiedNameReference node, Analysis context) {
Symbol symbol = context.symbolFromAlias(node.getSuffix().getSuffix());
if (symbol != null) {
return symbol;
}
ReferenceIdent ident;
List<String> parts = node.getName().getParts();
switch (parts.size()) {
case 1:
ident = new ReferenceIdent(context.table().ident(), parts.get(0));
break;
case 3:
ident = new ReferenceIdent(new TableIdent(parts.get(0), parts.get(1)), parts.get(2));
break;
default:
throw new UnsupportedOperationException("unsupported name reference: " + node);
}
return context.allocateReference(ident);
}
@Override
protected Symbol visitSubscriptExpression(SubscriptExpression node, Analysis context) {
=======
protected Symbol visitSubscriptExpression(SubscriptExpression node, T context) {
>>>>>>>
protected Symbol visitSubscriptExpression(SubscriptExpression node, T context) {
<<<<<<<
protected Symbol visitLogicalBinaryExpression(LogicalBinaryExpression node, Analysis context) {
=======
protected Symbol visitLogicalBinaryExpression(LogicalBinaryExpression node, T context) {
List<Symbol> arguments = new ArrayList<>(2);
arguments.add(process(node.getLeft(), context));
arguments.add(process(node.getRight(), context));
>>>>>>>
protected Symbol visitLogicalBinaryExpression(LogicalBinaryExpression node, T context) { |
<<<<<<<
// Crate Analyzer
public static final int CREATE_ANALYZER_NODE = 242;
public static final int ANALYZER_ELEMENTS = 243;
public static final int TOKEN_FILTER_NODE = 244;
public static final int TOKEN_FILTER_LIST = 245;
public static final int CHAR_FILTER_NODE = 246;
public static final int CHAR_FILTER_LIST = 247;
public static final int GENERIC_PROPERTIES = 248;
public static final int NAMED_NODE_WITH_OPTIONAL_PROPERTIES = 249;
=======
// Crate Analyzer
public static final int CREATE_ANALYZER_NODE = 242;
public static final int ANALYZER_ELEMENTS = 243;
public static final int TOKEN_FILTER_LIST = 244;
public static final int CHAR_FILTER_LIST = 245;
public static final int GENERIC_PROPERTIES = 246;
public static final int NAMED_NODE_WITH_OPTIONAL_PROPERTIES = 247;
public static final int TOKENIZER_NODE = 248;
>>>>>>>
// Crate Analyzer
public static final int CREATE_ANALYZER_NODE = 242;
public static final int ANALYZER_ELEMENTS = 243;
public static final int TOKEN_FILTER_LIST = 245;
public static final int CHAR_FILTER_LIST = 247;
public static final int GENERIC_PROPERTIES = 248;
public static final int NAMED_NODE_WITH_OPTIONAL_PROPERTIES = 249;
<<<<<<<
public static final int FINAL_VALUE = NAMED_NODE_WITH_OPTIONAL_PROPERTIES;
=======
public static final int FINAL_VALUE = TOKENIZER_NODE;
>>>>>>>
public static final int FINAL_VALUE = NAMED_NODE_WITH_OPTIONAL_PROPERTIES; |
<<<<<<<
import io.crate.testing.TestingHelpers;
=======
import org.apache.lucene.util.BytesRef;
>>>>>>>
import io.crate.testing.TestingHelpers;
import org.apache.lucene.util.BytesRef; |
<<<<<<<
String node2 = setUpSecondNode();
wipeIndices("users");
=======
setUpSecondNode();
>>>>>>>
setUpSecondNode();
wipeIndices("users"); |
<<<<<<<
final MediationBannerListener mediationBannerListener, final Bundle serverParameters,
final AdSize adSize, MediationAdRequest mediationAdRequest, Bundle mediationExtras) {
=======
final MediationBannerListener mediationBannerListener,
final Bundle serverParameters, AdSize adSize,
MediationAdRequest mediationAdRequest, final Bundle mediationExtras) {
>>>>>>>
final MediationBannerListener mediationBannerListener,
final Bundle serverParameters, final AdSize adSize,
MediationAdRequest mediationAdRequest, final Bundle mediationExtras) { |
<<<<<<<
=======
// TODO(ad): Also send the validated chain
>>>>>>>
<<<<<<<
final PinFailureReport report = new PinFailureReport(appPackageName, appVersion,
appVendorId, BuildConfig.VERSION_NAME, serverHostname, serverPort,
serverConfig.getNotedHostname(), serverConfig.isIncludeSubdomains(),
serverConfig.isEnforcePinning(), servedCertificateChainAsPem,
validatedCertificateChainAsPem, new Date(System.currentTimeMillis()),
serverConfig.getPublicKeyHashes(), validationResult);
=======
final PinFailureReport report = new PinFailureReport.Builder()
.appBundleId(appPackageName)
.appVersion(appVersion)
.appPlatform(APP_PLATFORM)
.appVendorId(appVendorId)
// TODO(ad): Put the right version number
.trustKitVersion("123")
.hostname(serverHostname)
.port(serverPort)
.dateTime(new Date(System.currentTimeMillis()))
.notedHostname(serverConfig.getNotedHostname())
.includeSubdomains(serverConfig.isIncludeSubdomains())
.enforcePinning(serverConfig.shouldEnforcePinning())
.validatedCertificateChain(certificateChainAsPem.toArray(new String[certificateChainAsPem.size()]))
.knownPins(serverConfig.getPublicKeyHashes())
.validationResult(validationResult).build();
>>>>>>>
final PinFailureReport report = new PinFailureReport(appPackageName, appVersion,
appVendorId, BuildConfig.VERSION_NAME, serverHostname, serverPort,
serverConfig.getNotedHostname(), serverConfig.isIncludeSubdomains(),
serverConfig.isEnforcePinning(), servedCertificateChainAsPem,
validatedCertificateChainAsPem, new Date(System.currentTimeMillis()),
serverConfig.getPublicKeyHashes(), validationResult); |
<<<<<<<
=======
final HashSet<URL> reportUriSet = (HashSet<URL>) serverConfig.getReportUris();
>>>>>>>
final HashSet<URL> reportUriSet = (HashSet<URL>) serverConfig.getReportUris(); |
<<<<<<<
case KPlayerCallback.SHOULD_PLAY:
=======
case KPlayerController.SHOULD_PLAY:
isIMAActive = false;
>>>>>>>
case KPlayerCallback.SHOULD_PLAY:
isIMAActive = false;
<<<<<<<
case KPlayerCallback.SHOULD_PAUSE:
=======
case KPlayerController.SHOULD_PAUSE:
isIMAActive = true;
>>>>>>>
case KPlayerCallback.SHOULD_PAUSE:
isIMAActive = true; |
<<<<<<<
private Timer mTimer;
private int mStartPos = 0;
=======
private int mStartPos = 0;
private Handler mHandler;
private Runnable runnable = new Runnable() {
@Override
public void run() {
try {
int position = getCurrentPosition();
if ( position != 0 && mPlayheadUpdateListener != null && isPlaying() )
mPlayheadUpdateListener.onPlayheadUpdated(position);
} catch(IllegalStateException e){
e.printStackTrace();
}
mHandler.postDelayed(this, PLAYHEAD_UPDATE_INTERVAL);
}
};
>>>>>>>
private int mStartPos = 0;
private Handler mHandler;
private Runnable runnable = new Runnable() {
@Override
public void run() {
try {
int position = getCurrentPosition();
if ( position != 0 && mPlayheadUpdateListener != null && isPlaying() )
mPlayheadUpdateListener.onPlayheadUpdated(position);
} catch(IllegalStateException e){
e.printStackTrace();
}
mHandler.postDelayed(this, PLAYHEAD_UPDATE_INTERVAL);
}
};
<<<<<<<
=======
>>>>>>>
<<<<<<<
@Override
public void setStartingPoint(int point) {
mStartPos = point;
}
@Override
public void removePlayheadUpdateListener() {
mPlayheadUpdateListener = null;
}
=======
>>>>>>> |
<<<<<<<
=======
import com.udacity.exploreindia.ui.home.HomeActivity;
import com.udacity.exploreindia.helper.SharedPrefManager;
>>>>>>>
import com.udacity.exploreindia.ui.home.HomeActivity;
import com.udacity.exploreindia.helper.SharedPrefManager; |
<<<<<<<
import android.content.Intent;
=======
import android.content.Context;
import android.content.Intent;
import android.graphics.Typeface;
>>>>>>>
import android.content.Intent;
import android.content.Context;
import android.content.Intent;
import android.graphics.Typeface;
<<<<<<<
import com.udacity.exploreindia.ui.home.HomeActivity;
=======
import com.udacity.exploreindia.helper.CustomDialog;
import com.udacity.exploreindia.helper.SharedPrefManager;
import com.udacity.exploreindia.helper.Utils;
import com.udacity.exploreindia.ui.home.HomeActivity;
import com.udacity.exploreindia.ui.login.LoginActivity;
>>>>>>>
import com.udacity.exploreindia.ui.home.HomeActivity;
import com.udacity.exploreindia.helper.SharedPrefManager;
import com.udacity.exploreindia.helper.Utils;
import com.udacity.exploreindia.ui.home.HomeActivity;
import com.udacity.exploreindia.ui.login.LoginActivity;
<<<<<<<
public void moveToNextSScreen() {
Intent intent = new Intent(this, HomeActivity.class);
finish();
startActivity(intent);
=======
public void setAnimation() {
// Set font in Title
Typeface typeface = Typeface.createFromAsset(getAssets(), "fonts/samarn.TTF");
getDataBinder().title.setTypeface(typeface);
Animation animation = AnimationUtils.loadAnimation(getBaseContext(), R.anim.anim_fade_in_rotate_clockwise);
// rotate Left upper image
getDataBinder().imageLeft.setAnimation(animation);
// rotate Right upper image
getDataBinder().imageRight.setAnimation(animation);
getDataBinder().frameLogo.animate().alpha(1).setDuration(1000);
>>>>>>>
public void moveToLoginScreen() {
Intent intent = new Intent(this, LoginActivity.class);
Utils.finishEntryAnimation(this, intent);
}
public void setAnimation() {
// Set font in Title
Typeface typeface = Typeface.createFromAsset(getAssets(), "fonts/samarn.TTF");
getDataBinder().title.setTypeface(typeface);
Animation animation = AnimationUtils.loadAnimation(getBaseContext(), R.anim.anim_fade_in_rotate_clockwise);
// rotate Left upper image
getDataBinder().imageLeft.setAnimation(animation);
// rotate Right upper image
getDataBinder().imageRight.setAnimation(animation);
// fadeIn Image on splash
getDataBinder().frameLogo.animate().alpha(1).setDuration(1000); |
<<<<<<<
=======
if(savedInstanceState == null){
getSupportFragmentManager().beginTransaction()
.add(R.id.fragment_container, new LikedPlacesFragment())
.commit();
}
>>>>>>>
if(savedInstanceState == null){
getSupportFragmentManager().beginTransaction()
.add(R.id.fragment_container, new LikedPlacesFragment())
.commit();
} |
<<<<<<<
import com.openerp.R;
=======
import com.odoo.support.listview.OListAdapter.OnSearchChange;
>>>>>>>
import com.odoo.support.listview.OListAdapter.OnSearchChange;
import com.openerp.R; |
<<<<<<<
=======
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.R;
=======
import com.odoo.util.ODate;
>>>>>>>
import com.odoo.util.ODate;
import com.openerp.R; |
<<<<<<<
import android.view.View;
=======
>>>>>>>
<<<<<<<
import com.odoo.util.OControls;
import com.openerp.R;
=======
import com.openerp.R;
>>>>>>>
import com.openerp.R; |
<<<<<<<
public ODataRow selectRelRecord(String[] columns, int base_id) {
ODataRow row = new ODataRow();
for (String col : columns) {
OColumn column = getColumn(col);
if (column.getRelationType() != null) {
switch (column.getRelationType()) {
case ManyToMany:
row.put(column.getName(), new OM2MRecord(this, column,
base_id));
break;
case OneToMany:
row.put(column.getName(), new OO2MRecord(this, column,
base_id));
break;
case ManyToOne:
row.put(column.getName(), new OM2ORecord(this, column,
base_id));
break;
}
}
}
return row;
}
=======
>>>>>>> |
<<<<<<<
import com.odoo.util.drawer.DrawerListener;
import com.openerp.OETouchListener;
import com.openerp.R;
=======
>>>>>>>
import com.openerp.R; |
<<<<<<<
/**
* AsyncTask quick task helper
*/
protected class BackgroundTask extends AsyncTask<Void, Void, Object> {
AsyncTaskListener mListener = null;
public BackgroundTask(AsyncTaskListener listener) {
mListener = listener;
}
@Override
protected Object doInBackground(Void... params) {
if (mListener != null) {
return mListener.onPerformTask();
}
return null;
}
@Override
protected void onPostExecute(Object result) {
super.onPostExecute(result);
if (mListener != null) {
mListener.onFinish(result);
}
}
}
public BackgroundTask newBackgroundTask(AsyncTaskListener taskListener) {
return new BackgroundTask(taskListener);
}
public PreferenceManager getPref() {
return new PreferenceManager(getActivity());
}
=======
>>>>>>> |
<<<<<<<
=======
>>>>>>>
<<<<<<<
handleArguments((Bundle) getArguments());
=======
>>>>>>>
<<<<<<<
=======
>>>>>>> |
<<<<<<<
=======
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.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 boolean hasSameMaterial(MaterialConfig config) {
if(this.getMaterialConfig() == null)
return false;
return this.getMaterialConfig().equals(config);
}
public boolean hasMaterialWithFingerprint(String fingerprint) {
if (this.getMaterialConfig() == null) {
return false;
}
String materialFingerprint = this.getMaterialConfig().getFingerprint();
return materialFingerprint.equals(fingerprint);
}
=======
private void validateAutoUpdateState(ValidationContext validationContext) {
if(validationContext == null)
return;
MaterialConfig material = this.getMaterialConfig();
MaterialConfigs allMaterialsByFingerPrint = validationContext.getAllMaterialsByFingerPrint(material.getFingerprint());
if (allMaterialsByFingerPrint != null) {
for(MaterialConfig other : allMaterialsByFingerPrint)
{
if(!other.isAutoUpdate())
((ScmMaterialConfig) other).setAutoUpdateMismatchErrorWithConfigRepo();
}
}
}
>>>>>>>
public boolean hasSameMaterial(MaterialConfig config) {
if(this.getMaterialConfig() == null)
return false;
return this.getMaterialConfig().equals(config);
}
public boolean hasMaterialWithFingerprint(String fingerprint) {
if (this.getMaterialConfig() == null) {
return false;
}
String materialFingerprint = this.getMaterialConfig().getFingerprint();
return materialFingerprint.equals(fingerprint);
}
private void validateAutoUpdateState(ValidationContext validationContext) {
if(validationContext == null)
return;
MaterialConfig material = this.getMaterialConfig();
MaterialConfigs allMaterialsByFingerPrint = validationContext.getAllMaterialsByFingerPrint(material.getFingerprint());
if (allMaterialsByFingerPrint != null) {
for(MaterialConfig other : allMaterialsByFingerPrint)
{
if(!other.isAutoUpdate())
((ScmMaterialConfig) other).setAutoUpdateMismatchErrorWithConfigRepo();
}
}
} |
<<<<<<<
import com.thoughtworks.go.config.PipelineConfig;
=======
import com.thoughtworks.go.config.remote.ConfigRepoConfig;
>>>>>>>
import com.thoughtworks.go.config.PipelineConfig;
import com.thoughtworks.go.config.remote.ConfigRepoConfig; |
<<<<<<<
import io.subutai.core.hubmanager.impl.processor.port_map.ContainerPortMapProcessor;
=======
import io.subutai.core.hubmanager.impl.processor.ContainerEventProcessor;
import io.subutai.core.hubmanager.impl.processor.EnvironmentUserHelper;
import io.subutai.core.hubmanager.impl.processor.HeartbeatProcessor;
import io.subutai.core.hubmanager.impl.processor.HubLoggerProcessor;
import io.subutai.core.hubmanager.impl.processor.PeerMetricsProcessor;
import io.subutai.core.hubmanager.impl.processor.ProductProcessor;
import io.subutai.core.hubmanager.impl.processor.RegistrationRequestProcessor;
import io.subutai.core.hubmanager.impl.processor.ResourceHostDataProcessor;
import io.subutai.core.hubmanager.impl.processor.ResourceHostRegisterProcessor;
import io.subutai.core.hubmanager.impl.processor.SystemConfProcessor;
import io.subutai.core.hubmanager.impl.processor.VersionInfoProcessor;
import io.subutai.core.hubmanager.impl.processor.port_map.ContainerPortMapProcessor;
>>>>>>>
import io.subutai.core.hubmanager.impl.processor.ContainerEventProcessor;
import io.subutai.core.hubmanager.impl.processor.EnvironmentUserHelper;
import io.subutai.core.hubmanager.impl.processor.HeartbeatProcessor;
import io.subutai.core.hubmanager.impl.processor.HubLoggerProcessor;
import io.subutai.core.hubmanager.impl.processor.PeerMetricsProcessor;
import io.subutai.core.hubmanager.impl.processor.ProductProcessor;
import io.subutai.core.hubmanager.impl.processor.RegistrationRequestProcessor;
import io.subutai.core.hubmanager.impl.processor.ResourceHostDataProcessor;
import io.subutai.core.hubmanager.impl.processor.ResourceHostRegisterProcessor;
import io.subutai.core.hubmanager.impl.processor.SystemConfProcessor;
import io.subutai.core.hubmanager.impl.processor.VersionInfoProcessor;
import io.subutai.core.hubmanager.impl.processor.port_map.ContainerPortMapProcessor;
<<<<<<<
.addProcessor( commandProcessor )
.addProcessor( containerPortMapProcessor )
.addProcessor( userTokenProcessor );
=======
.addProcessor( containerPortMapProcessor );
>>>>>>>
.addProcessor( containerPortMapProcessor )
.addProcessor( userTokenProcessor ); |
<<<<<<<
import io.subutai.core.environment.impl.workflow.destruction.steps.RemoveKeysStep;
import io.subutai.core.object.relation.api.RelationManager;
=======
>>>>>>>
import io.subutai.core.object.relation.api.RelationManager; |
<<<<<<<
import io.subutai.core.peer.impl.command.CommandRequest;
import io.subutai.core.peer.impl.container.DestroyEnvironmentContainersResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.common.base.Preconditions;
import com.google.common.base.Strings;
import com.google.common.collect.Maps;
import com.google.common.reflect.TypeToken;
=======
>>>>>>>
import io.subutai.core.peer.impl.command.CommandRequest;
import io.subutai.core.peer.impl.container.DestroyEnvironmentContainersResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.common.base.Preconditions;
import com.google.common.base.Strings;
import com.google.common.collect.Maps;
import com.google.common.reflect.TypeToken;
<<<<<<<
/* ***************************************************
*
*/
=======
private String buildPath( String path )
{
return String.format( "%s/%s", baseUrl, path.startsWith( "/" ) ? path.substring( 1 ) : path );
}
@Override
public Set<Interface> getNetworkInterfaces( final InterfacePattern pattern )
{
Preconditions.checkNotNull( pattern, "Pattern could not be null" );
String path = buildPath( "peer/interfaces" );
//TODO: implement as singleton
List<Object> providers = new ArrayList<Object>();
providers.add( new JacksonJaxbJsonProvider() );
WebClient client =
restUtil.createTrustedWebClientWithAuthAndProviders( path, SecuritySettings.KEYSTORE_PX2_ROOT_ALIAS,
providers );
client.type( MediaType.APPLICATION_JSON );
client.accept( MediaType.APPLICATION_JSON );
Collection interfaces = client.postAndGetCollection( pattern, HostInterface.class );
LOG.debug( String.format( "%d", interfaces.size() ) );
return new HashSet<Interface>( interfaces );
}
@Override
public void addToN2NTunnel( final N2NConfig config )
{
LOG.debug( String.format( "Adding remote peer to n2n community: %s:%d %s %s %s", config.getSuperNodeIp(),
config.getN2NPort(), config.getInterfaceName(), config.getCommunityName(), config.getAddress() ) );
String path = "peer/n2ntunnel";
LOG.debug( String.format( "%s %s %s", peerInfo.getIp(), peerInfo.getPort(), baseUrl ) );
//TODO: implement as singleton
List<Object> providers = new ArrayList<Object>();
providers.add( new JacksonJaxbJsonProvider() );
WebClient client = restUtil.createTrustedWebClientWithAuthAndProviders( buildPath( path ),
SecuritySettings.KEYSTORE_PX2_ROOT_ALIAS, providers );
client.type( MediaType.APPLICATION_JSON );
client.accept( MediaType.APPLICATION_JSON );
Response response = client.post( config );
LOG.debug( String.format( "%s", response ) );
}
>>>>>>>
/* ***************************************************
*
*/
private String buildPath( String path )
{
return String.format( "%s/%s", baseUrl, path.startsWith( "/" ) ? path.substring( 1 ) : path );
}
@Override
public Set<Interface> getNetworkInterfaces( final InterfacePattern pattern )
{
Preconditions.checkNotNull( pattern, "Pattern could not be null" );
String path = buildPath( "peer/interfaces" );
//TODO: implement as singleton
List<Object> providers = new ArrayList<Object>();
providers.add( new JacksonJaxbJsonProvider() );
WebClient client =
restUtil.createTrustedWebClientWithAuthAndProviders( path, SecuritySettings.KEYSTORE_PX2_ROOT_ALIAS,
providers );
client.type( MediaType.APPLICATION_JSON );
client.accept( MediaType.APPLICATION_JSON );
Collection interfaces = client.postAndGetCollection( pattern, HostInterface.class );
LOG.debug( String.format( "%d", interfaces.size() ) );
return new HashSet<Interface>( interfaces );
}
@Override
public void addToN2NTunnel( final N2NConfig config )
{
LOG.debug( String.format( "Adding remote peer to n2n community: %s:%d %s %s %s", config.getSuperNodeIp(),
config.getN2NPort(), config.getInterfaceName(), config.getCommunityName(), config.getAddress() ) );
String path = "peer/n2ntunnel";
LOG.debug( String.format( "%s %s %s", peerInfo.getIp(), peerInfo.getPort(), baseUrl ) );
//TODO: implement as singleton
List<Object> providers = new ArrayList<Object>();
providers.add( new JacksonJaxbJsonProvider() );
WebClient client = restUtil.createTrustedWebClientWithAuthAndProviders( buildPath( path ),
SecuritySettings.KEYSTORE_PX2_ROOT_ALIAS, providers );
client.type( MediaType.APPLICATION_JSON );
client.accept( MediaType.APPLICATION_JSON );
Response response = client.post( config );
LOG.debug( String.format( "%s", response ) );
} |
<<<<<<<
=======
import org.safehaus.subutai.core.environment.api.EnvironmentManager;
import org.safehaus.subutai.core.peer.api.ContainerHost;
>>>>>>>
import org.safehaus.subutai.core.environment.api.EnvironmentManager;
import org.safehaus.subutai.core.peer.api.ContainerHost;
<<<<<<<
=======
private final EnvironmentManager environmentManager;
>>>>>>>
private final EnvironmentManager environmentManager;
<<<<<<<
=======
this.environmentManager = serviceLocator.getService( EnvironmentManager.class );
>>>>>>>
this.environmentManager = serviceLocator.getService( EnvironmentManager.class );
<<<<<<<
String lxcHostname =
( String ) table.getItem( event.getItemId() ).getItemProperty( "Host" ).getValue();
//TODO please use ContainerHost.isConnected method here to check of host is connected
// Agent lxcAgent = agentManager.getAgentByHostname( lxcHostname );
// if ( lxcAgent != null )
// {
// // TerminalWindow terminal =
// // new TerminalWindow( Sets.newHashSet(
// lxcAgent ),
// // executorService, commandRunner,
// // agentManager );
// // contentRoot.getUI().addWindow( terminal
// .getWindow() );
// }
// else
// {
// show( "Agent is not connected" );
// }
=======
String containerId =
( String ) table.getItem( event.getItemId() ).getItemProperty( HOST_COLUMN_CAPTION )
.getValue();
Set<ContainerHost> containerHosts =
environmentManager.getEnvironmentByUUID( mongoClusterConfig.getEnvironmentId() )
.getContainers();
Iterator iterator = containerHosts.iterator();
ContainerHost containerHost = null;
while ( iterator.hasNext() )
{
containerHost = ( ContainerHost ) iterator.next();
if ( containerHost.getId().equals( UUID.fromString( containerId ) ) )
{
break;
}
}
if ( containerHost != null )
{
TerminalWindow terminal = new TerminalWindow( containerHosts );
contentRoot.getUI().addWindow( terminal.getWindow() );
}
else
{
show( "Agent is not connected" );
}
>>>>>>>
String containerId =
( String ) table.getItem( event.getItemId() ).getItemProperty( HOST_COLUMN_CAPTION )
.getValue();
Set<ContainerHost> containerHosts =
environmentManager.getEnvironmentByUUID( mongoClusterConfig.getEnvironmentId() ).getContainerHosts();
Iterator iterator = containerHosts.iterator();
ContainerHost containerHost = null;
while ( iterator.hasNext() )
{
containerHost = ( ContainerHost ) iterator.next();
if ( containerHost.getId().equals( UUID.fromString( containerId ) ) )
{
break;
}
}
if ( containerHost != null )
{
TerminalWindow terminal = new TerminalWindow( containerHost );
contentRoot.getUI().addWindow( terminal.getWindow() );
}
else
{
show( "Agent is not connected" );
}
<<<<<<<
private void populateTable( final Table table, Set nodes, final NodeType nodeType )
{
=======
private void populateTable( final Table table, Set nodes, final NodeType nodeType )
{
table.removeAllItems();
for ( final Object o : nodes )
{
final MongoNode node = ( MongoNode ) o;
final Label resultHolder = new Label();
final Button checkBtn = new Button( CHECK_BUTTON_CAPTION );
checkBtn.setId( node.getAgent().getListIP().get( 0 ) + "-mongoCheck" );
final Button startBtn = new Button( START_BUTTON_CAPTION );
startBtn.setId( node.getAgent().getListIP().get( 0 ) + "-mongoStart" );
final Button stopBtn = new Button( STOP_BUTTON_CAPTION );
stopBtn.setId( node.getAgent().getListIP().get( 0 ) + "mongoStop" );
final Button destroyBtn = new Button( DESTROY_BUTTON_CAPTION );
destroyBtn.setId( node.getAgent().getListIP().get( 0 ) + "mongoDestroy" );
stopBtn.setEnabled( false );
startBtn.setEnabled( false );
addStyleNameToButtons( checkBtn, startBtn, stopBtn, destroyBtn );
final HorizontalLayout availableOperations = new HorizontalLayout();
availableOperations.addStyleName( "default" );
availableOperations.setSpacing( true );
>>>>>>>
private void populateTable( final Table table, Set nodes, final NodeType nodeType )
{
table.removeAllItems();
for ( final Object o : nodes )
{
final MongoNode node = ( MongoNode ) o;
final Label resultHolder = new Label();
final Button checkBtn = new Button( CHECK_BUTTON_CAPTION );
checkBtn.setId( node.getContainerHost().getIpByInterfaceName( "eth0" ) + "-mongoCheck" );
final Button startBtn = new Button( START_BUTTON_CAPTION );
startBtn.setId( node.getContainerHost().getIpByInterfaceName( "eth0" ) + "-mongoStart" );
final Button stopBtn = new Button( STOP_BUTTON_CAPTION );
stopBtn.setId(node.getContainerHost().getIpByInterfaceName( "eth0" ) + "mongoStop" );
final Button destroyBtn = new Button( DESTROY_BUTTON_CAPTION );
destroyBtn.setId( node.getContainerHost().getIpByInterfaceName( "eth0" ) + "mongoDestroy" );
stopBtn.setEnabled( false );
startBtn.setEnabled( false );
addStyleNameToButtons( checkBtn, startBtn, stopBtn, destroyBtn );
final HorizontalLayout availableOperations = new HorizontalLayout();
availableOperations.addStyleName( "default" );
availableOperations.setSpacing( true ); |
<<<<<<<
public Response processRegisterRequest( @FormParam( "peer" ) String peer );
=======
public Response processRegisterRequest( @FormParam( "peer" ) String peer,
@FormParam( "root_cert_px2" ) String root_cert_px2 );
>>>>>>>
public Response processRegisterRequest( @FormParam( "peer" ) String peer,
@FormParam( "root_cert_px2" ) String root_cert_px2 );
public Response processRegisterRequest( @FormParam( "peer" ) String peer );
<<<<<<<
public Response updatePeer( @FormParam( "peer" ) String peer, @FormParam( "key" ) String key );
=======
public Response updatePeer( @FormParam( "peer" ) String peer,
@FormParam( "root_cert_px2" ) String root_cert_px2 );
>>>>>>>
public Response updatePeer( @FormParam( "peer" ) String peer,
@FormParam( "root_cert_px2" ) String root_cert_px2 ); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.