repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
partition
stringclasses
1 value
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/internal/AbstractPendingLinkingCandidate.java
AbstractPendingLinkingCandidate.getFeatureTypeParametersAsString
protected String getFeatureTypeParametersAsString(boolean showBounds) { List<JvmTypeParameter> typeParameters = getDeclaredTypeParameters(); if(!typeParameters.isEmpty()) { StringBuilder b = new StringBuilder(); b.append("<"); for(int i=0; i<typeParameters.size(); ++i) { JvmTypeParameter typeParameter ...
java
protected String getFeatureTypeParametersAsString(boolean showBounds) { List<JvmTypeParameter> typeParameters = getDeclaredTypeParameters(); if(!typeParameters.isEmpty()) { StringBuilder b = new StringBuilder(); b.append("<"); for(int i=0; i<typeParameters.size(); ++i) { JvmTypeParameter typeParameter ...
[ "protected", "String", "getFeatureTypeParametersAsString", "(", "boolean", "showBounds", ")", "{", "List", "<", "JvmTypeParameter", ">", "typeParameters", "=", "getDeclaredTypeParameters", "(", ")", ";", "if", "(", "!", "typeParameters", ".", "isEmpty", "(", ")", ...
Returns the unresolved string representation of the unresolved type parameters of the feature. The simple names of the type bounds are used. The string representation includes the angle brackets.
[ "Returns", "the", "unresolved", "string", "representation", "of", "the", "unresolved", "type", "parameters", "of", "the", "feature", ".", "The", "simple", "names", "of", "the", "type", "bounds", "are", "used", ".", "The", "string", "representation", "includes", ...
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/internal/AbstractPendingLinkingCandidate.java#L170-L188
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/internal/AbstractPendingLinkingCandidate.java
AbstractPendingLinkingCandidate.getTypeArgumentsAsString
protected String getTypeArgumentsAsString(List<? extends LightweightTypeReference> typeArguments) { if(!typeArguments.isEmpty()) { StringBuilder b = new StringBuilder(); b.append("<"); for(int i=0; i<typeArguments.size(); ++i) { b.append(typeArguments.get(i).getHumanReadableName()); if(i < typeArgume...
java
protected String getTypeArgumentsAsString(List<? extends LightweightTypeReference> typeArguments) { if(!typeArguments.isEmpty()) { StringBuilder b = new StringBuilder(); b.append("<"); for(int i=0; i<typeArguments.size(); ++i) { b.append(typeArguments.get(i).getHumanReadableName()); if(i < typeArgume...
[ "protected", "String", "getTypeArgumentsAsString", "(", "List", "<", "?", "extends", "LightweightTypeReference", ">", "typeArguments", ")", "{", "if", "(", "!", "typeArguments", ".", "isEmpty", "(", ")", ")", "{", "StringBuilder", "b", "=", "new", "StringBuilder...
Returns the resolved string representation of the type arguments. The simple names of the types are used. The string representation includes the angle brackets.
[ "Returns", "the", "resolved", "string", "representation", "of", "the", "type", "arguments", ".", "The", "simple", "names", "of", "the", "types", "are", "used", ".", "The", "string", "representation", "includes", "the", "angle", "brackets", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/internal/AbstractPendingLinkingCandidate.java#L225-L238
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/internal/AbstractPendingLinkingCandidate.java
AbstractPendingLinkingCandidate.getPreferredCandidate
@Override public ILinkingCandidate getPreferredCandidate(ILinkingCandidate other) { if (other instanceof AbstractPendingLinkingCandidate) { AbstractPendingLinkingCandidate<?> right = (AbstractPendingLinkingCandidate<?>) other; CandidateCompareResult candidateCompareResult = compareTo(right); switch(candidat...
java
@Override public ILinkingCandidate getPreferredCandidate(ILinkingCandidate other) { if (other instanceof AbstractPendingLinkingCandidate) { AbstractPendingLinkingCandidate<?> right = (AbstractPendingLinkingCandidate<?>) other; CandidateCompareResult candidateCompareResult = compareTo(right); switch(candidat...
[ "@", "Override", "public", "ILinkingCandidate", "getPreferredCandidate", "(", "ILinkingCandidate", "other", ")", "{", "if", "(", "other", "instanceof", "AbstractPendingLinkingCandidate", ")", "{", "AbstractPendingLinkingCandidate", "<", "?", ">", "right", "=", "(", "A...
Returns the best candidate considering the this and the given other candidate. The result is not necessarily this or the other, but may also be a third instance, e.g. in order to disambiguate certain error conditions.
[ "Returns", "the", "best", "candidate", "considering", "the", "this", "and", "the", "given", "other", "candidate", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/internal/AbstractPendingLinkingCandidate.java#L481-L499
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/internal/AbstractPendingLinkingCandidate.java
AbstractPendingLinkingCandidate.getArityMismatch
public int getArityMismatch() { JvmIdentifiableElement identifiable = getFeature(); if (identifiable instanceof JvmExecutable) { return getArityMismatch((JvmExecutable) identifiable, getArguments()); } else if (getExpression() instanceof XAssignment) { return getArguments().size() - 1; } else { return ...
java
public int getArityMismatch() { JvmIdentifiableElement identifiable = getFeature(); if (identifiable instanceof JvmExecutable) { return getArityMismatch((JvmExecutable) identifiable, getArguments()); } else if (getExpression() instanceof XAssignment) { return getArguments().size() - 1; } else { return ...
[ "public", "int", "getArityMismatch", "(", ")", "{", "JvmIdentifiableElement", "identifiable", "=", "getFeature", "(", ")", ";", "if", "(", "identifiable", "instanceof", "JvmExecutable", ")", "{", "return", "getArityMismatch", "(", "(", "JvmExecutable", ")", "ident...
Returns the mismatch of actually given arguments and declared parameters. Receivers and staticness of the feature is taken into account, too. The mismatch may either be negative or positive.
[ "Returns", "the", "mismatch", "of", "actually", "given", "arguments", "and", "declared", "parameters", ".", "Receivers", "and", "staticness", "of", "the", "feature", "is", "taken", "into", "account", "too", ".", "The", "mismatch", "may", "either", "be", "negat...
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/internal/AbstractPendingLinkingCandidate.java#L1142-L1151
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/xtend-gen/org/eclipse/xtext/xbase/compiler/LoopExtensions.java
LoopExtensions.forEach
public <T extends Object> void forEach(final ITreeAppendable appendable, final Iterable<T> elements, final Procedure1<? super LoopParams> loopInitializer, final Procedure1<? super T> procedure) { boolean _isEmpty = IterableExtensions.isEmpty(elements); if (_isEmpty) { return; } LoopParams _loopPar...
java
public <T extends Object> void forEach(final ITreeAppendable appendable, final Iterable<T> elements, final Procedure1<? super LoopParams> loopInitializer, final Procedure1<? super T> procedure) { boolean _isEmpty = IterableExtensions.isEmpty(elements); if (_isEmpty) { return; } LoopParams _loopPar...
[ "public", "<", "T", "extends", "Object", ">", "void", "forEach", "(", "final", "ITreeAppendable", "appendable", ",", "final", "Iterable", "<", "T", ">", "elements", ",", "final", "Procedure1", "<", "?", "super", "LoopParams", ">", "loopInitializer", ",", "fi...
Iterates elements and execute the procedure. A prefix, a separator and a suffix can be initialized with the loopInitializer lambda.
[ "Iterates", "elements", "and", "execute", "the", "procedure", ".", "A", "prefix", "a", "separator", "and", "a", "suffix", "can", "be", "initialized", "with", "the", "loopInitializer", "lambda", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/xtend-gen/org/eclipse/xtext/xbase/compiler/LoopExtensions.java#L26-L42
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/xtend-gen/org/eclipse/xtext/xbase/compiler/LoopExtensions.java
LoopExtensions.forEachWithShortcut
public <T extends Object> void forEachWithShortcut(final ITreeAppendable appendable, final Iterable<T> elements, final Procedure1<? super T> procedure) { int _size = IterableExtensions.size(elements); boolean _equals = (_size == 1); if (_equals) { T _head = IterableExtensions.<T>head(elements); ...
java
public <T extends Object> void forEachWithShortcut(final ITreeAppendable appendable, final Iterable<T> elements, final Procedure1<? super T> procedure) { int _size = IterableExtensions.size(elements); boolean _equals = (_size == 1); if (_equals) { T _head = IterableExtensions.<T>head(elements); ...
[ "public", "<", "T", "extends", "Object", ">", "void", "forEachWithShortcut", "(", "final", "ITreeAppendable", "appendable", ",", "final", "Iterable", "<", "T", ">", "elements", ",", "final", "Procedure1", "<", "?", "super", "T", ">", "procedure", ")", "{", ...
Uses curly braces and comma as delimiters. Doesn't use them for single valued iterables.
[ "Uses", "curly", "braces", "and", "comma", "as", "delimiters", ".", "Doesn", "t", "use", "them", "for", "single", "valued", "iterables", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/xtend-gen/org/eclipse/xtext/xbase/compiler/LoopExtensions.java#L47-L63
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/scoping/batch/AbstractSessionBasedScope.java
AbstractSessionBasedScope.processAsPropertyNames
protected void processAsPropertyNames(QualifiedName name, NameAcceptor acceptor) { String nameAsPropertyName = tryGetAsPropertyName(name.toString()); if (nameAsPropertyName != null) { if (featureCall == null || featureCall instanceof XAssignment) { String aliasedSetter = "set" + nameAsPropertyName; accep...
java
protected void processAsPropertyNames(QualifiedName name, NameAcceptor acceptor) { String nameAsPropertyName = tryGetAsPropertyName(name.toString()); if (nameAsPropertyName != null) { if (featureCall == null || featureCall instanceof XAssignment) { String aliasedSetter = "set" + nameAsPropertyName; accep...
[ "protected", "void", "processAsPropertyNames", "(", "QualifiedName", "name", ",", "NameAcceptor", "acceptor", ")", "{", "String", "nameAsPropertyName", "=", "tryGetAsPropertyName", "(", "name", ".", "toString", "(", ")", ")", ";", "if", "(", "nameAsPropertyName", ...
Considers the given name to be a property name. If the concrete syntax of the processed feature matches a feature call or assignment, a prefix is added to the name and that one is used as a variant that should be processed.
[ "Considers", "the", "given", "name", "to", "be", "a", "property", "name", ".", "If", "the", "concrete", "syntax", "of", "the", "processed", "feature", "matches", "a", "feature", "call", "or", "assignment", "a", "prefix", "is", "added", "to", "the", "name",...
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/scoping/batch/AbstractSessionBasedScope.java#L86-L102
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/override/ResolvedFeatures.java
ResolvedFeatures.handleOverridesAndConflicts
private boolean handleOverridesAndConflicts(JvmOperation operation, Multimap<String, AbstractResolvedOperation> processedOperations) { String simpleName = operation.getSimpleName(); if (!processedOperations.containsKey(simpleName)) { return true; } List<AbstractResolvedOperation> conflictingOperations = null...
java
private boolean handleOverridesAndConflicts(JvmOperation operation, Multimap<String, AbstractResolvedOperation> processedOperations) { String simpleName = operation.getSimpleName(); if (!processedOperations.containsKey(simpleName)) { return true; } List<AbstractResolvedOperation> conflictingOperations = null...
[ "private", "boolean", "handleOverridesAndConflicts", "(", "JvmOperation", "operation", ",", "Multimap", "<", "String", ",", "AbstractResolvedOperation", ">", "processedOperations", ")", "{", "String", "simpleName", "=", "operation", ".", "getSimpleName", "(", ")", ";"...
When the inherited operations are computed for Java 8, we have to check for conflicting default interface method implementations.
[ "When", "the", "inherited", "operations", "are", "computed", "for", "Java", "8", "we", "have", "to", "check", "for", "conflicting", "default", "interface", "method", "implementations", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/override/ResolvedFeatures.java#L353-L408
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/references/UnboundTypeReference.java
UnboundTypeReference.create
public static UnboundTypeReference create(ITypeExpectation expectation, XExpression expression, JvmTypeParameter typeParameter) { return expectation.createUnboundTypeReference(expression, typeParameter); }
java
public static UnboundTypeReference create(ITypeExpectation expectation, XExpression expression, JvmTypeParameter typeParameter) { return expectation.createUnboundTypeReference(expression, typeParameter); }
[ "public", "static", "UnboundTypeReference", "create", "(", "ITypeExpectation", "expectation", ",", "XExpression", "expression", ",", "JvmTypeParameter", "typeParameter", ")", "{", "return", "expectation", ".", "createUnboundTypeReference", "(", "expression", ",", "typePar...
Create a new, managed unbound type reference for the given type parameter which was first encountered for the given expression. @param expression the expression that used / referenced the type parameter @param typeParameter the type parameter @param expectation the decision path that uses the type parameter
[ "Create", "a", "new", "managed", "unbound", "type", "reference", "for", "the", "given", "type", "parameter", "which", "was", "first", "encountered", "for", "the", "given", "expression", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/references/UnboundTypeReference.java#L84-L86
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/references/UnboundTypeReference.java
UnboundTypeReference.tryResolve
public void tryResolve(boolean constraintsAreSignificant) { if (internalIsResolved()) return; List<LightweightBoundTypeArgument> hints = getAllHints(); if (!hints.isEmpty() && hasSignificantHints(hints, constraintsAreSignificant)) { resolveWithHints(hints); } }
java
public void tryResolve(boolean constraintsAreSignificant) { if (internalIsResolved()) return; List<LightweightBoundTypeArgument> hints = getAllHints(); if (!hints.isEmpty() && hasSignificantHints(hints, constraintsAreSignificant)) { resolveWithHints(hints); } }
[ "public", "void", "tryResolve", "(", "boolean", "constraintsAreSignificant", ")", "{", "if", "(", "internalIsResolved", "(", ")", ")", "return", ";", "List", "<", "LightweightBoundTypeArgument", ">", "hints", "=", "getAllHints", "(", ")", ";", "if", "(", "!", ...
Try to resolve this reference iff there are hints available. May be invoked multiple times since it will simply returns if the reference is already resolved. The caller can decide whether type constraints are considered to be significant hints or not.
[ "Try", "to", "resolve", "this", "reference", "iff", "there", "are", "hints", "available", ".", "May", "be", "invoked", "multiple", "times", "since", "it", "will", "simply", "returns", "if", "the", "reference", "is", "already", "resolved", ".", "The", "caller...
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/references/UnboundTypeReference.java#L135-L142
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/references/UnboundTypeReference.java
UnboundTypeReference.canResolveTo
public boolean canResolveTo(LightweightTypeReference reference) { if (internalIsResolved()) return reference.isAssignableFrom(resolvedTo, new TypeConformanceComputationArgument(false, true, true, true, false, false /* TODO do we need to support synonmys here? */)); List<LightweightBoundTypeArgument> hints = getA...
java
public boolean canResolveTo(LightweightTypeReference reference) { if (internalIsResolved()) return reference.isAssignableFrom(resolvedTo, new TypeConformanceComputationArgument(false, true, true, true, false, false /* TODO do we need to support synonmys here? */)); List<LightweightBoundTypeArgument> hints = getA...
[ "public", "boolean", "canResolveTo", "(", "LightweightTypeReference", "reference", ")", "{", "if", "(", "internalIsResolved", "(", ")", ")", "return", "reference", ".", "isAssignableFrom", "(", "resolvedTo", ",", "new", "TypeConformanceComputationArgument", "(", "fals...
Returns true if the existing hints would allow to resolve to the given reference.
[ "Returns", "true", "if", "the", "existing", "hints", "would", "allow", "to", "resolve", "to", "the", "given", "reference", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/references/UnboundTypeReference.java#L147-L155
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/references/UnboundTypeReference.java
UnboundTypeReference.resolve
public LightweightTypeReference resolve() { if (internalIsResolved()) return resolvedTo; List<LightweightBoundTypeArgument> allHints = getAllHints(); if (!allHints.isEmpty() && resolveWithHints(allHints)) { LightweightTypeReference result = internalGetResolvedTo(); if (result != null) { return result...
java
public LightweightTypeReference resolve() { if (internalIsResolved()) return resolvedTo; List<LightweightBoundTypeArgument> allHints = getAllHints(); if (!allHints.isEmpty() && resolveWithHints(allHints)) { LightweightTypeReference result = internalGetResolvedTo(); if (result != null) { return result...
[ "public", "LightweightTypeReference", "resolve", "(", ")", "{", "if", "(", "internalIsResolved", "(", ")", ")", "return", "resolvedTo", ";", "List", "<", "LightweightBoundTypeArgument", ">", "allHints", "=", "getAllHints", "(", ")", ";", "if", "(", "!", "allHi...
Force this reference to be resolved. If not hints are available, the reference is resolved to the constraints of the type parameters. @return the resolved representation. Never <code>null</code>.
[ "Force", "this", "reference", "to", "be", "resolved", ".", "If", "not", "hints", "are", "available", "the", "reference", "is", "resolved", "to", "the", "constraints", "of", "the", "type", "parameters", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/references/UnboundTypeReference.java#L266-L278
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/compiler/AbstractXbaseCompiler.java
AbstractXbaseCompiler.compile
public ITreeAppendable compile(XBlockExpression expr, ITreeAppendable b, LightweightTypeReference expectedReturnType) { final boolean isPrimitiveVoidExpected = expectedReturnType.isPrimitiveVoid(); final boolean isPrimitiveVoid = isPrimitiveVoid(expr); final boolean earlyExit = isEarlyExit(expr); final boolean...
java
public ITreeAppendable compile(XBlockExpression expr, ITreeAppendable b, LightweightTypeReference expectedReturnType) { final boolean isPrimitiveVoidExpected = expectedReturnType.isPrimitiveVoid(); final boolean isPrimitiveVoid = isPrimitiveVoid(expr); final boolean earlyExit = isEarlyExit(expr); final boolean...
[ "public", "ITreeAppendable", "compile", "(", "XBlockExpression", "expr", ",", "ITreeAppendable", "b", ",", "LightweightTypeReference", "expectedReturnType", ")", "{", "final", "boolean", "isPrimitiveVoidExpected", "=", "expectedReturnType", ".", "isPrimitiveVoid", "(", ")...
this one trims the outer block
[ "this", "one", "trims", "the", "outer", "block" ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/compiler/AbstractXbaseCompiler.java#L374-L394
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/compiler/AbstractXbaseCompiler.java
AbstractXbaseCompiler.isVariableDeclarationRequired
@Deprecated protected final boolean isVariableDeclarationRequired(XExpression expr, ITreeAppendable b) { return isVariableDeclarationRequired(expr, b, true); }
java
@Deprecated protected final boolean isVariableDeclarationRequired(XExpression expr, ITreeAppendable b) { return isVariableDeclarationRequired(expr, b, true); }
[ "@", "Deprecated", "protected", "final", "boolean", "isVariableDeclarationRequired", "(", "XExpression", "expr", ",", "ITreeAppendable", "b", ")", "{", "return", "isVariableDeclarationRequired", "(", "expr", ",", "b", ",", "true", ")", ";", "}" ]
whether an expression needs to be declared in a statement If an expression has side effects this method must return true for it. @param expr the checked expression @param b the appendable which represents the current compiler state @deprecated use {@link #isVariableDeclarationRequired(XExpression, ITreeAppendable, bool...
[ "whether", "an", "expression", "needs", "to", "be", "declared", "in", "a", "statement", "If", "an", "expression", "has", "side", "effects", "this", "method", "must", "return", "true", "for", "it", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/compiler/AbstractXbaseCompiler.java#L661-L664
train
highsource/jaxb2-basics
tools/src/main/java/org/jvnet/jaxb2_commons/plugin/AbstractParameterizablePlugin.java
AbstractParameterizablePlugin.parseArgument
public int parseArgument(Options opt, String[] args, int start) throws BadCommandLineException, IOException { int consumed = 0; final String optionPrefix = "-" + getOptionName() + "-"; final int optionPrefixLength = optionPrefix.length(); final String arg = args[start]; final int equalsPosition = arg.ind...
java
public int parseArgument(Options opt, String[] args, int start) throws BadCommandLineException, IOException { int consumed = 0; final String optionPrefix = "-" + getOptionName() + "-"; final int optionPrefixLength = optionPrefix.length(); final String arg = args[start]; final int equalsPosition = arg.ind...
[ "public", "int", "parseArgument", "(", "Options", "opt", ",", "String", "[", "]", "args", ",", "int", "start", ")", "throws", "BadCommandLineException", ",", "IOException", "{", "int", "consumed", "=", "0", ";", "final", "String", "optionPrefix", "=", "\"-\"...
Parses the arguments and injects values into the beans via properties.
[ "Parses", "the", "arguments", "and", "injects", "values", "into", "the", "beans", "via", "properties", "." ]
571cca0ce58a75d984324d33d8af453bf5862e75
https://github.com/highsource/jaxb2-basics/blob/571cca0ce58a75d984324d33d8af453bf5862e75/tools/src/main/java/org/jvnet/jaxb2_commons/plugin/AbstractParameterizablePlugin.java#L29-L54
train
pac4j/spring-security-pac4j
src/main/java/org/pac4j/springframework/security/util/SpringSecurityHelper.java
SpringSecurityHelper.buildAuthorities
public static List<GrantedAuthority> buildAuthorities(final List<CommonProfile> profiles) { final List<GrantedAuthority> authorities = new ArrayList<>(); for (final CommonProfile profile : profiles) { final Set<String> roles = profile.getRoles(); for (final String role : roles) {...
java
public static List<GrantedAuthority> buildAuthorities(final List<CommonProfile> profiles) { final List<GrantedAuthority> authorities = new ArrayList<>(); for (final CommonProfile profile : profiles) { final Set<String> roles = profile.getRoles(); for (final String role : roles) {...
[ "public", "static", "List", "<", "GrantedAuthority", ">", "buildAuthorities", "(", "final", "List", "<", "CommonProfile", ">", "profiles", ")", "{", "final", "List", "<", "GrantedAuthority", ">", "authorities", "=", "new", "ArrayList", "<>", "(", ")", ";", "...
Build a list of authorities from a list of profiles. @param profiles a map of profiles @return a list of authorities
[ "Build", "a", "list", "of", "authorities", "from", "a", "list", "of", "profiles", "." ]
5beaea9c9667a60dc933fa9738a5bfe24830c63d
https://github.com/pac4j/spring-security-pac4j/blob/5beaea9c9667a60dc933fa9738a5bfe24830c63d/src/main/java/org/pac4j/springframework/security/util/SpringSecurityHelper.java#L39-L48
train
pac4j/spring-security-pac4j
src/main/java/org/pac4j/springframework/security/util/SpringSecurityHelper.java
SpringSecurityHelper.populateAuthentication
public static void populateAuthentication(final LinkedHashMap<String, CommonProfile> profiles) { if (profiles != null && profiles.size() > 0) { final List<CommonProfile> listProfiles = ProfileHelper.flatIntoAProfileList(profiles); try { if (IS_FULLY_AUTHENTICATED_AUTHORIZ...
java
public static void populateAuthentication(final LinkedHashMap<String, CommonProfile> profiles) { if (profiles != null && profiles.size() > 0) { final List<CommonProfile> listProfiles = ProfileHelper.flatIntoAProfileList(profiles); try { if (IS_FULLY_AUTHENTICATED_AUTHORIZ...
[ "public", "static", "void", "populateAuthentication", "(", "final", "LinkedHashMap", "<", "String", ",", "CommonProfile", ">", "profiles", ")", "{", "if", "(", "profiles", "!=", "null", "&&", "profiles", ".", "size", "(", ")", ">", "0", ")", "{", "final", ...
Populate the authenticated user profiles in the Spring Security context. @param profiles the linked hashmap of profiles
[ "Populate", "the", "authenticated", "user", "profiles", "in", "the", "Spring", "Security", "context", "." ]
5beaea9c9667a60dc933fa9738a5bfe24830c63d
https://github.com/pac4j/spring-security-pac4j/blob/5beaea9c9667a60dc933fa9738a5bfe24830c63d/src/main/java/org/pac4j/springframework/security/util/SpringSecurityHelper.java#L55-L68
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleEditorInterfaces.java
ModuleEditorInterfaces.update
public CMAEditorInterface update(CMAEditorInterface editor) { final String spaceId = getSpaceIdOrThrow(editor, "editor"); if (editor.getSystem().getContentType() == null) { throw new IllegalArgumentException("ContentType of editor interface may not be null!"); } if (editor.getSystem().getContentTy...
java
public CMAEditorInterface update(CMAEditorInterface editor) { final String spaceId = getSpaceIdOrThrow(editor, "editor"); if (editor.getSystem().getContentType() == null) { throw new IllegalArgumentException("ContentType of editor interface may not be null!"); } if (editor.getSystem().getContentTy...
[ "public", "CMAEditorInterface", "update", "(", "CMAEditorInterface", "editor", ")", "{", "final", "String", "spaceId", "=", "getSpaceIdOrThrow", "(", "editor", ",", "\"editor\"", ")", ";", "if", "(", "editor", ".", "getSystem", "(", ")", ".", "getContentType", ...
Update an editor interface. @param editor the editor interface to be updated on Contentful. @return the updated editor interface. @throws IllegalArgumentException if editors spaceId is null. @throws IllegalArgumentException if editors contentType is null. @throws IllegalArgumentException if editors contentTypeId is nu...
[ "Update", "an", "editor", "interface", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleEditorInterfaces.java#L104-L124
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleWebhooks.java
ModuleWebhooks.delete
public Integer delete(CMAWebhook webhook) { final String webhookId = getResourceIdOrThrow(webhook, "webhook"); final String spaceId = getSpaceIdOrThrow(webhook, "webhook"); return service.delete(spaceId, webhookId).blockingFirst().code(); }
java
public Integer delete(CMAWebhook webhook) { final String webhookId = getResourceIdOrThrow(webhook, "webhook"); final String spaceId = getSpaceIdOrThrow(webhook, "webhook"); return service.delete(spaceId, webhookId).blockingFirst().code(); }
[ "public", "Integer", "delete", "(", "CMAWebhook", "webhook", ")", "{", "final", "String", "webhookId", "=", "getResourceIdOrThrow", "(", "webhook", ",", "\"webhook\"", ")", ";", "final", "String", "spaceId", "=", "getSpaceIdOrThrow", "(", "webhook", ",", "\"webh...
Delete a given Webhook. @param webhook actual webhook to be deleted. @return the response code of the request (aka 200 if successful) @throws IllegalArgumentException if spaceId is null. @throws IllegalArgumentException if webhookId is null.
[ "Delete", "a", "given", "Webhook", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleWebhooks.java#L139-L144
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleWebhooks.java
ModuleWebhooks.fetchAll
public CMAArray<CMAWebhook> fetchAll(Map<String, String> query) { throwIfEnvironmentIdIsSet(); return fetchAll(spaceId, query); }
java
public CMAArray<CMAWebhook> fetchAll(Map<String, String> query) { throwIfEnvironmentIdIsSet(); return fetchAll(spaceId, query); }
[ "public", "CMAArray", "<", "CMAWebhook", ">", "fetchAll", "(", "Map", "<", "String", ",", "String", ">", "query", ")", "{", "throwIfEnvironmentIdIsSet", "(", ")", ";", "return", "fetchAll", "(", "spaceId", ",", "query", ")", ";", "}" ]
Retrieve specific webhooks matching a query for this space. @param query Specifying the criteria on which webhooks to return. @return An {@link CMAArray} containing all found webhooks for this space. @throws IllegalArgumentException if configured spaceId is null. @throws CMANotWithEnvironmentsException if envir...
[ "Retrieve", "specific", "webhooks", "matching", "a", "query", "for", "this", "space", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleWebhooks.java#L171-L175
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleWebhooks.java
ModuleWebhooks.calls
public CMAArray<CMAWebhookCall> calls(CMAWebhook webhook) { final String spaceId = getSpaceIdOrThrow(webhook, "webhook"); final String webhookId = getResourceIdOrThrow(webhook, "webhook"); return service.calls(spaceId, webhookId).blockingFirst(); }
java
public CMAArray<CMAWebhookCall> calls(CMAWebhook webhook) { final String spaceId = getSpaceIdOrThrow(webhook, "webhook"); final String webhookId = getResourceIdOrThrow(webhook, "webhook"); return service.calls(spaceId, webhookId).blockingFirst(); }
[ "public", "CMAArray", "<", "CMAWebhookCall", ">", "calls", "(", "CMAWebhook", "webhook", ")", "{", "final", "String", "spaceId", "=", "getSpaceIdOrThrow", "(", "webhook", ",", "\"webhook\"", ")", ";", "final", "String", "webhookId", "=", "getResourceIdOrThrow", ...
Get more information about a specific webhook. @param webhook webhook to be asked for more detail. @return A detailed object for the given webhook. @throws IllegalArgumentException if spaceId is null. @throws IllegalArgumentException if webhook is null. @see CMAWebhookCall
[ "Get", "more", "information", "about", "a", "specific", "webhook", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleWebhooks.java#L282-L287
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleWebhooks.java
ModuleWebhooks.callDetails
public CMAWebhookCallDetail callDetails(CMAWebhookCall call) { final String spaceId = getSpaceIdOrThrow(call, "call"); final String callId = getResourceIdOrThrow(call, "call"); assertNotNull(call.getSystem().getCreatedBy().getId(), "webhook.sys.createdBy"); final String webhookId = call.getSystem().getC...
java
public CMAWebhookCallDetail callDetails(CMAWebhookCall call) { final String spaceId = getSpaceIdOrThrow(call, "call"); final String callId = getResourceIdOrThrow(call, "call"); assertNotNull(call.getSystem().getCreatedBy().getId(), "webhook.sys.createdBy"); final String webhookId = call.getSystem().getC...
[ "public", "CMAWebhookCallDetail", "callDetails", "(", "CMAWebhookCall", "call", ")", "{", "final", "String", "spaceId", "=", "getSpaceIdOrThrow", "(", "call", ",", "\"call\"", ")", ";", "final", "String", "callId", "=", "getResourceIdOrThrow", "(", "call", ",", ...
Get more information about one specific call to one specific webhook, hosted by one specific space. @param call A call to be get more information about. @return A Call Detail to be used to gather more information about this call. @throws IllegalArgumentException if spaceId is null. @throws IllegalArgumentException if ...
[ "Get", "more", "information", "about", "one", "specific", "call", "to", "one", "specific", "webhook", "hosted", "by", "one", "specific", "space", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleWebhooks.java#L299-L306
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleWebhooks.java
ModuleWebhooks.health
public CMAWebhookHealth health(CMAWebhook webhook) { final String spaceId = getSpaceIdOrThrow(webhook, "webhook"); final String webhookId = getResourceIdOrThrow(webhook, "webhook"); return service.health(spaceId, webhookId).blockingFirst(); }
java
public CMAWebhookHealth health(CMAWebhook webhook) { final String spaceId = getSpaceIdOrThrow(webhook, "webhook"); final String webhookId = getResourceIdOrThrow(webhook, "webhook"); return service.health(spaceId, webhookId).blockingFirst(); }
[ "public", "CMAWebhookHealth", "health", "(", "CMAWebhook", "webhook", ")", "{", "final", "String", "spaceId", "=", "getSpaceIdOrThrow", "(", "webhook", ",", "\"webhook\"", ")", ";", "final", "String", "webhookId", "=", "getResourceIdOrThrow", "(", "webhook", ",", ...
Return a general understanding of the health of the webhook. @param webhook Which webhook should be asked for its health? @return A health indicator summarizing healthy/total calls to the Webhook. @throws IllegalArgumentException if spaceId is null. @throws IllegalArgumentException if webhook is null.
[ "Return", "a", "general", "understanding", "of", "the", "health", "of", "the", "webhook", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleWebhooks.java#L316-L321
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/model/CMAEnvironment.java
CMAEnvironment.getStatus
public CMAEnvironmentStatus getStatus() { final CMALink link = system.getEnvironmentalStatus(); if (link == null) { return null; } final String id = link.getId().toLowerCase(); for (final CMAEnvironmentStatus status : CMAEnvironmentStatus.values()) { final String statusName = status.na...
java
public CMAEnvironmentStatus getStatus() { final CMALink link = system.getEnvironmentalStatus(); if (link == null) { return null; } final String id = link.getId().toLowerCase(); for (final CMAEnvironmentStatus status : CMAEnvironmentStatus.values()) { final String statusName = status.na...
[ "public", "CMAEnvironmentStatus", "getStatus", "(", ")", "{", "final", "CMALink", "link", "=", "system", ".", "getEnvironmentalStatus", "(", ")", ";", "if", "(", "link", "==", "null", ")", "{", "return", "null", ";", "}", "final", "String", "id", "=", "l...
Return the state of this environment @return one of {@link CMAEnvironmentStatus} to indicate the status of the environment.
[ "Return", "the", "state", "of", "this", "environment" ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/model/CMAEnvironment.java#L111-L127
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleEnvironments.java
ModuleEnvironments.delete
public Integer delete(CMAEnvironment environment) { assertNotNull(environment.getSpaceId(), "spaceId"); assertNotNull(environment.getId(), "environmentId"); return service.delete( getVersionOrThrow(environment, "version"), environment.getSpaceId(), environment.getId() ).blocking...
java
public Integer delete(CMAEnvironment environment) { assertNotNull(environment.getSpaceId(), "spaceId"); assertNotNull(environment.getId(), "environmentId"); return service.delete( getVersionOrThrow(environment, "version"), environment.getSpaceId(), environment.getId() ).blocking...
[ "public", "Integer", "delete", "(", "CMAEnvironment", "environment", ")", "{", "assertNotNull", "(", "environment", ".", "getSpaceId", "(", ")", ",", "\"spaceId\"", ")", ";", "assertNotNull", "(", "environment", ".", "getId", "(", ")", ",", "\"environmentId\"", ...
Delete an environment. @param environment the environment to be deleted @return Integer representing the result (204, or an error code) @throws IllegalArgumentException if environment's space id is null. @throws IllegalArgumentException if environment's id is null. @throws IllegalArgumentException if environment's ver...
[ "Delete", "an", "environment", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleEnvironments.java#L165-L174
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/model/CMAEntry.java
CMAEntry.getField
@SuppressWarnings("unchecked") public <T> T getField(String key, String locale) { if (fields == null) { return null; } LinkedHashMap<String, Object> field = fields.get(key); if (field == null) { return null; } else { return (T) field.get(locale); } }
java
@SuppressWarnings("unchecked") public <T> T getField(String key, String locale) { if (fields == null) { return null; } LinkedHashMap<String, Object> field = fields.get(key); if (field == null) { return null; } else { return (T) field.get(locale); } }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", ">", "T", "getField", "(", "String", "key", ",", "String", "locale", ")", "{", "if", "(", "fields", "==", "null", ")", "{", "return", "null", ";", "}", "LinkedHashMap", "<", "Strin...
Return a specific localized field. @param key the key of the field @param locale the locale of the key @param <T> the type of the return value @return the value requested or null, if something (fields, key, locale) was not found.
[ "Return", "a", "specific", "localized", "field", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/model/CMAEntry.java#L122-L134
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/model/CMAEntry.java
CMAEntry.setFields
public CMAEntry setFields(LinkedHashMap<String, LinkedHashMap<String, Object>> fields) { this.fields = fields; return this; }
java
public CMAEntry setFields(LinkedHashMap<String, LinkedHashMap<String, Object>> fields) { this.fields = fields; return this; }
[ "public", "CMAEntry", "setFields", "(", "LinkedHashMap", "<", "String", ",", "LinkedHashMap", "<", "String", ",", "Object", ">", ">", "fields", ")", "{", "this", ".", "fields", "=", "fields", ";", "return", "this", ";", "}" ]
Sets a map of fields for this Entry. @param fields the fields to be set @return this {@code CMAEntry} instance
[ "Sets", "a", "map", "of", "fields", "for", "this", "Entry", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/model/CMAEntry.java#L149-L152
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/model/CMARole.java
CMARole.addPolicy
public CMARole addPolicy(CMAPolicy policy) { if (policies == null) { policies = new ArrayList<CMAPolicy>(); } policies.add(policy); return this; }
java
public CMARole addPolicy(CMAPolicy policy) { if (policies == null) { policies = new ArrayList<CMAPolicy>(); } policies.add(policy); return this; }
[ "public", "CMARole", "addPolicy", "(", "CMAPolicy", "policy", ")", "{", "if", "(", "policies", "==", "null", ")", "{", "policies", "=", "new", "ArrayList", "<", "CMAPolicy", ">", "(", ")", ";", "}", "policies", ".", "add", "(", "policy", ")", ";", "r...
Add a new policy to the existing ones, creating a new list if needed. @param policy the policy to be added. @return this instance for chaining.
[ "Add", "a", "new", "policy", "to", "the", "existing", "ones", "creating", "a", "new", "list", "if", "needed", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/model/CMARole.java#L85-L92
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/gson/EntrySerializer.java
EntrySerializer.serialize
@Override public JsonElement serialize(CMAEntry src, Type type, JsonSerializationContext context) { JsonObject fields = new JsonObject(); for (Map.Entry<String, LinkedHashMap<String, Object>> field : src.getFields().entrySet()) { LinkedHashMap<String, Object> value = field.getValue(); if (value ==...
java
@Override public JsonElement serialize(CMAEntry src, Type type, JsonSerializationContext context) { JsonObject fields = new JsonObject(); for (Map.Entry<String, LinkedHashMap<String, Object>> field : src.getFields().entrySet()) { LinkedHashMap<String, Object> value = field.getValue(); if (value ==...
[ "@", "Override", "public", "JsonElement", "serialize", "(", "CMAEntry", "src", ",", "Type", "type", ",", "JsonSerializationContext", "context", ")", "{", "JsonObject", "fields", "=", "new", "JsonObject", "(", ")", ";", "for", "(", "Map", ".", "Entry", "<", ...
Make sure all fields are mapped in the locale - value way. @param src the source to be edited. @param type the type to be used. @param context the json context to be changed. @return a created json element.
[ "Make", "sure", "all", "fields", "are", "mapped", "in", "the", "locale", "-", "value", "way", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/gson/EntrySerializer.java#L44-L67
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/gson/FieldTypeAdapter.java
FieldTypeAdapter.serialize
@Override public JsonElement serialize(CMAField field, Type type, JsonSerializationContext context) { JsonObject json = new JsonObject(); add(json, ATTR_ID, field.getId()); add(json, ATTR_NAME, field.getName()); add(json, ATTR_TYPE, field.getType()); add(json, ATTR_LINK_TYPE, field.getLinkType())...
java
@Override public JsonElement serialize(CMAField field, Type type, JsonSerializationContext context) { JsonObject json = new JsonObject(); add(json, ATTR_ID, field.getId()); add(json, ATTR_NAME, field.getName()); add(json, ATTR_TYPE, field.getType()); add(json, ATTR_LINK_TYPE, field.getLinkType())...
[ "@", "Override", "public", "JsonElement", "serialize", "(", "CMAField", "field", ",", "Type", "type", ",", "JsonSerializationContext", "context", ")", "{", "JsonObject", "json", "=", "new", "JsonObject", "(", ")", ";", "add", "(", "json", ",", "ATTR_ID", ","...
Serialize all fields for content types. @param field the content type field to be serialized @param type the type to be used. @param context the json context to be used. @return a json object representing the field.
[ "Serialize", "all", "fields", "for", "content", "types", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/gson/FieldTypeAdapter.java#L67-L94
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/interceptor/ContentTypeInterceptor.java
ContentTypeInterceptor.intercept
@Override public Response intercept(Chain chain) throws IOException { final Request request = chain.request(); final Request.Builder builder = request.newBuilder() .addHeader(HEADER_NAME, contentType); if (request.body() != null) { rewriteBodyWithCustomContentType(request, builder); } ...
java
@Override public Response intercept(Chain chain) throws IOException { final Request request = chain.request(); final Request.Builder builder = request.newBuilder() .addHeader(HEADER_NAME, contentType); if (request.body() != null) { rewriteBodyWithCustomContentType(request, builder); } ...
[ "@", "Override", "public", "Response", "intercept", "(", "Chain", "chain", ")", "throws", "IOException", "{", "final", "Request", "request", "=", "chain", ".", "request", "(", ")", ";", "final", "Request", ".", "Builder", "builder", "=", "request", ".", "n...
Method called by framework, to enrich current request with the header information requested. @param chain the execution chain for the request. @return the response received @throws IOException if chain had an error
[ "Method", "called", "by", "framework", "to", "enrich", "current", "request", "with", "the", "header", "information", "requested", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/interceptor/ContentTypeInterceptor.java#L38-L50
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleSpaceMemberships.java
ModuleSpaceMemberships.fetchAll
public CMAArray<CMASpaceMembership> fetchAll(Map<String, String> query) { throwIfEnvironmentIdIsSet(); return fetchAll(spaceId, query); }
java
public CMAArray<CMASpaceMembership> fetchAll(Map<String, String> query) { throwIfEnvironmentIdIsSet(); return fetchAll(spaceId, query); }
[ "public", "CMAArray", "<", "CMASpaceMembership", ">", "fetchAll", "(", "Map", "<", "String", ",", "String", ">", "query", ")", "{", "throwIfEnvironmentIdIsSet", "(", ")", ";", "return", "fetchAll", "(", "spaceId", ",", "query", ")", ";", "}" ]
Fetch all memberships of the configured space. @param query define which space memberships to return. @return the array of memberships. @throws IllegalArgumentException if spaceId is null. @throws CMANotWithEnvironmentsException if environmentId was set using {@link CMAClient.Builder#setEnvironmentId(String)}. ...
[ "Fetch", "all", "memberships", "of", "the", "configured", "space", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleSpaceMemberships.java#L100-L103
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleSpaceMemberships.java
ModuleSpaceMemberships.fetchOne
public CMASpaceMembership fetchOne(String spaceId, String membershipId) { assertNotNull(spaceId, "spaceId"); assertNotNull(membershipId, "membershipId"); return service.fetchOne(spaceId, membershipId).blockingFirst(); }
java
public CMASpaceMembership fetchOne(String spaceId, String membershipId) { assertNotNull(spaceId, "spaceId"); assertNotNull(membershipId, "membershipId"); return service.fetchOne(spaceId, membershipId).blockingFirst(); }
[ "public", "CMASpaceMembership", "fetchOne", "(", "String", "spaceId", ",", "String", "membershipId", ")", "{", "assertNotNull", "(", "spaceId", ",", "\"spaceId\"", ")", ";", "assertNotNull", "(", "membershipId", ",", "\"membershipId\"", ")", ";", "return", "servic...
Fetches one space membership by its id from Contentful. @param spaceId the space this membership is hosted by. @param membershipId the id of the membership to be found. @return null if no membership was found, otherwise the found membership. @throws IllegalArgumentException if space id is null. @throws IllegalArg...
[ "Fetches", "one", "space", "membership", "by", "its", "id", "from", "Contentful", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleSpaceMemberships.java#L152-L157
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleUiExtensions.java
ModuleUiExtensions.fetchAll
public CMAArray<CMAUiExtension> fetchAll(Map<String, String> query) { return fetchAll(spaceId, environmentId, query); }
java
public CMAArray<CMAUiExtension> fetchAll(Map<String, String> query) { return fetchAll(spaceId, environmentId, query); }
[ "public", "CMAArray", "<", "CMAUiExtension", ">", "fetchAll", "(", "Map", "<", "String", ",", "String", ">", "query", ")", "{", "return", "fetchAll", "(", "spaceId", ",", "environmentId", ",", "query", ")", ";", "}" ]
Fetch all ui extensions from the configured space by a query. @param query controls what to return. @return specific ui extensions for a specific space. @throws IllegalArgumentException if configured space id is null. @throws IllegalArgumentException if configured environment id is null. @see CMAClient.Builder#setSpac...
[ "Fetch", "all", "ui", "extensions", "from", "the", "configured", "space", "by", "a", "query", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleUiExtensions.java#L122-L124
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleUiExtensions.java
ModuleUiExtensions.update
public CMAUiExtension update(CMAUiExtension extension) { assertNotNull(extension, "extension"); final Integer version = getVersionOrThrow(extension, "update"); final String id = getResourceIdOrThrow(extension, "extension"); final String spaceId = getSpaceIdOrThrow(extension, "extension"); assertNotN...
java
public CMAUiExtension update(CMAUiExtension extension) { assertNotNull(extension, "extension"); final Integer version = getVersionOrThrow(extension, "update"); final String id = getResourceIdOrThrow(extension, "extension"); final String spaceId = getSpaceIdOrThrow(extension, "extension"); assertNotN...
[ "public", "CMAUiExtension", "update", "(", "CMAUiExtension", "extension", ")", "{", "assertNotNull", "(", "extension", ",", "\"extension\"", ")", ";", "final", "Integer", "version", "=", "getVersionOrThrow", "(", "extension", ",", "\"update\"", ")", ";", "final", ...
Update a ui extension. @param extension the ui extension to be updated. @return the updated ui extension. @throws IllegalArgumentException if extension is null. @throws IllegalArgumentException if extension's version is null. @throws IllegalArgumentException if extension's id is null. @throws IllegalArgumentException ...
[ "Update", "a", "ui", "extension", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleUiExtensions.java#L180-L196
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleUiExtensions.java
ModuleUiExtensions.delete
public Integer delete(CMAUiExtension extension) { assertNotNull(extension, "extension"); final Integer version = getVersionOrThrow(extension, "update"); final String spaceId = getSpaceIdOrThrow(extension, "extension"); assertNotNull(extension.getEnvironmentId(), "environmentId"); final String enviro...
java
public Integer delete(CMAUiExtension extension) { assertNotNull(extension, "extension"); final Integer version = getVersionOrThrow(extension, "update"); final String spaceId = getSpaceIdOrThrow(extension, "extension"); assertNotNull(extension.getEnvironmentId(), "environmentId"); final String enviro...
[ "public", "Integer", "delete", "(", "CMAUiExtension", "extension", ")", "{", "assertNotNull", "(", "extension", ",", "\"extension\"", ")", ";", "final", "Integer", "version", "=", "getVersionOrThrow", "(", "extension", ",", "\"update\"", ")", ";", "final", "Stri...
Delete a ui extension. @param extension the extension to be deleted. @return the http code of the action. @throws IllegalArgumentException if extension is null. @throws IllegalArgumentException if extension's id is null. @throws IllegalArgumentException if extension's version is null. @throws IllegalArgumentException ...
[ "Delete", "a", "ui", "extension", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleUiExtensions.java#L208-L224
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleAssets.java
ModuleAssets.delete
public Integer delete(CMAAsset asset) { final String assetId = getResourceIdOrThrow(asset, "asset"); final String spaceId = getSpaceIdOrThrow(asset, "asset"); final String environmentId = asset.getEnvironmentId(); return service.delete(spaceId, environmentId, assetId).blockingFirst().code(); }
java
public Integer delete(CMAAsset asset) { final String assetId = getResourceIdOrThrow(asset, "asset"); final String spaceId = getSpaceIdOrThrow(asset, "asset"); final String environmentId = asset.getEnvironmentId(); return service.delete(spaceId, environmentId, assetId).blockingFirst().code(); }
[ "public", "Integer", "delete", "(", "CMAAsset", "asset", ")", "{", "final", "String", "assetId", "=", "getResourceIdOrThrow", "(", "asset", ",", "\"asset\"", ")", ";", "final", "String", "spaceId", "=", "getSpaceIdOrThrow", "(", "asset", ",", "\"asset\"", ")",...
Delete an Asset. @param asset Asset @return An integer representing the result of the delete operation @throws IllegalArgumentException if spaceId is null. @throws IllegalArgumentException if assetId is null.
[ "Delete", "an", "Asset", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleAssets.java#L144-L150
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleAssets.java
ModuleAssets.process
public Integer process(CMAAsset asset, String locale) { assertNotNull(asset, "asset"); final String assetId = getResourceIdOrThrow(asset, "asset"); final String spaceId = getSpaceIdOrThrow(asset, "asset"); final String environmentId = asset.getEnvironmentId(); return service.process(spaceId, enviro...
java
public Integer process(CMAAsset asset, String locale) { assertNotNull(asset, "asset"); final String assetId = getResourceIdOrThrow(asset, "asset"); final String spaceId = getSpaceIdOrThrow(asset, "asset"); final String environmentId = asset.getEnvironmentId(); return service.process(spaceId, enviro...
[ "public", "Integer", "process", "(", "CMAAsset", "asset", ",", "String", "locale", ")", "{", "assertNotNull", "(", "asset", ",", "\"asset\"", ")", ";", "final", "String", "assetId", "=", "getResourceIdOrThrow", "(", "asset", ",", "\"asset\"", ")", ";", "fina...
Process an Asset. @param asset Asset @param locale Locale @return integer representing the success (204 = no content) of processing @throws IllegalArgumentException if asset is null. @throws IllegalArgumentException if asset has no id. @throws IllegalArgumentException if asset has no space. @throws IllegalArgumentExc...
[ "Process", "an", "Asset", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleAssets.java#L261-L268
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleAssets.java
ModuleAssets.publish
public CMAAsset publish(CMAAsset asset) { assertNotNull(asset, "asset"); final String assetId = getResourceIdOrThrow(asset, "asset"); final String spaceId = getSpaceIdOrThrow(asset, "asset"); final String environmentId = asset.getEnvironmentId(); return service.publish( asset.getSystem().ge...
java
public CMAAsset publish(CMAAsset asset) { assertNotNull(asset, "asset"); final String assetId = getResourceIdOrThrow(asset, "asset"); final String spaceId = getSpaceIdOrThrow(asset, "asset"); final String environmentId = asset.getEnvironmentId(); return service.publish( asset.getSystem().ge...
[ "public", "CMAAsset", "publish", "(", "CMAAsset", "asset", ")", "{", "assertNotNull", "(", "asset", ",", "\"asset\"", ")", ";", "final", "String", "assetId", "=", "getResourceIdOrThrow", "(", "asset", ",", "\"asset\"", ")", ";", "final", "String", "spaceId", ...
Publish an Asset. @param asset Asset @return {@link CMAAsset} result instance @throws IllegalArgumentException if asset is null. @throws IllegalArgumentException if asset has no id. @throws IllegalArgumentException if asset has no space id.
[ "Publish", "an", "Asset", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleAssets.java#L279-L291
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleAssets.java
ModuleAssets.unPublish
public CMAAsset unPublish(CMAAsset asset) { assertNotNull(asset, "asset"); final String assetId = getResourceIdOrThrow(asset, "asset"); final String spaceId = getSpaceIdOrThrow(asset, "asset"); final String environmentId = asset.getEnvironmentId(); return service.unPublish(spaceId, environmentId, ...
java
public CMAAsset unPublish(CMAAsset asset) { assertNotNull(asset, "asset"); final String assetId = getResourceIdOrThrow(asset, "asset"); final String spaceId = getSpaceIdOrThrow(asset, "asset"); final String environmentId = asset.getEnvironmentId(); return service.unPublish(spaceId, environmentId, ...
[ "public", "CMAAsset", "unPublish", "(", "CMAAsset", "asset", ")", "{", "assertNotNull", "(", "asset", ",", "\"asset\"", ")", ";", "final", "String", "assetId", "=", "getResourceIdOrThrow", "(", "asset", ",", "\"asset\"", ")", ";", "final", "String", "spaceId",...
Un-Publish an Asset. @param asset Asset @return {@link CMAAsset} result instance @throws IllegalArgumentException if asset is null. @throws IllegalArgumentException if asset's id is not set. @throws IllegalArgumentException if asset's space id is not set.
[ "Un", "-", "Publish", "an", "Asset", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleAssets.java#L321-L329
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleAssets.java
ModuleAssets.update
public CMAAsset update(CMAAsset asset) { assertNotNull(asset, "asset"); final String assetId = getResourceIdOrThrow(asset, "asset"); final String spaceId = getSpaceIdOrThrow(asset, "asset"); final String environmentId = asset.getEnvironmentId(); final Integer version = getVersionOrThrow(asset, "upda...
java
public CMAAsset update(CMAAsset asset) { assertNotNull(asset, "asset"); final String assetId = getResourceIdOrThrow(asset, "asset"); final String spaceId = getSpaceIdOrThrow(asset, "asset"); final String environmentId = asset.getEnvironmentId(); final Integer version = getVersionOrThrow(asset, "upda...
[ "public", "CMAAsset", "update", "(", "CMAAsset", "asset", ")", "{", "assertNotNull", "(", "asset", ",", "\"asset\"", ")", ";", "final", "String", "assetId", "=", "getResourceIdOrThrow", "(", "asset", ",", "\"asset\"", ")", ";", "final", "String", "spaceId", ...
Update an Asset. @param asset Asset @return {@link CMAAsset} result instance @throws IllegalArgumentException if asset is null. @throws IllegalArgumentException if asset's id is null. @throws IllegalArgumentException if asset's space id is null. @throws IllegalArgumentException if asset's version is null.
[ "Update", "an", "Asset", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleAssets.java#L341-L356
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/model/CMAResource.java
CMAResource.setSystem
@SuppressWarnings("unchecked") public <T extends CMAResource> T setSystem(CMASystem system) { this.system = system; return (T) this; }
java
@SuppressWarnings("unchecked") public <T extends CMAResource> T setSystem(CMASystem system) { this.system = system; return (T) this; }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", "extends", "CMAResource", ">", "T", "setSystem", "(", "CMASystem", "system", ")", "{", "this", ".", "system", "=", "system", ";", "return", "(", "T", ")", "this", ";", "}" ]
Sets the system field. @param system sets the system property. @param <T> resource type to be returned. @return this, as casted to a resource, for the ease of chaining.
[ "Sets", "the", "system", "field", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/model/CMAResource.java#L49-L53
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/model/CMAResource.java
CMAResource.setId
@SuppressWarnings("unchecked") public <T extends CMAResource> T setId(String id) { getSystem().setId(id); return (T) this; }
java
@SuppressWarnings("unchecked") public <T extends CMAResource> T setId(String id) { getSystem().setId(id); return (T) this; }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", "extends", "CMAResource", ">", "T", "setId", "(", "String", "id", ")", "{", "getSystem", "(", ")", ".", "setId", "(", "id", ")", ";", "return", "(", "T", ")", "this", ";", "}" ]
Sets the ID for this CMAResource. @param id to be set. @param <T> resource type to be returned. @return this {@code CMAResource} instance.
[ "Sets", "the", "ID", "for", "this", "CMAResource", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/model/CMAResource.java#L69-L73
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/model/CMAResource.java
CMAResource.setVersion
@SuppressWarnings("unchecked") public <T extends CMAResource> T setVersion(Integer version) { getSystem().setVersion(version); return (T) this; }
java
@SuppressWarnings("unchecked") public <T extends CMAResource> T setVersion(Integer version) { getSystem().setVersion(version); return (T) this; }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", "extends", "CMAResource", ">", "T", "setVersion", "(", "Integer", "version", ")", "{", "getSystem", "(", ")", ".", "setVersion", "(", "version", ")", ";", "return", "(", "T", ")", "t...
Convenience method for setting a version. @param version the version number to be set. @param <T> the type of the CMAResource calling. @return the calling {@link CMAResource} for chaining.
[ "Convenience", "method", "for", "setting", "a", "version", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/model/CMAResource.java#L89-L93
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/model/CMAResource.java
CMAResource.setSpaceId
@SuppressWarnings("unchecked") public <T extends CMAResource> T setSpaceId(String spaceId) { if (getSystem().getSpace() == null) { getSystem().space = new CMALink(CMAType.Space); } getSystem().space.setId(spaceId); return (T) this; }
java
@SuppressWarnings("unchecked") public <T extends CMAResource> T setSpaceId(String spaceId) { if (getSystem().getSpace() == null) { getSystem().space = new CMALink(CMAType.Space); } getSystem().space.setId(spaceId); return (T) this; }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", "extends", "CMAResource", ">", "T", "setSpaceId", "(", "String", "spaceId", ")", "{", "if", "(", "getSystem", "(", ")", ".", "getSpace", "(", ")", "==", "null", ")", "{", "getSystem"...
Convenience method for setting a space id. @param spaceId the id to be set. @param <T> An implementation of CMAResource, normally used for chaining setter methods. @return the calling {@link CMAResource} for chaining.
[ "Convenience", "method", "for", "setting", "a", "space", "id", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/model/CMAResource.java#L113-L122
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleContentTypes.java
ModuleContentTypes.delete
public Integer delete(CMAContentType contentType) { final String spaceId = getSpaceIdOrThrow(contentType, "contentType"); final String environmentId = contentType.getEnvironmentId(); final String contentTypeId = getResourceIdOrThrow(contentType, "contentType"); return service.delete(spaceId, environmen...
java
public Integer delete(CMAContentType contentType) { final String spaceId = getSpaceIdOrThrow(contentType, "contentType"); final String environmentId = contentType.getEnvironmentId(); final String contentTypeId = getResourceIdOrThrow(contentType, "contentType"); return service.delete(spaceId, environmen...
[ "public", "Integer", "delete", "(", "CMAContentType", "contentType", ")", "{", "final", "String", "spaceId", "=", "getSpaceIdOrThrow", "(", "contentType", ",", "\"contentType\"", ")", ";", "final", "String", "environmentId", "=", "contentType", ".", "getEnvironmentI...
Delete a Content Type. @param contentType Content Type @return Integer representing the result of the operation @throws IllegalArgumentException if spaceId is null. @throws IllegalArgumentException if contentTypeId is null.
[ "Delete", "a", "Content", "Type", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleContentTypes.java#L133-L139
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleContentTypes.java
ModuleContentTypes.fetchAll
public CMAArray<CMAContentType> fetchAll( String spaceId, String environmentId, Map<String, String> query) { assertNotNull(spaceId, "spaceId"); DefaultQueryParameter.putIfNotSet(query, DefaultQueryParameter.FETCH); return service.fetchAll(spaceId, environmentId, query).blockingFirst(); }
java
public CMAArray<CMAContentType> fetchAll( String spaceId, String environmentId, Map<String, String> query) { assertNotNull(spaceId, "spaceId"); DefaultQueryParameter.putIfNotSet(query, DefaultQueryParameter.FETCH); return service.fetchAll(spaceId, environmentId, query).blockingFirst(); }
[ "public", "CMAArray", "<", "CMAContentType", ">", "fetchAll", "(", "String", "spaceId", ",", "String", "environmentId", ",", "Map", "<", "String", ",", "String", ">", "query", ")", "{", "assertNotNull", "(", "spaceId", ",", "\"spaceId\"", ")", ";", "DefaultQ...
Fetch all Content Types from a Space with query parameters. @param spaceId Space ID @param environmentId Environment ID @param query Query to narrow down the content_types to be searched for @return {@link CMAArray} result instance @throws IllegalArgumentException if spaceId is null. @throws IllegalArgum...
[ "Fetch", "all", "Content", "Types", "from", "a", "Space", "with", "query", "parameters", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleContentTypes.java#L200-L207
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleContentTypes.java
ModuleContentTypes.publish
public CMAContentType publish(CMAContentType contentType) { assertNotNull(contentType, "contentType"); final String contentTypeId = getResourceIdOrThrow(contentType, "contentType"); final String spaceId = getSpaceIdOrThrow(contentType, "contentType"); final String environmentId = contentType.getEnviron...
java
public CMAContentType publish(CMAContentType contentType) { assertNotNull(contentType, "contentType"); final String contentTypeId = getResourceIdOrThrow(contentType, "contentType"); final String spaceId = getSpaceIdOrThrow(contentType, "contentType"); final String environmentId = contentType.getEnviron...
[ "public", "CMAContentType", "publish", "(", "CMAContentType", "contentType", ")", "{", "assertNotNull", "(", "contentType", ",", "\"contentType\"", ")", ";", "final", "String", "contentTypeId", "=", "getResourceIdOrThrow", "(", "contentType", ",", "\"contentType\"", "...
Publish a Content Type. @param contentType Content Type @return {@link CMAContentType} result instance @throws IllegalArgumentException if contentType is null. @throws IllegalArgumentException if contentType's id is null. @throws IllegalArgumentException if contentType's space id is null.
[ "Publish", "a", "Content", "Type", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleContentTypes.java#L257-L270
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleContentTypes.java
ModuleContentTypes.update
public CMAContentType update(CMAContentType contentType) { assertNotNull(contentType, "contentType"); assertNotNull(contentType.getName(), "contentType.name"); final String contentTypeId = getResourceIdOrThrow(contentType, "contentType"); final String spaceId = getSpaceIdOrThrow(contentType, "contentTy...
java
public CMAContentType update(CMAContentType contentType) { assertNotNull(contentType, "contentType"); assertNotNull(contentType.getName(), "contentType.name"); final String contentTypeId = getResourceIdOrThrow(contentType, "contentType"); final String spaceId = getSpaceIdOrThrow(contentType, "contentTy...
[ "public", "CMAContentType", "update", "(", "CMAContentType", "contentType", ")", "{", "assertNotNull", "(", "contentType", ",", "\"contentType\"", ")", ";", "assertNotNull", "(", "contentType", ".", "getName", "(", ")", ",", "\"contentType.name\"", ")", ";", "fina...
Update a Content Type. @param contentType Content Type @return {@link CMAContentType} result instance @throws IllegalArgumentException if contentType is null. @throws IllegalArgumentException if contentType's name is null. @throws IllegalArgumentException if contentType's id is null. @throws IllegalArgumentException i...
[ "Update", "a", "Content", "Type", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleContentTypes.java#L302-L325
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleContentTypes.java
ModuleContentTypes.fetchAllSnapshots
public CMAArray<CMASnapshot> fetchAllSnapshots(CMAContentType contentType) { assertNotNull(contentType, "contentType"); final String contentTypeId = getResourceIdOrThrow(contentType, "contentType"); final String spaceId = getSpaceIdOrThrow(contentType, "contentType"); final String environmentId = conte...
java
public CMAArray<CMASnapshot> fetchAllSnapshots(CMAContentType contentType) { assertNotNull(contentType, "contentType"); final String contentTypeId = getResourceIdOrThrow(contentType, "contentType"); final String spaceId = getSpaceIdOrThrow(contentType, "contentType"); final String environmentId = conte...
[ "public", "CMAArray", "<", "CMASnapshot", ">", "fetchAllSnapshots", "(", "CMAContentType", "contentType", ")", "{", "assertNotNull", "(", "contentType", ",", "\"contentType\"", ")", ";", "final", "String", "contentTypeId", "=", "getResourceIdOrThrow", "(", "contentTyp...
Fetch all snapshots of this content type. @param contentType the contentType whose snapshots to be returned. @return an array of snapshots. @throws IllegalArgumentException if contentType is null. @throws IllegalArgumentException if contentType's id is null. @throws IllegalArgumentException if contentType's space id i...
[ "Fetch", "all", "snapshots", "of", "this", "content", "type", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleContentTypes.java#L336-L344
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleContentTypes.java
ModuleContentTypes.fetchOneSnapshot
public CMASnapshot fetchOneSnapshot(CMAContentType contentType, String snapshotId) { assertNotNull(contentType, "contentType"); assertNotNull(snapshotId, "snapshotId"); final String contentTypeId = getResourceIdOrThrow(contentType, "contentType"); final String spaceId = getSpaceIdOrThrow(contentType, "...
java
public CMASnapshot fetchOneSnapshot(CMAContentType contentType, String snapshotId) { assertNotNull(contentType, "contentType"); assertNotNull(snapshotId, "snapshotId"); final String contentTypeId = getResourceIdOrThrow(contentType, "contentType"); final String spaceId = getSpaceIdOrThrow(contentType, "...
[ "public", "CMASnapshot", "fetchOneSnapshot", "(", "CMAContentType", "contentType", ",", "String", "snapshotId", ")", "{", "assertNotNull", "(", "contentType", ",", "\"contentType\"", ")", ";", "assertNotNull", "(", "snapshotId", ",", "\"snapshotId\"", ")", ";", "fin...
Fetch a specific snapshot of this content type. @param contentType the contentType whose snapshot to be returned. @param snapshotId the snapshot to be returned. @return an array of snapshots. @throws IllegalArgumentException if contentType is null. @throws IllegalArgumentException if contentType's id is null. @throws...
[ "Fetch", "a", "specific", "snapshot", "of", "this", "content", "type", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleContentTypes.java#L357-L371
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/gson/SnapshotDeserializer.java
SnapshotDeserializer.deserialize
@Override public CMASnapshot deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException { final CMASnapshot result = new CMASnapshot(); final JsonObject jsonObject = json.getAsJsonObject(); final CMASystem system = context.deserialize(jsonObject.get("sy...
java
@Override public CMASnapshot deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException { final CMASnapshot result = new CMASnapshot(); final JsonObject jsonObject = json.getAsJsonObject(); final CMASystem system = context.deserialize(jsonObject.get("sy...
[ "@", "Override", "public", "CMASnapshot", "deserialize", "(", "JsonElement", "json", ",", "Type", "typeOfT", ",", "JsonDeserializationContext", "context", ")", "throws", "JsonParseException", "{", "final", "CMASnapshot", "result", "=", "new", "CMASnapshot", "(", ")"...
Inspect json payload and generate either a content type snapshot from it or an entry snap shot. @param json the json blob to be converted @param typeOfT the type to be converted @param context the json context for updating @return a snapshot, parsed from the json @throws JsonParseException if the json object to be ...
[ "Inspect", "json", "payload", "and", "generate", "either", "a", "content", "type", "snapshot", "from", "it", "or", "an", "entry", "snap", "shot", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/gson/SnapshotDeserializer.java#L30-L46
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleEntries.java
ModuleEntries.delete
public Integer delete(CMAEntry entry) { assertNotNull(entry.getSpaceId(), "spaceId"); assertNotNull(entry.getEnvironmentId(), "environmentId"); assertNotNull(entry.getId(), "entryId"); return service.delete( entry.getSpaceId(), entry.getEnvironmentId(), entry.getId() ).block...
java
public Integer delete(CMAEntry entry) { assertNotNull(entry.getSpaceId(), "spaceId"); assertNotNull(entry.getEnvironmentId(), "environmentId"); assertNotNull(entry.getId(), "entryId"); return service.delete( entry.getSpaceId(), entry.getEnvironmentId(), entry.getId() ).block...
[ "public", "Integer", "delete", "(", "CMAEntry", "entry", ")", "{", "assertNotNull", "(", "entry", ".", "getSpaceId", "(", ")", ",", "\"spaceId\"", ")", ";", "assertNotNull", "(", "entry", ".", "getEnvironmentId", "(", ")", ",", "\"environmentId\"", ")", ";",...
Delete an Entry. @param entry Entry ID @return Integer representing the success (204) of the action @throws IllegalArgumentException if spaceId is null. @throws IllegalArgumentException if environmentId is null. @throws IllegalArgumentException if entryId is null. @throws IllegalArgumentException if entry is null.
[ "Delete", "an", "Entry", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleEntries.java#L157-L167
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleEntries.java
ModuleEntries.fetchOne
public CMAEntry fetchOne(String spaceId, String environmentId, String entryId) { assertNotNull(spaceId, "spaceId"); assertNotNull(environmentId, "environmentId"); assertNotNull(entryId, "entryId"); return service.fetchOne(spaceId, environmentId, entryId).blockingFirst(); }
java
public CMAEntry fetchOne(String spaceId, String environmentId, String entryId) { assertNotNull(spaceId, "spaceId"); assertNotNull(environmentId, "environmentId"); assertNotNull(entryId, "entryId"); return service.fetchOne(spaceId, environmentId, entryId).blockingFirst(); }
[ "public", "CMAEntry", "fetchOne", "(", "String", "spaceId", ",", "String", "environmentId", ",", "String", "entryId", ")", "{", "assertNotNull", "(", "spaceId", ",", "\"spaceId\"", ")", ";", "assertNotNull", "(", "environmentId", ",", "\"environmentId\"", ")", "...
Fetch an entry with the given entryId from the given environment and space. @param spaceId Space ID @param environmentId Environment ID @param entryId Entry ID @return {@link CMAEntry} result instance @throws IllegalArgumentException if space id is null. @throws IllegalArgumentException if environment id i...
[ "Fetch", "an", "entry", "with", "the", "given", "entryId", "from", "the", "given", "environment", "and", "space", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleEntries.java#L266-L271
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleEntries.java
ModuleEntries.publish
public CMAEntry publish(CMAEntry entry) { assertNotNull(entry, "entry"); final String entryId = getResourceIdOrThrow(entry, "entry"); final String environmentId = entry.getEnvironmentId(); final String spaceId = getSpaceIdOrThrow(entry, "entry"); return service.publish( entry.getSystem().ge...
java
public CMAEntry publish(CMAEntry entry) { assertNotNull(entry, "entry"); final String entryId = getResourceIdOrThrow(entry, "entry"); final String environmentId = entry.getEnvironmentId(); final String spaceId = getSpaceIdOrThrow(entry, "entry"); return service.publish( entry.getSystem().ge...
[ "public", "CMAEntry", "publish", "(", "CMAEntry", "entry", ")", "{", "assertNotNull", "(", "entry", ",", "\"entry\"", ")", ";", "final", "String", "entryId", "=", "getResourceIdOrThrow", "(", "entry", ",", "\"entry\"", ")", ";", "final", "String", "environment...
Publish an Entry. @param entry Entry @return {@link CMAEntry} result instance @throws IllegalArgumentException if entry is null. @throws IllegalArgumentException if entry's id is null. @throws IllegalArgumentException if entry's space id is null.
[ "Publish", "an", "Entry", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleEntries.java#L282-L293
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleEntries.java
ModuleEntries.unPublish
public CMAEntry unPublish(CMAEntry entry) { assertNotNull(entry, "entry"); final String entryId = getResourceIdOrThrow(entry, "entry"); final String spaceId = getSpaceIdOrThrow(entry, "entry"); final String environmentId = entry.getEnvironmentId(); return service.unPublish(spaceId, environmentId, e...
java
public CMAEntry unPublish(CMAEntry entry) { assertNotNull(entry, "entry"); final String entryId = getResourceIdOrThrow(entry, "entry"); final String spaceId = getSpaceIdOrThrow(entry, "entry"); final String environmentId = entry.getEnvironmentId(); return service.unPublish(spaceId, environmentId, e...
[ "public", "CMAEntry", "unPublish", "(", "CMAEntry", "entry", ")", "{", "assertNotNull", "(", "entry", ",", "\"entry\"", ")", ";", "final", "String", "entryId", "=", "getResourceIdOrThrow", "(", "entry", ",", "\"entry\"", ")", ";", "final", "String", "spaceId",...
Un-Publish an Entry. @param entry Entry @return {@link CMAEntry} result instance @throws IllegalArgumentException if entry is null. @throws IllegalArgumentException if entry's id is null. @throws IllegalArgumentException if entry's space id is null.
[ "Un", "-", "Publish", "an", "Entry", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleEntries.java#L322-L329
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleEntries.java
ModuleEntries.update
public CMAEntry update(CMAEntry entry) { assertNotNull(entry, "entry"); final String entryId = getResourceIdOrThrow(entry, "entry"); final String spaceId = getSpaceIdOrThrow(entry, "entry"); final String environmentId = entry.getEnvironmentId(); final Integer version = getVersionOrThrow(entry, "upda...
java
public CMAEntry update(CMAEntry entry) { assertNotNull(entry, "entry"); final String entryId = getResourceIdOrThrow(entry, "entry"); final String spaceId = getSpaceIdOrThrow(entry, "entry"); final String environmentId = entry.getEnvironmentId(); final Integer version = getVersionOrThrow(entry, "upda...
[ "public", "CMAEntry", "update", "(", "CMAEntry", "entry", ")", "{", "assertNotNull", "(", "entry", ",", "\"entry\"", ")", ";", "final", "String", "entryId", "=", "getResourceIdOrThrow", "(", "entry", ",", "\"entry\"", ")", ";", "final", "String", "spaceId", ...
Update an Entry. @param entry Entry @return {@link CMAEntry} result instance @throws IllegalArgumentException if entry is null. @throws IllegalArgumentException if entry's id is null. @throws IllegalArgumentException if entry's space id is null. @throws IllegalArgumentException if entry's version is null.
[ "Update", "an", "Entry", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleEntries.java#L341-L355
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleEntries.java
ModuleEntries.fetchAllSnapshots
public CMAArray<CMASnapshot> fetchAllSnapshots(CMAEntry entry) { assertNotNull(entry, "entry"); final String entryId = getResourceIdOrThrow(entry, "entry"); final String spaceId = getSpaceIdOrThrow(entry, "entry"); final String environmentId = entry.getEnvironmentId(); return service.fetchAllSnaps...
java
public CMAArray<CMASnapshot> fetchAllSnapshots(CMAEntry entry) { assertNotNull(entry, "entry"); final String entryId = getResourceIdOrThrow(entry, "entry"); final String spaceId = getSpaceIdOrThrow(entry, "entry"); final String environmentId = entry.getEnvironmentId(); return service.fetchAllSnaps...
[ "public", "CMAArray", "<", "CMASnapshot", ">", "fetchAllSnapshots", "(", "CMAEntry", "entry", ")", "{", "assertNotNull", "(", "entry", ",", "\"entry\"", ")", ";", "final", "String", "entryId", "=", "getResourceIdOrThrow", "(", "entry", ",", "\"entry\"", ")", "...
Fetch all snapshots of an entry. @param entry the entry whose snapshots to be returned. @return an array of snapshots. @throws IllegalArgumentException if entry is null. @throws IllegalArgumentException if entry's id is null. @throws IllegalArgumentException if entry's space id is null.
[ "Fetch", "all", "snapshots", "of", "an", "entry", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleEntries.java#L366-L374
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleEntries.java
ModuleEntries.fetchOneSnapshot
public CMASnapshot fetchOneSnapshot(CMAEntry entry, String snapshotId) { assertNotNull(entry, "entry"); assertNotNull(snapshotId, "snapshotId"); final String entryId = getResourceIdOrThrow(entry, "entry"); final String spaceId = getSpaceIdOrThrow(entry, "entry"); final String environmentId = entry....
java
public CMASnapshot fetchOneSnapshot(CMAEntry entry, String snapshotId) { assertNotNull(entry, "entry"); assertNotNull(snapshotId, "snapshotId"); final String entryId = getResourceIdOrThrow(entry, "entry"); final String spaceId = getSpaceIdOrThrow(entry, "entry"); final String environmentId = entry....
[ "public", "CMASnapshot", "fetchOneSnapshot", "(", "CMAEntry", "entry", ",", "String", "snapshotId", ")", "{", "assertNotNull", "(", "entry", ",", "\"entry\"", ")", ";", "assertNotNull", "(", "snapshotId", ",", "\"snapshotId\"", ")", ";", "final", "String", "entr...
Fetch a specific snapshot of an entry. @param entry the entry whose snapshot to be returned. @param snapshotId the snapshot to be returned. @return an array of snapshots. @throws IllegalArgumentException if entry is null. @throws IllegalArgumentException if entry's id is null. @throws IllegalArgumentException if ...
[ "Fetch", "a", "specific", "snapshot", "of", "an", "entry", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleEntries.java#L387-L396
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/interceptor/ErrorInterceptor.java
ErrorInterceptor.intercept
@Override public Response intercept(Chain chain) throws IOException { final Request request = chain.request(); final Response response = chain.proceed(request); if (!response.isSuccessful()) { throw new CMAHttpException(request, response); } return response; }
java
@Override public Response intercept(Chain chain) throws IOException { final Request request = chain.request(); final Response response = chain.proceed(request); if (!response.isSuccessful()) { throw new CMAHttpException(request, response); } return response; }
[ "@", "Override", "public", "Response", "intercept", "(", "Chain", "chain", ")", "throws", "IOException", "{", "final", "Request", "request", "=", "chain", ".", "request", "(", ")", ";", "final", "Response", "response", "=", "chain", ".", "proceed", "(", "r...
Intercepts chain to check for unsuccessful requests. @param chain provided by the framework to check @return the response if no error occurred @throws IOException will get thrown if response code is unsuccessful
[ "Intercepts", "chain", "to", "check", "for", "unsuccessful", "requests", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/interceptor/ErrorInterceptor.java#L24-L33
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/interceptor/RateLimitInterceptor.java
RateLimitInterceptor.intercept
@Override public Response intercept(Chain chain) throws IOException { final Response response = chain.proceed(chain.request()); final Headers headers = response.headers(); final Map<String, List<String>> mappedHeaders = headers.toMultimap(); final RateLimits limits = new RateLimits.DefaultParser().pars...
java
@Override public Response intercept(Chain chain) throws IOException { final Response response = chain.proceed(chain.request()); final Headers headers = response.headers(); final Map<String, List<String>> mappedHeaders = headers.toMultimap(); final RateLimits limits = new RateLimits.DefaultParser().pars...
[ "@", "Override", "public", "Response", "intercept", "(", "Chain", "chain", ")", "throws", "IOException", "{", "final", "Response", "response", "=", "chain", ".", "proceed", "(", "chain", ".", "request", "(", ")", ")", ";", "final", "Headers", "headers", "=...
Intercept a http call. @param chain the current chain of calls. @return a response from this call. @throws IOException if something goes wrong.
[ "Intercept", "a", "http", "call", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/interceptor/RateLimitInterceptor.java#L40-L50
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/model/rich/RichTextFactory.java
RichTextFactory.resolveRichNode
static CMARichNode resolveRichNode(Map<String, Object> rawNode) { final String type = (String) rawNode.get("nodeType"); if (RESOLVER_MAP.containsKey(type)) { return RESOLVER_MAP.get(type).resolve(rawNode); } else { return null; } }
java
static CMARichNode resolveRichNode(Map<String, Object> rawNode) { final String type = (String) rawNode.get("nodeType"); if (RESOLVER_MAP.containsKey(type)) { return RESOLVER_MAP.get(type).resolve(rawNode); } else { return null; } }
[ "static", "CMARichNode", "resolveRichNode", "(", "Map", "<", "String", ",", "Object", ">", "rawNode", ")", "{", "final", "String", "type", "=", "(", "String", ")", "rawNode", ".", "get", "(", "\"nodeType\"", ")", ";", "if", "(", "RESOLVER_MAP", ".", "con...
Resolve one node. @param rawNode the map response from Contentful @return a CMARichNode from this SDK.
[ "Resolve", "one", "node", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/model/rich/RichTextFactory.java#L265-L272
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/model/CMAPersonalAccessToken.java
CMAPersonalAccessToken.addScope
public CMAPersonalAccessToken addScope(Scope scope) { if (scopes == null) { scopes = new ArrayList<Scope>(); } scopes.add(scope); return this; }
java
public CMAPersonalAccessToken addScope(Scope scope) { if (scopes == null) { scopes = new ArrayList<Scope>(); } scopes.add(scope); return this; }
[ "public", "CMAPersonalAccessToken", "addScope", "(", "Scope", "scope", ")", "{", "if", "(", "scopes", "==", "null", ")", "{", "scopes", "=", "new", "ArrayList", "<", "Scope", ">", "(", ")", ";", "}", "scopes", ".", "add", "(", "scope", ")", ";", "ret...
Add a new scope to the list of scopes. Creates a new list of scopes if no scopes found. @param scope the new scope to be added. @return this instance for chaining.
[ "Add", "a", "new", "scope", "to", "the", "list", "of", "scopes", ".", "Creates", "a", "new", "list", "of", "scopes", "if", "no", "scopes", "found", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/model/CMAPersonalAccessToken.java#L71-L78
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleSpaces.java
ModuleSpaces.create
public CMASpace create(CMASpace space) { assertNotNull(space, "space"); final CMASystem system = space.getSystem(); space.setSystem(null); try { return service.create(space).blockingFirst(); } finally { space.setSystem(system); } }
java
public CMASpace create(CMASpace space) { assertNotNull(space, "space"); final CMASystem system = space.getSystem(); space.setSystem(null); try { return service.create(space).blockingFirst(); } finally { space.setSystem(system); } }
[ "public", "CMASpace", "create", "(", "CMASpace", "space", ")", "{", "assertNotNull", "(", "space", ",", "\"space\"", ")", ";", "final", "CMASystem", "system", "=", "space", ".", "getSystem", "(", ")", ";", "space", ".", "setSystem", "(", "null", ")", ";"...
Create a Space. @param space CMASpace @return {@link CMASpace} result instance @throws IllegalArgumentException if space is null.
[ "Create", "a", "Space", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleSpaces.java#L74-L85
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleSpaces.java
ModuleSpaces.create
public CMASpace create(String spaceName, String organizationId) { assertNotNull(spaceName, "spaceName"); assertNotNull(organizationId, "organizationId"); return service.create(organizationId, new CMASpace().setName(spaceName).setSystem(null)) .blockingFirst(); }
java
public CMASpace create(String spaceName, String organizationId) { assertNotNull(spaceName, "spaceName"); assertNotNull(organizationId, "organizationId"); return service.create(organizationId, new CMASpace().setName(spaceName).setSystem(null)) .blockingFirst(); }
[ "public", "CMASpace", "create", "(", "String", "spaceName", ",", "String", "organizationId", ")", "{", "assertNotNull", "(", "spaceName", ",", "\"spaceName\"", ")", ";", "assertNotNull", "(", "organizationId", ",", "\"organizationId\"", ")", ";", "return", "servic...
Create a Space in an Organization. @param spaceName Space name @param organizationId organization ID @return {@link CMASpace} result instance @throws IllegalArgumentException if spaceName is null. @throws IllegalArgumentException if organizationId is null.
[ "Create", "a", "Space", "in", "an", "Organization", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleSpaces.java#L96-L102
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleSpaces.java
ModuleSpaces.create
public CMASpace create(CMASpace space, String organizationId) { assertNotNull(space, "space"); assertNotNull(space.getName(), "spaceName"); assertNotNull(organizationId, "organizationId"); final CMASystem system = space.getSystem(); space.setSystem(null); try { return service.create(orga...
java
public CMASpace create(CMASpace space, String organizationId) { assertNotNull(space, "space"); assertNotNull(space.getName(), "spaceName"); assertNotNull(organizationId, "organizationId"); final CMASystem system = space.getSystem(); space.setSystem(null); try { return service.create(orga...
[ "public", "CMASpace", "create", "(", "CMASpace", "space", ",", "String", "organizationId", ")", "{", "assertNotNull", "(", "space", ",", "\"space\"", ")", ";", "assertNotNull", "(", "space", ".", "getName", "(", ")", ",", "\"spaceName\"", ")", ";", "assertNo...
Create a Space in an organization. @param space Space @param organizationId organization ID @return {@link CMASpace} result instance @throws IllegalArgumentException if space is null. @throws IllegalArgumentException if space's name is null. @throws IllegalArgumentException if organizationId is null.
[ "Create", "a", "Space", "in", "an", "organization", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleSpaces.java#L114-L127
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleSpaces.java
ModuleSpaces.fetchAll
public CMAArray<CMASpace> fetchAll(Map<String, String> query) { DefaultQueryParameter.putIfNotSet(query, DefaultQueryParameter.FETCH); return service.fetchAll(query).blockingFirst(); }
java
public CMAArray<CMASpace> fetchAll(Map<String, String> query) { DefaultQueryParameter.putIfNotSet(query, DefaultQueryParameter.FETCH); return service.fetchAll(query).blockingFirst(); }
[ "public", "CMAArray", "<", "CMASpace", ">", "fetchAll", "(", "Map", "<", "String", ",", "String", ">", "query", ")", "{", "DefaultQueryParameter", ".", "putIfNotSet", "(", "query", ",", "DefaultQueryParameter", ".", "FETCH", ")", ";", "return", "service", "....
Fetch all Spaces, using specific queries. @param query filter the results @return {@link CMAArray} result instance
[ "Fetch", "all", "Spaces", "using", "specific", "queries", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleSpaces.java#L168-L171
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleSpaces.java
ModuleSpaces.update
public CMASpace update(CMASpace space) { assertNotNull(space, "space"); assertNotNull(space.getName(), "space.name"); final String spaceId = getResourceIdOrThrow(space, "space"); final Integer version = getVersionOrThrow(space, "update"); final CMASystem system = space.getSystem(); space.setSys...
java
public CMASpace update(CMASpace space) { assertNotNull(space, "space"); assertNotNull(space.getName(), "space.name"); final String spaceId = getResourceIdOrThrow(space, "space"); final Integer version = getVersionOrThrow(space, "update"); final CMASystem system = space.getSystem(); space.setSys...
[ "public", "CMASpace", "update", "(", "CMASpace", "space", ")", "{", "assertNotNull", "(", "space", ",", "\"space\"", ")", ";", "assertNotNull", "(", "space", ".", "getName", "(", ")", ",", "\"space.name\"", ")", ";", "final", "String", "spaceId", "=", "get...
Update a Space. @param space Space @return {@link CMASpace} result instance @throws IllegalArgumentException if space is null. @throws IllegalArgumentException if space's name is null. @throws IllegalArgumentException if space's space id is null. @throws IllegalArgumentException if space's version is null.
[ "Update", "a", "Space", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleSpaces.java#L195-L209
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/DefaultQueryParameter.java
DefaultQueryParameter.putIfNotSet
static void putIfNotSet(Map<String, String> target, Map<String, String> defaults) { for (final String key : defaults.keySet()) { if (!target.containsKey(key)) { target.put(key, defaults.get(key)); } } }
java
static void putIfNotSet(Map<String, String> target, Map<String, String> defaults) { for (final String key : defaults.keySet()) { if (!target.containsKey(key)) { target.put(key, defaults.get(key)); } } }
[ "static", "void", "putIfNotSet", "(", "Map", "<", "String", ",", "String", ">", "target", ",", "Map", "<", "String", ",", "String", ">", "defaults", ")", "{", "for", "(", "final", "String", "key", ":", "defaults", ".", "keySet", "(", ")", ")", "{", ...
Update a given map with some default values if not already present in map. @param target the map to be filled with values, if a key for them is not set already. @param defaults the list of defaults, to be set.
[ "Update", "a", "given", "map", "with", "some", "default", "values", "if", "not", "already", "present", "in", "map", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/DefaultQueryParameter.java#L37-L43
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/model/CMASpaceMembership.java
CMASpaceMembership.setRoles
public CMASpaceMembership setRoles(CMALink... roles) { if (roles == null) { throw new IllegalArgumentException("Roles cannot be null!"); } if (roles.length <= 0) { throw new IllegalArgumentException("Roles cannot be empty!"); } this.roles = new ArrayList<CMALink>(Arrays.asList(roles)); ...
java
public CMASpaceMembership setRoles(CMALink... roles) { if (roles == null) { throw new IllegalArgumentException("Roles cannot be null!"); } if (roles.length <= 0) { throw new IllegalArgumentException("Roles cannot be empty!"); } this.roles = new ArrayList<CMALink>(Arrays.asList(roles)); ...
[ "public", "CMASpaceMembership", "setRoles", "(", "CMALink", "...", "roles", ")", "{", "if", "(", "roles", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Roles cannot be null!\"", ")", ";", "}", "if", "(", "roles", ".", "length", ...
Replace all roles with the given argument. @param roles the roles to be used. @return this instance of membership for ease of chaining. @throws IllegalArgumentException if roles is null. @throws IllegalArgumentException if roles does not contain any elements.
[ "Replace", "all", "roles", "with", "the", "given", "argument", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/model/CMASpaceMembership.java#L56-L66
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/model/CMASpaceMembership.java
CMASpaceMembership.addRole
public CMASpaceMembership addRole(CMALink role) { if (role == null) { throw new IllegalArgumentException("Role cannot be null!"); } if (roles == null) { roles = new ArrayList<CMALink>(); } this.roles.add(role); return this; }
java
public CMASpaceMembership addRole(CMALink role) { if (role == null) { throw new IllegalArgumentException("Role cannot be null!"); } if (roles == null) { roles = new ArrayList<CMALink>(); } this.roles.add(role); return this; }
[ "public", "CMASpaceMembership", "addRole", "(", "CMALink", "role", ")", "{", "if", "(", "role", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Role cannot be null!\"", ")", ";", "}", "if", "(", "roles", "==", "null", ")", "{", ...
Add a role to the list of roles. @param role the role to be used, needs to be not null. @return this membership for ease of chaining. @throws IllegalArgumentException if role is null.
[ "Add", "a", "role", "to", "the", "list", "of", "roles", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/model/CMASpaceMembership.java#L75-L86
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/model/CMASpaceMembership.java
CMASpaceMembership.setEmail
public CMASpaceMembership setEmail(String email) { if (email == null) { throw new IllegalArgumentException("email cannot be null."); } if (!email.contains("@")) { throw new IllegalArgumentException("email needs to contain an '@' symbol."); } this.email = email; return this; }
java
public CMASpaceMembership setEmail(String email) { if (email == null) { throw new IllegalArgumentException("email cannot be null."); } if (!email.contains("@")) { throw new IllegalArgumentException("email needs to contain an '@' symbol."); } this.email = email; return this; }
[ "public", "CMASpaceMembership", "setEmail", "(", "String", "email", ")", "{", "if", "(", "email", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"email cannot be null.\"", ")", ";", "}", "if", "(", "!", "email", ".", "contains", "...
Set the email address when creating a new membership. @param email to be used for inviting people. @return this membership for ease of chaining. @throws IllegalArgumentException if email is null. @throws IllegalArgumentException if email does not contain an '@'.
[ "Set", "the", "email", "address", "when", "creating", "a", "new", "membership", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/model/CMASpaceMembership.java#L108-L118
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/CMAClient.java
CMAClient.setCallbackExecutor
private void setCallbackExecutor(Builder clientBuilder) { if (clientBuilder.callbackExecutor == null) { callbackExecutor = Platform.get().callbackExecutor(); } else { callbackExecutor = clientBuilder.callbackExecutor; } }
java
private void setCallbackExecutor(Builder clientBuilder) { if (clientBuilder.callbackExecutor == null) { callbackExecutor = Platform.get().callbackExecutor(); } else { callbackExecutor = clientBuilder.callbackExecutor; } }
[ "private", "void", "setCallbackExecutor", "(", "Builder", "clientBuilder", ")", "{", "if", "(", "clientBuilder", ".", "callbackExecutor", "==", "null", ")", "{", "callbackExecutor", "=", "Platform", ".", "get", "(", ")", ".", "callbackExecutor", "(", ")", ";",...
Sets the callback executor.
[ "Sets", "the", "callback", "executor", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/CMAClient.java#L181-L187
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/CMAClient.java
CMAClient.setEndpoint
private Retrofit.Builder setEndpoint(Retrofit.Builder retrofitBuilder, String endpoint) { if (endpoint != null) { return retrofitBuilder.baseUrl(endpoint); } return retrofitBuilder; }
java
private Retrofit.Builder setEndpoint(Retrofit.Builder retrofitBuilder, String endpoint) { if (endpoint != null) { return retrofitBuilder.baseUrl(endpoint); } return retrofitBuilder; }
[ "private", "Retrofit", ".", "Builder", "setEndpoint", "(", "Retrofit", ".", "Builder", "retrofitBuilder", ",", "String", "endpoint", ")", "{", "if", "(", "endpoint", "!=", "null", ")", "{", "return", "retrofitBuilder", ".", "baseUrl", "(", "endpoint", ")", "...
Configures CMA core endpoint.
[ "Configures", "CMA", "core", "endpoint", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/CMAClient.java#L192-L197
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/model/CMAContentType.java
CMAContentType.addField
public CMAContentType addField(CMAField field) { if (fields == null) { fields = new ArrayList<CMAField>(); } fields.add(field); return this; }
java
public CMAContentType addField(CMAField field) { if (fields == null) { fields = new ArrayList<CMAField>(); } fields.add(field); return this; }
[ "public", "CMAContentType", "addField", "(", "CMAField", "field", ")", "{", "if", "(", "fields", "==", "null", ")", "{", "fields", "=", "new", "ArrayList", "<", "CMAField", ">", "(", ")", ";", "}", "fields", ".", "add", "(", "field", ")", ";", "retur...
Adds a new field. @param field CMAField instance @return this {@code CMAContentType}
[ "Adds", "a", "new", "field", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/model/CMAContentType.java#L51-L58
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleApiKeys.java
ModuleApiKeys.fetchAll
public CMAArray<CMAApiKey> fetchAll(Map<String, String> query) { throwIfEnvironmentIdIsSet(); return fetchAll(spaceId, query); }
java
public CMAArray<CMAApiKey> fetchAll(Map<String, String> query) { throwIfEnvironmentIdIsSet(); return fetchAll(spaceId, query); }
[ "public", "CMAArray", "<", "CMAApiKey", ">", "fetchAll", "(", "Map", "<", "String", ",", "String", ">", "query", ")", "{", "throwIfEnvironmentIdIsSet", "(", ")", ";", "return", "fetchAll", "(", "spaceId", ",", "query", ")", ";", "}" ]
Query for specific api keys from the configured space. @param query the terms to query for specific keys. @return a list of delivery api keys. @throws IllegalArgumentException if configured space Id is null. @throws CMANotWithEnvironmentsException if environmentId was set using {@link CMAClient.Builder#setEnvir...
[ "Query", "for", "specific", "api", "keys", "from", "the", "configured", "space", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleApiKeys.java#L100-L103
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleApiKeys.java
ModuleApiKeys.update
public CMAApiKey update(CMAApiKey key) { assertNotNull(key, "key"); final String keyId = getResourceIdOrThrow(key, "key"); final String spaceId = getSpaceIdOrThrow(key, "key"); final Integer version = getVersionOrThrow(key, "update"); final CMASystem system = key.getSystem(); key.setSystem(null...
java
public CMAApiKey update(CMAApiKey key) { assertNotNull(key, "key"); final String keyId = getResourceIdOrThrow(key, "key"); final String spaceId = getSpaceIdOrThrow(key, "key"); final Integer version = getVersionOrThrow(key, "update"); final CMASystem system = key.getSystem(); key.setSystem(null...
[ "public", "CMAApiKey", "update", "(", "CMAApiKey", "key", ")", "{", "assertNotNull", "(", "key", ",", "\"key\"", ")", ";", "final", "String", "keyId", "=", "getResourceIdOrThrow", "(", "key", ",", "\"key\"", ")", ";", "final", "String", "spaceId", "=", "ge...
Updates a delivery api key from the configured space. @param key the key to be updated. @return the just updated key. @throws IllegalArgumentException if key is null. @throws IllegalArgumentException if keys id is null. @throws IllegalArgumentException if keys spaceId is null.
[ "Updates", "a", "delivery", "api", "key", "from", "the", "configured", "space", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleApiKeys.java#L190-L212
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleApiKeys.java
ModuleApiKeys.create
public CMAApiKey create(String spaceId, CMAApiKey key) { assertNotNull(spaceId, "spaceId"); assertNotNull(key, "key"); return service.create(spaceId, key).blockingFirst(); }
java
public CMAApiKey create(String spaceId, CMAApiKey key) { assertNotNull(spaceId, "spaceId"); assertNotNull(key, "key"); return service.create(spaceId, key).blockingFirst(); }
[ "public", "CMAApiKey", "create", "(", "String", "spaceId", ",", "CMAApiKey", "key", ")", "{", "assertNotNull", "(", "spaceId", ",", "\"spaceId\"", ")", ";", "assertNotNull", "(", "key", ",", "\"key\"", ")", ";", "return", "service", ".", "create", "(", "sp...
Create a new delivery api key. @param spaceId the id of the space this is valid on. @param key the key to be created. @return the just created key, containing the delivery token. @throws IllegalArgumentException if spaceId is null. @throws IllegalArgumentException if key is null.
[ "Create", "a", "new", "delivery", "api", "key", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleApiKeys.java#L223-L228
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleApiKeys.java
ModuleApiKeys.delete
public int delete(CMAApiKey key) { assertNotNull(key, "key"); final String space = getSpaceIdOrThrow(key, "key"); final String id = getResourceIdOrThrow(key, "key"); return service.delete(space, id).blockingFirst().code(); }
java
public int delete(CMAApiKey key) { assertNotNull(key, "key"); final String space = getSpaceIdOrThrow(key, "key"); final String id = getResourceIdOrThrow(key, "key"); return service.delete(space, id).blockingFirst().code(); }
[ "public", "int", "delete", "(", "CMAApiKey", "key", ")", "{", "assertNotNull", "(", "key", ",", "\"key\"", ")", ";", "final", "String", "space", "=", "getSpaceIdOrThrow", "(", "key", ",", "\"key\"", ")", ";", "final", "String", "id", "=", "getResourceIdOrT...
Delete a given api key from the configured space. @param key the key to be deleted. @return 204 upon success. @throws IllegalArgumentException if key is null. @throws IllegalArgumentException if key's spaceId is null.
[ "Delete", "a", "given", "api", "key", "from", "the", "configured", "space", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleApiKeys.java#L238-L244
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleUploads.java
ModuleUploads.readAllBytes
static byte[] readAllBytes(InputStream stream) throws IOException { int bytesRead = 0; byte[] currentChunk = new byte[255]; final List<byte[]> chunks = new ArrayList<byte[]>(); while ((bytesRead = stream.read(currentChunk)) != -1) { chunks.add(copyOf(currentChunk, bytesRead)); } if (chunk...
java
static byte[] readAllBytes(InputStream stream) throws IOException { int bytesRead = 0; byte[] currentChunk = new byte[255]; final List<byte[]> chunks = new ArrayList<byte[]>(); while ((bytesRead = stream.read(currentChunk)) != -1) { chunks.add(copyOf(currentChunk, bytesRead)); } if (chunk...
[ "static", "byte", "[", "]", "readAllBytes", "(", "InputStream", "stream", ")", "throws", "IOException", "{", "int", "bytesRead", "=", "0", ";", "byte", "[", "]", "currentChunk", "=", "new", "byte", "[", "255", "]", ";", "final", "List", "<", "byte", "[...
Tries to read all content from a give stream. @param stream stream to be read. @return bytes of the stream @throws IOException if the stream is not accessible @throws IOException if the stream did not contain data.
[ "Tries", "to", "read", "all", "content", "from", "a", "give", "stream", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleUploads.java#L74-L98
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleUploads.java
ModuleUploads.delete
public int delete(CMAUpload upload) { final String uploadId = getResourceIdOrThrow(upload, "upload"); final String spaceId = getSpaceIdOrThrow(upload, "upload"); final Response<Void> response = service.delete(spaceId, uploadId).blockingFirst(); return response.code(); }
java
public int delete(CMAUpload upload) { final String uploadId = getResourceIdOrThrow(upload, "upload"); final String spaceId = getSpaceIdOrThrow(upload, "upload"); final Response<Void> response = service.delete(spaceId, uploadId).blockingFirst(); return response.code(); }
[ "public", "int", "delete", "(", "CMAUpload", "upload", ")", "{", "final", "String", "uploadId", "=", "getResourceIdOrThrow", "(", "upload", ",", "\"upload\"", ")", ";", "final", "String", "spaceId", "=", "getSpaceIdOrThrow", "(", "upload", ",", "\"upload\"", "...
Delete a given upload again. @param upload upload @return response code, 204 on success. @throws IllegalArgumentException if spaceId is null. @throws IllegalArgumentException if uploadId is null.
[ "Delete", "a", "given", "upload", "again", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleUploads.java#L197-L203
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleRoles.java
ModuleRoles.fetchAll
public CMAArray<CMARole> fetchAll(Map<String, String> query) { throwIfEnvironmentIdIsSet(); return fetchAll(spaceId, query); }
java
public CMAArray<CMARole> fetchAll(Map<String, String> query) { throwIfEnvironmentIdIsSet(); return fetchAll(spaceId, query); }
[ "public", "CMAArray", "<", "CMARole", ">", "fetchAll", "(", "Map", "<", "String", ",", "String", ">", "query", ")", "{", "throwIfEnvironmentIdIsSet", "(", ")", ";", "return", "fetchAll", "(", "spaceId", ",", "query", ")", ";", "}" ]
Fetch specific roles of the configured space. @param query the search criteria to search for. @return the array of roles. @throws IllegalArgumentException if configured spaceId is null. @throws CMANotWithEnvironmentsException if environmentId was set using {@link CMAClient.Builder#setEnvironmentId(String)}. @se...
[ "Fetch", "specific", "roles", "of", "the", "configured", "space", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleRoles.java#L99-L103
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/interceptor/HeaderInterceptor.java
HeaderInterceptor.intercept
@Override public Response intercept(Chain chain) throws IOException { final Request request = chain.request(); return chain.proceed(request.newBuilder() .addHeader(name, value) .build()); }
java
@Override public Response intercept(Chain chain) throws IOException { final Request request = chain.request(); return chain.proceed(request.newBuilder() .addHeader(name, value) .build()); }
[ "@", "Override", "public", "Response", "intercept", "(", "Chain", "chain", ")", "throws", "IOException", "{", "final", "Request", "request", "=", "chain", ".", "request", "(", ")", ";", "return", "chain", ".", "proceed", "(", "request", ".", "newBuilder", ...
Method called by framework, to enrich current request chain with requested header information. @param chain the execution chain for the request. @return the response received. @throws IOException in case of failure down the line.
[ "Method", "called", "by", "framework", "to", "enrich", "current", "request", "chain", "with", "requested", "header", "information", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/interceptor/HeaderInterceptor.java#L34-L40
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/model/CMAWebhook.java
CMAWebhook.addTopic
public CMAWebhook addTopic(CMAWebhookTopic topic) { if (this.topics == null) { this.topics = new ArrayList<CMAWebhookTopic>(); } this.topics.add(topic); return this; }
java
public CMAWebhook addTopic(CMAWebhookTopic topic) { if (this.topics == null) { this.topics = new ArrayList<CMAWebhookTopic>(); } this.topics.add(topic); return this; }
[ "public", "CMAWebhook", "addTopic", "(", "CMAWebhookTopic", "topic", ")", "{", "if", "(", "this", ".", "topics", "==", "null", ")", "{", "this", ".", "topics", "=", "new", "ArrayList", "<", "CMAWebhookTopic", ">", "(", ")", ";", "}", "this", ".", "topi...
Add a topic this webhook should be triggered on. @param topic a valid enum value for the trigger reason. @return this webhook for chaining
[ "Add", "a", "topic", "this", "webhook", "should", "be", "triggered", "on", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/model/CMAWebhook.java#L99-L106
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/model/CMAWebhook.java
CMAWebhook.addHeader
public CMAWebhook addHeader(String key, String value) { if (this.headers == null) { this.headers = new ArrayList<CMAWebhookHeader>(); } this.headers.add(new CMAWebhookHeader(key, value)); return this; }
java
public CMAWebhook addHeader(String key, String value) { if (this.headers == null) { this.headers = new ArrayList<CMAWebhookHeader>(); } this.headers.add(new CMAWebhookHeader(key, value)); return this; }
[ "public", "CMAWebhook", "addHeader", "(", "String", "key", ",", "String", "value", ")", "{", "if", "(", "this", ".", "headers", "==", "null", ")", "{", "this", ".", "headers", "=", "new", "ArrayList", "<", "CMAWebhookHeader", ">", "(", ")", ";", "}", ...
Adds a custom http header to the call done by this webhook. @param key HTTP header key to be used (aka 'X-My-Header-Name') @param value HTTP header value to be used (aka 'this-is-my-name') @return this webhook for chaining.
[ "Adds", "a", "custom", "http", "header", "to", "the", "call", "done", "by", "this", "webhook", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/model/CMAWebhook.java#L115-L122
train
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/model/CMAWebhook.java
CMAWebhook.setBasicAuthorization
public CMAWebhook setBasicAuthorization(String user, String password) { this.user = user; this.password = password; return this; }
java
public CMAWebhook setBasicAuthorization(String user, String password) { this.user = user; this.password = password; return this; }
[ "public", "CMAWebhook", "setBasicAuthorization", "(", "String", "user", ",", "String", "password", ")", "{", "this", ".", "user", "=", "user", ";", "this", ".", "password", "=", "password", ";", "return", "this", ";", "}" ]
Set authorization parameter for basic HTTP authorization on the url to be called by this webhook. @param user username to be used @param password password to be used (cannot be retrieved, only updated!) @return this webhook for chaining.
[ "Set", "authorization", "parameter", "for", "basic", "HTTP", "authorization", "on", "the", "url", "to", "be", "called", "by", "this", "webhook", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/model/CMAWebhook.java#L132-L136
train
camunda/camunda-connect
core/src/main/java/org/camunda/connect/impl/AbstractCloseableConnectorResponse.java
AbstractCloseableConnectorResponse.close
public void close() { Closeable closable = getClosable(); try { LOG.closingResponse(this); closable.close(); LOG.successfullyClosedResponse(this); } catch (IOException e) { throw LOG.exceptionWhileClosingResponse(e); } }
java
public void close() { Closeable closable = getClosable(); try { LOG.closingResponse(this); closable.close(); LOG.successfullyClosedResponse(this); } catch (IOException e) { throw LOG.exceptionWhileClosingResponse(e); } }
[ "public", "void", "close", "(", ")", "{", "Closeable", "closable", "=", "getClosable", "(", ")", ";", "try", "{", "LOG", ".", "closingResponse", "(", "this", ")", ";", "closable", ".", "close", "(", ")", ";", "LOG", ".", "successfullyClosedResponse", "("...
Implements the default close behavior
[ "Implements", "the", "default", "close", "behavior" ]
fff2e790350d9be5ad507a86eb36e67cb24b3f3e
https://github.com/camunda/camunda-connect/blob/fff2e790350d9be5ad507a86eb36e67cb24b3f3e/core/src/main/java/org/camunda/connect/impl/AbstractCloseableConnectorResponse.java#L38-L47
train
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/search/sort/SearchSort.java
SearchSort.sortGeoDistance
public static SearchSortGeoDistance sortGeoDistance(double locationLon, double locationLat, String field) { return new SearchSortGeoDistance(locationLon, locationLat, field); }
java
public static SearchSortGeoDistance sortGeoDistance(double locationLon, double locationLat, String field) { return new SearchSortGeoDistance(locationLon, locationLat, field); }
[ "public", "static", "SearchSortGeoDistance", "sortGeoDistance", "(", "double", "locationLon", ",", "double", "locationLat", ",", "String", "field", ")", "{", "return", "new", "SearchSortGeoDistance", "(", "locationLon", ",", "locationLat", ",", "field", ")", ";", ...
Sort by geo location. @param locationLon longitude of the location. @param locationLat latitude of the location. @param field the field name.
[ "Sort", "by", "geo", "location", "." ]
f36a0ee0c66923bdde47838ca543e50cbaa99e14
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/search/sort/SearchSort.java#L81-L83
train
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/util/NodeLocatorHelper.java
NodeLocatorHelper.nodes
public List<InetAddress> nodes() { List<InetAddress> allNodes = new ArrayList<InetAddress>(); BucketConfig config = bucketConfig.get(); for (NodeInfo nodeInfo : config.nodes()) { try { allNodes.add(InetAddress.getByName(nodeInfo.hostname().address())); } c...
java
public List<InetAddress> nodes() { List<InetAddress> allNodes = new ArrayList<InetAddress>(); BucketConfig config = bucketConfig.get(); for (NodeInfo nodeInfo : config.nodes()) { try { allNodes.add(InetAddress.getByName(nodeInfo.hostname().address())); } c...
[ "public", "List", "<", "InetAddress", ">", "nodes", "(", ")", "{", "List", "<", "InetAddress", ">", "allNodes", "=", "new", "ArrayList", "<", "InetAddress", ">", "(", ")", ";", "BucketConfig", "config", "=", "bucketConfig", ".", "get", "(", ")", ";", "...
Returns all nodes known in the current config. @return all currently known nodes.
[ "Returns", "all", "nodes", "known", "in", "the", "current", "config", "." ]
f36a0ee0c66923bdde47838ca543e50cbaa99e14
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/util/NodeLocatorHelper.java#L173-L184
train
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/search/result/impl/DefaultAsyncSearchQueryResult.java
DefaultAsyncSearchQueryResult.fromHttp429
public static AsyncSearchQueryResult fromHttp429(String payload) { SearchStatus status = new DefaultSearchStatus(1L, 1L, 0L); SearchMetrics metrics = new DefaultSearchMetrics(0L, 0L, 0d); return new DefaultAsyncSearchQueryResult( status, Observable.<SearchQueryRo...
java
public static AsyncSearchQueryResult fromHttp429(String payload) { SearchStatus status = new DefaultSearchStatus(1L, 1L, 0L); SearchMetrics metrics = new DefaultSearchMetrics(0L, 0L, 0d); return new DefaultAsyncSearchQueryResult( status, Observable.<SearchQueryRo...
[ "public", "static", "AsyncSearchQueryResult", "fromHttp429", "(", "String", "payload", ")", "{", "SearchStatus", "status", "=", "new", "DefaultSearchStatus", "(", "1L", ",", "1L", ",", "0L", ")", ";", "SearchMetrics", "metrics", "=", "new", "DefaultSearchMetrics",...
Creates a result out of the http 429 response code if retry didn't work.
[ "Creates", "a", "result", "out", "of", "the", "http", "429", "response", "code", "if", "retry", "didn", "t", "work", "." ]
f36a0ee0c66923bdde47838ca543e50cbaa99e14
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/search/result/impl/DefaultAsyncSearchQueryResult.java#L305-L315
train
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/search/result/impl/DefaultAsyncSearchQueryResult.java
DefaultAsyncSearchQueryResult.fromIndexNotFound
@Deprecated public static AsyncSearchQueryResult fromIndexNotFound(final String indexName) { //dummy default values SearchStatus status = new DefaultSearchStatus(1L, 1L, 0L); SearchMetrics metrics = new DefaultSearchMetrics(0L, 0L, 0d); return new DefaultAsyncSearchQueryResult( ...
java
@Deprecated public static AsyncSearchQueryResult fromIndexNotFound(final String indexName) { //dummy default values SearchStatus status = new DefaultSearchStatus(1L, 1L, 0L); SearchMetrics metrics = new DefaultSearchMetrics(0L, 0L, 0d); return new DefaultAsyncSearchQueryResult( ...
[ "@", "Deprecated", "public", "static", "AsyncSearchQueryResult", "fromIndexNotFound", "(", "final", "String", "indexName", ")", "{", "//dummy default values", "SearchStatus", "status", "=", "new", "DefaultSearchStatus", "(", "1L", ",", "1L", ",", "0L", ")", ";", "...
A utility method to return a result when the index is not found. @return an {@link AsyncSearchQueryResult} that will emit a {@link IndexDoesNotExistException} when calling its {@link AsyncSearchQueryResult#hits() hits()} method. @deprecated FTS is still in BETA so the response format is likely to change in a future ve...
[ "A", "utility", "method", "to", "return", "a", "result", "when", "the", "index", "is", "not", "found", "." ]
f36a0ee0c66923bdde47838ca543e50cbaa99e14
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/search/result/impl/DefaultAsyncSearchQueryResult.java#L325-L339
train
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/repository/mapping/ReflectionBasedPropertyMetadata.java
ReflectionBasedPropertyMetadata.extractName
private static String extractName(final Field fieldReference) { com.couchbase.client.java.repository.annotation.Field annotation = fieldReference.getAnnotation(com.couchbase.client.java.repository.annotation.Field.class); if (annotation == null || annotation.value() == null || annotation.val...
java
private static String extractName(final Field fieldReference) { com.couchbase.client.java.repository.annotation.Field annotation = fieldReference.getAnnotation(com.couchbase.client.java.repository.annotation.Field.class); if (annotation == null || annotation.value() == null || annotation.val...
[ "private", "static", "String", "extractName", "(", "final", "Field", "fieldReference", ")", "{", "com", ".", "couchbase", ".", "client", ".", "java", ".", "repository", ".", "annotation", ".", "Field", "annotation", "=", "fieldReference", ".", "getAnnotation", ...
Helper method to extract the potentially aliased name of the field. @param fieldReference the field reference. @return the potentially aliased name of the field.
[ "Helper", "method", "to", "extract", "the", "potentially", "aliased", "name", "of", "the", "field", "." ]
f36a0ee0c66923bdde47838ca543e50cbaa99e14
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/repository/mapping/ReflectionBasedPropertyMetadata.java#L107-L115
train
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/subdoc/DocumentFragment.java
DocumentFragment.rawContent
public byte[] rawContent(String path) { if (path == null) { return null; } for (SubdocOperationResult<OPERATION> result : resultList) { if (path.equals(result.path())) { return interpretResultRaw(result); } } return null; }
java
public byte[] rawContent(String path) { if (path == null) { return null; } for (SubdocOperationResult<OPERATION> result : resultList) { if (path.equals(result.path())) { return interpretResultRaw(result); } } return null; }
[ "public", "byte", "[", "]", "rawContent", "(", "String", "path", ")", "{", "if", "(", "path", "==", "null", ")", "{", "return", "null", ";", "}", "for", "(", "SubdocOperationResult", "<", "OPERATION", ">", "result", ":", "resultList", ")", "{", "if", ...
Attempt to get the serialized form of the value corresponding to the first operation that targeted the given path, as an array of bytes. If the operation was successful, the value will be returned. Otherwise the adequate {@link SubDocumentException} will be thrown (mostly in the case of multiple lookups). If multiple...
[ "Attempt", "to", "get", "the", "serialized", "form", "of", "the", "value", "corresponding", "to", "the", "first", "operation", "that", "targeted", "the", "given", "path", "as", "an", "array", "of", "bytes", "." ]
f36a0ee0c66923bdde47838ca543e50cbaa99e14
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/subdoc/DocumentFragment.java#L184-L194
train
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/subdoc/DocumentFragment.java
DocumentFragment.status
public ResponseStatus status(String path) { if (path == null) { return null; } for (SubdocOperationResult<OPERATION> result : resultList) { if (path.equals(result.path())) { return result.status(); } } return null; }
java
public ResponseStatus status(String path) { if (path == null) { return null; } for (SubdocOperationResult<OPERATION> result : resultList) { if (path.equals(result.path())) { return result.status(); } } return null; }
[ "public", "ResponseStatus", "status", "(", "String", "path", ")", "{", "if", "(", "path", "==", "null", ")", "{", "return", "null", ";", "}", "for", "(", "SubdocOperationResult", "<", "OPERATION", ">", "result", ":", "resultList", ")", "{", "if", "(", ...
Get the operation status code corresponding to the first operation that targeted the given path. This can be used in place of {@link #content(String)} in order to avoid an {@link CouchbaseException} being thrown. @param path the path of the desired operation. @return the status of the operation.
[ "Get", "the", "operation", "status", "code", "corresponding", "to", "the", "first", "operation", "that", "targeted", "the", "given", "path", "." ]
f36a0ee0c66923bdde47838ca543e50cbaa99e14
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/subdoc/DocumentFragment.java#L230-L240
train
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/subdoc/DocumentFragment.java
DocumentFragment.exists
public boolean exists(String path) { if (path == null) { return false; } for (SubdocOperationResult<OPERATION> result : resultList) { if (path.equals(result.path()) && !(result.value() instanceof Exception)) { return true; } } r...
java
public boolean exists(String path) { if (path == null) { return false; } for (SubdocOperationResult<OPERATION> result : resultList) { if (path.equals(result.path()) && !(result.value() instanceof Exception)) { return true; } } r...
[ "public", "boolean", "exists", "(", "String", "path", ")", "{", "if", "(", "path", "==", "null", ")", "{", "return", "false", ";", "}", "for", "(", "SubdocOperationResult", "<", "OPERATION", ">", "result", ":", "resultList", ")", "{", "if", "(", "path"...
Checks whether the given path is part of this result set, eg. an operation targeted it, and the operation executed successfully. @return true if that path is part of the successful result set, false in any other case.
[ "Checks", "whether", "the", "given", "path", "is", "part", "of", "this", "result", "set", "eg", ".", "an", "operation", "targeted", "it", "and", "the", "operation", "executed", "successfully", "." ]
f36a0ee0c66923bdde47838ca543e50cbaa99e14
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/subdoc/DocumentFragment.java#L259-L269
train
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/subdoc/DocumentFragment.java
DocumentFragment.exists
public boolean exists(int specIndex) { return specIndex >= 0 && specIndex < resultList.size() && !(resultList.get(specIndex).value() instanceof Exception); }
java
public boolean exists(int specIndex) { return specIndex >= 0 && specIndex < resultList.size() && !(resultList.get(specIndex).value() instanceof Exception); }
[ "public", "boolean", "exists", "(", "int", "specIndex", ")", "{", "return", "specIndex", ">=", "0", "&&", "specIndex", "<", "resultList", ".", "size", "(", ")", "&&", "!", "(", "resultList", ".", "get", "(", "specIndex", ")", ".", "value", "(", ")", ...
Checks whether the given index is part of this result set and the operation was executed successfully. @return true if that path is part of the successful result set, false in any other case.
[ "Checks", "whether", "the", "given", "index", "is", "part", "of", "this", "result", "set", "and", "the", "operation", "was", "executed", "successfully", "." ]
f36a0ee0c66923bdde47838ca543e50cbaa99e14
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/subdoc/DocumentFragment.java#L276-L279
train
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/query/core/N1qlQueryExecutor.java
N1qlQueryExecutor.shouldRetry
private static boolean shouldRetry(JsonObject errorJson) { if (errorJson == null) return false; Integer code = errorJson.getInt(ERROR_FIELD_CODE); String msg = errorJson.getString(ERROR_FIELD_MSG); if (code == null || msg == null) return false; if (code == 4050 || code == 4070 ...
java
private static boolean shouldRetry(JsonObject errorJson) { if (errorJson == null) return false; Integer code = errorJson.getInt(ERROR_FIELD_CODE); String msg = errorJson.getString(ERROR_FIELD_MSG); if (code == null || msg == null) return false; if (code == 4050 || code == 4070 ...
[ "private", "static", "boolean", "shouldRetry", "(", "JsonObject", "errorJson", ")", "{", "if", "(", "errorJson", "==", "null", ")", "return", "false", ";", "Integer", "code", "=", "errorJson", ".", "getInt", "(", "ERROR_FIELD_CODE", ")", ";", "String", "msg"...
Tests a N1QL error JSON for conditions warranting a prepared statement retry.
[ "Tests", "a", "N1QL", "error", "JSON", "for", "conditions", "warranting", "a", "prepared", "statement", "retry", "." ]
f36a0ee0c66923bdde47838ca543e50cbaa99e14
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/query/core/N1qlQueryExecutor.java#L297-L309
train
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/query/core/N1qlQueryExecutor.java
N1qlQueryExecutor.retryPrepareAndExecuteOnce
protected Observable<AsyncN1qlQueryResult> retryPrepareAndExecuteOnce(Throwable error, N1qlQuery query, CouchbaseEnvironment env, long timeout, TimeUnit timeUnit) { if (error instanceof QueryExecutionException && shouldRetry(((QueryExecutionException) error).getN1qlError())) { queryC...
java
protected Observable<AsyncN1qlQueryResult> retryPrepareAndExecuteOnce(Throwable error, N1qlQuery query, CouchbaseEnvironment env, long timeout, TimeUnit timeUnit) { if (error instanceof QueryExecutionException && shouldRetry(((QueryExecutionException) error).getN1qlError())) { queryC...
[ "protected", "Observable", "<", "AsyncN1qlQueryResult", ">", "retryPrepareAndExecuteOnce", "(", "Throwable", "error", ",", "N1qlQuery", "query", ",", "CouchbaseEnvironment", "env", ",", "long", "timeout", ",", "TimeUnit", "timeUnit", ")", "{", "if", "(", "error", ...
In case the error warrants a retry, issue a PREPARE, followed by an update of the cache and an EXECUTE. Any failure in the EXECUTE won't continue the retry cycle.
[ "In", "case", "the", "error", "warrants", "a", "retry", "issue", "a", "PREPARE", "followed", "by", "an", "update", "of", "the", "cache", "and", "an", "EXECUTE", ".", "Any", "failure", "in", "the", "EXECUTE", "won", "t", "continue", "the", "retry", "cycle...
f36a0ee0c66923bdde47838ca543e50cbaa99e14
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/query/core/N1qlQueryExecutor.java#L384-L391
train
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/query/core/N1qlQueryExecutor.java
N1qlQueryExecutor.prepareAndExecute
protected Observable<AsyncN1qlQueryResult> prepareAndExecute(final N1qlQuery query, final CouchbaseEnvironment env, final long timeout, final TimeUnit timeUnit) { return prepare(query.statement()) .flatMap(new Func1<PreparedPayload, Observable<AsyncN1qlQueryResult>>() { @Over...
java
protected Observable<AsyncN1qlQueryResult> prepareAndExecute(final N1qlQuery query, final CouchbaseEnvironment env, final long timeout, final TimeUnit timeUnit) { return prepare(query.statement()) .flatMap(new Func1<PreparedPayload, Observable<AsyncN1qlQueryResult>>() { @Over...
[ "protected", "Observable", "<", "AsyncN1qlQueryResult", ">", "prepareAndExecute", "(", "final", "N1qlQuery", "query", ",", "final", "CouchbaseEnvironment", "env", ",", "final", "long", "timeout", ",", "final", "TimeUnit", "timeUnit", ")", "{", "return", "prepare", ...
Issues a N1QL PREPARE, puts the plan in cache then EXECUTE it.
[ "Issues", "a", "N1QL", "PREPARE", "puts", "the", "plan", "in", "cache", "then", "EXECUTE", "it", "." ]
f36a0ee0c66923bdde47838ca543e50cbaa99e14
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/query/core/N1qlQueryExecutor.java#L396-L405
train
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/query/core/N1qlQueryExecutor.java
N1qlQueryExecutor.executePrepared
protected Observable<AsyncN1qlQueryResult> executePrepared(final N1qlQuery query, PreparedPayload payload, CouchbaseEnvironment env, long timeout, TimeUnit timeUnit) { PreparedN1qlQuery preparedQuery; if (query instanceof ParameterizedN1qlQuery) { ParameterizedN1qlQuery pq = (ParameterizedN1...
java
protected Observable<AsyncN1qlQueryResult> executePrepared(final N1qlQuery query, PreparedPayload payload, CouchbaseEnvironment env, long timeout, TimeUnit timeUnit) { PreparedN1qlQuery preparedQuery; if (query instanceof ParameterizedN1qlQuery) { ParameterizedN1qlQuery pq = (ParameterizedN1...
[ "protected", "Observable", "<", "AsyncN1qlQueryResult", ">", "executePrepared", "(", "final", "N1qlQuery", "query", ",", "PreparedPayload", "payload", ",", "CouchbaseEnvironment", "env", ",", "long", "timeout", ",", "TimeUnit", "timeUnit", ")", "{", "PreparedN1qlQuery...
Issues a proper N1QL EXECUTE, detecting if parameters must be added to it.
[ "Issues", "a", "proper", "N1QL", "EXECUTE", "detecting", "if", "parameters", "must", "be", "added", "to", "it", "." ]
f36a0ee0c66923bdde47838ca543e50cbaa99e14
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/query/core/N1qlQueryExecutor.java#L410-L425
train