📄 i_cmsuserdriver.java
字号:
* @param onlineId the online resource id
*
* @throws CmsDataAccessException if something goes wrong
*/
void publishAccessControlEntries(
CmsDbContext dbc,
CmsProject offlineProject,
CmsProject onlineProject,
CmsUUID offlineId,
CmsUUID onlineId) throws CmsDataAccessException;
/**
* Reads all relevant access control entries for a given resource.<p>
*
* @param dbc the current database context
* @param project the project to write the entry
* @param resource the id of the resource
* @param inheritedOnly flag to indicate that only inherited entries should be returned
*
* @return a list of <code>{@link CmsAccessControlEntry}</code> objects defining all permissions for the given resource
*
* @throws CmsDataAccessException if something goes wrong
*/
List readAccessControlEntries(CmsDbContext dbc, CmsProject project, CmsUUID resource, boolean inheritedOnly)
throws CmsDataAccessException;
/**
* Reads an access control entry for a given principal that is attached to a resource.<p>
*
* @param dbc the current database context
* @param project the project to write the entry
* @param resource the id of the resource
* @param principal the id of the principal
*
* @return an access control entry that defines the permissions of the principal for the given resource
* @throws CmsDataAccessException if something goes wrong
*/
CmsAccessControlEntry readAccessControlEntry(
CmsDbContext dbc,
CmsProject project,
CmsUUID resource,
CmsUUID principal) throws CmsDataAccessException;
/**
* Reads all child groups of a group.<p>
*
* @param dbc the current database context
* @param groupname the name of the group to read the child groups from
*
* @return a list of all child <code>{@link CmsGroup}</code> objects or <code>null</code>
*
* @throws CmsDataAccessException if operation was not succesful
*/
List readChildGroups(CmsDbContext dbc, String groupname) throws CmsDataAccessException;
/**
* Reads a group based on the group id.<p>
*
* @param dbc the current database context
* @param groupId the id of the group that is to be read
*
* @return the group that was read
*
* @throws CmsDataAccessException if something goes wrong
*/
CmsGroup readGroup(CmsDbContext dbc, CmsUUID groupId) throws CmsDataAccessException;
/**
* Reads a group based on the group name.<p>
*
* @param dbc the current database context
* @param groupName the name of the group that is to be read
*
* @return the group that was read
*
* @throws CmsDataAccessException if something goes wrong
*/
CmsGroup readGroup(CmsDbContext dbc, String groupName) throws CmsDataAccessException;
/**
* Reads all existing groups.<p>
*
* @param dbc the current database context
*
* @return a list of all <code>{@link CmsGroup}</code> objects
*
* @throws CmsDataAccessException if something goes wrong
*/
List readGroups(CmsDbContext dbc) throws CmsDataAccessException;
/**
* Reads all groups the given user is a member in.<p>
*
* @param dbc the current database context
* @param userId the id of the user
* @param paramStr additional parameter
*
* @return a list of <code>{@link CmsGroup}</code> objects
*
* @throws CmsDataAccessException if something goes wrong
*/
List readGroupsOfUser(CmsDbContext dbc, CmsUUID userId, String paramStr) throws CmsDataAccessException;
/**
* Reads a user based on the user id.<p>
*
* @param dbc the current database context
* @param id the id of the user to read
*
* @return the user that was read
*
* @throws CmsDataAccessException if something goes wrong
*/
CmsUser readUser(CmsDbContext dbc, CmsUUID id) throws CmsDataAccessException;
/**
* Reads a user based in the user name and user type.<p>
*
* @param dbc the current database context
* @param name the name of the user to read
* @param type the type of the user to read
*
* @return the user that was read
*
* @throws CmsDataAccessException if something goes wrong
*/
CmsUser readUser(CmsDbContext dbc, String name, int type) throws CmsDataAccessException;
/**
* Reads a user from the database, only if the password is correct.<p>
*
* If the user/pwd pair is not valid a <code>{@link CmsDataAccessException}</code> is thrown.<p>
*
* @param dbc the current database context
* @param name the name of the user
* @param password the password of the user
* @param type the type of the user
*
* @return the user that was read
*
* @throws CmsDataAccessException if something goes wrong
* @throws CmsPasswordEncryptionException if the password of the user could not be encrypted
*/
CmsUser readUser(CmsDbContext dbc, String name, String password, int type)
throws CmsDataAccessException, CmsPasswordEncryptionException;
/**
* Reads a user from the database, only if the password is correct.<p>
*
* @param dbc the current database context
* @param name the name of the user
* @param password the password of the user
* @param remoteAddress the remote address of the request
* @param type the type of the user
*
* @return the user that was read
*
* @throws CmsDataAccessException if something goes wrong
* @throws CmsPasswordEncryptionException if the password of the user could not be encrypted
*/
CmsUser readUser(CmsDbContext dbc, String name, String password, String remoteAddress, int type)
throws CmsDataAccessException, CmsPasswordEncryptionException;
/**
* Reads all existing users of the given type.<p>
*
* @param dbc the current database context
* @param type the type to read the users for
*
* @return a list of all <code>{@link CmsUser}</code> objects of the given type
*
* @throws CmsDataAccessException if something goes wrong
*/
List readUsers(CmsDbContext dbc, int type) throws CmsDataAccessException;
/**
* Reads all users that are members of the given group.<p>
*
* @param dbc the current database context
* @param name the name of the group to read the users from
* @param type the type of the users to read
*
* @return all <code>{@link CmsUser}</code> objects in the group
*
* @throws CmsDataAccessException if something goes wrong
*/
List readUsersOfGroup(CmsDbContext dbc, String name, int type) throws CmsDataAccessException;
/**
* Removes all access control entries belonging to a resource.<p>
*
* @param dbc the current database context
* @param project the project to write the entry
* @param resource the id of the resource
*
* @throws CmsDataAccessException if something goes wrong
*/
void removeAccessControlEntries(CmsDbContext dbc, CmsProject project, CmsUUID resource)
throws CmsDataAccessException;
/**
* Removes all access control entries belonging to a principal.<p>
*
* @param dbc the current database context
* @param project the project to write the entry
* @param onlineProject the online project
* @param principal the id of the principal
*
* @throws CmsDataAccessException if something goes wrong
*/
void removeAccessControlEntriesForPrincipal(
CmsDbContext dbc,
CmsProject project,
CmsProject onlineProject,
CmsUUID principal) throws CmsDataAccessException;
/**
* Removes an access control entry.<p>
*
* @param dbc the current database context
* @param project the project to write the entry
* @param resource the id of the resource
* @param principal the id of the principal
*
* @throws CmsDataAccessException if something goes wrong
*/
void removeAccessControlEntry(CmsDbContext dbc, CmsProject project, CmsUUID resource, CmsUUID principal)
throws CmsDataAccessException;
/**
* Writes an access control entry.<p>
*
* @param dbc the current database context
* @param project the project to write the entry
* @param acEntry the entry to write
*
* @throws CmsDataAccessException if something goes wrong
*/
void writeAccessControlEntry(CmsDbContext dbc, CmsProject project, CmsAccessControlEntry acEntry)
throws CmsDataAccessException;
/**
* Writes an already existing group.<p>
*
* The group id has to be a valid OpenCms group id.<br>
*
* The group with the given id will be completely overriden
* by the given data.<p>
*
* @param dbc the current database context
* @param group the group to update
*
* @throws CmsDataAccessException if something goes wrong
*/
void writeGroup(CmsDbContext dbc, CmsGroup group) throws CmsDataAccessException;
/**
* Sets a new password for a user.<p>
*
* @param dbc the current database context
* @param userName the user to set the password for
* @param type the type of the user
* @param oldPassword the current password
* @param newPassword the password to set
*
* @throws CmsDataAccessException if something goes wrong
* @throws CmsPasswordEncryptionException if the (new) password could not be encrypted
*/
void writePassword(CmsDbContext dbc, String userName, int type, String oldPassword, String newPassword)
throws CmsDataAccessException, CmsPasswordEncryptionException;
/**
* Updates the user information. <p>
*
* The user id has to be a valid OpenCms user id.<br>
*
* The user with the given id will be completely overriden
* by the given data.<p>
*
* @param dbc the current database context
* @param user the user to update
*
* @throws CmsDataAccessException if something goes wrong
*/
void writeUser(CmsDbContext dbc, CmsUser user) throws CmsDataAccessException;
/**
* Changes the user type of the given user.<p>
*
* @param dbc the current database context
* @param userId the id of the user to change
* @param userType the new type of the user
*
* @throws CmsDataAccessException if something goes wrong
*/
void writeUserType(CmsDbContext dbc, CmsUUID userId, int userType) throws CmsDataAccessException;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -