Author: jaz
Date: Tue Feb 27 10:35:04 2007 New Revision: 512356 URL: http://svn.apache.org/viewvc?view=rev&rev=512356 Log: more content refactoring; refactored upload content service; now supports other data resource types; now also can determine which type to use based on mimeType (if none is specified); moved some service defs around, this is a work in progress. Moved data resource services from contentservices.xml to dataservices.xml Added: ofbiz/trunk/applications/content/servicedef/services_content.xml (with props) ofbiz/trunk/applications/content/servicedef/services_data.xml (with props) Modified: ofbiz/trunk/applications/content/ofbiz-component.xml ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml ofbiz/trunk/applications/content/script/org/ofbiz/content/data/DataServices.xml ofbiz/trunk/applications/content/servicedef/secas.xml ofbiz/trunk/applications/content/servicedef/services.xml Modified: ofbiz/trunk/applications/content/ofbiz-component.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/ofbiz-component.xml?view=diff&rev=512356&r1=512355&r2=512356 ============================================================================== --- ofbiz/trunk/applications/content/ofbiz-component.xml (original) +++ ofbiz/trunk/applications/content/ofbiz-component.xml Tue Feb 27 10:35:04 2007 @@ -43,7 +43,9 @@ <entity-resource type="data" reader-name="demo" loader="main" location="data/CompDocData.xml"/> <entity-resource type="data" reader-name="demo" loader="main" location="data/ForumDemoData.xml"/> <service-resource type="model" loader="main" location="servicedef/services.xml"/> + <service-resource type="model" loader="main" location="servicedef/services_content.xml"/> <service-resource type="model" loader="main" location="servicedef/services_contenttypes.xml"/> + <service-resource type="model" loader="main" location="servicedef/services_data.xml"/> <service-resource type="model" loader="main" location="servicedef/services_email.xml"/> <service-resource type="model" loader="main" location="servicedef/services_survey.xml"/> <service-resource type="model" loader="main" location="servicedef/services_commevent.xml"/> Modified: ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml?view=diff&rev=512356&r1=512355&r2=512356 ============================================================================== --- ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml (original) +++ ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml Tue Feb 27 10:35:04 2007 @@ -732,43 +732,6 @@ <field-to-result field-name="contentId" /> </simple-method> - - <!-- Attaches an uploaded file to an existing data resource object --> - <simple-method method-name="attachLocalFileToDataResource" short-description="Attach an uploaded file to a data resource as LOCAL_FILE"> - <entity-one entity-name="DataResource" value-name="dataResource"> - <field-map field-name="dataResourceId" env-name="parameters.dataResourceId"/> - </entity-one> - <if-empty field-name="dataResource"> - <add-error><fail-message message="No data resource found for ID: [$parameters.dataResourceId}]"/></add-error> - </if-empty> - <if-empty field-name="_uploadedFile_fileName" map-name="parameters"> - <add-error><fail-message message="No uploaded content found in context"/></add-error> - </if-empty> - <check-errors/> - - <call-class-method class-name="org.ofbiz.content.data.DataResourceWorker" method-name="getDataResourceContentUploadPath" ret-field-name="uploadPath"/> - <log level="info" message="[attachLocalFileToDataResource] - Found Subdir : ${uploadPath}"/> - - <set from-field="parameters._uploadedFile_contentType" field="extenLookup.mimeTypeId"/> - <find-by-and entity-name="FileExtension" map-name="extenLookup" list-name="extensions"/> - <first-from-list entry-name="extension" list-name="extensions"/> - - <set from-field="parameters._uploadedFile_fileName" field="dataResource.dataResourceName"/> - <set from-field="parameters._uploadedFile_contentType" field="dataResource.mimeTypeId"/> - <set value="${uploadPath}/${dataResource.dataResourceId}" field="dataResource.objectInfo"/> - <if-not-empty field-name="extension"> - <set value="${uploadPath}/${dataResource.dataResourceId}.${extension.fileExtensionId}" field="dataResource.objectInfo"/> - </if-not-empty> - <set value="LOCAL_FILE" field="dataResource.dataResourceTypeId"/> - - <set-service-fields service-name="createAnonFile" map-name="dataResource" to-map-name="fileCtx"/> - <set from-field="parameters.uploadedFile" field="fileCtx.binData"/> - <set from-field="dataResource" field="fileCtx.dataResource"/> - <call-service service-name="createAnonFile" in-map-name="fileCtx" include-user-login="true"/> - - <store-value value-name="dataResource"/> - <field-to-result field-name="dataResourceId" map-name="dataResource"/> - </simple-method> <!-- This method first creates Content, DataResource and ElectronicText, ImageDataResource, etc. entities (if needed) by calling persistContentAndAssoc. Modified: ofbiz/trunk/applications/content/script/org/ofbiz/content/data/DataServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/script/org/ofbiz/content/data/DataServices.xml?view=diff&rev=512356&r1=512355&r2=512356 ============================================================================== --- ofbiz/trunk/applications/content/script/org/ofbiz/content/data/DataServices.xml (original) +++ ofbiz/trunk/applications/content/script/org/ofbiz/content/data/DataServices.xml Tue Feb 27 10:35:04 2007 @@ -383,12 +383,34 @@ <remove-value value-name="lookedUpValue"/> </simple-method> + <!-- Methods for ImageDataResource --> + <simple-method method-name="createImageDataResource" short-description="Create Image Data Resource"> + <make-value entity-name="ImageDataResource" value-name="newEntity"/> + <set-nonpk-fields map-name="parameters" value-name="newEntity"/> + <set-pk-fields map-name="parameters" value-name="newEntity"/> + <create-value value-name="newEntity"/> + </simple-method> + <simple-method method-name="updateImageDataResource" short-description="Update Image Data Resource"> + <make-value entity-name="ImageDataResource" value-name="lookupKeyValue"/> + <set-pk-fields map-name="parameters" value-name="lookupKeyValue"/> + <find-by-primary-key entity-name="ImageDataResource" map-name="lookupKeyValue" value-name="lookedUpValue"/> + <set-nonpk-fields map-name="parameters" value-name="lookedUpValue"/> + <store-value value-name="lookedUpValue"/> + </simple-method> + <simple-method method-name="removeImageDataResource" short-description="Remove Image Data Resource"> + <make-value entity-name="ImageDataResource" value-name="lookupKeyValue"/> + <set-pk-fields map-name="parameters" value-name="lookupKeyValue"/> + <find-by-primary-key entity-name="ImageDataResource" map-name="lookupKeyValue" value-name="lookedUpValue"/> + <remove-value value-name="lookedUpValue"/> + </simple-method> + <!-- Methods for OtherDataResource --> <simple-method method-name="createOtherDataResource" short-description="Create Other Data Resource"> <make-value entity-name="OtherDataResource" value-name="newEntity"/> <set-nonpk-fields map-name="parameters" value-name="newEntity"/> <set-pk-fields map-name="parameters" value-name="newEntity"/> <create-value value-name="newEntity"/> + <log level="always" message="created new OtherDataResource: ${newEntity}"/> </simple-method> <simple-method method-name="updateOtherDataResource" short-description="Update Other Data Resource"> <make-value entity-name="OtherDataResource" value-name="lookupKeyValue"/> @@ -453,4 +475,142 @@ <log level="always" message="parameters:${parameters}"/> </simple-method> + <!-- Determines which type of uploaded file this is and calls the proper method --> + <simple-method method-name="attachUploadToDataResource" short-description="Attach an uploaded file to a data resource"> + <if-empty field-name="parameters.dataResourceTypeId"> + <!-- create default behavior --> + <if> + <condition> + <not> + <if-empty field-name="parameters._uploadedFile_contentType"/> + </not> + </condition> + <then> + <if> + <condition> + <if-regexp field-name="parameters._uploadedFile_contentType" expr="image.*"/> + </condition> + <then> + <set field="parameters.dataResourceTypeId" value="IMAGE_OBJECT"/> + </then> + <else> + <set field="parameters.dataResourceTypeId" value="OTHER_OBJECT"/> + </else> + </if> + </then> + <else> + <set field="parameters.dataResourceTypeId" value="OTHER_OBJECT"/> + </else> + </if> + </if-empty> + + <if-compare field-name="parameters.dataResourceTypeId" value="LOCAL_FILE" operator="equals"> + <call-simple-method method-name="saveLocalFileDateResource"/> + <return/> + </if-compare> + + <if-compare field-name="parameters.dataResourceTypeId" value="IMAGE_OBJECT" operator="equals"> + <call-simple-method method-name="saveImageObjectDateResource"/> + <return/> + </if-compare> + + <if-compare field-name="parameters.dataResourceTypeId" value="OTHER_OBJECT" operator="equals"> + <call-simple-method method-name="saveOtherObjectDateResource"/> + <return/> + </if-compare> + + <add-error><fail-message message="Data type [${dataResourceTypeId} is not yet supported!"/></add-error> + <check-errors/> + </simple-method> + + <!-- save LOCAL_FILE data --> + <simple-method method-name="saveLocalFileDateResource" short-description="Attach an uploaded file to a data resource as LOCAL_FILE"> + <entity-one entity-name="DataResource" value-name="dataResource"> + <field-map field-name="dataResourceId" env-name="parameters.dataResourceId"/> + </entity-one> + <if-empty field-name="dataResource"> + <add-error><fail-message message="No data resource found for ID: [$parameters.dataResourceId}]"/></add-error> + </if-empty> + <if-empty field-name="_uploadedFile_fileName" map-name="parameters"> + <add-error><fail-message message="No uploaded content found in context"/></add-error> + </if-empty> + <check-errors/> + + <call-class-method class-name="org.ofbiz.content.data.DataResourceWorker" method-name="getDataResourceContentUploadPath" ret-field-name="uploadPath"/> + <log level="info" message="[attachLocalFileToDataResource] - Found Subdir : ${uploadPath}"/> + + <set from-field="parameters._uploadedFile_contentType" field="extenLookup.mimeTypeId"/> + <find-by-and entity-name="FileExtension" map-name="extenLookup" list-name="extensions"/> + <first-from-list entry-name="extension" list-name="extensions"/> + + <set from-field="parameters._uploadedFile_fileName" field="dataResource.dataResourceName"/> + <set from-field="parameters._uploadedFile_contentType" field="dataResource.mimeTypeId"/> + <set value="${uploadPath}/${dataResource.dataResourceId}" field="dataResource.objectInfo"/> + <if-not-empty field-name="extension"> + <set value="${uploadPath}/${dataResource.dataResourceId}.${extension.fileExtensionId}" field="dataResource.objectInfo"/> + </if-not-empty> + <set value="LOCAL_FILE" field="dataResource.dataResourceTypeId"/> + <store-value value-name="dataResource"/> + + <set-service-fields service-name="createAnonFile" map-name="dataResource" to-map-name="fileCtx"/> + <set from-field="parameters.uploadedFile" field="fileCtx.binData"/> + <set from-field="dataResource" field="fileCtx.dataResource"/> + <call-service service-name="createAnonFile" in-map-name="fileCtx" include-user-login="true"/> + + <field-to-result field-name="dataResourceId" map-name="dataResource"/> + </simple-method> + + <!-- save OTHER_OBJECT data --> + <simple-method method-name="saveOtherObjectDateResource" short-description="Attach an uploaded file to a data resource as OTHER_OBJECT"> + <entity-one entity-name="DataResource" value-name="dataResource"> + <field-map field-name="dataResourceId" env-name="parameters.dataResourceId"/> + </entity-one> + <if-empty field-name="dataResource"> + <add-error><fail-message message="No data resource found for ID: [$parameters.dataResourceId}]"/></add-error> + </if-empty> + <if-empty field-name="_uploadedFile_fileName" map-name="parameters"> + <add-error><fail-message message="No uploaded content found in context"/></add-error> + </if-empty> + <check-errors/> + + <!-- update the data resource with file data --> + <set from-field="parameters.dataResourceTypeId" field="dataResource.dataResourceTypeId"/> + <set from-field="parameters._uploadedFile_fileName" field="dataResource.dataResourceName"/> + <set from-field="parameters._uploadedFile_contentType" field="dataResource.mimeTypeId"/> + <store-value value-name="dataResource"/> + + <!-- fields serviceName and fileField are required to be set by calling method --> + <set-service-fields service-name="createOtherDataResource" map-name="dataResource" to-map-name="serviceContext"/> + <set from-field="parameters.uploadedFile" field="serviceContext.dataResourceContent"/> + <call-service service-name="createOtherDataResource" in-map-name="serviceContext"/> + + <field-to-result field-name="dataResourceId" map-name="dataResource"/> + </simple-method> + + <!-- save IMAGE_OBJECT data --> + <simple-method method-name="saveImageObjectDateResource" short-description="Attach an uploaded file to a data resource as IMAGE_OBJECT"> + <entity-one entity-name="DataResource" value-name="dataResource"> + <field-map field-name="dataResourceId" env-name="parameters.dataResourceId"/> + </entity-one> + <if-empty field-name="dataResource"> + <add-error><fail-message message="No data resource found for ID: [$parameters.dataResourceId}]"/></add-error> + </if-empty> + <if-empty field-name="_uploadedFile_fileName" map-name="parameters"> + <add-error><fail-message message="No uploaded content found in context"/></add-error> + </if-empty> + <check-errors/> + + <!-- update the data resource with file data --> + <set from-field="parameters.dataResourceTypeId" field="dataResource.dataResourceTypeId"/> + <set from-field="parameters._uploadedFile_fileName" field="dataResource.dataResourceName"/> + <set from-field="parameters._uploadedFile_contentType" field="dataResource.mimeTypeId"/> + <store-value value-name="dataResource"/> + + <!-- fields serviceName and fileField are required to be set by calling method --> + <set-service-fields service-name="createImageDataResource" map-name="dataResource" to-map-name="serviceContext"/> + <set from-field="parameters.uploadedFile" field="serviceContext.imageData"/> + <call-service service-name="createImageDataResource" in-map-name="serviceContext"/> + + <field-to-result field-name="dataResourceId" map-name="dataResource"/> + </simple-method> </simple-methods> Modified: ofbiz/trunk/applications/content/servicedef/secas.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/servicedef/secas.xml?view=diff&rev=512356&r1=512355&r2=512356 ============================================================================== --- ofbiz/trunk/applications/content/servicedef/secas.xml (original) +++ ofbiz/trunk/applications/content/servicedef/secas.xml Tue Feb 27 10:35:04 2007 @@ -70,11 +70,34 @@ <action service="ensurePartyRole" mode="sync" runAsUser="system"/> </eca> + <!-- create/update data text service is a route; determine which path to follow --> + <eca service="createDataText" event="invoke"> + <condition field-name="dataResourceTypeId" operator="equals" value="ELECTRONIC_TEXT"/> + <set field-name="dataResourceTypeId" value="ELECTRONIC_TEXT"/> + <action service="createElectronicText" mode="sync"/> + </eca> + <eca service="createDataText" event="invoke"> + <condition field-name="dataResourceTypeId" operator="not-equals" value="ELECTRONIC_TEXT"/> + <set field-name="dataResourceTypeId" value="SHORT_TEXT"/> + <action service="createDataResource" mode="sync"/> + </eca> + <eca service="updateDataText" event="invoke"> + <condition field-name="dataResourceTypeId" operator="equals" value="ELECTRONIC_TEXT"/> + <action service="updateElectronicText" mode="sync"/> + </eca> + <eca service="updateDataText" event="invoke"> + <condition field-name="dataResourceTypeId" operator="not-equals" value="ELECTRONIC_TEXT"/> + <action service="updateDataResource" mode="sync"/> + </eca> + <!-- electronic text; needs dataResourceId --> <eca service="createElectronicText" event="in-validate"> <condition field-name="dataResourceId" operator="is-empty"/> <set field-name="dataResourceTypeId" value="ELECTRONIC_TEXT"/> <action service="createDataResource" mode="sync" result-to-context="true"/> + </eca> + <eca service="updateElectronicText" event="invoke"> + <action service="updateDataResource" mode="sync" result-to-context="true"/> </eca> <!-- create content ecas --> Modified: ofbiz/trunk/applications/content/servicedef/services.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/servicedef/services.xml?view=diff&rev=512356&r1=512355&r2=512356 ============================================================================== --- ofbiz/trunk/applications/content/servicedef/services.xml (original) +++ ofbiz/trunk/applications/content/servicedef/services.xml Tue Feb 27 10:35:04 2007 @@ -56,352 +56,6 @@ <attribute mode="OUT" name="resultData" optional="true" type="java.util.Map"/> </service> - <!-- create content services --> - <service name="createContent" engine="simple" auth="true" - location="org/ofbiz/content/content/ContentServices.xml" invoke="createContent"> - <description>Create a Content</description> - <permission-service service-name="genericContentPermission" main-action="CREATE"/> - <implements service="genericContentPermission"/> - <auto-attributes entity-name="Content" include="nonpk" mode="IN" optional="true"/> - <!-- TODO: the following fields are deprecated; but will not be removed until all services and callers are updated --> - <attribute mode="IN" name="targetOperationList" optional="true" type="List"/> - <attribute mode="IN" name="targetOperationString" optional="true" type="String"/> - <attribute mode="IN" name="contentPurposeList" optional="true" type="List"/> - <attribute mode="IN" name="contentPurposeString" optional="true" type="String"/> - <attribute mode="IN" name="skipPermissionCheck" optional="true" type="String"/> - <attribute mode="IN" name="displayFailCond" optional="true" type="Boolean"/> - <attribute mode="INOUT" name="roleTypeList" optional="true" type="List"/> - <!-- end of deprecated fields --> - <attribute name="contentAssocTypeId" type="String" mode="IN" optional="true"/> - <attribute name="contentIdFrom" type="String" mode="IN" optional="true"/> - <attribute name="contentIdTo" type="String" mode="IN" optional="true"/> - <attribute name="roleTypeId" type="String" mode="IN" optional="true"/> - <attribute name="partyId" type="String" mode="IN" optional="true"/> - <attribute name="mapKey" type="String" mode="IN" optional="true"/> - <attribute name="contentId" type="String" mode="INOUT" optional="true"/> - <override name="contentTypeId" default-value="DOCUMENT"/> - </service> - - <service name="createTextContent" engine="group" auth="true"> - <description>Creates a Text Document DataResource and Content Records</description> - <!-- uses createContent internally; additonal permission(s) not necessary --> - <group> - <invoke name="createElectronicText" result-to-context="true"/> - <invoke name="createContent" result-to-context="true"/> - </group> - </service> - - <service name="createContentFromDataResource" engine="simple" - location="org/ofbiz/content/content/ContentServices.xml" invoke="createContentFromDataResource"> - <description>Creates content record from data resource and allows all content fields to be set</description> - <!-- uses createContent internally; additonal permission(s) not necessary --> - <implements service="createContent" optional="true"/> - <attribute name="dataResourceId" type="String" mode="IN" optional="false"/> - <attribute name="contentId" type="String" mode="OUT" optional="false"/> - </service> - - <service name="uploadFileToDataResource" engine="simple" transaction-timeout="300" - location="org/ofbiz/content/content/ContentServices.xml" invoke="attachLocalFileToDataResource"> - <description>Accepts uploaded content and attaches to an existing data resource</description> - <!-- uses createContent internally; additonal permission(s) not necessary --> - <implements service="uploadFileInterface"/> - <attribute name="dataResourceId" type="String" mode="INOUT" optional="false"/> - </service> - - <service name="createContentFromUploadedFile" engine="group" transaction-timeout="300"> - <description>Accepts file upload, creates DataResource and Content records.</description> - <!-- uses createContent internally; additonal permission(s) not necessary --> - <group> - <invoke name="createDataResource" parameters="preserve" result-to-context="true"/> - <invoke name="uploadFileToDataResource" parameters="preserve" result-to-context="true"/> - <invoke name="createContentFromDataResource"/> - </group> - </service> - - <service name="copyContentAndElectronicTextandAssoc" default-entity-name="Content" engine="simple" - location="org/ofbiz/content/content/ContentServices.xml" invoke="copyContentAndElectronicTextandAssoc" auth="true" > - <description>Copy a Content, e;ectronic text and assocs</description> - <!-- uses createContent internally; additonal permission(s) not necessary --> - <auto-attributes include="pk" mode="INOUT" optional="false"/> - </service> - - <!-- update content services --> - <service name="updateContent" engine="simple" auth="true" - location="org/ofbiz/content/content/ContentServices.xml" invoke="updateContent"> - <description>Update a Content</description> - <permission-service service-name="genericContentPermission" main-action="UPDATE"/> - <implements service="genericContentPermission"/> - <implements service="updateContentAssoc"/> - <auto-attributes entity-name="Content" include="pk" mode="INOUT" optional="false"/> - <auto-attributes entity-name="Content" include="nonpk" mode="IN" optional="true"/> - <!-- TODO: the following fields are depricated; but will not be removed until all services and callers are updated --> - <attribute mode="IN" name="targetOperationList" optional="true" type="List"/> - <attribute mode="IN" name="skipPermissionCheck" optional="true" type="String"/> - <attribute mode="IN" name="displayFailCond" optional="true" type="Boolean"/> - <attribute mode="INOUT" name="roleTypeList" optional="true" type="List"/> - <!-- end of depricated fields --> - </service> - - <service name="updateTextContent" engine="group" auth="true"> - <description>Updates a Text Document DataResource and Content Records</description> - <!-- uses updateContent internally; additonal permission(s) not necessary --> - <group> - <invoke name="updateDataResource" result-to-context="true"/> - <invoke name="updateElectronicText" result-to-context="true"/> - <invoke name="updateContent" result-to-context="true"/> - </group> - </service> - - <service name="removeContent" default-entity-name="Content" engine="simple" - location="org/ofbiz/content/content/ContentServices.xml" invoke="removeContent" auth="true"> - <description>Remove Content</description> - <permission-service service-name="genericContentPermission" main-action="DELETE"/> - <auto-attributes include="pk" mode="IN" optional="false"/> - <attribute mode="IN" name="targetOperationList" optional="true" type="List"/> - <attribute mode="IN" name="contentPurposeTypeId" optional="true" type="String"/> - <attribute mode="IN" name="userLogin" optional="true" type="GenericValue"/> - <attribute mode="INOUT" name="roleTypeList" optional="true" type="List"/> - </service> - - <!-- TODO: old permission service; being replaced with genericContentPermission --> - <service name="checkContentPermission" - transaction-timeout="72000" - auth="false" engine="java" invoke="checkContentPermission" - location="org.ofbiz.content.content.ContentPermissionServices"> - <description>Check for permission to perform operation on Content</description> - <attribute mode="IN" name="targetOperationList" optional="true" type="List"/> - <attribute mode="IN" name="contentPurposeList" optional="true" type="List"/> - <!-- it was a mistake to pass in List objects because it makes it difficult to use - the service in a request event, so I added new ones without removing lists --> - <attribute mode="IN" name="targetOperationString" optional="true" type="String"/> - <attribute mode="IN" name="contentPurposeString" optional="true" type="String"/> - <attribute mode="IN" name="roleTypeString" optional="true" type="String"/> - <attribute mode="INOUT" name="roleTypeList" optional="true" type="List"/> - <attribute mode="IN" name="currentContent" optional="true" type="GenericValue"/> - <attribute mode="IN" name="fromDate" optional="true" type="String"/> - <attribute mode="IN" name="thruDate" optional="true" type="String"/> - <!-- NOTE: entityOperation should be "_VIEW", "_ADMIN", etc. --> - <attribute mode="IN" name="entityOperation" optional="true" type="String"/> - <attribute mode="IN" name="statusId" optional="true" type="String"/> - <attribute mode="IN" name="privilegeEnumId" optional="true" type="String"/> - <attribute mode="IN" name="quickCheckContentId" optional="true" type="String"/> - <attribute mode="IN" name="displayFailCond" optional="true" type="Boolean"/> - <attribute mode="IN" name="displayPassCond" optional="true" type="Boolean"/> - <attribute mode="IN" name="partyId" optional="true" type="String"/> - <attribute mode="IN" name="userLoginId" optional="true" type="String"/> - <attribute mode="OUT" name="permissionStatus" optional="true" type="String"/> - <attribute mode="OUT" name="permissionRecorder" optional="true" type="org.ofbiz.content.content.PermissionRecorder"/> - </service> - - <service name="findRelatedContent" default-entity-name="Content" engine="java" - location="org.ofbiz.content.content.ContentServices" invoke="findRelatedContent" auth="true"> - <description>Create a Content</description> - <attribute mode="IN" name="currentContent" optional="false" type="GenericValue"/> - <attribute mode="IN" name="toFrom" optional="true" type="String"/> - <attribute mode="IN" name="fromDate" optional="true" type="String"/> - <attribute mode="IN" name="thruDate" optional="true" type="String"/> - <attribute mode="IN" name="targetOperationList" optional="true" type="List"/> - <attribute mode="IN" name="userLogin" optional="true" type="GenericValue"/> - <attribute mode="IN" name="contentAssocTypeList" optional="true" type="List"/> - <attribute mode="IN" name="contentTypeList" optional="true" type="List"/> - <attribute mode="IN" name="entityOperation" optional="true" type="String"/> - <attribute mode="OUT" name="contentList" optional="false" type="List"/> - </service> - - <!--Content Assoc services.--> - <!-- TODO: old permission service; being replaced with genericContentPermission --> - <service name="checkAssocPermission" engine="java" transaction-timeout="72000" auth="true" - location="org.ofbiz.content.content.ContentPermissionServices" invoke="checkAssocPermission"> - <description>Check for permission to perform operation on Content</description> - <attribute mode="IN" name="targetOperationList" optional="true" type="List"/> - <attribute mode="IN" name="contentPurposeList" optional="true" type="List"/> - <attribute mode="INOUT" name="roleTypeList" optional="true" type="List"/> - <attribute mode="IN" name="userLogin" optional="true" type="org.ofbiz.core.entity.GenericValue"/> - <attribute mode="IN" name="contentIdTo" optional="true" type="String"/> - <attribute mode="IN" name="contentIdFrom" optional="true" type="String"/> - <attribute mode="IN" name="fromDate" optional="true" type="String"/> - <attribute mode="IN" name="thruDate" optional="true" type="String"/> - <attribute mode="IN" name="statusId" optional="true" type="String"/> - <attribute mode="IN" name="privilegeEnumId" optional="true" type="String"/> - <attribute mode="IN" name="entityOperation" optional="true" type="String"/> - <attribute mode="IN" name="contentAssocTypeId" optional="true" type="String"/> - <attribute mode="IN" name="contentAssocPredicateId" optional="true" type="String"/> - <attribute mode="IN" name="displayFailCond" optional="true" type="Boolean"/> - <attribute mode="OUT" name="permissionStatus" optional="true" type="String"/> - <attribute mode="OUT" name="permissionRecorderTo" optional="true" type="org.ofbiz.content.content.PermissionRecorder"/> - <attribute mode="OUT" name="permissionRecorder" optional="true" type="org.ofbiz.content.content.PermissionRecorder"/> - </service> - - <service name="assocContent" engine="simple" default-entity-name="ContentAssoc" auth="true" - location="org/ofbiz/content/content/ContentServices.xml" invoke="assocContent"> - <description>Check for permission to perform operation on Content</description> - <attribute mode="IN" name="targetOperationList" optional="true" type="List"/> - <attribute mode="IN" name="contentPurposeList" optional="true" type="List"/> - <attribute mode="INOUT" name="roleTypeList" optional="true" type="List"/> - <attribute mode="IN" name="userLogin" optional="true" type="GenericValue"/> - <attribute mode="IN" name="contentIdTo" optional="true" type="String"/> - <attribute mode="IN" name="contentIdFrom" optional="true" type="String"/> - <attribute mode="IN" name="statusId" optional="true" type="String"/> - <attribute mode="IN" name="fromDate" optional="true" type="String"/> - <attribute mode="IN" name="thruDate" optional="true" type="String"/> - <attribute mode="IN" name="entityOperation" optional="true" type="String"/> - <attribute mode="IN" name="contentAssocTypeId" optional="false" type="String"/> - </service> - - <service name="createContentAssoc" default-entity-name="ContentAssoc" engine="simple" auth="true" - location="org/ofbiz/content/content/ContentServices.xml" invoke="createContentAssoc"> - <description>Create a ContentAssoc</description> - <permission-service service-name="genericContentPermission" main-action="UPDATE"/> - <implements service="genericContentPermission"/> - <auto-attributes include="all" mode="IN" optional="true"/> - <!-- deprecated fields to be removed --> - <attribute mode="IN" name="targetOperationList" optional="true" type="List"/> - <attribute mode="IN" name="targetOperationString" optional="true" type="String"/> - <attribute mode="IN" name="contentPurposeList" optional="true" type="List"/> - <attribute mode="IN" name="contentPurposeString" optional="true" type="String"/> - <attribute mode="IN" name="deactivateExisting" optional="true" type="String"/> - <attribute mode="IN" name="skipPermissionCheck" optional="true" type="String"/> - <attribute mode="IN" name="displayFailCond" optional="true" type="Boolean"/> - <attribute mode="INOUT" name="roleTypeList" optional="true" type="List"/> - <attribute mode="INOUT" name="contentIdFrom" optional="true" type="String"/> - <!-- end of deprecated fields --> - </service> - <service name="updateContentAssoc" default-entity-name="ContentAssoc" engine="simple" auth="true" - location="org/ofbiz/content/content/ContentServices.xml" invoke="updateContentAssoc"> - <description>Update a ContentAssoc</description> - <permission-service service-name="genericContentPermission" main-action="UPDATE"/> - <implements service="genericContentPermission"/> - <auto-attributes include="pk" mode="IN" optional="false"/> - <auto-attributes include="nonpk" mode="IN" optional="true"/> - <!-- deprecated fields to be removed --> - <attribute mode="IN" name="targetOperationList" optional="true" type="List"/> - <attribute mode="IN" name="contentPurposeList" optional="true" type="List"/> - <attribute mode="IN" name="skipPermissionCheck" optional="true" type="String"/> - <attribute mode="IN" name="deactivateExisting" optional="true" type="String"/> - <attribute mode="IN" name="displayFailCond" optional="true" type="Boolean"/> - <attribute mode="INOUT" name="roleTypeList" optional="true" type="List"/> - <attribute mode="INOUT" name="contentIdFrom" optional="true" type="String"/> - <!-- end of deprecated fields --> - </service> - <service name="removeContentAssoc" default-entity-name="ContentAssoc" engine="simple" auth="true" - location="org/ofbiz/content/content/ContentServices.xml" invoke="removeContentAssoc"> - <description>Remove ContentAssoc</description> - <permission-service service-name="genericContentPermission" main-action="DELETE"/> - <implements service="genericContentPermission"/> - <auto-attributes include="pk" mode="IN" optional="false"/> - <!-- deprecated fields to be removed --> - <attribute mode="IN" name="targetOperationList" optional="true" type="List"/> - <attribute mode="IN" name="contentPurposeList" optional="true" type="List"/> - <attribute mode="IN" name="skipPermissionCheck" optional="true" type="String"/> - <attribute mode="INOUT" name="roleTypeList" optional="true" type="List"/> - <attribute mode="INOUT" name="contentIdFrom" optional="true" type="String"/> - <!-- end of deprecated fields --> - </service> - - <!-- content status services --> - <service name="setContentStatus" engine="simple" auth="true" - location="org/ofbiz/content/content/ContentServices.xml" invoke="setContentStatus"> - <description>Set the Content Status</description> - <permission-service service-name="genericContentPermission" main-action="UPDATE"/> - <attribute name="contentId" type="String" mode="IN" optional="false"/> - <attribute name="statusId" type="String" mode="IN" optional="false"/> - <attribute name="oldStatusId" type="String" mode="OUT" optional="true"/> - </service> - - <!-- ContentRole services --> - <service name="createContentRole" engine="simple" default-entity-name="ContentRole" auth="true" - location="org/ofbiz/content/content/ContentServices.xml" invoke="createContentRole"> - <description>Create a ContentRole</description> - <permission-service service-name="genericContentPermission" main-action="UPDATE"/> - <implements service="genericContentPermission"/> - <auto-attributes include="pk" mode="IN" optional="false"/> - <auto-attributes include="nonpk" mode="IN" optional="true"/> - <override name="fromDate" optional="true"/> - </service> - <service name="updateContentRole" engine="simple" default-entity-name="ContentRole" auth="true" - location="org/ofbiz/content/content/ContentServices.xml" invoke="updateContentRole"> - <description>Update a ContentRole</description> - <permission-service service-name="genericContentPermission" main-action="UPDATE"/> - <implements service="genericContentPermission"/> - <auto-attributes include="pk" mode="IN" optional="false"/> - <auto-attributes include="nonpk" mode="IN" optional="true"/> - </service> - <service name="deactivateAllContentRoles" engine="simple" default-entity-name="ContentRole" auth="true" - location="org/ofbiz/content/content/ContentServices.xml" invoke="deactivateAllContentRoles"> - <description>Deactivate all ContentRoles</description> - <permission-service service-name="genericContentPermission" main-action="UPDATE"/> - <implements service="genericContentPermission"/> - <attribute mode="IN" name="contentId" optional="false" type="String"/> - <attribute mode="IN" name="roleTypeId" optional="false" type="String"/> - <attribute mode="IN" name="partyId" optional="false" type="String"/> - </service> - <service name="removeContentRole" engine="simple" default-entity-name="ContentRole" auth="true" - location="org/ofbiz/content/content/ContentServices.xml" invoke="removeContentRole"> - <description>Remove ContentRole</description> - <permission-service service-name="genericContentPermission" main-action="UPDATE"/> - <implements service="genericContentPermission"/> - <auto-attributes entity-name="ContentRole" include="pk" mode="IN" optional="false"/> - </service> - - <!-- DataResource services --> - <service name="createDataResource" default-entity-name="DataResource" engine="simple" - location="org/ofbiz/content/data/DataServices.xml" invoke="createDataResource" auth="true"> - <description>Create a DataResource</description> - <permission-service service-name="genericDataResourcePermission" main-action="CREATE"/> - <auto-attributes include="nonpk" mode="IN" optional="true"/> - <attribute name="dataResourceId" type="String" mode="INOUT" optional="true"/> - <attribute name="targetOperationList" type="List" mode="IN" optional="true"/> - <attribute name="contentPurposeList" type="List" mode="IN" optional="true" /> - <attribute name="skipPermissionCheck" type="String" mode="IN" optional="true"/> - <attribute name="roleTypeId" type="String" mode="IN" optional="true"/> - <attribute name="partyId" type="String" mode="IN" optional="true"/> - <attribute name="dataResourceId" type="String" mode="OUT" optional="false"/> - <attribute name="dataResource" type="GenericValue" mode="OUT" optional="true"/> - </service> - <service name="updateDataResource" engine="simple" default-entity-name="DataResource" auth="true" - location="org/ofbiz/content/data/DataServices.xml" invoke="updateDataResource"> - <description>Update a DataResource</description> - <permission-service service-name="genericDataResourcePermission" main-action="UPDATE"/> - <auto-attributes include="nonpk" mode="IN" optional="true"/> - <attribute name="dataResourceId" type="String" mode="IN" optional="false"/> - <attribute name="targetOperationList" type="List" mode="IN" optional="true"/> - <attribute name="contentPurposeList" type="List" mode="IN" optional="true"/> - <attribute name="skipPermissionCheck" type="String" mode="IN" optional="true"/> - <attribute name="dataResourceId" type="String" mode="OUT" optional="false"/> - <attribute name="dataResource" type="GenericValue" mode="OUT" optional="true"/> - </service> - <service name="removeDataResource" engine="simple" default-entity-name="DataResource" auth="true" - location="org/ofbiz/content/data/DataServices.xml" invoke="deleteDataResource"> - <description>Remove DataResource</description> - <permission-service service-name="genericDataResourcePermission" main-action="DELETE"/> - <auto-attributes include="pk" mode="IN" optional="false"/> - <attribute name="targetOperationList" type="List" mode="IN" optional="true"/> - <attribute name="contentPurposeList" type="List" mode="IN" optional="true"/> - <attribute name="skipPermissionCheck" type="String" mode="IN" optional="true"/> - </service> - - <!-- these should be deprecated in favor of the ECA style triggers on the base service --> - <service name="createDataResourceAndText" engine="java" default-entity-name="DataResource" auth="true" - location="org.ofbiz.content.data.DataServices" invoke="createDataResourceAndText"> - <description>Create a DataResource and, possibly, ElectronicText or ImageDataResource</description> - <auto-attributes include="pk" mode="INOUT" optional="true"/> - <auto-attributes include="nonpk" mode="IN" optional="true"/> - <attribute name="textData" mode="IN" optional="true" type="String"/> - <attribute name="targetOperationList" type="List" mode="IN" optional="true"/> - <attribute name="contentPurposeList" type="List" mode="IN" optional="true"/> - <attribute name="skipPermissionCheck" type="String" mode="IN" optional="true"/> - </service> - <service name="updateDataResourceAndText" engine="java" default-entity-name="DataResource" auth="true" - location="org.ofbiz.content.data.DataServices" invoke="updateDataResourceAndText"> - <description>Create a DataResource and, possibly, ElectronicText or ImageDataResource</description> - <auto-attributes include="pk" mode="IN" optional="true"/> - <auto-attributes include="nonpk" mode="IN" optional="true"/> - <attribute name="textData" mode="IN" type="String" optional="true"/> - <attribute name="targetOperationList" type="List" mode="IN" optional="true"/> - <attribute name="contentPurposeList" type="List" mode="IN" optional="true"/> - <attribute name="skipPermissionCheck" type="String" mode="IN" optional="true"/> - </service> - <!-- DataCategory services --> <service name="createDataCategory" engine="simple" default-entity-name="DataCategory" auth="true" location="org/ofbiz/content/data/DataServices.xml" invoke="createDataCategory"> @@ -534,7 +188,7 @@ <auto-attributes include="pk" mode="IN" optional="false"/> </service> - <!--DataResourceAttribute services.--> + <!-- DataResourceAttribute services --> <service name="createDataResourceAttribute" engine="simple" default-entity-name="DataResourceAttribute" auth="true" location="org/ofbiz/content/data/DataServices.xml" invoke="createDataResourceAttribute"> <description>Create a DataResourceAttribute</description> @@ -578,39 +232,6 @@ <auto-attributes include="pk" mode="IN" optional="false"/> </service> - <!-- ElectronicText services --> - <service name="createElectronicText" default-entity-name="ElectronicText" engine="simple" - location="org/ofbiz/content/data/DataServices.xml" invoke="createElectronicText" auth="true"> - <description>Create a ElectronicText</description> - <permission-service service-name="genericDataResourcePermission" main-action="CREATE"/> - <implements service="createDataResource"/> - <auto-attributes include="pk" mode="IN" optional="false"/> - <auto-attributes include="nonpk" mode="IN" optional="true"/> - <override name="dataResourceTypeId" default-value="ELECTRONIC_TEXT"/> - </service> - <service name="updateElectronicText" default-entity-name="ElectronicText" engine="simple" - location="org/ofbiz/content/data/DataServices.xml" invoke="updateElectronicText" auth="true"> - <description>Update a ElectronicText</description> - <permission-service service-name="genericDataResourcePermission" main-action="UPDATE"/> - <auto-attributes include="pk" mode="INOUT" optional="false"/> - <auto-attributes include="nonpk" mode="IN" optional="true"/> - <attribute name="contentId" mode="INOUT" optional="true" type="String"/><!-- to optionaly know where this text is belonging to --> - </service> - <service name="removeElectronicText" default-entity-name="ElectronicText" engine="simple" - location="org/ofbiz/content/data/DataServices.xml" invoke="removeElectronicText" auth="true"> - <description>Remove ElectronicText</description> - <permission-service service-name="genericDataResourcePermission" main-action="DELETE"/> - <auto-attributes include="pk" mode="IN" optional="false"/> - </service> - <service name="getElectronicText" engine="simple" - location="org/ofbiz/content/data/DataServices.xml" invoke="getElectronicText" default-entity-name="ElectronicText" auth="false" > - <description>Get a ElectronicText: Can pass either content value object or contentId</description> - <attribute mode="IN" name="contentId" optional="true" type="String"/> - <attribute mode="IN" name="content" optional="true" type="GenericValue"/> - <attribute mode="OUT" name="dataResourceId" optional="true" type="String"/> - <attribute mode="OUT" name="textData" optional="false" type="String"/> - </service> - <!-- Generic Content Services --> <service name="createEmailContent" engine="simple" location="org/ofbiz/content/content/ContentServices.xml" invoke="createEmailContent"> <auto-attributes mode="IN" entity-name="Content" optional="true"/> @@ -646,61 +267,6 @@ <service name="updateSimpleTextContent" engine="simple" location="org/ofbiz/content/content/ContentServices.xml" invoke="updateSimpleTextContent"> <attribute name="textDataResourceId" type="String" mode="IN" optional="true"/> <attribute name="text" type="String" mode="IN" optional="true"/> - </service> - - <!-- File services --> - <service name="createFile" engine="java" - location="org.ofbiz.content.data.DataServices" invoke="createFile" auth="true"> - <description>Create a File</description> - <implements service="createDataResource"/> - <attribute mode="IN" name="dataResource" optional="true" type="GenericValue"/> - <attribute mode="IN" name="binData" optional="true" type="org.ofbiz.entity.util.ByteWrapper"/> - <attribute mode="IN" name="textData" optional="true" type="String"/> - <attribute mode="IN" name="rootDir" optional="true" type="String"/> - <attribute mode="IN" name="dataResourceTypeId" optional="true" type="String"/> - <attribute mode="IN" name="objectInfo" optional="true" type="String"/> - </service> - <service name="createAnonFile" engine="java" - location="org.ofbiz.content.data.DataServices" invoke="createFileNoPerm" auth="false"> - <description>Create a File No Permission Required</description> - <implements service="createFile"/> - </service> - <service name="updateFile" engine="java" - location="org.ofbiz.content.data.DataServices" invoke="updateFile" auth="true"> - <description>Update a File</description> - <attribute mode="IN" name="dataResource" optional="true" type="GenericValue"/> - <attribute mode="IN" name="binData" optional="true" type="org.ofbiz.entity.util.ByteWrapper"/> - <attribute mode="IN" name="textData" optional="true" type="String"/> - <attribute mode="IN" name="rootDir" optional="true" type="String"/> - <attribute mode="IN" name="dataResourceTypeId" optional="true" type="String"/> - <attribute mode="IN" name="objectInfo" optional="true" type="String"/> - </service> - <service name="removeFile" engine="simple" - location="org/ofbiz/content/data/DataServices.xml" invoke="removeFile" auth="true"> - <description>Remove File</description> - <attribute mode="IN" name="rootDir" optional="true" type="String"/> - </service> - - <!-- OtherDataResource services --> - <service name="createOtherDataResource" engine="simple" default-entity-name="OtherDataResource" auth="true" - location="org/ofbiz/content/data/DataServices.xml" invoke="createOtherDataResource"> - <description>Create a OtherDataResource</description> - <permission-service service-name="genericDataResourcePermission" main-action="CREATE"/> - <auto-attributes include="pk" mode="INOUT" optional="true"/> - <auto-attributes include="nonpk" mode="IN" optional="true"/> - </service> - <service name="updateOtherDataResource" engine="simple" default-entity-name="OtherDataResource" auth="true" - location="org/ofbiz/content/data/DataServices.xml" invoke="updateOtherDataResource"> - <description>Update a OtherDataResource</description> - <permission-service service-name="genericDataResourcePermission" main-action="UPDATE"/> - <auto-attributes include="pk" mode="IN" optional="false"/> - <auto-attributes include="nonpk" mode="IN" optional="true"/> - </service> - <service name="removeOtherDataResource" engine="simple" default-entity-name="OtherDataResource" auth="true" - location="org/ofbiz/content/data/DataServices.xml" invoke="removeOtherDataResource"> - <description>Remove OtherDataResource</description> - <permission-service service-name="genericDataResourcePermission" main-action="DELETE"/> - <auto-attributes include="pk" mode="IN" optional="false"/> </service> <!-- Util --> Added: ofbiz/trunk/applications/content/servicedef/services_content.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/servicedef/services_content.xml?view=auto&rev=512356 ============================================================================== --- ofbiz/trunk/applications/content/servicedef/services_content.xml (added) +++ ofbiz/trunk/applications/content/servicedef/services_content.xml Tue Feb 27 10:35:04 2007 @@ -0,0 +1,310 @@ +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + --> + +<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/services.xsd"> + <description>Content Component Content Services</description> + <vendor>OFBiz</vendor> + + <!-- create content services --> + <service name="createContent" engine="simple" auth="true" + location="org/ofbiz/content/content/ContentServices.xml" invoke="createContent"> + <description>Create a Content</description> + <permission-service service-name="genericContentPermission" main-action="CREATE"/> + <implements service="genericContentPermission"/> + <auto-attributes entity-name="Content" include="nonpk" mode="IN" optional="true"/> + <!-- TODO: the following fields are deprecated; but will not be removed until all services and callers are updated --> + <attribute mode="IN" name="targetOperationList" optional="true" type="List"/> + <attribute mode="IN" name="targetOperationString" optional="true" type="String"/> + <attribute mode="IN" name="contentPurposeList" optional="true" type="List"/> + <attribute mode="IN" name="contentPurposeString" optional="true" type="String"/> + <attribute mode="IN" name="skipPermissionCheck" optional="true" type="String"/> + <attribute mode="IN" name="displayFailCond" optional="true" type="Boolean"/> + <attribute mode="INOUT" name="roleTypeList" optional="true" type="List"/> + <!-- end of deprecated fields --> + <attribute name="contentAssocTypeId" type="String" mode="IN" optional="true"/> + <attribute name="contentIdFrom" type="String" mode="IN" optional="true"/> + <attribute name="contentIdTo" type="String" mode="IN" optional="true"/> + <attribute name="roleTypeId" type="String" mode="IN" optional="true"/> + <attribute name="partyId" type="String" mode="IN" optional="true"/> + <attribute name="mapKey" type="String" mode="IN" optional="true"/> + <attribute name="contentId" type="String" mode="INOUT" optional="true"/> + <override name="contentTypeId" default-value="DOCUMENT"/> + </service> + + <service name="createTextContent" engine="group" auth="true"> + <description>Creates a Text Document DataResource and Content Records</description> + <!-- uses createContent internally; additonal permission(s) not necessary --> + <group> + <invoke name="createDataText" result-to-context="true"/> + <invoke name="createContent" result-to-context="true"/> + </group> + </service> + + <service name="createContentFromDataResource" engine="simple" + location="org/ofbiz/content/content/ContentServices.xml" invoke="createContentFromDataResource"> + <description>Creates content record from data resource and allows all content fields to be set</description> + <!-- uses createContent internally; additonal permission(s) not necessary --> + <implements service="createContent" optional="true"/> + <attribute name="dataResourceId" type="String" mode="IN" optional="false"/> + <attribute name="contentId" type="String" mode="OUT" optional="false"/> + </service> + + <service name="uploadFileToDataResource" engine="simple" transaction-timeout="300" + location="org/ofbiz/content/data/DataServices.xml" invoke="attachUploadToDataResource"> + <description>Accepts uploaded content and attaches to an existing data resource</description> + <!-- uses createContent internally; additonal permission(s) not necessary --> + <implements service="uploadFileInterface"/> + <attribute name="dataResourceId" type="String" mode="INOUT" optional="false"/> + </service> + + <service name="createContentFromUploadedFile" engine="group" transaction-timeout="300"> + <description>Accepts file upload, creates DataResource and Content records.</description> + <!-- uses createContent internally; additonal permission(s) not necessary --> + <group> + <invoke name="createDataResource" parameters="preserve" result-to-context="true"/> + <invoke name="uploadFileToDataResource" parameters="preserve" result-to-context="true"/> + <invoke name="createContentFromDataResource"/> + </group> + </service> + + <service name="copyContentAndElectronicTextandAssoc" default-entity-name="Content" engine="simple" + location="org/ofbiz/content/content/ContentServices.xml" invoke="copyContentAndElectronicTextandAssoc" auth="true" > + <description>Copy a Content, e;ectronic text and assocs</description> + <!-- uses createContent internally; additonal permission(s) not necessary --> + <auto-attributes include="pk" mode="INOUT" optional="false"/> + </service> + + <!-- update content services --> + <service name="updateContent" engine="simple" auth="true" + location="org/ofbiz/content/content/ContentServices.xml" invoke="updateContent"> + <description>Update a Content</description> + <permission-service service-name="genericContentPermission" main-action="UPDATE"/> + <implements service="genericContentPermission"/> + <implements service="updateContentAssoc"/> + <auto-attributes entity-name="Content" include="pk" mode="INOUT" optional="false"/> + <auto-attributes entity-name="Content" include="nonpk" mode="IN" optional="true"/> + <!-- TODO: the following fields are depricated; but will not be removed until all services and callers are updated --> + <attribute mode="IN" name="targetOperationList" optional="true" type="List"/> + <attribute mode="IN" name="skipPermissionCheck" optional="true" type="String"/> + <attribute mode="IN" name="displayFailCond" optional="true" type="Boolean"/> + <attribute mode="INOUT" name="roleTypeList" optional="true" type="List"/> + <!-- end of depricated fields --> + </service> + + <service name="updateTextContent" engine="group" auth="true"> + <description>Updates a Text Document DataResource and Content Records</description> + <!-- uses updateContent internally; additonal permission(s) not necessary --> + <group> + <invoke name="updateDataText" result-to-context="true"/> + <invoke name="updateContent" result-to-context="true"/> + </group> + </service> + + <service name="removeContent" default-entity-name="Content" engine="simple" + location="org/ofbiz/content/content/ContentServices.xml" invoke="removeContent" auth="true"> + <description>Remove Content</description> + <permission-service service-name="genericContentPermission" main-action="DELETE"/> + <auto-attributes include="pk" mode="IN" optional="false"/> + <attribute mode="IN" name="targetOperationList" optional="true" type="List"/> + <attribute mode="IN" name="contentPurposeTypeId" optional="true" type="String"/> + <attribute mode="IN" name="userLogin" optional="true" type="GenericValue"/> + <attribute mode="INOUT" name="roleTypeList" optional="true" type="List"/> + </service> + + <!-- TODO: old permission service; being replaced with genericContentPermission --> + <service name="checkContentPermission" + transaction-timeout="72000" + auth="false" engine="java" invoke="checkContentPermission" + location="org.ofbiz.content.content.ContentPermissionServices"> + <description>Check for permission to perform operation on Content</description> + <attribute mode="IN" name="targetOperationList" optional="true" type="List"/> + <attribute mode="IN" name="contentPurposeList" optional="true" type="List"/> + <!-- it was a mistake to pass in List objects because it makes it difficult to use + the service in a request event, so I added new ones without removing lists --> + <attribute mode="IN" name="targetOperationString" optional="true" type="String"/> + <attribute mode="IN" name="contentPurposeString" optional="true" type="String"/> + <attribute mode="IN" name="roleTypeString" optional="true" type="String"/> + <attribute mode="INOUT" name="roleTypeList" optional="true" type="List"/> + <attribute mode="IN" name="currentContent" optional="true" type="GenericValue"/> + <attribute mode="IN" name="fromDate" optional="true" type="String"/> + <attribute mode="IN" name="thruDate" optional="true" type="String"/> + <!-- NOTE: entityOperation should be "_VIEW", "_ADMIN", etc. --> + <attribute mode="IN" name="entityOperation" optional="true" type="String"/> + <attribute mode="IN" name="statusId" optional="true" type="String"/> + <attribute mode="IN" name="privilegeEnumId" optional="true" type="String"/> + <attribute mode="IN" name="quickCheckContentId" optional="true" type="String"/> + <attribute mode="IN" name="displayFailCond" optional="true" type="Boolean"/> + <attribute mode="IN" name="displayPassCond" optional="true" type="Boolean"/> + <attribute mode="IN" name="partyId" optional="true" type="String"/> + <attribute mode="IN" name="userLoginId" optional="true" type="String"/> + <attribute mode="OUT" name="permissionStatus" optional="true" type="String"/> + <attribute mode="OUT" name="permissionRecorder" optional="true" type="org.ofbiz.content.content.PermissionRecorder"/> + </service> + + <service name="findRelatedContent" default-entity-name="Content" engine="java" + location="org.ofbiz.content.content.ContentServices" invoke="findRelatedContent" auth="true"> + <description>Create a Content</description> + <attribute mode="IN" name="currentContent" optional="false" type="GenericValue"/> + <attribute mode="IN" name="toFrom" optional="true" type="String"/> + <attribute mode="IN" name="fromDate" optional="true" type="String"/> + <attribute mode="IN" name="thruDate" optional="true" type="String"/> + <attribute mode="IN" name="targetOperationList" optional="true" type="List"/> + <attribute mode="IN" name="userLogin" optional="true" type="GenericValue"/> + <attribute mode="IN" name="contentAssocTypeList" optional="true" type="List"/> + <attribute mode="IN" name="contentTypeList" optional="true" type="List"/> + <attribute mode="IN" name="entityOperation" optional="true" type="String"/> + <attribute mode="OUT" name="contentList" optional="false" type="List"/> + </service> + + <!--Content Assoc services.--> + <!-- TODO: old permission service; being replaced with genericContentPermission --> + <service name="checkAssocPermission" engine="java" transaction-timeout="72000" auth="true" + location="org.ofbiz.content.content.ContentPermissionServices" invoke="checkAssocPermission"> + <description>Check for permission to perform operation on Content</description> + <attribute mode="IN" name="targetOperationList" optional="true" type="List"/> + <attribute mode="IN" name="contentPurposeList" optional="true" type="List"/> + <attribute mode="INOUT" name="roleTypeList" optional="true" type="List"/> + <attribute mode="IN" name="userLogin" optional="true" type="org.ofbiz.core.entity.GenericValue"/> + <attribute mode="IN" name="contentIdTo" optional="true" type="String"/> + <attribute mode="IN" name="contentIdFrom" optional="true" type="String"/> + <attribute mode="IN" name="fromDate" optional="true" type="String"/> + <attribute mode="IN" name="thruDate" optional="true" type="String"/> + <attribute mode="IN" name="statusId" optional="true" type="String"/> + <attribute mode="IN" name="privilegeEnumId" optional="true" type="String"/> + <attribute mode="IN" name="entityOperation" optional="true" type="String"/> + <attribute mode="IN" name="contentAssocTypeId" optional="true" type="String"/> + <attribute mode="IN" name="contentAssocPredicateId" optional="true" type="String"/> + <attribute mode="IN" name="displayFailCond" optional="true" type="Boolean"/> + <attribute mode="OUT" name="permissionStatus" optional="true" type="String"/> + <attribute mode="OUT" name="permissionRecorderTo" optional="true" type="org.ofbiz.content.content.PermissionRecorder"/> + <attribute mode="OUT" name="permissionRecorder" optional="true" type="org.ofbiz.content.content.PermissionRecorder"/> + </service> + + <service name="assocContent" engine="simple" default-entity-name="ContentAssoc" auth="true" + location="org/ofbiz/content/content/ContentServices.xml" invoke="assocContent"> + <description>Check for permission to perform operation on Content</description> + <attribute mode="IN" name="targetOperationList" optional="true" type="List"/> + <attribute mode="IN" name="contentPurposeList" optional="true" type="List"/> + <attribute mode="INOUT" name="roleTypeList" optional="true" type="List"/> + <attribute mode="IN" name="userLogin" optional="true" type="GenericValue"/> + <attribute mode="IN" name="contentIdTo" optional="true" type="String"/> + <attribute mode="IN" name="contentIdFrom" optional="true" type="String"/> + <attribute mode="IN" name="statusId" optional="true" type="String"/> + <attribute mode="IN" name="fromDate" optional="true" type="String"/> + <attribute mode="IN" name="thruDate" optional="true" type="String"/> + <attribute mode="IN" name="entityOperation" optional="true" type="String"/> + <attribute mode="IN" name="contentAssocTypeId" optional="false" type="String"/> + </service> + + <service name="createContentAssoc" default-entity-name="ContentAssoc" engine="simple" auth="true" + location="org/ofbiz/content/content/ContentServices.xml" invoke="createContentAssoc"> + <description>Create a ContentAssoc</description> + <permission-service service-name="genericContentPermission" main-action="UPDATE"/> + <implements service="genericContentPermission"/> + <auto-attributes include="all" mode="IN" optional="true"/> + <!-- deprecated fields to be removed --> + <attribute mode="IN" name="targetOperationList" optional="true" type="List"/> + <attribute mode="IN" name="targetOperationString" optional="true" type="String"/> + <attribute mode="IN" name="contentPurposeList" optional="true" type="List"/> + <attribute mode="IN" name="contentPurposeString" optional="true" type="String"/> + <attribute mode="IN" name="deactivateExisting" optional="true" type="String"/> + <attribute mode="IN" name="skipPermissionCheck" optional="true" type="String"/> + <attribute mode="IN" name="displayFailCond" optional="true" type="Boolean"/> + <attribute mode="INOUT" name="roleTypeList" optional="true" type="List"/> + <attribute mode="INOUT" name="contentIdFrom" optional="true" type="String"/> + <!-- end of deprecated fields --> + </service> + <service name="updateContentAssoc" default-entity-name="ContentAssoc" engine="simple" auth="true" + location="org/ofbiz/content/content/ContentServices.xml" invoke="updateContentAssoc"> + <description>Update a ContentAssoc</description> + <permission-service service-name="genericContentPermission" main-action="UPDATE"/> + <implements service="genericContentPermission"/> + <auto-attributes include="pk" mode="IN" optional="false"/> + <auto-attributes include="nonpk" mode="IN" optional="true"/> + <!-- deprecated fields to be removed --> + <attribute mode="IN" name="targetOperationList" optional="true" type="List"/> + <attribute mode="IN" name="contentPurposeList" optional="true" type="List"/> + <attribute mode="IN" name="skipPermissionCheck" optional="true" type="String"/> + <attribute mode="IN" name="deactivateExisting" optional="true" type="String"/> + <attribute mode="IN" name="displayFailCond" optional="true" type="Boolean"/> + <attribute mode="INOUT" name="roleTypeList" optional="true" type="List"/> + <attribute mode="INOUT" name="contentIdFrom" optional="true" type="String"/> + <!-- end of deprecated fields --> + </service> + <service name="removeContentAssoc" default-entity-name="ContentAssoc" engine="simple" auth="true" + location="org/ofbiz/content/content/ContentServices.xml" invoke="removeContentAssoc"> + <description>Remove ContentAssoc</description> + <permission-service service-name="genericContentPermission" main-action="DELETE"/> + <implements service="genericContentPermission"/> + <auto-attributes include="pk" mode="IN" optional="false"/> + <!-- deprecated fields to be removed --> + <attribute mode="IN" name="targetOperationList" optional="true" type="List"/> + <attribute mode="IN" name="contentPurposeList" optional="true" type="List"/> + <attribute mode="IN" name="skipPermissionCheck" optional="true" type="String"/> + <attribute mode="INOUT" name="roleTypeList" optional="true" type="List"/> + <attribute mode="INOUT" name="contentIdFrom" optional="true" type="String"/> + <!-- end of deprecated fields --> + </service> + + <!-- content status services --> + <service name="setContentStatus" engine="simple" auth="true" + location="org/ofbiz/content/content/ContentServices.xml" invoke="setContentStatus"> + <description>Set the Content Status</description> + <permission-service service-name="genericContentPermission" main-action="UPDATE"/> + <attribute name="contentId" type="String" mode="IN" optional="false"/> + <attribute name="statusId" type="String" mode="IN" optional="false"/> + <attribute name="oldStatusId" type="String" mode="OUT" optional="true"/> + </service> + + <!-- ContentRole services --> + <service name="createContentRole" engine="simple" default-entity-name="ContentRole" auth="true" + location="org/ofbiz/content/content/ContentServices.xml" invoke="createContentRole"> + <description>Create a ContentRole</description> + <permission-service service-name="genericContentPermission" main-action="UPDATE"/> + <implements service="genericContentPermission"/> + <auto-attributes include="pk" mode="IN" optional="false"/> + <auto-attributes include="nonpk" mode="IN" optional="true"/> + <override name="fromDate" optional="true"/> + </service> + <service name="updateContentRole" engine="simple" default-entity-name="ContentRole" auth="true" + location="org/ofbiz/content/content/ContentServices.xml" invoke="updateContentRole"> + <description>Update a ContentRole</description> + <permission-service service-name="genericContentPermission" main-action="UPDATE"/> + <implements service="genericContentPermission"/> + <auto-attributes include="pk" mode="IN" optional="false"/> + <auto-attributes include="nonpk" mode="IN" optional="true"/> + </service> + <service name="deactivateAllContentRoles" engine="simple" default-entity-name="ContentRole" auth="true" + location="org/ofbiz/content/content/ContentServices.xml" invoke="deactivateAllContentRoles"> + <description>Deactivate all ContentRoles</description> + <permission-service service-name="genericContentPermission" main-action="UPDATE"/> + <implements service="genericContentPermission"/> + <attribute mode="IN" name="contentId" optional="false" type="String"/> + <attribute mode="IN" name="roleTypeId" optional="false" type="String"/> + <attribute mode="IN" name="partyId" optional="false" type="String"/> + </service> + <service name="removeContentRole" engine="simple" default-entity-name="ContentRole" auth="true" + location="org/ofbiz/content/content/ContentServices.xml" invoke="removeContentRole"> + <description>Remove ContentRole</description> + <permission-service service-name="genericContentPermission" main-action="UPDATE"/> + <implements service="genericContentPermission"/> + <auto-attributes entity-name="ContentRole" include="pk" mode="IN" optional="false"/> + </service> +</services> Propchange: ofbiz/trunk/applications/content/servicedef/services_content.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/content/servicedef/services_content.xml ------------------------------------------------------------------------------ svn:keywords = "Date Rev Author URL Id" Propchange: ofbiz/trunk/applications/content/servicedef/services_content.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: ofbiz/trunk/applications/content/servicedef/services_data.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/servicedef/services_data.xml?view=auto&rev=512356 ============================================================================== --- ofbiz/trunk/applications/content/servicedef/services_data.xml (added) +++ ofbiz/trunk/applications/content/servicedef/services_data.xml Tue Feb 27 10:35:04 2007 @@ -0,0 +1,203 @@ +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + --> + +<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/services.xsd"> + <description>Content Component Data Services</description> + <vendor>OFBiz</vendor> + + <!-- DataResource services --> + <service name="createDataResource" default-entity-name="DataResource" engine="simple" + location="org/ofbiz/content/data/DataServices.xml" invoke="createDataResource" auth="true"> + <description>Create a DataResource</description> + <permission-service service-name="genericDataResourcePermission" main-action="CREATE"/> + <auto-attributes include="nonpk" mode="IN" optional="true"/> + <attribute name="dataResourceId" type="String" mode="INOUT" optional="true"/> + <attribute name="targetOperationList" type="List" mode="IN" optional="true"/> + <attribute name="contentPurposeList" type="List" mode="IN" optional="true" /> + <attribute name="skipPermissionCheck" type="String" mode="IN" optional="true"/> + <attribute name="roleTypeId" type="String" mode="IN" optional="true"/> + <attribute name="partyId" type="String" mode="IN" optional="true"/> + <attribute name="dataResourceId" type="String" mode="OUT" optional="false"/> + <attribute name="dataResource" type="GenericValue" mode="OUT" optional="true"/> + </service> + <service name="updateDataResource" engine="simple" default-entity-name="DataResource" auth="true" + location="org/ofbiz/content/data/DataServices.xml" invoke="updateDataResource"> + <description>Update a DataResource</description> + <permission-service service-name="genericDataResourcePermission" main-action="UPDATE"/> + <auto-attributes include="nonpk" mode="IN" optional="true"/> + <attribute name="dataResourceId" type="String" mode="IN" optional="false"/> + <attribute name="targetOperationList" type="List" mode="IN" optional="true"/> + <attribute name="contentPurposeList" type="List" mode="IN" optional="true"/> + <attribute name="skipPermissionCheck" type="String" mode="IN" optional="true"/> + <attribute name="dataResourceId" type="String" mode="OUT" optional="false"/> + <attribute name="dataResource" type="GenericValue" mode="OUT" optional="true"/> + </service> + <service name="removeDataResource" engine="simple" default-entity-name="DataResource" auth="true" + location="org/ofbiz/content/data/DataServices.xml" invoke="deleteDataResource"> + <description>Remove DataResource</description> + <permission-service service-name="genericDataResourcePermission" main-action="DELETE"/> + <auto-attributes include="pk" mode="IN" optional="false"/> + <attribute name="targetOperationList" type="List" mode="IN" optional="true"/> + <attribute name="contentPurposeList" type="List" mode="IN" optional="true"/> + <attribute name="skipPermissionCheck" type="String" mode="IN" optional="true"/> + </service> + + <!-- generic create data text service; looks at the type id to determine if ELECTRONIC_TEXT is necessary --> + <service name="createDataText" engine="route" auth="true"> + <description>Uses ECA to decide if we should call createElectronicText or just createDataResource (SHORT_TEXT)</description> + <implements service="createElectronicText"/> + </service> + <service name="updateDataText" engine="route" auth="true"> + <description>Uses ECA to decide if we should call updateElectronicText or just updateDataResource (SHORT_TEXT)</description> + <implements service="updateElectronicText"/> + </service> + + <!-- these should be deprecated in favor of the ECA style triggers on the base service --> + <service name="createDataResourceAndText" engine="java" default-entity-name="DataResource" auth="true" + location="org.ofbiz.content.data.DataServices" invoke="createDataResourceAndText"> + <description>Create a DataResource and, possibly, ElectronicText or ImageDataResource</description> + <auto-attributes include="pk" mode="INOUT" optional="true"/> + <auto-attributes include="nonpk" mode="IN" optional="true"/> + <attribute name="textData" mode="IN" optional="true" type="String"/> + <attribute name="targetOperationList" type="List" mode="IN" optional="true"/> + <attribute name="contentPurposeList" type="List" mode="IN" optional="true"/> + <attribute name="skipPermissionCheck" type="String" mode="IN" optional="true"/> + </service> + <service name="updateDataResourceAndText" engine="java" default-entity-name="DataResource" auth="true" + location="org.ofbiz.content.data.DataServices" invoke="updateDataResourceAndText"> + <description>Create a DataResource and, possibly, ElectronicText or ImageDataResource</description> + <auto-attributes include="pk" mode="IN" optional="true"/> + <auto-attributes include="nonpk" mode="IN" optional="true"/> + <attribute name="textData" mode="IN" type="String" optional="true"/> + <attribute name="targetOperationList" type="List" mode="IN" optional="true"/> + <attribute name="contentPurposeList" type="List" mode="IN" optional="true"/> + <attribute name="skipPermissionCheck" type="String" mode="IN" optional="true"/> + </service> + + <!-- ElectronicText services --> + <service name="createElectronicText" default-entity-name="ElectronicText" engine="simple" + location="org/ofbiz/content/data/DataServices.xml" invoke="createElectronicText" auth="true"> + <description>Create a ElectronicText</description> + <permission-service service-name="genericDataResourcePermission" main-action="CREATE"/> + <implements service="createDataResource"/> + <auto-attributes include="pk" mode="IN" optional="false"/> + <auto-attributes include="nonpk" mode="IN" optional="true"/> + <override name="dataResourceTypeId" default-value="ELECTRONIC_TEXT"/> + </service> + <service name="updateElectronicText" default-entity-name="ElectronicText" engine="simple" + location="org/ofbiz/content/data/DataServices.xml" invoke="updateElectronicText" auth="true"> + <description>Update a ElectronicText</description> + <permission-service service-name="genericDataResourcePermission" main-action="UPDATE"/> + <auto-attributes include="pk" mode="INOUT" optional="false"/> + <auto-attributes include="nonpk" mode="IN" optional="true"/> + <attribute name="contentId" mode="INOUT" optional="true" type="String"/><!-- to optionaly know where this text is belonging to --> + </service> + <service name="removeElectronicText" default-entity-name="ElectronicText" engine="simple" + location="org/ofbiz/content/data/DataServices.xml" invoke="removeElectronicText" auth="true"> + <description>Remove ElectronicText</description> + <permission-service service-name="genericDataResourcePermission" main-action="DELETE"/> + <auto-attributes include="pk" mode="IN" optional="false"/> + </service> + <service name="getElectronicText" engine="simple" + location="org/ofbiz/content/data/DataServices.xml" invoke="getElectronicText" default-entity-name="ElectronicText" auth="false" > + <description>Get a ElectronicText: Can pass either content value object or contentId</description> + <attribute mode="IN" name="contentId" optional="true" type="String"/> + <attribute mode="IN" name="content" optional="true" type="GenericValue"/> + <attribute mode="OUT" name="dataResourceId" optional="true" type="String"/> + <attribute mode="OUT" name="textData" optional="false" type="String"/> + </service> + + <!-- Image Data Resource services --> + <service name="createImageDataResource" engine="simple" default-entity-name="ImageDataResource" auth="true" + location="org/ofbiz/content/data/DataServices.xml" invoke="createImageDataResource"> + <description>Create an ImageDataResource</description> + <permission-service service-name="genericDataResourcePermission" main-action="CREATE"/> + <auto-attributes include="pk" mode="INOUT" optional="true"/> + <auto-attributes include="nonpk" mode="IN" optional="true"/> + </service> + <service name="updateImageDataResource" engine="simple" default-entity-name="ImageDataResource" auth="true" + location="org/ofbiz/content/data/DataServices.xml" invoke="updateImageDataResource"> + <description>Update an ImageDataResource</description> + <permission-service service-name="genericDataResourcePermission" main-action="UPDATE"/> + <auto-attributes include="pk" mode="IN" optional="false"/> + <auto-attributes include="nonpk" mode="IN" optional="true"/> + </service> + <service name="removeImageDataResource" engine="simple" default-entity-name="ImageDataResource" auth="true" + location="org/ofbiz/content/data/DataServices.xml" invoke="removeImageDataResource"> + <description>Remove an ImageDataResource</description> + <permission-service service-name="genericDataResourcePermission" main-action="DELETE"/> + <auto-attributes include="pk" mode="IN" optional="false"/> + </service> + + <!-- Other Data Resource services --> + <service name="createOtherDataResource" engine="simple" default-entity-name="OtherDataResource" auth="true" + location="org/ofbiz/content/data/DataServices.xml" invoke="createOtherDataResource"> + <description>Create an OtherDataResource</description> + <permission-service service-name="genericDataResourcePermission" main-action="CREATE"/> + <auto-attributes include="pk" mode="INOUT" optional="true"/> + <auto-attributes include="nonpk" mode="IN" optional="true"/> + </service> + <service name="updateOtherDataResource" engine="simple" default-entity-name="OtherDataResource" auth="true" + location="org/ofbiz/content/data/DataServices.xml" invoke="updateOtherDataResource"> + <description>Update an OtherDataResource</description> + <permission-service service-name="genericDataResourcePermission" main-action="UPDATE"/> + <auto-attributes include="pk" mode="IN" optional="false"/> + <auto-attributes include="nonpk" mode="IN" optional="true"/> + </service> + <service name="removeOtherDataResource" engine="simple" default-entity-name="OtherDataResource" auth="true" + location="org/ofbiz/content/data/DataServices.xml" invoke="removeOtherDataResource"> + <description>Remove an OtherDataResource</description> + <permission-service service-name="genericDataResourcePermission" main-action="DELETE"/> + <auto-attributes include="pk" mode="IN" optional="false"/> + </service> + + <!-- File services --> + <service name="createFile" engine="java" + location="org.ofbiz.content.data.DataServices" invoke="createFile" auth="true"> + <description>Create a File</description> + <implements service="createDataResource"/> + <attribute mode="IN" name="dataResource" optional="true" type="GenericValue"/> + <attribute mode="IN" name="binData" optional="true" type="org.ofbiz.entity.util.ByteWrapper"/> + <attribute mode="IN" name="textData" optional="true" type="String"/> + <attribute mode="IN" name="rootDir" optional="true" type="String"/> + <attribute mode="IN" name="dataResourceTypeId" optional="true" type="String"/> + <attribute mode="IN" name="objectInfo" optional="true" type="String"/> + </service> + <service name="createAnonFile" engine="java" + location="org.ofbiz.content.data.DataServices" invoke="createFileNoPerm" auth="false"> + <description>Create a File No Permission Required</description> + <implements service="createFile"/> + </service> + <service name="updateFile" engine="java" + location="org.ofbiz.content.data.DataServices" invoke="updateFile" auth="true"> + <description>Update a File</description> + <attribute mode="IN" name="dataResource" optional="true" type="GenericValue"/> + <attribute mode="IN" name="binData" optional="true" type="org.ofbiz.entity.util.ByteWrapper"/> + <attribute mode="IN" name="textData" optional="true" type="String"/> + <attribute mode="IN" name="rootDir" optional="true" type="String"/> + <attribute mode="IN" name="dataResourceTypeId" optional="true" type="String"/> + <attribute mode="IN" name="objectInfo" optional="true" type="String"/> + </service> + <service name="removeFile" engine="simple" + location="org/ofbiz/content/data/DataServices.xml" invoke="removeFile" auth="true"> + <description>Remove File</description> + <attribute mode="IN" name="rootDir" optional="true" type="String"/> + </service> +</services> \ No newline at end of file Propchange: ofbiz/trunk/applications/content/servicedef/services_data.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/content/servicedef/services_data.xml ------------------------------------------------------------------------------ svn:keywords = "Date Rev Author URL Id" Propchange: ofbiz/trunk/applications/content/servicedef/services_data.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml |
Free forum by Nabble | Edit this page |