/** * Returns the full Workplace resource path to the selected resource.<p> * * @param resourceName the name of the resource to get the resource path for * * @return the full Workplace resource path to the selected resource */ public String getResourceUri(String resourceName) { return CmsWorkplace.getResourceUri(resourceName); }
/** * Converts an icon file name to a full icon URI.<p> * * @param icon the file name of the icon * * @return the full icon uri */ private String getIconUri(String icon) { return CmsWorkplace.getResourceUri(CmsWorkplace.RES_PATH_FILETYPES + icon); }
/** * Returns the toolbar CSS link.<p> * * @return the toolbar CSS link */ private String getToolbarCssLink() { return CmsWorkplace.getResourceUri(TOOLBAR_CSS); } }
/** * Returns the full Workplace resource path to the selected resource.<p> * * @param resourceName the name of the resource to get the resource path for * * @return the full Workplace resource path to the selected resource */ public String getResourceUri(String resourceName) { return CmsWorkplace.getResourceUri(resourceName); }
/** * Gets external resource from workplace resource folder.<p> * * @param subPath path relative to workplace resource folder * * @return the external resource */ public static ExternalResource getWorkplaceResource(String subPath) { return new ExternalResource(CmsWorkplace.getResourceUri(subPath)); }
/** * Gets the icon resource for the given workplace resource path.<p> * * @param subPath the path relative to the workplace resources * * @return the icon resource */ ExternalResource getIconResource(String subPath) { String resPath = CmsWorkplace.getResourceUri(subPath); return new ExternalResource(resPath); }
/** * Returns the URI of the small resource type icon for the given type.<p> * * @param type the resource type name * * @return the icon URI */ private static String getSmallTypeIconURI(String type) { CmsExplorerTypeSettings typeSettings = OpenCms.getWorkplaceManager().getExplorerTypeSetting(type); if ((typeSettings == null) && LOG.isWarnEnabled()) { LOG.warn("Could not read explorer type settings for " + type); } return typeSettings != null ? CmsWorkplace.getResourceUri(CmsWorkplace.RES_PATH_FILETYPES + typeSettings.getIcon()) : null; }
/** * Returns the script tag for the "*.nocache.js".<p> * * @param moduleName the module name to get the script tag for * @param moduleVersion the module version * * @return the <code>"<script>"</code> tag for the "*.nocache.js".<p> */ public static String createNoCacheScript(String moduleName, String moduleVersion) { String result = "<script type=\"text/javascript\" src=\"" + CmsWorkplace.getResourceUri("ade/" + moduleName + "/" + moduleName + ".nocache.js"); if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(moduleVersion)) { result += "?version=" + moduleVersion + "_" + OpenCms.getSystemInfo().getVersionNumber().hashCode(); } result += "\"></script>"; return result; }
/** * Gets the full path for the big icon.<p> * * @return the full path for the big icon */ public String getBigIconPath() { if ((m_cms != null) && CmsJspNavBuilder.isNavLevelFolder(m_cms, m_resource)) { return CmsWorkplace.getResourceUri(CmsWorkplace.RES_PATH_FILETYPES + CmsIconUtil.ICON_NAV_LEVEL_BIG); } if ((m_cms != null) && CmsResourceTypeXmlContainerPage.isModelReuseGroup(m_cms, m_resource)) { return CmsWorkplace.getResourceUri( CmsWorkplace.RES_PATH_FILETYPES + CmsIconUtil.ICON_MODEL_GROUP_REUSE_BIG); } I_CmsResourceType type = getResourceType(); CmsExplorerTypeSettings explorerType = OpenCms.getWorkplaceManager().getExplorerTypeSetting(type.getTypeName()); String typeIcon = ""; if (explorerType != null) { typeIcon = CmsWorkplace.getResourceUri( CmsWorkplace.RES_PATH_FILETYPES + explorerType.getBigIconIfAvailable()); } return typeIcon; }
itemHtml.append(CmsWorkplace.getResourceUri("tree/empty.gif")); itemHtml.append("\" width=\""); itemHtml.append((pathLevel - 1) * 20);
itemHtml.append(CmsWorkplace.getResourceUri("tree/empty.gif")); itemHtml.append("\" width=\""); itemHtml.append((pathLevel - 1) * 20);
html.append(CmsWorkplace.getResourceUri("commons/login_logo.png")); html.append("\" alt=\"OpenCms Logo\">"); html.append("</div>\n"); html.append(CmsWorkplace.getResourceUri("commons/login.png")); html.append("\" height=\"48\" width=\"48\" alt=\"\">"); html.append("</td>\n");
html.append(CmsWorkplace.getResourceUri("commons/login_logo.png")); html.append("\" alt=\"OpenCms Logo\">"); html.append("</div>\n"); html.append(CmsWorkplace.getResourceUri("commons/login.png")); html.append("\" height=\"48\" width=\"48\" alt=\"\">"); html.append("</td>\n");
/** * Returns the resource type icon path for the given resource.<p> * * Relative to <code>/system/workplace/resources/</code>.<p> * * @return the resource type icon path for the given resource */ public String getIconPathResourceType() { if ((m_cms != null) && CmsJspNavBuilder.isNavLevelFolder(m_cms, m_resource)) { return CmsWorkplace.getResourceUri(CmsWorkplace.RES_PATH_FILETYPES + CmsIconUtil.ICON_NAV_LEVEL_SMALL); } if ((m_cms != null) && CmsResourceTypeXmlContainerPage.isModelReuseGroup(m_cms, m_resource)) { return CmsWorkplace.getResourceUri( CmsWorkplace.RES_PATH_FILETYPES + CmsIconUtil.ICON_MODEL_GROUP_REUSE_SMALL); } if (!isEditable()) { return CmsWorkplace.RES_PATH_FILETYPES + OpenCms.getWorkplaceManager().getExplorerTypeSetting( CmsResourceTypePlain.getStaticTypeName()).getIcon(); } return CmsWorkplace.RES_PATH_FILETYPES + OpenCms.getWorkplaceManager().getExplorerTypeSetting(getResourceTypeName()).getIcon(); }
return CmsWorkplace.getResourceUri(CmsWorkplace.RES_PATH_FILETYPES + CmsIconUtil.ICON_NAV_LEVEL_BIG); realInfo.getIconType()); if (settings != null) { return CmsWorkplace.getResourceUri( CmsWorkplace.RES_PATH_FILETYPES + settings.getBigIconIfAvailable()); return CmsWorkplace.getResourceUri(result);
CmsPrincipalBean principal = entry.getKey(); String icon = principal.isGroup() ? CmsWorkplace.getResourceUri("buttons/group.png") : CmsWorkplace.getResourceUri("buttons/user.png"); String subtitle = ""; if (entry.getValue() != null) {
/** * Returns the available resource types container.<p> * * @return the resource types container */ public static IndexedContainer getResourceTypesContainer() { IndexedContainer types = new IndexedContainer(); types.addContainerProperty(PropertyId.caption, String.class, null); types.addContainerProperty(PropertyId.icon, Resource.class, null); types.addContainerProperty(PropertyId.isFolder, Boolean.class, null); types.addContainerProperty(PropertyId.isXmlContent, Boolean.class, null); for (I_CmsResourceType type : OpenCms.getResourceManager().getResourceTypes()) { CmsExplorerTypeSettings typeSetting = OpenCms.getWorkplaceManager().getExplorerTypeSetting( type.getTypeName()); if (typeSetting != null) { Item typeItem = types.addItem(type); typeItem.getItemProperty(PropertyId.caption).setValue( CmsVaadinUtils.getMessageText(typeSetting.getKey())); typeItem.getItemProperty(PropertyId.icon).setValue( new ExternalResource( CmsWorkplace.getResourceUri(CmsWorkplace.RES_PATH_FILETYPES + typeSetting.getIcon()))); typeItem.getItemProperty(PropertyId.isXmlContent).setValue( Boolean.valueOf(type instanceof CmsResourceTypeXmlContent)); typeItem.getItemProperty(PropertyId.isFolder).setValue( Boolean.valueOf(type instanceof A_CmsResourceTypeFolderBase)); } } return types; }
title, subtitle, CmsWorkplace.getResourceUri("filetypes/" + iconUri)); info.setData(type); m_typeContainer.addComponent(info);
iconPath = CmsWorkplace.RES_PATH_FILETYPES + explorerType.getBigIconIfAvailable(); CmsResourceInfo info = new CmsResourceInfo(title, subtitle, CmsWorkplace.getResourceUri(iconPath)); info.setWidth("100%"); HorizontalLayout hl = new HorizontalLayout();