/** * @param resources * the resources to set */ public void setResources(final String resources) { m_resources = CmsStringUtil.splitAsArray(resources, ","); }
/** * @param paths * the paths to set */ public void setParamPaths(final String paths) { m_paths = CmsStringUtil.splitAsArray(paths, ","); }
/** * @param resources * the resources to set */ public void setResources(final String resources) { m_resources = CmsStringUtil.splitAsArray(resources, ","); }
/** * Sets the type.<p> * * @param types the type to set */ public void setTypes(String types) { m_types = CmsStringUtil.splitAsArray(types, ","); }
/** * @param paths the paths to set */ public void setParamPaths(final String paths) { m_paths = CmsStringUtil.splitAsArray(paths, ','); }
/** * Sets the type.<p> * * @param types the type to set */ public void setTypes(String types) { m_types = CmsStringUtil.splitAsArray(types, ","); }
/** * @param resources * the resources to set */ public void setResources(final String resources) { m_resources = CmsStringUtil.splitAsArray(resources, ","); }
/** * @param props the props to set */ public void setParamProps(final String props) { m_props = CmsStringUtil.splitAsArray(props, ','); }
/** * Gets the default pool.<p> * * @return name of the default pool */ public String getPool() { return CmsStringUtil.splitAsArray(getExtProperty("db.pools"), ",")[0]; }
/** * Convenience method to set exactly one search root.<p> * * @param searchRoot the search root to set * * @see #setSearchRoots(String[]) */ public void setSearchRoot(String searchRoot) { setSearchRoots(CmsStringUtil.splitAsArray(searchRoot, ",")); }
/** * Convenience method to set exactly one search root.<p> * * @param searchRoot the search root to set * * @see #setSearchRoots(String[]) */ public void setSearchRoot(String searchRoot) { setSearchRoots(CmsStringUtil.splitAsArray(searchRoot, ",")); }
/** * @see org.opencms.workplace.list.A_CmsListReport#initializeThread() */ @Override public I_CmsReportThread initializeThread() { I_CmsReportThread exportThread = new CmsLanguageCopyThread( getCms(), CmsStringUtil.splitAsArray(m_copyresources, ","), Boolean.valueOf(m_paramDelete).booleanValue(), m_sourcelanguage, m_targetlanguage); return exportThread; }
/** * @return the resourcses to copy */ public String[] getCopyResources() { List<CmsListItem> items = getSelectedItems(); String paths = ""; boolean initial = true; for (CmsListItem item : items) { if (!initial) { paths.concat(","); } paths.concat(String.valueOf(item.get(LIST_COLUMN_PATH))); initial = false; } return CmsStringUtil.splitAsArray(paths, ","); }
/** * Registers all tool handlers recursively for a given tool root.<p> * * @param cms the cms context object * @param toolRoot the tool root * @param len the recursion level * @param handlers the list of handlers to register */ private void registerHandlerList(CmsObject cms, CmsToolRootHandler toolRoot, int len, List handlers) { boolean found = false; Iterator it = handlers.iterator(); while (it.hasNext()) { I_CmsToolHandler handler = (I_CmsToolHandler)it.next(); int myLen = CmsStringUtil.splitAsArray(handler.getPath(), TOOLPATH_SEPARATOR).length; if (((len == myLen) && !handler.getPath().equals(TOOLPATH_SEPARATOR)) || ((len == 1) && handler.getPath().equals(TOOLPATH_SEPARATOR))) { found = true; registerAdminTool(cms, toolRoot, handler); } } if (found) { registerHandlerList(cms, toolRoot, len + 1, handlers); } }
/** * Sets specific http header for the static export.<p> * * The format of the headers must be "header:value".<p> * * @param exportHeader a specific http header */ public void setExportHeader(String exportHeader) { if (CmsStringUtil.splitAsArray(exportHeader, ':').length == 2) { if (CmsLog.INIT.isInfoEnabled()) { CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_EXPORT_HEADERS_1, exportHeader)); } m_exportHeaders.add(exportHeader); } else { if (CmsLog.INIT.isWarnEnabled()) { CmsLog.INIT.warn(Messages.get().getBundle().key(Messages.INIT_INVALID_HEADER_1, exportHeader)); } } }
/** * Sets specific http header for the static export.<p> * * The format of the headers must be "header:value".<p> * * @param exportHeader a specific http header */ public void setExportHeader(String exportHeader) { if (CmsStringUtil.splitAsArray(exportHeader, ':').length == 2) { if (CmsLog.INIT.isInfoEnabled()) { CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_EXPORT_HEADERS_1, exportHeader)); } m_exportHeaders.add(exportHeader); } else { if (CmsLog.INIT.isWarnEnabled()) { CmsLog.INIT.warn(Messages.get().getBundle().key(Messages.INIT_INVALID_HEADER_1, exportHeader)); } } }
/** * Creates a new {@link CmsLogEntry} object from the given result set entry.<p> * * @param res the result set * * @return the new {@link CmsLogEntry} object * * @throws SQLException if something goes wrong */ protected CmsLogEntry internalReadLogEntry(ResultSet res) throws SQLException { CmsUUID userId = new CmsUUID(res.getString(m_sqlManager.readQuery("C_LOG_USER_ID"))); long date = res.getLong(m_sqlManager.readQuery("C_LOG_DATE")); CmsUUID structureId = new CmsUUID(res.getString(m_sqlManager.readQuery("C_LOG_STRUCTURE_ID"))); CmsLogEntryType type = CmsLogEntryType.valueOf(res.getInt(m_sqlManager.readQuery("C_LOG_TYPE"))); String[] data = CmsStringUtil.splitAsArray(res.getString(m_sqlManager.readQuery("C_LOG_DATA")), '|'); return new CmsLogEntry(userId, date, structureId, type, data); }
/** * Returns the current selected item.<p> * * @return the current selected item */ public CmsListItem getSelectedItem() { try { return getList().getItem( CmsStringUtil.splitAsArray(getParamSelItems(), CmsHtmlList.ITEM_SEPARATOR)[0].trim()); } catch (Exception e) { try { return getList().getItem(""); } catch (Exception e1) { return null; } } }
/** * Returns the current selected item.<p> * * @return the current selected item */ public CmsListItem getSelectedItem() { try { return getList().getItem( CmsStringUtil.splitAsArray(getParamSelItems(), CmsHtmlList.ITEM_SEPARATOR)[0].trim()); } catch (Exception e) { try { return getList().getItem(""); } catch (Exception e1) { return null; } } }
/** * Creates a new {@link CmsLogEntry} object from the given result set entry.<p> * * @param daoLog the result set * * @return the new {@link CmsLogEntry} object */ protected CmsLogEntry internalReadLogEntry(CmsDAOLog daoLog) { CmsUUID userId = new CmsUUID(daoLog.getUserId()); long date = daoLog.getLogDate(); CmsUUID structureId = new CmsUUID(daoLog.getStructureId()); CmsLogEntryType type = CmsLogEntryType.valueOf(daoLog.getLogType()); String[] data = CmsStringUtil.splitAsArray(daoLog.getLogData(), '|'); return new CmsLogEntry(userId, date, structureId, type, data); }