Returns the gallery service instance.<p>

@return the gallery service instance
519671
protected I_CmsGalleryServiceAsync getGalleryService() {

        if (m_gallerySvc == null) {
            m_gallerySvc = GWT.create(I_CmsGalleryService.class);
            String serviceUrl = CmsCoreProvider.get().link("org.opencms.ade.galleries.CmsGalleryService.gwt");
            ((ServiceDefTarget)m_gallerySvc).setServiceEntryPoint(serviceUrl);
        }
        return m_gallerySvc;
    }
1270753
private CmsGalleryConfiguration createGalleryConfigurationFromRequest(GalleryMode galleryMode) {

        CmsGalleryConfiguration conf = new CmsGalleryConfiguration();
        conf.setGalleryMode(galleryMode);
        conf.setReferencePath(getRequest().getParameter(I_CmsGalleryProviderConstants.CONFIG_REFERENCE_PATH));
        conf.setGalleryPath(getRequest().getParameter(I_CmsGalleryProviderConstants.CONFIG_GALLERY_PATH));
        conf.setCurrentElement(getRequest().getParameter(I_CmsGalleryProviderConstants.CONFIG_CURRENT_ELEMENT));
        String resourceTypes = getRequest().getParameter(I_CmsGalleryProviderConstants.CONFIG_RESOURCE_TYPES);
        String useLinkDefaultTypes = getRequest().getParameter(
            I_CmsGalleryProviderConstants.PARAM_USE_LINK_DEFAULT_TYPES);
        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(resourceTypes)) {
            conf.setResourceTypes(Arrays.asList(resourceTypes.split(",")));
        }
        if (Boolean.parseBoolean(useLinkDefaultTypes)) {
            try {
                CmsObject cms = getCmsObject();
                CmsResource referenceResource = cms.readResource(
                    conf.getReferencePath(),
                    CmsResourceFilter.IGNORE_EXPIRATION);
                String searchTypes = CmsVfsFileWidget.getDefaultSearchTypes(cms, referenceResource);
                conf.setSearchTypes(CmsStringUtil.splitAsList(searchTypes, ","));
            } catch (CmsException e) {
                LOG.warn(e.getLocalizedMessage(), e);
            }
        }

        String galleryTypes = getRequest().getParameter(I_CmsGalleryProviderConstants.CONFIG_GALLERY_TYPES);
        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(galleryTypes)) {
            conf.setGalleryTypes(galleryTypes.split(","));
        }
        String tabs = getRequest().getParameter(I_CmsGalleryProviderConstants.CONFIG_TAB_CONFIG);
        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(tabs)) {
            conf.setTabConfiguration(CmsGalleryTabConfiguration.resolve(tabs));
        } else {
            conf.setTabConfiguration(CmsGalleryTabConfiguration.getDefault());
        }
        String galleryStoragePrefix = getRequest().getParameter(
            I_CmsGalleryProviderConstants.CONFIG_GALLERY_STORAGE_PREFIX);
        if (CmsStringUtil.isEmptyOrWhitespaceOnly(galleryStoragePrefix)) {
            galleryStoragePrefix = "";
        }
        conf.setGalleryStoragePrefix(galleryStoragePrefix);
        return conf;
    }
1000344
public BufferedImage getNewImageInstance() {
        BufferedImage buf = new BufferedImage(image.getWidth(), image.getHeight(), image.getType());
        buf.setData(image.getData());
        return buf;
    }
130072
protected I_CmsPostUploadDialogServiceAsync getDialogService() {

        if (m_dialogService == null) {
            m_dialogService = GWT.create(I_CmsPostUploadDialogService.class);
            String serviceUrl = CmsCoreProvider.get().link("org.opencms.ade.postupload.CmsPostUploadDialogService.gwt");
            ((ServiceDefTarget)m_dialogService).setServiceEntryPoint(serviceUrl);
        }
        return m_dialogService;
    }
995053
public java.util.List<String> getInstancesList() {
        if (instancesList == null) {
            instancesList = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return instancesList;
    }
572811
public static final Renderer<BigDecimal> instance() { // NOPMD it's thread save!
    if (BigDecimalRenderer.instanceRenderer == null) {
      synchronized (BigDecimalRenderer.class) {
        if (BigDecimalRenderer.instanceRenderer == null) {
          BigDecimalRenderer.instanceRenderer = new BigDecimalRenderer();
        }
      }
    }
    return BigDecimalRenderer.instanceRenderer;
  }
1030809
public static OMMapManager getInstance() {
    if (instanceRef.get() == null) {
      synchronized (instanceRef) {
        if (instanceRef.compareAndSet(null, createInstance())) {
          instanceRef.get().init();
        }
      }
    }
    return instanceRef.get();
  }
60526
public void openGallery() throws Exception {

        String galleryPath = getParamResource();
        if ((galleryPath != null) && !galleryPath.endsWith("/")) {
            galleryPath += "/";
        }
        Map<String, String[]> params = new HashMap<String, String[]>();
        Locale locale = OpenCms.getLocaleManager().getDefaultLocale(getCms(), galleryPath);
        params.put("__locale", new String[] {locale.toString()});
        params.put(I_CmsGalleryProviderConstants.CONFIG_GALLERY_MODE, new String[] {GalleryMode.view.name()});
        try {
            if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(galleryPath)) {
                // ensure to have a proper site path to the gallery folder, this is needed within the shared site
                CmsResource galleryFolder = getCms().readResource(galleryPath);
                galleryPath = getCms().getSitePath(galleryFolder);
            }
        } catch (CmsException e) {
            // nothing to do
        }
        params.put(I_CmsGalleryProviderConstants.CONFIG_GALLERY_PATH, new String[] {galleryPath});
        params.put(I_CmsGalleryProviderConstants.CONFIG_RESOURCE_TYPES, new String[] {""});
        sendForward(I_CmsGalleryProviderConstants.VFS_OPEN_GALLERY_PATH, params);
    }
1113364
protected CmsObject getCms() {

        if (m_cms == null) {
            try {
                m_cms = OpenCms.initCmsObject(A_CmsUI.getCmsObject());
                m_cms.getRequestContext().setSiteRoot("");
            } catch (CmsException e) {
                return null;
            }
        }
        return m_cms;
    }
1188364
@SuppressWarnings("deprecation")
    private List<CmsGalleryType> collectGalleryTypes() {

        Locale wpLocale = OpenCms.getWorkplaceManager().getWorkplaceLocale(getCmsObject());
        Map<String, List<String>> galleryContentTypes = new HashMap<String, List<String>>();
        List<CmsGalleryType> result = new ArrayList<CmsGalleryType>();
        for (I_CmsResourceType resourceType : OpenCms.getResourceManager().getResourceTypes()) {
            if (resourceType instanceof CmsResourceTypeFolderExtended) {
                // found a configured extended folder resource type
                CmsResourceTypeFolderExtended galleryType = (CmsResourceTypeFolderExtended)resourceType;
                String folderClassName = galleryType.getFolderClassName();
                if (CmsStringUtil.isNotEmpty(folderClassName)) {
                    // only process this as a gallery if the folder name is not empty
                    try {
                        // check, if the folder class is a subclass of A_CmsGallery
                        if (A_CmsAjaxGallery.class.isAssignableFrom(Class.forName(folderClassName))) {
                            CmsGalleryType gallery = new CmsGalleryType();
                            gallery.setTypeId(resourceType.getTypeId());
                            gallery.setResourceType(resourceType.getTypeName());
                            gallery.setTitle(
                                CmsWorkplaceMessages.getResourceTypeName(wpLocale, resourceType.getTypeName()));
                            gallery.setSubTitle(
                                CmsWorkplaceMessages.getResourceTypeDescription(wpLocale, resourceType.getTypeName()));
                            gallery.setBigIconClasses(
                                CmsIconUtil.getIconClasses(resourceType.getTypeName(), null, false));
                            result.add(gallery);
                        }
                    } catch (Exception e) {
                        this.log(e.getLocalizedMessage(), e);
                    }
                }
            } else {
                List<I_CmsResourceType> galleryTypes = resourceType.getGalleryTypes();
                if ((galleryTypes != null) && !galleryTypes.isEmpty()) {
                    for (I_CmsResourceType galleryType : galleryTypes) {
                        List<String> typeList = galleryContentTypes.get(galleryType.getTypeName());
                        if (typeList == null) {
                            typeList = new ArrayList<String>();
                            galleryContentTypes.put(galleryType.getTypeName(), typeList);
                        }
                        typeList.add(resourceType.getTypeName());
                    }
                }
            }
        }
        for (CmsGalleryType galleryType : result) {
            galleryType.setContentTypeNames(galleryContentTypes.get(galleryType.getResourceType()));
        }
        return result;
    }
