"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/main/java/com/openkm/extension/frontend/client/Customization.java" between
OpenKM-document-management-system-6.3.10.tar.gz and OpenKM-document-management-system-6.3.11.tar.gz

About: OpenKM (Knowledge Management) is a document management system that allows easy management of documents, users, roles and finding your enterprise documents and records. Community version (source code).

Customization.java  (OpenKM-document-management-system-6.3.10):Customization.java  (OpenKM-document-management-system-6.3.11)
skipping to change at line 24 skipping to change at line 24
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* <p> * <p>
* You should have received a copy of the GNU General Public License along * You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc., * with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/ */
package com.openkm.extension.frontend.client; package com.openkm.extension.frontend.client;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.openkm.extension.frontend.client.service.OKMGeneralService;
import com.openkm.extension.frontend.client.service.OKMGeneralServiceAsync;
import com.openkm.extension.frontend.client.widget.activitylog.ActivityLog; import com.openkm.extension.frontend.client.widget.activitylog.ActivityLog;
import com.openkm.extension.frontend.client.widget.externaltab.ExternalTabDocume
nt;
import com.openkm.extension.frontend.client.widget.externaltab.ExternalTabFolder
;
import com.openkm.extension.frontend.client.widget.externaltab.ExternalTabMail;
import com.openkm.extension.frontend.client.widget.extraworkspace.ExtraTabWorksp ace; import com.openkm.extension.frontend.client.widget.extraworkspace.ExtraTabWorksp ace;
import com.openkm.extension.frontend.client.widget.forum.Forum; import com.openkm.extension.frontend.client.widget.forum.Forum;
import com.openkm.extension.frontend.client.widget.htmleditor.HTMLEditor; import com.openkm.extension.frontend.client.widget.htmleditor.HTMLEditor;
import com.openkm.extension.frontend.client.widget.macros.Macros; import com.openkm.extension.frontend.client.widget.macros.Macros;
import com.openkm.extension.frontend.client.widget.messaging.MessagingToolBarBox ; import com.openkm.extension.frontend.client.widget.messaging.MessagingToolBarBox ;
import com.openkm.extension.frontend.client.widget.stapling.Stapling; import com.openkm.extension.frontend.client.widget.stapling.Stapling;
import com.openkm.extension.frontend.client.widget.toolbar.downloadButton.Downlo adButton; import com.openkm.extension.frontend.client.widget.toolbar.downloadButton.Downlo adButton;
import com.openkm.extension.frontend.client.widget.toolbar.downloadPdfButton.Dow nloadPdfButton; import com.openkm.extension.frontend.client.widget.toolbar.downloadPdfButton.Dow nloadPdfButton;
import com.openkm.extension.frontend.client.widget.wiki.Wiki; import com.openkm.extension.frontend.client.widget.wiki.Wiki;
import com.openkm.extension.frontend.client.widget.workflow.Workflow; import com.openkm.extension.frontend.client.widget.workflow.Workflow;
import com.openkm.extension.frontend.client.widget.zoho.Zoho; import com.openkm.extension.frontend.client.widget.zoho.Zoho;
import com.openkm.frontend.client.Main;
import com.openkm.frontend.client.extension.comunicator.GeneralComunicator;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* Customization * Customization
* *
* @author jllort * @author jllort
*
*/ */
public class Customization { public class Customization {
/** /**
* getExtensionWidgets * getExtensionWidgets
*/ */
public static List<Object> getExtensionWidgets(List<String> uuidList) { public static List<Object> getExtensionWidgets(List<String> uuidList) {
List<Object> extensions = new ArrayList<Object>(); List<Object> extensions = new ArrayList<>();
// add here your widget extensions // add here your widget extensions
if (uuidList.contains("d9dab640-d098-11df-bd3b-0800200c9a66")) { if (uuidList.contains("d9dab640-d098-11df-bd3b-0800200c9a66")) {
extensions.add(new HelloWorld()); extensions.add(new HelloWorld());
} }
if (uuidList.contains("9f84b330-d096-11df-bd3b-0800200c9a66")) { if (uuidList.contains("9f84b330-d096-11df-bd3b-0800200c9a66")) {
extensions.add(new ToolBarButtonExample().getButton()); extensions.add(new ToolBarButtonExample().getButton());
} }
skipping to change at line 78 skipping to change at line 88
extensions.add(new TabWorkspaceExample()); extensions.add(new TabWorkspaceExample());
} }
if (uuidList.contains("4d245f30-ef47-11df-98cf-0800200c9a66")) { if (uuidList.contains("4d245f30-ef47-11df-98cf-0800200c9a66")) {
extensions.add(new ToolBarBoxExample().getToolBarBox()); extensions.add(new ToolBarBoxExample().getToolBarBox());
} }
// extensions.add(new MainMenuExample().getNewMenu()); // extensions.add(new MainMenuExample().getNewMenu());
// extensions.add(new HandlersTest()); // extensions.add(new HandlersTest());
// OPENKM PROPIETARY EXTENSIONS // OPENKM PROPRIETARY EXTENSIONS
if (DownloadButton.isRegistered(uuidList)) { if (DownloadButton.isRegistered(uuidList)) {
extensions.add(new DownloadButton(uuidList).getButton()); extensions.add(new DownloadButton(uuidList).getButton());
} }
if (DownloadPdfButton.isRegistered(uuidList)) { if (DownloadPdfButton.isRegistered(uuidList)) {
extensions.add(new DownloadPdfButton(uuidList).getButton( )); extensions.add(new DownloadPdfButton(uuidList).getButton( ));
} }
if (Stapling.isRegistered(uuidList)) { if (Stapling.isRegistered(uuidList)) {
extensions.addAll(new Stapling(uuidList).getExtensions()) ; extensions.addAll(new Stapling(uuidList).getExtensions()) ;
skipping to change at line 127 skipping to change at line 137
if (Macros.isRegistered(uuidList)) { if (Macros.isRegistered(uuidList)) {
extensions.addAll(new Macros(uuidList).getExtensions()); extensions.addAll(new Macros(uuidList).getExtensions());
} }
if (HTMLEditor.isRegistered(uuidList)) { if (HTMLEditor.isRegistered(uuidList)) {
HTMLEditor htmlEditor = new HTMLEditor(uuidList); HTMLEditor htmlEditor = new HTMLEditor(uuidList);
extensions.addAll(htmlEditor.getExtensions()); extensions.addAll(htmlEditor.getExtensions());
htmlEditor.initJavaScriptApi(); htmlEditor.initJavaScriptApi();
} }
return extensions;
}
/**
* getDynamicExtensionWidgets
*/
public static Map<String, String> getDynamicExtensionWidgets(List<String>
uuidList) {
Map<String, String> dynamicExtensionsMap = new HashMap<String, St
ring>();
if (ExternalTabDocument.isRegistered(uuidList)) {
dynamicExtensionsMap.put(ExternalTabDocument.getSimpleNam
e(), ExternalTabDocument.KEY);
}
if (ExternalTabFolder.isRegistered(uuidList)) {
dynamicExtensionsMap.put(ExternalTabFolder.getSimpleName(
), ExternalTabFolder.KEY);
}
if (ExternalTabMail.isRegistered(uuidList)) {
dynamicExtensionsMap.put(ExternalTabMail.getSimpleName(),
ExternalTabMail.KEY);
}
if (ExtraTabWorkspace.isRegistered(uuidList)) { if (ExtraTabWorkspace.isRegistered(uuidList)) {
extensions.addAll(new ExtraTabWorkspace(uuidList).getExte nsions()); dynamicExtensionsMap.put(ExtraTabWorkspace.getSimpleName( ), ExtraTabWorkspace.KEY);
} }
return dynamicExtensionsMap;
}
return extensions; /**
* loadDynamicExtensionWidgets
*/
public static void loadDynamicExtensionWidgets() {
OKMGeneralServiceAsync generalService = GWT.create(OKMGeneralServ
ice.class);
final String className = Main.get().startUp.getDynamicExtensionsM
ap().keySet().iterator().next();
String key = Main.get().startUp.getDynamicExtensionsMap().get(cla
ssName);
if (ExternalTabDocument.getSimpleName().equals(className)) {
generalService.getConfigParam(key, new AsyncCallback<List
<String>>() {
@Override
public void onSuccess(List<String> result) {
for (String param : result) {
final String[] options = param.sp
lit(";");
if (options.length == 2) {
ExternalTabDocument etDoc
ument = new ExternalTabDocument(Main.get().getExtensionUuidList());
etDocument.setName(option
s[0]);
etDocument.setUrl(options
[1]);
Main.get().startUp.addExt
ension(etDocument);
} else {
Main.get().showError("Inv
alid external tab document option: " + param);
}
}
Main.get().startUp.getDynamicExtensionsMa
p().remove(className);
if (Main.get().startUp.getDynamicExtensio
nsMap().size() > 0) {
loadDynamicExtensionWidgets();
} else {
Main.get().startUp.startExtension
s();
}
}
@Override
public void onFailure(Throwable caught) {
GeneralComunicator.showError("getConfigPa
ram", caught);
Main.get().startUp.startExtensions();
}
});
} else if (ExternalTabFolder.getSimpleName().equals(className)) {
generalService.getConfigParam(key, new AsyncCallback<List
<String>>() {
@Override
public void onSuccess(List<String> result) {
for (String param : result) {
final String[] options = param.sp
lit(";");
if (options.length == 2) {
ExternalTabFolder etFolde
r = new ExternalTabFolder(Main.get().getExtensionUuidList());
etFolder.setName(options[
0]);
etFolder.setUrl(options[1
]);
Main.get().startUp.addExt
ension(etFolder);
} else {
Main.get().showError("Inv
alid external tab folder option: " + param);
}
}
Main.get().startUp.getDynamicExtensionsMa
p().remove(className);
if (Main.get().startUp.getDynamicExtensio
nsMap().size() > 0) {
loadDynamicExtensionWidgets();
} else {
Main.get().startUp.startExtension
s();
}
}
@Override
public void onFailure(Throwable caught) {
GeneralComunicator.showError("getConfigPa
ram", caught);
Main.get().startUp.startExtensions();
}
});
} else if (ExternalTabMail.getSimpleName().equals(className)) {
generalService.getConfigParam(key, new AsyncCallback<List
<String>>() {
@Override
public void onSuccess(List<String> result) {
for (String param : result) {
final String[] options = param.sp
lit(";");
if (options.length == 2) {
ExternalTabMail etMail =
new ExternalTabMail(Main.get().getExtensionUuidList());
etMail.setName(options[0]
);
etMail.setUrl(options[1])
;
Main.get().startUp.addExt
ension(etMail);
} else {
Main.get().showError("Inv
alid external tab mail option: " + param);
}
}
Main.get().startUp.getDynamicExtensionsMa
p().remove(className);
if (Main.get().startUp.getDynamicExtensio
nsMap().size() > 0) {
loadDynamicExtensionWidgets();
} else {
Main.get().startUp.startExtension
s();
}
}
@Override
public void onFailure(Throwable caught) {
GeneralComunicator.showError("getConfigPa
ram", caught);
Main.get().startUp.startExtensions();
}
});
} else if (ExtraTabWorkspace.getSimpleName().equals(className)) {
generalService.getConfigParam(key, new AsyncCallback<List
<String>>() {
@Override
public void onSuccess(List<String> result) {
for (String param : result) {
final String[] options = param.sp
lit(";");
if (options.length == 2) {
ExtraTabWorkspace etWorks
pace = new ExtraTabWorkspace(Main.get().getExtensionUuidList());
etWorkspace.getTabWorkspa
ce().setTextLabel(options[0]);
etWorkspace.getTabWorkspa
ce().setUrl(options[1]);
Main.get().startUp.addExt
ension(etWorkspace.getTabWorkspace());
} else {
Main.get().showError("Inv
alid external tab workspace option: " + param);
}
}
Main.get().startUp.getDynamicExtensionsMa
p().remove(className);
if (Main.get().startUp.getDynamicExtensio
nsMap().size() > 0) {
loadDynamicExtensionWidgets();
} else {
Main.get().startUp.startExtension
s();
}
}
@Override
public void onFailure(Throwable caught) {
GeneralComunicator.showError("getConfigPa
ram", caught);
Main.get().startUp.startExtensions();
}
});
}
} }
} }
 End of changes. 12 change blocks. 
5 lines changed or deleted 216 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)