This class is an IEntityGroupStore that uses the native file
system for its back end. It also implements IEntityStore and
a no-op IEntitySearcher . You can substitute a functional entity
searcher by adding it to the group service element for this component in the
configuration document, compositeGroupServices.xml .
A groups file system looks like this:
-- groups root
-- org.jasig.portal.ChannelDefinition
-- channel definition file
-- channel definition file
...
-- org.jasig.portal.security.IPerson
-- person directory
-- person file
-- person file
...
-- person directory
etc.
The groups root is a file system directory declared in the group service
configuration document, where it is an attribute of the filesystem group
service element. This directory has sub-directories, each named for the
underlying entity type that groups in that sub-directory contain. If a
service only contains groups of IPersons, the groups root would have 1
sub-directory named org.jasig.portal.security.IPerson.
A directory named for a type may contain both sub-directories and files.
The sub-directories represent groups that can contain other groups. The
files represent groups that can contain entity as well as group members.
The files contain keys, one to a line, and look like this:
# this is a comment
# another comment
key1 Key One
key2
group:org$jasig$portal$security$IPerson/someDirectory/someFile
key3
# comment
Blank lines and lines that start with the COMMENT String (here
# ) are ignored. The first token on a non-ignored line is
assumed to be a group member key. If the key starts with the
GROUP_PREFIX (here :group ), it is treated as a
local group key. Otherwise, it is assumed to be an entity key. The rest of
the tokens on the line are ignored.
The file above contains 3 entity keys, key1 , key2 ,
and key3 , and 1 group key,
org$jasig$portal$security$IPerson/someDirectory/someFile . It
represents a group with 3 entity members and 1 group member. The local key
of a group is its file path starting at the type name, with the
FileSystemGroupStore.SUBSTITUTE_PERIOD character substituted
for the real period character.
The store is not implemented as a singleton, so you can have multiple
concurrent instances pointing to different groups root directories.
author: Dan Ellentuck version: $Revision: 36529 $ |