ContextURL checkContextURL(final ContextURL contextURL) throws SerializerException { if (isODataMetadataNone) { return null; } else if (contextURL == null) { throw new SerializerException("ContextURL null!", SerializerException.MessageKeys.NO_CONTEXT_URL); } return contextURL; }
ContextURL checkContextURL(final ContextURL contextURL) throws SerializerException { if (isODataMetadataNone) { return null; } else if (contextURL == null) { throw new SerializerException("ContextURL null!", SerializerException.MessageKeys.NO_CONTEXT_URL); } return contextURL; }
private ContextURL checkContextURL(final ContextURL contextURL) throws SerializerException { if (contextURL == null) { throw new SerializerException("ContextURL null!", SerializerException.MessageKeys.NO_CONTEXT_URL); } return contextURL; }
ContextURL checkContextURL(final ContextURL contextURL) throws SerializerException { if (isODataMetadataNone) { return null; } else if (contextURL == null) { throw new SerializerException("ContextURL null!", SerializerException.MessageKeys.NO_CONTEXT_URL); } return contextURL; }
ContextURL checkContextURL(final ContextURL contextURL) throws SerializerException { if (isODataMetadataNone) { return null; } else if (contextURL == null) { throw new SerializerException("ContextURL null!", SerializerException.MessageKeys.NO_CONTEXT_URL); } return contextURL; }
private ContextURL checkContextURL(final ContextURL contextURL) throws SerializerException { if (contextURL == null) { throw new SerializerException("ContextURL null!", SerializerException.MessageKeys.NO_CONTEXT_URL); } return contextURL; }
ContextURL checkContextURL(final ContextURL contextURL) throws SerializerException { if (isODataMetadataNone) { return null; } else if (contextURL == null) { throw new SerializerException("ContextURL null!", SerializerException.MessageKeys.NO_CONTEXT_URL); } return contextURL; }
ContextURL checkContextURL(final ContextURL contextURL) throws SerializerException { if (isODataMetadataNone) { return null; } else if (contextURL == null) { throw new SerializerException("ContextURL null!", SerializerException.MessageKeys.NO_CONTEXT_URL); } return contextURL; }
@Override public InputStream count(final Integer count) throws SerializerException { try { return new ByteArrayInputStream(count.toString().getBytes("UTF-8")); } catch (UnsupportedEncodingException e) { throw new SerializerException("UTF-8 is nott supprted as an encoding", e, SerializerException.MessageKeys.UNSUPPORTED_ENCODING, "UTF-8"); } }
@Override public InputStream count(final Integer count) throws SerializerException { try { return new ByteArrayInputStream(count.toString().getBytes("UTF-8")); } catch (UnsupportedEncodingException e) { throw new SerializerException("UTF-8 is nott supprted as an encoding", e, SerializerException.MessageKeys.UNSUPPORTED_ENCODING, "UTF-8"); } }
public MetadataDocumentJsonSerializer(final ServiceMetadata serviceMetadata) throws SerializerException { if (serviceMetadata == null || serviceMetadata.getEdm() == null) { throw new SerializerException("Service Metadata and EDM must not be null for a service.", SerializerException.MessageKeys.NULL_METADATA_OR_EDM); } this.serviceMetadata = serviceMetadata; }
public ServiceDocumentXmlSerializer(final ServiceMetadata metadata, final String serviceRoot) throws SerializerException { if (metadata == null || metadata.getEdm() == null) { throw new SerializerException("Service Metadata and EDM must not be null for a service.", SerializerException.MessageKeys.NULL_METADATA_OR_EDM); } this.metadata = metadata; this.serviceRoot = serviceRoot; }
public MetadataDocumentXmlSerializer(final ServiceMetadata serviceMetadata) throws SerializerException { if (serviceMetadata == null || serviceMetadata.getEdm() == null) { throw new SerializerException("Service Metadata and EDM must not be null for a service.", SerializerException.MessageKeys.NULL_METADATA_OR_EDM); } this.serviceMetadata = serviceMetadata; }
public MetadataDocumentJsonSerializer(final ServiceMetadata serviceMetadata) throws SerializerException { if (serviceMetadata == null || serviceMetadata.getEdm() == null) { throw new SerializerException("Service Metadata and EDM must not be null for a service.", SerializerException.MessageKeys.NULL_METADATA_OR_EDM); } this.serviceMetadata = serviceMetadata; }
public ServiceDocumentXmlSerializer(final ServiceMetadata metadata, final String serviceRoot) throws SerializerException { if (metadata == null || metadata.getEdm() == null) { throw new SerializerException("Service Metadata and EDM must not be null for a service.", SerializerException.MessageKeys.NULL_METADATA_OR_EDM); } this.metadata = metadata; this.serviceRoot = serviceRoot; }
public ServiceDocumentJsonSerializer(final ServiceMetadata metadata, final String serviceRoot, final boolean isODataMetadataNone) throws SerializerException { if (metadata == null || metadata.getEdm() == null) { throw new SerializerException("Service Metadata and EDM must not be null for a service.", SerializerException.MessageKeys.NULL_METADATA_OR_EDM); } this.metadata = metadata; this.serviceRoot = serviceRoot; this.isODataMetadataNone = isODataMetadataNone; }
public ServiceDocumentJsonSerializer(final ServiceMetadata metadata, final String serviceRoot, final boolean isODataMetadataNone) throws SerializerException { if (metadata == null || metadata.getEdm() == null) { throw new SerializerException("Service Metadata and EDM must not be null for a service.", SerializerException.MessageKeys.NULL_METADATA_OR_EDM); } this.metadata = metadata; this.serviceRoot = serviceRoot; this.isODataMetadataNone = isODataMetadataNone; }
@Override public EdmAssistedSerializer createEdmAssistedSerializer(final ContentType contentType) throws SerializerException { if (contentType.isCompatible(ContentType.APPLICATION_JSON)) { return new EdmAssistedJsonSerializer(contentType); } throw new SerializerException("Unsupported format: " + contentType.toContentTypeString(), SerializerException.MessageKeys.UNSUPPORTED_FORMAT, contentType.toContentTypeString()); }
@Override public EdmAssistedSerializer createEdmAssistedSerializer(final ContentType contentType) throws SerializerException { if (contentType.isCompatible(ContentType.APPLICATION_JSON)) { return new EdmAssistedJsonSerializer(contentType); } throw new SerializerException("Unsupported format: " + contentType.toContentTypeString(), SerializerException.MessageKeys.UNSUPPORTED_FORMAT, contentType.toContentTypeString()); }
@Override public EdmDeltaSerializer createEdmDeltaSerializer(final ContentType contentType, final List<String> versions) throws SerializerException { if (contentType.isCompatible(ContentType.APPLICATION_JSON)) { if(versions!=null && !versions.isEmpty()){ return getMaxVersion(versions)>4 ? new JsonDeltaSerializerWithNavigations(contentType): new JsonDeltaSerializer(contentType); } return new JsonDeltaSerializerWithNavigations(contentType); } throw new SerializerException("Unsupported format: " + contentType.toContentTypeString(), SerializerException.MessageKeys.UNSUPPORTED_FORMAT, contentType.toContentTypeString()); }