retValue.append(CmsResource.COPY_AS_SIBLING.getMode()); retValue.append("\""); if (defaultMode == CmsResource.COPY_AS_SIBLING) { retValue.append("<br>\n"); retValue.append("<input type=\"radio\" name=\"copymode\" value=\""); retValue.append(CmsResource.COPY_PRESERVE_SIBLING.getMode()); retValue.append("\""); if (defaultMode == CmsResource.COPY_PRESERVE_SIBLING) { retValue.append("<br>\n"); retValue.append("<input type=\"radio\" name=\"copymode\" value=\""); retValue.append(CmsResource.COPY_AS_NEW.getMode()); retValue.append("\""); if (defaultMode == CmsResource.COPY_AS_NEW) { retValue.append(CmsResource.COPY_AS_SIBLING.getMode()); retValue.append("\""); if (defaultMode == CmsResource.COPY_AS_SIBLING) { retValue.append("<br>\n"); retValue.append("<input type=\"radio\" name=\"copymode\" value=\""); retValue.append(CmsResource.COPY_AS_NEW.getMode()); retValue.append("\""); if (defaultMode == CmsResource.COPY_AS_NEW) {
/** * Sets the "copy file default" setting.<p> * * @param value the "copy file default" setting */ public void setParamTabDiCopyFileMode(String value) { try { m_userSettings.setDialogCopyFileMode(CmsResourceCopyMode.valueOf(Integer.parseInt(value))); } catch (Throwable t) { // should usually never happen } }
/** * Builds the html for the default copy folder mode select box.<p> * * @param htmlAttributes optional html attributes for the &lgt;select> tag * @return the html for the default copy folder mode select box */ public String buildSelectCopyFolderMode(String htmlAttributes) { List options = new ArrayList(3); options.add(key(Messages.GUI_PREF_COPY_AS_SIBLINGS_0)); options.add(key(Messages.GUI_PREF_PRESERVE_SIBLINGS_RESOURCES_0)); options.add(key(Messages.GUI_PREF_COPY_AS_NEW_0)); List values = new ArrayList(3); values.add(CmsResource.COPY_AS_SIBLING.toString()); values.add(CmsResource.COPY_PRESERVE_SIBLING.toString()); values.add(CmsResource.COPY_AS_NEW.toString()); int selectedIndex = values.indexOf(getParamTabDiCopyFolderMode()); return buildSelect(htmlAttributes, options, values, selectedIndex); }
m_user.setAdditionalInfo(PREFERENCES + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS + CmsWorkplaceConfiguration.N_FILECOPY, new Integer(getDialogCopyFileMode().getMode())); } else if (cms != null) { m_user.deleteAdditionalInfo(PREFERENCES m_user.setAdditionalInfo(PREFERENCES + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS + CmsWorkplaceConfiguration.N_FOLDERCOPY, new Integer(getDialogCopyFolderMode().getMode())); } else if (cms != null) { m_user.deleteAdditionalInfo(PREFERENCES
m_dialogFileCopy = CmsResourceCopyMode.valueOf(((Integer)m_user.getAdditionalInfo(PREFERENCES + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS + CmsWorkplaceConfiguration.N_FILECOPY)).intValue()); m_dialogFolderCopy = CmsResourceCopyMode.valueOf(((Integer)m_user.getAdditionalInfo(PREFERENCES + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS + CmsWorkplaceConfiguration.N_FOLDERCOPY)).intValue());
m_user.setAdditionalInfo( PREFERENCES + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS + CmsWorkplaceConfiguration.N_FILECOPY, new Integer(getDialogCopyFileMode().getMode())); } else if (cms != null) { m_user.deleteAdditionalInfo( + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS + CmsWorkplaceConfiguration.N_FOLDERCOPY, new Integer(getDialogCopyFolderMode().getMode())); } else if (cms != null) { m_user.deleteAdditionalInfo(
copyMode = CmsResourceCopyMode.valueOf(Integer.parseInt(getParamCopymode())); } catch (Exception e) {
copyMode = CmsResourceCopyMode.valueOf(Integer.parseInt(getParamCopymode())); } catch (Exception e) {
retValue.append(CmsResource.COPY_AS_SIBLING.getMode()); retValue.append("\""); if (defaultMode == CmsResource.COPY_AS_SIBLING) { retValue.append("<br>\n"); retValue.append("<input type=\"radio\" name=\"copymode\" value=\""); retValue.append(CmsResource.COPY_PRESERVE_SIBLING.getMode()); retValue.append("\""); if (defaultMode == CmsResource.COPY_PRESERVE_SIBLING) { retValue.append("<br>\n"); retValue.append("<input type=\"radio\" name=\"copymode\" value=\""); retValue.append(CmsResource.COPY_AS_NEW.getMode()); retValue.append("\""); if (defaultMode == CmsResource.COPY_AS_NEW) { retValue.append(CmsResource.COPY_AS_SIBLING.getMode()); retValue.append("\""); if (defaultMode == CmsResource.COPY_AS_SIBLING) { retValue.append("<br>\n"); retValue.append("<input type=\"radio\" name=\"copymode\" value=\""); retValue.append(CmsResource.COPY_AS_NEW.getMode()); retValue.append("\""); if (defaultMode == CmsResource.COPY_AS_NEW) {
/** * Copies a resource.<p> * * The copied resource will always be locked to the current user * after the copy operation.<p> * * @param source the name of the resource to copy (full path) * @param destination the name of the copy destination (full path) * @param siblingMode indicates how to handle siblings during copy * * @throws CmsException if something goes wrong * @throws CmsIllegalArgumentException if the <code>destination</code> argument is null or of length 0 * * @deprecated use {@link #copyResource(String, String, CmsResource.CmsResourceCopyMode)} method instead */ public void copyResource(String source, String destination, int siblingMode) throws CmsException, CmsIllegalArgumentException { copyResource(source, destination, CmsResource.CmsResourceCopyMode.valueOf(siblingMode)); }
/** * Builds the html for the default copy folder mode select box.<p> * * @param htmlAttributes optional html attributes for the &lgt;select> tag * @return the html for the default copy folder mode select box */ public String buildSelectCopyFolderMode(String htmlAttributes) { List<String> options = new ArrayList<String>(3); options.add(key(Messages.GUI_PREF_COPY_AS_SIBLINGS_0)); options.add(key(Messages.GUI_PREF_PRESERVE_SIBLINGS_RESOURCES_0)); options.add(key(Messages.GUI_PREF_COPY_AS_NEW_0)); List<String> values = new ArrayList<String>(3); values.add(CmsResource.COPY_AS_SIBLING.toString()); values.add(CmsResource.COPY_PRESERVE_SIBLING.toString()); values.add(CmsResource.COPY_AS_NEW.toString()); int selectedIndex = values.indexOf(getParamTabDiCopyFolderMode()); return buildSelect(htmlAttributes, options, values, selectedIndex); }
/** * Builds the html for the default copy file mode select box.<p> * * @param htmlAttributes optional html attributes for the &lgt;select> tag * @return the html for the default copy file mode select box */ public String buildSelectCopyFileMode(String htmlAttributes) { List<String> options = new ArrayList<String>(2); options.add(key(Messages.GUI_PREF_COPY_AS_SIBLING_0)); options.add(key(Messages.GUI_COPY_AS_NEW_0)); List<String> values = new ArrayList<String>(2); values.add(CmsResource.COPY_AS_SIBLING.toString()); values.add(CmsResource.COPY_AS_NEW.toString()); int selectedIndex = values.indexOf(getParamTabDiCopyFileMode()); return buildSelect(htmlAttributes, options, values, selectedIndex); }
/** * Builds the html for the default copy file mode select box.<p> * * @param htmlAttributes optional html attributes for the &lgt;select> tag * @return the html for the default copy file mode select box */ public String buildSelectCopyFileMode(String htmlAttributes) { List options = new ArrayList(2); options.add(key(Messages.GUI_PREF_COPY_AS_SIBLING_0)); options.add(key(Messages.GUI_COPY_AS_NEW_0)); List values = new ArrayList(2); values.add(CmsResource.COPY_AS_SIBLING.toString()); values.add(CmsResource.COPY_AS_NEW.toString()); int selectedIndex = values.indexOf(getParamTabDiCopyFileMode()); return buildSelect(htmlAttributes, options, values, selectedIndex); }
/** * Sets the "copy folder default" setting.<p> * * @param value the "copy folder default" setting */ public void setParamTabDiCopyFolderMode(String value) { try { m_userSettings.setDialogCopyFolderMode(CmsResourceCopyMode.valueOf(Integer.parseInt(value))); } catch (Throwable t) { // should usually never happen } }
/** * Sets the "copy file default" setting.<p> * * @param value the "copy file default" setting */ public void setParamTabDiCopyFileMode(String value) { try { m_userSettings.setDialogCopyFileMode(CmsResourceCopyMode.valueOf(Integer.parseInt(value))); } catch (Throwable t) { // should usually never happen } }
/** * Sets the "copy folder default" setting.<p> * * @param value the "copy folder default" setting */ public void setParamTabDiCopyFolderMode(String value) { try { m_userSettings.setDialogCopyFolderMode(CmsResourceCopyMode.valueOf(Integer.parseInt(value))); } catch (Throwable t) { // should usually never happen } }