📄 cmsusersettings.java
字号:
+ CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS
+ CmsWorkplaceConfiguration.N_DIRECTPUBLISH, new Boolean(getDialogPublishSiblings()));
} else if (cms != null) {
m_user.deleteAdditionalInfo(PREFERENCES
+ CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS
+ CmsWorkplaceConfiguration.N_DIRECTPUBLISH);
}
// dialog show lock mode
if (getDialogShowLock() != OpenCms.getWorkplaceManager().getDefaultUserSettings().getDialogShowLock()) {
m_user.setAdditionalInfo(PREFERENCES
+ CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS
+ CmsWorkplaceConfiguration.N_SHOWLOCK, new Boolean(getDialogShowLock()));
} else if (cms != null) {
m_user.deleteAdditionalInfo(PREFERENCES
+ CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS
+ CmsWorkplaceConfiguration.N_SHOWLOCK);
}
// dialog permissions inheritation mode
if (getDialogPermissionsInheritOnFolder() != OpenCms.getWorkplaceManager().getDefaultUserSettings().getDialogPermissionsInheritOnFolder()) {
m_user.setAdditionalInfo(PREFERENCES
+ CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS
+ CmsWorkplaceConfiguration.N_PERMISSIONSINHERITONFOLDER, new Boolean(
getDialogPermissionsInheritOnFolder()));
} else if (cms != null) {
m_user.deleteAdditionalInfo(PREFERENCES
+ CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS
+ CmsWorkplaceConfiguration.N_PERMISSIONSINHERITONFOLDER);
}
// dialog expand inherited permissions mode
if (getDialogExpandInheritedPermissions() != OpenCms.getWorkplaceManager().getDefaultUserSettings().getDialogExpandInheritedPermissions()) {
m_user.setAdditionalInfo(PREFERENCES
+ CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS
+ CmsWorkplaceConfiguration.N_EXPANDPERMISSIONSINHERITED, new Boolean(
getDialogExpandInheritedPermissions()));
} else if (cms != null) {
m_user.deleteAdditionalInfo(PREFERENCES
+ CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS
+ CmsWorkplaceConfiguration.N_EXPANDPERMISSIONSINHERITED);
}
// dialog expand users permissions mode
if (getDialogExpandUserPermissions() != OpenCms.getWorkplaceManager().getDefaultUserSettings().getDialogExpandUserPermissions()) {
m_user.setAdditionalInfo(PREFERENCES
+ CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS
+ CmsWorkplaceConfiguration.N_EXPANDPERMISSIONSUSER, new Boolean(getDialogExpandUserPermissions()));
} else if (cms != null) {
m_user.deleteAdditionalInfo(PREFERENCES
+ CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS
+ CmsWorkplaceConfiguration.N_EXPANDPERMISSIONSUSER);
}
// editor button style
if (getEditorButtonStyle() != OpenCms.getWorkplaceManager().getDefaultUserSettings().getEditorButtonStyle()) {
m_user.setAdditionalInfo(PREFERENCES
+ CmsWorkplaceConfiguration.N_EDITORGENERALOPTIONS
+ CmsWorkplaceConfiguration.N_BUTTONSTYLE, new Integer(getEditorButtonStyle()));
} else if (cms != null) {
m_user.deleteAdditionalInfo(PREFERENCES
+ CmsWorkplaceConfiguration.N_EDITORGENERALOPTIONS
+ CmsWorkplaceConfiguration.N_BUTTONSTYLE);
}
// directedit button style
if (getDirectEditButtonStyle() != OpenCms.getWorkplaceManager().getDefaultUserSettings().getDirectEditButtonStyle()) {
m_user.setAdditionalInfo(PREFERENCES
+ CmsWorkplaceConfiguration.N_EDITORGENERALOPTIONS
+ CmsWorkplaceConfiguration.N_DIRECTEDITSTYLE, new Integer(getDirectEditButtonStyle()));
} else if (cms != null) {
m_user.deleteAdditionalInfo(PREFERENCES
+ CmsWorkplaceConfiguration.N_EDITORGENERALOPTIONS
+ CmsWorkplaceConfiguration.N_DIRECTEDITSTYLE);
}
// editorsettings
if (m_editorSettings.size() > 0) {
m_user.setAdditionalInfo(PREFERENCES + CmsWorkplaceConfiguration.N_EDITORPREFERREDEDITORS, m_editorSettings);
} else if (cms != null) {
m_user.deleteAdditionalInfo(PREFERENCES + CmsWorkplaceConfiguration.N_EDITORPREFERREDEDITORS);
}
// task startup filter
if (!getTaskStartupFilter().equals(
OpenCms.getWorkplaceManager().getDefaultUserSettings().getTaskStartupFilter())) {
m_user.setAdditionalInfo(PREFERENCES
+ CmsWorkplaceConfiguration.N_WORKFLOWGENERALOPTIONS
+ CmsWorkplaceConfiguration.N_STARTUPFILTER, getTaskStartupFilter());
} else if (cms != null) {
m_user.deleteAdditionalInfo(PREFERENCES
+ CmsWorkplaceConfiguration.N_WORKFLOWGENERALOPTIONS
+ CmsWorkplaceConfiguration.N_STARTUPFILTER);
}
// task show all projects
if (getTaskShowAllProjects() != OpenCms.getWorkplaceManager().getDefaultUserSettings().getTaskShowAllProjects()) {
m_user.setAdditionalInfo(PREFERENCES
+ CmsWorkplaceConfiguration.N_WORKFLOWGENERALOPTIONS
+ CmsWorkplaceConfiguration.N_SHOWPROJECTS, new Boolean(getTaskShowAllProjects()));
} else if (cms != null) {
m_user.deleteAdditionalInfo(PREFERENCES
+ CmsWorkplaceConfiguration.N_WORKFLOWGENERALOPTIONS
+ CmsWorkplaceConfiguration.N_SHOWPROJECTS);
}
// task messages
if (getTaskMessageValue() != OpenCms.getWorkplaceManager().getDefaultUserSettings().getTaskMessageValue()) {
m_user.setAdditionalInfo(PREFERENCES + CmsWorkplaceConfiguration.N_WORKFLOWDEFAULTSETTINGS, new Integer(
m_taskMessages));
} else if (cms != null) {
m_user.deleteAdditionalInfo(PREFERENCES + CmsWorkplaceConfiguration.N_WORKFLOWDEFAULTSETTINGS);
}
// start site
if (!getStartSite().equals(OpenCms.getWorkplaceManager().getDefaultUserSettings().getStartSite())) {
m_user.setAdditionalInfo(PREFERENCES
+ CmsWorkplaceConfiguration.N_WORKPLACESTARTUPSETTINGS
+ I_CmsXmlConfiguration.N_SITE, getStartSite());
} else if (cms != null) {
m_user.deleteAdditionalInfo(PREFERENCES
+ CmsWorkplaceConfiguration.N_WORKPLACESTARTUPSETTINGS
+ I_CmsXmlConfiguration.N_SITE);
}
// start folder
if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(getStartFolder())
&& !getStartFolder().equals(OpenCms.getWorkplaceManager().getDefaultUserSettings().getStartFolder())) {
m_user.setAdditionalInfo(PREFERENCES
+ CmsWorkplaceConfiguration.N_WORKPLACESTARTUPSETTINGS
+ CmsWorkplaceConfiguration.N_FOLDER, getStartFolder());
} else if (cms != null) {
m_user.deleteAdditionalInfo(PREFERENCES
+ CmsWorkplaceConfiguration.N_WORKPLACESTARTUPSETTINGS
+ CmsWorkplaceConfiguration.N_FOLDER);
}
// restrict explorer folder view
if (getRestrictExplorerView() != OpenCms.getWorkplaceManager().getDefaultUserSettings().getRestrictExplorerView()) {
m_user.setAdditionalInfo(PREFERENCES
+ CmsWorkplaceConfiguration.N_WORKPLACESTARTUPSETTINGS
+ CmsWorkplaceConfiguration.N_RESTRICTEXPLORERVIEW, new Boolean(getRestrictExplorerView()));
} else if (cms != null) {
m_user.deleteAdditionalInfo(PREFERENCES
+ CmsWorkplaceConfiguration.N_WORKPLACESTARTUPSETTINGS
+ CmsWorkplaceConfiguration.N_RESTRICTEXPLORERVIEW);
}
// synchronize settings
if (getSynchronizeSettings() != null) {
m_user.setAdditionalInfo(PREFERENCES + SYNC_SETTINGS, getSynchronizeSettings());
} else {
m_user.deleteAdditionalInfo(PREFERENCES + SYNC_SETTINGS);
}
// project settings
if (getProjectSettings() != null) {
m_user.setAdditionalInfo(PREFERENCES + PROJECT_SETTINGS, getProjectSettings());
} else {
m_user.deleteAdditionalInfo(PREFERENCES + PROJECT_SETTINGS);
}
// only write the updated user to the DB if we have the cms object
if (cms != null) {
cms.writeUser(m_user);
}
}
/**
* Sets the default copy mode when copying a file of the user.<p>
*
* @param mode the default copy mode when copying a file of the user
*/
public void setDialogCopyFileMode(int mode) {
m_dialogFileCopy = mode;
}
/**
* Sets the default copy mode when copying a folder of the user.<p>
*
* @param mode the default copy mode when copying a folder of the user
*/
public void setDialogCopyFolderMode(int mode) {
m_dialogFolderCopy = mode;
}
/**
* Sets the default setting for file deletion.<p>
*
* @param mode the default setting for file deletion
*/
public void setDialogDeleteFileMode(int mode) {
m_dialogFileDelete = mode;
}
/**
* Sets the default setting for expanding inherited permissions in the dialog.<p>
*
* @param dialogShowInheritedPermissions the default setting for expanding inherited permissions in the dialog
*/
public void setDialogExpandInheritedPermissions(boolean dialogShowInheritedPermissions) {
m_dialogExpandInheritedPermissions = dialogShowInheritedPermissions;
}
/**
* Sets the default setting for expanding the users permissions in the dialog.<p>
*
* @param dialogShowUserPermissions the default setting for expanding the users permissions in the dialog
*/
public void setDialogExpandUserPermissions(boolean dialogShowUserPermissions) {
m_dialogExpandUserPermissions = dialogShowUserPermissions;
}
/**
* Sets the default setting for inheriting permissions on folders.<p>
*
* @param dialogPermissionsInheritOnFolder the default setting for inheriting permissions on folders
*/
public void setDialogPermissionsInheritOnFolder(boolean dialogPermissionsInheritOnFolder) {
m_dialogPermissionsInheritOnFolder = dialogPermissionsInheritOnFolder;
}
/**
* Sets the default setting for direct publishing.<p>
*
* @param publishSiblings the default setting for direct publishing: true if siblings should be published, otherwise false
*/
public void setDialogPublishSiblings(boolean publishSiblings) {
m_dialogDirectpublish = publishSiblings;
}
/**
* Sets if the export setting part of the secure/export dialog should be shown.<p>
*
* @param show true if the export dialog should be shown, otherwise false
*/
public void setDialogShowExportSettings(boolean show) {
m_showExportSettings = show;
}
/**
* Sets if the lock dialog should be shown.<p>
*
* @param show true if the lock dialog should be shown, otherwise false
*/
public void setDialogShowLock(boolean show) {
m_showLock = show;
}
/**
* Sets the style of the direct edit buttons of the user.<p>
*
* @param style the style of the direct edit buttons of the user
*/
public void setDirectEditButtonStyle(int style) {
m_directeditButtonStyle = style;
}
/**
* Sets the style of the editor buttons of the user.<p>
*
* @param style the style of the editor buttons of the user
*/
public void setEditorButtonStyle(int style) {
m_editorButtonStyle = style;
}
/**
* Sets the editor settings of the user.<p>
*
* @param settings the editor settings of the user
*/
public void setEditorSettings(Map settings) {
m_editorSettings = new HashMap(settings);
}
/**
* Sets the style of the explorer buttons of the user.<p>
*
* @param style the style of the explorer buttons of the user
*/
public void setExplorerButtonStyle(int style) {
m_explorerButtonStyle = style;
}
/**
* Sets the number of displayed files per page of the user.<p>
*
* @param entries the number of displayed files per page of the user
*/
public void setExplorerFileEntries(int entries) {
m_explorerFileEntries = entries;
}
/**
* Sets a specific explorer setting depending on the set parameter.<p>
*
* @param set true if the setting should be set, otherwise false
* @param setting the settings constant value for the explorer settings
*/
private void setExplorerSetting(boolean set, int setting) {
if (set) {
m_explorerSettings |= setting;
} else {
m_explorerSettings &= ~setting;
}
}
/**
* Sets the explorer start settings.<p>
*
* @param settings explorer start settings tu use
*/
public void setExplorerSettings(int settings) {
m_explorerSettings = settings;
}
/**
* Sets the locale of the user.<p>
*
* @param locale the locale of the user
*/
public void setLocale(Locale locale) {
m_locale = locale;
}
/**
* Sets if the "create index page" checkbox in the new folder
* dialog should be initially be checked or not. <p>
*
* @param controls if the "create index page" checkbox in the new folder
* dialog should be initially be checked or not.
*/
public void setNewFolderCreateIndexPage(Boolean setting) {
m_newFolderCreateIndexPage = setting;
}
/**
* Sets if the "edit properties" checkbox in the new folder
* dialog should be initially be checked or not. <p>
*
* @param controls if the "edit properties" checkbox in the new folder
* dialog should be initially be checked or not.
*/
public void setNewFolderEditPropertes(Boolean setting) {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -