i_cmsuserdriver.java
来自「找了很久才找到到源代码」· Java 代码 · 共 712 行 · 第 1/2 页
JAVA
712 行
*
* @throws CmsDataAccessException if operation was not successful
*/
List getUsers(CmsDbContext dbc, CmsOrganizationalUnit orgUnit, boolean recursive) throws CmsDataAccessException;
/**
* Initializes the SQL manager for this driver.<p>
*
* To obtain JDBC connections from different pools, further
* {online|offline|history} pool Urls have to be specified.<p>
*
* @param classname the classname of the SQL manager
*
* @return the SQL manager for this driver
*/
org.opencms.db.generic.CmsSqlManager initSqlManager(String classname);
/**
* Publish all access control entries of a resource from the given offline project to the online project.<p>
*
* Within the given project, the resource is identified by its offlineId, in the online project,
* it is identified by the given onlineId.<p>
*
* @param dbc the current database context
* @param offlineProject an offline project
* @param onlineProject the onlie project
* @param offlineId the offline resource id
* @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 groupFqn the fully qualified 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 groupFqn) 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 groupFqn the fully qualified 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 groupFqn) 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 ouFqn the fully qualified name of the organizational unit to restrict the result set for
* @param includeChildOus include groups of child organizational units
* @param remoteAddress the IP address to filter the groups in the result list
* @param readRoles if to read roles or groups
*
* @return a list of <code>{@link CmsGroup}</code> objects
*
* @throws CmsDataAccessException if something goes wrong
*/
List readGroupsOfUser(
CmsDbContext dbc,
CmsUUID userId,
String ouFqn,
boolean includeChildOus,
String remoteAddress,
boolean readRoles) throws CmsDataAccessException;
/**
* Reads an organizational Unit based on its fully qualified name.<p>
*
* @param dbc the current db context
* @param ouFqn the fully qualified name of the organizational Unit to be read
*
* @return the organizational Unit with the provided fully qualified name
*
* @throws CmsDataAccessException if something goes wrong
*/
CmsOrganizationalUnit readOrganizationalUnit(CmsDbContext dbc, String ouFqn) 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 fully qualified name.<p>
*
* @param dbc the current database context
* @param userFqn the fully qualified name of the user to read
*
* @return the user that was read
*
* @throws CmsDataAccessException if something goes wrong
*/
CmsUser readUser(CmsDbContext dbc, String userFqn) throws CmsDataAccessException;
/**
* Reads a user from the database, only if the password is correct.<p>
*
* @param dbc the current database context
* @param userFqn the name of the user
* @param password the password of the user
* @param remoteAddress the remote address of the request, may be <code>null</code>
*
* @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 userFqn, String password, String remoteAddress)
throws CmsDataAccessException, CmsPasswordEncryptionException;
/**
* Reads the user additional information map.<p>
*
* @param dbc the current database context
* @param userId the id of the user to update
*
* @return the user additional information map
*
* @throws CmsDataAccessException if something goes wrong
*/
Map readUserInfos(CmsDbContext dbc, CmsUUID userId) throws CmsDataAccessException;
/**
* Reads all users that are members of the given group.<p>
*
* @param dbc the current database context
* @param groupFqn the fully qualified name of the group to read the users from
* @param includeOtherOuUsers include users of other organizational units
*
* @return all <code>{@link CmsUser}</code> objects in the group
*
* @throws CmsDataAccessException if something goes wrong
*/
List readUsersOfGroup(CmsDbContext dbc, String groupFqn, boolean includeOtherOuUsers) 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;
/**
* Removes a resource from the given organizational unit.<p>
*
* @param dbc the current db context
* @param orgUnit the organizational unit to remove the resource from
* @param resource the resource that is to be removed from the organizational unit
*
* @throws CmsDataAccessException if something goes wrong
*/
void removeResourceFromOrganizationalUnit(CmsDbContext dbc, CmsOrganizationalUnit orgUnit, CmsResource resource)
throws CmsDataAccessException;
/**
* Moves an user to the given organizational unit.<p>
*
* @param dbc the current db context
* @param orgUnit the organizational unit to move the user to
* @param user the user that is to be moved to the given organizational unit
*
* @throws CmsDataAccessException if something goes wrong
*/
void setUsersOrganizationalUnit(CmsDbContext dbc, CmsOrganizationalUnit orgUnit, CmsUser user)
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;
/**
* Writes an already existing organizational unit.<p>
*
* The organizational unit id has to be a valid OpenCms organizational unit id.<br>
*
* The organizational unit with the given id will be completely overriden
* by the given data.<p>
*
* @param dbc the current db context
* @param organizationalUnit the organizational unit that should be written
*
* @throws CmsDataAccessException if operation was not successful
*/
void writeOrganizationalUnit(CmsDbContext dbc, CmsOrganizationalUnit organizationalUnit)
throws CmsDataAccessException;
/**
* Sets a new password for a user.<p>
*
* @param dbc the current database context
* @param userFqn the fullyqualified name of the user to set the password for
* @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 userFqn, String oldPassword, String newPassword)
throws CmsDataAccessException, CmsPasswordEncryptionException;
/**
* Updates the user information. <p>
*
* The user id has to be a valid OpenCms user id.<p>
*
* 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;
/**
* Writes an user additional information entry.<p>
*
* @param dbc the current database context
* @param userId the id of the user to update
* @param key the key of the info to write
* @param value the value of the info to write
*
* @throws CmsDataAccessException if something goes wrong
*/
void writeUserInfo(CmsDbContext dbc, CmsUUID userId, String key, Object value) throws CmsDataAccessException;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?