
org.dashbuilder.displayer.client.widgets.ExternalComponentPropertiesEditor Maven / Gradle / Ivy
/*
* 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.dashbuilder.displayer.client.widgets;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.function.Consumer;
import java.util.stream.Stream;
import javax.annotation.PostConstruct;
import javax.enterprise.context.Dependent;
import javax.inject.Inject;
import com.google.gwt.user.client.ui.IsWidget;
import com.google.gwt.user.client.ui.Widget;
import org.dashbuilder.displayer.client.resources.i18n.CommonConstants;
import org.dashbuilder.external.model.ComponentParameter;
import org.dashbuilder.external.model.ExternalComponent;
import org.dashbuilder.external.service.ComponentService;
import org.jboss.errai.common.client.api.Caller;
import org.uberfire.client.mvp.UberView;
import org.uberfire.ext.properties.editor.model.PropertyEditorCategory;
import org.uberfire.ext.properties.editor.model.PropertyEditorFieldInfo;
import org.uberfire.ext.properties.editor.model.PropertyEditorType;
import org.uberfire.ext.properties.editor.model.validators.MandatoryValidator;
import org.uberfire.ext.widgets.common.client.common.BusyIndicatorView;
@Dependent
public class ExternalComponentPropertiesEditor implements IsWidget {
private static final CommonConstants i18n = CommonConstants.INSTANCE;
private static final MandatoryValidator MANDATORY_VALIDATOR = new MandatoryValidator();
private static final String DEFAULT_CATEGORY = "Component Properties";
public interface View extends UberView {
void componentNotFound();
void addCategories(Collection categories);
void noPropertiesComponent();
}
@Inject
View view;
@Inject
Caller externalComponentService;
@Inject
BusyIndicatorView loading;
private ExternalComponent currentComp;
Map settings;
Consumer
© 2015 - 2025 Weber Informatics LLC | Privacy Policy