Login  Register

Dev - Fix for isPublic in createPartyContent

Posted by Chris Juettner on May 25, 2006; 10:59pm
URL: http://ofbiz.116.s1.nabble.com/Dev-Fix-for-isPublic-in-createPartyContent-tp168125.html

I've added the isPublic attribute to the Party application's services.xml so
I can set the
isPublic value in the dataResource table. Also, I added a set to the
createPartyContent service in PartyServices.xml
so the actual value gets persisted to the database.  Please review the
change and update the code base with
the change if you think it's appropriate.

Thanks
Chris Juettner
Integral Business Solutions

<service name="createPartyContent" engine="simple"
   location="org/ofbiz/party/party/PartyServices.xml"
invoke="createPartyContent" auth="false">
   <description>Create Party Associated Content</description>
   <attribute name="uploadedFile" type="org.ofbiz.entity.util.ByteWrapper"
mode="IN" optional="false"/>
   <attribute name="_uploadedFile_fileName" type="String" mode="IN"
optional="false"/>
   <attribute name="_uploadedFile_contentType" type="String" mode="IN"
optional="false"/>
   <attribute name="contentTypeId" type="String" mode="IN"
optional="false"/>
   <attribute name="dataCategoryId" type="String" mode="IN"
optional="true"/>
   <attribute name="statusId" type="String" mode="IN" optional="false"/>
   <attribute name="partyId" type="String" mode="IN" optional="true"/>
   <attribute name="isPublic" type="String" mode="IN" optional="true"/>
   <attribute name="contentId" type="String" mode="OUT" optional="false"/>
</service>

<!-- create the data resource object -->
<sequenced-id-to-env sequence-name="DataResource"
env-name="dataResourceId"/>
<make-value value-name="dataResource" entity-name="DataResource"/>
<set from-field="dataResourceId" field="dataResource.dataResourceId"/>
<set from-field="parameters._uploadedFile_fileName"
field="dataResource.dataResourceName"/>
<set from-field="parameters._uploadedFile_contentType"
field="dataResource.mimeTypeId"/>
<set from-field="parameters.dataCategoryId"
field="dataResource.dataCategoryId"/>
<set from-field="parameters.statusId" field="dataResource.statusId"/>
<set from-field="parameters.isPublic" field="dataResource.isPublic"/>

<set value="${uploadPath}/${dataResource.dataResourceId}"
field="dataResource.objectInfo"/>
<if-not-empty field-name="extension">
   <set
value="${uploadPath}/${dataResource.dataResourceId}.${extension.fileExtensio
nId}" field="dataResource.objectInfo"/>
</if-not-empty>

<set value="LOCAL_FILE" field="dataResource.dataResourceTypeId"/>
<create-value value-name="dataResource"/>



 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev