19 |
20 |
21 |
--------------------------------------------------------------------------------
/axelor-studio/src/main/resources/domains/StudioTemplate.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/axelor-tool/src/main/java/com/qas/web_2005_02/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Axelor Business Solutions
3 | *
4 | * Copyright (C) 2018 Axelor ().
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License, version 3,
8 | * as published by the Free Software Foundation.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see .
17 | */
18 | @javax.xml.bind.annotation.XmlSchema(namespace = "http://www.qas.com/web-2005-02", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
19 | package com.qas.web_2005_02;
20 |
--------------------------------------------------------------------------------
/axelor-studio/src/main/resources/views/ViewPanel.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
22 |
23 |
--------------------------------------------------------------------------------
/axelor-admin/src/main/resources/domains/PermissionAssistant.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/axelor-tool/src/main/java/com/axelor/apps/tool/service/CipherService.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Axelor Business Solutions
3 | *
4 | * Copyright (C) 2018 Axelor ().
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License, version 3,
8 | * as published by the Free Software Foundation.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see .
17 | */
18 | package com.axelor.apps.tool.service;
19 |
20 | public interface CipherService {
21 |
22 | public String encrypt(String unencryptedString);
23 |
24 | public String decrypt(String encryptedString);
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/axelor-studio/src/main/resources/domains/DataManager.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/axelor-studio/src/main/resources/views/WkfTrackingTime.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/axelor-studio/src/main/resources/domains/RecordImportWizard.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/axelor-studio/src/main/java/com/axelor/studio/service/data/exporter/DataWriter.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Axelor Business Solutions
3 | *
4 | * Copyright (C) 2018 Axelor ().
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License, version 3,
8 | * as published by the Free Software Foundation.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see .
17 | */
18 | package com.axelor.studio.service.data.exporter;
19 |
20 | import com.axelor.meta.db.MetaFile;
21 |
22 | public interface DataWriter {
23 |
24 | void initialize();
25 |
26 | void write(String key, Integer index, String[] values);
27 |
28 | MetaFile export(MetaFile input);
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/axelor-studio/src/main/java/com/axelor/studio/service/data/importer/DataReader.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Axelor Business Solutions
3 | *
4 | * Copyright (C) 2018 Axelor ().
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License, version 3,
8 | * as published by the Free Software Foundation.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see .
17 | */
18 | package com.axelor.studio.service.data.importer;
19 |
20 | import com.axelor.meta.db.MetaFile;
21 |
22 | public interface DataReader {
23 |
24 | boolean initialize(MetaFile input);
25 |
26 | String[] read(String key, int index);
27 |
28 | int getTotalLines(String key);
29 |
30 | String[] getKeys();
31 | }
32 |
--------------------------------------------------------------------------------
/axelor-studio/src/main/resources/views/WkfTrackingLine.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/axelor-studio/src/main/resources/views/DashboardBuilder.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/axelor-tool/src/main/java/com/axelor/apps/tool/module/ToolModule.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Axelor Business Solutions
3 | *
4 | * Copyright (C) 2018 Axelor ().
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License, version 3,
8 | * as published by the Free Software Foundation.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see .
17 | */
18 | package com.axelor.apps.tool.module;
19 |
20 | import com.axelor.app.AxelorModule;
21 | import com.axelor.apps.tool.service.CipherService;
22 | import com.axelor.apps.tool.service.CipherServiceImpl;
23 |
24 | public class ToolModule extends AxelorModule {
25 |
26 | @Override
27 | protected void configure() {
28 | bind(CipherService.class).to(CipherServiceImpl.class);
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/axelor-tool/src/main/java/com/axelor/apps/tool/EmailTool.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Axelor Business Solutions
3 | *
4 | * Copyright (C) 2018 Axelor ().
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License, version 3,
8 | * as published by the Free Software Foundation.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see .
17 | */
18 | package com.axelor.apps.tool;
19 |
20 | import java.util.regex.Pattern;
21 |
22 | public class EmailTool {
23 | public static boolean isValidEmailAddress(String email) {
24 | final String EMAIL_PATTERN = "[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})";
25 | Pattern pattern = Pattern.compile(EMAIL_PATTERN);
26 | return pattern.matcher(email).matches();
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/axelor-admin/src/main/resources/i18n/messages_fr.csv:
--------------------------------------------------------------------------------
1 | "key","message","comment","context"
2 | "Bad header row:","Ligne d'en-tête incorrecte",,
3 | "Bad import file","Fichier d'import incorrect",,
4 | "Create","Créer",,
5 | "Create file","Créer fichier",,
6 | "Delete","Supprimer",,
7 | "Details","Détails",,
8 | "Error in import. Please check log",,,
9 | "Error in import: %s. Please check the server log",,,
10 | "Export",,,
11 | "Export for doc",,,
12 | "File","Fichier",,
13 | "Group Menu Assistant","Assistant gestion des menus par groupes",,
14 | "Groups","Groupes",,
15 | "Groups not found: %s","Groupe(s) inconnu(s) : %s",,
16 | "Hide If","Cacher si",,
17 | "Import","Importer",,
18 | "Import completed succesfully",,,
19 | "Import date","Date d'import",,
20 | "Import permissions","Importer les permissions",,
21 | "Language","Langue",,
22 | "Log",,,
23 | "Menu not found: %s","Menu(s) inconnu(s) : %s",,
24 | "Menus",,,
25 | "Name",,,
26 | "No header row found","Aucune ligne d'en-tête reconnue",,
27 | "Object not found: %s","Object(s) inconnu(s) : %s",,
28 | "Objects",,,
29 | "Permission Assistant","Assistant gestion des permissions",,
30 | "Read","Lecture",,
31 | "Readonly If","Lecture seule si",,
32 | "Title","Titre",,
33 | "Write","Ecriture",,
34 |
--------------------------------------------------------------------------------
/axelor-studio/src/test/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | log4j.rootLogger=error, stdout
2 |
3 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender
4 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
5 |
6 | # Print the date in ISO 8601 format
7 | log4j.appender.stdout.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
8 |
9 | log4j.appender.R=org.apache.log4j.RollingFileAppender
10 | log4j.appender.R.File=application.log
11 |
12 | log4j.appender.R.MaxFileSize=100KB
13 | # Keep one backup file
14 | log4j.appender.R.MaxBackupIndex=1
15 |
16 | log4j.appender.R.layout=org.apache.log4j.PatternLayout
17 | log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
18 |
19 | # Axelor logging
20 |
21 | # Log everything
22 | log4j.logger.com.axelor=all
23 |
24 | # Hibernate logging
25 |
26 | # Log everything. Good for troubleshooting
27 | #log4j.logger.org.hibernate=INFO
28 |
29 | # Log all SQL DML statements as they are executed
30 | #log4j.logger.org.hibernate.SQL=INFO
31 |
32 | # Log all SQL DDL statements as they are executed
33 | #log4j.logger.org.hibernate.tool.hbm2ddl=INFO
34 |
35 | # Log all JDBC parameters
36 | #log4j.logger.org.hibernate.type=ALL
37 |
38 | # Log transactions
39 | #log4j.logger.org.hibernate.transaction=DEBUG
40 |
--------------------------------------------------------------------------------
/axelor-exception/src/test/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | log4j.rootLogger=error, stdout
2 |
3 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender
4 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
5 |
6 | # Print the date in ISO 8601 format
7 | log4j.appender.stdout.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
8 |
9 | log4j.appender.R=org.apache.log4j.RollingFileAppender
10 | log4j.appender.R.File=application.log
11 |
12 | log4j.appender.R.MaxFileSize=100KB
13 | # Keep one backup file
14 | log4j.appender.R.MaxBackupIndex=1
15 |
16 | log4j.appender.R.layout=org.apache.log4j.PatternLayout
17 | log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
18 |
19 | # Axelor logging
20 |
21 | # Log everything
22 | log4j.logger.com.axelor=DEBUG
23 |
24 | # Hibernate logging
25 |
26 | # Log everything. Good for troubleshooting
27 | #log4j.logger.org.hibernate=INFO
28 |
29 | # Log all SQL DML statements as they are executed
30 | #log4j.logger.org.hibernate.SQL=INFO
31 |
32 | # Log all SQL DDL statements as they are executed
33 | #log4j.logger.org.hibernate.tool.hbm2ddl=INFO
34 |
35 | # Log all JDBC parameters
36 | #log4j.logger.org.hibernate.type=ALL
37 |
38 | # Log transactions
39 | #log4j.logger.org.hibernate.transaction=DEBUG
40 |
--------------------------------------------------------------------------------
/axelor-studio/src/main/resources/domains/DashletBuilder.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/axelor-studio/src/main/resources/domains/ActionBuilderLine.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/axelor-admin/src/main/resources/views/Menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
8 |
9 |
11 |
12 |
13 |
14 |
15 |
17 |
18 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/axelor-tool/src/test/java/com/axelor/apps/tool/net/TestURLService.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Axelor Business Solutions
3 | *
4 | * Copyright (C) 2018 Axelor ().
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License, version 3,
8 | * as published by the Free Software Foundation.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see .
17 | */
18 | package com.axelor.apps.tool.net;
19 |
20 | import org.junit.Assert;
21 | import org.junit.Test;
22 |
23 |
24 | public class TestURLService {
25 |
26 | @Test
27 | public void testNotExist() {
28 |
29 | Assert.assertNull(URLService.notExist("http://www.google.com"));
30 | Assert.assertEquals("Problème de format de l'URL", URLService.notExist("www.google.com"));
31 | Assert.assertEquals("Ce document n'existe pas", URLService.notExist("http://www.testtrgfgfdg.com/"));
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/axelor-studio/src/main/webapp/doc/com/axelor/meta/db/repo/package-frame.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | com.axelor.meta.db.repo
7 |
8 |
9 |
10 |
11 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/axelor-studio/src/main/java/com/axelor/studio/db/repo/MenuBuilderRepo.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Axelor Business Solutions
3 | *
4 | * Copyright (C) 2018 Axelor ().
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License, version 3,
8 | * as published by the Free Software Foundation.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see .
17 | */
18 | package com.axelor.studio.db.repo;
19 |
20 | import com.axelor.studio.db.MenuBuilder;
21 |
22 | public class MenuBuilderRepo extends MenuBuilderRepository {
23 |
24 |
25 | @Override
26 | public void remove(MenuBuilder menuBuilder) {
27 |
28 | if (menuBuilder.getMenuGenerated() != null) {
29 | menuBuilder.getMenuGenerated().setRemoveMenu(true);
30 | }
31 |
32 | super.remove(menuBuilder);
33 | }
34 |
35 | @Override
36 | public MenuBuilder save(MenuBuilder menuBuilder) {
37 |
38 | if (menuBuilder.getActionBuilder() != null) {
39 | menuBuilder.getActionBuilder().setEdited(true);
40 | }
41 |
42 | return super.save(menuBuilder);
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/axelor-message/src/main/resources/views/EmailAddress.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
19 |
20 |
25 |
26 |
--------------------------------------------------------------------------------
/axelor-studio/src/main/java/com/axelor/studio/service/data/ImportScript.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Axelor Business Solutions
3 | *
4 | * Copyright (C) 2018 Axelor ().
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License, version 3,
8 | * as published by the Free Software Foundation.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see .
17 | */
18 | package com.axelor.studio.service.data;
19 |
20 | import java.util.Map;
21 |
22 | import com.axelor.studio.db.WkfNode;
23 | import com.axelor.studio.db.WkfTransition;
24 |
25 | public class ImportScript {
26 |
27 |
28 | public Object updateTransitionNode(Object bean, Map values){
29 |
30 | WkfTransition transition = (WkfTransition)bean;
31 |
32 | WkfNode source = transition.getSource();
33 | if(source != null){
34 | source.addOutgoing(transition);
35 | }
36 |
37 | WkfNode target = transition.getTarget();
38 | if(target != null){
39 | target.addIncomming(transition);
40 | }
41 |
42 |
43 | return transition;
44 | }
45 | }
--------------------------------------------------------------------------------
/axelor-exception/src/test/java/com/axelor/exception/db/TraceBackTest.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Axelor Business Solutions
3 | *
4 | * Copyright (C) 2018 Axelor ().
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License, version 3,
8 | * as published by the Free Software Foundation.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see .
17 | */
18 | package com.axelor.exception.db;
19 |
20 | import org.junit.Test;
21 | import org.junit.runner.RunWith;
22 |
23 | import com.axelor.exception.TestModule;
24 | import com.axelor.test.GuiceModules;
25 | import com.axelor.test.GuiceRunner;
26 |
27 | @RunWith(GuiceRunner.class)
28 | @GuiceModules({ TestModule.class })
29 | public class TraceBackTest {
30 |
31 | @Test
32 | public void testPersist() {
33 |
34 | System.out.println("Test");
35 | String str = "test.test1.test2";
36 | String tab[] = str.split("\\.");
37 | System.out.println(tab.length);
38 | System.out.println(tab[0]);
39 | System.out.println(tab[1]);
40 | System.out.println(tab[2]);
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/axelor-studio/src/main/webapp/lib/bpmn-js/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2014-2016 camunda services GmbH
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of
4 | this software and associated documentation files (the "Software"), to deal in the
5 | Software without restriction, including without limitation the rights to use, copy,
6 | modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
7 | and to permit persons to whom the Software is furnished to do so, subject to the
8 | following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | copies or substantial portions of the Software.
12 |
13 | The source code responsible for displaying the bpmn.io logo (two green cogwheels in
14 | a box) that links back to http://bpmn.io as part of rendered diagrams MUST NOT be
15 | removed or changed. When this software is being used in a website or application,
16 | the logo must stay fully visible and not visually overlapped by other elements.
17 |
18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
19 | INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
20 | PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
22 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
23 | OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/axelor-studio/src/main/resources/data-demo/input/charts.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/axelor-studio/src/main/webapp/doc/com/axelor/studio/web/package-frame.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | com.axelor.studio.web
7 |
8 |
9 |
10 |
11 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/axelor-studio/src/main/resources/views/ActionSelector.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/axelor-exception/src/test/resources/META-INF/persistence.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | org.hibernate.ejb.HibernatePersistence
7 | ENABLE_SELECTIVE
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
23 |
24 |
25 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/axelor-message/src/main/java/com/axelor/apps/message/service/MailAccountService.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Axelor Business Solutions
3 | *
4 | * Copyright (C) 2018 Axelor ().
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License, version 3,
8 | * as published by the Free Software Foundation.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see .
17 | */
18 | package com.axelor.apps.message.service;
19 |
20 | import com.axelor.apps.message.db.MailAccount;
21 | import com.axelor.exception.AxelorException;
22 |
23 | public interface MailAccountService {
24 |
25 | public boolean checkDefaultMailAccount(MailAccount mailAccount);
26 |
27 | public MailAccount getDefaultMailAccount();
28 |
29 | public void checkMailAccountConfiguration(MailAccount mailAccount) throws AxelorException, Exception;
30 |
31 | public String getSmtpSecurity(MailAccount mailAccount);
32 |
33 | public String getProtocol(MailAccount mailAccount);
34 |
35 | public String getSignature(MailAccount mailAccount);
36 |
37 | public String getEncryptPassword(String password);
38 |
39 | public String getDecryptPassword(String password);
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/axelor-message/src/main/resources/views/Selects.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/axelor-tool/src/test/java/com/axelor/apps/tool/file/TestFileTool.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Axelor Business Solutions
3 | *
4 | * Copyright (C) 2018 Axelor ().
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License, version 3,
8 | * as published by the Free Software Foundation.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see .
17 | */
18 | package com.axelor.apps.tool.file;
19 |
20 | import java.io.IOException;
21 |
22 | import junit.framework.Assert;
23 |
24 | import org.junit.Test;
25 |
26 | public class TestFileTool {
27 |
28 | @Test
29 | public void create() throws IOException {
30 |
31 | String destinationFolder = System.getProperty("java.io.tmpdir") + System.getProperty("file.separator") + "tata/titi/toto";
32 | String fileName = "toto.txt";
33 | Assert.assertTrue(FileTool.create(destinationFolder, fileName).createNewFile());
34 |
35 | }
36 |
37 | @Test
38 | public void create2() throws IOException {
39 |
40 | String fileName = System.getProperty("java.io.tmpdir") + System.getProperty("file.separator") + "tata2/titi2/toto2/toto.txt";
41 | Assert.assertTrue(FileTool.create(fileName).createNewFile());
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/axelor-studio/src/main/resources/domains/Filter.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/axelor-tool/src/main/java/com/axelor/apps/tool/date/DurationTool.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Axelor Business Solutions
3 | *
4 | * Copyright (C) 2018 Axelor ().
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License, version 3,
8 | * as published by the Free Software Foundation.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see .
17 | */
18 | package com.axelor.apps.tool.date;
19 |
20 | import org.joda.time.Duration;
21 | import org.joda.time.Interval;
22 | import org.joda.time.LocalDateTime;
23 |
24 | public class DurationTool{
25 |
26 | public static Duration computeDuration(LocalDateTime startDateTime, LocalDateTime endDateTime) {
27 |
28 | return new Interval(startDateTime.toDateTime(), endDateTime.toDateTime()).toDuration();
29 | }
30 |
31 |
32 | public static int getDaysDuration(Duration duration) {
33 |
34 | return duration.toStandardDays().getDays();
35 | }
36 |
37 | public static int getHoursDuration(Duration duration) {
38 |
39 | return duration.toStandardHours().getHours();
40 | }
41 |
42 | public static int getMinutesDuration(Duration duration) {
43 |
44 | return duration.toStandardMinutes().getMinutes();
45 | }
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/axelor-message/src/main/resources/domains/Template.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/axelor-studio/src/main/resources/domains/ViewPanel.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/axelor-studio/src/test/java/com/axelor/studio/test/TestQuery.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Axelor Business Solutions
3 | *
4 | * Copyright (C) 2018 Axelor ().
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License, version 3,
8 | * as published by the Free Software Foundation.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see .
17 | */
18 | package com.axelor.studio.test;
19 |
20 | import static org.junit.Assert.*;
21 |
22 | import java.util.Arrays;
23 | import java.util.List;
24 |
25 | import org.junit.Test;
26 | import org.junit.runner.RunWith;
27 |
28 | import com.axelor.meta.db.MetaView;
29 | import com.axelor.meta.db.repo.MetaViewRepository;
30 | import com.axelor.test.GuiceModules;
31 | import com.axelor.test.GuiceRunner;
32 | import com.google.inject.Inject;
33 |
34 | @RunWith(GuiceRunner.class)
35 | @GuiceModules(TestModule.class)
36 | public class TestQuery {
37 |
38 | @Inject
39 | private MetaViewRepository metaViewRepo;
40 |
41 | @Test
42 | public void test() {
43 |
44 | String viewNames = "message-grid,message-form";
45 | List views = metaViewRepo.all().filter("self.name in (?1)",
46 | Arrays.asList(viewNames.split(","))).fetch();
47 |
48 | }
49 |
50 | }
51 |
--------------------------------------------------------------------------------
/axelor-studio/src/test/java/com/axelor/studio/test/TestModule.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Axelor Business Solutions
3 | *
4 | * Copyright (C) 2018 Axelor ().
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License, version 3,
8 | * as published by the Free Software Foundation.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see .
17 | */
18 | package com.axelor.studio.test;
19 |
20 | import net.sf.ehcache.CacheManager;
21 |
22 | import com.axelor.app.AppModule;
23 | import com.axelor.auth.AuthModule;
24 | import com.axelor.db.JpaModule;
25 | import com.axelor.rpc.ObjectMapperProvider;
26 | import com.fasterxml.jackson.databind.ObjectMapper;
27 | import com.google.inject.AbstractModule;
28 |
29 | public class TestModule extends AbstractModule {
30 |
31 | @Override
32 | protected void configure() {
33 | // shutdown the cache manager if running : Breaking the test
34 | if (CacheManager.ALL_CACHE_MANAGERS.size() > 0) {
35 | CacheManager.getInstance().shutdown();
36 | }
37 | bind(ObjectMapper.class).toProvider(ObjectMapperProvider.class);
38 |
39 | install(new JpaModule("testUnit", true, true));
40 | install(new AuthModule());
41 | install(new AppModule());
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/axelor-tool/src/main/java/com/axelor/apps/tool/exception/IExceptionMessage.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Axelor Business Solutions
3 | *
4 | * Copyright (C) 2018 Axelor ().
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License, version 3,
8 | * as published by the Free Software Foundation.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see .
17 | */
18 | /**
19 | *
20 | */
21 | package com.axelor.apps.tool.exception;
22 |
23 | /**
24 | * @author axelor
25 | *
26 | */
27 | public interface IExceptionMessage {
28 |
29 | /**
30 | * Period service
31 | */
32 | static final String PERIOD_1 = /*$$(*/ "Years in 360 days" /*)*/;
33 |
34 | /**
35 | * URL service
36 | */
37 | static final String URL_SERVICE_1 = /*$$(*/ "Can not opening the connection to a empty URL." /*)*/;
38 | static final String URL_SERVICE_2 = /*$$(*/ "Url %s is malformed." /*)*/;
39 | static final String URL_SERVICE_3 = /*$$(*/ "An error occurs while opening the connection. Please verify the following URL : %s." /*)*/;
40 |
41 | /**
42 | * Template maker
43 | */
44 | static final String TEMPLATE_MAKER_1 = /*$$(*/ "No such template" /*)*/;
45 | static final String TEMPLATE_MAKER_2 = /*$$(*/ "Templating can not be empty" /*)*/;
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/axelor-studio/src/main/resources/domains/WkfTransition.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/axelor-tool/src/main/java/com/axelor/apps/tool/xml/DateToXML.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Axelor Business Solutions
3 | *
4 | * Copyright (C) 2018 Axelor ().
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License, version 3,
8 | * as published by the Free Software Foundation.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see .
17 | */
18 | package com.axelor.apps.tool.xml;
19 |
20 | import javax.xml.datatype.DatatypeConfigurationException;
21 | import javax.xml.datatype.DatatypeFactory;
22 | import javax.xml.datatype.XMLGregorianCalendar;
23 |
24 | import org.joda.time.LocalDateTime;
25 | import org.slf4j.Logger;
26 | import org.slf4j.LoggerFactory;
27 |
28 | import java.lang.invoke.MethodHandles;
29 |
30 | public abstract class DateToXML {
31 |
32 | private static final Logger LOG = LoggerFactory.getLogger( MethodHandles.lookup().lookupClass() );
33 |
34 | public static XMLGregorianCalendar convert(LocalDateTime in) {
35 |
36 | XMLGregorianCalendar date = null;
37 |
38 | try {
39 |
40 | date = DatatypeFactory.newInstance().newXMLGregorianCalendar(in.toString());
41 |
42 | } catch (DatatypeConfigurationException e) {
43 |
44 | LOG.error(e.getMessage());
45 |
46 | }
47 |
48 | return date;
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/axelor-studio/src/main/resources/domains/ReportBuilder.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/axelor-message/src/main/resources/domains/MailAccount.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/axelor-studio/src/main/resources/domains/Wkf.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/axelor-studio/README.md:
--------------------------------------------------------------------------------
1 | Overview
2 | ------
3 |
4 | This module adds tools that helps to create or edit a axelor module directly from the ADK web interface.
5 |
6 | The module components like domain, view, report,..etc could be easily created by using those tools.
7 |
8 | It also provides a support to create and apply the workflow.
9 |
10 | It generate a module code and store it in to the specified source directory.
11 |
12 | All changes could be applied to the working instance with just one button click.
13 |
14 | Dependencies
15 | ------
16 |
17 | * axelor-tool
18 | * axelor-exception
19 | * axelor-message
20 |
21 | Install
22 | ------
23 |
24 | * Put the axelor-studio with its dependencies in to the app module's module path.
25 | * Set the following properties in the app module.
26 | - `studio.source.dir:` A path to the app module's source directory.
27 | - `studio.adk.dir:` A path to the axelor-development-kit that is required to build a module.
28 | - `studio.restart.log:` A path to any text file. It will store the log of the backend script that restart the server.
29 | - `studio.doc.dir:`A path to directory containing screenshots of the form views. It will be used to generate a doc from the excel sheet.
30 | - `context.action = com.axelor.studio.utils.ActionHelper`. Put this as it is in the properties file.
31 | * Environment variables to set.
32 | - `JAVA_HOME:` A path to JDK used by the running app instance. It must be a JDK path and not the JRE path.
33 | - `CATALINA_HOME:` It is a well known tomcat environment variable. A path to the tomcat server directory used by the current running instance.
34 | - `PGDATA:` A path to the postgreql installation directory. For linux(ubuntu) its mostly a /usr/lib/postgresql/{postgres version}.
35 |
--------------------------------------------------------------------------------
/axelor-admin/src/main/java/com/axelor/auth/db/IMessage.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Axelor Business Solutions
3 | *
4 | * Copyright (C) 2018 Axelor ().
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License, version 3,
8 | * as published by the Free Software Foundation.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see .
17 | */
18 | package com.axelor.auth.db;
19 |
20 | public interface IMessage {
21 |
22 | /** Common messages **/
23 | static final public String IMPORT_OK = /*$$(*/ "Import completed succesfully" /*)*/;
24 | static final public String ERR_IMPORT = /*$$(*/ "Error in import. Please check log" /*)*/;
25 |
26 | /** Permission assistant & group menu assistant**/
27 |
28 | static final public String BAD_FILE = /*$$(*/ "Bad import file" /*)*/;
29 | static final public String NO_HEADER = /*$$(*/ "No header row found" /*)*/;
30 | static final public String BAD_HEADER = /*$$(*/ "Bad header row: " /*)*/;
31 | static final public String NO_GROUP = /*$$(*/ "Groups not found: %s" /*)*/;
32 | static final public String NO_OBJECT = /*$$(*/ "Object not found: %s" /*)*/;
33 | static final public String ERR_IMPORT_WITH_MSG = /*$$(*/ "Error in import: %s. Please check the server log" /*)*/;
34 | static final public String NO_MENU = /*$$(*/ "Menu not found: %s" /*)*/;
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/axelor-studio/src/main/webapp/css/bpmn.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Axelor Business Solutions
3 | *
4 | * Copyright (C) 2018 Axelor ().
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License, version 3,
8 | * as published by the Free Software Foundation.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see .
17 | */
18 | .bpmn-canvas {
19 | width: 100%;
20 | height: 100%;
21 | outline: none;
22 | }
23 |
24 | .bpmn-editor {
25 | height: 530px;
26 | border: 1px solid #ddd;
27 | position: relative;
28 | border-bottom: 4px solid #ddd;
29 | outline: none;
30 | }
31 |
32 | .bpmn-editor,
33 | .bpmn-editor * {
34 | box-sizing: border-box;
35 | }
36 |
37 | [class^="bpmn-icon-"]:before,
38 | [class*=" bpmn-icon-"]:before {
39 | margin: 0;
40 | }
41 |
42 | .bpmn-editor .bjs-powered-by {
43 | top: 14px !important;
44 | right: 10px !important;
45 | bottom: inherit !important;
46 | }
47 |
48 | .bpmn-editor .bjs-powered-by img {
49 | width: 24px !important;
50 | height: 24px !important;
51 | }
52 |
53 | .bpmn-editor .djs-label {
54 | font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif !important;
55 | }
56 |
57 | .djs-context-pad .entry.fa-pencil {
58 | font: normal normal normal 14px/1 FontAwesome;
59 | text-align: center;
60 | width: 1em;
61 | height: 1em;
62 | }
--------------------------------------------------------------------------------
/axelor-studio/src/main/resources/domains/RightManagement.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/axelor-studio/src/main/java/com/axelor/studio/db/repo/ActionBuilderRepo.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Axelor Business Solutions
3 | *
4 | * Copyright (C) 2018 Axelor ().
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License, version 3,
8 | * as published by the Free Software Foundation.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see .
17 | */
18 | package com.axelor.studio.db.repo;
19 |
20 | import com.axelor.meta.db.MetaAction;
21 | import com.axelor.meta.db.repo.MetaActionRepository;
22 | import com.axelor.studio.db.ActionBuilder;
23 | import com.google.inject.Inject;
24 | import com.google.inject.persist.Transactional;
25 |
26 | public class ActionBuilderRepo extends ActionBuilderRepository {
27 |
28 | @Inject
29 | private MetaActionRepository metaActionRepo;
30 |
31 | @Transactional
32 | @Override
33 | public void remove(ActionBuilder actionBuilder) {
34 |
35 | super.remove(actionBuilder);
36 |
37 | MetaAction metaAction = metaActionRepo.findByName(actionBuilder
38 | .getName());
39 | if (metaAction != null) {
40 | metaAction.setRemoveAction(true);
41 | metaActionRepo.save(metaAction);
42 | }
43 |
44 | metaAction = metaActionRepo.findByName(actionBuilder.getName()
45 | + "-assign");
46 | if (metaAction != null) {
47 | metaAction.setRemoveAction(true);
48 | metaActionRepo.save(metaAction);
49 | }
50 | }
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/axelor-studio/src/main/resources/domains/MenuBuilder.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/axelor-studio/src/main/resources/views/StudioTemplate.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/axelor-studio/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'axelor-module'
2 |
3 | module {
4 | name "axelor-studio"
5 | title "Axelor :: Studio"
6 | version "4.1.3"
7 |
8 | description """\
9 | Axelor studio module
10 |
11 | This module records all changes done by user in view and domains.
12 | It will save changes in xml and deploy app.
13 | """
14 |
15 | module "modules:axelor-message"
16 |
17 | removable false
18 |
19 | }
20 |
21 | dependencies {
22 | compile 'commons-lang:commons-lang:2.3'
23 | compile 'org.xhtmlrenderer:flying-saucer-pdf:9.1.4'
24 | compile 'org.eclipse.birt.runtime.3_7_1:Tidy:1'
25 | compile 'org.apache.commons:commons-exec:1.2'
26 | }
27 |
28 | def updateJsp(jspFile, check, lines) {
29 | def jsp = file("${rootProject.buildDir}/webapp/${jspFile}")
30 | def text = lines.join("\n");
31 | if (jsp.exists()) {
32 | def jspText = jsp.getText('UTF-8')
33 | if (jspText.indexOf(check) == -1) {
34 | text = jspText + text
35 | }
36 | }
37 | file(jsp).write(text, 'UTF-8')
38 | }
39 |
40 | //XXX: this task should be removed when we introduce per module webapp support in adk
41 | task copyWebapp(type: Copy) {
42 | destinationDir = file(rootProject.buildDir)
43 | into("webapp/studio") {
44 | from "src/main/webapp"
45 | }
46 | doLast {
47 | // update index-head.jsp
48 | updateJsp("index-head.jsp", "diagram-js.css", [
49 | '',
50 | '',
51 | '',
52 | ''])
53 | // update index-foot.jsp
54 | updateJsp("index-foot.jsp", "bpmn-modeler.js", [
55 | '',
56 | ''])
57 | }
58 | }
59 |
60 | rootProject.tasks.war.dependsOn copyWebapp
61 |
--------------------------------------------------------------------------------
/axelor-studio/src/main/java/com/axelor/studio/module/StudioModule.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Axelor Business Solutions
3 | *
4 | * Copyright (C) 2018 Axelor ().
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License, version 3,
8 | * as published by the Free Software Foundation.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see .
17 | */
18 | package com.axelor.studio.module;
19 |
20 | import com.axelor.app.AxelorModule;
21 | import com.axelor.meta.db.repo.MetaModelRepository;
22 | import com.axelor.meta.db.repo.StudioMetaModelRepository;
23 | import com.axelor.studio.db.repo.ActionBuilderRepo;
24 | import com.axelor.studio.db.repo.ActionBuilderRepository;
25 | import com.axelor.studio.db.repo.MenuBuilderRepo;
26 | import com.axelor.studio.db.repo.MenuBuilderRepository;
27 | import com.axelor.studio.db.repo.StudioWkfRepository;
28 | import com.axelor.studio.db.repo.ViewBuilderRepo;
29 | import com.axelor.studio.db.repo.ViewBuilderRepository;
30 | import com.axelor.studio.db.repo.WkfRepository;
31 |
32 | public class StudioModule extends AxelorModule {
33 |
34 | @Override
35 | protected void configure() {
36 | bind(MetaModelRepository.class).to(StudioMetaModelRepository.class);
37 | bind(WkfRepository.class).to(StudioWkfRepository.class);
38 | bind(ViewBuilderRepository.class).to(ViewBuilderRepo.class);
39 | bind(ActionBuilderRepository.class).to(ActionBuilderRepo.class);
40 | bind(MenuBuilderRepository.class).to(MenuBuilderRepo.class);
41 | }
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/axelor-tool/src/main/java/com/qas/web_2005_02/Fault.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Axelor Business Solutions
3 | *
4 | * Copyright (C) 2018 Axelor ().
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License, version 3,
8 | * as published by the Free Software Foundation.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see .
17 | */
18 | package com.qas.web_2005_02;
19 |
20 | import javax.xml.ws.WebFault;
21 |
22 |
23 | /**
24 | * This class was generated by Apache CXF 2.6.2
25 | * 2012-09-12T15:14:19.665+02:00
26 | * Generated source version: 2.6.2
27 | */
28 |
29 | @WebFault(name = "QAFault", targetNamespace = "http://www.qas.com/web-2005-02")
30 | public class Fault extends Exception {
31 |
32 | private com.qas.web_2005_02.QAFault qaFault;
33 |
34 | public Fault() {
35 | super();
36 | }
37 |
38 | public Fault(String message) {
39 | super(message);
40 | }
41 |
42 | public Fault(String message, Throwable cause) {
43 | super(message, cause);
44 | }
45 |
46 | public Fault(String message, com.qas.web_2005_02.QAFault qaFault) {
47 | super(message);
48 | this.qaFault = qaFault;
49 | }
50 |
51 | public Fault(String message, com.qas.web_2005_02.QAFault qaFault, Throwable cause) {
52 | super(message, cause);
53 | this.qaFault = qaFault;
54 | }
55 |
56 | public com.qas.web_2005_02.QAFault getFaultInfo() {
57 | return this.qaFault;
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/axelor-studio/src/main/resources/views/WkfTracking.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
8 |
9 |
10 |
11 |
12 |
13 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | self.recordModel = :recordModel and self.recordId = :recordId
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/axelor-studio/src/main/webapp/doc/overview-frame.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Overview List
7 |
8 |
9 |
10 |
11 |
39 | *
40 | */
41 | @XmlType(name = "EngineEnumType")
42 | @XmlEnum
43 | public enum EngineEnumType {
44 |
45 | @XmlEnumValue("Singleline")
46 | SINGLELINE("Singleline"),
47 | @XmlEnumValue("Typedown")
48 | TYPEDOWN("Typedown"),
49 | @XmlEnumValue("Verification")
50 | VERIFICATION("Verification");
51 | private final String value;
52 |
53 | EngineEnumType(String v) {
54 | value = v;
55 | }
56 |
57 | public String value() {
58 | return value;
59 | }
60 |
61 | public static EngineEnumType fromValue(String v) {
62 | for (EngineEnumType c: EngineEnumType.values()) {
63 | if (c.value.equals(v)) {
64 | return c;
65 | }
66 | }
67 | throw new IllegalArgumentException(v);
68 | }
69 |
70 | }
71 |
--------------------------------------------------------------------------------
/axelor-tool/src/main/java/com/qas/web_2005_02/EngineIntensityType.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Axelor Business Solutions
3 | *
4 | * Copyright (C) 2018 Axelor ().
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License, version 3,
8 | * as published by the Free Software Foundation.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see .
17 | */
18 | package com.qas.web_2005_02;
19 |
20 | import javax.xml.bind.annotation.XmlEnum;
21 | import javax.xml.bind.annotation.XmlEnumValue;
22 | import javax.xml.bind.annotation.XmlType;
23 |
24 |
25 | /**
26 | *
Classe Java pour EngineIntensityType.
27 | *
28 | *
Le fragment de schéma suivant indique le contenu attendu figurant dans cette classe.
29 | *
39 | *
40 | */
41 | @XmlType(name = "EngineIntensityType")
42 | @XmlEnum
43 | public enum EngineIntensityType {
44 |
45 | @XmlEnumValue("Exact")
46 | EXACT("Exact"),
47 | @XmlEnumValue("Close")
48 | CLOSE("Close"),
49 | @XmlEnumValue("Extensive")
50 | EXTENSIVE("Extensive");
51 | private final String value;
52 |
53 | EngineIntensityType(String v) {
54 | value = v;
55 | }
56 |
57 | public String value() {
58 | return value;
59 | }
60 |
61 | public static EngineIntensityType fromValue(String v) {
62 | for (EngineIntensityType c: EngineIntensityType.values()) {
63 | if (c.value.equals(v)) {
64 | return c;
65 | }
66 | }
67 | throw new IllegalArgumentException(v);
68 | }
69 |
70 | }
71 |
--------------------------------------------------------------------------------
/axelor-studio/src/main/java/com/axelor/studio/service/data/TranslationService.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Axelor Business Solutions
3 | *
4 | * Copyright (C) 2018 Axelor ().
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License, version 3,
8 | * as published by the Free Software Foundation.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see .
17 | */
18 | package com.axelor.studio.service.data;
19 |
20 | import com.axelor.meta.db.MetaTranslation;
21 | import com.axelor.meta.db.repo.MetaTranslationRepository;
22 | import com.google.common.base.Strings;
23 | import com.google.inject.Inject;
24 | import com.google.inject.persist.Transactional;
25 |
26 | public class TranslationService {
27 |
28 | @Inject
29 | private MetaTranslationRepository metaTranslationRepo;
30 |
31 | public String getTranslation(String key, String lang) {
32 |
33 | if (Strings.isNullOrEmpty(key) || Strings.isNullOrEmpty(lang)) {
34 | return null;
35 | }
36 |
37 | MetaTranslation translation = metaTranslationRepo.findByKey(key, lang);
38 | if (translation != null) {
39 | return translation.getMessage();
40 | }
41 |
42 | return null;
43 | }
44 |
45 | @Transactional
46 | public void addTranslation(String key, String message, String lang, String module) {
47 |
48 | if (Strings.isNullOrEmpty(key) || Strings.isNullOrEmpty(message) || Strings.isNullOrEmpty(lang)) {
49 | return;
50 | }
51 |
52 | if (key.equals(message)) {
53 | return;
54 | }
55 |
56 | MetaTranslation translation = metaTranslationRepo.findByKey(key, lang);
57 | if (translation == null) {
58 | translation = new MetaTranslation();
59 | translation.setLanguage(lang);
60 | translation.setKey(key);
61 | }
62 | translation.setModule(module);
63 | translation.setMessage(message);
64 |
65 | metaTranslationRepo.save(translation);
66 | }
67 |
68 | }
69 |
--------------------------------------------------------------------------------
/axelor-admin/src/main/java/com/axelor/auth/web/PermissionAssitantController.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Axelor Business Solutions
3 | *
4 | * Copyright (C) 2018 Axelor ().
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License, version 3,
8 | * as published by the Free Software Foundation.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see .
17 | */
18 | package com.axelor.auth.web;
19 |
20 | import org.joda.time.LocalDateTime;
21 |
22 | import com.axelor.auth.db.IMessage;
23 | import com.axelor.auth.db.repo.PermissionAssistantRepository;
24 | import com.axelor.auth.service.PermissionAssistantService;
25 | import com.axelor.i18n.I18n;
26 | import com.axelor.rpc.ActionRequest;
27 | import com.axelor.rpc.ActionResponse;
28 | import com.google.inject.Inject;
29 |
30 | public class PermissionAssitantController {
31 |
32 | @Inject
33 | PermissionAssistantRepository permissionAssistantRepo;
34 |
35 | @Inject
36 | PermissionAssistantService permissionAssistantService;
37 |
38 |
39 | public void createFile(ActionRequest request, ActionResponse response){
40 |
41 | Long permissionAssistantId = (Long)request.getContext().get("id");
42 | permissionAssistantService.createFile(permissionAssistantRepo.find(permissionAssistantId));
43 | response.setReload(true);
44 |
45 | }
46 |
47 | public void importPermissions(ActionRequest request, ActionResponse response){
48 |
49 | Long permissionAssistantId = (Long)request.getContext().get("id");
50 | String errors = permissionAssistantService.importPermissions(permissionAssistantRepo.find(permissionAssistantId));
51 | response.setValue("importDate", LocalDateTime.now());
52 | response.setValue("log", errors);
53 |
54 | if(errors.equals("")){
55 | response.setFlash(I18n.get(IMessage.IMPORT_OK));
56 | }
57 | else{
58 | response.setFlash(I18n.get(IMessage.ERR_IMPORT));
59 | }
60 |
61 | }
62 |
63 | }
64 |
--------------------------------------------------------------------------------
/axelor-studio/src/main/resources/views/MetaModule.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/axelor-admin/src/main/java/com/axelor/meta/web/MetaGroupMenuAssistantController.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Axelor Business Solutions
3 | *
4 | * Copyright (C) 2018 Axelor ().
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License, version 3,
8 | * as published by the Free Software Foundation.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see .
17 | */
18 | package com.axelor.meta.web;
19 |
20 | import org.joda.time.LocalDateTime;
21 |
22 | import com.axelor.auth.db.IMessage;
23 | import com.axelor.i18n.I18n;
24 | import com.axelor.meta.db.repo.MetaGroupMenuAssistantRepository;
25 | import com.axelor.meta.service.MetaGroupMenuAssistantService;
26 | import com.axelor.rpc.ActionRequest;
27 | import com.axelor.rpc.ActionResponse;
28 | import com.google.inject.Inject;
29 |
30 | public class MetaGroupMenuAssistantController{
31 |
32 | @Inject
33 | private MetaGroupMenuAssistantService groupMenuAssistantService;
34 |
35 | @Inject
36 | private MetaGroupMenuAssistantRepository groupMenuAssistantRepo;
37 |
38 |
39 | public void createGroupMenuFile(ActionRequest request, ActionResponse response){
40 |
41 | Long groupMenuAssistantId = (Long)request.getContext().get("id");
42 | groupMenuAssistantService.createGroupMenuFile(groupMenuAssistantRepo.find(groupMenuAssistantId));
43 | response.setReload(true);
44 | }
45 |
46 | public void importGroupMenu(ActionRequest request, ActionResponse response) {
47 |
48 | Long groupMenuAssistantId = (Long)request.getContext().get("id");
49 | String errorLog = groupMenuAssistantService.importGroupMenu(groupMenuAssistantRepo.find(groupMenuAssistantId));
50 |
51 | response.setValue("log", errorLog);
52 | if(errorLog.equals("")){
53 | response.setFlash(I18n.get(IMessage.IMPORT_OK));
54 | response.setValue("importDate", LocalDateTime.now());
55 | }
56 | else{
57 | response.setFlash(I18n.get(IMessage.ERR_IMPORT));
58 | }
59 |
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/axelor-exception/src/main/java/com/axelor/exception/db/IException.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Axelor Business Solutions
3 | *
4 | * Copyright (C) 2018 Axelor ().
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License, version 3,
8 | * as published by the Free Software Foundation.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see .
17 | */
18 | package com.axelor.exception.db;
19 |
20 | /**
21 | * Interface of Exception package. Enum all static variable of packages.
22 | *
23 | * @author belloy
24 | *
25 | */
26 | public interface IException {
27 |
28 | /**
29 | * Type select
30 | */
31 | public static final int TECHNICAL = 0;
32 | public static final int FUNCTIONNAL = 1;
33 |
34 | /**
35 | * Category select
36 | */
37 | public static final int MISSING_FIELD = 1;
38 | public static final int NO_UNIQUE_KEY = 2;
39 | public static final int NO_VALUE = 3;
40 | public static final int CONFIGURATION_ERROR = 4;
41 | public static final int INCONSISTENCY = 5;
42 |
43 | /**
44 | * Origin select
45 | */
46 | public static final String INVOICE_ORIGIN = "invoice";
47 | public static final String REMINDER = "reminder";
48 | public static final String DOUBTFUL_CUSTOMER = "doubtfulCustomer";
49 | public static final String REIMBURSEMENT = "reimbursement";
50 | public static final String DIRECT_DEBIT = "directDebit";
51 | public static final String INTERBANK_PAYMENT_ORDER = "interbankPaymentOrder";
52 | public static final String ACCOUNT_CUSTOMER = "accountCustomer";
53 | public static final String MOVE_LINE_EXPORT_ORIGIN = "moveLineExport";
54 | public static final String IRRECOVERABLE = "irrecoverable";
55 | public static final String CRM = "crm";
56 | public static final String IMPORT = "import";
57 | public static final String LEAVE_MANAGEMENT = "leaveManagement";
58 | public static final String BANK_STATEMENT = "bankStatement";
59 | public static final String CREDIT_TRANSFER = "creditTransfer";
60 |
61 | }
62 |
--------------------------------------------------------------------------------
/axelor-studio/src/main/webapp/doc/com/axelor/studio/service/data/package-frame.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | com.axelor.studio.service.data
7 |
8 |
9 |
10 |
11 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/axelor-studio/src/main/java/com/axelor/studio/service/data/importer/ModuleImporter.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Axelor Business Solutions
3 | *
4 | * Copyright (C) 2018 Axelor ().
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License, version 3,
8 | * as published by the Free Software Foundation.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see .
17 | */
18 | package com.axelor.studio.service.data.importer;
19 |
20 | import com.axelor.meta.db.MetaModule;
21 | import com.axelor.meta.db.repo.MetaModuleRepository;
22 | import com.axelor.studio.service.ConfigurationService;
23 | import com.google.common.base.Strings;
24 | import com.google.inject.Inject;
25 | import com.google.inject.persist.Transactional;
26 |
27 | public class ModuleImporter {
28 |
29 | @Inject
30 | private ConfigurationService configService;
31 |
32 | @Inject
33 | private MetaModuleRepository metaModuleRepo;
34 |
35 | @Transactional
36 | public void createModules(DataReader reader, String key) {
37 |
38 | if (key == null || reader == null) {
39 | return;
40 | }
41 |
42 | int totalLines = reader.getTotalLines(key);
43 |
44 | for (int rowNum = 0; rowNum < totalLines; rowNum++) {
45 |
46 | if (rowNum == 0) {
47 | continue;
48 | }
49 |
50 | String[] row = reader.read(key, rowNum);
51 | if (row == null) {
52 | continue;
53 | }
54 |
55 | String name = row[0];
56 | if (Strings.isNullOrEmpty(name)) {
57 | continue;
58 | }
59 | if (configService.getNonCustomizedModules().contains(name)) {
60 | continue;
61 | }
62 | MetaModule module = configService.getCustomizedModule(name);
63 | if (module == null) {
64 | module = new MetaModule(name);
65 | }
66 | module.setDepends(row[1]);
67 | module.setTitle(row[2]);
68 | module.setModuleVersion(row[3]);
69 | module.setDescription(row[4]);
70 | module.setCustomised(true);
71 |
72 | metaModuleRepo.save(module);
73 | }
74 |
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/axelor-studio/src/main/resources/views/ModuleRecorder.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/axelor-studio/src/main/java/com/axelor/studio/web/ChartBuilderController.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Axelor Business Solutions
3 | *
4 | * Copyright (C) 2018 Axelor ().
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License, version 3,
8 | * as published by the Free Software Foundation.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see .
17 | */
18 | package com.axelor.studio.web;
19 |
20 |
21 | import com.axelor.db.mapper.Mapper;
22 | import com.axelor.meta.db.MetaField;
23 | import com.axelor.meta.db.MetaModel;
24 | import com.axelor.meta.db.repo.MetaModelRepository;
25 | import com.google.inject.Inject;
26 |
27 | public class ChartBuilderController {
28 |
29 | @Inject
30 | private MetaModelRepository metaModelRepo;
31 |
32 | public String getTarget(MetaField metaField) {
33 |
34 | String fieldName = metaField.getName();
35 | MetaModel targetModel = metaModelRepo.findByName(metaField.getTypeName());
36 |
37 | if (targetModel == null) {
38 | return fieldName;
39 | }
40 |
41 | MetaField targetField = null;
42 | boolean name = false;
43 | boolean code = false;
44 | for (MetaField field : targetModel.getMetaFields()) {
45 | if (field.getNameColumn()) {
46 | targetField = field;
47 | }
48 | if (field.getName().equals("name")) {
49 | name = true;
50 | }
51 | if (field.getName().equals("code")) {
52 | code = true;
53 | }
54 | }
55 |
56 | if (targetField != null) {
57 | return fieldName + "." + targetField.getName();
58 | }
59 |
60 | try {
61 | Mapper mapper = Mapper.of(Class.forName(targetModel.getFullName()));
62 | if (mapper.getNameField() != null) {
63 | return fieldName + "." + mapper.getNameField().getName();
64 | }
65 | } catch (ClassNotFoundException e) {
66 | e.printStackTrace();
67 | }
68 |
69 | if (name) {
70 | return fieldName + ".name";
71 | }
72 |
73 | if (code) {
74 | return fieldName + ".code";
75 | }
76 |
77 | return fieldName;
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/axelor-studio/src/main/java/com/axelor/studio/db/repo/ViewBuilderRepo.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Axelor Business Solutions
3 | *
4 | * Copyright (C) 2018 Axelor ().
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License, version 3,
8 | * as published by the Free Software Foundation.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see .
17 | */
18 | package com.axelor.studio.db.repo;
19 |
20 | import javax.validation.ValidationException;
21 |
22 | import com.axelor.i18n.I18n;
23 | import com.axelor.meta.db.MetaView;
24 | import com.axelor.meta.db.repo.MetaActionRepository;
25 | import com.axelor.meta.db.repo.MetaViewRepository;
26 | import com.axelor.studio.db.ViewBuilder;
27 | import com.google.inject.Inject;
28 | import com.google.inject.persist.Transactional;
29 |
30 | public class ViewBuilderRepo extends ViewBuilderRepository {
31 |
32 | @Inject
33 | MetaViewRepository metaViewRepo;
34 |
35 | @Inject
36 | MetaActionRepository metaActionRepo;
37 |
38 | @Override
39 | public ViewBuilder save(ViewBuilder viewBuilder) throws ValidationException {
40 |
41 | if (viewBuilder.getName().contains(" ")) {
42 | throw new ValidationException(
43 | I18n.get("Name must not contains space"));
44 | }
45 |
46 | return super.save(viewBuilder);
47 | }
48 |
49 | @Override
50 | @Transactional
51 | public void remove(ViewBuilder viewBuilder) {
52 |
53 | MetaView metaView = viewBuilder.getMetaViewGenerated();
54 | if (metaView != null) {
55 | metaView.setRemoveView(true);
56 | metaViewRepo.save(metaView);
57 | }
58 |
59 | // String onSave = viewBuilder.getOnSave();
60 | //
61 | // if(onSave != null){
62 | // List metaActions = metaActionRepo.all()
63 | // .filter("self.name in (?1)", Arrays.asList(onSave.split(",")))
64 | // .fetch();
65 | // for(MetaAction action : metaActions){
66 | // action.setRemoveAction(true);
67 | // metaActionRepo.save(action);
68 | // }
69 | // }
70 |
71 | super.remove(viewBuilder);
72 | }
73 |
74 | }
75 |
--------------------------------------------------------------------------------
/axelor-message/src/main/java/com/axelor/apps/message/exception/IExceptionMessage.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Axelor Business Solutions
3 | *
4 | * Copyright (C) 2018 Axelor ().
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License, version 3,
8 | * as published by the Free Software Foundation.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see .
17 | */
18 | /**
19 | *
20 | */
21 | package com.axelor.apps.message.exception;
22 |
23 | /**
24 | * @author axelor
25 | *
26 | */
27 | public interface IExceptionMessage {
28 |
29 | /**
30 | * Mail account service and controller
31 | */
32 | static final String MAIL_ACCOUNT_1 = /*$$(*/ "Incorrect login or password" /*)*/;
33 | static final String MAIL_ACCOUNT_2 = /*$$(*/ "Unable to reach server. Please check Host,Port and SSL/TLS" /*)*/;
34 | static final String MAIL_ACCOUNT_3 = /*$$(*/ "Connection successful" /*)*/;
35 | static final String MAIL_ACCOUNT_4 = /*$$(*/ "Provided settings are wrong, please modify them and try again" /*)*/;
36 | static final String MAIL_ACCOUNT_5 = /*$$(*/ "There is already a default account" /*)*/;
37 |
38 | /**
39 | * Template service
40 | */
41 | static final String TEMPLATE_SERVICE_1 = /*$$(*/ "Model empty. Please configure a model." /*)*/;
42 | static final String TEMPLATE_SERVICE_2 = /*$$(*/ "Your target receptor is not valid. Please check it." /*)*/;
43 | static final String TEMPLATE_SERVICE_3 = /*$$(*/ "Waiting model: %s" /*)*/;
44 |
45 | /**
46 | * General message controller
47 | */
48 | static final String MESSAGE_1 = /*$$(*/ "Please configure a template" /*)*/;
49 | static final String MESSAGE_2 = /*$$(*/ "Select template" /*)*/;
50 | static final String MESSAGE_3 = /*$$(*/ "Create message" /*)*/;
51 | static final String MESSAGE_4 = /*$$(*/ "Email sent" /*)*/;
52 | static final String MESSAGE_5 = /*$$(*/ "Message sent" /*)*/;
53 | static final String MESSAGE_6 = /*$$(*/ "Failed to send Email" /*)*/;
54 | static final String MESSAGE_7 = /*$$(*/ "Sender's email address is null or empty" /*)*/;
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/axelor-tool/src/main/java/com/qas/web_2005_02/LineContentType.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Axelor Business Solutions
3 | *
4 | * Copyright (C) 2018 Axelor ().
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License, version 3,
8 | * as published by the Free Software Foundation.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see .
17 | */
18 | package com.qas.web_2005_02;
19 |
20 | import javax.xml.bind.annotation.XmlEnum;
21 | import javax.xml.bind.annotation.XmlEnumValue;
22 | import javax.xml.bind.annotation.XmlType;
23 |
24 |
25 | /**
26 | *
Classe Java pour LineContentType.
27 | *
28 | *
Le fragment de schéma suivant indique le contenu attendu figurant dans cette classe.
29 | *