CStockage 4.2_beta-RC-1
API Documentation

org.esupportail.portal.channels.CStockage.config
Class Space

java.lang.Object
  extended byorg.esupportail.portal.channels.CStockage.config.Space

public class Space
extends java.lang.Object

Id: Space.java,v 1.0 9 juil. 2004
Copyright (c) 2004 Esup Portail (www.esup-portail.org)
Classes: Space
Original Author: Yohan Colmant
This represents a file space on the server


Constructor Summary
Space()
           
 
Method Summary
 void addPathElement(java.lang.String pathElement)
          Add a path element to the current directory
 boolean allowsSharing()
           
 boolean canRead(ServerAccess access)
          Check if we are authorized to read this space
 void checkAttribute(java.lang.String attributeName, org.jasig.portal.security.IPerson person)
          we look for a {...} form in the attribute.
 void checkPath(org.jasig.portal.security.IPerson person)
          We check if the is a {...} form in the path.
 void clearRegexp()
          Delete the regexp
 java.lang.Object clone()
          Clone this object
 java.lang.Object cloneWithoutServer()
          Clone this object
 boolean equals(java.lang.Object o)
          Compare this to another object
 java.lang.String getAclGroupPrefix()
           
 java.lang.String getAclNamespace()
           
 java.lang.String getAclSecurity()
           
 java.lang.String getAclUportalGroup()
           
 java.lang.String getAclUserPrefix()
           
 java.lang.String getActionType()
           
 java.lang.String getAuthenticationMode()
           
 java.util.ArrayList getAuthorization()
          return the authorization list
 java.lang.String getChannelActionClass()
           
 AbstractChannelAction getChannelActionObject()
          Get the channel action object
 java.lang.String getCifsDisablePlainTextPassword()
           
 java.lang.String getCifsDomain()
           
 java.lang.String getCifsResolveOrder()
           
 java.lang.String getCurrentPath()
           
 SharedSpaceProperties getCurrentViewer()
           
 java.lang.String getInitialLoginFromTheConfigurationFile()
           
 java.lang.String getKey()
           
 java.lang.String getLabel()
           
 java.lang.StringBuffer getLocalXml()
          Get the xml in the configuration file style
 java.lang.String getLogin()
           
 java.lang.String getMetadataNamespace()
           
 java.lang.String getNfsGidNumber()
           
 java.lang.String getNfsUidNumber()
           
 UserForPersonalization getOwner()
           
 java.lang.String getParentPath()
           
 java.lang.String getParentPathUntilSpaceRoot()
           
 java.lang.String getPassword()
           
 java.lang.String getPath()
           
 java.lang.String getPathElementAt(int index)
          Return the current element path at the good index
 java.lang.String getPathRegexp()
           
 java.lang.String getPathRegexpSeparator()
           
 int getPathSize()
          Return the path size
static java.lang.String getPathWithoutFirstAndLastSlash(java.lang.String path)
          Get the path from an initial path, without first and last slashes
 Server getServer()
           
 ServerAccess getServerAccessObject()
          Return the object used to access the server
 java.lang.String getServerType()
           
 java.lang.String getSpaceRootPath()
           
 DirectorySharingProperties getTargetsOfSharing()
           
 java.lang.String getUrl()
           
 java.lang.String getXml()
          Get the xml in the configuration file style
 void initCurrentUserPrivileges()
          Init the privileges of the current user.
 void initServerAccessObject(org.jasig.portal.security.IPerson person)
          init the server access object for this space
 boolean isAskedAuthentication()
          If the selected authentication is ASKED
 boolean isCasAuthentication()
          If the selected authentication is CAS
 boolean isCurrentPathAtRoot()
          Check if we are at the root of the space
 boolean isLoginIsFromConfigurationFile()
           
 boolean isPersonnalSpace()
           
 boolean isTrustedAuthentication()
          If the selected authentication is TRUSTED
 void removePathElement(int index)
          Remove an element from the current path
 void setAclSecurity(java.lang.String aclSecurity)
           
 void setActionType(java.lang.String actionType)
           
 void setAllowsSharing(java.lang.String allowsSharing)
           
 void setAuthorization(AuthorizationSpaceParameter authorization)
          add a new authorization to the list
 void setChannelActionClass(java.lang.String channelActionClass)
           
 boolean setChannelActionObject(org.jasig.portal.security.IPerson person, java.util.ArrayList spaces, BufferAction buffer, java.lang.String userPortalLogin, java.util.Vector userGroups)
          Set the object used to manage the actions of the channel
 void setCurrentViewer(SharedSpaceProperties currentViewer)
           
 void setKey(java.lang.String key)
           
 void setLabel(java.lang.String label)
           
 void setLogin(java.lang.String login)
           
 void setMetadataNamespace(java.lang.String metadataNamespace)
           
 void setOwner(UserForPersonalization owner)
           
 void setPassword(java.lang.String password)
           
 void setPath(java.lang.String path)
           
 void setPathRegexp(java.lang.String pathRegexp)
           
 void setPathRegexpSeparator(java.lang.String pathRegexpSeparator)
           
 void setPersonnalSpace(boolean personnalSpace)
           
 void setServer(Server server)
           
 void setServerAccessClass(java.lang.String serverAccessClass)
           
 boolean setServerAccessObject()
          Set the server access object for this space
 void setTargetsOfSharing(DirectorySharingProperties targetsOfSharing)
           
 java.lang.String toString()
          Return a String representation of this space
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Space

public Space()
Method Detail

getAclSecurity

public java.lang.String getAclSecurity()
Returns:
Returns the aclSecurity.

setAclSecurity

public void setAclSecurity(java.lang.String aclSecurity)
Parameters:
aclSecurity - The aclSecurity to set.

getCurrentViewer

public SharedSpaceProperties getCurrentViewer()
Returns:
Returns the currentViewer.

setCurrentViewer

public void setCurrentViewer(SharedSpaceProperties currentViewer)
Parameters:
currentViewer - The targetOfsharing to set.

getOwner

public UserForPersonalization getOwner()
Returns:
Returns the owner.

setOwner

public void setOwner(UserForPersonalization owner)
Parameters:
owner - The owner to set.

initCurrentUserPrivileges

public void initCurrentUserPrivileges()
Init the privileges of the current user. If he can read, write, write-acl ??


getTargetsOfSharing

public DirectorySharingProperties getTargetsOfSharing()
Returns:
Returns the targetsOfSharing.

setTargetsOfSharing

public void setTargetsOfSharing(DirectorySharingProperties targetsOfSharing)
Parameters:
targetsOfSharing - The targetsOfSharing to set.

getServer

public Server getServer()
Returns:
Returns the server.

setServer

public void setServer(Server server)
Parameters:
server - The server to set.

getMetadataNamespace

public java.lang.String getMetadataNamespace()
Returns:
Returns the metadataNamespace.

setMetadataNamespace

public void setMetadataNamespace(java.lang.String metadataNamespace)
Parameters:
metadataNamespace - The metadataNamespace to set.

getAuthorization

public java.util.ArrayList getAuthorization()
return the authorization list

Returns:
the authorization list

setAuthorization

public void setAuthorization(AuthorizationSpaceParameter authorization)
add a new authorization to the list

Parameters:
authorization - the authorization to add

getCifsDisablePlainTextPassword

public java.lang.String getCifsDisablePlainTextPassword()
Returns:
Returns the cifsDisablePlainTextPassword.

getCifsDomain

public java.lang.String getCifsDomain()
Returns:
Returns the cifsDomain.

getCifsResolveOrder

public java.lang.String getCifsResolveOrder()
Returns:
Returns the cifsResolveOrder.

getActionType

public java.lang.String getActionType()
Returns:
Returns the actionType.

setActionType

public void setActionType(java.lang.String actionType)
Parameters:
actionType - The actionType to set.

getServerType

public java.lang.String getServerType()
Returns:
Returns the serverType.

getAclUportalGroup

public java.lang.String getAclUportalGroup()
Returns:
Returns the aclUportalGroup.

getAclUserPrefix

