Author: lektran
Date: Mon Mar 26 03:31:40 2007 New Revision: 522474 URL: http://svn.apache.org/viewvc?view=rev&rev=522474 Log: Patch from Anil Patel, Migrate createPartyRole and deletePartyRole service from Java to Simple method OFBIZ-585 Removed: ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyRoleServices.java Modified: ofbiz/trunk/applications/party/config/PartyUiLabels.properties ofbiz/trunk/applications/party/config/PartyUiLabels_es.properties ofbiz/trunk/applications/party/config/PartyUiLabels_it.properties ofbiz/trunk/applications/party/config/PartyUiLabels_nl.properties ofbiz/trunk/applications/party/config/PartyUiLabels_zh.properties ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyServices.xml ofbiz/trunk/applications/party/servicedef/services.xml Modified: ofbiz/trunk/applications/party/config/PartyUiLabels.properties URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/config/PartyUiLabels.properties?view=diff&rev=522474&r1=522473&r2=522474 ============================================================================== --- ofbiz/trunk/applications/party/config/PartyUiLabels.properties (original) +++ ofbiz/trunk/applications/party/config/PartyUiLabels.properties Mon Mar 26 03:31:40 2007 @@ -215,6 +215,8 @@ PartyCookie=Cookie PartyCountryCode=Country Code PartyCountryMissing=Country is missing +PartyCreatePartyRolePermissionError=Security Error\: to run createPartyRole you must have the PARTYMGR_CREATE or PARTYMGR_ADMIN permission +PartyDeletePartyRolePermissionError=Security Error\: to run deletePartyRole you must have the PARTYMGR_DELETE or PARTYMGR_ADMIN permission PartyCreateAddWebSiteRolePermissionError=Security Error\: to run addWebSiteRole you must have the PARTYMGR_CREATE or PARTYMGR_ADMIN permission PartyCreateAttributePermissionError=Security Error\: to run createPartyAttribute you must have the PARTYMGR_CREATE or PARTYMGR_ADMIN permission PartyCreateCommunicationEventPermissionError=Security Error\: to run createCommunicationEvent you must have the PARTYMGR_CREATE or PARTYMGR_ADMIN permission @@ -559,12 +561,6 @@ partyrelationshipservices.could_not_update_party_relation_read=Could not update party relation (read failure): ${errMessage}. partyrelationshipservices.could_not_update_party_relation_not_found=Could not update party relationship (relationship not found). partyrelationshipservices.could_not_update_party_relation_write=Could not update party relationship (write failure): ${errMessage}. -partyroleservices.could_not_create_party_role_exists=Could not create party role: already exists. -partyroleservices.could_not_create_party_role_read=Could not create party role (read failure): ${errMessage}. -partyroleservices.could_not_create_party_role_write=Could not create party role (write failure): ${errMessage}. -partyroleservices.could_not_delete_party_role_read=Could not delete party role (read failure): ${errMessage}. -partyroleservices.could_not_delete_party_role_not_found=Could not delete party role (partyRole not found). -partyroleservices.could_not_delete_party_role_write=Could not delete party role (write failure): ${errMessage}. partyservices.could_not_create_party_group_generation_failure=ERROR: Could not create party group (id generation failure). partyservices.could_not_create_party_ID_digit=Cannot create party group, specified party ID cannot start with a digit, numeric IDs are reserved for auto-generated IDs. partyservices.party_type_not_found_in_database_cannot_create_party_group=The party type with ID PARTY_GROUP was not found in the database, cannot create new party group. Modified: ofbiz/trunk/applications/party/config/PartyUiLabels_es.properties URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/config/PartyUiLabels_es.properties?view=diff&rev=522474&r1=522473&r2=522474 ============================================================================== --- ofbiz/trunk/applications/party/config/PartyUiLabels_es.properties (original) +++ ofbiz/trunk/applications/party/config/PartyUiLabels_es.properties Mon Mar 26 03:31:40 2007 @@ -435,12 +435,6 @@ partyrelationshipservices.could_not_update_party_relation_not_found =No se puede actualizar las relaciones. partyrelationshipservices.could_not_update_party_relation_read =No se puede actualizar las relaciones(error de lectura): ${errMessage} partyrelationshipservices.could_not_update_party_relation_write =No se puede actualizar las relaciones(error de escritura): ${errMessage} -partyroleservices.could_not_create_party_role_exists =No se puede crear el rol: ya existe en el sistema -partyroleservices.could_not_create_party_role_read =No se puede crear el rol (error de lectura): ${errMessage}. -partyroleservices.could_not_create_party_role_write =No se puede crear el rol (error de escritura): ${errMessage}. -partyroleservices.could_not_delete_party_role_not_found=No se puede borrar el rol. -partyroleservices.could_not_delete_party_role_read =No se puede borrar el rol(error de lectura): ${errMessage}. -partyroleservices.could_not_delete_party_role_write =No se puede borrar el rol(error de escritura): ${errMessage}. partyservices.both_names_cannot_be_empty =Nombre y Apellido no pueden est\u00E1r vacios partyservices.cannot_create_affiliate_ID_already_exists =El c\u00F3digo especificado se encuentra en uso. partyservices.cannot_create_affiliate_digit =No se pudo crear afiliado, el c\u00F3digo del participante no puede empezar con un d\u00EDgito, los c\u00F3digos numericos est\u00E1n reservados para ser autogenerados. Modified: ofbiz/trunk/applications/party/config/PartyUiLabels_it.properties URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/config/PartyUiLabels_it.properties?view=diff&rev=522474&r1=522473&r2=522474 ============================================================================== --- ofbiz/trunk/applications/party/config/PartyUiLabels_it.properties (original) +++ ofbiz/trunk/applications/party/config/PartyUiLabels_it.properties Mon Mar 26 03:31:40 2007 @@ -525,12 +525,6 @@ partyrelationshipservices.could_not_update_party_relation_read=Non \u00e8 possibile aggiornare il rapporto Soggetto (lettura fallita): ${errMessage}. partyrelationshipservices.could_not_update_party_relation_not_found=Non \u00e8 possibile aggiornare rapporto Soggetto (rapporto non trovato). partyrelationshipservices.could_not_update_party_relation_write=Non \u00e8 possibile aggiornare il rapporto Soggetto (scrittura fallita): ${errMessage}. -partyroleservices.could_not_create_party_role_exists=Non \u00e8 possibile creare il ruolo Soggetto: gi esistente. -partyroleservices.could_not_create_party_role_read=Non \u00e8 possibile creare il ruolo Soggetto (lettura fallita): ${errMessage}. -partyroleservices.could_not_create_party_role_write=Non \u00e8 possibile creare il ruolo Soggetto (scrittura fallita): ${errMessage}. -partyroleservices.could_not_delete_party_role_read=Non \u00e8 possibile cancellare il ruolo Soggetto (lettura fallita): ${errMessage}. -partyroleservices.could_not_delete_party_role_not_found=Non \u00e8 possibile cancellare il ruolo Soggetto (ruolo Soggetto non trovato). -partyroleservices.could_not_delete_party_role_write=Non \u00e8 possibile cancellare il ruolo Soggetto (scrittura fallita): ${errMessage}. partyservices.could_not_create_party_group_generation_failure=ERRORE: Non \u00e8 possibile creare il gruppo Soggetto (generazione codice fallita). partyservices.could_not_create_party_ID_digit=Non \u00e8 possibile creare il gruppo Soggetto, specificato codice Soggetto non pu iniziare con un numero, codici numerici sono riservati per la generazione-autotica di codici. partyservices.party_type_not_found_in_database_cannot_create_party_group=Il tipo Soggetto con Codice PARTY_GROUP non stata trovata nel database, non possibile creare un nuovo grupop Soggetto. Modified: ofbiz/trunk/applications/party/config/PartyUiLabels_nl.properties URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/config/PartyUiLabels_nl.properties?view=diff&rev=522474&r1=522473&r2=522474 ============================================================================== --- ofbiz/trunk/applications/party/config/PartyUiLabels_nl.properties (original) +++ ofbiz/trunk/applications/party/config/PartyUiLabels_nl.properties Mon Mar 26 03:31:40 2007 @@ -523,12 +523,6 @@ partyrelationshipservices.could_not_update_party_relation_read=Could not update party relation (read failure): ${errMessage}. partyrelationshipservices.could_not_update_party_relation_not_found=Could not update party relationship (relationship not found). partyrelationshipservices.could_not_update_party_relation_write=Could not update party relationship (write failure): ${errMessage}. -partyroleservices.could_not_create_party_role_exists=Could not create party role: already exists. -partyroleservices.could_not_create_party_role_read=Could not create party role (read failure): ${errMessage}. -partyroleservices.could_not_create_party_role_write=Could not create party role (write failure): ${errMessage}. -partyroleservices.could_not_delete_party_role_read=Could not delete party role (read failure): ${errMessage}. -partyroleservices.could_not_delete_party_role_not_found=Could not delete party role (partyRole not found). -partyroleservices.could_not_delete_party_role_write=Could not delete party role (write failure): ${errMessage}. partyservices.could_not_create_party_group_generation_failure=ERROR: Could not create party group (id generation failure). partyservices.could_not_create_party_ID_digit=Cannot create party group, specified party ID cannot start with a digit, numeric IDs are reserved for auto-generated IDs. partyservices.party_type_not_found_in_database_cannot_create_party_group=The party type with ID PARTY_GROUP was not found in the database, cannot create new party group. Modified: ofbiz/trunk/applications/party/config/PartyUiLabels_zh.properties URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/config/PartyUiLabels_zh.properties?view=diff&rev=522474&r1=522473&r2=522474 ============================================================================== --- ofbiz/trunk/applications/party/config/PartyUiLabels_zh.properties (original) +++ ofbiz/trunk/applications/party/config/PartyUiLabels_zh.properties Mon Mar 26 03:31:40 2007 @@ -546,12 +546,6 @@ partyrelationshipservices.could_not_update_party_relation_read=\u65e0\u6cd5\u66f4\u65b0\u4f1a\u5458\u5173\u7cfb (\u8bfb\u9519\u8bef)\uff1a${errMessage}\u3002 partyrelationshipservices.could_not_update_party_relation_not_found=\u65e0\u6cd5\u66f4\u65b0\u4f1a\u5458\u5173\u7cfb (\u6ca1\u6709\u627e\u5230\u5173\u7cfb)\u3002 partyrelationshipservices.could_not_update_party_relation_write=\u65e0\u6cd5\u66f4\u65b0\u4f1a\u5458\u5173\u7cfb (\u5199\u9519\u8bef)\uff1a${errMessage}\u3002 -partyroleservices.could_not_create_party_role_exists=\u65e0\u6cd5\u521b\u5efa\u4f1a\u5458\u89d2\u8272\uff1a\u5df2\u7ecf\u5b58\u5728\u4e86\u3002 -partyroleservices.could_not_create_party_role_read=\u65e0\u6cd5\u521b\u5efa\u4f1a\u5458\u89d2\u8272 (\u8bfb\u5931\u8d25)\uff1a${errMessage}\u3002 -partyroleservices.could_not_create_party_role_write=\u65e0\u6cd5\u521b\u5efa\u4f1a\u5458\u89d2\u8272 (\u5199\u5931\u8d25)\uff1a${errMessage}\u3002 -partyroleservices.could_not_delete_party_role_read=\u65e0\u6cd5\u5220\u9664\u4f1a\u5458\u89d2\u8272 (\u8bfb\u5931\u8d25)\uff1a${errMessage}\u3002 -partyroleservices.could_not_delete_party_role_not_found=\u65e0\u6cd5\u5220\u9664\u4f1a\u5458\u89d2\u8272 (\u6ca1\u6709\u627e\u5230\u4f1a\u5458\u89d2\u8272)\u3002 -partyroleservices.could_not_delete_party_role_write=\u65e0\u6cd5\u5220\u9664\u4f1a\u5458\u89d2\u8272 (\u5199\u5931\u8d25): ${errMessage}\u3002 partyservices.could_not_create_party_group_generation_failure=\u9519\u8bef\uff1a\u65e0\u6cd5\u521b\u5efa\u4f1a\u5458\u7ec4 (\u751f\u6210\u6807\u8bc6\u5931\u8d25)\u3002 partyservices.could_not_create_party_ID_digit=\u65e0\u6cd5\u521b\u5efa\u4f1a\u5458\u7ec4\uff0c\u6307\u5b9a\u7684\u4f1a\u5458\u6807\u8bc6\u4e0d\u80fd\u4ee5\u6570\u5b57\u5f00\u59cb\uff0c\u6570\u5b57\u6807\u8bc6\u9884\u7559\u4e3a\u81ea\u52a8\u751f\u6210\u6807\u8bc6\u4e86\u3002 partyservices.party_type_not_found_in_database_cannot_create_party_group=\u6807\u8bc6\u4e3a PARTY_GROUP \u7684\u4f1a\u5458\u7c7b\u578b\u5728\u6570\u636e\u5e93\u91cc\u6ca1\u6709\u627e\u5230\uff0c\u65e0\u6cd5\u65b0\u5efa\u4f1a\u5458\u7ec4\u3002 Modified: ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyServices.xml?view=diff&rev=522474&r1=522473&r2=522474 ============================================================================== --- ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyServices.xml (original) +++ ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyServices.xml Mon Mar 26 03:31:40 2007 @@ -20,6 +20,32 @@ <simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/simple-methods.xsd"> + + + <!-- create PartyRole --> + <simple-method method-name="createPartyRole" short-description="Create Party Role"> + <check-permission permission="PARTYMGR" action="_CREATE"> + <fail-property resource="PartyUiLabels" property="PartyCreatePartyRolePermissionError"/> + </check-permission> + <check-errors/> + + <make-value value-name="partyRolePK" entity-name="PartyRole"/> + <set-pk-fields value-name="partyRolePK" map-name="parameters"/> + <find-by-primary-key entity-name="PartyRole" map-name="partyRolePK" value-name="partyRole"/> + <if-empty field-name="partyRole"> + <make-value entity-name="PartyRole" map-name="partyRolePK" value-name="partyRole"/> + <create-value value-name="partyRole"/> + </if-empty> + <check-errors/> + </simple-method> + + <simple-method method-name="deletePartyRole" short-description="Delete a PartyRole"> + <check-permission permission="PARTYMGR" action="_DELETE"><fail-property resource="PartyUiLabels" property="PartyDeletePartyRolePermissionError"/></check-permission> + <check-errors/> + <entity-one entity-name="PartyRole" value-name="partyRole"/> + <remove-value value-name="partyRole"/> + </simple-method> + <simple-method method-name="savePartyNameChange" short-description="Save Party Name Change"> <!-- for special case in ecommerce, if no partyId is passed in use userLogin.partyId --> Modified: ofbiz/trunk/applications/party/servicedef/services.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/servicedef/services.xml?view=diff&rev=522474&r1=522473&r2=522474 ============================================================================== --- ofbiz/trunk/applications/party/servicedef/services.xml (original) +++ ofbiz/trunk/applications/party/servicedef/services.xml Mon Mar 26 03:31:40 2007 @@ -211,16 +211,16 @@ </service> <!-- Party Role services --> - <service name="createPartyRole" engine="java" - location="org.ofbiz.party.party.PartyRoleServices" invoke="createPartyRole" auth="true"> - <description>Create a Party Role (add a Role to a Party). The logged in user must have PARTYMGR_ROLE_CREATE or have + <service name="createPartyRole" engine="simple" + location="org/ofbiz/party/party/PartyServices.xml" invoke="createPartyRole" auth="true"> + <description>Create a Party Role (add a Role to a Party). The logged in user must have PARTYMGR_CREATE or have permission to change the role of this partyId</description> <attribute name="partyId" type="String" mode="IN" optional="true"/> <attribute name="roleTypeId" type="String" mode="IN" optional="false"/> </service> - <service name="deletePartyRole" engine="java" - location="org.ofbiz.party.party.PartyRoleServices" invoke="deletePartyRole" auth="true"> - <description>Delete a Party Role (remove a Role from a Party). The logged in user must have PARTYMGR_ROLE_DELETE or have + <service name="deletePartyRole" engine="simple" + location="org/ofbiz/party/party/PartyServices.xml" invoke="deletePartyRole" auth="true"> + <description>Delete a Party Role (remove a Role from a Party). The logged in user must have PARTYMGR_DELETE or have permission to change the role of this partyId</description> <attribute name="partyId" type="String" mode="IN" optional="true"/> <attribute name="roleTypeId" type="String" mode="IN" optional="false"/> |
Free forum by Nabble | Edit this page |