Class SecurityController
- java.lang.Object
-
- org.pentaho.ui.xul.XulEventSourceAdapter
-
- org.pentaho.ui.xul.impl.AbstractXulEventHandler
-
- org.pentaho.di.ui.repository.repositoryexplorer.controllers.LazilyInitializedController
-
- org.pentaho.di.ui.repository.repositoryexplorer.controllers.SecurityController
-
- All Implemented Interfaces:
IUISupportController
,org.pentaho.ui.xul.impl.XulEventHandler
,org.pentaho.ui.xul.XulEventSource
public class SecurityController extends LazilyInitializedController implements IUISupportController
XulEventHandler
for the Security panel of the repository explorer.This class handles only user-related functionality. If supported, other controllers handle roles, etc.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.pentaho.ui.xul.binding.BindingFactory
bf
protected MainController
mainController
protected boolean
managed
protected org.pentaho.ui.xul.components.XulMessageBox
messageBox
protected UISecurity
security
protected UISecurityUser
securityUser
protected org.pentaho.di.repository.RepositorySecurityManager
service
static int
USER_DECK
protected org.pentaho.ui.xul.components.XulTextbox
userDescription
protected org.pentaho.ui.xul.containers.XulDialog
userDialog
protected org.pentaho.ui.xul.components.XulTextbox
userPassword
-
Fields inherited from class org.pentaho.di.ui.repository.repositoryexplorer.controllers.LazilyInitializedController
initialized, repository
-
-
Constructor Summary
Constructors Constructor Description SecurityController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addUser()
addRole method is called when user has click ok on a add role dialog.void
cancelAddUserDialog()
void
changeToUserDeck()
protected void
createBindings()
protected void
createModel()
protected void
createSecurity()
protected void
createSecurityUser()
protected boolean
doLazyInit()
protected void
enableButtons(boolean enableNew, boolean enableEdit, boolean enableRemove)
org.pentaho.ui.xul.components.XulMessageBox
getMessageBox()
String
getName()
void
init(org.pentaho.di.repository.Repository rep)
protected boolean
initService()
void
removeUser()
removeUser method is called when user has click on a remove button in a user deck.void
saveUser()
saveUser method is called when the user click on the ok button of a Add or Edit User dialog Depending on the mode it calls add of update user methodvoid
setEnableButtons(int selectedIndex)
protected void
setInitialDeck()
void
setMessageBox(org.pentaho.ui.xul.components.XulMessageBox messageBox)
void
showAddUserDialog()
protected void
showButtons(boolean showNew, boolean showEdit, boolean showRemove)
void
showEditUserDialog()
void
tabClicked()
protected void
updateUser()
updateUser method is called when user has click ok on a edit user dialog.-
Methods inherited from class org.pentaho.di.ui.repository.repositoryexplorer.controllers.LazilyInitializedController
doInEventThread, doWithBusyIndicator, lazyInit
-
Methods inherited from class org.pentaho.ui.xul.impl.AbstractXulEventHandler
bind, bind, getData, getXulDomContainer, setData, setName, setXulDomContainer
-
-
-
-
Field Detail
-
USER_DECK
public static final int USER_DECK
- See Also:
- Constant Field Values
-
userDialog
protected org.pentaho.ui.xul.containers.XulDialog userDialog
-
userPassword
protected org.pentaho.ui.xul.components.XulTextbox userPassword
-
userDescription
protected org.pentaho.ui.xul.components.XulTextbox userDescription
-
service
protected org.pentaho.di.repository.RepositorySecurityManager service
-
mainController
protected MainController mainController
-
security
protected UISecurity security
-
bf
protected org.pentaho.ui.xul.binding.BindingFactory bf
-
securityUser
protected UISecurityUser securityUser
-
messageBox
protected org.pentaho.ui.xul.components.XulMessageBox messageBox
-
managed
protected boolean managed
-
-
Method Detail
-
init
public void init(org.pentaho.di.repository.Repository rep) throws ControllerInitializationException
- Specified by:
init
in interfaceIUISupportController
- Overrides:
init
in classLazilyInitializedController
- Throws:
ControllerInitializationException
-
doLazyInit
protected boolean doLazyInit()
- Specified by:
doLazyInit
in classLazilyInitializedController
-
initService
protected boolean initService()
-
setInitialDeck
protected void setInitialDeck()
-
getMessageBox
public org.pentaho.ui.xul.components.XulMessageBox getMessageBox()
-
setMessageBox
public void setMessageBox(org.pentaho.ui.xul.components.XulMessageBox messageBox)
-
createBindings
protected void createBindings()
-
getName
public String getName()
- Specified by:
getName
in interfaceIUISupportController
- Specified by:
getName
in interfaceorg.pentaho.ui.xul.impl.XulEventHandler
- Overrides:
getName
in classorg.pentaho.ui.xul.impl.AbstractXulEventHandler
-
addUser
protected void addUser()
addRole method is called when user has click ok on a add role dialog. The method add the role- Throws:
Exception
-
updateUser
protected void updateUser()
updateUser method is called when user has click ok on a edit user dialog. The method updates the user- Throws:
Exception
-
removeUser
public void removeUser() throws Exception
removeUser method is called when user has click on a remove button in a user deck. It first displays a confirmation message to the user and once the user selects ok, it remove the user- Throws:
Exception
-
changeToUserDeck
public void changeToUserDeck()
-
saveUser
public void saveUser() throws Exception
saveUser method is called when the user click on the ok button of a Add or Edit User dialog Depending on the mode it calls add of update user method- Throws:
Exception
-
setEnableButtons
public void setEnableButtons(int selectedIndex)
-
enableButtons
protected void enableButtons(boolean enableNew, boolean enableEdit, boolean enableRemove)
-
showButtons
protected void showButtons(boolean showNew, boolean showEdit, boolean showRemove)
-
tabClicked
public void tabClicked()
-
-