public java.lang.String getAclUserPrefix()
Returns:
Returns the aclUserPrefix.

getAclGroupPrefix

public java.lang.String getAclGroupPrefix()
Returns:
Returns the aclGroupPrefix.

getAclNamespace

public java.lang.String getAclNamespace()
Returns:
Returns the aclNamespace.

isPersonnalSpace

public boolean isPersonnalSpace()
Returns:
Returns the personnalSpace.

setPersonnalSpace

public void setPersonnalSpace(boolean personnalSpace)
Parameters:
personnalSpace - The personnalSpace to set.

isCasAuthentication

public boolean isCasAuthentication()
                            throws PropertiesException
If the selected authentication is CAS

Returns:
trus is cas is selected
Throws:
PropertiesException

isTrustedAuthentication

public boolean isTrustedAuthentication()
                                throws PropertiesException
If the selected authentication is TRUSTED

Returns:
true if trusted is selected
Throws:
PropertiesException

isAskedAuthentication

public boolean isAskedAuthentication()
                              throws PropertiesException
If the selected authentication is ASKED

Returns:
true if asked is selected
Throws:
PropertiesException

getLogin

public java.lang.String getLogin()
Returns:
Returns the login.

setLogin

public void setLogin(java.lang.String login)
Parameters:
login - The login to set.

isLoginIsFromConfigurationFile

public boolean isLoginIsFromConfigurationFile()
Returns:
Returns the loginIsFromConfigurationFile.

getInitialLoginFromTheConfigurationFile

public java.lang.String getInitialLoginFromTheConfigurationFile()
Returns:
Returns the initialLoginFromTheConfigurationFile.

getPassword

public java.lang.String getPassword()
                             throws PropertiesException
Returns:
Returns the password.
Throws:
PropertiesException

setPassword

public void setPassword(java.lang.String password)
Parameters:
password - The trustedPassword to set.

getUrl

public java.lang.String getUrl()
                        throws PropertiesException
Returns:
Returns the url.
Throws:
PropertiesException

getAuthenticationMode

public java.lang.String getAuthenticationMode()
Returns:
Returns the authenticationMode.

setServerAccessClass

public void setServerAccessClass(java.lang.String serverAccessClass)
Parameters:
serverAccessClass - The serverAccessClass to set.

getChannelActionClass

public java.lang.String getChannelActionClass()
Returns:
Returns the accessClass.

setChannelActionClass

public void setChannelActionClass(java.lang.String channelActionClass)
Parameters:
channelActionClass - The channelActionClass to set.

getKey

public java.lang.String getKey()
Returns:
Returns the key.

setKey

public void setKey(java.lang.String key)
Parameters:
key - The key to set.

getLabel

public java.lang.String getLabel()
Returns:
Returns the label.

setLabel

public void setLabel(java.lang.String label)
Parameters:
label - The label to set.

getPathRegexp

public java.lang.String getPathRegexp()
Returns:
Returns the pathRegexp.

setPathRegexp

public void setPathRegexp(java.lang.String pathRegexp)
Parameters:
pathRegexp - The pathRegexp to set.

getPathRegexpSeparator

public java.lang.String getPathRegexpSeparator()
Returns:
Returns the pathRegexpSeparator.

setPathRegexpSeparator

public void setPathRegexpSeparator(java.lang.String pathRegexpSeparator)
Parameters:
pathRegexpSeparator - The pathRegexpSeparator to set.

setPath

public void setPath(java.lang.String path)
Parameters:
path - The path to set.

getCurrentPath

public java.lang.String getCurrentPath()
Returns:
Returns the path.

getParentPathUntilSpaceRoot

public java.lang.String getParentPathUntilSpaceRoot()
Returns:
Returns the parent path until the space root

getSpaceRootPath

public java.lang.String getSpaceRootPath()
Returns:
Returns the space root path

getParentPath

public java.lang.String getParentPath()
Returns:
Returns the parent path.

getPathWithoutFirstAndLastSlash

public static java.lang.String getPathWithoutFirstAndLastSlash(java.lang.String path)
Get the path from an initial path, without first and last slashes

