
com.sap.cloud.sdk.s4hana.datamodel.odata.services.AttachmentService Maven / Gradle / Ivy
/*
* Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved.
*/
package com.sap.cloud.sdk.s4hana.datamodel.odata.services;
import javax.annotation.Nonnull;
import com.sap.cloud.sdk.s4hana.datamodel.odata.helper.batch.BatchService;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.attachment.AttachmentContent;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.attachment.AttachmentContentCreateFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.attachment.AttachmentContentDeleteFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.attachment.CreateUrlAsAttachmentFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.attachment.DocumentInfoRecordAttchByKeyFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.attachment.DocumentInfoRecordAttchFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.attachment.GetAllOriginalsFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.attachment.GetAttachmentCountFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.attachment.RenameAttachmentFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.attachment.batch.AttachmentServiceBatch;
/**
*
* This service enables you to manage Document Management (DMS), and Generic Object Services (GOS) based attachments,
* such as creating, reading, renaming, and deleting attachments. You can also read an existing document info record
* (DIR), and add attachments to it.
*
*
*
* Reference: SAP API
* Business Hub
*
* Details:
*
*
* OData Service:
* API_CV_ATTACHMENT_SRV
*
*
* API Version:
* 1
*
*
* Communication Scenario:
* Distributed Manufacturing Integration (SAP_COM_0077), Product Lifecycle Management - Master Data Integration
* (SAP_COM_0105), Finance - Posting Integration (SAP_COM_0002), Supplier Invoice Integration (SAP_COM_0057)
*
*
* Scope Items:
* Integration with SAP Distributed Manufacturing with SAP
* S/4HANA Cloud (1NX), Engineering Bill of Material - Versions
* Management (1NR), Engineering Bill of Material - Change
* Master Management (1R3), Accounting and Financial Close
* (J58), Service and Material Procurement - Project-Based
* Services (J13), Procurement of Direct Materials (J45),
* Consumable Purchasing (BNX)
*
*
* Authentication Methods:
* Basic, x509
*
*
*
*/
public interface AttachmentService extends BatchService
{
/**
* If no other path was provided via the {@link #withServicePath(String)} method, this is the default service path
* used to access the endpoint.
*
*/
String DEFAULT_SERVICE_PATH = "/sap/opu/odata/sap/API_CV_ATTACHMENT_SRV";
/**
* Overrides the default service path and returns a new service instance with the specified service path. Also
* adjusts the respective entity URLs.
*
* @param servicePath
* Service path that will override the default.
* @return A new service instance with the specified service path.
*/
@Nonnull
AttachmentService withServicePath( @Nonnull final String servicePath );
/**
* Create a new {@link com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.attachment.AttachmentContent
* AttachmentContent} entity and save it to the S/4HANA system.
*
* @param attachmentContent
* {@link com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.attachment.AttachmentContent
* AttachmentContent} entity object that will be created in the S/4HANA system.
* @return A fluent helper to create a new
* {@link com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.attachment.AttachmentContent
* AttachmentContent} entity. To perform execution, call the
* {@link com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.attachment.AttachmentContentCreateFluentHelper#execute
* execute} method on the fluent helper object.
*/
@Nonnull
AttachmentContentCreateFluentHelper createAttachmentContent( @Nonnull final AttachmentContent attachmentContent );
/**
* Deletes an existing {@link com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.attachment.AttachmentContent
* AttachmentContent} entity in the S/4HANA system.
*
* @param attachmentContent
* {@link com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.attachment.AttachmentContent
* AttachmentContent} entity object that will be deleted in the S/4HANA system.
* @return A fluent helper to delete an existing
* {@link com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.attachment.AttachmentContent
* AttachmentContent} entity. To perform execution, call the
* {@link com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.attachment.AttachmentContentDeleteFluentHelper#execute
* execute} method on the fluent helper object.
*/
@Nonnull
AttachmentContentDeleteFluentHelper deleteAttachmentContent( @Nonnull final AttachmentContent attachmentContent );
/**
* Fetch multiple {@link com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.attachment.DocumentInfoRecordAttch
* DocumentInfoRecordAttch} entities.
*
* @return A fluent helper to fetch multiple
* {@link com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.attachment.DocumentInfoRecordAttch
* DocumentInfoRecordAttch} entities. This fluent helper allows methods which modify the underlying query to
* be called before executing the query itself. To perform execution, call the
* {@link com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.attachment.DocumentInfoRecordAttchFluentHelper#execute
* execute} method on the fluent helper object.
*/
@Nonnull
DocumentInfoRecordAttchFluentHelper getAllDocumentInfoRecordAttch();
/**
* Fetch a single {@link com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.attachment.DocumentInfoRecordAttch
* DocumentInfoRecordAttch} entity using key fields.
*
* @param documentInfoRecordDocType
* Part of the document key, which categorizes documents according to their distinguishing features and
* the organizational procedures which result from them.
*
* Constraints: Not nullable, Maximum length: 3
*
* @param documentInfoRecordDocNumber
* This number is the main part of the document key, which is used to identify the document.
*
* Constraints: Not nullable, Maximum length: 25
*
* @param documentInfoRecordDocPart
* Section of a document which is maintained as an independent document.
*
* Constraints: Not nullable, Maximum length: 3
*
* @param documentInfoRecordDocVersion
* Number which identifies the version of a document.
*
* Constraints: Not nullable, Maximum length: 2
*
* @return A fluent helper to fetch a single
* {@link com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.attachment.DocumentInfoRecordAttch
* DocumentInfoRecordAttch} entity using key fields. This fluent helper allows methods which modify the
* underlying query to be called before executing the query itself. To perform execution, call the
* {@link com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.attachment.DocumentInfoRecordAttchByKeyFluentHelper#execute
* execute} method on the fluent helper object.
*/
@Nonnull
DocumentInfoRecordAttchByKeyFluentHelper getDocumentInfoRecordAttchByKey(
final String documentInfoRecordDocType,
final String documentInfoRecordDocNumber,
final String documentInfoRecordDocVersion,
final String documentInfoRecordDocPart );
/**
* Returns All Originals Related to a Parent Object
*
*
*
* Creates a fluent helper for the GetAllOriginals OData function import.
*
*
* @param linkedSAPObjectKey
* LinkedSAPObjectKey
*
*
*
* Constraints: Not nullable, Maximum length: 90
*
*
* Original parameter name from the Odata EDM: LinkedSAPObjectKey
*
* @param businessObjectTypeName
* BusinessObjectTypeName
*
*
*
* Constraints: Not nullable, Maximum length: 40
*
*
* Original parameter name from the Odata EDM: BusinessObjectTypeName
*
* @param semanticObject
* SemanticObject
*
*
*
* Constraints: Nullable, Maximum length: 40
*
*
* Original parameter name from the Odata EDM: SemanticObject
*
* @return A fluent helper object that will execute the GetAllOriginals OData function import with the
* provided parameters. To perform execution, call the
* {@link com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.attachment.GetAllOriginalsFluentHelper#execute
* execute} method on the fluent helper object.
*/
@Nonnull
GetAllOriginalsFluentHelper getAllOriginals(
final String linkedSAPObjectKey,
final String businessObjectTypeName,
final String semanticObject );
/**
* Returns the Count of Attachments
*
*
*
* Creates a fluent helper for the GetAttachmentCount OData function import.
*
*
* @param linkedSAPObjectKey
* LinkedSAPObjectKey
*
*
*
* Constraints: Not nullable, Maximum length: 90
*
*
* Original parameter name from the Odata EDM: LinkedSAPObjectKey
*
* @param businessObjectTypeName
* BusinessObjectTypeName
*
*
*
* Constraints: Not nullable, Maximum length: 40
*
*
* Original parameter name from the Odata EDM: BusinessObjectTypeName
*
* @param semanticObject
* SemanticObject
*
*
*
* Constraints: Nullable, Maximum length: 40
*
*
* Original parameter name from the Odata EDM: SemanticObject
*
* @return A fluent helper object that will execute the GetAttachmentCount OData function import with the
* provided parameters. To perform execution, call the
* {@link com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.attachment.GetAttachmentCountFluentHelper#execute
* execute} method on the fluent helper object.
*/
@Nonnull
GetAttachmentCountFluentHelper getAttachmentCount(
final String businessObjectTypeName,
final String linkedSAPObjectKey,
final String semanticObject );
/**
* Rename Attachment
*
*
*
* Creates a fluent helper for the RenameAttachment OData function import.
*
*
* @param documentInfoRecordDocType
* DocumentInfoRecordDocType
*
*
*
* Constraints: Nullable, Maximum length: 3
*
*
* Original parameter name from the Odata EDM: DocumentInfoRecordDocType
*
* @param fileName
* FileName
*
*
*
* Constraints: Not nullable, Maximum length: 255
*
*
* Original parameter name from the Odata EDM: FileName
*
* @param documentInfoRecordDocNumber
* DocumentInfoRecordDocNumber
*
*
*
* Constraints: Nullable, Maximum length: 25
*
*
* Original parameter name from the Odata EDM: DocumentInfoRecordDocNumber
*
* @param documentInfoRecordDocPart
* DocumentInfoRecordDocPart
*
*
*
* Constraints: Nullable, Maximum length: 3
*
*
* Original parameter name from the Odata EDM: DocumentInfoRecordDocPart
*
* @param archiveDocumentID
* ArchiveDocumentID
*
*
*
* Constraints: Not nullable, Maximum length: 40
*
*
* Original parameter name from the Odata EDM: ArchiveDocumentID
*
* @param linkedSAPObjectKey
* LinkedSAPObjectKey
*
*
*
* Constraints: Not nullable, Maximum length: 90
*
*
* Original parameter name from the Odata EDM: LinkedSAPObjectKey
*
* @param businessObjectTypeName
* BusinessObjectTypeName
*
*
*
* Constraints: Not nullable, Maximum length: 40
*
*
* Original parameter name from the Odata EDM: BusinessObjectTypeName
*
* @param documentInfoRecordDocVersion
* DocumentInfoRecordDocVersion
*
*
*
* Constraints: Nullable, Maximum length: 2
*
*
* Original parameter name from the Odata EDM: DocumentInfoRecordDocVersion
*
* @param semanticObject
* SemanticObject
*
*
*
* Constraints: Nullable, Maximum length: 40
*
*
* Original parameter name from the Odata EDM: SemanticObject
*
* @param logicalDocument
* LogicalDocument
*
*
*
* Constraints: Not nullable, Maximum length: 32
*
*
* Original parameter name from the Odata EDM: LogicalDocument
*
* @return A fluent helper object that will execute the RenameAttachment OData function import with the
* provided parameters. To perform execution, call the
* {@link com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.attachment.RenameAttachmentFluentHelper#execute
* execute} method on the fluent helper object.
*/
@Nonnull
RenameAttachmentFluentHelper renameAttachment(
final String documentInfoRecordDocType,
final String documentInfoRecordDocVersion,
final String logicalDocument,
final String archiveDocumentID,
final String businessObjectTypeName,
final String linkedSAPObjectKey,
final String semanticObject,
final String fileName,
final String documentInfoRecordDocNumber,
final String documentInfoRecordDocPart );
/**
* Create URL as attachment
*
*
*
* Creates a fluent helper for the CreateUrlAsAttachment OData function import.
*
*
* @param linkedSAPObjectKey
* LinkedSAPObjectKey
*
*
*
* Constraints: Not nullable, Maximum length: 90
*
*
* Original parameter name from the Odata EDM: LinkedSAPObjectKey
*
* @param businessObjectTypeName
* BusinessObjectTypeName
*
*
*
* Constraints: Not nullable, Maximum length: 40
*
*
* Original parameter name from the Odata EDM: BusinessObjectTypeName
*
* @param urlDescription
* UrlDescription
*
*
*
* Constraints: Not nullable, Maximum length: 255
*
*
* Original parameter name from the Odata EDM: UrlDescription
*
* @param semanticObject
* SemanticObject
*
*
*
* Constraints: Not nullable, Maximum length: 40
*
*
* Original parameter name from the Odata EDM: SemanticObject
*
* @param url
* Url
*
*
*
* Constraints: Not nullable, Maximum length: 255
*
*
* Original parameter name from the Odata EDM: Url
*
* @param mIMEType
* MIMEType
*
*
*
* Constraints: Not nullable, Maximum length: 40
*
*
* Original parameter name from the Odata EDM: MIMEType
*
* @return A fluent helper object that will execute the CreateUrlAsAttachment OData function import with the
* provided parameters. To perform execution, call the
* {@link com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.attachment.CreateUrlAsAttachmentFluentHelper#execute
* execute} method on the fluent helper object.
*/
@Nonnull
CreateUrlAsAttachmentFluentHelper createUrlAsAttachment(
final String semanticObject,
final String linkedSAPObjectKey,
final String businessObjectTypeName,
final String url,
final String urlDescription,
final String mIMEType );
}