|
Oracle Fusion Middleware extensions for Applications Core API Reference 11g Release 1 (11.1.1.5) E22562-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.jbo.common.NamedObjectImpl oracle.jbo.server.NamedObjectImpl oracle.jbo.server.ComponentObjectImpl oracle.jbo.server.ContainerObjectImpl oracle.jbo.server.ApplicationModuleImpl oracle.apps.fnd.applcore.oaext.model.OAApplicationModuleImpl oracle.apps.fnd.applcore.attachments.attachmentService.applicationModule.AttachmentServiceAMImpl
public class AttachmentServiceAMImpl
Attachments Service Implementation class. This class provides a number of Java API methods to assist developers with some of the more complex tasks related to working with Attachments.
Field Summary |
---|
Fields inherited from class oracle.apps.fnd.applcore.oaext.model.OAApplicationModuleImpl |
---|
RCS_ID |
Fields inherited from class oracle.jbo.server.ApplicationModuleImpl |
---|
DEFAULT_DEF_NAME, SHARED_SCOPE_APPLICATION, SHARED_SCOPE_SESSION |
Fields inherited from class oracle.jbo.server.ContainerObjectImpl |
---|
mComponentList, mComponents |
Fields inherited from class oracle.jbo.common.NamedObjectImpl |
---|
mFullName, mObjName, mParent, mProperties, RES_ID_SUFFIX |
Fields inherited from interface oracle.apps.fnd.applcore.oaext.model.OASeedDataService |
---|
RCS_ID_RECORDED |
Fields inherited from interface oracle.jbo.ApplicationModule |
---|
ACTIVATE_CLIENT_FLAG, ACTIVATE_REMOVE_FLAG, ACTIVATE_SKIP_RESTORE_VO_FROM_DEF, ACTIVATE_TRANSIENT_FLAG, ACTIVATE_UNDO_FLAG, DEFAULT_DEF_FULL_NAME, DEFAULT_ROOT_APP_MOD_NAME, EFF_DT_PROPERTY_STR, IMAGE_LOC, PASSIVATE_DEFER_FLAG, PASSIVATE_HINT_FLAG, PASSIVATE_TO_DATABASE, PASSIVATE_TO_FILE, PASSIVATE_TO_MEMORY, PASSIVATE_TO_STACK_FLAG, PASSIVATE_TRANSIENT_FLAG, PASSIVATE_UNDO_FLAG, RELEASE_LEVEL_MANAGED, RELEASE_LEVEL_RESERVED, RELEASE_LEVEL_UNMANAGED, REMOVE_SNAPSHOT, RESET_CLIENT_ONLY_FLAG, RESET_INTERNAL_FLAG, RESET_KEEP_ALL_SNAPSHOTS_FLAG, RESET_MANAGE_SNAPSHOTS, RESET_RELOAD_FLAG, RESET_ROLLBACK_FLAG, SYNC_BATCH, SYNC_IMMEDIATE, SYNC_LAZY |
Fields inherited from interface oracle.jbo.GenericHints |
---|
PROPERTY_LABEL, PROPERTY_LABEL_PLURAL, PROPERTY_TOOLTIP |
Fields inherited from interface oracle.jbo.common.TransPostControl |
---|
TRANS_POST_GET_ATTR_BY_INDEX, TRANS_POST_GET_ATTR_BY_NAME, TRANS_POST_GET_ATTR_COUNT, TRANS_POST_GET_ATTR_INDEX_OF, TRANS_POST_GET_STRUCTURE_DEF, TRANS_POST_PUSHBACK, TRANS_POST_REFRESH_UNDO_CHANGES, TRANS_POST_REFRESH_WITH_DB_FORGET_CHANGES, TRANS_POST_REFRESH_WITH_DB_ONLY_IF_UNCHANGED, TRANS_POST_REMOVE, TRANS_POST_SET_ATTR_BY_INDEX, TRANS_POST_SET_ATTR_BY_NAME |
Fields inherited from interface oracle.jbo.common.ws.WSApplicationModuleMarshaller |
---|
ACTIVATION_AFTER_LOSS_OF_AFFINITY, ACTIVATION_AFTER_RESTART, ACTIVATION_NONE, SYNC_INT_BATCH, SYNC_INT_BATCH_DO_WORK |
Constructor Summary | |
---|---|
AttachmentServiceAMImpl()
This is the default constructor (do not remove). |
Method Summary | |
---|---|
void |
attachFile(AttachmentsVORowImpl row,
java.lang.String fileName,
java.lang.String contentType,
java.io.InputStream fileStream)
Updates the supplied attachments row with the information to attach a file. |
AttachmentsVORowImpl |
attachFile(java.lang.String fileName,
java.lang.String contentType,
java.io.InputStream fileStream)
Creates a new row from the internal attachments view object and populates the attributes to attach a file. |
void |
attachText(AttachmentsVORowImpl row,
java.lang.String text)
Updates the supplied attachments row with the information to attach text. |
AttachmentsVORowImpl |
attachText(java.lang.String text)
Creates a new row from the internal attachments view object and populates the attributes to attach text. |
void |
attachUrl(AttachmentsVORowImpl row,
java.lang.String url)
Updates the supplied attachments row with the information to attach an URL. |
AttachmentsVORowImpl |
attachUrl(java.lang.String url)
Creates a new row from the internal attachments view object and populates the attributes to attach URL. |
java.util.List<AttachmentsVORowImpl> |
copyAttachments(java.util.List<AttachmentsVORowImpl> attachments,
java.lang.String entityName,
java.lang.String pk1Value,
java.lang.String pk2Value,
java.lang.String pk3Value,
java.lang.String pk4Value,
java.lang.String pk5Value)
Create copies of the supplied attachment rows assigning them to the entity values as provided. |
java.io.InputStream |
getAttachmentInputStream(AttachmentsVORowImpl row)
Retrieve the attachment content for the supplied attachment row as a stream. |
AttachmentsVOImpl |
getAttachments1()
Container's getter for Attachments1. |
java.io.OutputStream |
getAttachmentStream(AttachmentsVORowImpl row)
Retrieve the attachment content for the supplied attachment row as a stream. |
java.lang.String |
getAttachmentUrl(AttachmentsVORowImpl row)
Retrieve URL for the attachment content for the supplied attachment. |
OAViewObjectImpl |
getFndAttachedDocuments1()
Container's getter for FndAttachedDocuments1. |
OAViewObjectImpl |
getFndDocuments1()
Container's getter for FndDocuments1. |
java.lang.String |
getUnsignedAttachmentUrl(AttachmentsVORowImpl row)
Retrieve unsigned URL for the attachment content for the supplied attachment. |
void |
setContentServerIdcConnection(oracle.stellent.ridc.IdcContext context,
oracle.stellent.ridc.IdcClient client)
*** For internal use only *** |
Methods inherited from class oracle.apps.fnd.applcore.oaext.model.OAApplicationModuleImpl |
---|
getFNDNestedService, getFNDNestedService, getNLSLanguageForSeedData, getSeedContext, getSequenceValue, getSetId, invalidateSetIdCache, invalidateSetIdCache, isResetting, isSeedDataExtractMode, isSeedDataMode, isSeedDataUploadMode, isT2PMode, prepareSession, prepareSession, resetState, resetState, seedExtract, seedUpload, seedUpload, seedUpload, setNLSLanguageForSeedData, setSeedContext, setT2PMode, synchronizeApplSessionWithDB, unSetT2PMode |
Methods inherited from class oracle.jbo.server.ApplicationModuleImpl |
---|
activate, activateConnectionState, activateOpenVOs, activateState, activateState, activateState, activateState, activateStateForUndo, addChild, addResponse, addWarning, afterActivation, afterCommit, afterConnect, afterRemove, afterRollback, afterValidate, beforeCommit, beforeDisconnect, beforeRollback, beforeValidate, bindToWorkingSet, clearVOCaches, createApplicationModule, createComponentObject, createCompositeViewDef, createRootApplicationModule, createSharedDataHandle, createViewLink, createViewLink, createViewLinkBetweenViewObjects, createViewLinkFromEntityAssocName, createViewObject, createViewObject, createViewObjectForDef, createViewObjectFromQueryClauses, createViewObjectFromQueryStmt, createViewObjectFromQueryStmt, createViewObjectOnEntity, createViewObjectOnRowSet, createWorkerApplicationModule, createXMLSharedDataHandle, detach, doMessage, doPoolMessage, dumpQueryResult, executeCommand, executeQueryOnViewObjects, fetchAttributeProperties, findApplicationModule, findComponentObject, findObject, findObject, findOrCreateSharedApplicationModule, findRSIForEntity, findViewLink, findViewObject, findViewObjectUsingEntity, findViewObjectWithParameters, findVOsWithEntityUsage, findVOsWithEntityUsage, finishLoadingComponents, finishSyncWorkingSet, getAMStatistics, getApplicationModuleDef, getApplicationModuleImpls, getApplicationModuleNames, getApplicationModuleNames, getAppModuleRequestHandler, getAttributeDefs, getAttributeDefs, getAttributeDefsForVO, getClientProxyClassName, getClientProxyClassName, getClientProxyInterfaceName, getComponentObjectNames, getComponentObjectNames, getCurrentWorkingSet, getDBTransaction, getDefFullName, getDefName, getEntityAttributesPermission, getEntityRowFromHandle, getExceptionHandler, getImageLoc, getListBindingName, getListBindingRSI, getMostRecentStackId, getObjectMarshaller, getPreferredListRSI, getReleaseLevel, getRemoteObjectId, getResponseName, getSession, getStyles, getSyncLock, getSyncMode, getTransaction, getTransactionInternal, getUserPrincipalName, getViewAttributesPermission, getViewLinkNames, getViewLinkNames, getViewLinks, getViewObjectNames, getViewObjectNames, getViewObjects, getWorkingSetMarshaller, handleDefinitionChangedOnActivate, hasPendingDataPosts, internalGetListBindingRSI, invokeMethod, isForRemote, isLoadComponentsLazily, isNameGenerated, isRoot, isTransientTransactionListener, isValidIdForUndo, launchTester, marshal, marshalForActivate, passivateConnectionState, passivateOpenVOs, passivateState, passivateState, passivateState, passivateState, passivateState, passivateStateForUndo, prepareApplicationModuleSession, prepareForActivation, prepareForPassivation, prepareSession, prepareViewObjects, processChangeNotifications, remove, removeChild, removeState, reservePassivationId, reserveSnapshotId, reset, resetState, selectAttributesForViewObjects, sendServiceMessage, sendWorkingSetRequests, setBoundToWorkingSet, setDataModelRefresh, setDBConnectionRequired, setExceptionHandler, setLoadComponentsLazily, setReleaseLevel, setRemoteAdapter, setSessionUserData, setStoreForPassiveState, setStyles, setSyncMode, setWorkingSetMarshaller, sync, syncMarshaller, syncWorkingSet, transformExceptionParams, transformExceptionParams, transPostGetAttr, transPostPushback, transPostRefresh, transPostRemove, transPostRevert, transPostRowOp, transPostSetAttr, transPostSetAttrValues |
Methods inherited from class oracle.jbo.server.ContainerObjectImpl |
---|
addContainerListener, removeContainerListener |
Methods inherited from class oracle.jbo.server.ComponentObjectImpl |
---|
addListener, applyPersonalization, create, createRef, createVariableValueManager, ensureVariableManager, findOperationDefinitions, getAllProperties, getApplicationModule, getCompListeners, getCompListenersList, getDefinitionManager, getFullNameForPersDef, getHintValue, getLabel, getLabelPlural, getMessageBundleClass, getProxyClassName, getProxyClassName, getResourceBundleDef, getRootApplicationModule, getStringFromMessageBundle, getTooltip, getVariableManager, hasVariables, isDead, isPersonalized, isRegWithPiggyMan, resolvePropertyRaw, setName, setParent, setProxyClassName |
Methods inherited from class oracle.jbo.server.NamedObjectImpl |
---|
setParent, setPropertiesMap |
Methods inherited from class oracle.jbo.common.NamedObjectImpl |
---|
allocatePropertyMap, getFullName, getName, getParent, getProperties, getPropertiesAsStrings, getPropertiesMap, getProperty, getProperty, getPropertyExpressionsMap, getPropertyMap, getResourcesFromBundle, isPropertyExpression, mergePropertyMap, refreshProperty, removeProperty, removeProperty, requiresNamePrefixedResId, resolveObjectProperty, setFullName, setPropertiesMap2, setProperty, setProperty, setPropertyExpression, setPropertyMap |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface oracle.jbo.ComponentObject |
---|
getFullName, getName |
Methods inherited from interface oracle.jbo.GenericHints |
---|
getHintValue, getLabel, getLabelPlural, getTooltip |
Methods inherited from interface oracle.jbo.Properties |
---|
getProperties, getProperty, getProperty, refreshProperty |
Methods inherited from interface oracle.jbo.VariableManagerOwner |
---|
getName |
Constructor Detail |
---|
public AttachmentServiceAMImpl()
Method Detail |
---|
public void attachFile(AttachmentsVORowImpl row, java.lang.String fileName, java.lang.String contentType, java.io.InputStream fileStream)
row
- attachments row to update.fileName
- the id of the file to attach.contentType
- the content-type of the file to attach.fileStream
- the stream of data for the file to attach.public AttachmentsVORowImpl attachFile(java.lang.String fileName, java.lang.String contentType, java.io.InputStream fileStream)
fileName
- the id of the file to attach.contentType
- the content-type of the file to attach.fileStream
- the stream of data for the file to attach.
public void attachText(AttachmentsVORowImpl row, java.lang.String text)
row
- attachments row to update.text
- the text to attach.public AttachmentsVORowImpl attachText(java.lang.String text)
text
- the text to attach.
public void attachUrl(AttachmentsVORowImpl row, java.lang.String url)
row
- attachments row to update.url
- the URL to attach.public AttachmentsVORowImpl attachUrl(java.lang.String url)
url
- the URL to attach.
public java.io.OutputStream getAttachmentStream(AttachmentsVORowImpl row) throws java.io.IOException
row
- attachments row containing content.
java.io.IOException
- exceptions from attempting to stream the content.public java.io.InputStream getAttachmentInputStream(AttachmentsVORowImpl row) throws java.io.IOException
row
- attachments row containing content.
java.io.IOException
- exceptions from attempting to stream the content.public java.lang.String getAttachmentUrl(AttachmentsVORowImpl row)
row
- attachments row containing content.
public java.lang.String getUnsignedAttachmentUrl(AttachmentsVORowImpl row)
Retrieve unsigned URL for the attachment content for the supplied attachment. For non-URL content, the URL returned points to the GetHandler servlet provided by Web Center. It expects this servlet to be available to the user.
The following code can be used to generate the signing parameters:
String permission = SigningMechanism.READ_PERMISSION; SigningMechanism signingMechanism = new DefaultSigningMechanism(permission, user); SigningType signingType = new GenericSigningType(dmVersionNumber); SigningScheme scheme = new GenericSigningScheme(signingMechanism, signingType); PrivateKey privateKey = SigningUtils.getWSMEncryptionKeyPrivateKey(); String digitalSignature = scheme.sign(privateKey); if (digitalSignature.startsWith("&")) { digitalSignature = digitalSignature.substring(1); } String url = am.getUnsignedAttachmentUrl(row) + "?" + digitalSignature;
Please note that the URL returned specifies the host and port of the local machine. Subsequent calls using this URL expect the servlet to be available at this specific host and port.
Where no servlet mapping exists to tell the application to use the GetHandler servlet provided by Web Center, the URL returned specifies the Content Server directly. eg. it specifies the GET_FILE service. In this case there is no need to replace the initial ampersand with a question mark. Here is some sample code:
String permission = SigningMechanism.READ_PERMISSION; SigningMechanism signingMechanism = new DefaultSigningMechanism(permission, user); SigningType signingType = new GenericSigningType(dmVersionNumber); SigningScheme scheme = new GenericSigningScheme(signingMechanism, signingType); PrivateKey privateKey = SigningUtils.getWSMEncryptionKeyPrivateKey(); String url = am.getUnsignedAttachmentUrl(row) + digitalSignature;
row
- attachments row containing content.
public java.util.List<AttachmentsVORowImpl> copyAttachments(java.util.List<AttachmentsVORowImpl> attachments, java.lang.String entityName, java.lang.String pk1Value, java.lang.String pk2Value, java.lang.String pk3Value, java.lang.String pk4Value, java.lang.String pk5Value)
attachments
- List of attachment rows to be copied.entityName
- Parameter for the id of the entity to be assigned to the copied rows.pk1Value
- Parameter for the primary key value of the entity to be assigned to the copied rows.pk2Value
- Parameter for the primary key value of the entity to be assigned to the copied rows.pk3Value
- Parameter for the primary key value of the entity to be assigned to the copied rows.pk4Value
- Parameter for the primary key value of the entity to be assigned to the copied rows.pk5Value
- Parameter for the primary key value of the entity to be assigned to the copied rows.
public OAViewObjectImpl getFndAttachedDocuments1()
public OAViewObjectImpl getFndDocuments1()
public AttachmentsVOImpl getAttachments1()
public void setContentServerIdcConnection(oracle.stellent.ridc.IdcContext context, oracle.stellent.ridc.IdcClient client)
*** For internal use only ***
Used to allow tests to run in WLS stand-alone mode where the external connection may not be available. Preferred solution would be to have external connection available in WLS stand-alone mode and inject by the build scripts.
context
- The new contextclient
- The new client
|
Oracle Fusion Middleware extensions for Applications Core API Reference 11g Release 1 (11.1.1.5) E22562-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |