Opens the dialog given the loaded gallery configuration.<p>

@param configuration the gallery configuration
765661
protected void openDialog(I_CmsGalleryConfiguration configuration) {

        Document.get().getBody().addClassName(I_CmsButton.ButtonData.WAND_BUTTON.getIconClass());
        if (m_dialog == null) {
            SimplePanel tabsContainer = new SimplePanel();
            tabsContainer.addStyleName(I_CmsLayoutBundle.INSTANCE.containerpageCss().menuTabContainer());
            int dialogHeight = CmsToolbarPopup.getAvailableHeight();
            int dialogWidth = CmsToolbarPopup.getAvailableWidth();
            m_dialog = createDialog(configuration, new I_CmsGalleryHandler() {

                public boolean filterDnd(CmsResultItemBean resultBean) {

                    return CmsGwtConstants.TYPE_IMAGE.equals(resultBean.getType());
                }

                public Widget getAdditionalTypeTabControl() {

                    return null;
                }

                public I_CmsAutoHider getAutoHideParent() {

                    return getPopup();
                }

                public CmsDNDHandler getDndHandler() {

                    return CmsContainerpageController.get().getDndHandler();
                }

                public void processResultItem(CmsResultListItem item) {

                    item.setData(DND_MARKER);
                    item.setDndHelperClass("imagedrag");
                    item.setDndParentClass(
                        "imageparent "
                            + org.opencms.ade.galleries.client.ui.css.I_CmsLayoutBundle.INSTANCE.galleryResultItemCss().tilingList());
                    //item.setDragHelperTransformer(DRAG_HELPER_TRANSFORMER);
                }

            });
            m_dialog.setDialogSize(dialogWidth, dialogHeight);
            getPopup().setWidth(dialogWidth);
            tabsContainer.add(m_dialog);
            m_contentPanel.add(tabsContainer);
        } else {
            int dialogWidth = CmsToolbarPopup.getAvailableWidth();
            getPopup().setWidth(dialogWidth);
            m_dialog.truncate("GALLERY_DIALOG_TM", dialogWidth);
            m_dialog.updateSizes();
        }
    }
226568
protected void performSingleResourceOperation(String resourceName, int dialogAction) throws CmsException {

        // store original name to use for lock action
        String originalResourceName = resourceName;
        CmsResource res = getCms().readResource(resourceName, CmsResourceFilter.ALL);
        if (res.isFolder() && !resourceName.endsWith("/")) {
            resourceName += "/";
        }
        org.opencms.lock.CmsLock lock = getCms().getLock(res);
        // perform action depending on dialog uri
        switch (dialogAction) {
            case TYPE_LOCKCHANGE:
            case TYPE_LOCK:
                if (lock.isNullLock()) {
                    getCms().lockResource(originalResourceName);
                } else if (!lock.isDirectlyOwnedInProjectBy(getCms())) {
                    getCms().changeLock(resourceName);
                }
                break;
            case TYPE_UNLOCK:
            default:
                if (lock.isNullLock()) {
                    break;
                }
                if (lock.isOwnedBy(getCms().getRequestContext().getCurrentUser())) {
                    getCms().unlockResource(resourceName);
                }
        }
    }
464573
public ActionConfiguration withConfiguration(java.util.Map<String, String> configuration) {
        setConfiguration(configuration);
        return this;
    }
737980
void openAddUserDialog() {

        CmsPrincipalSelectDialog dialog;

        final Window window = CmsBasicDialog.prepareWindow(DialogWidth.max);

        dialog = new CmsPrincipalSelectDialog(
            this,
            m_stateBean.getPath(),
            window,
            WidgetType.userwidget,
            true,
            WidgetType.userwidget);

        try {
            dialog.setOuComboBoxEnabled(
                !OpenCms.getOrgUnitManager().readOrganizationalUnit(m_cms, m_stateBean.getPath()).hasFlagWebuser()
                    | m_stateBean.getType().equals(CmsOuTreeType.ROLE));
        } catch (CmsException e) {
            LOG.error("Can not read OU.", e);
        }
        window.setCaption(CmsVaadinUtils.getMessageText(Messages.GUI_USERMANAGEMENT_ADD_USER_TO_GROUP_0));
        window.setContent(dialog);
        A_CmsUI.get().addWindow(window);

    }
832513
public void setOpen(boolean open) {

        m_opened = open;
        if (m_opened) {
            // show content
            m_visibilityStyle.setValue(
                I_CmsLayoutBundle.INSTANCE.generalCss().cornerAll()
                    + " "
                    + I_CmsLayoutBundle.INSTANCE.fieldsetCss().fieldsetVisible());
            m_opener.setDown(true);
        } else {
            // hide content
            m_visibilityStyle.setValue(I_CmsLayoutBundle.INSTANCE.fieldsetCss().fieldsetInvisible());
            m_opener.setDown(false);
        }
        CmsDomUtil.resizeAncestor(getParent());
    }
553118
void iniStartView(CmsUserSettings settings) {

        IndexedContainer container = getStartViewContainer("caption");
        if (container.size() > 0) {
            m_startview.setEnabled(true);
            m_startview.setContainerDataSource(container);
            m_startview.setItemCaptionPropertyId("caption");
            m_startview.setNullSelectionAllowed(false);
            m_startview.setNewItemsAllowed(false);
            if (container.getItemIds().size() > 0) {
                m_startview.select(container.getItemIds().get(0));
                if (settings != null) {
                    m_startview.select(settings.getStartView());
                }
            }
        } else {
            m_startview.setEnabled(false);
        }
    }
83502
public void loadConfiguration()
	{

		XMLFileChooser fc = new XMLFileChooser();
		if (fc.showOpenDialog(new JPanel()) == XMLFileChooser.APPROVE_OPTION) {
			this.loadConfig(fc.getSelectedFile().getPath());
		}
	}
1138721
@Override
	public void open(Configuration configuration) throws Exception {
		if (logFailuresOnly) {
			callback = new Callback() {
				@Override
				public void onCompletion(RecordMetadata metadata, Exception e) {
					if (e != null) {
						LOG.error("Error while sending record to Kafka: " + e.getMessage(), e);
					}
					acknowledgeMessage();
				}
			};
		}
		else {
			callback = new Callback() {
				@Override
				public void onCompletion(RecordMetadata metadata, Exception exception) {
					if (exception != null && asyncException == null) {
						asyncException = exception;
					}
					acknowledgeMessage();
				}
			};
		}

		super.open(configuration);
	}
267034
public void openDialog(String dialogId, String contextType, List<CmsUUID> resources) {

        openDialog(dialogId, contextType, resources, null);
    }
994531
void openPopup() {

        try {
            if (m_popup == null) {
                m_popup = new CmsPopup(Messages.get().key(Messages.GUI_LOCATION_DIALOG_TITLE_0), hasMap() ? 1020 : 420);
                m_popupContent = new CmsLocationPopupContent(
                    this,
                    new CmsLocationSuggestOracle(this),
                    getModeItems(),
                    getTypeItems(),
                    getZoomItems());
                setFieldVisibility();
                m_popup.setMainContent(m_popupContent);
                m_popup.addDialogClose(null);
            }
            m_popup.center();
            m_popup.show();
            initialize();
            updateForm();
        } catch (Throwable t) {
            CmsErrorDialog.handleException(t);
        }
    }
935793
protected void openEditDialog(boolean isNew, String mode, CmsEditHandlerData handlerDataForNew) {

        CmsContainerpageController.get().getContentEditorHandler().openDialog(
            m_editableData,
            isNew,
            m_parentResourceId,
            mode,
            handlerDataForNew);
    }
415715
@Override
    public void applyConfiguration(@NonNull Configuration configuration) {
        if (!wasInitialised.get()) {
            globalLock.writeLock().lock();

            this.configuration = configuration;

            globalLock.writeLock().unlock();
        }
    }
124967
public void openInfoDialog(CmsResource resource, String startTab) {

        getRpcProxy(I_CmsGwtDialogClientRpc.class).openInfoDialog(resource.getStructureId().toString(), startTab);
    }
392893
public static void openFavoriteDialog(CmsFileExplorer explorer) {

        try {
            CmsExplorerFavoriteContext context = new CmsExplorerFavoriteContext(A_CmsUI.getCmsObject(), explorer);
            CmsFavoriteDialog dialog = new CmsFavoriteDialog(context, new CmsFavoriteDAO(A_CmsUI.getCmsObject()));
            Window window = CmsBasicDialog.prepareWindow(DialogWidth.max);
            window.setContent(dialog);
            window.setCaption(CmsVaadinUtils.getMessageText(org.opencms.ui.Messages.GUI_FAVORITES_DIALOG_TITLE_0));
            A_CmsUI.get().addWindow(window);
            window.center();
        } catch (CmsException e) {
            CmsErrorDialog.showErrorDialog(e);
        }
    }
213872
public static boolean start(final String configurationFilename) {
        try {
            if (getPm() == null) {
                instance = new PresentationManager(configurationFilename);
            }
            return isActive();
        } catch (Exception ex) {
            instance = null;
            Logger.getRootLogger().fatal("Unable to initialize jPM", ex);
            return false;
        }
    }
465872
public final synchronized void initialize(Map<String,String> configuration)
    {
        if(this.initialized)
        {
            throw new FaxException("Request parser already initialized.");
        }
        
        //set flag
        this.initialized=true;
        
        //initialize
        this.initializeImpl(configuration);
    }
916712
public void init(String configuration) {

        // initialize the members
        m_additionalButtons = new ArrayList<String>(OPTIONAL_BUTTONS_LIST.size());
        m_configuration = configuration;
        m_editorHeight = EDITOR_DEFAULTHEIGHT;
        m_hiddenButtons = new ArrayList<String>();
        // initialize the widget options
        parseOptions(configuration);
    }