Interface BusinessObject
-
- All Superinterfaces:
MessageListHolder,java.io.Serializable
- All Known Subinterfaces:
Address,Basket,BillTo,CommonConfiguration,ConnectedDocument,ConnectedDocumentItem,ConnectedObject,CPQItem,Header,HeaderBase,Item,ItemBase,Order,PartnerBase,SalesDocument,SalesDocumentBase<L,I,H>,SalesDocumentConfiguration,Schedline,ShipTo,SimpleDocument<L,I,H>,SimpleHeader,SimpleItem,TransactionConfiguration
- All Known Implementing Classes:
AddressImpl,BasketImpl,BillToImpl,BusinessObjectBase,ConnectedDocumentImpl,ConnectedDocumentItemImpl,ConnectedObjectImpl,ConverterImpl,CPQItemSalesDoc,HeaderBaseImpl,HeaderSalesDocument,ItemBaseImpl,ItemSalesDoc,OrderHistoryImpl,OrderImpl,PartnerBaseImpl,SalesDocumentBaseImpl,SalesDocumentImpl,SapCreditCheckBOImpl,SapInvoiceBOImpl,SapPricingImpl,SapProductAvailabilityBOImpl,SchedlineImpl,SearchImpl,ShipToImpl,SimpleDocumentImpl,SimpleHeaderImpl,SimpleItemImpl,TestBusinessObjectBaseBEDeterminationImpl,TestBusinessObjectBaseBEDeterminationNotFoundImpl,TestBusinessObjectBaseBEInjectionImpl,TestBusinessObjectBaseBENotUniqueDeterminationImpl,TestBusinessObjectBaseBESingleImplementationImpl,TransactionConfigurationImpl
public interface BusinessObject extends MessageListHolder
Business Object interface.
-
-
Field Summary
-
Fields inherited from interface de.hybris.platform.sap.core.common.message.MessageListHolder
INVALID, VALID
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddExtensionData(java.lang.String key, java.lang.Object value)This method stores arbitrary data within this Business Object.voidclearMessages(java.lang.String resourceKey)Removes all messages with the given key from the list of messages.voidclearOwnMessages()Clears all messages and set state of the Business Object to valid.voidcopyMessages(BusinessObjectBase bob)copy the messages from an another BusinessObject and add this to the object.voidcopyMessages(MessageListHolder messageListHolder)Copy the messages from an another Message list holder and add this to the object.voidcreateUniqueHandle()This method creates a unique handle, as an alternative key for the business object, because at the creation point no techkey for the object exists.voiddestroy()This method is called before the bean is invalidated It needs to be defined in the Spring bean definition as destroy-method.java.lang.ObjectgetExtensionData(java.lang.String key)This method retrieves extension data associated with the Business Object.java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>>getExtensionDataValues()This method retrieves all extension data associated with the Business Object.java.util.Map<java.lang.String,java.lang.Object>getExtensionMap()Returns the extension map.java.lang.StringgetHandle()This method returns the handle, as an alternative key for the business object, because at the creation point no techKey for the object exists.MessageListgetOwnMessageList()Returns the messages of the Business Object itself.java.util.Iterator<BusinessObjectBase>getSubObjectIterator()The method returns an iterator over all sub objects of the BusinessObject.TechKeygetTechKey()Retrieves the key for the object.booleanhasHandle()Returns the information, if a handle for the object exists.booleanhasMessages()Returns if the business object or one of it sub objects has a message.booleanhasOwnMessages()Returns if the business object itself has a message.voidinit()This method is called after all properties have been set It needs to be defined in the Spring bean definition as init-method.booleanisValid()Returns if the business object is valid.voidlogMessage(Message message)Log an message to the IsaLocation of BusinessObject.voidremoveExtensionData(java.lang.String key)This method removes extension data from the Business Object.voidremoveExtensionDataValues()This method removes all extensions data from the Business Object.voidsetExtensionMap(java.util.Map<java.lang.String,java.lang.Object> extensionData)Sets the extension map to the given map.voidsetHandle(java.lang.String handle)This method sets the handle, as an alternative key for the business object, because at the creation point no techkey for the object exists.voidsetInvalid()Set the Business Object invalid, no property.voidsetTechKey(TechKey techKey)Sets the key for the document.voidsetValid()Set the Business Object valid, no property.-
Methods inherited from interface de.hybris.platform.sap.core.common.message.MessageListHolder
addMessage, clearMessages, getMessageList
-
-
-
-
Method Detail
-
getTechKey
TechKey getTechKey()
Retrieves the key for the object.- Returns:
- The object's key
-
setTechKey
void setTechKey(TechKey techKey)
Sets the key for the document.- Parameters:
techKey- Key to be set
-
createUniqueHandle
void createUniqueHandle()
This method creates a unique handle, as an alternative key for the business object, because at the creation point no techkey for the object exists. Therefore maybay the handle is needed to identify the object in backend
-
setHandle
void setHandle(java.lang.String handle)
This method sets the handle, as an alternative key for the business object, because at the creation point no techkey for the object exists. Therefore maybay the handle is needed to identify the object in backend- Parameters:
handle- the handle of business object which identifies the object in the backend, if the techkey still not exists
-
getHandle
java.lang.String getHandle()
This method returns the handle, as an alternative key for the business object, because at the creation point no techKey for the object exists. Therefore maybe the handle is needed to identify the object in back end return the handle of business object which is needed to identify the object in the back end, if the techKey still not exists- Returns:
- the BO handle
-
hasHandle
boolean hasHandle()
Returns the information, if a handle for the object exists.- Returns:
- true, if there is a handle false, if the handle is
nullor if the handle is an empty string.
-
getSubObjectIterator
java.util.Iterator<BusinessObjectBase> getSubObjectIterator()
The method returns an iterator over all sub objects of the BusinessObject.- Returns:
- Iterator to loop over sub objects
-
setInvalid
void setInvalid()
Set the Business Object invalid, no property.
-
setValid
void setValid()
Set the Business Object valid, no property.
-
isValid
boolean isValid()
Returns if the business object is valid.- Returns:
- valid
-
copyMessages
void copyMessages(BusinessObjectBase bob)
copy the messages from an another BusinessObject and add this to the object.- Parameters:
bob- reference to aBusinessObjectBaseobject
-
copyMessages
void copyMessages(MessageListHolder messageListHolder)
Copy the messages from an another Message list holder and add this to the object.- Parameters:
messageListHolder- reference to aMessageListHolderobject
-
hasMessages
boolean hasMessages()
Returns if the business object or one of it sub objects has a message.- Returns:
true, if at least one message exists
-
clearMessages
void clearMessages(java.lang.String resourceKey)
Removes all messages with the given key from the list of messages.- Parameters:
resourceKey- resourceKey of messages
-
clearOwnMessages
void clearOwnMessages()
Clears all messages and set state of the Business Object to valid.
-
hasOwnMessages
boolean hasOwnMessages()
Returns if the business object itself has a message.- Returns:
true, if at least one message exists
-
getOwnMessageList
MessageList getOwnMessageList()
Returns the messages of the Business Object itself.- Returns:
- message list of Business Object without child objects
-
logMessage
void logMessage(Message message)
Log an message to the IsaLocation of BusinessObject.- Parameters:
message- message to log
-
addExtensionData
void addExtensionData(java.lang.String key, java.lang.Object value)This method stores arbitrary data within this Business Object.- Parameters:
key- key with which the specified value is to be associated.value- value to be associated with the specified key.
-
getExtensionData
java.lang.Object getExtensionData(java.lang.String key)
This method retrieves extension data associated with the Business Object.- Parameters:
key- key with which the specified value is to be associated.- Returns:
- value which is associated with the specified key
-
removeExtensionData
void removeExtensionData(java.lang.String key)
This method removes extension data from the Business Object.- Parameters:
key- key of the extension data
-
getExtensionDataValues
java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>> getExtensionDataValues()
This method retrieves all extension data associated with the Business Object.- Returns:
- all extension data as entry set
-
removeExtensionDataValues
void removeExtensionDataValues()
This method removes all extensions data from the Business Object.
-
setExtensionMap
void setExtensionMap(java.util.Map<java.lang.String,java.lang.Object> extensionData)
Sets the extension map to the given map.- Parameters:
extensionData- the new extension HashMap for the object
-
getExtensionMap
java.util.Map<java.lang.String,java.lang.Object> getExtensionMap()
Returns the extension map.- Returns:
- extensionData, the extension Map of the object
-
init
void init()
This method is called after all properties have been set It needs to be defined in the Spring bean definition as init-method.
-
destroy
void destroy()
This method is called before the bean is invalidated It needs to be defined in the Spring bean definition as destroy-method.
-
-