📄 cmsusersettings.java
字号:
}
/**
* Returns the style of the editor buttons of the user.<p>
*
* @return the style of the editor buttons of the user
*/
public int getEditorButtonStyle() {
return m_editorButtonStyle;
}
/**
* Returns the editor settings of the user.<p>
*
* @return the editor settings of the user
*/
public Map getEditorSettings() {
return m_editorSettings;
}
/**
* Returns the style of the explorer buttons of the user.<p>
*
* @return the style of the explorer buttons of the user
*/
public int getExplorerButtonStyle() {
return m_explorerButtonStyle;
}
/**
* Returns the number of displayed files per page of the user.<p>
*
* @return the number of displayed files per page of the user
*/
public int getExplorerFileEntries() {
return m_explorerFileEntries;
}
/**
* Returns the explorer start settings.<p>
*
* @return the explorer start settings
*/
public int getExplorerSettings() {
return m_explorerSettings;
}
/**
* Returns the locale of the user.<p>
*
* @return the loclae of the user
*/
public Locale getLocale() {
return m_locale;
}
/**
* Returns the preferred editor for the given resource type of the user.<p>
*
* @param resourceType the resource type
* @return the preferred editor for the resource type or null, if not specified
*/
public String getPreferredEditor(String resourceType) {
return (String)m_editorSettings.get(resourceType);
}
/**
* Returns the project Settings.<p>
*
* @return the project Settings
*/
public CmsUserProjectSettings getProjectSettings() {
return m_projectSettings;
}
/**
* Returns the appearance of the "publish project" button.<p>
*
* @return the appearance of the "publish project" button
*/
public String getPublishButtonAppearance() {
return m_publishButtonAppearance;
}
/**
* Sets if the explorer view is restricted to the defined site and folder.<p>
*
* @return true if the explorer view is restricted, otherwise false
*/
public boolean getRestrictExplorerView() {
return m_restrictExplorerView;
}
/**
* Returns the start folder of the user.<p>
*
* @return the start folder of the user
*/
public String getStartFolder() {
return m_startFolder;
}
/**
* Returns the start project of the user.<p>
*
* @return the start project of the user
*/
public String getStartProject() {
return m_project;
}
/**
* Returns the start site of the user.<p>
*
* @return the start site of the user
*/
public String getStartSite() {
return m_startSite;
}
/**
* Returns the current start view of the user.<p>
*
* @return the current start view of the user
*/
public String getStartView() {
return m_view;
}
/**
* Returns the (optional) workplace synchronize settings.<p>
*
* @return the (optional) workplace synchronize settings
*/
public CmsSynchronizeSettings getSynchronizeSettings() {
return m_synchronizeSettings;
}
/**
* Determines if a message should be sent if the task is accepted.<p>
*
* @return true if a message should be sent if the task is accepted, otherwise false
*/
public boolean getTaskMessageAccepted() {
return ((m_taskMessages & CmsTaskService.TASK_MESSAGES_ACCEPTED) > 0);
}
/**
* Determines if a message should be sent if the task is completed.<p>
*
* @return true if a message should be sent if the task is completed, otherwise false
*/
public boolean getTaskMessageCompleted() {
return ((m_taskMessages & CmsTaskService.TASK_MESSAGES_COMPLETED) > 0);
}
/**
* Determines if a message should be sent if the task is forwarded.<p>
*
* @return true if a message should be sent if the task is forwarded, otherwise false
*/
public boolean getTaskMessageForwarded() {
return ((m_taskMessages & CmsTaskService.TASK_MESSAGES_FORWARDED) > 0);
}
/**
* Determines if all role members should be informed about the task.<p>
*
* @return true if all role members should be informed about the task, otherwise false
*/
public boolean getTaskMessageMembers() {
return ((m_taskMessages & CmsTaskService.TASK_MESSAGES_MEMBERS) > 0);
}
/**
* Returns the task messages value for the tasks view.<p>
*
* @return task messages value for the tasks view
*/
public int getTaskMessageValue() {
return m_taskMessages;
}
/**
* Determines if all projects should be shown in tasks view.<p>
*
* @return true if all projects should be shown in tasks view, otherwise false
*/
public boolean getTaskShowAllProjects() {
return m_taskShowProjects;
}
/**
* Returns the startup filter for the tasks view.<p>
*
* @return the startup filter for the tasks view
*/
public String getTaskStartupFilter() {
return m_taskStartupfilter;
}
/**
* Returns the current user for the settings.<p>
*
* @return the CmsUser
*/
public CmsUser getUser() {
return m_user;
}
/**
* Returns the style of the workplace buttons of the user.<p>
*
* @return the style of the workplace buttons of the user
*/
public int getWorkplaceButtonStyle() {
return m_workplaceButtonStyle;
}
/**
* Returns the type of the report (simple or extended) of the user.<p>
*
* @return the type of the report (simple or extended) of the user
*/
public String getWorkplaceReportType() {
return m_workplaceReportType;
}
/**
* Initializes the user settings with the given users setting parameters.<p>
*
* @param cms the OpenCms context
* @param user the current CmsUser
*/
public void init(CmsObject cms, CmsUser user) {
m_user = user;
// try to initialize the User Settings with the values stored in the user object.
// if no values are found, the default user settings will be used.
// workplace button style
try {
m_workplaceButtonStyle = ((Integer)m_user.getAdditionalInfo(PREFERENCES
+ CmsWorkplaceConfiguration.N_WORKPLACEGENERALOPTIONS
+ CmsWorkplaceConfiguration.N_BUTTONSTYLE)).intValue();
} catch (Throwable t) {
m_workplaceButtonStyle = OpenCms.getWorkplaceManager().getDefaultUserSettings().getWorkplaceButtonStyle();
}
// workplace report type
m_workplaceReportType = ((String)m_user.getAdditionalInfo(PREFERENCES
+ CmsWorkplaceConfiguration.N_WORKPLACEGENERALOPTIONS
+ CmsWorkplaceConfiguration.N_REPORTTYPE));
if (m_workplaceReportType == null) {
m_workplaceReportType = OpenCms.getWorkplaceManager().getDefaultUserSettings().getWorkplaceReportType();
}
// workplace uploadapplet mode
try {
m_uploadApplet = ((Boolean)m_user.getAdditionalInfo(PREFERENCES
+ CmsWorkplaceConfiguration.N_WORKPLACEGENERALOPTIONS
+ CmsWorkplaceConfiguration.N_UPLOADAPPLET)).booleanValue();
} catch (Throwable t) {
m_uploadApplet = OpenCms.getWorkplaceManager().getDefaultUserSettings().useUploadApplet();
}
// locale
m_locale = (Locale)m_user.getAdditionalInfo(PREFERENCES
+ CmsWorkplaceConfiguration.N_WORKPLACESTARTUPSETTINGS
+ CmsWorkplaceConfiguration.N_LOCALE);
if (m_locale == null) {
m_locale = OpenCms.getWorkplaceManager().getDefaultUserSettings().getLocale();
}
// start project
try {
m_project = ((String)m_user.getAdditionalInfo(PREFERENCES
+ CmsWorkplaceConfiguration.N_WORKPLACESTARTUPSETTINGS
+ CmsWorkplaceConfiguration.N_PROJECT));
} catch (Throwable t) {
m_project = null;
}
if (m_project == null) {
m_project = OpenCms.getWorkplaceManager().getDefaultUserSettings().getStartProject();
}
// start view
m_view = ((String)m_user.getAdditionalInfo(PREFERENCES
+ CmsWorkplaceConfiguration.N_WORKPLACESTARTUPSETTINGS
+ CmsWorkplaceConfiguration.N_WORKPLACEVIEW));
if (m_view == null) {
m_view = OpenCms.getWorkplaceManager().getDefaultUserSettings().getStartView();
}
// explorer button style
try {
m_explorerButtonStyle = ((Integer)m_user.getAdditionalInfo(PREFERENCES
+ CmsWorkplaceConfiguration.N_EXPLORERGENERALOPTIONS
+ CmsWorkplaceConfiguration.N_BUTTONSTYLE)).intValue();
} catch (Throwable t) {
m_explorerButtonStyle = OpenCms.getWorkplaceManager().getDefaultUserSettings().getExplorerButtonStyle();
}
// explorer file entires
try {
m_explorerFileEntries = ((Integer)m_user.getAdditionalInfo(PREFERENCES
+ CmsWorkplaceConfiguration.N_EXPLORERGENERALOPTIONS
+ CmsWorkplaceConfiguration.N_ENTRIES)).intValue();
} catch (Throwable t) {
m_explorerFileEntries = OpenCms.getWorkplaceManager().getDefaultUserSettings().getExplorerFileEntries();
}
// explorer settings
try {
m_explorerSettings = ((Integer)m_user.getAdditionalInfo(PREFERENCES
+ CmsWorkplaceConfiguration.N_EXPLORERGENERALOPTIONS
+ CmsWorkplaceConfiguration.N_EXPLORERDISPLAYOPTIONS)).intValue();
} catch (Throwable t) {
m_explorerSettings = OpenCms.getWorkplaceManager().getDefaultUserSettings().getExplorerSettings();
}
// dialog file copy mode
try {
m_dialogFileCopy = ((Integer)m_user.getAdditionalInfo(PREFERENCES
+ CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS
+ CmsWorkplaceConfiguration.N_FILECOPY)).intValue();
} catch (Throwable t) {
m_dialogFileCopy = OpenCms.getWorkplaceManager().getDefaultUserSettings().getDialogCopyFileMode();
}
// dialog folder copy mode
try {
m_dialogFolderCopy = ((Integer)m_user.getAdditionalInfo(PREFERENCES
+ CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS
+ CmsWorkplaceConfiguration.N_FOLDERCOPY)).intValue();
} catch (Throwable t) {
m_dialogFolderCopy = OpenCms.getWorkplaceManager().getDefaultUserSettings().getDialogCopyFolderMode();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -