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
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets
com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
-
Constructor Summary
ConstructorDescriptionPermissionsPanel
(org.pentaho.gwt.widgets.client.filechooser.RepositoryFile theFileSummary) -
Method Summary
Modifier and TypeMethodDescriptionvoid
apply()
PUT acl changes back via REST call to /aclvoid
buildPermissionsTable
(com.google.gwt.xml.client.Document fileInfo) Set the widgets according to what is currently in the DOM.getNames
(com.google.gwt.xml.client.Document fileInfo, int type) void
init()
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 listList<com.google.gwt.http.client.RequestBuilder>
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 void
setAclResponse
(com.google.gwt.http.client.Response response) Get owner name from acl responsevoid
updatePermissionMask
(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 com.google.gwt.event.shared.HasHandlers
fireEvent
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
USER_TYPE
public static final int USER_TYPE- See Also:
-
ROLE_TYPE
public static final int ROLE_TYPE- See Also:
-
PERM_READ
public static final int PERM_READ- See Also:
-
PERM_WRITE
public static final int PERM_WRITE- See Also:
-
PERM_DELETE
public static final int PERM_DELETE- See Also:
-
PERM_GRANT_PERM
public static final int PERM_GRANT_PERM- See Also:
-
PERM_ALL
public static final int PERM_ALL- See Also:
-
-
Constructor Details
-
PermissionsPanel
public PermissionsPanel(org.pentaho.gwt.widgets.client.filechooser.RepositoryFile theFileSummary) - Parameters:
fileSummary
-
-
-
Method Details
-
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:
apply
in interfaceIFileModifier
-
prepareRequests
Description copied from interface:IFileModifier
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. It is not necessary to set a callback since FilePropertiesDialog will add its own- Specified by:
prepareRequests
in 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:
init
in interfaceIFileModifier
- Parameters:
fileSummary
-fileInfo
-
-
init
public void init() -
getNames
- 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
-
-