|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.esupportail.portal.utils.injac.injacSpacesCreation.InjacSpacesCreation
injacSpacesCreation [spaceName] [authors] [editors]
[authors] = user1:user2:user3...
[editors] = user1:user2:user3...
action of the script :
Variables between {} are defined in the configuration file : /properties/config.xml
1> Create two directories : /{injacPath}/{editorSpacesPath}/[spaceName]
/{injacPath}/{publicationSpacesPath}/[spaceName]
2> Create the role {AuthorsGroupPrefix}[spaceName]
Add the authors [authors] to this role
Grant write and read for this role to /{injacPath}/{editorSpacesPath}/[spaceName]
3> Create the role {EditorsGroupPrefix}[spaceName]
Add the editors [editors] to this role
Grant write and read for this role to /{injacPath}/{publicationSpacesPath}/[spaceName]
Grant read for this role to /{injacPath}/{editorSpacesPath}/[spaceName]
Field Summary | |
private org.esupportail.portal.utils.injac.tools.ACLManager |
aclManager
|
private java.lang.String |
authorsGroupPrefix
|
private java.lang.String |
context
|
private static java.lang.String |
EDITOR_SPACE
|
private java.lang.String |
editorsGroupPrefix
|
private java.lang.String |
editorSpacesPath
|
private org.apache.commons.httpclient.HttpURL |
httpUrl
|
private java.lang.String |
injacPath
|
private org.apache.log4j.Logger |
logger
|
private static java.lang.String |
PUBLICATION_SPACE
|
private java.lang.String |
publicationSpacesPath
|
private java.lang.String |
roleDirectoryRootDirectory
|
private java.lang.String |
userDirectoryRootDirectory
|
private org.apache.webdav.lib.WebdavResource |
webDavResource
|
private java.lang.String |
webdavServerLogin
|
private java.lang.String |
webdavServerPassword
|
private java.lang.String |
webdavServerUrl
|
private java.lang.String |
webdavServerUsersRole
|
Constructor Summary | |
InjacSpacesCreation()
|
Method Summary | |
private void |
addUserToRole(org.apache.webdav.lib.WebdavResource webDavResource,
java.lang.String roleName,
java.util.Enumeration userList)
Add a String Enumeration of users to a role |
private void |
createInjacSpace(org.apache.webdav.lib.WebdavResource webDavResource,
java.lang.String spaceName,
java.lang.String spaceType)
Create an Injac space with the specified type. |
private void |
createRole(org.apache.webdav.lib.WebdavResource webDavResource,
java.lang.String roleName)
Create a role |
private void |
init()
Initialize all the variables and connect to the WebDAV server |
static void |
main(java.lang.String[] args)
|
private java.util.Enumeration |
parseUserList(java.lang.String userList)
Parse a user list given in parameter of the application |
private boolean |
pathExist(org.apache.webdav.lib.WebdavResource webDavResource,
java.lang.String path)
Verify if the WebDAV ressource exits |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static java.lang.String EDITOR_SPACE
private static java.lang.String PUBLICATION_SPACE
private org.apache.commons.httpclient.HttpURL httpUrl
private org.apache.webdav.lib.WebdavResource webDavResource
private java.lang.String context
private org.esupportail.portal.utils.injac.tools.ACLManager aclManager
private java.lang.String injacPath
private java.lang.String editorSpacesPath
private java.lang.String publicationSpacesPath
private java.lang.String authorsGroupPrefix
private java.lang.String editorsGroupPrefix
private java.lang.String webdavServerUrl
private java.lang.String webdavServerLogin
private java.lang.String webdavServerPassword
private java.lang.String webdavServerUsersRole
private java.lang.String userDirectoryRootDirectory
private java.lang.String roleDirectoryRootDirectory
private org.apache.log4j.Logger logger
Constructor Detail |
public InjacSpacesCreation()
Method Detail |
private void init()
private boolean pathExist(org.apache.webdav.lib.WebdavResource webDavResource, java.lang.String path)
webDavResource
- path
- syntax: /{context}/path - exemple: /slide/files/myRessource
private void createInjacSpace(org.apache.webdav.lib.WebdavResource webDavResource, java.lang.String spaceName, java.lang.String spaceType) throws WrongPathException
webDavResource
- spaceName
- the name of the space to createspaceType
- the type of the space to create
WrongPathException
private void createRole(org.apache.webdav.lib.WebdavResource webDavResource, java.lang.String roleName) throws WrongPathException
webDavResource
- roleName
- the name of the role to create
WrongPathException
private void addUserToRole(org.apache.webdav.lib.WebdavResource webDavResource, java.lang.String roleName, java.util.Enumeration userList)
webDavResource
- roleName
- the target roleuserList
- the String Enumeration of users to add in the roleprivate java.util.Enumeration parseUserList(java.lang.String userList)
userList
- syntax: user1:user2:user3:...
public static void main(java.lang.String[] args)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |