cmsusersettings.java
来自「找了很久才找到到源代码」· Java 代码 · 共 1,626 行 · 第 1/5 页
JAVA
1,626 行
private String m_workplaceSearchIndexName;
/** Workplace search result list view style. */
private CmsSearchResultStyle m_workplaceSearchViewStyle;
/**
* Creates an empty new user settings object.<p>
*/
public CmsUserSettings() {
m_workplaceButtonStyle = CmsUserSettings.BUTTONSTYLE_DEFAULT;
m_workplaceReportType = I_CmsReport.REPORT_TYPE_SIMPLE;
m_explorerButtonStyle = CmsUserSettings.BUTTONSTYLE_DEFAULT;
m_explorerFileEntries = CmsUserSettings.ENTRYS_PER_PAGE_DEFAULT;
m_explorerSettings = CmsUserSettings.FILELIST_NAME;
m_editorSettings = new TreeMap();
m_showFileUploadButton = true;
m_showPublishNotification = false;
m_uploadApplet = true;
m_publishButtonAppearance = CmsDefaultUserSettings.PUBLISHBUTTON_SHOW_ALWAYS;
m_newFolderCreateIndexPage = Boolean.TRUE;
m_newFolderEditProperties = Boolean.TRUE;
m_showUploadTypeDialog = Boolean.TRUE;
m_workplaceSearchIndexName = SEARCH_INDEX_DEFAULT;
m_workplaceSearchViewStyle = CmsSearchResultStyle.STYLE_EXPLORER;
}
/**
* Creates a user settings object with initialized settings of the current user.<p>
*
* @param cms the OpenCms context
*/
public CmsUserSettings(CmsObject cms) {
init(cms.getRequestContext().currentUser());
}
/**
* Creates a user settings object with initialized settings of the user.<p>
*
* Some default settings will not be set, if no cms object is given.<p>
*
* @param user the current CmsUser
*
* @see #CmsUserSettings(CmsObject)
*/
public CmsUserSettings(CmsUser user) {
init(user);
}
/**
* Gets the default copy mode when copying a file of the user.<p>
*
* @return the default copy mode when copying a file of the user
*/
public CmsResourceCopyMode getDialogCopyFileMode() {
return m_dialogFileCopy;
}
/**
* Gets the default copy mode when copying a folder of the user.<p>
*
* @return the default copy mode when copying a folder of the user
*/
public CmsResourceCopyMode getDialogCopyFolderMode() {
return m_dialogFolderCopy;
}
/**
* Returns the default setting for file deletion.<p>
*
* @return the default setting for file deletion
*/
public CmsResourceDeleteMode getDialogDeleteFileMode() {
return m_dialogFileDelete;
}
/**
* Returns the default setting for expanding inherited permissions in the dialog.<p>
*
* @return true if inherited permissions should be expanded, otherwise false
*/
public boolean getDialogExpandInheritedPermissions() {
return m_dialogExpandInheritedPermissions;
}
/**
* Returns the default setting for expanding the users permissions in the dialog.<p>
*
* @return true if the users permissions should be expanded, otherwise false
*/
public boolean getDialogExpandUserPermissions() {
return m_dialogExpandUserPermissions;
}
/**
* Returns the default setting for inheriting permissions on folders.<p>
*
* @return true if permissions should be inherited on folders, otherwise false
*/
public boolean getDialogPermissionsInheritOnFolder() {
return m_dialogPermissionsInheritOnFolder;
}
/**
* Returns the default setting for direct publishing.<p>
*
* @return the default setting for direct publishing: true if siblings should be published, otherwise false
*/
public boolean getDialogPublishSiblings() {
return m_dialogDirectpublish;
}
/**
* Determines if the export part of the secure/export dialog should be shown.<p>
*
* @return true if the export dialog is shown, otherwise false
*/
public boolean getDialogShowExportSettings() {
return m_showExportSettings;
}
/**
* Determines if the lock dialog should be shown.<p>
*
* @return true if the lock dialog is shown, otherwise false
*/
public boolean getDialogShowLock() {
return m_showLock;
}
/**
* Returns the style of the direct edit buttons of the user.<p>
*
* @return the style of the direct edit buttons of the user
*/
public int getDirectEditButtonStyle() {
return m_directeditButtonStyle;
}
/**
* 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 locale of the user
*/
public Locale getLocale() {
return m_locale;
}
/**
* Returns <code>{@link Boolean#TRUE}</code> if the "create index page" check box in the new folder
* dialog should be initially be checked. <p>
*
* @return <code>{@link Boolean#TRUE}</code> if the "create index page" check box in the new folder
* dialog should be initially be checked.
*/
public Boolean getNewFolderCreateIndexPage() {
return m_newFolderCreateIndexPage;
}
/**
* Returns <code>{@link Boolean#TRUE}</code> if the "edit properties" check box in the new folder
* dialog should be initially be checked. <p>
*
* @return <code>{@link Boolean#TRUE}</code> if the "edit properties" check box in the new folder
* dialog should be initially be checked.
*/
public Boolean getNewFolderEditProperties() {
return m_newFolderEditProperties;
}
/**
* 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 appearance of the "publish project" button.<p>
*
* This can be either {@link CmsDefaultUserSettings#PUBLISHBUTTON_SHOW_ALWAYS},
* {@link CmsDefaultUserSettings#PUBLISHBUTTON_SHOW_AUTO} or
* {@link CmsDefaultUserSettings#PUBLISHBUTTON_SHOW_NEVER}.<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 <code>true</code> if the file upload button should be shown or <code>false</code> otherwise.<p>
*
* @return the showFileUpload
*/
public boolean getShowFileUploadButton() {
return m_showFileUploadButton;
}
/**
* Returns if the publish notifications should be shown or not.<p>
*
* @return true if the publish notifications should be shown, otherwise false
*/
public boolean getShowPublishNotification() {
return m_showPublishNotification;
}
/**
* Returns <code>{@link Boolean#TRUE}</code> if the resource type selection dialog should
* be shown in the file upload process (non - applet version). <p>
*
* @return <code>{@link Boolean#TRUE}</code> if the resource type selection dialog should
* be shown in the file upload process (non - applet version).
*/
public Boolean getShowUploadTypeDialog() {
return m_showUploadTypeDialog;
}
/**
* 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
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?