Class PermissionsPanel
- java.lang.Object
-
- com.google.gwt.user.client.ui.UIObject
-
- com.google.gwt.user.client.ui.Widget
-
- com.google.gwt.user.client.ui.Panel
-
- com.google.gwt.user.client.ui.HTMLTable
-
- com.google.gwt.user.client.ui.FlexTable
-
- org.pentaho.mantle.client.solutionbrowser.fileproperties.PermissionsPanel
-
- All Implemented Interfaces:
com.google.gwt.event.dom.client.HasAllDragAndDropHandlers,com.google.gwt.event.dom.client.HasClickHandlers,com.google.gwt.event.dom.client.HasDoubleClickHandlers,com.google.gwt.event.dom.client.HasDragEndHandlers,com.google.gwt.event.dom.client.HasDragEnterHandlers,com.google.gwt.event.dom.client.HasDragHandlers,com.google.gwt.event.dom.client.HasDragLeaveHandlers,com.google.gwt.event.dom.client.HasDragOverHandlers,com.google.gwt.event.dom.client.HasDragStartHandlers,com.google.gwt.event.dom.client.HasDropHandlers,com.google.gwt.event.logical.shared.HasAttachHandlers,com.google.gwt.event.shared.HasHandlers,com.google.gwt.user.client.EventListener,com.google.gwt.user.client.ui.HasVisibility,com.google.gwt.user.client.ui.HasWidgets,com.google.gwt.user.client.ui.HasWidgets.ForIsWidget,com.google.gwt.user.client.ui.IsWidget,com.google.gwt.user.client.ui.SourcesTableEvents,Iterable<com.google.gwt.user.client.ui.Widget>,IFileModifier
public class PermissionsPanel extends com.google.gwt.user.client.ui.FlexTable implements IFileModifier
Permissions tab sub panel of FilePropertiesDialog. GET ACL call is performed by FilePropertiesDialog and then passed to sub panels to consolidate
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.FlexTable
com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter
-
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.HTMLTable
com.google.gwt.user.client.ui.HTMLTable.Cell, com.google.gwt.user.client.ui.HTMLTable.CellFormatter, com.google.gwt.user.client.ui.HTMLTable.ColumnFormatter, com.google.gwt.user.client.ui.HTMLTable.RowFormatter
-
-
Field Summary
Fields Modifier and Type Field Description static intPERM_ALLstatic intPERM_DELETEstatic intPERM_GRANT_PERMstatic intPERM_READstatic intPERM_WRITEstatic intROLE_TYPEstatic intUSER_TYPE
-
Constructor Summary
Constructors Constructor Description PermissionsPanel(org.pentaho.gwt.widgets.client.filechooser.RepositoryFile theFileSummary)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapply()PUT acl changes back via REST call to /aclvoidbuildPermissionsTable(com.google.gwt.xml.client.Document fileInfo)Set the widgets according to what is currently in the DOM.protected List<String>getNames(com.google.gwt.xml.client.Document fileInfo, int type)voidinit()voidinit(org.pentaho.gwt.widgets.client.filechooser.RepositoryFile fileSummary, com.google.gwt.xml.client.Document fileInfo)Take permissions from fileInfo response and create roles and users listList<com.google.gwt.http.client.RequestBuilder>prepareRequests()Use this method to create RequestBuilder objects and use RequestBuilder.setRequestData Add RequestBuilder objects to the List which is then used by FilePropertiesDialog to iterate through and call each request sequentially by chaining them in the callbacks.protected voidsetAclResponse(com.google.gwt.http.client.Response response)Get owner name from acl responsevoidupdatePermissionMask(com.google.gwt.xml.client.Document fileInfo, boolean grant, int perm)-
Methods inherited from class com.google.gwt.user.client.ui.FlexTable
addCell, getCellCount, getFlexCellFormatter, getRowCount, insertCell, insertRow, prepareCell, prepareRow, removeAllRows, removeCell, removeCells, removeRow
-
Methods inherited from class com.google.gwt.user.client.ui.HTMLTable
addClickHandler, addDoubleClickHandler, addDragEndHandler, addDragEnterHandler, addDragHandler, addDragLeaveHandler, addDragOverHandler, addDragStartHandler, addDropHandler, addTableListener, checkCellBounds, checkRowBounds, clear, clear, clearCell, createCell, getBodyElement, getCellForEvent, getCellFormatter, getCellPadding, getCellSpacing, getColumnFormatter, getDOMCellCount, getDOMCellCount, getDOMCellCount, getDOMRowCount, getDOMRowCount, getDOMRowCount, getEventTargetCell, getHTML, getRowFormatter, getText, getWidget, insertCells, internalClearCell, internalClearCell, isCellPresent, iterator, onEnsureDebugId, prepareColumn, remove, removeTableListener, setBorderWidth, setCellFormatter, setCellPadding, setCellSpacing, setColumnFormatter, setHTML, setHTML, setRowFormatter, setText, setWidget, setWidget
-
Methods inherited from class com.google.gwt.user.client.ui.Panel
add, add, adopt, doAttachChildren, doDetachChildren, orphan, remove
-
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
-
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
USER_TYPE
public static final int USER_TYPE
- See Also:
- Constant Field Values
-
ROLE_TYPE
public static final int ROLE_TYPE
- See Also:
- Constant Field Values
-
PERM_READ
public static final int PERM_READ
- See Also:
- Constant Field Values
-
PERM_WRITE
public static final int PERM_WRITE
- See Also:
- Constant Field Values
-
PERM_DELETE
public static final int PERM_DELETE
- See Also:
- Constant Field Values
-
PERM_GRANT_PERM
public static final int PERM_GRANT_PERM
- See Also:
- Constant Field Values
-
PERM_ALL
public static final int PERM_ALL
- See Also:
- Constant Field Values
-
-
Method Detail
-
buildPermissionsTable
public void buildPermissionsTable(com.google.gwt.xml.client.Document fileInfo)
Set the widgets according to what is currently in the DOM.
-
updatePermissionMask
public void updatePermissionMask(com.google.gwt.xml.client.Document fileInfo, boolean grant, int perm)- Parameters:
grant-perm-
-
apply
public void apply()
PUT acl changes back via REST call to /acl- Specified by:
applyin interfaceIFileModifier
-
prepareRequests
public List<com.google.gwt.http.client.RequestBuilder> prepareRequests()
Description copied from interface:IFileModifierUse this method to create RequestBuilder objects and use RequestBuilder.setRequestData Add RequestBuilder objects to the List which is then used by FilePropertiesDialog to iterate through and call each request sequentially by chaining them in the callbacks. It is not necessary to set a callback since FilePropertiesDialog will add its own- Specified by:
prepareRequestsin interfaceIFileModifier- Returns:
- See Also:
FilePropertiesDialog.applyPanel()
-
init
public void init(org.pentaho.gwt.widgets.client.filechooser.RepositoryFile fileSummary, com.google.gwt.xml.client.Document fileInfo)Take permissions from fileInfo response and create roles and users list- Specified by:
initin interfaceIFileModifier- Parameters:
fileSummary-fileInfo-
-
init
public void init()
-
getNames
protected List<String> getNames(com.google.gwt.xml.client.Document fileInfo, int type)
- Parameters:
type-- Returns:
- list of names of given "type"
-
setAclResponse
protected void setAclResponse(com.google.gwt.http.client.Response response)
Get owner name from acl response- Parameters:
response-
-
-