408417
protected static I_CmsPublishServiceAsync getService() {

        if (SERVICE == null) {
            SERVICE = GWT.create(I_CmsPublishService.class);
            String serviceUrl = CmsCoreProvider.get().link("org.opencms.ade.publish.CmsPublishService.gwt");
            ((ServiceDefTarget)SERVICE).setServiceEntryPoint(serviceUrl);
        }
        return SERVICE;
    }
1162491
private static CmsGalleryDataBean getGalleryDataFromDict() throws SerializationException {

        return (CmsGalleryDataBean)CmsRpcPrefetcher.getSerializedObjectFromDictionary(
            CmsGalleryController.getGalleryService(),
            CmsGalleryDataBean.DICT_NAME);
    }
520626
public static cmpparameter get(nitro_service service) throws Exception{
		cmpparameter obj = new cmpparameter();
		cmpparameter[] response = (cmpparameter[])obj.get_resources(service);
		return response[0];
	}
711242
public java.util.List<Image> getImages() {
        if (images == null) {
            images = new com.amazonaws.internal.SdkInternalList<Image>();
        }
        return images;
    }
388226
private List<CmsGalleryFolderBean> buildGalleriesList(Map<String, CmsGalleryTypeInfo> galleryTypes) {

        List<CmsGalleryFolderBean> list = new ArrayList<CmsGalleryFolderBean>();
        if (galleryTypes == null) {
            return list;
        }
        Iterator<Entry<String, CmsGalleryTypeInfo>> iGalleryTypes = galleryTypes.entrySet().iterator();
        while (iGalleryTypes.hasNext()) {
            Entry<String, CmsGalleryTypeInfo> ent = iGalleryTypes.next();
            CmsGalleryTypeInfo tInfo = ent.getValue();
            ArrayList<String> contentTypes = new ArrayList<String>();
            Iterator<I_CmsResourceType> it = tInfo.getContentTypes().iterator();
            while (it.hasNext()) {
                contentTypes.add(String.valueOf(it.next().getTypeName()));
            }
            Iterator<CmsResource> ir = tInfo.getGalleries().iterator();
            while (ir.hasNext()) {
                CmsResource res = ir.next();
                CmsGalleryFolderBean bean = new CmsGalleryFolderBean();
                String sitePath = getCmsObject().getSitePath(res);
                String title = "";
                try {
                    // read the gallery title
                    title = getCmsObject().readPropertyObject(
                        sitePath,
                        CmsPropertyDefinition.PROPERTY_TITLE,
                        false).getValue("");
                } catch (CmsException e) {
                    // error reading title property
                    logError(e);
                }
                // sitepath as gallery id
                bean.setPath(sitePath);
                // content types
                bean.setContentTypes(contentTypes);
                // title
                bean.setTitle(title);
                // gallery type name
                bean.setResourceType(tInfo.getResourceType().getTypeName());
                bean.setEditable(isEditable(getCmsObject(), res));
                bean.setBigIconClasses(
                    CmsIconUtil.getIconClasses(CmsIconUtil.getDisplayType(getCmsObject(), res), sitePath, false));
                list.add(bean);
            }
        }
        return list;
    }
954900
public String buildImageInformation() {

        // count all image resources of the gallery folder
        int count = 0;
        try {
            int imageId = OpenCms.getResourceManager().getResourceType(
                CmsResourceTypeImage.getStaticTypeName()).getTypeId();
            CmsResourceFilter filter = CmsResourceFilter.IGNORE_EXPIRATION.addRequireType(imageId);
            List<CmsResource> images = getCms().readResources(getParamResource(), filter, false);
            count = images.size();
        } catch (CmsException e) {
            // ignore this exception
        }

        Object[] args = new Object[] {getParamResource(), new Integer(count)};
        return key(Messages.GUI_RENAMEIMAGES_INFO_IMAGECOUNT_2, args);
    }
1316087
public Map<String, String> getImageDnd() {

        if (m_imageDnd == null) {
            m_imageDnd = CmsCollectionsGenericWrapper.createLazyMap(new CmsImageDndTransformer());
        }
        return m_imageDnd;
    }