[OLINGO-841] CleanUp Server API

This commit is contained in:
Christian Amend 2015-12-18 13:42:53 +01:00
parent d1055fd8ef
commit d4902f725b
158 changed files with 517 additions and 515 deletions

View File

@ -21,10 +21,10 @@ package org.apache.olingo.server.api;
import java.util.Collection;
import java.util.List;
import org.apache.olingo.commons.api.ex.ODataRuntimeException;
import org.apache.olingo.commons.api.edm.EdmPrimitiveType;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
import org.apache.olingo.commons.api.edm.provider.CsdlEdmProvider;
import org.apache.olingo.commons.api.ex.ODataRuntimeException;
import org.apache.olingo.commons.api.format.ContentType;
import org.apache.olingo.server.api.debug.DebugResponseHelper;
import org.apache.olingo.server.api.deserializer.DeserializerException;

View File

@ -226,7 +226,7 @@ public class ODataRequest {
* @param protocol
* @see #getProtocol()
*/
public void setProtocol(String protocol) {
public void setProtocol(final String protocol) {
this.protocol = protocol;
}

View File

@ -115,7 +115,6 @@ public class ODataResponse {
return values == null || values.isEmpty() ? null : values.get(0);
}
/**
* Sets the content (body).
* @param content the content as {@link InputStream}

View File

@ -28,8 +28,8 @@ import org.apache.olingo.server.api.deserializer.batch.ODataResponsePart;
* <p>Provides methods to process {@link ODataRequest}s and {@link BatchRequestPart}s
* in the context of a batch request.</p>
*
* <p>Within a {@link org.apache.olingo.server.api.processor.BatchProcessor BatchProcessor}
* implementation BatchRequestParts should be passed to {@link #handleBatchRequest(BatchRequestPart)}.
* <p>Within a {@link org.apache.olingo.server.api.processor.BatchProcessor BatchProcessor} implementation
* BatchRequestParts should be passed to {@link #handleBatchRequest(BatchRequestPart)}.
* Only if the BatchRequestPart represents a change set, the request will be delegated to
* {@link org.apache.olingo.server.api.processor.BatchProcessor#processChangeSet(BatchFacade, java.util.List)}.
* Otherwise the requests will be directly executed.</p>

View File

@ -46,7 +46,7 @@ public class DebugInformation {
return request;
}
public void setRequest(ODataRequest request) {
public void setRequest(final ODataRequest request) {
this.request = request;
}
@ -59,7 +59,7 @@ public class DebugInformation {
return applicationResponse;
}
public void setApplicationResponse(ODataResponse applicationResponse) {
public void setApplicationResponse(final ODataResponse applicationResponse) {
this.applicationResponse = applicationResponse;
}
@ -72,7 +72,7 @@ public class DebugInformation {
return uriInfo;
}
public void setUriInfo(UriInfo uriInfo) {
public void setUriInfo(final UriInfo uriInfo) {
this.uriInfo = uriInfo;
}
@ -85,7 +85,7 @@ public class DebugInformation {
return exception;
}
public void setException(Exception exception) {
public void setException(final Exception exception) {
this.exception = exception;
}
@ -98,7 +98,7 @@ public class DebugInformation {
return serverEnvironmentVariables;
}
public void setServerEnvironmentVariables(Map<String, String> serverEnvironmentVariables) {
public void setServerEnvironmentVariables(final Map<String, String> serverEnvironmentVariables) {
this.serverEnvironmentVariables = serverEnvironmentVariables;
}
@ -111,7 +111,7 @@ public class DebugInformation {
return runtimeInformation;
}
public void setRuntimeInformation(List<RuntimeMeasurement> runtimeInformation) {
public void setRuntimeInformation(final List<RuntimeMeasurement> runtimeInformation) {
this.runtimeInformation = runtimeInformation;
}

View File

@ -33,8 +33,7 @@ public interface DebugSupport {
/**
* Initializes the debug support implementation.
* Is called before {@link #isUserAuthorized()} and
* {@link #createDebugResponse(String, DebugInformation)}.
* Is called before {@link #isUserAuthorized()} and {@link #createDebugResponse(String, DebugInformation)}.
* @param odata
*/
void init(OData odata);

View File

@ -29,7 +29,7 @@ public class DefaultDebugSupport implements DebugSupport {
private OData odata;
@Override
public void init(OData odata) {
public void init(final OData odata) {
this.odata = odata;
}
@ -39,7 +39,7 @@ public class DefaultDebugSupport implements DebugSupport {
}
@Override
public ODataResponse createDebugResponse(String debugFormat, DebugInformation debugInfo) {
public ODataResponse createDebugResponse(final String debugFormat, final DebugInformation debugInfo) {
// Check if debugFormat is supported by the library
if (DebugSupport.ODATA_DEBUG_JSON.equalsIgnoreCase(debugFormat)
|| DebugSupport.ODATA_DEBUG_HTML.equalsIgnoreCase(debugFormat)

View File

@ -35,7 +35,7 @@ public class RuntimeMeasurement {
* Sets the class name.
* @param className the name of the class that is measured
*/
public void setClassName(String className) {
public void setClassName(final String className) {
this.className = className;
}
@ -51,7 +51,7 @@ public class RuntimeMeasurement {
* Sets the method name.
* @param methodName the name of the method that is measured
*/
public void setMethodName(String methodName) {
public void setMethodName(final String methodName) {
this.methodName = methodName;
}
@ -68,7 +68,7 @@ public class RuntimeMeasurement {
* @param timeStarted the start time in nanoseconds
* @see System#nanoTime()
*/
public void setTimeStarted(long timeStarted) {
public void setTimeStarted(final long timeStarted) {
this.timeStarted = timeStarted;
}
@ -86,7 +86,7 @@ public class RuntimeMeasurement {
* @param timeStopped the stop time in nanoseconds
* @see System#nanoTime()
*/
public void setTimeStopped(long timeStopped) {
public void setTimeStopped(final long timeStopped) {
this.timeStopped = timeStopped;
}

View File

@ -42,8 +42,8 @@ public interface ODataDeserializer {
DeserializerResult entity(InputStream stream, EdmEntityType edmEntityType) throws DeserializerException;
/**
* Deserializes an entity collection stream into an
* {@link org.apache.olingo.commons.api.data.EntityCollection EntityCollection} object.
* Deserializes an entity collection stream into an {@link org.apache.olingo.commons.api.data.EntityCollection
* EntityCollection} object.
* @param stream
* @param edmEntityType
* @return {@link DeserializerResult#getEntityCollection()}

View File

@ -20,8 +20,8 @@ package org.apache.olingo.server.api.deserializer.batch;
/**
* Options for the batch deserializer.
* @see org.apache.olingo.server.api.deserializer.FixedFormatDeserializer
* #parseBatchRequest(java.io.InputStream, String, BatchOptions)
* @see org.apache.olingo.server.api.deserializer.FixedFormatDeserializer #parseBatchRequest(java.io.InputStream,
* String, BatchOptions)
*/
public final class BatchOptions {
private boolean isStrict = true;

View File

@ -59,7 +59,10 @@ public interface Preferences {
/** Whether the preference <code>odata.track-changes</code> has been set. */
public boolean hasTrackChanges();
public enum Return { REPRESENTATION, MINIMAL }
public enum Return {
REPRESENTATION, MINIMAL
}
/**
* Gets the value of the preference <code>return</code> or <code>null</code> if not set
* or the value is not valid.

View File

@ -70,7 +70,7 @@ public final class PreferencesApplied {
return result.toString();
}
private boolean isSafe(String key) {
private boolean isSafe(final String key) {
if (SAFE_PREFERENCE_NAMES.isEmpty()) {
SAFE_PREFERENCE_NAMES.add(PreferenceName.ALLOW_ENTITY_REFERENCES.getName());
SAFE_PREFERENCE_NAMES.add(PreferenceName.CALLBACK.getName());

View File

@ -19,9 +19,9 @@
package org.apache.olingo.server.api.processor;
import org.apache.olingo.commons.api.format.ContentType;
import org.apache.olingo.server.api.ODataServerError;
import org.apache.olingo.server.api.ODataRequest;
import org.apache.olingo.server.api.ODataResponse;
import org.apache.olingo.server.api.ODataServerError;
/**
* Processor which is called if any error/exception occurs inside the library or another processor.

View File

@ -32,3 +32,4 @@
* in order to overwrite the default behavior.
*/
package org.apache.olingo.server.api.processor;

View File

@ -18,7 +18,6 @@
*/
package org.apache.olingo.server.api.serializer;
/**
* Thrown for invalid batch payloads.
*/

View File

@ -21,6 +21,7 @@ package org.apache.olingo.server.api.uri.queryoption.search;
public interface SearchUnary extends SearchExpression {
SearchUnaryOperatorKind getOperator();
SearchTerm getOperand();
}