Parameters:
path - the path to transform
Returns:
the path without first and last slashes

getPath

public java.lang.String getPath()
Returns:
Returns the path.

checkPath

public void checkPath(org.jasig.portal.security.IPerson person)
We check if the is a {...} form in the path. If yes, we replace by the real value

Parameters:
person - the connected person

clearRegexp

public void clearRegexp()
Delete the regexp


checkAttribute

public void checkAttribute(java.lang.String attributeName,
                           org.jasig.portal.security.IPerson person)
we look for a {...} form in the attribute. If yes, we replace it with the real value

Parameters:
attributeName - to check
person - uPortal person object

addPathElement

public void addPathElement(java.lang.String pathElement)
Add a path element to the current directory

Parameters:
pathElement -

removePathElement

public void removePathElement(int index)
Remove an element from the current path

Parameters:
index -

getPathSize

public int getPathSize()
Return the path size

Returns:
the size

isCurrentPathAtRoot

public boolean isCurrentPathAtRoot()
Check if we are at the root of the space

Returns:
true if we are at the root, else false

getPathElementAt

public java.lang.String getPathElementAt(int index)
Return the current element path at the good index

Parameters:
index - the selected index
Returns:
a string

canRead

public boolean canRead(ServerAccess access)
Check if we are authorized to read this space

Parameters:
access - the object used to access the server
Returns:
true if authorized else false

setServerAccessObject

public boolean setServerAccessObject()
                              throws PropertiesException,
                                     java.lang.ClassNotFoundException,
                                     java.lang.InstantiationException,
                                     java.lang.IllegalAccessException,
                                     java.net.MalformedURLException,
                                     ApplicationException
Set the server access object for this space

Returns:
true if we can access this space, else false
Throws:
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.net.MalformedURLException
ApplicationException
PropertiesException

getServerAccessObject

public ServerAccess getServerAccessObject()
Return the object used to access the server

Returns:
the object used to access the server

initServerAccessObject

public void initServerAccessObject(org.jasig.portal.security.IPerson person)
                            throws java.net.MalformedURLException,
                                   PropertiesException
init the server access object for this space

Parameters:
person - the uportal person object
Throws:
java.net.MalformedURLException
PropertiesException

setChannelActionObject

public boolean setChannelActionObject(org.jasig.portal.security.IPerson person,
                                      java.util.ArrayList spaces,
                                      BufferAction buffer,
                                      java.lang.String userPortalLogin,
                                      java.util.Vector userGroups)
                               throws ChannelException
Set the object used to manage the actions of the channel

Parameters:
person - the uPortal person object
spaces - the spaces used
buffer - the buffer used to get for example the clipboard
userPortalLogin - The user login in the portal
userGroups - The groups of the user in the portal
Returns:
true if well done
Throws:
ChannelException

getChannelActionObject

public AbstractChannelAction getChannelActionObject()
Get the channel action object

Returns:
the channel action object

getNfsGidNumber

public java.lang.String getNfsGidNumber()
Returns:
Returns the nfsGidNumber.

getNfsUidNumber

public java.lang.String getNfsUidNumber()
Returns:
Returns the nfsUidNumber.

allowsSharing

public boolean allowsSharing()
                      throws PropertiesException
Returns:
Returns the sharing.
Throws:
PropertiesException

setAllowsSharing

public void setAllowsSharing(java.lang.String allowsSharing)
Parameters:
allowsSharing - The allowsSharing to set.

toString

public java.lang.String toString()
Return a String representation of this space


equals

public boolean equals(java.lang.Object o)
Compare this to another object

Parameters:
o - object to compare

cloneWithoutServer

public java.lang.Object cloneWithoutServer()
Clone this object

Returns:
a clone of this object

clone

public java.lang.Object clone()
Clone this object

Returns:
a clone of this object

getLocalXml

public java.lang.StringBuffer getLocalXml()
Get the xml in the configuration file style

Returns:
the xml in the configuration file style

getXml

public java.lang.String getXml()
Get the xml in the configuration file style

Returns:
the xml in the configuration file style

CStockage 4.2_beta-RC-1
API Documentation