diff --git a/.gitignore b/.gitignore
index ffc0c373861..0dd90f7ae69 100644
--- a/.gitignore
+++ b/.gitignore
@@ -169,6 +169,7 @@ packages/dashbuilder/**/dependency-reduced-pom.xml
packages/dashbuilder/dashbuilder-runtime-parent/dashbuilder-runtime-client/src/main/webapp/dashbuilder/component
**/.apt_generated/
**/.apt_generated_tests/
+packages/dashbuilder/**/.checkstyle
#kie-sandbox-fs
packages/kie-sandbox-fs/dist
@@ -266,4 +267,4 @@ fabric.properties
# xml-parser-ts-codegen on some packages
packages/bpmn-marshaller/**/ts-gen
packages/dmn-marshaller/**/ts-gen
-packages/scesim-marshaller/**/ts-gen
\ No newline at end of file
+packages/scesim-marshaller/**/ts-gen
diff --git a/packages/dashbuilder-component-table/static/index.css b/packages/dashbuilder-component-table/static/index.css
index b6c2e78cd35..af4ef0c5783 100644
--- a/packages/dashbuilder-component-table/static/index.css
+++ b/packages/dashbuilder-component-table/static/index.css
@@ -17,7 +17,7 @@
background-color: #dfdfdf !important;
}
[mode="dark"] .selected-row {
- background-color: #393555 !important;
+ background-color: #454545 !important;
}
[mode="dark"] {
--pf-global--Color--100: #eef1fa !important;
@@ -26,7 +26,7 @@
--pf-global--primary-color--100: var(--pf-global--primary-color--light-100) !important;
--pf-global--link--Color: var(--pf-global--link--Color--light) !important;
--pf-global--link--Color--hover: var(--pf-global--link--Color--light) !important;
- --pf-global--BackgroundColor--100: #100c2a !important;
+ --pf-global--BackgroundColor--100: rgb(27, 29, 33) !important;
}
[mode="dark"] body,
@@ -39,25 +39,25 @@
--pf-global--primary-color--100: var(--pf-global--primary-color--light-100) !important;
--pf-global--link--Color: var(--pf-global--link--Color--light) !important;
--pf-global--link--Color--hover: var(--pf-global--link--Color--light) !important;
- --pf-global--BackgroundColor--100: #100c2a !important;
+ --pf-global--BackgroundColor--100: rgb(27, 29, 33) !important;
}
[mode="dark"] .pf-c-options-menu__menu,
[mode="dark"] .pf-c-pagination__nav,
[mode="dark"] .pf-c-pagination__total-items {
- background-color: #100c2a !important;
+ background-color: rgb(27, 29, 33) !important;
color: #eef1fa;
}
[mode="dark"] .pf-c-options-menu__menu-item:hover,
[mode="dark"] .pf-c-table tr.pf-m-hoverable:hover {
- background-color: #393555;
+ background-color: #454545;
color: #eef1fa;
}
[mode="dark"] .pf-c-form-control {
--pf-global--Color--100: #eef1fa !important;
- --pf-global--BackgroundColor--100: #100c2a !important;
+ --pf-global--BackgroundColor--100: rgb(27, 29, 33) !important;
}
[mode="dark"] .pf-c-form-control:disabled {
diff --git a/packages/dashbuilder/appformer/pom.xml b/packages/dashbuilder/appformer/pom.xml
deleted file mode 100644
index b3b22cd9d41..00000000000
--- a/packages/dashbuilder/appformer/pom.xml
+++ /dev/null
@@ -1,1112 +0,0 @@
-
-
-
- * For classes in the default package, items 1 and 2 are omitted. - * @param c the class whose name to abbreviate. Can be null, but will result in a null return value. - * @return the abbreviated FQCN as described, or null if the input is null. - */ - public static String abbreviatedName(Class> c) { - if (c == null) { - return null; - } - StringBuilder result = new StringBuilder(); - String fqcn = c.getName(); - int lastDot = -1; - int thisDot = -1; - while ((thisDot = fqcn.indexOf('.', - thisDot + 1)) != -1) { - result.append(fqcn.charAt(lastDot + 1)); - lastDot = thisDot; - } - if (lastDot != -1) { - result.append('.'); - } - result.append(fqcn.substring(lastDot + 1)); - return result.toString(); - } - - /** - * Returns the short name of the given class (no package name). This is the same as java.lang.Class.shortName(), - * which is not implemented in the GWT version of java.lang.Class. - * @param c the class whose name to abbreviate. Can be null, but will result in a null return value. - * @return the abbreviated FQCN as described, or null if the input is null. - */ - public static String shortName(Class> c) { - if (c == null) { - return null; - } - return c.getName().substring(c.getName().lastIndexOf('.') + 1); - } -} diff --git a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/lifecycle/OnClose.java b/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/lifecycle/OnClose.java deleted file mode 100644 index 9605644c83d..00000000000 --- a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/lifecycle/OnClose.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2015 Red Hat, Inc. and/or its affiliates. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.uberfire.lifecycle; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Inherited; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Methods annotated with this will be called by the Workbench immediately after a WorkbenchPart is closed. - * WorkbenchParts can perform any clean-up tasks in the annotated method, but this does not include removing the view - * widget from the DOM; this will have already been taken care of by the framework. The method must take zero - * arguments and return void. - */ -@Inherited -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.METHOD}) -public @interface OnClose { - -} diff --git a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/lifecycle/OnContextAttach.java b/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/lifecycle/OnContextAttach.java deleted file mode 100644 index e77794b7472..00000000000 --- a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/lifecycle/OnContextAttach.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2015 Red Hat, Inc. and/or its affiliates. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.uberfire.lifecycle; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Inherited; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -@Inherited -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.METHOD}) -public @interface OnContextAttach { - -} diff --git a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/lifecycle/OnFocus.java b/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/lifecycle/OnFocus.java deleted file mode 100644 index 2b2867628f2..00000000000 --- a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/lifecycle/OnFocus.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2015 Red Hat, Inc. and/or its affiliates. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.uberfire.lifecycle; - -import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; -import java.lang.annotation.Inherited; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Indicates that the framework should call the target method when the activity is the current activity in the current - * panel. Activities may choose to make their UI more prominent, or begin refreshing their data more aggressively when - * they are focused. - *
- * This annotation only has meaning on methods declared in or inherited by {@code @WorkbenchScreen} or - * {@code @WorkbenchEditor} classes. - *
- * The target method must take no arguments and return void. - */ -@Inherited -@Documented -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.METHOD}) -public @interface OnFocus { - -} diff --git a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/lifecycle/OnLostFocus.java b/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/lifecycle/OnLostFocus.java deleted file mode 100644 index 13538d0a5d1..00000000000 --- a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/lifecycle/OnLostFocus.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2015 Red Hat, Inc. and/or its affiliates. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.uberfire.lifecycle; - -import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; -import java.lang.annotation.Inherited; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Indicates that the framework should call the target method when the activity is no longer the current activity in the - * current panel. Typically, methods bearing this annotation will undo whatever effects they set up on the corresponding - * {@link OnFocus} method. - *
- * This annotation only has meaning on methods declared in or inherited by {@code @WorkbenchScreen} or - * {@code @WorkbenchEditor} classes. - *
- * The target method must take no arguments and return void. - */ -@Inherited -@Documented -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.METHOD}) -public @interface OnLostFocus { - -} diff --git a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/lifecycle/OnMayClose.java b/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/lifecycle/OnMayClose.java deleted file mode 100644 index 02566a990e4..00000000000 --- a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/lifecycle/OnMayClose.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2015 Red Hat, Inc. and/or its affiliates. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.uberfire.lifecycle; - -import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; -import java.lang.annotation.Inherited; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Methods annotated with this will be called by the Workbench before the WorkbenchPart is closed. The method must be non-private, - * take zero arguments and return a boolean indicating whether the WorkbenchPart can be closed (true, it can be closed; - * false it cannot be closed). - *
- * This annotation only works on methods of classes annotated with {@code @WorkbenchScreen} or {@code @WorkbenchEditor}. - */ -@Documented -@Inherited -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.METHOD}) -public @interface OnMayClose { - -} diff --git a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/lifecycle/OnOpen.java b/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/lifecycle/OnOpen.java deleted file mode 100644 index 86b9c94273b..00000000000 --- a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/lifecycle/OnOpen.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2015 Red Hat, Inc. and/or its affiliates. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.uberfire.lifecycle; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Inherited; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Methods annotated with this are called by the Workbench when a WorkbenchPart - * is displayed. OnOpen annotated methods are called after the WorkbenchPart's - * OnStartup annotated method. The method should take zero arguments and return - * void. - */ -@Inherited -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.METHOD}) -public @interface OnOpen { - -} diff --git a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/lifecycle/OnSave.java b/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/lifecycle/OnSave.java deleted file mode 100644 index 5d9d6ffd6ff..00000000000 --- a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/lifecycle/OnSave.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2015 Red Hat, Inc. and/or its affiliates. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.uberfire.lifecycle; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Inherited; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * @deprecated The code generated by use of this annotation will never be called by the UberFire framework. Use an - * application-defined mechanism (perhaps a Saveable interface or a CDI event) instead. - */ -@Inherited -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.METHOD}) -public @interface OnSave { - -} diff --git a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/lifecycle/OnShutdown.java b/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/lifecycle/OnShutdown.java deleted file mode 100644 index c1c3afbab27..00000000000 --- a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/lifecycle/OnShutdown.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2015 Red Hat, Inc. and/or its affiliates. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.uberfire.lifecycle; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Inherited; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -@Inherited -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.METHOD}) -public @interface OnShutdown { - -} diff --git a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/lifecycle/OnStartup.java b/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/lifecycle/OnStartup.java deleted file mode 100644 index af63144a08d..00000000000 --- a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/lifecycle/OnStartup.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2015 Red Hat, Inc. and/or its affiliates. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.uberfire.lifecycle; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Inherited; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - *
- * Methods annotated with this are called by the Workbench before methods - * annotated with {@code @OnOpen}. WorkbenchParts should perform any - * initialisation activities here (for example load their content from a - * persistent store). - *
- *- * For {@code @WorkbenchEditor}'s the method should take a single argument of - * type {@code org.drools.guvnor.vfs.Path}. The Path specifies the URI for the - * resource to be edited. For {@code @WorkbenchScreen} 's the method should have - * zero arguments. The method should return void. - *
- */ -@Inherited -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.METHOD}) -public @interface OnStartup { - -} diff --git a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/lifecycle/Validate.java b/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/lifecycle/Validate.java deleted file mode 100644 index b680d899094..00000000000 --- a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/lifecycle/Validate.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2020 Red Hat, Inc. and/or its affiliates. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * - * - */ - -package org.uberfire.lifecycle; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Inherited; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -@Inherited -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.METHOD}) -public @interface Validate { - -} diff --git a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/mvp/BiParameterizedCommand.java b/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/mvp/BiParameterizedCommand.java deleted file mode 100644 index aabf567a0bf..00000000000 --- a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/mvp/BiParameterizedCommand.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2018 Red Hat, Inc. and/or its affiliates. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.uberfire.mvp; - -import java.util.function.BiConsumer; - -/** - * A command representing a future activity, with two parameters. Similar to {@link BiConsumer} - * This was deliberately created in addition to the existing GWT Command to allow better - * re-use of menu structures when a WorkbenchPart is embedded within Eclipse. - * This is the two-arity specialization of {@link ParameterizedCommand} - */ -@FunctionalInterface -public interface BiParameterizedCommand
- * Place requests can be serialized to and created from a valid URL fragment identifier (the string that goes after the
- * {@code #} in the browser's location bar).
- */
-@JsType
-public interface PlaceRequest {
-
- public static final PlaceRequest NOWHERE = new DefaultPlaceRequest("NOWHERE");
-
- String getIdentifier();
-
- void setIdentifier(String identifier);
-
- String getFullIdentifier();
-
- String getParameter(final String key,
- final String defaultValue);
-
- Set
- * For example, the following returns a PlaceRequest with identifier {@code MyPlaceID} and two parameters,
- * {@code param1} and {@code param2}.
- *
- * This method takes a list and converts it to a new list so it can be
- * iterated over in the current script (e.g. using enhanced for loops), even
- * if the instance was provided by an external (GWT-compiled) script.
- *
- * @param externalList A list, possibly provided by an external script. Must not be null.
- * @return an immutable list containing the original elements of the
- * provided list
- */
- public static
- * This method takes a set and converts it to a new set so it can be
- * iterated over in the current script (e.g. using enhanced for loops), even
- * if the instance was provided by an external (GWT-compiled) script.
- *
- * @param externalSet A set, possibly provided by an external script. Must not be null.
- * @return an immutable set containing the original elements of the provided
- * set
- */
- public static
- * This method converts a regular int to an {@link Integer} using -1 as a
- * placeholder for null.
- *
- * @param value
- * @return boxed {@link Integer}, null if provided value is -1.
- */
- public static Integer toInteger(int value) {
- return (value != -1) ? value : null;
- }
-}
diff --git a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/util/URIUtil.java b/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/util/URIUtil.java
deleted file mode 100644
index 2335de87b2c..00000000000
--- a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/util/URIUtil.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.uberfire.util;
-
-import java.io.UnsupportedEncodingException;
-import java.net.URI;
-import java.net.URLDecoder;
-import java.net.URLEncoder;
-
-/**
- * Utilities for working with URIs that functions the same in both client and server code.
- *
- * Implementation note: there is a separate GWT super-source implementation of this class for client-side use. If
- * modifying this class, be sure to go modify that one too.
- */
-public final class URIUtil {
-
- public static String encode(final String content) {
- try {
- return URLEncoder.encode(content,
- "UTF-8");
- } catch (UnsupportedEncodingException e) {
- }
- return null;
- }
-
- public static String decode(final String content) {
- try {
- return URLDecoder.decode(content,
- "UTF-8");
- } catch (UnsupportedEncodingException e) {
- }
- return null;
- }
-
- public static String encodeQueryString(final String content) {
- return encode(content);
- }
-
- public static boolean isValid(final String uri) {
- try {
- URI.create(uri);
- return true;
- } catch (final Exception ignored) {
- }
- return false;
- }
-}
diff --git a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/workbench/events/NotificationEvent.java b/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/workbench/events/NotificationEvent.java
deleted file mode 100644
index 97ef4a3fe40..00000000000
--- a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/workbench/events/NotificationEvent.java
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.uberfire.workbench.events;
-
-import org.jboss.errai.common.client.api.annotations.Portable;
-import org.uberfire.mvp.PlaceRequest;
-
-/**
- * An event to show a notification pop-up in the Workbench
- */
-@Portable
-public class NotificationEvent implements UberFireEvent {
-
- private String notification;
- private NotificationType type;
- private boolean isSingleton;
- private PlaceRequest placeRequest;
- private Integer initialTopOffset;
- private boolean autoHide = true;
- private String navigationText;
- private PlaceRequest navigationPlace;
-
- public NotificationEvent() {
- }
-
- public NotificationEvent(final String notification) {
- this(notification,
- NotificationType.DEFAULT,
- false,
- null);
- }
-
- public NotificationEvent(final String notification,
- final NotificationType type) {
- this(notification,
- type,
- false,
- null);
- }
-
- public NotificationEvent(final String notification,
- final boolean isSingleton) {
- this(notification,
- NotificationType.DEFAULT,
- isSingleton,
- null);
- }
-
- public NotificationEvent(final String notification,
- final NotificationType type,
- final boolean isSingleton) {
- this(notification,
- NotificationType.DEFAULT,
- isSingleton,
- null);
- }
-
- public NotificationEvent(final String notification,
- final NotificationType type,
- final boolean isSingleton,
- final PlaceRequest placeRequest) {
-
- this(notification,
- type,
- isSingleton,
- placeRequest,
- null);
- }
-
- public NotificationEvent(final String notification,
- final NotificationType type,
- final boolean isSingleton,
- final PlaceRequest placeRequest,
- final Integer initialTopOffset) {
-
- this.notification = notification;
- this.type = type;
- this.isSingleton = isSingleton;
- this.placeRequest = placeRequest;
- this.initialTopOffset = initialTopOffset;
- }
-
- public String getNotification() {
- return this.notification;
- }
-
- public NotificationType getType() {
- return type;
- }
-
- public boolean isSingleton() {
- return isSingleton;
- }
-
- public PlaceRequest getPlaceRequest() {
- return placeRequest;
- }
-
- public Integer getInitialTopOffset() {
- return initialTopOffset;
- }
-
- public NotificationEvent setAutoHide(final boolean autoHide) {
- this.autoHide = autoHide;
- return this;
- }
-
- public boolean autoHide() {
- return autoHide;
- }
-
- public NotificationEvent setNavigation(final String text,
- final PlaceRequest place) {
- this.navigationText = text;
- this.navigationPlace = place;
- return this;
- }
-
- public boolean hasNavigation() {
- return navigationText != null
- && navigationPlace != null;
- }
-
- public String getNavigationText() {
- return navigationText;
- }
-
- public PlaceRequest getNavigationPlace() {
- return navigationPlace;
- }
-
- @Override
- public String toString() {
- return "NotificationEvent [notification=" + notification + ", type=" + type + "]";
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + (isSingleton ? 1231 : 1237);
- result = prime * result + ((notification == null) ? 0 : notification.hashCode());
- result = prime * result + ((placeRequest == null) ? 0 : placeRequest.hashCode());
- result = prime * result + ((initialTopOffset == null) ? 0 : initialTopOffset.hashCode());
- result = prime * result + ((type == null) ? 0 : type.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj) {
- return true;
- }
- if (obj == null) {
- return false;
- }
- if (getClass() != obj.getClass()) {
- return false;
- }
- NotificationEvent other = (NotificationEvent) obj;
- if (isSingleton != other.isSingleton) {
- return false;
- }
- if (notification == null) {
- if (other.notification != null) {
- return false;
- }
- } else if (!notification.equals(other.notification)) {
- return false;
- }
- if (placeRequest == null) {
- if (other.placeRequest != null) {
- return false;
- }
- } else if (!placeRequest.equals(other.placeRequest)) {
- return false;
- }
- if (initialTopOffset == null) {
- if (other.initialTopOffset != null) {
- return false;
- }
- } else if (!initialTopOffset.equals(other.initialTopOffset)) {
- return false;
- }
- if (type != other.type) {
- return false;
- }
- return true;
- }
-
- public static enum NotificationType {
- DEFAULT,
- ERROR,
- SUCCESS,
- INFO,
- WARNING
- }
-}
\ No newline at end of file
diff --git a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/workbench/events/UberFireEvent.java b/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/workbench/events/UberFireEvent.java
deleted file mode 100644
index e1715214cad..00000000000
--- a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/workbench/events/UberFireEvent.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.uberfire.workbench.events;
-
-/**
- * Marker interface that serves to group all UberFire framework events
- * together. For example, this allows you to create a single CDI observer that
- * observes all framework events.
- */
-public interface UberFireEvent {
-
-}
diff --git a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/workbench/model/ActivityResourceType.java b/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/workbench/model/ActivityResourceType.java
deleted file mode 100644
index e169fbef42a..00000000000
--- a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/workbench/model/ActivityResourceType.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package org.uberfire.workbench.model;
-
-public enum ActivityResourceType {
- UNKNOWN,
- SCREEN,
- PERSPECTIVE,
- POPUP;
-
-
-}
\ No newline at end of file
diff --git a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/workbench/model/AppFormerActivities.java b/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/workbench/model/AppFormerActivities.java
deleted file mode 100644
index 9ef646ac6a3..00000000000
--- a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/workbench/model/AppFormerActivities.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- *
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.uberfire.workbench.model;
-
-import java.util.List;
-
-/**
- * Defines the list of entities used in the workbench
- * If no backend implementation for this class exists, a default one will be provided.
- */
-public interface AppFormerActivities {
-
- /**
- * Returns list of all the editors IDs used in the workbench.
- *
- * @return List of all editors.
- */
- List
- * Positions that refer to the same field name compare equal to each other.
- *
- * Instances of this class are immutable.
- */
-@Portable
-public class NamedPosition implements Position {
-
- /**
- * Represents the root panel of any templated perspective.
- */
- public static final NamedPosition ROOT = new NamedPosition("");
-
- private final String fieldName;
-
- /**
- * Creates a new position representing the ErraiUI {@code @DataField} with the given name.
- * If you are trying to refer to the root of the template itself, use {@link #ROOT}.
- *
- * @param fieldName the name of the data field. Must be non-null.
- */
- public NamedPosition(@MapsTo("fieldName") String fieldName) {
- this.fieldName = checkNotNull("fieldName",
- fieldName);
- }
-
- /**
- * Returns the data field name this Position refers to.
- *
- * @return a non-null string. For the special {@link #ROOT} position constant, this is the empty string.
- */
- @Override
- public String getName() {
- return fieldName;
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((fieldName == null) ? 0 : fieldName.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj) {
- return true;
- }
- if (obj == null) {
- return false;
- }
- if (getClass() != obj.getClass()) {
- return false;
- }
- NamedPosition other = (NamedPosition) obj;
- if (fieldName == null) {
- if (other.fieldName != null) {
- return false;
- }
- } else if (!fieldName.equals(other.fieldName)) {
- return false;
- }
- return true;
- }
-
- @Override
- public String toString() {
- return "NamedPosition{" +
- "fieldName='" + fieldName + '\'' +
- '}';
- }
-}
diff --git a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/workbench/model/PanelDefinition.java b/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/workbench/model/PanelDefinition.java
deleted file mode 100644
index 5b29245fb01..00000000000
--- a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/workbench/model/PanelDefinition.java
+++ /dev/null
@@ -1,319 +0,0 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.uberfire.workbench.model;
-
-import java.util.List;
-import java.util.Set;
-
-import jsinterop.annotations.JsIgnore;
-import jsinterop.annotations.JsMethod;
-import jsinterop.annotations.JsType;
-import org.uberfire.mvp.PlaceRequest;
-import org.uberfire.mvp.impl.DefaultPlaceRequest;
-
-/**
- * Describes a physical region within a Workbench Perspective. Panels have a set physical size that they occupy, which
- * is divided up between any panel decorations (a tab bar or dropdown list is common), one or more Parts (generally
- * Editors or Screens), one of which can be visible at a time, and also child Panel Definitions, all of which are
- * visible simultaneously.
- */
-@JsType
-public interface PanelDefinition {
-
- /**
- * Special value for {@link #getPanelType()}. When adding a new child panel to a parent panel, if the child panel
- * has this type, the parent can create any type of PanelPresenter it likes. Typically, each panel type will have
- * some constant default child type that it uses in this scenario.
- */
- String PARENT_CHOOSES_TYPE = "PARENT_CHOOSES_TYPE";
-
- /**
- * Returns the DOM ID that will be given to a panel created from this definition. If null, no ID attribute will be
- * set on a panel created from this definition.
- */
- public String getElementId();
-
- /**
- * Specifies the DOM ID that should be given to the live panel's element. Applications are responsible for ensuring
- * the ID values are unique among all live panels.
- * @param id the DOM ID to give the panel when it is created. If null, no ID will be set on the panel.
- */
- public void setElementId(final String id);
-
- /**
- * Specifies content that should be put in this panel's main display area when it is materialized. The content to
- * add is specified by a PartDefinition, at the core of which is a {@link PlaceRequest} that identifies a
- * WorkbenchActivity (either a screen or an editor).
- *
- * If the given part already belongs to an existing panel, it will be removed from that panel by a call to
- * removePart(part).
- * @param part The Part to add. Must not be null. The part's place must specify a WorkbenchActivity bean.
- */
- public void addPart(final PartDefinition part);
-
- /**
- * Specifies content that should be put in this panel's main display area when it is materialized.
- *
- * This is a convenience method equivalent to
- * addPart(new PartDefinitionImpl(DefaultPlaceRequest.parse(partSpec))).
- * @param partSpec An PlaceRequest ID with optional parameters, encoded as specified in
- * {@link DefaultPlaceRequest#parse(CharSequence)}. Must not be null. The place ID must specify a
- * WorkbenchActivity bean (either a screen or an editor).
- * @return the PartDefinition object that was created and added to this panel definition.
- */
- @JsMethod(name = "addPartById")
- public PartDefinition addPart(final String partSpec);
-
- /**
- * Removes the given part definition from this panel definition.
- * @param part The Part to be removed
- * @return true if the part was found and removed; false if it did not belong to this panel in the first place.
- */
- public boolean removePart(final PartDefinition part);
-
- /**
- * Get the Parts contained in the Panel
- * @return The parts
- */
- public Set
- * TODO remove this. parent panels should track the positions of their children; making it a property of the child
- * is error-prone when moving panels around in the UI.
- * @return The Position of the Panel
- */
- public Position getPosition();
-
- /**
- * Set the Position of the Panel relative to it's parent.
- *
- * TODO remove this. parent panels should track the positions of their children; making it a property of the child
- * is error-prone when moving panels around in the UI.
- * @param position The Position of the Panel relative to it's parent
- */
- public void setPosition(Position position);
-
- /**
- * Has the Panel been expanded to a maximum size
- * @return true If maximized
- */
- public boolean isMaximized();
-
- ContextDefinition getContextDefinition();
-
- void setContextDefinition(final ContextDefinition contextDefinition);
-
- ContextDisplayMode getContextDisplayMode();
-
- void setContextDisplayMode(final ContextDisplayMode contextDisplayMode);
-
- /**
- * Invokes {@link #toString()} but exported to JavaScript so it can be invoked from different scripts.
- */
- default String asString() {
- return this.toString();
- }
-}
diff --git a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/workbench/model/PartDefinition.java b/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/workbench/model/PartDefinition.java
deleted file mode 100644
index f41a1c166af..00000000000
--- a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/workbench/model/PartDefinition.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.uberfire.workbench.model;
-
-import jsinterop.annotations.JsType;
-import org.uberfire.mvp.PlaceRequest;
-
-/**
- * Describes the assignment of a {@link PlaceRequest} to a tab/card/item in a {@link PanelDefinition}. Given this
- * information, you can find out (or dictate) which panel within the current perspective will contain the GUI element
- * for the given PlaceRequest. However, the {@link PartDefinition} does not contain any information about the GUI
- * itself, presumably because PartDefinition objects can be sent to the server. The UI (Widget) information is contained
- * with UIPart. The mapping of PartDefinitions to UIParts is maintained by a PanelManager.
- */
-@JsType
-public interface PartDefinition {
-
- PlaceRequest getPlace();
-
- void setPlace(final PlaceRequest place);
-
- PanelDefinition getParentPanel();
-
- void setParentPanel(final PanelDefinition parentPanel);
-
- ContextDefinition getContextDefinition();
-
- void setContextDefinition(final ContextDefinition contextDefinition);
-
- ContextDisplayMode getContextDisplayMode();
-
- void setContextDisplayMode(final ContextDisplayMode contextDisplayMode);
-
- /**
- * Invokes {@link #toString()} but exported to JavaScript so it can be invoked from different scripts.
- */
- default String asString() {
- return this.toString();
- }
-
- boolean isSelectable();
-
- void setSelectable(boolean selectable);
-}
diff --git a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/workbench/model/PerspectiveDefinition.java b/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/workbench/model/PerspectiveDefinition.java
deleted file mode 100644
index d40040ab116..00000000000
--- a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/workbench/model/PerspectiveDefinition.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.uberfire.workbench.model;
-
-import jsinterop.annotations.JsType;
-
-/**
- * Meta-data defining a Perspective. A Perspective is a set of Panels and Parts arranged within the Workbench. The
- * Workbench has exactly one active Perspective at a time. The Perspective contains multiple Panels. Each Panel contains
- * multiple Parts, one of which can be visible at a time. Panels can also contain child panels which are all visible at
- * the same time are are physically located within the bounds of the parent panel. Each Part is associated with one
- * PlaceRequest.
- *
- * Implementations of this interface must be marked with Errai's {@code @Portable} annotation.
- */
-@JsType
-public interface PerspectiveDefinition {
-
- /**
- * Get the name of the Perspective.
- * @return The name of the Perspective.
- */
- public String getName();
-
- /**
- * Set the name of the Perspective.
- * @param name The name of the Perspective.
- */
- public void setName(final String name);
-
- /**
- * Get the root Panel for this Perspective. The root Panel contains all
- * child Panels. A Perspective is based on a single root Panel.
- * @return The root Panel.
- */
- public PanelDefinition getRoot();
-
- ContextDefinition getContextDefinition();
-
- void setContextDefinition(final ContextDefinition contextDefinition);
-
- ContextDisplayMode getContextDisplayMode();
-
- void setContextDisplayMode(final ContextDisplayMode contextDisplayMode);
-}
diff --git a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/workbench/model/Position.java b/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/workbench/model/Position.java
deleted file mode 100644
index 0b0b96e8003..00000000000
--- a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/workbench/model/Position.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.uberfire.workbench.model;
-
-import jsinterop.annotations.JsType;
-import org.jboss.errai.common.client.api.annotations.Portable;
-
-/**
- * Tells a PanelManager implementation where to place a part within a panel. Each PanelManager has its own layout
- * system, and implements its own unique set of Position objects (for example, the North-South-East-West panel manager
- * uses compass directions, and the Templated panel manager uses element names).
- *
- * All implementations of this interface must be marked as {@link Portable}.
- */
-@JsType
-public interface Position {
-
- String getName();
-}
diff --git a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/workbench/model/impl/ContextDefinitionImpl.java b/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/workbench/model/impl/ContextDefinitionImpl.java
deleted file mode 100644
index 6224783853d..00000000000
--- a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/workbench/model/impl/ContextDefinitionImpl.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.uberfire.workbench.model.impl;
-
-import org.jboss.errai.common.client.api.annotations.MapsTo;
-import org.jboss.errai.common.client.api.annotations.Portable;
-import org.uberfire.mvp.PlaceRequest;
-import org.uberfire.workbench.model.ContextDefinition;
-
-@Portable
-public class ContextDefinitionImpl implements ContextDefinition {
-
- private PlaceRequest place;
-
- public ContextDefinitionImpl(@MapsTo("place") final PlaceRequest place) {
- this.place = place;
- }
-
- @Override
- public PlaceRequest getPlace() {
- return place;
- }
-
- @Override
- public void setPlace(final PlaceRequest place) {
- this.place = place;
- }
-}
diff --git a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/workbench/model/impl/CustomPanelDefinitionImpl.java b/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/workbench/model/impl/CustomPanelDefinitionImpl.java
deleted file mode 100644
index 028ca938385..00000000000
--- a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/workbench/model/impl/CustomPanelDefinitionImpl.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright 2017 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.uberfire.workbench.model.impl;
-
-import java.util.Optional;
-
-import com.google.gwt.user.client.ui.HasWidgets;
-import org.jboss.errai.common.client.dom.HTMLElement;
-import org.uberfire.workbench.model.CustomPanelDefinition;
-
-public class CustomPanelDefinitionImpl extends PanelDefinitionImpl implements CustomPanelDefinition {
-
- private HTMLElement htmlElementContainer;
- private HasWidgets hasWidgetsContainer;
- private elemental2.dom.HTMLElement elemental2HtmlElementContainer;
-
- public CustomPanelDefinitionImpl(String panelType,
- HasWidgets hasWidgetsContainer) {
-
- super(panelType);
- this.hasWidgetsContainer = hasWidgetsContainer;
- }
-
- public CustomPanelDefinitionImpl(String panelType,
- HTMLElement htmlElementContainer) {
- super(panelType);
- this.htmlElementContainer = htmlElementContainer;
- }
-
- public CustomPanelDefinitionImpl(String panelType,
- elemental2.dom.HTMLElement htmlElementContainer){
- super(panelType);
- this.elemental2HtmlElementContainer = htmlElementContainer;
- }
-
- @Override
- public Optional
- * This annotation should only be used in classes annotated with {@link WorkbenchPerspective}, and it cannot be used in
- * a class that has fields annotated with {@link WorkbenchPanel}.
- */
-@Inherited
-@Retention(RetentionPolicy.RUNTIME)
-@Target({ElementType.METHOD})
-public @interface Perspective {
-
-}
diff --git a/packages/dashbuilder/appformer/uberfire-client-api/src/main/java/org/uberfire/client/annotations/WorkbenchContext.java b/packages/dashbuilder/appformer/uberfire-client-api/src/main/java/org/uberfire/client/annotations/WorkbenchContext.java
deleted file mode 100644
index 7389fa29d56..00000000000
--- a/packages/dashbuilder/appformer/uberfire-client-api/src/main/java/org/uberfire/client/annotations/WorkbenchContext.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.uberfire.client.annotations;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-@Inherited
-@Retention(RetentionPolicy.RUNTIME)
-@Target({ElementType.TYPE})
-public @interface WorkbenchContext {
-
- String identifier();
-}
diff --git a/packages/dashbuilder/appformer/uberfire-client-api/src/main/java/org/uberfire/client/annotations/WorkbenchPanel.java b/packages/dashbuilder/appformer/uberfire-client-api/src/main/java/org/uberfire/client/annotations/WorkbenchPanel.java
deleted file mode 100644
index b2de1c62e0f..00000000000
--- a/packages/dashbuilder/appformer/uberfire-client-api/src/main/java/org/uberfire/client/annotations/WorkbenchPanel.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.uberfire.client.annotations;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Specifies an UberFire workbench panel within a templated perspective.
- *
- *
- * To specify a PlaceRequest with parameters, use standard URL query syntax:
- *
- *
- * Special characters can be escaped using URL encoding: for '%' use '%25'; for '&' use '%26'; for '=' use '%3d';
- * for '?' use '%3f'.
- */
- String[] parts();
-
- /**
- * Makes this panel the first panel in the generated PerspectiveDefinition object. Some panel presenters may treat
- * their first child panel specially (for example, by forwarding addPanel requests to it). If no panel within a
- * perspective is explicitly marked as the default, a randomly selected panel will be first. It is an error to
- * define more than one default panel in a perspective.
- */
- boolean isDefault() default false;
-}
diff --git a/packages/dashbuilder/appformer/uberfire-client-api/src/main/java/org/uberfire/client/annotations/WorkbenchPartTitle.java b/packages/dashbuilder/appformer/uberfire-client-api/src/main/java/org/uberfire/client/annotations/WorkbenchPartTitle.java
deleted file mode 100644
index ff502724dce..00000000000
--- a/packages/dashbuilder/appformer/uberfire-client-api/src/main/java/org/uberfire/client/annotations/WorkbenchPartTitle.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.uberfire.client.annotations;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Methods annotated with this provide a {@code java.lang.String} title for the
- * WorkbenchPart. The method should have zero arguments and return a
- * {@code java.lang.String}.
- */
-@Inherited
-@Retention(RetentionPolicy.RUNTIME)
-@Target({ElementType.METHOD})
-public @interface WorkbenchPartTitle {
-
-}
diff --git a/packages/dashbuilder/appformer/uberfire-client-api/src/main/java/org/uberfire/client/annotations/WorkbenchPartTitleDecoration.java b/packages/dashbuilder/appformer/uberfire-client-api/src/main/java/org/uberfire/client/annotations/WorkbenchPartTitleDecoration.java
deleted file mode 100644
index bafdeccc057..00000000000
--- a/packages/dashbuilder/appformer/uberfire-client-api/src/main/java/org/uberfire/client/annotations/WorkbenchPartTitleDecoration.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.uberfire.client.annotations;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Methods annotated with this provide a {@code java.lang.String} title for the
- * WorkbenchPart. The method should have zero arguments and return a
- * {@code com.google.gwt.user.client.ui.IsWidget}.
- */
-@Inherited
-@Retention(RetentionPolicy.RUNTIME)
-@Target({ElementType.METHOD})
-public @interface WorkbenchPartTitleDecoration {
-
-}
diff --git a/packages/dashbuilder/appformer/uberfire-client-api/src/main/java/org/uberfire/client/annotations/WorkbenchPartView.java b/packages/dashbuilder/appformer/uberfire-client-api/src/main/java/org/uberfire/client/annotations/WorkbenchPartView.java
deleted file mode 100644
index ae332df4bdf..00000000000
--- a/packages/dashbuilder/appformer/uberfire-client-api/src/main/java/org/uberfire/client/annotations/WorkbenchPartView.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.uberfire.client.annotations;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Methods annotated with this provide the view for the WorkbenchPart. The
- * method should have zero arguments and return a
- * {@code com.google.gwt.user.client.ui.IsWidget} or preferably a
- * {@code org.jboss.errai.common.client.api.IsElement}.
- */
-@Inherited
-@Retention(RetentionPolicy.RUNTIME)
-@Target({ElementType.METHOD})
-public @interface WorkbenchPartView {
-
-}
diff --git a/packages/dashbuilder/appformer/uberfire-client-api/src/main/java/org/uberfire/client/annotations/WorkbenchPerspective.java b/packages/dashbuilder/appformer/uberfire-client-api/src/main/java/org/uberfire/client/annotations/WorkbenchPerspective.java
deleted file mode 100644
index 35f0b7d75ea..00000000000
--- a/packages/dashbuilder/appformer/uberfire-client-api/src/main/java/org/uberfire/client/annotations/WorkbenchPerspective.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.uberfire.client.annotations;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import org.uberfire.mvp.PlaceRequest;
-import org.uberfire.workbench.model.PerspectiveDefinition;
-
-/**
- * Indicates that the target class defines a Perspective in the workbench.
- *
- * There are two options for defining the arrangement of panels and parts within the perspective: either
- * programmatically build a {@link PerspectiveDefinition} object, or declare panel structure and content using Errai UI
- * templates. Note that you cannot mix the two approaches.
- *
- *
- *
- *
- * At its simplest form the Class should extend
- * {@code com.google.gwt.user.client.ui.PopupPanel} and provide a method
- * annotated with {@code @OnOpen}.
- *
- * Developers wishing to separate view from logic (perhaps by implementing the
- * MVP pattern) can further provide a zero-argument method annotated with
- * {@code @WorkbenchPartView} with return type
- * {@code com.google.gwt.user.client.ui.PopupPanel}.
- *
- * In this latter case the {@code @WorkbenchPopup} need not extend
- * {@code com.google.gwt.user.client.ui.PopupPanel}.
- *
- * WorkbechPopups can receive the following life-cycle calls:
- *
- * All classes annotated with {@code @WorkbenchScreen} must have a declared or inherited method annotated with
- * {@code @WorkbenchPartTitle}.
- *
- * There are two options for providing the screen's view:
- *
- * Developers wishing to separate view from logic via the MVP pattern will choose the second option.
- *
- * WorkbechScreens can receive the following life-cycle calls:
- *
- * Developers wishing to implement MVP-based Elements are encouraged to have
- * their View implement this interface if they require access to the appropriate
- * Presenter.
- * @param
- * Developers wishing to implement MVP-based Widgets are encouraged to have
- * their View implement this interface if they require access to the appropriate
- * Presenter.
- * @param
- * Important Note: Due an issue related to multiple Application Server
- * support, all types that implement this interface needs to register itself on
- * PriorityDisposableRegistry (preferable on constructor).
- * @see Disposable
- * @see PriorityDisposableRegistry
- */
-public interface PriorityDisposable extends Disposable {
-
- int priority();
-}
diff --git a/packages/dashbuilder/appformer/uberfire-commons/src/main/java/org/uberfire/commons/lifecycle/PriorityDisposableRegistry.java b/packages/dashbuilder/appformer/uberfire-commons/src/main/java/org/uberfire/commons/lifecycle/PriorityDisposableRegistry.java
deleted file mode 100644
index d937ff34ce7..00000000000
--- a/packages/dashbuilder/appformer/uberfire-commons/src/main/java/org/uberfire/commons/lifecycle/PriorityDisposableRegistry.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.uberfire.commons.lifecycle;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-public final class PriorityDisposableRegistry {
-
- private static Set
- * The date format, combination of p, P, h, hh, i, ii, s, ss, d, dd, m, mm, M, MM, yy, yyyy.
- * p meridian in lower case ('am' or 'pm') - according to locale file
- * P meridian in upper case ('AM' or 'PM') - according to locale file
- * s seconds without leading zeros
- * ss seconds, 2 digits with leading zeros
- * i minutes without leading zeros
- * ii minutes, 2 digits with leading zeros
- * h hour without leading zeros - 24-hour format
- * hh hour, 2 digits with leading zeros - 24-hour format
- * H hour without leading zeros - 12-hour format
- * HH hour, 2 digits with leading zeros - 12-hour format
- * d day of the month without leading zeros
- * dd day of the month, 2 digits with leading zeros
- * m numeric representation of month without leading zeros
- * mm numeric representation of the month, 2 digits with leading zeros
- * M short textual representation of a month, three letters
- * MM full textual representation of a month, such as January or March
- * yy two digit representation of a year
- * yyyy full numeric representation of a year, 4 digits
- *
- * GWT's DateFormat constants:
- * @see com.google.gwt.i18n.client.DateTimeFormat
- *
- * G era designator Text AD
- * y year Number 1996
- * L standalone month in year Text or Number July (or) 07
- * M month in year Text or Number July (or) 07
- * d day in month Number 10
- * h hour in am/pm (1-12) Number 12
- * H hour in day (0-23) Number 0
- * m minute in hour Number 30
- * s second in minute Number 55
- * S fractional second Number 978
- * E day of week Text Tuesday
- * c standalone day of week Text Tuesday
- * a am/pm marker Text PM
- * k hour in day (1-24) Number 24
- * K hour in am/pm (0-11) Number 0
- * z time zone Text Pacific Standard Time(see comment)
- * Z time zone (RFC 822) Text -0800(See comment)
- * v time zone id Text America/Los_Angeles(See comment)
- * ' escape for text Delimiter 'Date='
- * '' single quote Literal 'o''clock'
- **/
- public static String convertToBS3DateFormat(final String gwtDateFormat) {
- if (!isValidGWTDateFormat(gwtDateFormat)) {
- return DEFAULT;
- }
-
- final StringBuilder src = new StringBuilder(gwtDateFormat);
- final StringBuilder tgt = new StringBuilder();
- int idx = 0;
- while (idx < gwtDateFormat.length()) {
- boolean mapped = false;
- for (Mapping mapping : mappings) {
- if (src.indexOf(mapping.src) == 0) {
- if (mapping.tgt != null) {
- tgt.append(mapping.tgt);
- }
- src.delete(0,
- mapping.src.length());
- idx = idx + mapping.src.length() - 1;
- mapped = true;
- break;
- }
- }
- if (!mapped) {
- tgt.append(src.charAt(0));
- src.deleteCharAt(0);
- }
- idx++;
- }
- return tgt.toString();
- }
-
- private static boolean isValidGWTDateFormat(final String gwtDateFormat) {
- try {
- DateTimeFormat.getFormat(gwtDateFormat);
- } catch (IllegalArgumentException iae) {
- return false;
- }
- return true;
- }
-
- private static class Mapping {
-
- private final String src;
- private final String tgt;
-
- Mapping(final String src,
- final String tgt) {
- this.src = src;
- this.tgt = tgt;
- }
- }
-}
diff --git a/packages/dashbuilder/appformer/uberfire-extensions/uberfire-widgets/uberfire-widgets-commons/src/main/java/org/uberfire/ext/widgets/common/client/common/DecoratedDisclosurePanel.java b/packages/dashbuilder/appformer/uberfire-extensions/uberfire-widgets/uberfire-widgets-commons/src/main/java/org/uberfire/ext/widgets/common/client/common/DecoratedDisclosurePanel.java
deleted file mode 100644
index 5ee3736e5ed..00000000000
--- a/packages/dashbuilder/appformer/uberfire-extensions/uberfire-widgets/uberfire-widgets-commons/src/main/java/org/uberfire/ext/widgets/common/client/common/DecoratedDisclosurePanel.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Copyright 2015 JBoss, by Red Hat, Inc
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.uberfire.ext.widgets.common.client.common;
-
-import java.util.Iterator;
-
-import com.google.gwt.event.logical.shared.CloseEvent;
-import com.google.gwt.event.logical.shared.CloseHandler;
-import com.google.gwt.event.logical.shared.HasCloseHandlers;
-import com.google.gwt.event.logical.shared.HasOpenHandlers;
-import com.google.gwt.event.logical.shared.OpenEvent;
-import com.google.gwt.event.logical.shared.OpenHandler;
-import com.google.gwt.event.shared.HandlerRegistration;
-import com.google.gwt.resources.client.ImageResource;
-import com.google.gwt.user.client.ui.Composite;
-import com.google.gwt.user.client.ui.DisclosurePanel;
-import com.google.gwt.user.client.ui.HasWidgets;
-import com.google.gwt.user.client.ui.Widget;
-
-/**
- * Disclosure panel with rounded corners in header.
- *
- * Using this class we don't need to set the header and event handlers for the header everywhere we use DisclosurePanels.
- */
-public class DecoratedDisclosurePanel extends Composite
- implements
- HasWidgets,
- HasOpenHandlers
- * Furthermore this Modal provides:
- *
- * DefaultPlaceRequest.parse("MyPlaceID?param1=val1¶m2=val2")
- *
- * @param partNameAndParams specification of the place ID and optional parameter map. Special characters in the identifier, key
- * name, or key value can be escaped using URL encoding: for '%' use '%25'; for '&' use '%26'; for
- * '=' use '%3d'; for '?' use '%3f'.
- * @return a new PlaceRequest configured according to the given string.
- */
- public static PlaceRequest parse(CharSequence partNameAndParams) {
- MapPrerequisites
- * This annotation can only be used within a class annotated with {@link WorkbenchPerspective}, and it must target a
- * field that implements the GWT HasWidgets interface. Further, the class this annotation is used in must not have a
- * method annotated with {@link Perspective}. See {@link WorkbenchPerspective} for details.
- */
-@Retention(RetentionPolicy.RUNTIME)
-@Target({ElementType.FIELD})
-public @interface WorkbenchPanel {
-
- /**
- * The Presenter type of the panel. Must be a Dependent-scoped Errai IOC bean which implements
- * WorkbenchPanelPresenter. The default is SimpleWorkbenchPanelPresenter.
- */
- Class/* TODO extends WorkbenchPanelPresenter */> panelType() default Void.class;
-
- /**
- * Specifies the PlaceRequests that should be used to populate this panel with parts when the containing perspective
- * is first launched. For panel types that only support a single part (such as StaticWorkbenchPanelPresenter), only
- * one item should be used here.
- *
- * {@code @WorkbenchPanel(parts = "MyPlaceID?param1=val1¶m2=val2")}
- *
- * Programmatic Perspective Definition
- * To define the perspective layout programmatically, create a zero-argument method annotated with {@code @Perspective}
- * that returns a {@link PerspectiveDefinition}.
- * Templated Perspective Definition
- * To declare perspective layout using templates, make the class an Errai UI templated component, and then add the
- * {@link WorkbenchPanel} annotation to one or more of its {@code @DataField} widgets. This designates them as panel
- * containers and allows you to specify which parts should be added to them when the perspective launches.
- * Perspective Lifecycle
- * WorkbenchPerspectives receive the standard set of lifecycle calls for a Workbench component:
- *
- *
- */
-@Inherited
-@Retention(RetentionPolicy.RUNTIME)
-@Target({ElementType.TYPE})
-public @interface WorkbenchPerspective {
-
- /**
- * The place ID to associate with this perspective.
- * @see PlaceRequest
- */
- String identifier();
-
- /**
- * Indicates that this perspective should be opened by default when the
- * workbench first starts. Exactly one perspective in the whole application
- * should be marked as default.
- */
- boolean isDefault() default false;
-
- /**
- * If true (the default), every time this perspective is displayed, it
- * should start fresh with the {@link PerspectiveDefinition} returned by the
- * method annotated with {@code @Perspective}. If false, the framework will
- * store the structure of the perspective (panel arrangements and part
- * placement as modified by the user opening and closing tabs, dragging
- * parts around, and resizing split panels) on the server individually for
- * each user, and use that stored definition in preference to the one
- * returned by the {@code @Perspective} method.
- */
- boolean isTransient() default true;
-
- /**
- * Indicates that this perspective can be discovered and loaded at runtime.
- * This is useful when building plugins or extensions where the perspective
- * is part of an external script loaded at runtime, as opposed to being
- * statically compiled into the main application.
- */
- boolean isDynamic() default false;
-}
diff --git a/packages/dashbuilder/appformer/uberfire-client-api/src/main/java/org/uberfire/client/annotations/WorkbenchPopup.java b/packages/dashbuilder/appformer/uberfire-client-api/src/main/java/org/uberfire/client/annotations/WorkbenchPopup.java
deleted file mode 100644
index eaed9b5e4d4..00000000000
--- a/packages/dashbuilder/appformer/uberfire-client-api/src/main/java/org/uberfire/client/annotations/WorkbenchPopup.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.uberfire.client.annotations;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Classes annotated with this are considered Workbench popups.
- *
- *
- *
- *
- *
- */
-@Inherited
-@Retention(RetentionPolicy.RUNTIME)
-@Target({ElementType.TYPE})
-public @interface WorkbenchScreen {
-
- /**
- * Identifier that should be unique within application.
- */
- String identifier();
-
- /**
- * By default, a Workbench Screen will show up in the current active perspective. If this parameter is specified,
- * this screen will only be shown on the given perspective. An attempt to navigate to this screen when
- * a different perspective is active will first result in a switch to the owning perspective, then the screen will
- * be shown in that perspective.
- */
- Class> owningPerspective() default void.class;
-
- /**
- * Defines the preferred height. Preferred means that this Height will be used only if this screen
- * is the trigger to create a new panel, if panel already exists this information is ignored.
- */
- int preferredHeight() default -1;
-
- /**
- * Defines the preferred width. Preferred means that this Width will be used only if this screen
- * is the trigger to create a new panel, if panel already exists this information is ignored.
- */
- int preferredWidth() default -1;
-
- /**
- * Indicates that this screen can be discovered and loaded at runtime.
- * This is useful when building plugins or extensions where the screen
- * is part of an external script loaded at runtime, as opposed to being
- * statically compiled into the main application.
- */
- boolean isDynamic() default false;
-}
diff --git a/packages/dashbuilder/appformer/uberfire-client-api/src/main/java/org/uberfire/client/annotations/WorkbenchSplashScreen.java b/packages/dashbuilder/appformer/uberfire-client-api/src/main/java/org/uberfire/client/annotations/WorkbenchSplashScreen.java
deleted file mode 100644
index e96c22d934d..00000000000
--- a/packages/dashbuilder/appformer/uberfire-client-api/src/main/java/org/uberfire/client/annotations/WorkbenchSplashScreen.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.uberfire.client.annotations;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-@Inherited
-@Retention(RetentionPolicy.RUNTIME)
-@Target({ElementType.TYPE})
-public @interface WorkbenchSplashScreen {
-
- String identifier();
-
- boolean isEnabled() default true;
-}
diff --git a/packages/dashbuilder/appformer/uberfire-client-api/src/main/java/org/uberfire/client/mvp/UberElement.java b/packages/dashbuilder/appformer/uberfire-client-api/src/main/java/org/uberfire/client/mvp/UberElement.java
deleted file mode 100644
index a90d68ae0a4..00000000000
--- a/packages/dashbuilder/appformer/uberfire-client-api/src/main/java/org/uberfire/client/mvp/UberElement.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright 2016 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.uberfire.client.mvp;
-
-import org.jboss.errai.common.client.api.IsElement;
-
-/**
- * Interface to inject a Presenter into a View for MVP-based Element
- * implementations. Due to limitations with CDI it is not possible to {@code @Inject}
- * the correct instance of a Presenter into a View.
- * promisify(final Caller) resolve::onInvoke,
- defaultRpcErrorCallback(reject))));
- }
-
- /**
- * Promisifies a {@link Caller} remote call. If an exception is thrown inside the call function, the
- * resulting Promise is rejected with a {@link org.uberfire.client.promise.Promises.Error} instance.
- */
- public promisify(final Caller) resolve::onInvoke,
- defaultRpcErrorCallback(reject))));
- }
-
- private
- *
- *
- *
- */
-public class BaseModal extends Modal {
-
- private ModalBody body;
-
- public BaseModal() {
- setDataBackdrop(ModalBackdrop.STATIC);
- setDataKeyboard(true);
- setRemoveOnHide(true);
- setHideOtherModals(false);
- setShowHandler();
- setKeyPressHandler();
- getElement().setId("panel-id");
- addShowHandler(new ModalShowHandler() {
- @Override
- public void onShow(ModalShowEvent evt) {
- Modal modal = evt.getModal();
- modal.getElement().setAttribute("maxHeight",
- "100px");
- modal.getElement().setAttribute("overflowY",
- "scroll");
- }
- });
- }
-
- @Override
- public void show() {
- super.show();
- }
-
- private void setKeyPressHandler() {
- this.addDomHandler(getEnterDomHandler(),
- KeyDownEvent.getType());
- }
-
- protected KeyDownHandler getEnterDomHandler() {
- return new KeyDownHandler() {
- @Override
- public void onKeyDown(KeyDownEvent event) {
- if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) {
- if (handleDefaultAction()) {
- event.preventDefault();
- event.stopPropagation();
- }
- }
- }
- };
- }
-
- private void setShowHandler() {
- //Setting Focus in show() doesn't work so set after Modal is shown
- addShownHandler(new ModalShownHandler() {
- @Override
- public void onShown(ModalShownEvent shownEvent) {
- setFocus(BaseModal.this,
- Boolean.FALSE);
- }
- });
- }
-
- //Set focus on first widget. Ideally we'd only scan the body of the Modal but this is
- //not accessible from sub-classes so we ignore some Focusable elements in the Header
- protected boolean setFocus(final HasWidgets container,
- Boolean found) {
- for (final Widget w : container) {
- if (w instanceof CloseButton) {
- continue;
- } else if (w instanceof Focusable) {
- ((Focusable) w).setFocus(true);
- found = true;
- } else if (w instanceof HasWidgets) {
- found = setFocus(((HasWidgets) w),
- found);
- }
- if (Boolean.TRUE.equals(found)) {
- break;
- }
- }
- return found;
- }
-
- //When