Commit 6d8ddf52 authored by holivier's avatar holivier
Browse files

initial commit, all files coming from example plugin branch vueJsPortal

parents
Pipeline #23 failed with stages
.svn
/.settings/
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>exampleFjs</name>
<comment>Project example to use with vueJsPortal and example.</comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
</natures>
</projectDescription>
/*
* 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.
*/
dependencies {
pluginLibsCompile 'org.apache.tomcat.embed:tomcat-embed-websocket:9.0.19'
}
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-properties.xsd">
<property key="ExampleStatusHistory">
<value xml:lang="en">Status History</value>
<value xml:lang="fr">Historique statut</value>
</property>
</resource>
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<entity-engine-xml>
<ExampleItem exampleId="EX03" exampleItemSeqId="00001" description="EX3-001" amount="50"/>
<ExampleItem exampleId="EX03" exampleItemSeqId="00002" description="EX3-002" amount="25"/>
<ExampleItem exampleId="EX04" exampleItemSeqId="00001" description="EX4-001" amount="10"/>
<ExampleItem exampleId="EX13" exampleItemSeqId="00001" description="EX13-001" amount="41"/>
<ExampleItem exampleId="EX14" exampleItemSeqId="00001" description="EX14-001" amount="20"/>
<ExampleItem exampleId="EX12" exampleItemSeqId="00001" description="EX12-001" amount="30"/>
<create-update>
<!-- re-add EX09 because <delete declare just before works the second time this file is process (not the first) so it's not very
simple for Selenium Webdriver test to manage demo not always the same-->
<Example exampleId="EX09" exampleName="Example 9" exampleTypeId="MADE_UP" statusId="EXST_IN_DESIGN"/>
</create-update>
<Example exampleId="EX15" exampleName="Example 15" exampleTypeId="INSPIRED" statusId="EXST_IN_DESIGN"/>
<Example exampleId="EX16" exampleName="Example 16" exampleTypeId="INSPIRED" statusId="EXST_IN_DESIGN"/>
<Example exampleId="EX17" exampleName="Example 17" exampleTypeId="INSPIRED" statusId="EXST_IN_DESIGN"/>
<Example exampleId="EX18" exampleName="Example 18" exampleTypeId="INSPIRED" statusId="EXST_IN_DESIGN"/>
<Example exampleId="EX19" exampleName="Example 19" exampleTypeId="INSPIRED" statusId="EXST_IN_DESIGN"/>
<Example exampleId="EX20" exampleName="Example 20" exampleTypeId="INSPIRED" statusId="EXST_IN_DESIGN"/>
<Example exampleId="EX21" exampleName="Example 21" exampleTypeId="INSPIRED" statusId="EXST_IN_DESIGN"/>
<Example exampleId="EX22" exampleName="Example 22" exampleTypeId="INSPIRED" statusId="EXST_IN_DESIGN"/>
<Example exampleId="EX23" exampleName="Example 23" exampleTypeId="INSPIRED" statusId="EXST_IN_DESIGN"/>
<Example exampleId="EX24" exampleName="Example 24" exampleTypeId="INSPIRED" statusId="EXST_IN_DESIGN"/>
<Example exampleId="EX25" exampleName="Example 25" exampleTypeId="INSPIRED" statusId="EXST_IN_DESIGN"/>
<Example exampleId="EX26" exampleName="Example 26" exampleTypeId="INSPIRED" statusId="EXST_IN_DESIGN"/>
<Example exampleId="EX27" exampleName="Example 27" exampleTypeId="INSPIRED" statusId="EXST_IN_DESIGN"/>
<Example exampleId="EX28" exampleName="Example 28" exampleTypeId="INSPIRED" statusId="EXST_IN_DESIGN"/>
<Example exampleId="EX29" exampleName="Example 29" exampleTypeId="INSPIRED" statusId="EXST_IN_DESIGN"/>
<Example exampleId="EX30" exampleName="Example 30" exampleTypeId="INSPIRED" statusId="EXST_IN_DESIGN"/>
<Example exampleId="EX31" exampleName="Example 31" exampleTypeId="INSPIRED" statusId="EXST_IN_DESIGN"/>
<Example exampleId="EX32" exampleName="Example 32" exampleTypeId="INSPIRED" statusId="EXST_IN_DESIGN"/>
<Example exampleId="EX33" exampleName="Example 33" exampleTypeId="INSPIRED" statusId="EXST_IN_DESIGN"/>
<Example exampleId="EX34" exampleName="Example 34" exampleTypeId="INSPIRED" statusId="EXST_IN_DESIGN"/>
<Example exampleId="EX35" exampleName="Example 35" exampleTypeId="INSPIRED" statusId="EXST_IN_DESIGN" description="test2 description 2iem test"/>
<ExampleFeature exampleFeatureId="BEA" description="beautiful design"/>
<ExampleFeature exampleFeatureId="CHEAP" description="Cheaper"/>
<ExampleFeature exampleFeatureId="COL" description="Colleague"/>
<ExampleFeature exampleFeatureId="BOSS" description="The Boss"/>
</entity-engine-xml>
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<entity-engine-xml>
<PortalPage portalPageId="ExampleMgmtFrontJs" sequenceNum="100" parentPortalPageId="ExampleMgmtFrontJs" portalPageName="Examples management (MgmtPageFrontJs)" description="Search, list, details area" ownerUserLoginId="_NA_"/>
<PortalPageColumn portalPageId="ExampleMgmtFrontJs" columnSeqId="00001" columnWidthPercentage="25"/>
<PortalPagePortlet portalPageId="ExampleMgmtFrontJs" portalPortletId="FindExamples" portletSeqId="00001" columnSeqId="00001" sequenceNum="10"/>
<PortalPagePortlet portalPageId="ExampleMgmtFrontJs" portalPortletId="ExampleDetailsMenu" portletSeqId="00001" columnSeqId="00001" sequenceNum="20" watcherName="showExample"/>
<PortalPageColumn portalPageId="ExampleMgmtFrontJs" columnSeqId="00002" />
<PortalPagePortlet portalPageId="ExampleMgmtFrontJs" portalPortletId="ListExamples" portletSeqId="00001" columnSeqId="00002" sequenceNum="10" watcherName="listExample"/>
<PortalPagePortlet portalPageId="ExampleMgmtFrontJs" portalPortletId="ExampleDetail" portletSeqId="00001" columnSeqId="00002" sequenceNum="20" watcherName="showExample"/>
<PortalPage portalPageId="ExampleRecapJs" sequenceNum="200" parentPortalPageId="ExampleMgmtFrontJs" portalPageName="One example (RecapPageFrontJs)" description="Example on One Page" ownerUserLoginId="_NA_"/>
<PortalPageColumn portalPageId="ExampleRecapJs" columnSeqId="00001" columnWidthPercentage="30"/>
<PortalPagePortlet portalPageId="ExampleRecapJs" portalPortletId="SelectExample" portletSeqId="00001" columnSeqId="00001" sequenceNum="10"/>
<PortalPageColumn portalPageId="ExampleRecapJs" columnSeqId="00002" />
<PortalPagePortlet portalPageId="ExampleRecapJs" portalPortletId="ShowExample" portletSeqId="00001" columnSeqId="00002" sequenceNum="10" watcherName="selectExample"/>
<PortalPagePortlet portalPageId="ExampleRecapJs" portalPortletId="ExampleItems" portletSeqId="00001" columnSeqId="00002" sequenceNum="20" watcherName="selectExample"/>
<PortalPagePortlet portalPageId="ExampleRecapJs" portalPortletId="ExampleStatus" portletSeqId="00001" columnSeqId="00002" sequenceNum="30" watcherName="selectExample, exampleStatus"/>
<PortalPagePortlet portalPageId="ExampleRecapJs" portalPortletId="ExampleFeatureAppls" portletSeqId="00001" columnSeqId="00002" sequenceNum="40" watcherName="selectExample"/>
<!-- from addons portlet widget Copied pas encore revu -->
<create-replace>
<PortalPage portalPageId="IconsList" sequenceNum="400" parentPortalPageId="EXAMPLE" portalPageName="List all icons available" description="List all icons available" ownerUserLoginId="_NA_" helpTargetId="PORTLET_IconsList"/>
<PortalPageColumn portalPageId="IconsList" columnSeqId="00001"/>
<PortalPagePortlet portalPageId="IconsList" portalPortletId="IconsList" portletSeqId="00001" columnSeqId="00001" sequenceNum="1"/>
<!--#Eam# portlet-widget icons-purpose -->
<!--#Bam# portlet-widget portletExample -->
<!--
<PortalPage portalPageId="ExampleMgmt" sequenceNum="200" parentPortalPageId="" portalPageName="Example management" description="Search, list, navigation menu, edit area" ownerUserLoginId="_NA_"/>
<PortalPageColumn portalPageId="ExampleMgmt" columnSeqId="00001" columnWidthPercentage="25"/>
<PortalPagePortlet portalPageId="ExampleMgmt" portalPortletId="FindExamples" portletSeqId="00001" columnSeqId="00001" sequenceNum="1"/>
<PortalPagePortlet portalPageId="ExampleMgmt" portalPortletId="ExampleDetailsMenu" portletSeqId="00001" columnSeqId="00001" sequenceNum="10" watcherName="showExample"/>
<PortalPageColumn portalPageId="ExampleMgmt" columnSeqId="00002"/>
<PortalPagePortlet portalPageId="ExampleMgmt" portalPortletId="ListExamples" portletSeqId="00001" columnSeqId="00002" sequenceNum="20" watcherName="listExample"/>
<PortalPagePortlet portalPageId="ExampleMgmt" portalPortletId="ExampleDetail" portletSeqId="00001" columnSeqId="00002" sequenceNum="30" watcherName="showExample"/>
<PortletAttribute portalPageId="ExampleMgmt" portalPortletId="ExampleStatus" attrName="helpAvailable" attrValue="N" portletSeqId="00001"/>
<PortletAttribute portalPageId="ExampleMgmt" portalPortletId="ExampleFeatureAppls" attrName="helpName" attrValue="WEBHELP_FILES" portletSeqId="00001"/>
<PortalPage portalPageId="ExampleRecap" sequenceNum="250" parentPortalPageId="ExampleMgmt" portalPageName="Example summary" description="Select, summary, view on major relations" ownerUserLoginId="_NA_"/>
<PortalPageColumn portalPageId="ExampleRecap" columnSeqId="00002" columnWidthPercentage="25"/>
<PortalPagePortlet portalPageId="ExampleRecap" portalPortletId="SelectExample" portletSeqId="00001" columnSeqId="00002" sequenceNum="1"/>
<PortalPagePortlet portalPageId="ExampleRecap" portalPortletId="ExampleStatus" portletSeqId="00001" columnSeqId="00002" sequenceNum="5"/>
<PortalPageColumn portalPageId="ExampleRecap" columnSeqId="00003"/>
<PortalPagePortlet portalPageId="ExampleRecap" portalPortletId="ShowExample" portletSeqId="00001" columnSeqId="00003" sequenceNum="20"/>
<PortalPagePortlet portalPageId="ExampleRecap" portalPortletId="ExampleItems" portletSeqId="00001" columnSeqId="00003" sequenceNum="30"/>
<PortalPagePortlet portalPageId="ExampleRecap" portalPortletId="ExampleFeatureAppls" portletSeqId="00001" columnSeqId="00003" sequenceNum="35"/>
-->
<!-- <PortalPage portalPageId="ExampleNew" sequenceNum="300" parentPortalPageId="ExampleMgmt" portalPageName="Create a new Example" description="Create an Example and for some détails" ownerUserLoginId="_NA_"/> -->
<!-- <PortalPageColumn portalPageId="ExampleNew" columnSeqId="00001" columnWidthPercentage="25"/> -->
<!-- <PortalPagePortlet portalPageId="ExampleNew" portalPortletId="FindExamples" portletSeqId="00001" columnSeqId="00001" sequenceNum="1"/>TODO: search has to return on ExampleMgmt page, need to find a fix -->
<!-- TODO: search has to return on ExampleMgmt page, need to find a fix -->
<!-- <PortletAttribute portalPageId="ExampleNew" portalPortletId="FindExamples" attrName="initiallyCollapsed" attrValue="true" portletSeqId="00001"/> -->
<!-- <PortalPageColumn portalPageId="ExampleNew" columnSeqId="00002"/> -->
<!-- <PortalPagePortlet portalPageId="ExampleNew" portalPortletId="CreateExample" portletSeqId="00001" columnSeqId="00002" sequenceNum="20"/> -->
<!-- <PortalPagePortlet portalPageId="ExampleNew" portalPortletId="ExampleItems" portletSeqId="00001" columnSeqId="00002" sequenceNum="30"/> -->
<!-- <PortalPage portalPageId="ExampleFeatureNew" sequenceNum="305" parentPortalPageId="ExampleMgmt" portalPageName="Create a new ExampleFeature" description="Create an ExampleFeature and some details" ownerUserLoginId="_NA_"/> -->
<!-- <PortalPageColumn portalPageId="ExampleFeatureNew" columnSeqId="00001" columnWidthPercentage="25"/> -->
<!-- <PortalPagePortlet portalPageId="ExampleFeatureNew" portalPortletId="FindExampleFeature" portletSeqId="00001" columnSeqId="00001" sequenceNum="1"/> -->
<!-- <PortalPageColumn portalPageId="ExampleFeatureNew" columnSeqId="00002"/> -->
<!-- <PortalPagePortlet portalPageId="ExampleFeatureNew" portalPortletId="ListExampleFeature" portletSeqId="00001" columnSeqId="00002" sequenceNum="20"/> -->
<!-- demonstrate how to use portal security -->
<!-- <PortalPage portalPageId="POCPortalSecurity" sequenceNum="320" parentPortalPageId="ExampleMgmt" portalPageName="POC Portal Security" securityGroupId="" description="demonstrate how to use portal security" ownerUserLoginId="_NA_" servicePermission="PortalPermissionPoc"/> -->
<!-- <PortalPageColumn portalPageId="POCPortalSecurity" columnSeqId="00001" columnWidthPercentage="50"/> -->
<!-- <PortalPagePortlet portalPageId="POCPortalSecurity" portalPortletId="POCPortalScrtyHidden" portletSeqId="00001" columnSeqId="00001" sequenceNum="1"/> -->
<!-- <PortalPagePortlet portalPageId="POCPortalSecurity" portalPortletId="POCPortalSecurity" portletSeqId="00001" columnSeqId="00001" sequenceNum="2"/> -->
<!-- <PortalPageColumn portalPageId="POCPortalSecurity" columnSeqId="00002" columnWidthPercentage="50"/> -->
<!-- <PortalPagePortlet portalPageId="POCPortalSecurity" portalPortletId="POCPortalSecurityDet" portletSeqId="00001" columnSeqId="00002" sequenceNum="2"/> -->
</create-replace>
</entity-engine-xml>
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<entity-engine-xml>
<create-replace>
<PortalPortlet portalPortletId="IconsList" portletName="List all icons usable in portlet with iconsPurpose and IconsTooltips_"
description="List all icons usable in portlet with iconsPurpose and IconsTooltips_"
portletTypeId="Screenlet" component="example" subComponent="Example" webapp="example"
uiLabelLocation="component://example/widget/CommonScreens.xml"/>
<PortletCategory portletCategoryId="EX_PORTLET_FRONTJS" description="Example Portlet(s) using FrontIs"/>
<PortletPortletCategory portalPortletId="IconsList" portletCategoryId="EX_PORTLET_FRONTJS"/>
<PortalPortlet portalPortletId="FindExamples"
portletName="Find Examples (FrontJs)" description="portlet to define search criteria for Examples list"
editFormName="EditParam_FindExamples" editFormLocation="component://examplefjs/widget/ExampleForms.xml"
screenName="FindExample" screenLocation="component://examplefjs/widget/ExamplePortletScreens.xml"/>
<PortalPortlet portalPortletId="ListExamples"
portletName="List Examples (FrontJs)" description="portlet to list example depending on search criteria, this portlet is update after FindExamples submit"
editFormName="EditParam_ListExamples" editFormLocation="component://examplefjs/widget/ExampleForms.xml"
screenName="ListExample" screenLocation="component://examplefjs/widget/ExamplePortletScreens.xml"/>
<PortalPortlet portalPortletId="SelectExample"
portletName="Select one Example (FrontJs)" description="portlet to select one Example for the current portal page"
portletTypeId="Screenlet" component="example" subComponent="Example" helpName="HELP_Screenlet"
screenName="SelectExample" screenLocation="component://examplefjs/widget/ExamplePortletScreens.xml"/>
<!-- When portlet have a parameters (look EditParam_ListExample), it's possible to define a default value portalPageId="_NA_" and portletSeqId="00000"-->
<PortletAttribute portalPageId="_NA_" portalPortletId="ListExamples" attrName="showType" attrValue="Y" portletSeqId="00000"/>
<PortalPortlet portalPortletId="ExampleDetailsMenu"
portletName="Example summary and details menu (for FrontJs and showPortlet)" description="Example summary and menu to see all details portlet in the ExampleDetail contener"
screenName="ExampleDetailsMenu" screenLocation="component://examplefjs/widget/ExamplePortletScreens.xml"/>
<PortalPortlet portalPortletId="ShowExample"
portletName="Display Example (all fields) (for FrontJs and showPortlet)" description="Same as Edit but with only display field, if necessary could show some informations coming from link entities"
screenName="ShowExample" screenLocation="component://examplefjs/widget/ExamplePortletScreens.xml"/>
<!-- Empty area for portlet injected by DetailMenu -->
<PortalPortlet portalPortletId="ExampleDetail"
portletName="Container to show Example portlet detail (for FrontJs and showPortlet)"
description="Use this portlet to say where detail portlet call from a menu will be show"
screenName="ExampleDetail" screenLocation="component://examplefjs/widget/ExamplePortletScreens.xml"/>
<PortletPortletCategory portalPortletId="FindExamples" portletCategoryId="EX_PORTLET_FRONTJS"/>
<PortletPortletCategory portalPortletId="SelectExample" portletCategoryId="EX_PORTLET_FRONTJS"/>
<PortletPortletCategory portalPortletId="ListExamples" portletCategoryId="EX_PORTLET_FRONTJS"/>
<PortletPortletCategory portalPortletId="ExampleDetailsMenu" portletCategoryId="EX_PORTLET_FRONTJS"/>
<PortletPortletCategory portalPortletId="ShowExample" portletCategoryId="EX_PORTLET_FRONTJS"/>
<PortletPortletCategory portalPortletId="ExampleDetail" portletCategoryId="EX_PORTLET_FRONTJS"/>
<PortalPortlet portalPortletId="ExampleItems"
portletName="List and manage exampleItems" description="List all exampleItems for one example, subportlet simple (for FrontJs and showPortlet)"
editFormName="GenericEditEditOrShowParam" editFormLocation="component://common/widget/PortletEditForms.xml"
screenName="ExampleItems" screenLocation="component://examplefjs/widget/ExamplePortletScreens.xml"/>
<PortalPortlet portalPortletId="ExampleStatus"
portletName="List ExampleStatus" description="List all ExampleStatus for one example (FrontJs)"
screenName="ExampleStatus" screenLocation="component://examplefjs/widget/ExamplePortletScreens.xml"
editFormName="GenericEditEditOrShowParam" editFormLocation="component://common/widget/PortletEditForms.xml"/>
<PortalPortlet portalPortletId="ExampleFeatureAppls"
portletName="List and manage ExampleFeatureAppls" description="List all ExampleFeatureAppls for one example, subportlet simple (FrontJs)"
screenName="ExampleFeatureAppls" screenLocation="component://examplefjs/widget/ExamplePortletScreens.xml"
editFormName="GenericEditEditOrShowParam" editFormLocation="component://common/widget/PortletEditForms.xml"/>
<PortletPortletCategory portalPortletId="ExampleItems" portletCategoryId="EX_PORTLET_FRONTJS"/>
<PortletPortletCategory portalPortletId="ExampleStatus" portletCategoryId="EX_PORTLET_FRONTJS"/>
<PortletPortletCategory portalPortletId="ExampleFeatureAppls" portletCategoryId="EX_PORTLET_FRONTJS"/>
<!-- Use directly a form (no screen for default value, only form, see ShowPortalPortlet view) -->
<!-- <PortalPortlet portalPortletId="FindExampleFeature" -->
<!-- portletName="Find ExampleFeature (with portletType and showPortlet)" description="portlet to define search criteria for ExampleFeature list" -->
<!-- portletTypeId="Screenlet" component="example" subComponent="ExampleFeature" helpName="HELP_Screenlet"/> -->
<!-- Use directly a form (no screen for default value, only form, see ShowPortalPortlet view) -->
<!-- <PortalPortlet portalPortletId="ListExampleFeature" -->
<!-- portletName="List ExampleFeatures (with portletType and showPortlet)" description="portlet to list example features depending on search criteria" -->
<!-- portletTypeId="ScreenletList" component="example" subComponent="ExampleFeature" -->
<!-- useMenu="Y" helpName="HELP_ScreenletList"/> -->
<!-- <PortletPortletCategory portalPortletId="FindExampleFeature" portletCategoryId="EX_PORTLET_FRONTJS"/> -->
<!-- <PortletPortletCategory portalPortletId="ListExampleFeature" portletCategoryId="EX_PORTLET_FRONTJS"/> -->
<!-- <PortalPortlet portalPortletId="POCPortalSecurity" -->
<!-- portletName="Proof of cpncept on portal security " description="Shows how to use security on portals page and portlet" -->
<!-- portletTypeId="Screenlet" component="example" subComponent="Example" -->
<!-- editFormName="POCPortalSecurityEdit" editFormLocation="component://common/widget/PortletEditForms.xml" -->
<!-- useScript="Y"/> -->
<!-- <PortletPortletCategory portalPortletId="POCPortalSecurity" portletCategoryId="EX_PORTLET_FRONTJS"/> -->
<!-- <PortalPortlet portalPortletId="POCPortalSecurityDet" -->
<!-- portletName="Container to test portal security with portletrefresh call" description="Container to test portal security with portletrefresh call" -->
<!-- portletTypeId="Empty" component="example" subComponent="Example"/> -->
<!-- <PortletPortletCategory portalPortletId="POCPortalSecurityDet" portletCategoryId="EX_PORTLET_FRONTJS"/> -->
<!-- <PortalPortlet portalPortletId="POCPortalScrtyHidden" -->
<!-- portletName="Inivisible portlet" description="This portlet is suppoed to be inivisible due to PortalPermissionPoc service that send hasPemission=false" -->
<!-- portletTypeId="Screenlet" component="example" subComponent="Example"/> -->
<!-- <PortletPortletCategory portalPortletId="POCPortalScrtyHidden" portletCategoryId="EX_PORTLET_FRONTJS"/> -->
</create-replace>
</entity-engine-xml>
#####################################################################
# 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.
#####################################################################
Place all DTDs / schemas which need to be included on the classpath here.
All files located in this directory will be placed in the root of the built jar.
#####################################################################
# 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.
#####################################################################
Entity model, Entity ECA, and Entity group definitions.
Usually in the format of:
entitymodel.xml
entitygroup.xml
eecas.xml
// Currently not used, only for memory purpose, waiting exampleFjs finished (and its UI test associated)
// Example de service en mnilang ou groovy dans un objectif de formation
/*
* 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.
*/
import org.apache.ofbiz.base.util.UtilProperties
import org.apache.ofbiz.entity.condition.EntityCondition
import org.apache.ofbiz.entity.condition.EntityOperator
import groovy.util.logging.Log
def createExample() {
resultMap = [:]
String statusId = parameters.statusId ?: parameters.statusId
String exampleTypeId = parameters.exampleTypeId ?: parameters.exampleTypeId
argListName = []
def messageList
successMessageList = []
errorMessageList = []
if("EXST_COMPLETE".equals(statusId)) {
statusItem = from("StatusItem").where("statusId", statusId).queryOne()
argListName << statusItem.description
argListName << statusItem.statusCode
messageList = UtilProperties.getMessage("ExampleUiLabels","ExampleMessageExampleStatusIs", argListName, locale)
resultMap.successMessageList = messageList
}
exampleTypeId = null
if(!exampleTypeId) {
String errorMessage = UtilProperties.getMessage("ExampleUiLabels","ExampleMessageExampleTypeCannotBeEmpty", locale)
logError(errorMessage)
if(!messageList) {
resultMap.errorMessage= errorMessage
} else {
errorMessageList << errorMessage
resultMap.errorMessageList = errorMessageList
}
//parameters.description = null
parameters.description = "testeeff"
if(!parameters.description) {
String responseMessage = "fail"
resultMap.errorMessage = responseMessage
exampleTypeId = "INSPIRED"
}
else {
errorMessageList << errorMessage
resultMap.errorMessageList = errorMessageList
}
}
if("EXST_APPROVED".equals(statusId)) {
String successMessage = UtilProperties.getMessage("ExampleUiLabels","ExampleMessageCreateExampleIsSuccess", locale)
resultMap.successMessage = successMessage
} else {
if(messageList) {
successMessageList << UtilProperties.getMessage("ExampleUiLabels","ExampleMessageCreateExampleIsSuccess", locale)
successMessageList << messageList
resultMap.successMessageList = successMessageList
}
}
result = success()
newEntity = makeValue("Example", parameters)
newEntity.exampleId = delegator.getNextSeqId("Example")
newEntity.create()
resultMap.exampleId = newEntity.exampleId
return resultMap
}
def deleteExample() {
resultMap = [:]
String exampleId = parameters.exampleId ?: parameters.exampleId
successMessageList = []
errorMessageList = []
exampleDelete = from("Example").where("exampleId", exampleId).queryOne()
exampleStatusDelete = delegator.removeByCondition("ExampleStatus", EntityCondition.makeCondition("exampleId", EntityOperator.EQUALS, exampleId))
exampleItems = from("ExampleItem").where("exampleId", exampleId).queryList()
if(!exampleItems) {
exampleDelete.remove()
String msgSucces = UtilProperties.getMessage("ExampleUiLabels","ExampleDeleteSuccess", locale)
successMessageList << msgSucces
resultMap.successMessageList = successMessageList
} else {
String msgError = UtilProperties.getMessage("ExampleUiLabels","ExampleDeleteFailed", locale)
errorMessageList << msgError
resultMap.errorMessageList = errorMessageList
}
return resultMap
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<!-- Example de service en mnilang ou groovy dans un objectif de formation -->
<simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://ofbiz.apache.org/Simple-Method" xsi:schemaLocation="http://ofbiz.apache.org/Simple-Method http://ofbiz.apache.org/dtds/simple-methods.xsd">
<!-- Example methods to test all return Message -->
<simple-method method-name="createExample" short-description="create a Example and return message">
<!-- Example of Message management -->
<if-compare operator="equals" value="EXST_COMPLETE" field="parameters.statusId">
<!-- prepare a message for success or error message List -->
<entity-one value-field="statusItem" entity-name="StatusItem" use-cache="true">
<field-map field-name="statusId" from-field="parameters.statusId"/>
</entity-one>
<set field="argListName[]" from-field="statusItem.description"/>
<property-to-field resource="ExampleUiLabels" property="ExampleMessageExampleStatusIs" field="messageList" arg-list-name="argListName"/>
</if-compare>
<!-- Now test if Error message -->
<if-empty field="parameters.exampleTypeId">
<!-- Error message -->
<property-to-field resource="ExampleUiLabels" property="ExampleMessageExampleTypeCannotBeEmpty" field="errorMessage"/>
<if-empty field="messageList">
<field-to-result field="errorMessage"/>
<else>
<set field="errorMessageList[]" from-field="errorMessage"/> <!--it's not necessary to put it because errorMessage will be print too -->
<set field="errorMessageList[]" from-field="messageList"/>
<field-to-result field="errorMessageList"/>
</else>
</if-empty>
<if-empty field="parameters.description">
<!-- if there is a success message or messageList put fail, not success. It's should be used if you want to store some entity (so no rollback) -->
<!-- but you want to give a fail(or Warning) message to user -->
<!-- Currently not specifics look for fail, only error or success -->
<set field="responseMessage" value="fail"/>
<field-to-result field="responseMessage"/>
<log level="info" message="fail message"/>
<set field="parameters.exampleTypeId" value="INSPIRED"/>
<else>
<return response-code="error"/>
</else>
</if-empty>
</if-empty>
<!-- Start of Success Message example -->
<if-compare operator="equals" value="EXST_APPROVED" field="parameters.statusId">
<!-- return a success message -->
<property-to-field resource="ExampleUiLabels" property="ExampleMessageCreateExampleIsSuccess" field="successMessage"/>
<field-to-result field="successMessage"/>
<else>
<if-not-empty field="messageList">
<property-to-field resource="ExampleUiLabels" property="ExampleMessageCreateExampleIsSuccess" field="successMessageList[]"/>
<set field="successMessageList[]" from-field="messageList"/>
<field-to-result field="successMessageList"/>
</if-not-empty>
</else>
</if-compare>
<!-- Now create value -->
<make-value entity-name="Example" value-field="newEntity"/>
<sequenced-id sequence-name="Example" field="exampleId"/>
<log level="info" message="newEntity1=${newEntity}"/>
<set field="newEntity.exampleId" from-field="exampleId"/>
<set-nonpk-fields map="parameters" value-field="newEntity"/>
<log level="info" message="newEntity2=${newEntity}"/>
<create-value value-field="newEntity"/>
<log level="info" message="newEntity3=${newEntity}"/>
<field-to-result field="exampleId"/>
</simple-method>