id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
115,800
timols/java-gitlab-api
src/main/java/org/gitlab/api/GitlabAPI.java
GitlabAPI.getRunners
public List<GitlabRunner> getRunners(GitlabRunner.RunnerScope scope) throws IOException { return getRunnersWithPagination(scope, null); }
java
public List<GitlabRunner> getRunners(GitlabRunner.RunnerScope scope) throws IOException { return getRunnersWithPagination(scope, null); }
[ "public", "List", "<", "GitlabRunner", ">", "getRunners", "(", "GitlabRunner", ".", "RunnerScope", "scope", ")", "throws", "IOException", "{", "return", "getRunnersWithPagination", "(", "scope", ",", "null", ")", ";", "}" ]
Returns a List of GitlabRunners. @param scope Can be null. Defines type of Runner to retrieve. @return List of GitLabRunners @throws IOException on Gitlab API call error
[ "Returns", "a", "List", "of", "GitlabRunners", "." ]
f03eedf952cfbb40306be3bf9234dcf78fab029e
https://github.com/timols/java-gitlab-api/blob/f03eedf952cfbb40306be3bf9234dcf78fab029e/src/main/java/org/gitlab/api/GitlabAPI.java#L3954-L3956
115,801
timols/java-gitlab-api
src/main/java/org/gitlab/api/GitlabAPI.java
GitlabAPI.getRunnerDetail
public GitlabRunner getRunnerDetail(int id) throws IOException { String tailUrl = String.format("%s/%d", GitlabRunner.URL, id); return retrieve().to(tailUrl, GitlabRunner.class); }
java
public GitlabRunner getRunnerDetail(int id) throws IOException { String tailUrl = String.format("%s/%d", GitlabRunner.URL, id); return retrieve().to(tailUrl, GitlabRunner.class); }
[ "public", "GitlabRunner", "getRunnerDetail", "(", "int", "id", ")", "throws", "IOException", "{", "String", "tailUrl", "=", "String", ".", "format", "(", "\"%s/%d\"", ",", "GitlabRunner", ".", "URL", ",", "id", ")", ";", "return", "retrieve", "(", ")", "."...
Get details information of the runner with the specified id. @param id Runner id. @return Extensive GitlabRunner Details. @throws IOException on gitlab api call error
[ "Get", "details", "information", "of", "the", "runner", "with", "the", "specified", "id", "." ]
f03eedf952cfbb40306be3bf9234dcf78fab029e
https://github.com/timols/java-gitlab-api/blob/f03eedf952cfbb40306be3bf9234dcf78fab029e/src/main/java/org/gitlab/api/GitlabAPI.java#L4002-L4005
115,802
timols/java-gitlab-api
src/main/java/org/gitlab/api/http/Query.java
Query.append
public Query append(final String name, final String value) throws UnsupportedEncodingException { params.add(new Tuple<String, Tuple<String, String>>(name, new Tuple<String, String>(value, URLEncoder.encode(value, "UTF-8")))); return this; }
java
public Query append(final String name, final String value) throws UnsupportedEncodingException { params.add(new Tuple<String, Tuple<String, String>>(name, new Tuple<String, String>(value, URLEncoder.encode(value, "UTF-8")))); return this; }
[ "public", "Query", "append", "(", "final", "String", "name", ",", "final", "String", "value", ")", "throws", "UnsupportedEncodingException", "{", "params", ".", "add", "(", "new", "Tuple", "<", "String", ",", "Tuple", "<", "String", ",", "String", ">", ">"...
Appends a parameter to the query @param name Parameter name @param value Parameter value @return this @throws java.io.UnsupportedEncodingException If the provided value cannot be URL Encoded
[ "Appends", "a", "parameter", "to", "the", "query" ]
f03eedf952cfbb40306be3bf9234dcf78fab029e
https://github.com/timols/java-gitlab-api/blob/f03eedf952cfbb40306be3bf9234dcf78fab029e/src/main/java/org/gitlab/api/http/Query.java#L40-L43
115,803
timols/java-gitlab-api
src/main/java/org/gitlab/api/models/CreateGroupRequest.java
CreateGroupRequest.toQuery
public Query toQuery() throws UnsupportedEncodingException{ return new Query() .append("name", name) .append("path", path) .appendIf("ldap_cn", ldapCn) .appendIf("description", description) .appendIf("membershipLock", membershipLock) .appendIf("share_wit...
java
public Query toQuery() throws UnsupportedEncodingException{ return new Query() .append("name", name) .append("path", path) .appendIf("ldap_cn", ldapCn) .appendIf("description", description) .appendIf("membershipLock", membershipLock) .appendIf("share_wit...
[ "public", "Query", "toQuery", "(", ")", "throws", "UnsupportedEncodingException", "{", "return", "new", "Query", "(", ")", ".", "append", "(", "\"name\"", ",", "name", ")", ".", "append", "(", "\"path\"", ",", "path", ")", ".", "appendIf", "(", "\"ldap_cn\...
Generates query representing this request's properties. @return {@link Query} @throws UnsupportedEncodingException
[ "Generates", "query", "representing", "this", "request", "s", "properties", "." ]
f03eedf952cfbb40306be3bf9234dcf78fab029e
https://github.com/timols/java-gitlab-api/blob/f03eedf952cfbb40306be3bf9234dcf78fab029e/src/main/java/org/gitlab/api/models/CreateGroupRequest.java#L37-L49
115,804
moagrius/TileView
tileview/src/main/java/com/qozix/tileview/Tile.java
Tile.setDecodedBitmap
private void setDecodedBitmap(Bitmap bitmap) { if (mState != State.DECODING) { mBitmap = null; return; } mBitmap = bitmap; mState = State.DECODED; mDrawingView.setDirty(); }
java
private void setDecodedBitmap(Bitmap bitmap) { if (mState != State.DECODING) { mBitmap = null; return; } mBitmap = bitmap; mState = State.DECODED; mDrawingView.setDirty(); }
[ "private", "void", "setDecodedBitmap", "(", "Bitmap", "bitmap", ")", "{", "if", "(", "mState", "!=", "State", ".", "DECODING", ")", "{", "mBitmap", "=", "null", ";", "return", ";", "}", "mBitmap", "=", "bitmap", ";", "mState", "=", "State", ".", "DECOD...
otherwise, set bitmap, update state, send to memory cache and notify drawing view
[ "otherwise", "set", "bitmap", "update", "state", "send", "to", "memory", "cache", "and", "notify", "drawing", "view" ]
fa708a001389418b2d878eba5a06f487e4dc524a
https://github.com/moagrius/TileView/blob/fa708a001389418b2d878eba5a06f487e4dc524a/tileview/src/main/java/com/qozix/tileview/Tile.java#L141-L149
115,805
moagrius/TileView
tileview/src/main/java/com/qozix/tileview/Tile.java
Tile.destroy
public void destroy(boolean removeFromQueue) { if (mState == State.IDLE) { return; } if (removeFromQueue) { mThreadPoolExecutor.remove(this); } if (mState == State.DECODED) { mMemoryCache.put(getCacheKey(), mBitmap); } mBitmap = null; mDrawingOptions.inBitmap = null; ...
java
public void destroy(boolean removeFromQueue) { if (mState == State.IDLE) { return; } if (removeFromQueue) { mThreadPoolExecutor.remove(this); } if (mState == State.DECODED) { mMemoryCache.put(getCacheKey(), mBitmap); } mBitmap = null; mDrawingOptions.inBitmap = null; ...
[ "public", "void", "destroy", "(", "boolean", "removeFromQueue", ")", "{", "if", "(", "mState", "==", "State", ".", "IDLE", ")", "{", "return", ";", "}", "if", "(", "removeFromQueue", ")", "{", "mThreadPoolExecutor", ".", "remove", "(", "this", ")", ";", ...
we use this signature to call from the Executor, so it can remove tiles via iterator
[ "we", "use", "this", "signature", "to", "call", "from", "the", "Executor", "so", "it", "can", "remove", "tiles", "via", "iterator" ]
fa708a001389418b2d878eba5a06f487e4dc524a
https://github.com/moagrius/TileView/blob/fa708a001389418b2d878eba5a06f487e4dc524a/tileview/src/main/java/com/qozix/tileview/Tile.java#L234-L250
115,806
moagrius/TileView
tileview/src/main/java/com/qozix/widget/ScrollView.java
ScrollView.onGenericMotionEvent
@Override public boolean onGenericMotionEvent(MotionEvent event) { if ((event.getSource() & InputDevice.SOURCE_CLASS_POINTER) != 0) { switch (event.getAction()) { case MotionEvent.ACTION_SCROLL: { if (!mIsBeingDragged) { final float vscroll = event.getAxisValue(MotionEvent.AXIS...
java
@Override public boolean onGenericMotionEvent(MotionEvent event) { if ((event.getSource() & InputDevice.SOURCE_CLASS_POINTER) != 0) { switch (event.getAction()) { case MotionEvent.ACTION_SCROLL: { if (!mIsBeingDragged) { final float vscroll = event.getAxisValue(MotionEvent.AXIS...
[ "@", "Override", "public", "boolean", "onGenericMotionEvent", "(", "MotionEvent", "event", ")", "{", "if", "(", "(", "event", ".", "getSource", "(", ")", "&", "InputDevice", ".", "SOURCE_CLASS_POINTER", ")", "!=", "0", ")", "{", "switch", "(", "event", "."...
INPUT & ACCESSIBILITY
[ "INPUT", "&", "ACCESSIBILITY" ]
fa708a001389418b2d878eba5a06f487e4dc524a
https://github.com/moagrius/TileView/blob/fa708a001389418b2d878eba5a06f487e4dc524a/tileview/src/main/java/com/qozix/widget/ScrollView.java#L839-L874
115,807
pedrovgs/DraggablePanel
draggablepanel/src/main/java/com/github/pedrovgs/transformer/ScaleTransformer.java
ScaleTransformer.updateScale
@Override public void updateScale(float verticalDragOffset) { ViewHelper.setScaleX(getView(), 1 - verticalDragOffset / getXScaleFactor()); ViewHelper.setScaleY(getView(), 1 - verticalDragOffset / getYScaleFactor()); }
java
@Override public void updateScale(float verticalDragOffset) { ViewHelper.setScaleX(getView(), 1 - verticalDragOffset / getXScaleFactor()); ViewHelper.setScaleY(getView(), 1 - verticalDragOffset / getYScaleFactor()); }
[ "@", "Override", "public", "void", "updateScale", "(", "float", "verticalDragOffset", ")", "{", "ViewHelper", ".", "setScaleX", "(", "getView", "(", ")", ",", "1", "-", "verticalDragOffset", "/", "getXScaleFactor", "(", ")", ")", ";", "ViewHelper", ".", "set...
Uses Nineoldandroids to change the scale. @param verticalDragOffset used to calculate the new scale.
[ "Uses", "Nineoldandroids", "to", "change", "the", "scale", "." ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/draggablepanel/src/main/java/com/github/pedrovgs/transformer/ScaleTransformer.java#L39-L42
115,808
pedrovgs/DraggablePanel
draggablepanel/src/main/java/com/github/pedrovgs/transformer/ScaleTransformer.java
ScaleTransformer.updatePosition
@Override public void updatePosition(float verticalDragOffset) { ViewHelper.setPivotX(getView(), getView().getWidth() - getMarginRight()); ViewHelper.setPivotY(getView(), getView().getHeight() - getMarginBottom()); }
java
@Override public void updatePosition(float verticalDragOffset) { ViewHelper.setPivotX(getView(), getView().getWidth() - getMarginRight()); ViewHelper.setPivotY(getView(), getView().getHeight() - getMarginBottom()); }
[ "@", "Override", "public", "void", "updatePosition", "(", "float", "verticalDragOffset", ")", "{", "ViewHelper", ".", "setPivotX", "(", "getView", "(", ")", ",", "getView", "(", ")", ".", "getWidth", "(", ")", "-", "getMarginRight", "(", ")", ")", ";", "...
Uses Nineoldandroids to change the position of the view. @param verticalDragOffset used to calculate the new position.
[ "Uses", "Nineoldandroids", "to", "change", "the", "position", "of", "the", "view", "." ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/draggablepanel/src/main/java/com/github/pedrovgs/transformer/ScaleTransformer.java#L49-L52
115,809
pedrovgs/DraggablePanel
draggablepanel/src/main/java/com/github/pedrovgs/DraggableViewCallback.java
DraggableViewCallback.onViewPositionChanged
@Override public void onViewPositionChanged(View changedView, int left, int top, int dx, int dy) { if (draggableView.isDragViewAtBottom()) { draggableView.changeDragViewViewAlpha(); } else { draggableView.restoreAlpha(); draggableView.changeDragViewScale(); draggableView.changeDragViewPo...
java
@Override public void onViewPositionChanged(View changedView, int left, int top, int dx, int dy) { if (draggableView.isDragViewAtBottom()) { draggableView.changeDragViewViewAlpha(); } else { draggableView.restoreAlpha(); draggableView.changeDragViewScale(); draggableView.changeDragViewPo...
[ "@", "Override", "public", "void", "onViewPositionChanged", "(", "View", "changedView", ",", "int", "left", ",", "int", "top", ",", "int", "dx", ",", "int", "dy", ")", "{", "if", "(", "draggableView", ".", "isDragViewAtBottom", "(", ")", ")", "{", "dragg...
Override method used to apply different scale and alpha effects while the view is being dragged. @param left position. @param top position. @param dx change in X position from the last call. @param dy change in Y position from the last call.
[ "Override", "method", "used", "to", "apply", "different", "scale", "and", "alpha", "effects", "while", "the", "view", "is", "being", "dragged", "." ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/draggablepanel/src/main/java/com/github/pedrovgs/DraggableViewCallback.java#L56-L67
115,810
pedrovgs/DraggablePanel
draggablepanel/src/main/java/com/github/pedrovgs/DraggableViewCallback.java
DraggableViewCallback.onViewReleased
@Override public void onViewReleased(View releasedChild, float xVel, float yVel) { super.onViewReleased(releasedChild, xVel, yVel); if (draggableView.isDragViewAtBottom() && !draggableView.isDragViewAtRight()) { triggerOnReleaseActionsWhileHorizontalDrag(xVel); } else { triggerOnReleaseActionsW...
java
@Override public void onViewReleased(View releasedChild, float xVel, float yVel) { super.onViewReleased(releasedChild, xVel, yVel); if (draggableView.isDragViewAtBottom() && !draggableView.isDragViewAtRight()) { triggerOnReleaseActionsWhileHorizontalDrag(xVel); } else { triggerOnReleaseActionsW...
[ "@", "Override", "public", "void", "onViewReleased", "(", "View", "releasedChild", ",", "float", "xVel", ",", "float", "yVel", ")", "{", "super", ".", "onViewReleased", "(", "releasedChild", ",", "xVel", ",", "yVel", ")", ";", "if", "(", "draggableView", "...
Override method used to apply different animations when the dragged view is released. The dragged view is going to be maximized or minimized if the view is above the middle of the custom view and the velocity is greater than a constant value. @param releasedChild the captured child view now being released. @param xVel...
[ "Override", "method", "used", "to", "apply", "different", "animations", "when", "the", "dragged", "view", "is", "released", ".", "The", "dragged", "view", "is", "going", "to", "be", "maximized", "or", "minimized", "if", "the", "view", "is", "above", "the", ...
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/draggablepanel/src/main/java/com/github/pedrovgs/DraggableViewCallback.java#L78-L86
115,811
pedrovgs/DraggablePanel
draggablepanel/src/main/java/com/github/pedrovgs/DraggableViewCallback.java
DraggableViewCallback.clampViewPositionHorizontal
@Override public int clampViewPositionHorizontal(View child, int left, int dx) { int newLeft = draggedView.getLeft(); if ((draggableView.isMinimized() && Math.abs(dx) > MINIMUM_DX_FOR_HORIZONTAL_DRAG) || ( draggableView.isDragViewAtBottom() && !draggableView.isDragViewAtRight())) { new...
java
@Override public int clampViewPositionHorizontal(View child, int left, int dx) { int newLeft = draggedView.getLeft(); if ((draggableView.isMinimized() && Math.abs(dx) > MINIMUM_DX_FOR_HORIZONTAL_DRAG) || ( draggableView.isDragViewAtBottom() && !draggableView.isDragViewAtRight())) { new...
[ "@", "Override", "public", "int", "clampViewPositionHorizontal", "(", "View", "child", ",", "int", "left", ",", "int", "dx", ")", "{", "int", "newLeft", "=", "draggedView", ".", "getLeft", "(", ")", ";", "if", "(", "(", "draggableView", ".", "isMinimized",...
Override method used to configure the horizontal drag. Restrict the motion of the dragged child view along the horizontal axis. @param child child view being dragged. @param left attempted motion along the X axis. @param dx proposed change in position for left. @return the new clamped position for left.
[ "Override", "method", "used", "to", "configure", "the", "horizontal", "drag", ".", "Restrict", "the", "motion", "of", "the", "dragged", "child", "view", "along", "the", "horizontal", "axis", "." ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/draggablepanel/src/main/java/com/github/pedrovgs/DraggableViewCallback.java#L108-L116
115,812
pedrovgs/DraggablePanel
draggablepanel/src/main/java/com/github/pedrovgs/DraggableViewCallback.java
DraggableViewCallback.clampViewPositionVertical
@Override public int clampViewPositionVertical(View child, int top, int dy) { int newTop = draggableView.getHeight() - draggableView.getDraggedViewHeightPlusMarginTop(); if (draggableView.isMinimized() && Math.abs(dy) >= MINIMUM_DY_FOR_VERTICAL_DRAG || (!draggableView.isMinimized() && !draggableView.isD...
java
@Override public int clampViewPositionVertical(View child, int top, int dy) { int newTop = draggableView.getHeight() - draggableView.getDraggedViewHeightPlusMarginTop(); if (draggableView.isMinimized() && Math.abs(dy) >= MINIMUM_DY_FOR_VERTICAL_DRAG || (!draggableView.isMinimized() && !draggableView.isD...
[ "@", "Override", "public", "int", "clampViewPositionVertical", "(", "View", "child", ",", "int", "top", ",", "int", "dy", ")", "{", "int", "newTop", "=", "draggableView", ".", "getHeight", "(", ")", "-", "draggableView", ".", "getDraggedViewHeightPlusMarginTop",...
Override method used to configure the vertical drag. Restrict the motion of the dragged child view along the vertical axis. @param child child view being dragged. @param top attempted motion along the Y axis. @param dy proposed change in position for top. @return the new clamped position for top.
[ "Override", "method", "used", "to", "configure", "the", "vertical", "drag", ".", "Restrict", "the", "motion", "of", "the", "dragged", "child", "view", "along", "the", "vertical", "axis", "." ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/draggablepanel/src/main/java/com/github/pedrovgs/DraggableViewCallback.java#L127-L140
115,813
pedrovgs/DraggablePanel
draggablepanel/src/main/java/com/github/pedrovgs/DraggableViewCallback.java
DraggableViewCallback.triggerOnReleaseActionsWhileVerticalDrag
private void triggerOnReleaseActionsWhileVerticalDrag(float yVel) { if (yVel < 0 && yVel <= -Y_MIN_VELOCITY) { draggableView.maximize(); } else if (yVel > 0 && yVel >= Y_MIN_VELOCITY) { draggableView.minimize(); } else { if (draggableView.isDragViewAboveTheMiddle()) { draggableView...
java
private void triggerOnReleaseActionsWhileVerticalDrag(float yVel) { if (yVel < 0 && yVel <= -Y_MIN_VELOCITY) { draggableView.maximize(); } else if (yVel > 0 && yVel >= Y_MIN_VELOCITY) { draggableView.minimize(); } else { if (draggableView.isDragViewAboveTheMiddle()) { draggableView...
[ "private", "void", "triggerOnReleaseActionsWhileVerticalDrag", "(", "float", "yVel", ")", "{", "if", "(", "yVel", "<", "0", "&&", "yVel", "<=", "-", "Y_MIN_VELOCITY", ")", "{", "draggableView", ".", "maximize", "(", ")", ";", "}", "else", "if", "(", "yVel"...
Maximize or minimize the DraggableView using the draggableView position and the y axis velocity.
[ "Maximize", "or", "minimize", "the", "DraggableView", "using", "the", "draggableView", "position", "and", "the", "y", "axis", "velocity", "." ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/draggablepanel/src/main/java/com/github/pedrovgs/DraggableViewCallback.java#L146-L158
115,814
pedrovgs/DraggablePanel
draggablepanel/src/main/java/com/github/pedrovgs/DraggableViewCallback.java
DraggableViewCallback.triggerOnReleaseActionsWhileHorizontalDrag
private void triggerOnReleaseActionsWhileHorizontalDrag(float xVel) { if (xVel < 0 && xVel <= -X_MIN_VELOCITY) { draggableView.closeToLeft(); } else if (xVel > 0 && xVel >= X_MIN_VELOCITY) { draggableView.closeToRight(); } else { if (draggableView.isNextToLeftBound()) { draggableVi...
java
private void triggerOnReleaseActionsWhileHorizontalDrag(float xVel) { if (xVel < 0 && xVel <= -X_MIN_VELOCITY) { draggableView.closeToLeft(); } else if (xVel > 0 && xVel >= X_MIN_VELOCITY) { draggableView.closeToRight(); } else { if (draggableView.isNextToLeftBound()) { draggableVi...
[ "private", "void", "triggerOnReleaseActionsWhileHorizontalDrag", "(", "float", "xVel", ")", "{", "if", "(", "xVel", "<", "0", "&&", "xVel", "<=", "-", "X_MIN_VELOCITY", ")", "{", "draggableView", ".", "closeToLeft", "(", ")", ";", "}", "else", "if", "(", "...
Close the view to the right, to the left or minimize it using the draggableView position and the x axis velocity.
[ "Close", "the", "view", "to", "the", "right", "to", "the", "left", "or", "minimize", "it", "using", "the", "draggableView", "position", "and", "the", "x", "axis", "velocity", "." ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/draggablepanel/src/main/java/com/github/pedrovgs/DraggableViewCallback.java#L164-L178
115,815
pedrovgs/DraggablePanel
sample/src/main/java/com/github/pedrovgs/sample/activity/YoutubeSampleActivity.java
YoutubeSampleActivity.initializeYoutubeFragment
private void initializeYoutubeFragment() { youtubeFragment = new YouTubePlayerSupportFragment(); youtubeFragment.initialize(YOUTUBE_API_KEY, new YouTubePlayer.OnInitializedListener() { @Override public void onInitializationSuccess(YouTubePlayer.Provider provider, YouTubePlayer player, boolean w...
java
private void initializeYoutubeFragment() { youtubeFragment = new YouTubePlayerSupportFragment(); youtubeFragment.initialize(YOUTUBE_API_KEY, new YouTubePlayer.OnInitializedListener() { @Override public void onInitializationSuccess(YouTubePlayer.Provider provider, YouTubePlayer player, boolean w...
[ "private", "void", "initializeYoutubeFragment", "(", ")", "{", "youtubeFragment", "=", "new", "YouTubePlayerSupportFragment", "(", ")", ";", "youtubeFragment", ".", "initialize", "(", "YOUTUBE_API_KEY", ",", "new", "YouTubePlayer", ".", "OnInitializedListener", "(", "...
Initialize the YouTubeSupportFrament attached as top fragment to the DraggablePanel widget and reproduce the YouTube video represented with a YouTube url.
[ "Initialize", "the", "YouTubeSupportFrament", "attached", "as", "top", "fragment", "to", "the", "DraggablePanel", "widget", "and", "reproduce", "the", "YouTube", "video", "represented", "with", "a", "YouTube", "url", "." ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/sample/src/main/java/com/github/pedrovgs/sample/activity/YoutubeSampleActivity.java#L80-L97
115,816
pedrovgs/DraggablePanel
sample/src/main/java/com/github/pedrovgs/sample/activity/YoutubeSampleActivity.java
YoutubeSampleActivity.initializeDraggablePanel
private void initializeDraggablePanel() { draggablePanel.setFragmentManager(getSupportFragmentManager()); draggablePanel.setTopFragment(youtubeFragment); MoviePosterFragment moviePosterFragment = new MoviePosterFragment(); moviePosterFragment.setPoster(VIDEO_POSTER_THUMBNAIL); moviePosterFragment.se...
java
private void initializeDraggablePanel() { draggablePanel.setFragmentManager(getSupportFragmentManager()); draggablePanel.setTopFragment(youtubeFragment); MoviePosterFragment moviePosterFragment = new MoviePosterFragment(); moviePosterFragment.setPoster(VIDEO_POSTER_THUMBNAIL); moviePosterFragment.se...
[ "private", "void", "initializeDraggablePanel", "(", ")", "{", "draggablePanel", ".", "setFragmentManager", "(", "getSupportFragmentManager", "(", ")", ")", ";", "draggablePanel", ".", "setTopFragment", "(", "youtubeFragment", ")", ";", "MoviePosterFragment", "moviePoste...
Initialize and configure the DraggablePanel widget with two fragments and some attributes.
[ "Initialize", "and", "configure", "the", "DraggablePanel", "widget", "with", "two", "fragments", "and", "some", "attributes", "." ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/sample/src/main/java/com/github/pedrovgs/sample/activity/YoutubeSampleActivity.java#L102-L114
115,817
pedrovgs/DraggablePanel
sample/src/main/java/com/github/pedrovgs/sample/activity/YoutubeSampleActivity.java
YoutubeSampleActivity.hookDraggablePanelListeners
private void hookDraggablePanelListeners() { draggablePanel.setDraggableListener(new DraggableListener() { @Override public void onMaximized() { playVideo(); } @Override public void onMinimized() { //Empty } @Override public void onClosedToLeft() { pauseVideo(...
java
private void hookDraggablePanelListeners() { draggablePanel.setDraggableListener(new DraggableListener() { @Override public void onMaximized() { playVideo(); } @Override public void onMinimized() { //Empty } @Override public void onClosedToLeft() { pauseVideo(...
[ "private", "void", "hookDraggablePanelListeners", "(", ")", "{", "draggablePanel", ".", "setDraggableListener", "(", "new", "DraggableListener", "(", ")", "{", "@", "Override", "public", "void", "onMaximized", "(", ")", "{", "playVideo", "(", ")", ";", "}", "@...
Hook the DraggableListener to DraggablePanel to pause or resume the video when the DragglabePanel is maximized or closed.
[ "Hook", "the", "DraggableListener", "to", "DraggablePanel", "to", "pause", "or", "resume", "the", "video", "when", "the", "DragglabePanel", "is", "maximized", "or", "closed", "." ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/sample/src/main/java/com/github/pedrovgs/sample/activity/YoutubeSampleActivity.java#L120-L138
115,818
pedrovgs/DraggablePanel
sample/src/main/java/com/github/pedrovgs/sample/activity/VideoSampleActivity.java
VideoSampleActivity.onThubmnailClicked
@OnClick(R.id.iv_thumbnail) void onThubmnailClicked() { Toast.makeText(this, VIDEO_TITLE, Toast.LENGTH_SHORT).show(); }
java
@OnClick(R.id.iv_thumbnail) void onThubmnailClicked() { Toast.makeText(this, VIDEO_TITLE, Toast.LENGTH_SHORT).show(); }
[ "@", "OnClick", "(", "R", ".", "id", ".", "iv_thumbnail", ")", "void", "onThubmnailClicked", "(", ")", "{", "Toast", ".", "makeText", "(", "this", ",", "VIDEO_TITLE", ",", "Toast", ".", "LENGTH_SHORT", ")", ".", "show", "(", ")", ";", "}" ]
Method triggered when the iv_thumbnail widget is clicked. This method shows a toast with the video title.
[ "Method", "triggered", "when", "the", "iv_thumbnail", "widget", "is", "clicked", ".", "This", "method", "shows", "a", "toast", "with", "the", "video", "title", "." ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/sample/src/main/java/com/github/pedrovgs/sample/activity/VideoSampleActivity.java#L70-L72
115,819
pedrovgs/DraggablePanel
sample/src/main/java/com/github/pedrovgs/sample/activity/VideoSampleActivity.java
VideoSampleActivity.hookDraggableViewListener
private void hookDraggableViewListener() { draggableView.setDraggableListener(new DraggableListener() { @Override public void onMaximized() { startVideo(); } //Empty @Override public void onMinimized() { //Empty } @Override public void onClosedToLeft() { ...
java
private void hookDraggableViewListener() { draggableView.setDraggableListener(new DraggableListener() { @Override public void onMaximized() { startVideo(); } //Empty @Override public void onMinimized() { //Empty } @Override public void onClosedToLeft() { ...
[ "private", "void", "hookDraggableViewListener", "(", ")", "{", "draggableView", ".", "setDraggableListener", "(", "new", "DraggableListener", "(", ")", "{", "@", "Override", "public", "void", "onMaximized", "(", ")", "{", "startVideo", "(", ")", ";", "}", "//E...
Hook DraggableListener to draggableView to pause or resume VideoView.
[ "Hook", "DraggableListener", "to", "draggableView", "to", "pause", "or", "resume", "VideoView", "." ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/sample/src/main/java/com/github/pedrovgs/sample/activity/VideoSampleActivity.java#L85-L104
115,820
pedrovgs/DraggablePanel
sample/src/main/java/com/github/pedrovgs/sample/activity/VideoSampleActivity.java
VideoSampleActivity.initializeVideoView
private void initializeVideoView() { Uri path = Uri.parse(APPLICATION_RAW_PATH + R.raw.video); videoView.setVideoURI(path); videoView.start(); }
java
private void initializeVideoView() { Uri path = Uri.parse(APPLICATION_RAW_PATH + R.raw.video); videoView.setVideoURI(path); videoView.start(); }
[ "private", "void", "initializeVideoView", "(", ")", "{", "Uri", "path", "=", "Uri", ".", "parse", "(", "APPLICATION_RAW_PATH", "+", "R", ".", "raw", ".", "video", ")", ";", "videoView", ".", "setVideoURI", "(", "path", ")", ";", "videoView", ".", "start"...
Initialize ViedeoView with a video by default.
[ "Initialize", "ViedeoView", "with", "a", "video", "by", "default", "." ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/sample/src/main/java/com/github/pedrovgs/sample/activity/VideoSampleActivity.java#L127-L131
115,821
pedrovgs/DraggablePanel
sample/src/main/java/com/github/pedrovgs/sample/activity/VideoSampleActivity.java
VideoSampleActivity.initializePoster
private void initializePoster() { Picasso.with(this) .load(VIDEO_POSTER) .placeholder(R.drawable.spiderman_placeholder) .into(posterImageView); Picasso.with(this) .load(VIDEO_THUMBNAIL) .placeholder(R.drawable.spiderman_placeholder) .into(thumbnailImageView); }
java
private void initializePoster() { Picasso.with(this) .load(VIDEO_POSTER) .placeholder(R.drawable.spiderman_placeholder) .into(posterImageView); Picasso.with(this) .load(VIDEO_THUMBNAIL) .placeholder(R.drawable.spiderman_placeholder) .into(thumbnailImageView); }
[ "private", "void", "initializePoster", "(", ")", "{", "Picasso", ".", "with", "(", "this", ")", ".", "load", "(", "VIDEO_POSTER", ")", ".", "placeholder", "(", "R", ".", "drawable", ".", "spiderman_placeholder", ")", ".", "into", "(", "posterImageView", ")...
Initialize some ImageViews with a video poster and a video thumbnail.
[ "Initialize", "some", "ImageViews", "with", "a", "video", "poster", "and", "a", "video", "thumbnail", "." ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/sample/src/main/java/com/github/pedrovgs/sample/activity/VideoSampleActivity.java#L136-L145
115,822
pedrovgs/DraggablePanel
sample/src/main/java/com/github/pedrovgs/sample/activity/TvShowsActivity.java
TvShowsActivity.onFanArtClicked
@OnClick(R.id.iv_fan_art) void onFanArtClicked() { Toast.makeText(this, tvShowSelected.getTitle(), Toast.LENGTH_LONG).show(); }
java
@OnClick(R.id.iv_fan_art) void onFanArtClicked() { Toast.makeText(this, tvShowSelected.getTitle(), Toast.LENGTH_LONG).show(); }
[ "@", "OnClick", "(", "R", ".", "id", ".", "iv_fan_art", ")", "void", "onFanArtClicked", "(", ")", "{", "Toast", ".", "makeText", "(", "this", ",", "tvShowSelected", ".", "getTitle", "(", ")", ",", "Toast", ".", "LENGTH_LONG", ")", ".", "show", "(", "...
Method triggered when the iv_fan_art widget is clicked. This method shows a toast with the tv show selected.
[ "Method", "triggered", "when", "the", "iv_fan_art", "widget", "is", "clicked", ".", "This", "method", "shows", "a", "toast", "with", "the", "tv", "show", "selected", "." ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/sample/src/main/java/com/github/pedrovgs/sample/activity/TvShowsActivity.java#L82-L84
115,823
pedrovgs/DraggablePanel
sample/src/main/java/com/github/pedrovgs/sample/activity/TvShowsActivity.java
TvShowsActivity.initializeDraggableView
private void initializeDraggableView() { Handler handler = new Handler(); handler.postDelayed(new Runnable() { @Override public void run() { draggableView.setVisibility(View.GONE); draggableView.closeToRight(); } }, DELAY_MILLIS); }
java
private void initializeDraggableView() { Handler handler = new Handler(); handler.postDelayed(new Runnable() { @Override public void run() { draggableView.setVisibility(View.GONE); draggableView.closeToRight(); } }, DELAY_MILLIS); }
[ "private", "void", "initializeDraggableView", "(", ")", "{", "Handler", "handler", "=", "new", "Handler", "(", ")", ";", "handler", ".", "postDelayed", "(", "new", "Runnable", "(", ")", "{", "@", "Override", "public", "void", "run", "(", ")", "{", "dragg...
Initialize DraggableView.
[ "Initialize", "DraggableView", "." ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/sample/src/main/java/com/github/pedrovgs/sample/activity/TvShowsActivity.java#L89-L97
115,824
pedrovgs/DraggablePanel
sample/src/main/java/com/github/pedrovgs/sample/activity/TvShowsActivity.java
TvShowsActivity.initializeGridView
private void initializeGridView() { tvShowsGridView.setAdapter(adapter); tvShowsGridView.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) { TvShowViewModel tvShow = adapter.getIt...
java
private void initializeGridView() { tvShowsGridView.setAdapter(adapter); tvShowsGridView.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) { TvShowViewModel tvShow = adapter.getIt...
[ "private", "void", "initializeGridView", "(", ")", "{", "tvShowsGridView", ".", "setAdapter", "(", "adapter", ")", ";", "tvShowsGridView", ".", "setOnItemClickListener", "(", "new", "AdapterView", ".", "OnItemClickListener", "(", ")", "{", "@", "Override", "public...
Initialize GridView with some injected data and configure OnItemClickListener.
[ "Initialize", "GridView", "with", "some", "injected", "data", "and", "configure", "OnItemClickListener", "." ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/sample/src/main/java/com/github/pedrovgs/sample/activity/TvShowsActivity.java#L102-L119
115,825
pedrovgs/DraggablePanel
sample/src/main/java/com/github/pedrovgs/sample/activity/TvShowsActivity.java
TvShowsActivity.hookListeners
private void hookListeners() { draggableView.setDraggableListener(new DraggableListener() { @Override public void onMaximized() { updateActionBarTitle(); } @Override public void onMinimized() { updateActionBarTitle(); } @Override public void onClosedToLeft() { ...
java
private void hookListeners() { draggableView.setDraggableListener(new DraggableListener() { @Override public void onMaximized() { updateActionBarTitle(); } @Override public void onMinimized() { updateActionBarTitle(); } @Override public void onClosedToLeft() { ...
[ "private", "void", "hookListeners", "(", ")", "{", "draggableView", ".", "setDraggableListener", "(", "new", "DraggableListener", "(", ")", "{", "@", "Override", "public", "void", "onMaximized", "(", ")", "{", "updateActionBarTitle", "(", ")", ";", "}", "@", ...
Hook DraggableListener to draggableView to modify action bar title with the tv show information.
[ "Hook", "DraggableListener", "to", "draggableView", "to", "modify", "action", "bar", "title", "with", "the", "tv", "show", "information", "." ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/sample/src/main/java/com/github/pedrovgs/sample/activity/TvShowsActivity.java#L125-L143
115,826
pedrovgs/DraggablePanel
sample/src/main/java/com/github/pedrovgs/sample/activity/TvShowsActivity.java
TvShowsActivity.renderEpisodes
private void renderEpisodes(final TvShowViewModel tvShow) { List<Renderer<EpisodeViewModel>> episodeRenderers = new LinkedList<Renderer<EpisodeViewModel>>(); episodeRenderers.add(new EpisodeRenderer()); EpisodeRendererBuilder episodeRendererBuilder = new EpisodeRendererBuilder(episodeRenderers); ...
java
private void renderEpisodes(final TvShowViewModel tvShow) { List<Renderer<EpisodeViewModel>> episodeRenderers = new LinkedList<Renderer<EpisodeViewModel>>(); episodeRenderers.add(new EpisodeRenderer()); EpisodeRendererBuilder episodeRendererBuilder = new EpisodeRendererBuilder(episodeRenderers); ...
[ "private", "void", "renderEpisodes", "(", "final", "TvShowViewModel", "tvShow", ")", "{", "List", "<", "Renderer", "<", "EpisodeViewModel", ">>", "episodeRenderers", "=", "new", "LinkedList", "<", "Renderer", "<", "EpisodeViewModel", ">", ">", "(", ")", ";", "...
Render a list of episodes using a tv show view model with the information. This method create an adapter with the episodes information to be inserted in the ListView. @param tvShow to render
[ "Render", "a", "list", "of", "episodes", "using", "a", "tv", "show", "view", "model", "with", "the", "information", ".", "This", "method", "create", "an", "adapter", "with", "the", "episodes", "information", "to", "be", "inserted", "in", "the", "ListView", ...
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/sample/src/main/java/com/github/pedrovgs/sample/activity/TvShowsActivity.java#L168-L177
115,827
pedrovgs/DraggablePanel
sample/src/main/java/com/github/pedrovgs/sample/activity/TvShowsActivity.java
TvShowsActivity.renderEpisodesHeader
private void renderEpisodesHeader(TvShowViewModel tvShow) { episodesListView.removeHeaderView(header); header = (TextView) getLayoutInflater().inflate(R.layout.episode_header, null); header.setText(tvShow.getTitle().toUpperCase() + " - SEASON 1"); episodesListView.setAdapter(null); episodesListView....
java
private void renderEpisodesHeader(TvShowViewModel tvShow) { episodesListView.removeHeaderView(header); header = (TextView) getLayoutInflater().inflate(R.layout.episode_header, null); header.setText(tvShow.getTitle().toUpperCase() + " - SEASON 1"); episodesListView.setAdapter(null); episodesListView....
[ "private", "void", "renderEpisodesHeader", "(", "TvShowViewModel", "tvShow", ")", "{", "episodesListView", ".", "removeHeaderView", "(", "header", ")", ";", "header", "=", "(", "TextView", ")", "getLayoutInflater", "(", ")", ".", "inflate", "(", "R", ".", "lay...
Configure a view as episodes ListView header with the name of the tv show and the season.
[ "Configure", "a", "view", "as", "episodes", "ListView", "header", "with", "the", "name", "of", "the", "tv", "show", "and", "the", "season", "." ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/sample/src/main/java/com/github/pedrovgs/sample/activity/TvShowsActivity.java#L182-L201
115,828
pedrovgs/DraggablePanel
sample/src/main/java/com/github/pedrovgs/sample/renderer/PlaceRenderer.java
PlaceRenderer.render
@Override protected void render() { PlaceViewModel place = getContent(); nameTextView.setText(place.getName()); Picasso.with(context) .load(place.getPhoto()) .placeholder(R.drawable.maps_placeholder) .into(photoImageView); }
java
@Override protected void render() { PlaceViewModel place = getContent(); nameTextView.setText(place.getName()); Picasso.with(context) .load(place.getPhoto()) .placeholder(R.drawable.maps_placeholder) .into(photoImageView); }
[ "@", "Override", "protected", "void", "render", "(", ")", "{", "PlaceViewModel", "place", "=", "getContent", "(", ")", ";", "nameTextView", ".", "setText", "(", "place", ".", "getName", "(", ")", ")", ";", "Picasso", ".", "with", "(", "context", ")", "...
Render the PlaceViewModel information.
[ "Render", "the", "PlaceViewModel", "information", "." ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/sample/src/main/java/com/github/pedrovgs/sample/renderer/PlaceRenderer.java#L69-L76
115,829
pedrovgs/DraggablePanel
draggablepanel/src/main/java/com/github/pedrovgs/DraggableView.java
DraggableView.closeToRight
public void closeToRight() { if (viewDragHelper.smoothSlideViewTo(dragView, transformer.getOriginalWidth(), getHeight() - transformer.getMinHeightPlusMargin())) { ViewCompat.postInvalidateOnAnimation(this); notifyCloseToRightListener(); } }
java
public void closeToRight() { if (viewDragHelper.smoothSlideViewTo(dragView, transformer.getOriginalWidth(), getHeight() - transformer.getMinHeightPlusMargin())) { ViewCompat.postInvalidateOnAnimation(this); notifyCloseToRightListener(); } }
[ "public", "void", "closeToRight", "(", ")", "{", "if", "(", "viewDragHelper", ".", "smoothSlideViewTo", "(", "dragView", ",", "transformer", ".", "getOriginalWidth", "(", ")", ",", "getHeight", "(", ")", "-", "transformer", ".", "getMinHeightPlusMargin", "(", ...
Close the custom view applying an animation to close the view to the right side of the screen.
[ "Close", "the", "custom", "view", "applying", "an", "animation", "to", "close", "the", "view", "to", "the", "right", "side", "of", "the", "screen", "." ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/draggablepanel/src/main/java/com/github/pedrovgs/DraggableView.java#L261-L267
115,830
pedrovgs/DraggablePanel
draggablepanel/src/main/java/com/github/pedrovgs/DraggableView.java
DraggableView.closeToLeft
public void closeToLeft() { if (viewDragHelper.smoothSlideViewTo(dragView, -transformer.getOriginalWidth(), getHeight() - transformer.getMinHeightPlusMargin())) { ViewCompat.postInvalidateOnAnimation(this); notifyCloseToLeftListener(); } }
java
public void closeToLeft() { if (viewDragHelper.smoothSlideViewTo(dragView, -transformer.getOriginalWidth(), getHeight() - transformer.getMinHeightPlusMargin())) { ViewCompat.postInvalidateOnAnimation(this); notifyCloseToLeftListener(); } }
[ "public", "void", "closeToLeft", "(", ")", "{", "if", "(", "viewDragHelper", ".", "smoothSlideViewTo", "(", "dragView", ",", "-", "transformer", ".", "getOriginalWidth", "(", ")", ",", "getHeight", "(", ")", "-", "transformer", ".", "getMinHeightPlusMargin", "...
Close the custom view applying an animation to close the view to the left side of the screen.
[ "Close", "the", "custom", "view", "applying", "an", "animation", "to", "close", "the", "view", "to", "the", "left", "side", "of", "the", "screen", "." ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/draggablepanel/src/main/java/com/github/pedrovgs/DraggableView.java#L272-L278
115,831
pedrovgs/DraggablePanel
draggablepanel/src/main/java/com/github/pedrovgs/DraggableView.java
DraggableView.onInterceptTouchEvent
@Override public boolean onInterceptTouchEvent(MotionEvent ev) { if (!isEnabled()) { return false; } switch (MotionEventCompat.getActionMasked(ev) & MotionEventCompat.ACTION_MASK) { case MotionEvent.ACTION_CANCEL: case MotionEvent.ACTION_UP: viewDragHelper.cancel(); return ...
java
@Override public boolean onInterceptTouchEvent(MotionEvent ev) { if (!isEnabled()) { return false; } switch (MotionEventCompat.getActionMasked(ev) & MotionEventCompat.ACTION_MASK) { case MotionEvent.ACTION_CANCEL: case MotionEvent.ACTION_UP: viewDragHelper.cancel(); return ...
[ "@", "Override", "public", "boolean", "onInterceptTouchEvent", "(", "MotionEvent", "ev", ")", "{", "if", "(", "!", "isEnabled", "(", ")", ")", "{", "return", "false", ";", "}", "switch", "(", "MotionEventCompat", ".", "getActionMasked", "(", "ev", ")", "&"...
Override method to intercept only touch events over the drag view and to cancel the drag when the action associated to the MotionEvent is equals to ACTION_CANCEL or ACTION_UP. @param ev captured. @return true if the view is going to process the touch event or false if not.
[ "Override", "method", "to", "intercept", "only", "touch", "events", "over", "the", "drag", "view", "and", "to", "cancel", "the", "drag", "when", "the", "action", "associated", "to", "the", "MotionEvent", "is", "equals", "to", "ACTION_CANCEL", "or", "ACTION_UP"...
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/draggablepanel/src/main/java/com/github/pedrovgs/DraggableView.java#L332-L353
115,832
pedrovgs/DraggablePanel
draggablepanel/src/main/java/com/github/pedrovgs/DraggableView.java
DraggableView.onTouchEvent
@Override public boolean onTouchEvent(MotionEvent ev) { int actionMasked = MotionEventCompat.getActionMasked(ev); if ((actionMasked & MotionEventCompat.ACTION_MASK) == MotionEvent.ACTION_DOWN) { activePointerId = MotionEventCompat.getPointerId(ev, actionMasked); } if (activePointerId == INVALID_PO...
java
@Override public boolean onTouchEvent(MotionEvent ev) { int actionMasked = MotionEventCompat.getActionMasked(ev); if ((actionMasked & MotionEventCompat.ACTION_MASK) == MotionEvent.ACTION_DOWN) { activePointerId = MotionEventCompat.getPointerId(ev, actionMasked); } if (activePointerId == INVALID_PO...
[ "@", "Override", "public", "boolean", "onTouchEvent", "(", "MotionEvent", "ev", ")", "{", "int", "actionMasked", "=", "MotionEventCompat", ".", "getActionMasked", "(", "ev", ")", ";", "if", "(", "(", "actionMasked", "&", "MotionEventCompat", ".", "ACTION_MASK", ...
Override method to dispatch touch event to the dragged view. @param ev captured. @return true if the touch event is realized over the drag or second view.
[ "Override", "method", "to", "dispatch", "touch", "event", "to", "the", "dragged", "view", "." ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/draggablepanel/src/main/java/com/github/pedrovgs/DraggableView.java#L361-L382
115,833
pedrovgs/DraggablePanel
draggablepanel/src/main/java/com/github/pedrovgs/DraggableView.java
DraggableView.onLayout
@Override protected void onLayout(boolean changed, int left, int top, int right, int bottom) { if (isInEditMode()) super.onLayout(changed, left, top, right, bottom); else if (isDragViewAtTop()) { dragView.layout(left, top, right, transformer.getOriginalHeight()); secondView.layout(left, transf...
java
@Override protected void onLayout(boolean changed, int left, int top, int right, int bottom) { if (isInEditMode()) super.onLayout(changed, left, top, right, bottom); else if (isDragViewAtTop()) { dragView.layout(left, top, right, transformer.getOriginalHeight()); secondView.layout(left, transf...
[ "@", "Override", "protected", "void", "onLayout", "(", "boolean", "changed", ",", "int", "left", ",", "int", "top", ",", "int", "right", ",", "int", "bottom", ")", "{", "if", "(", "isInEditMode", "(", ")", ")", "super", ".", "onLayout", "(", "changed",...
Override method to configure the dragged view and secondView layout properly.
[ "Override", "method", "to", "configure", "the", "dragged", "view", "and", "secondView", "layout", "properly", "." ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/draggablepanel/src/main/java/com/github/pedrovgs/DraggableView.java#L428-L439
115,834
pedrovgs/DraggablePanel
draggablepanel/src/main/java/com/github/pedrovgs/DraggableView.java
DraggableView.changeBackgroundAlpha
void changeBackgroundAlpha() { Drawable background = getBackground(); if (background != null) { int newAlpha = (int) (ONE_HUNDRED * (1 - getVerticalDragOffset())); background.setAlpha(newAlpha); } }
java
void changeBackgroundAlpha() { Drawable background = getBackground(); if (background != null) { int newAlpha = (int) (ONE_HUNDRED * (1 - getVerticalDragOffset())); background.setAlpha(newAlpha); } }
[ "void", "changeBackgroundAlpha", "(", ")", "{", "Drawable", "background", "=", "getBackground", "(", ")", ";", "if", "(", "background", "!=", "null", ")", "{", "int", "newAlpha", "=", "(", "int", ")", "(", "ONE_HUNDRED", "*", "(", "1", "-", "getVerticalD...
Modify the background alpha if has been configured to applying an alpha effect when the view is dragged.
[ "Modify", "the", "background", "alpha", "if", "has", "been", "configured", "to", "applying", "an", "alpha", "effect", "when", "the", "view", "is", "dragged", "." ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/draggablepanel/src/main/java/com/github/pedrovgs/DraggableView.java#L511-L517
115,835
pedrovgs/DraggablePanel
draggablepanel/src/main/java/com/github/pedrovgs/DraggableView.java
DraggableView.changeDragViewViewAlpha
void changeDragViewViewAlpha() { if (enableHorizontalAlphaEffect) { float alpha = 1 - getHorizontalDragOffset(); if (alpha == 0) { alpha = 1; } ViewHelper.setAlpha(dragView, alpha); } }
java
void changeDragViewViewAlpha() { if (enableHorizontalAlphaEffect) { float alpha = 1 - getHorizontalDragOffset(); if (alpha == 0) { alpha = 1; } ViewHelper.setAlpha(dragView, alpha); } }
[ "void", "changeDragViewViewAlpha", "(", ")", "{", "if", "(", "enableHorizontalAlphaEffect", ")", "{", "float", "alpha", "=", "1", "-", "getHorizontalDragOffset", "(", ")", ";", "if", "(", "alpha", "==", "0", ")", "{", "alpha", "=", "1", ";", "}", "ViewHe...
Modify dragged view alpha based on the horizontal position while the view is being horizontally dragged.
[ "Modify", "dragged", "view", "alpha", "based", "on", "the", "horizontal", "position", "while", "the", "view", "is", "being", "horizontally", "dragged", "." ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/draggablepanel/src/main/java/com/github/pedrovgs/DraggableView.java#L530-L538
115,836
pedrovgs/DraggablePanel
draggablepanel/src/main/java/com/github/pedrovgs/DraggableView.java
DraggableView.isViewHit
private boolean isViewHit(View view, int x, int y) { int[] viewLocation = new int[2]; view.getLocationOnScreen(viewLocation); int[] parentLocation = new int[2]; this.getLocationOnScreen(parentLocation); int screenX = parentLocation[0] + x; int screenY = parentLocation[1] + y; return screenX ...
java
private boolean isViewHit(View view, int x, int y) { int[] viewLocation = new int[2]; view.getLocationOnScreen(viewLocation); int[] parentLocation = new int[2]; this.getLocationOnScreen(parentLocation); int screenX = parentLocation[0] + x; int screenY = parentLocation[1] + y; return screenX ...
[ "private", "boolean", "isViewHit", "(", "View", "view", ",", "int", "x", ",", "int", "y", ")", "{", "int", "[", "]", "viewLocation", "=", "new", "int", "[", "2", "]", ";", "view", ".", "getLocationOnScreen", "(", "viewLocation", ")", ";", "int", "[",...
Calculate if one position is above any view. @param view to analyze. @param x position. @param y position. @return true if x and y positions are below the view.
[ "Calculate", "if", "one", "position", "is", "above", "any", "view", "." ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/draggablepanel/src/main/java/com/github/pedrovgs/DraggableView.java#L611-L622
115,837
pedrovgs/DraggablePanel
draggablepanel/src/main/java/com/github/pedrovgs/DraggableView.java
DraggableView.addFragmentToView
private void addFragmentToView(final int viewId, final Fragment fragment) { fragmentManager.beginTransaction().replace(viewId, fragment).commit(); }
java
private void addFragmentToView(final int viewId, final Fragment fragment) { fragmentManager.beginTransaction().replace(viewId, fragment).commit(); }
[ "private", "void", "addFragmentToView", "(", "final", "int", "viewId", ",", "final", "Fragment", "fragment", ")", "{", "fragmentManager", ".", "beginTransaction", "(", ")", ".", "replace", "(", "viewId", ",", "fragment", ")", ".", "commit", "(", ")", ";", ...
Use FragmentManager to attach one fragment to one view using the viewId. @param viewId used to obtain the view. @param fragment to be attached.
[ "Use", "FragmentManager", "to", "attach", "one", "fragment", "to", "one", "view", "using", "the", "viewId", "." ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/draggablepanel/src/main/java/com/github/pedrovgs/DraggableView.java#L630-L632
115,838
pedrovgs/DraggablePanel
draggablepanel/src/main/java/com/github/pedrovgs/DraggableView.java
DraggableView.initializeAttributes
private void initializeAttributes(AttributeSet attrs) { TypedArray attributes = getContext().obtainStyledAttributes(attrs, R.styleable.draggable_view); this.enableHorizontalAlphaEffect = attributes.getBoolean(R.styleable.draggable_view_enable_minimized_horizontal_alpha_effect, DEFAULT_ENABLE...
java
private void initializeAttributes(AttributeSet attrs) { TypedArray attributes = getContext().obtainStyledAttributes(attrs, R.styleable.draggable_view); this.enableHorizontalAlphaEffect = attributes.getBoolean(R.styleable.draggable_view_enable_minimized_horizontal_alpha_effect, DEFAULT_ENABLE...
[ "private", "void", "initializeAttributes", "(", "AttributeSet", "attrs", ")", "{", "TypedArray", "attributes", "=", "getContext", "(", ")", ".", "obtainStyledAttributes", "(", "attrs", ",", "R", ".", "styleable", ".", "draggable_view", ")", ";", "this", ".", "...
Initialize XML attributes. @param attrs to be analyzed.
[ "Initialize", "XML", "attributes", "." ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/draggablepanel/src/main/java/com/github/pedrovgs/DraggableView.java#L659-L687
115,839
pedrovgs/DraggablePanel
draggablepanel/src/main/java/com/github/pedrovgs/DraggableView.java
DraggableView.smoothSlideTo
private boolean smoothSlideTo(float slideOffset) { final int topBound = getPaddingTop(); int x = (int) (slideOffset * (getWidth() - transformer.getMinWidthPlusMarginRight())); int y = (int) (topBound + slideOffset * getVerticalDragRange()); if (viewDragHelper.smoothSlideViewTo(dragView, x, y)) { V...
java
private boolean smoothSlideTo(float slideOffset) { final int topBound = getPaddingTop(); int x = (int) (slideOffset * (getWidth() - transformer.getMinWidthPlusMarginRight())); int y = (int) (topBound + slideOffset * getVerticalDragRange()); if (viewDragHelper.smoothSlideViewTo(dragView, x, y)) { V...
[ "private", "boolean", "smoothSlideTo", "(", "float", "slideOffset", ")", "{", "final", "int", "topBound", "=", "getPaddingTop", "(", ")", ";", "int", "x", "=", "(", "int", ")", "(", "slideOffset", "*", "(", "getWidth", "(", ")", "-", "transformer", ".", ...
Realize an smooth slide to an slide offset passed as argument. This method is the base of maximize, minimize and close methods. @param slideOffset to apply @return true if the view is slided.
[ "Realize", "an", "smooth", "slide", "to", "an", "slide", "offset", "passed", "as", "argument", ".", "This", "method", "is", "the", "base", "of", "maximize", "minimize", "and", "close", "methods", "." ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/draggablepanel/src/main/java/com/github/pedrovgs/DraggableView.java#L696-L705
115,840
pedrovgs/DraggablePanel
sample/src/main/java/com/github/pedrovgs/sample/renderer/TvShowRenderer.java
TvShowRenderer.render
@Override protected void render() { TvShowViewModel tvShow = getContent(); Picasso.with(context) .load(tvShow.getPoster()) .placeholder(R.drawable.tv_show_placeholder) .into(thumbnailImageView); titleTextView.setText(tvShow.getTitle().toUpperCase()); seasonsCounterTextView.setT...
java
@Override protected void render() { TvShowViewModel tvShow = getContent(); Picasso.with(context) .load(tvShow.getPoster()) .placeholder(R.drawable.tv_show_placeholder) .into(thumbnailImageView); titleTextView.setText(tvShow.getTitle().toUpperCase()); seasonsCounterTextView.setT...
[ "@", "Override", "protected", "void", "render", "(", ")", "{", "TvShowViewModel", "tvShow", "=", "getContent", "(", ")", ";", "Picasso", ".", "with", "(", "context", ")", ".", "load", "(", "tvShow", ".", "getPoster", "(", ")", ")", ".", "placeholder", ...
Render the TvShowViewModel information.
[ "Render", "the", "TvShowViewModel", "information", "." ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/sample/src/main/java/com/github/pedrovgs/sample/renderer/TvShowRenderer.java#L70-L80
115,841
pedrovgs/DraggablePanel
draggablepanel/src/main/java/com/github/pedrovgs/transformer/ResizeTransformer.java
ResizeTransformer.updateScale
@Override public void updateScale(float verticalDragOffset) { layoutParams.width = (int) (getOriginalWidth() * (1 - verticalDragOffset / getXScaleFactor())); layoutParams.height = (int) (getOriginalHeight() * (1 - verticalDragOffset / getYScaleFactor())); getView().setLayoutParams(layoutParams); }
java
@Override public void updateScale(float verticalDragOffset) { layoutParams.width = (int) (getOriginalWidth() * (1 - verticalDragOffset / getXScaleFactor())); layoutParams.height = (int) (getOriginalHeight() * (1 - verticalDragOffset / getYScaleFactor())); getView().setLayoutParams(layoutParams); }
[ "@", "Override", "public", "void", "updateScale", "(", "float", "verticalDragOffset", ")", "{", "layoutParams", ".", "width", "=", "(", "int", ")", "(", "getOriginalWidth", "(", ")", "*", "(", "1", "-", "verticalDragOffset", "/", "getXScaleFactor", "(", ")",...
Changes view scale using view's LayoutParam. @param verticalDragOffset used to calculate the new size.
[ "Changes", "view", "scale", "using", "view", "s", "LayoutParam", "." ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/draggablepanel/src/main/java/com/github/pedrovgs/transformer/ResizeTransformer.java#L41-L46
115,842
pedrovgs/DraggablePanel
draggablepanel/src/main/java/com/github/pedrovgs/DraggablePanel.java
DraggablePanel.initializeAttrs
private void initializeAttrs(AttributeSet attrs) { TypedArray attributes = getContext().obtainStyledAttributes(attrs, R.styleable.draggable_panel); this.topFragmentHeight = attributes.getDimensionPixelSize(R.styleable.draggable_panel_top_fragment_height, DEFAULT_TOP_FRAGMENT_HEIGHT); thi...
java
private void initializeAttrs(AttributeSet attrs) { TypedArray attributes = getContext().obtainStyledAttributes(attrs, R.styleable.draggable_panel); this.topFragmentHeight = attributes.getDimensionPixelSize(R.styleable.draggable_panel_top_fragment_height, DEFAULT_TOP_FRAGMENT_HEIGHT); thi...
[ "private", "void", "initializeAttrs", "(", "AttributeSet", "attrs", ")", "{", "TypedArray", "attributes", "=", "getContext", "(", ")", ".", "obtainStyledAttributes", "(", "attrs", ",", "R", ".", "styleable", ".", "draggable_panel", ")", ";", "this", ".", "topF...
Initialize the xml configuration based on styleable attributes @param attrs to analyze.
[ "Initialize", "the", "xml", "configuration", "based", "on", "styleable", "attributes" ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/draggablepanel/src/main/java/com/github/pedrovgs/DraggablePanel.java#L321-L349
115,843
pedrovgs/DraggablePanel
sample/src/main/java/com/github/pedrovgs/sample/fragment/PlaceFragment.java
PlaceFragment.showPlace
public void showPlace(PlaceViewModel placeViewModel) { this.placeViewModel = placeViewModel; nameTextView.setText(placeViewModel.getName()); Picasso.with(getActivity()) .load(placeViewModel.getPhoto()) .placeholder(R.drawable.maps_placeholder) .into(photoImageView); }
java
public void showPlace(PlaceViewModel placeViewModel) { this.placeViewModel = placeViewModel; nameTextView.setText(placeViewModel.getName()); Picasso.with(getActivity()) .load(placeViewModel.getPhoto()) .placeholder(R.drawable.maps_placeholder) .into(photoImageView); }
[ "public", "void", "showPlace", "(", "PlaceViewModel", "placeViewModel", ")", "{", "this", ".", "placeViewModel", "=", "placeViewModel", ";", "nameTextView", ".", "setText", "(", "placeViewModel", ".", "getName", "(", ")", ")", ";", "Picasso", ".", "with", "(",...
Use the PlaceViewModel information to render the place name and the place image inside the fragment
[ "Use", "the", "PlaceViewModel", "information", "to", "render", "the", "place", "name", "and", "the", "place", "image", "inside", "the", "fragment" ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/sample/src/main/java/com/github/pedrovgs/sample/fragment/PlaceFragment.java#L59-L66
115,844
pedrovgs/DraggablePanel
sample/src/main/java/com/github/pedrovgs/sample/fragment/PlaceFragment.java
PlaceFragment.onPhotoClicked
@OnClick(R.id.iv_photo) void onPhotoClicked() { Toast.makeText(getActivity(), placeViewModel.getName(), Toast.LENGTH_LONG).show(); }
java
@OnClick(R.id.iv_photo) void onPhotoClicked() { Toast.makeText(getActivity(), placeViewModel.getName(), Toast.LENGTH_LONG).show(); }
[ "@", "OnClick", "(", "R", ".", "id", ".", "iv_photo", ")", "void", "onPhotoClicked", "(", ")", "{", "Toast", ".", "makeText", "(", "getActivity", "(", ")", ",", "placeViewModel", ".", "getName", "(", ")", ",", "Toast", ".", "LENGTH_LONG", ")", ".", "...
Method triggered when the iv_photo widget is clicked. This method shows a toast with the place information.
[ "Method", "triggered", "when", "the", "iv_photo", "widget", "is", "clicked", ".", "This", "method", "shows", "a", "toast", "with", "the", "place", "information", "." ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/sample/src/main/java/com/github/pedrovgs/sample/fragment/PlaceFragment.java#L72-L74
115,845
pedrovgs/DraggablePanel
sample/src/main/java/com/github/pedrovgs/sample/fragment/MoviePosterFragment.java
MoviePosterFragment.onThubmnailClicked
@OnClick(R.id.iv_thumbnail) void onThubmnailClicked() { Toast.makeText(getActivity(), posterTitle, Toast.LENGTH_SHORT).show(); }
java
@OnClick(R.id.iv_thumbnail) void onThubmnailClicked() { Toast.makeText(getActivity(), posterTitle, Toast.LENGTH_SHORT).show(); }
[ "@", "OnClick", "(", "R", ".", "id", ".", "iv_thumbnail", ")", "void", "onThubmnailClicked", "(", ")", "{", "Toast", ".", "makeText", "(", "getActivity", "(", ")", ",", "posterTitle", ",", "Toast", ".", "LENGTH_SHORT", ")", ".", "show", "(", ")", ";", ...
Method triggered when the iv_thumbnail widget is clicked. This method shows a toast with the poster information.
[ "Method", "triggered", "when", "the", "iv_thumbnail", "widget", "is", "clicked", ".", "This", "method", "shows", "a", "toast", "with", "the", "poster", "information", "." ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/sample/src/main/java/com/github/pedrovgs/sample/fragment/MoviePosterFragment.java#L75-L77
115,846
pedrovgs/DraggablePanel
sample/src/main/java/com/github/pedrovgs/sample/renderer/EpisodeRendererAdapter.java
EpisodeRendererAdapter.updateRendererExtraValues
@Override protected void updateRendererExtraValues(EpisodeViewModel content, Renderer<EpisodeViewModel> renderer, int position) { super.updateRendererExtraValues(content, renderer, position); EpisodeRenderer episodeRenderer = (EpisodeRenderer) renderer; episodeRenderer.setPosition(position); }
java
@Override protected void updateRendererExtraValues(EpisodeViewModel content, Renderer<EpisodeViewModel> renderer, int position) { super.updateRendererExtraValues(content, renderer, position); EpisodeRenderer episodeRenderer = (EpisodeRenderer) renderer; episodeRenderer.setPosition(position); }
[ "@", "Override", "protected", "void", "updateRendererExtraValues", "(", "EpisodeViewModel", "content", ",", "Renderer", "<", "EpisodeViewModel", ">", "renderer", ",", "int", "position", ")", "{", "super", ".", "updateRendererExtraValues", "(", "content", ",", "rende...
Override method used to update the EpisodeRenderer position.
[ "Override", "method", "used", "to", "update", "the", "EpisodeRenderer", "position", "." ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/sample/src/main/java/com/github/pedrovgs/sample/renderer/EpisodeRendererAdapter.java#L42-L47
115,847
pedrovgs/DraggablePanel
sample/src/main/java/com/github/pedrovgs/sample/renderer/EpisodeRenderer.java
EpisodeRenderer.inflate
@Override protected View inflate(LayoutInflater layoutInflater, ViewGroup viewGroup) { return layoutInflater.inflate(R.layout.episode_row, viewGroup, false); }
java
@Override protected View inflate(LayoutInflater layoutInflater, ViewGroup viewGroup) { return layoutInflater.inflate(R.layout.episode_row, viewGroup, false); }
[ "@", "Override", "protected", "View", "inflate", "(", "LayoutInflater", "layoutInflater", ",", "ViewGroup", "viewGroup", ")", "{", "return", "layoutInflater", ".", "inflate", "(", "R", ".", "layout", ".", "episode_row", ",", "viewGroup", ",", "false", ")", ";"...
Inflate the layout associated to this renderer
[ "Inflate", "the", "layout", "associated", "to", "this", "renderer" ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/sample/src/main/java/com/github/pedrovgs/sample/renderer/EpisodeRenderer.java#L63-L65
115,848
pedrovgs/DraggablePanel
sample/src/main/java/com/github/pedrovgs/sample/renderer/EpisodeRenderer.java
EpisodeRenderer.render
@Override protected void render() { EpisodeViewModel episode = getContent(); episodeNumberTextView.setText(String.format("%02d", position + 1)); episodeTitleTextView.setText(episode.getTitle()); episodeDateTextView.setText(episode.getPublishDate()); }
java
@Override protected void render() { EpisodeViewModel episode = getContent(); episodeNumberTextView.setText(String.format("%02d", position + 1)); episodeTitleTextView.setText(episode.getTitle()); episodeDateTextView.setText(episode.getPublishDate()); }
[ "@", "Override", "protected", "void", "render", "(", ")", "{", "EpisodeViewModel", "episode", "=", "getContent", "(", ")", ";", "episodeNumberTextView", ".", "setText", "(", "String", ".", "format", "(", "\"%02d\"", ",", "position", "+", "1", ")", ")", ";"...
Render the EpisodeViewModel information.
[ "Render", "the", "EpisodeViewModel", "information", "." ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/sample/src/main/java/com/github/pedrovgs/sample/renderer/EpisodeRenderer.java#L70-L75
115,849
pedrovgs/DraggablePanel
sample/src/main/java/com/github/pedrovgs/sample/activity/PlacesSampleActivity.java
PlacesSampleActivity.onSaveInstanceState
@Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); saveDraggableState(outState); saveLastPlaceLoadedPosition(outState); }
java
@Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); saveDraggableState(outState); saveLastPlaceLoadedPosition(outState); }
[ "@", "Override", "protected", "void", "onSaveInstanceState", "(", "Bundle", "outState", ")", "{", "super", ".", "onSaveInstanceState", "(", "outState", ")", ";", "saveDraggableState", "(", "outState", ")", ";", "saveLastPlaceLoadedPosition", "(", "outState", ")", ...
Save the DraggablePanel state to restore it once the activity lifecycle be rebooted. @param outState bundle to put the DraggableState information.
[ "Save", "the", "DraggablePanel", "state", "to", "restore", "it", "once", "the", "activity", "lifecycle", "be", "rebooted", "." ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/sample/src/main/java/com/github/pedrovgs/sample/activity/PlacesSampleActivity.java#L104-L108
115,850
pedrovgs/DraggablePanel
sample/src/main/java/com/github/pedrovgs/sample/activity/PlacesSampleActivity.java
PlacesSampleActivity.onRestoreInstanceState
@Override protected void onRestoreInstanceState(Bundle savedInstanceState) { super.onRestoreInstanceState(savedInstanceState); recoverDraggablePanelState(savedInstanceState); loadLastPlaceClicked(savedInstanceState); }
java
@Override protected void onRestoreInstanceState(Bundle savedInstanceState) { super.onRestoreInstanceState(savedInstanceState); recoverDraggablePanelState(savedInstanceState); loadLastPlaceClicked(savedInstanceState); }
[ "@", "Override", "protected", "void", "onRestoreInstanceState", "(", "Bundle", "savedInstanceState", ")", "{", "super", ".", "onRestoreInstanceState", "(", "savedInstanceState", ")", ";", "recoverDraggablePanelState", "(", "savedInstanceState", ")", ";", "loadLastPlaceCli...
Restore the DraggablePanel state. @param savedInstanceState bundle to get the Draggable state.
[ "Restore", "the", "DraggablePanel", "state", "." ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/sample/src/main/java/com/github/pedrovgs/sample/activity/PlacesSampleActivity.java#L115-L119
115,851
pedrovgs/DraggablePanel
sample/src/main/java/com/github/pedrovgs/sample/activity/PlacesSampleActivity.java
PlacesSampleActivity.recoverDraggablePanelState
private void recoverDraggablePanelState(Bundle savedInstanceState) { final DraggableState draggableState = (DraggableState) savedInstanceState.getSerializable(DRAGGABLE_PANEL_STATE); if (draggableState == null) { draggablePanel.setVisibility(View.GONE); return; } updateDraggablePanel...
java
private void recoverDraggablePanelState(Bundle savedInstanceState) { final DraggableState draggableState = (DraggableState) savedInstanceState.getSerializable(DRAGGABLE_PANEL_STATE); if (draggableState == null) { draggablePanel.setVisibility(View.GONE); return; } updateDraggablePanel...
[ "private", "void", "recoverDraggablePanelState", "(", "Bundle", "savedInstanceState", ")", "{", "final", "DraggableState", "draggableState", "=", "(", "DraggableState", ")", "savedInstanceState", ".", "getSerializable", "(", "DRAGGABLE_PANEL_STATE", ")", ";", "if", "(",...
Get the DraggablePanelState from the saved bundle, modify the DraggablePanel visibility to GONE and apply the DraggablePanelState to recover the last graphic state.
[ "Get", "the", "DraggablePanelState", "from", "the", "saved", "bundle", "modify", "the", "DraggablePanel", "visibility", "to", "GONE", "and", "apply", "the", "DraggablePanelState", "to", "recover", "the", "last", "graphic", "state", "." ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/sample/src/main/java/com/github/pedrovgs/sample/activity/PlacesSampleActivity.java#L127-L135
115,852
pedrovgs/DraggablePanel
sample/src/main/java/com/github/pedrovgs/sample/activity/PlacesSampleActivity.java
PlacesSampleActivity.saveDraggableState
private void saveDraggableState(Bundle outState) { DraggableState draggableState = null; if (draggablePanel.isMaximized()) { draggableState = DraggableState.MAXIMIZED; } else if (draggablePanel.isMinimized()) { draggableState = DraggableState.MINIMIZED; } else if (draggablePanel.isClosedAtLe...
java
private void saveDraggableState(Bundle outState) { DraggableState draggableState = null; if (draggablePanel.isMaximized()) { draggableState = DraggableState.MAXIMIZED; } else if (draggablePanel.isMinimized()) { draggableState = DraggableState.MINIMIZED; } else if (draggablePanel.isClosedAtLe...
[ "private", "void", "saveDraggableState", "(", "Bundle", "outState", ")", "{", "DraggableState", "draggableState", "=", "null", ";", "if", "(", "draggablePanel", ".", "isMaximized", "(", ")", ")", "{", "draggableState", "=", "DraggableState", ".", "MAXIMIZED", ";...
Keep a reference of the last DraggablePanelState. @param outState Bundle used to store the DraggablePanelState.
[ "Keep", "a", "reference", "of", "the", "last", "DraggablePanelState", "." ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/sample/src/main/java/com/github/pedrovgs/sample/activity/PlacesSampleActivity.java#L197-L209
115,853
pedrovgs/DraggablePanel
sample/src/main/java/com/github/pedrovgs/sample/activity/PlacesSampleActivity.java
PlacesSampleActivity.initializeFragments
private void initializeFragments() { placeFragment = new PlaceFragment(); mapFragment = SupportMapFragment.newInstance( new GoogleMapOptions().mapType(GoogleMap.MAP_TYPE_SATELLITE)); Picasso.with(this) .load("http://www.hdiphonewallpapers.us/phone-wallpapers/iphone-4-wallpapers/" ...
java
private void initializeFragments() { placeFragment = new PlaceFragment(); mapFragment = SupportMapFragment.newInstance( new GoogleMapOptions().mapType(GoogleMap.MAP_TYPE_SATELLITE)); Picasso.with(this) .load("http://www.hdiphonewallpapers.us/phone-wallpapers/iphone-4-wallpapers/" ...
[ "private", "void", "initializeFragments", "(", ")", "{", "placeFragment", "=", "new", "PlaceFragment", "(", ")", ";", "mapFragment", "=", "SupportMapFragment", ".", "newInstance", "(", "new", "GoogleMapOptions", "(", ")", ".", "mapType", "(", "GoogleMap", ".", ...
Initialize PlaceFragment and SupportMapFragment.
[ "Initialize", "PlaceFragment", "and", "SupportMapFragment", "." ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/sample/src/main/java/com/github/pedrovgs/sample/activity/PlacesSampleActivity.java#L222-L230
115,854
pedrovgs/DraggablePanel
sample/src/main/java/com/github/pedrovgs/sample/activity/PlacesSampleActivity.java
PlacesSampleActivity.initializeListView
private void initializeListView() { placesListView.setAdapter(placesAdapter); placesListView.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) { lastLoadedPlacePosition = position; ...
java
private void initializeListView() { placesListView.setAdapter(placesAdapter); placesListView.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) { lastLoadedPlacePosition = position; ...
[ "private", "void", "initializeListView", "(", ")", "{", "placesListView", ".", "setAdapter", "(", "placesAdapter", ")", ";", "placesListView", ".", "setOnItemClickListener", "(", "new", "AdapterView", ".", "OnItemClickListener", "(", ")", "{", "@", "Override", "pu...
Initialize places ListView using placesAdapter and configure OnItemClickListener.
[ "Initialize", "places", "ListView", "using", "placesAdapter", "and", "configure", "OnItemClickListener", "." ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/sample/src/main/java/com/github/pedrovgs/sample/activity/PlacesSampleActivity.java#L235-L244
115,855
pedrovgs/DraggablePanel
sample/src/main/java/com/github/pedrovgs/sample/activity/PlacesSampleActivity.java
PlacesSampleActivity.showPlace
private void showPlace(int position) { draggablePanel.setVisibility(View.VISIBLE); draggablePanel.maximize(); PlaceViewModel placeViewModel = placesAdapter.getItem(position); placeFragment.showPlace(placeViewModel); mapFragment.getMap().clear(); LatLng latitudeLongitude = new LatLng(pla...
java
private void showPlace(int position) { draggablePanel.setVisibility(View.VISIBLE); draggablePanel.maximize(); PlaceViewModel placeViewModel = placesAdapter.getItem(position); placeFragment.showPlace(placeViewModel); mapFragment.getMap().clear(); LatLng latitudeLongitude = new LatLng(pla...
[ "private", "void", "showPlace", "(", "int", "position", ")", "{", "draggablePanel", ".", "setVisibility", "(", "View", ".", "VISIBLE", ")", ";", "draggablePanel", ".", "maximize", "(", ")", ";", "PlaceViewModel", "placeViewModel", "=", "placesAdapter", ".", "g...
Show a place in PlaceFragment and SupportMapFragment and apply the maximize effect over the DraggablePanel.
[ "Show", "a", "place", "in", "PlaceFragment", "and", "SupportMapFragment", "and", "apply", "the", "maximize", "effect", "over", "the", "DraggablePanel", "." ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/sample/src/main/java/com/github/pedrovgs/sample/activity/PlacesSampleActivity.java#L250-L264
115,856
pedrovgs/DraggablePanel
sample/src/main/java/com/github/pedrovgs/sample/activity/PlacesSampleActivity.java
PlacesSampleActivity.initializeDraggablePanel
private void initializeDraggablePanel() { draggablePanel.setFragmentManager(getSupportFragmentManager()); draggablePanel.setTopFragment(placeFragment); draggablePanel.setBottomFragment(mapFragment); TypedValue typedValue = new TypedValue(); getResources().getValue(R.dimen.x_scale_factor, typedValue,...
java
private void initializeDraggablePanel() { draggablePanel.setFragmentManager(getSupportFragmentManager()); draggablePanel.setTopFragment(placeFragment); draggablePanel.setBottomFragment(mapFragment); TypedValue typedValue = new TypedValue(); getResources().getValue(R.dimen.x_scale_factor, typedValue,...
[ "private", "void", "initializeDraggablePanel", "(", ")", "{", "draggablePanel", ".", "setFragmentManager", "(", "getSupportFragmentManager", "(", ")", ")", ";", "draggablePanel", ".", "setTopFragment", "(", "placeFragment", ")", ";", "draggablePanel", ".", "setBottomF...
Initialize the DraggablePanel with top and bottom Fragments and apply all the configuration.
[ "Initialize", "the", "DraggablePanel", "with", "top", "and", "bottom", "Fragments", "and", "apply", "all", "the", "configuration", "." ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/sample/src/main/java/com/github/pedrovgs/sample/activity/PlacesSampleActivity.java#L269-L289
115,857
pedrovgs/DraggablePanel
draggablepanel/src/main/java/com/github/pedrovgs/transformer/Transformer.java
Transformer.setViewHeight
public void setViewHeight(int newHeight) { if (newHeight > 0) { originalHeight = newHeight; RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) view.getLayoutParams(); layoutParams.height = newHeight; view.setLayoutParams(layoutParams); } }
java
public void setViewHeight(int newHeight) { if (newHeight > 0) { originalHeight = newHeight; RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) view.getLayoutParams(); layoutParams.height = newHeight; view.setLayoutParams(layoutParams); } }
[ "public", "void", "setViewHeight", "(", "int", "newHeight", ")", "{", "if", "(", "newHeight", ">", "0", ")", "{", "originalHeight", "=", "newHeight", ";", "RelativeLayout", ".", "LayoutParams", "layoutParams", "=", "(", "RelativeLayout", ".", "LayoutParams", "...
Change view height using the LayoutParams of the view. @param newHeight to change..
[ "Change", "view", "height", "using", "the", "LayoutParams", "of", "the", "view", "." ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/draggablepanel/src/main/java/com/github/pedrovgs/transformer/Transformer.java#L91-L99
115,858
pedrovgs/DraggablePanel
sample/src/main/java/com/github/pedrovgs/sample/DraggablePanelApplication.java
DraggablePanelApplication.onCreate
@Override public void onCreate() { super.onCreate(); MainModule mainModule = new MainModule(this); objectGraph = ObjectGraph.create(mainModule); objectGraph.inject(this); objectGraph.injectStatics(); }
java
@Override public void onCreate() { super.onCreate(); MainModule mainModule = new MainModule(this); objectGraph = ObjectGraph.create(mainModule); objectGraph.inject(this); objectGraph.injectStatics(); }
[ "@", "Override", "public", "void", "onCreate", "(", ")", "{", "super", ".", "onCreate", "(", ")", ";", "MainModule", "mainModule", "=", "new", "MainModule", "(", "this", ")", ";", "objectGraph", "=", "ObjectGraph", ".", "create", "(", "mainModule", ")", ...
Override method used to initialize the dependency container graph with the MainModule.
[ "Override", "method", "used", "to", "initialize", "the", "dependency", "container", "graph", "with", "the", "MainModule", "." ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/sample/src/main/java/com/github/pedrovgs/sample/DraggablePanelApplication.java#L35-L41
115,859
glyptodon/guacamole-client
guacamole/src/main/java/org/apache/guacamole/extension/ExtensionClassLoader.java
ExtensionClassLoader.getInstance
public static ExtensionClassLoader getInstance(final File extension, final ClassLoader parent) throws GuacamoleException { try { // Attempt to create classloader which loads classes from the given // .jar file return AccessController.doPrivileged(new PrivilegedEx...
java
public static ExtensionClassLoader getInstance(final File extension, final ClassLoader parent) throws GuacamoleException { try { // Attempt to create classloader which loads classes from the given // .jar file return AccessController.doPrivileged(new PrivilegedEx...
[ "public", "static", "ExtensionClassLoader", "getInstance", "(", "final", "File", "extension", ",", "final", "ClassLoader", "parent", ")", "throws", "GuacamoleException", "{", "try", "{", "// Attempt to create classloader which loads classes from the given", "// .jar file", "r...
Returns an instance of ExtensionClassLoader configured to load classes from the given extension .jar. If a necessary class cannot be found within the .jar, the given parent ClassLoader is used. Calling this function multiple times will not affect previously-returned instances of ExtensionClassLoader. @param extension ...
[ "Returns", "an", "instance", "of", "ExtensionClassLoader", "configured", "to", "load", "classes", "from", "the", "given", "extension", ".", "jar", ".", "If", "a", "necessary", "class", "cannot", "be", "found", "within", "the", ".", "jar", "the", "given", "pa...
ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/extension/ExtensionClassLoader.java#L69-L89
115,860
glyptodon/guacamole-client
guacamole/src/main/java/org/apache/guacamole/extension/ExtensionClassLoader.java
ExtensionClassLoader.getExtensionURL
private static URL getExtensionURL(File extension) throws GuacamoleException { // Validate extension file is indeed a file if (!extension.isFile()) throw new GuacamoleException(extension + " is not a file."); try { return extension.toURI().toURL(); }...
java
private static URL getExtensionURL(File extension) throws GuacamoleException { // Validate extension file is indeed a file if (!extension.isFile()) throw new GuacamoleException(extension + " is not a file."); try { return extension.toURI().toURL(); }...
[ "private", "static", "URL", "getExtensionURL", "(", "File", "extension", ")", "throws", "GuacamoleException", "{", "// Validate extension file is indeed a file", "if", "(", "!", "extension", ".", "isFile", "(", ")", ")", "throw", "new", "GuacamoleException", "(", "e...
Returns a URL which points to the given extension .jar file. @param extension The extension .jar file to generate a URL for. @return A URL which points to the given extension .jar. @throws GuacamoleException If the given file is not actually a file, or the contents of the file cannot be read.
[ "Returns", "a", "URL", "which", "points", "to", "the", "given", "extension", ".", "jar", "file", "." ]
ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/extension/ExtensionClassLoader.java#L104-L118
115,861
glyptodon/guacamole-client
guacamole/src/main/java/org/apache/guacamole/rest/session/SessionResource.java
SessionResource.getUserContextResource
@Path("data/{dataSource}") public UserContextResource getUserContextResource( @PathParam("dataSource") String authProviderIdentifier) throws GuacamoleException { // Pull UserContext defined by the given auth provider identifier UserContext userContext = session.getUserContex...
java
@Path("data/{dataSource}") public UserContextResource getUserContextResource( @PathParam("dataSource") String authProviderIdentifier) throws GuacamoleException { // Pull UserContext defined by the given auth provider identifier UserContext userContext = session.getUserContex...
[ "@", "Path", "(", "\"data/{dataSource}\"", ")", "public", "UserContextResource", "getUserContextResource", "(", "@", "PathParam", "(", "\"dataSource\"", ")", "String", "authProviderIdentifier", ")", "throws", "GuacamoleException", "{", "// Pull UserContext defined by the give...
Retrieves a resource representing the UserContext associated with the AuthenticationProvider having the given identifier. @param authProviderIdentifier The unique identifier of the AuthenticationProvider associated with the UserContext being retrieved. @return A resource representing the UserContext associated with t...
[ "Retrieves", "a", "resource", "representing", "the", "UserContext", "associated", "with", "the", "AuthenticationProvider", "having", "the", "given", "identifier", "." ]
ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/session/SessionResource.java#L92-L103
115,862
glyptodon/guacamole-client
guacamole/src/main/java/org/apache/guacamole/rest/session/SessionResource.java
SessionResource.getExtensionResource
@Path("ext/{dataSource}") public Object getExtensionResource( @PathParam("dataSource") String authProviderIdentifier) throws GuacamoleException { // Pull UserContext defined by the given auth provider identifier UserContext userContext = session.getUserContext(authProviderId...
java
@Path("ext/{dataSource}") public Object getExtensionResource( @PathParam("dataSource") String authProviderIdentifier) throws GuacamoleException { // Pull UserContext defined by the given auth provider identifier UserContext userContext = session.getUserContext(authProviderId...
[ "@", "Path", "(", "\"ext/{dataSource}\"", ")", "public", "Object", "getExtensionResource", "(", "@", "PathParam", "(", "\"dataSource\"", ")", "String", "authProviderIdentifier", ")", "throws", "GuacamoleException", "{", "// Pull UserContext defined by the given auth provider ...
Returns the arbitrary REST resource exposed by the UserContext associated with the AuthenticationProvider having the given identifier. @param authProviderIdentifier The unique identifier of the AuthenticationProvider associated with the UserContext whose arbitrary REST service is being retrieved. @return The arbitrar...
[ "Returns", "the", "arbitrary", "REST", "resource", "exposed", "by", "the", "UserContext", "associated", "with", "the", "AuthenticationProvider", "having", "the", "given", "identifier", "." ]
ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/session/SessionResource.java#L121-L137
115,863
glyptodon/guacamole-client
guacamole/src/main/java/org/apache/guacamole/rest/patch/PatchRESTService.java
PatchRESTService.readResourceAsString
private String readResourceAsString(Resource resource) throws IOException { StringBuilder contents = new StringBuilder(); // Read entire resource into StringBuilder one chunk at a time Reader reader = new InputStreamReader(resource.asStream(), "UTF-8"); try { char buffer[]...
java
private String readResourceAsString(Resource resource) throws IOException { StringBuilder contents = new StringBuilder(); // Read entire resource into StringBuilder one chunk at a time Reader reader = new InputStreamReader(resource.asStream(), "UTF-8"); try { char buffer[]...
[ "private", "String", "readResourceAsString", "(", "Resource", "resource", ")", "throws", "IOException", "{", "StringBuilder", "contents", "=", "new", "StringBuilder", "(", ")", ";", "// Read entire resource into StringBuilder one chunk at a time", "Reader", "reader", "=", ...
Reads the entire contents of the given resource as a String. The resource is assumed to be encoded in UTF-8. @param resource The resource to read as a new String. @return A new String containing the contents of the given resource. @throws IOException If an I/O error prevents reading the resource.
[ "Reads", "the", "entire", "contents", "of", "the", "given", "resource", "as", "a", "String", ".", "The", "resource", "is", "assumed", "to", "be", "encoded", "in", "UTF", "-", "8", "." ]
ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/patch/PatchRESTService.java#L64-L88
115,864
glyptodon/guacamole-client
guacamole/src/main/java/org/apache/guacamole/rest/patch/PatchRESTService.java
PatchRESTService.getPatches
@GET public List<String> getPatches() throws GuacamoleException { try { // Allocate a list of equal size to the total number of patches List<Resource> resources = patchResourceService.getPatchResources(); List<String> patches = new ArrayList<String>(resources.size()); ...
java
@GET public List<String> getPatches() throws GuacamoleException { try { // Allocate a list of equal size to the total number of patches List<Resource> resources = patchResourceService.getPatchResources(); List<String> patches = new ArrayList<String>(resources.size()); ...
[ "@", "GET", "public", "List", "<", "String", ">", "getPatches", "(", ")", "throws", "GuacamoleException", "{", "try", "{", "// Allocate a list of equal size to the total number of patches", "List", "<", "Resource", ">", "resources", "=", "patchResourceService", ".", "...
Returns a list of all available HTML patches, in the order they should be applied. Each patch is raw HTML containing additional meta tags describing how and where the patch should be applied. @return A list of all HTML patches defined in the system, in the order they should be applied. @throws GuacamoleException If a...
[ "Returns", "a", "list", "of", "all", "available", "HTML", "patches", "in", "the", "order", "they", "should", "be", "applied", ".", "Each", "patch", "is", "raw", "HTML", "containing", "additional", "meta", "tags", "describing", "how", "and", "where", "the", ...
ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/patch/PatchRESTService.java#L102-L126
115,865
glyptodon/guacamole-client
extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/base/ModeledChildDirectoryObject.java
ModeledChildDirectoryObject.getParentIdentifier
public String getParentIdentifier() { // Translate null parent to proper identifier String parentIdentifier = getModel().getParentIdentifier(); if (parentIdentifier == null) return RootConnectionGroup.IDENTIFIER; return parentIdentifier; }
java
public String getParentIdentifier() { // Translate null parent to proper identifier String parentIdentifier = getModel().getParentIdentifier(); if (parentIdentifier == null) return RootConnectionGroup.IDENTIFIER; return parentIdentifier; }
[ "public", "String", "getParentIdentifier", "(", ")", "{", "// Translate null parent to proper identifier", "String", "parentIdentifier", "=", "getModel", "(", ")", ".", "getParentIdentifier", "(", ")", ";", "if", "(", "parentIdentifier", "==", "null", ")", "return", ...
Returns the identifier of the parent connection group, which cannot be null. If the parent is the root connection group, this will be RootConnectionGroup.IDENTIFIER. @return The identifier of the parent connection group.
[ "Returns", "the", "identifier", "of", "the", "parent", "connection", "group", "which", "cannot", "be", "null", ".", "If", "the", "parent", "is", "the", "root", "connection", "group", "this", "will", "be", "RootConnectionGroup", ".", "IDENTIFIER", "." ]
ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/base/ModeledChildDirectoryObject.java#L43-L52
115,866
glyptodon/guacamole-client
extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/base/ModeledChildDirectoryObject.java
ModeledChildDirectoryObject.setParentIdentifier
public void setParentIdentifier(String parentIdentifier) { // Translate root identifier back into null if (parentIdentifier != null && parentIdentifier.equals(RootConnectionGroup.IDENTIFIER)) parentIdentifier = null; getModel().setParentIdentifier(parentIdentifier);...
java
public void setParentIdentifier(String parentIdentifier) { // Translate root identifier back into null if (parentIdentifier != null && parentIdentifier.equals(RootConnectionGroup.IDENTIFIER)) parentIdentifier = null; getModel().setParentIdentifier(parentIdentifier);...
[ "public", "void", "setParentIdentifier", "(", "String", "parentIdentifier", ")", "{", "// Translate root identifier back into null", "if", "(", "parentIdentifier", "!=", "null", "&&", "parentIdentifier", ".", "equals", "(", "RootConnectionGroup", ".", "IDENTIFIER", ")", ...
Sets the identifier of the associated parent connection group. If the parent is the root connection group, this should be RootConnectionGroup.IDENTIFIER. @param parentIdentifier The identifier of the connection group to associate as this object's parent.
[ "Sets", "the", "identifier", "of", "the", "associated", "parent", "connection", "group", ".", "If", "the", "parent", "is", "the", "root", "connection", "group", "this", "should", "be", "RootConnectionGroup", ".", "IDENTIFIER", "." ]
ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/base/ModeledChildDirectoryObject.java#L63-L72
115,867
glyptodon/guacamole-client
guacamole/src/main/java/org/apache/guacamole/rest/identifier/RelatedObjectSetResource.java
RelatedObjectSetResource.updateRelatedObjectSet
private void updateRelatedObjectSet(APIPatch.Operation operation, RelatedObjectSetPatch relatedObjectSetPatch, String identifier) throws GuacamoleException { // Add or remove object based on operation switch (operation) { // Add object case add: ...
java
private void updateRelatedObjectSet(APIPatch.Operation operation, RelatedObjectSetPatch relatedObjectSetPatch, String identifier) throws GuacamoleException { // Add or remove object based on operation switch (operation) { // Add object case add: ...
[ "private", "void", "updateRelatedObjectSet", "(", "APIPatch", ".", "Operation", "operation", ",", "RelatedObjectSetPatch", "relatedObjectSetPatch", ",", "String", "identifier", ")", "throws", "GuacamoleException", "{", "// Add or remove object based on operation", "switch", "...
Updates the given RelatedObjectSetPatch by queuing an add or remove operation for the object having the given identifier based on the given patch operation. @param operation The patch operation to perform. @param relatedObjectSetPatch The RelatedObjectSetPatch being modified. @param identifier The identifier of the ...
[ "Updates", "the", "given", "RelatedObjectSetPatch", "by", "queuing", "an", "add", "or", "remove", "operation", "for", "the", "object", "having", "the", "given", "identifier", "based", "on", "the", "given", "patch", "operation", "." ]
ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/identifier/RelatedObjectSetResource.java#L98-L121
115,868
glyptodon/guacamole-client
guacamole/src/main/java/org/apache/guacamole/rest/directory/DirectoryResource.java
DirectoryResource.getObjects
@GET public Map<String, ExternalType> getObjects( @QueryParam("permission") List<ObjectPermission.Type> permissions) throws GuacamoleException { // An admin user has access to all objects Permissions effective = userContext.self().getEffectivePermissions(); SystemPer...
java
@GET public Map<String, ExternalType> getObjects( @QueryParam("permission") List<ObjectPermission.Type> permissions) throws GuacamoleException { // An admin user has access to all objects Permissions effective = userContext.self().getEffectivePermissions(); SystemPer...
[ "@", "GET", "public", "Map", "<", "String", ",", "ExternalType", ">", "getObjects", "(", "@", "QueryParam", "(", "\"permission\"", ")", "List", "<", "ObjectPermission", ".", "Type", ">", "permissions", ")", "throws", "GuacamoleException", "{", "// An admin user ...
Returns a map of all objects available within this DirectoryResource, filtering the returned map by the given permission, if specified. @param permissions The set of permissions to filter with. A user must have one or more of these permissions for the affected objects to appear in the result. If null, no filtering wil...
[ "Returns", "a", "map", "of", "all", "objects", "available", "within", "this", "DirectoryResource", "filtering", "the", "returned", "map", "by", "the", "given", "permission", "if", "specified", "." ]
ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/directory/DirectoryResource.java#L159-L183
115,869
glyptodon/guacamole-client
guacamole/src/main/java/org/apache/guacamole/rest/directory/DirectoryResource.java
DirectoryResource.createObject
@POST public ExternalType createObject(ExternalType object) throws GuacamoleException { // Validate that data was provided if (object == null) throw new GuacamoleClientException("Data must be submitted when creating objects."); // Filter/sanitize object contents ...
java
@POST public ExternalType createObject(ExternalType object) throws GuacamoleException { // Validate that data was provided if (object == null) throw new GuacamoleClientException("Data must be submitted when creating objects."); // Filter/sanitize object contents ...
[ "@", "POST", "public", "ExternalType", "createObject", "(", "ExternalType", "object", ")", "throws", "GuacamoleException", "{", "// Validate that data was provided", "if", "(", "object", "==", "null", ")", "throw", "new", "GuacamoleClientException", "(", "\"Data must be...
Creates a new object within the underlying Directory, returning the object that was created. The identifier of the created object will be populated, if applicable. @param object The object to create. @return The object that was created. @throws GuacamoleException If an error occurs while adding the object to the und...
[ "Creates", "a", "new", "object", "within", "the", "underlying", "Directory", "returning", "the", "object", "that", "was", "created", ".", "The", "identifier", "of", "the", "created", "object", "will", "be", "populated", "if", "applicable", "." ]
ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/directory/DirectoryResource.java#L237-L253
115,870
glyptodon/guacamole-client
guacamole/src/main/java/org/apache/guacamole/rest/directory/DirectoryResource.java
DirectoryResource.getObjectResource
@Path("{identifier}") public DirectoryObjectResource<InternalType, ExternalType> getObjectResource(@PathParam("identifier") String identifier) throws GuacamoleException { // Retrieve the object having the given identifier InternalType object = directory.get(identifier); ...
java
@Path("{identifier}") public DirectoryObjectResource<InternalType, ExternalType> getObjectResource(@PathParam("identifier") String identifier) throws GuacamoleException { // Retrieve the object having the given identifier InternalType object = directory.get(identifier); ...
[ "@", "Path", "(", "\"{identifier}\"", ")", "public", "DirectoryObjectResource", "<", "InternalType", ",", "ExternalType", ">", "getObjectResource", "(", "@", "PathParam", "(", "\"identifier\"", ")", "String", "identifier", ")", "throws", "GuacamoleException", "{", "...
Retrieves an individual object, returning a DirectoryObjectResource implementation which exposes operations available on that object. @param identifier The identifier of the object to retrieve. @return A DirectoryObjectResource exposing operations available on the object having the given identifier. @throws Guacamol...
[ "Retrieves", "an", "individual", "object", "returning", "a", "DirectoryObjectResource", "implementation", "which", "exposes", "operations", "available", "on", "that", "object", "." ]
ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/directory/DirectoryResource.java#L269-L282
115,871
glyptodon/guacamole-client
extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/ActiveConnectionMultimap.java
ActiveConnectionMultimap.put
public void put(String identifier, ActiveConnectionRecord record) { synchronized (records) { // Get set of active connection records, creating if necessary Set<ActiveConnectionRecord> connections = records.get(identifier); if (connections == null) { connectio...
java
public void put(String identifier, ActiveConnectionRecord record) { synchronized (records) { // Get set of active connection records, creating if necessary Set<ActiveConnectionRecord> connections = records.get(identifier); if (connections == null) { connectio...
[ "public", "void", "put", "(", "String", "identifier", ",", "ActiveConnectionRecord", "record", ")", "{", "synchronized", "(", "records", ")", "{", "// Get set of active connection records, creating if necessary", "Set", "<", "ActiveConnectionRecord", ">", "connections", "...
Stores the given connection record in the list of active connections associated with the object having the given identifier. @param identifier The identifier of the object being connected to. @param record The record associated with the active connection.
[ "Stores", "the", "given", "connection", "record", "in", "the", "list", "of", "active", "connections", "associated", "with", "the", "object", "having", "the", "given", "identifier", "." ]
ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/ActiveConnectionMultimap.java#L53-L67
115,872
glyptodon/guacamole-client
extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/ActiveConnectionMultimap.java
ActiveConnectionMultimap.remove
public void remove(String identifier, ActiveConnectionRecord record) { synchronized (records) { // Get set of active connection records Set<ActiveConnectionRecord> connections = records.get(identifier); assert(connections != null); // Remove old record ...
java
public void remove(String identifier, ActiveConnectionRecord record) { synchronized (records) { // Get set of active connection records Set<ActiveConnectionRecord> connections = records.get(identifier); assert(connections != null); // Remove old record ...
[ "public", "void", "remove", "(", "String", "identifier", ",", "ActiveConnectionRecord", "record", ")", "{", "synchronized", "(", "records", ")", "{", "// Get set of active connection records", "Set", "<", "ActiveConnectionRecord", ">", "connections", "=", "records", "...
Removes the given connection record from the list of active connections associated with the object having the given identifier. @param identifier The identifier of the object being disconnected from. @param record The record associated with the active connection.
[ "Removes", "the", "given", "connection", "record", "from", "the", "list", "of", "active", "connections", "associated", "with", "the", "object", "having", "the", "given", "identifier", "." ]
ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/ActiveConnectionMultimap.java#L79-L94
115,873
glyptodon/guacamole-client
extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/ActiveConnectionMultimap.java
ActiveConnectionMultimap.get
public Collection<ActiveConnectionRecord> get(String identifier) { synchronized (records) { // Get set of active connection records Collection<ActiveConnectionRecord> connections = records.get(identifier); if (connections != null) return Collections.unmodifia...
java
public Collection<ActiveConnectionRecord> get(String identifier) { synchronized (records) { // Get set of active connection records Collection<ActiveConnectionRecord> connections = records.get(identifier); if (connections != null) return Collections.unmodifia...
[ "public", "Collection", "<", "ActiveConnectionRecord", ">", "get", "(", "String", "identifier", ")", "{", "synchronized", "(", "records", ")", "{", "// Get set of active connection records", "Collection", "<", "ActiveConnectionRecord", ">", "connections", "=", "records"...
Returns a collection of active connection records associated with the object having the given identifier. The collection will be sorted in insertion order. If there are no such connections, an empty collection is returned. @param identifier The identifier of the object to check. @return An immutable collection of rec...
[ "Returns", "a", "collection", "of", "active", "connection", "records", "associated", "with", "the", "object", "having", "the", "given", "identifier", ".", "The", "collection", "will", "be", "sorted", "in", "insertion", "order", ".", "If", "there", "are", "no",...
ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/ActiveConnectionMultimap.java#L110-L121
115,874
glyptodon/guacamole-client
extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/activeconnection/TrackedActiveConnection.java
TrackedActiveConnection.init
public void init(ModeledAuthenticatedUser currentUser, ActiveConnectionRecord activeConnectionRecord, boolean includeSensitiveInformation) { super.init(currentUser); this.connectionRecord = activeConnectionRecord; // Copy all non-sensitive data from given record...
java
public void init(ModeledAuthenticatedUser currentUser, ActiveConnectionRecord activeConnectionRecord, boolean includeSensitiveInformation) { super.init(currentUser); this.connectionRecord = activeConnectionRecord; // Copy all non-sensitive data from given record...
[ "public", "void", "init", "(", "ModeledAuthenticatedUser", "currentUser", ",", "ActiveConnectionRecord", "activeConnectionRecord", ",", "boolean", "includeSensitiveInformation", ")", "{", "super", ".", "init", "(", "currentUser", ")", ";", "this", ".", "connectionRecord...
Initializes this TrackedActiveConnection, copying the data associated with the given active connection record. At a minimum, the identifier of this active connection will be set, the start date, and the identifier of the associated connection will be copied. If requested, sensitive information like the associated usern...
[ "Initializes", "this", "TrackedActiveConnection", "copying", "the", "data", "associated", "with", "the", "given", "active", "connection", "record", ".", "At", "a", "minimum", "the", "identifier", "of", "this", "active", "connection", "will", "be", "set", "the", ...
ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/activeconnection/TrackedActiveConnection.java#L106-L126
115,875
glyptodon/guacamole-client
extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/group/UserGroupService.java
UserGroupService.getUserGroups
public Map<String, UserGroup> getUserGroups(LDAPConnection ldapConnection) throws GuacamoleException { // Do not return any user groups if base DN is not specified String groupBaseDN = confService.getGroupBaseDN(); if (groupBaseDN == null) return Collections.emptyMap(); ...
java
public Map<String, UserGroup> getUserGroups(LDAPConnection ldapConnection) throws GuacamoleException { // Do not return any user groups if base DN is not specified String groupBaseDN = confService.getGroupBaseDN(); if (groupBaseDN == null) return Collections.emptyMap(); ...
[ "public", "Map", "<", "String", ",", "UserGroup", ">", "getUserGroups", "(", "LDAPConnection", "ldapConnection", ")", "throws", "GuacamoleException", "{", "// Do not return any user groups if base DN is not specified", "String", "groupBaseDN", "=", "confService", ".", "getG...
Returns all Guacamole user groups accessible to the user currently bound under the given LDAP connection. @param ldapConnection The current connection to the LDAP server, associated with the current user. @return All user groups accessible to the user currently bound under the given LDAP connection, as a map of user ...
[ "Returns", "all", "Guacamole", "user", "groups", "accessible", "to", "the", "user", "currently", "bound", "under", "the", "given", "LDAP", "connection", "." ]
ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/group/UserGroupService.java#L105-L139
115,876
glyptodon/guacamole-client
extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/group/UserGroupService.java
UserGroupService.getParentUserGroupEntries
public List<LDAPEntry> getParentUserGroupEntries(LDAPConnection ldapConnection, String userDN) throws GuacamoleException { // Do not return any user groups if base DN is not specified String groupBaseDN = confService.getGroupBaseDN(); if (groupBaseDN == null) return Coll...
java
public List<LDAPEntry> getParentUserGroupEntries(LDAPConnection ldapConnection, String userDN) throws GuacamoleException { // Do not return any user groups if base DN is not specified String groupBaseDN = confService.getGroupBaseDN(); if (groupBaseDN == null) return Coll...
[ "public", "List", "<", "LDAPEntry", ">", "getParentUserGroupEntries", "(", "LDAPConnection", "ldapConnection", ",", "String", "userDN", ")", "throws", "GuacamoleException", "{", "// Do not return any user groups if base DN is not specified", "String", "groupBaseDN", "=", "con...
Returns the LDAP entries representing all user groups that the given user is a member of. Only user groups which are readable by the current user will be retrieved. @param ldapConnection The current connection to the LDAP server, associated with the current user. @param userDN The DN of the user whose group membershi...
[ "Returns", "the", "LDAP", "entries", "representing", "all", "user", "groups", "that", "the", "given", "user", "is", "a", "member", "of", ".", "Only", "user", "groups", "which", "are", "readable", "by", "the", "current", "user", "will", "be", "retrieved", "...
ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/group/UserGroupService.java#L160-L178
115,877
glyptodon/guacamole-client
extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/group/UserGroupService.java
UserGroupService.getParentUserGroupIdentifiers
public Set<String> getParentUserGroupIdentifiers(LDAPConnection ldapConnection, String userDN) throws GuacamoleException { Collection<String> attributes = confService.getGroupNameAttributes(); List<LDAPEntry> userGroups = getParentUserGroupEntries(ldapConnection, userDN); Set<Strin...
java
public Set<String> getParentUserGroupIdentifiers(LDAPConnection ldapConnection, String userDN) throws GuacamoleException { Collection<String> attributes = confService.getGroupNameAttributes(); List<LDAPEntry> userGroups = getParentUserGroupEntries(ldapConnection, userDN); Set<Strin...
[ "public", "Set", "<", "String", ">", "getParentUserGroupIdentifiers", "(", "LDAPConnection", "ldapConnection", ",", "String", "userDN", ")", "throws", "GuacamoleException", "{", "Collection", "<", "String", ">", "attributes", "=", "confService", ".", "getGroupNameAttr...
Returns the identifiers of all user groups that the given user is a member of. Only identifiers of user groups which are readable by the current user will be retrieved. @param ldapConnection The current connection to the LDAP server, associated with the current user. @param userDN The DN of the user whose group membe...
[ "Returns", "the", "identifiers", "of", "all", "user", "groups", "that", "the", "given", "user", "is", "a", "member", "of", ".", "Only", "identifiers", "of", "user", "groups", "which", "are", "readable", "by", "the", "current", "user", "will", "be", "retrie...
ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/group/UserGroupService.java#L199-L222
115,878
glyptodon/guacamole-client
guacamole/src/main/java/org/apache/guacamole/rest/extension/ExtensionRESTService.java
ExtensionRESTService.getAuthenticationProvider
private AuthenticationProvider getAuthenticationProvider(String identifier) { // Iterate through all installed AuthenticationProviders, searching for // the given identifier for (AuthenticationProvider authProvider : authProviders) { if (authProvider.getIdentifier().equals(identifie...
java
private AuthenticationProvider getAuthenticationProvider(String identifier) { // Iterate through all installed AuthenticationProviders, searching for // the given identifier for (AuthenticationProvider authProvider : authProviders) { if (authProvider.getIdentifier().equals(identifie...
[ "private", "AuthenticationProvider", "getAuthenticationProvider", "(", "String", "identifier", ")", "{", "// Iterate through all installed AuthenticationProviders, searching for", "// the given identifier", "for", "(", "AuthenticationProvider", "authProvider", ":", "authProviders", "...
Returns the AuthenticationProvider having the given identifier. If no such AuthenticationProvider has been loaded, null is returned. @param identifier The identifier of the AuthenticationProvider to locate. @return The AuthenticationProvider having the given identifier, or null if no such AuthenticationProvider is lo...
[ "Returns", "the", "AuthenticationProvider", "having", "the", "given", "identifier", ".", "If", "no", "such", "AuthenticationProvider", "has", "been", "loaded", "null", "is", "returned", "." ]
ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/extension/ExtensionRESTService.java#L54-L66
115,879
glyptodon/guacamole-client
guacamole/src/main/java/org/apache/guacamole/rest/extension/ExtensionRESTService.java
ExtensionRESTService.getExtensionResource
@Path("{identifier}") public Object getExtensionResource(@PathParam("identifier") String identifier) throws GuacamoleException { // Retrieve authentication provider having given identifier AuthenticationProvider authProvider = getAuthenticationProvider(identifier); if (authProvi...
java
@Path("{identifier}") public Object getExtensionResource(@PathParam("identifier") String identifier) throws GuacamoleException { // Retrieve authentication provider having given identifier AuthenticationProvider authProvider = getAuthenticationProvider(identifier); if (authProvi...
[ "@", "Path", "(", "\"{identifier}\"", ")", "public", "Object", "getExtensionResource", "(", "@", "PathParam", "(", "\"identifier\"", ")", "String", "identifier", ")", "throws", "GuacamoleException", "{", "// Retrieve authentication provider having given identifier", "Authen...
Returns the arbitrary REST resource exposed by the AuthenticationProvider having the given identifier. @param identifier The identifier of the AuthenticationProvider whose REST resource should be retrieved. @return The arbitrary REST resource exposed by the AuthenticationProvider having the given identifier. @throws...
[ "Returns", "the", "arbitrary", "REST", "resource", "exposed", "by", "the", "AuthenticationProvider", "having", "the", "given", "identifier", "." ]
ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/extension/ExtensionRESTService.java#L84-L102
115,880
glyptodon/guacamole-client
extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/sharing/user/SharedUserContext.java
SharedUserContext.init
public void init(AuthenticationProvider authProvider, RemoteAuthenticatedUser user) { // Associate the originating authentication provider this.authProvider = authProvider; // Provide access to all connections shared with the given user this.connectionDirectory.init(user); // ...
java
public void init(AuthenticationProvider authProvider, RemoteAuthenticatedUser user) { // Associate the originating authentication provider this.authProvider = authProvider; // Provide access to all connections shared with the given user this.connectionDirectory.init(user); // ...
[ "public", "void", "init", "(", "AuthenticationProvider", "authProvider", ",", "RemoteAuthenticatedUser", "user", ")", "{", "// Associate the originating authentication provider", "this", ".", "authProvider", "=", "authProvider", ";", "// Provide access to all connections shared w...
Creates a new SharedUserContext which provides access ONLY to the given user, the SharedConnections associated with the share keys used by that user, and an internal root connection group containing only those SharedConnections. @param authProvider The AuthenticationProvider that created this SharedUserContext; @para...
[ "Creates", "a", "new", "SharedUserContext", "which", "provides", "access", "ONLY", "to", "the", "given", "user", "the", "SharedConnections", "associated", "with", "the", "share", "keys", "used", "by", "that", "user", "and", "an", "internal", "root", "connection"...
ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/sharing/user/SharedUserContext.java#L80-L94
115,881
glyptodon/guacamole-client
extensions/guacamole-auth-openid/src/main/java/org/apache/guacamole/auth/openid/token/TokenValidationService.java
TokenValidationService.processUsername
public String processUsername(String token) throws GuacamoleException { // Validating the token requires a JWKS key resolver HttpsJwks jwks = new HttpsJwks(confService.getJWKSEndpoint().toString()); HttpsJwksVerificationKeyResolver resolver = new HttpsJwksVerificationKeyResolver(jwks); ...
java
public String processUsername(String token) throws GuacamoleException { // Validating the token requires a JWKS key resolver HttpsJwks jwks = new HttpsJwks(confService.getJWKSEndpoint().toString()); HttpsJwksVerificationKeyResolver resolver = new HttpsJwksVerificationKeyResolver(jwks); ...
[ "public", "String", "processUsername", "(", "String", "token", ")", "throws", "GuacamoleException", "{", "// Validating the token requires a JWKS key resolver", "HttpsJwks", "jwks", "=", "new", "HttpsJwks", "(", "confService", ".", "getJWKSEndpoint", "(", ")", ".", "toS...
Validates and parses the given ID token, returning the username contained therein, as defined by the username claim type given in guacamole.properties. If the username claim type is missing or the ID token is invalid, null is returned. @param token The ID token to validate and parse. @return The username contained wi...
[ "Validates", "and", "parses", "the", "given", "ID", "token", "returning", "the", "username", "contained", "therein", "as", "defined", "by", "the", "username", "claim", "type", "given", "in", "guacamole", ".", "properties", ".", "If", "the", "username", "claim"...
ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-openid/src/main/java/org/apache/guacamole/auth/openid/token/TokenValidationService.java#L74-L138
115,882
glyptodon/guacamole-client
extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/user/UserService.java
UserService.getUsers
public Map<String, User> getUsers(LDAPConnection ldapConnection) throws GuacamoleException { // Retrieve all visible user objects Collection<String> attributes = confService.getUsernameAttributes(); List<LDAPEntry> results = queryService.search(ldapConnection, confSe...
java
public Map<String, User> getUsers(LDAPConnection ldapConnection) throws GuacamoleException { // Retrieve all visible user objects Collection<String> attributes = confService.getUsernameAttributes(); List<LDAPEntry> results = queryService.search(ldapConnection, confSe...
[ "public", "Map", "<", "String", ",", "User", ">", "getUsers", "(", "LDAPConnection", "ldapConnection", ")", "throws", "GuacamoleException", "{", "// Retrieve all visible user objects", "Collection", "<", "String", ">", "attributes", "=", "confService", ".", "getUserna...
Returns all Guacamole users accessible to the user currently bound under the given LDAP connection. @param ldapConnection The current connection to the LDAP server, associated with the current user. @return All users accessible to the user currently bound under the given LDAP connection, as a map of connection identi...
[ "Returns", "all", "Guacamole", "users", "accessible", "to", "the", "user", "currently", "bound", "under", "the", "given", "LDAP", "connection", "." ]
ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/user/UserService.java#L84-L110
115,883
glyptodon/guacamole-client
extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/user/UserService.java
UserService.getUserDNs
public List<String> getUserDNs(LDAPConnection ldapConnection, String username) throws GuacamoleException { // Retrieve user objects having a matching username List<LDAPEntry> results = queryService.search(ldapConnection, confService.getUserBaseDN(), confServi...
java
public List<String> getUserDNs(LDAPConnection ldapConnection, String username) throws GuacamoleException { // Retrieve user objects having a matching username List<LDAPEntry> results = queryService.search(ldapConnection, confService.getUserBaseDN(), confServi...
[ "public", "List", "<", "String", ">", "getUserDNs", "(", "LDAPConnection", "ldapConnection", ",", "String", "username", ")", "throws", "GuacamoleException", "{", "// Retrieve user objects having a matching username", "List", "<", "LDAPEntry", ">", "results", "=", "query...
Returns a list of all DNs corresponding to the users having the given username. If multiple username attributes are defined, or if uniqueness is not enforced across the username attribute, it is possible that this will return multiple DNs. @param ldapConnection The connection to the LDAP server to use when querying us...
[ "Returns", "a", "list", "of", "all", "DNs", "corresponding", "to", "the", "users", "having", "the", "given", "username", ".", "If", "multiple", "username", "attributes", "are", "defined", "or", "if", "uniqueness", "is", "not", "enforced", "across", "the", "u...
ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/user/UserService.java#L133-L149
115,884
glyptodon/guacamole-client
guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty8/GuacamoleWebSocketTunnelServlet.java
GuacamoleWebSocketTunnelServlet.closeConnection
private static void closeConnection(Connection connection, int guacamoleStatusCode, int webSocketCode) { connection.close(webSocketCode, Integer.toString(guacamoleStatusCode)); }
java
private static void closeConnection(Connection connection, int guacamoleStatusCode, int webSocketCode) { connection.close(webSocketCode, Integer.toString(guacamoleStatusCode)); }
[ "private", "static", "void", "closeConnection", "(", "Connection", "connection", ",", "int", "guacamoleStatusCode", ",", "int", "webSocketCode", ")", "{", "connection", ".", "close", "(", "webSocketCode", ",", "Integer", ".", "toString", "(", "guacamoleStatusCode", ...
Sends the given numeric Guacamole and WebSocket status on the given WebSocket connection and closes the connection. @param connection The WebSocket connection to close. @param guacamoleStatusCode The numeric Guacamole Status code to send. @param webSocketCode The numeric WebSocket status code to send.
[ "Sends", "the", "given", "numeric", "Guacamole", "and", "WebSocket", "status", "on", "the", "given", "WebSocket", "connection", "and", "closes", "the", "connection", "." ]
ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty8/GuacamoleWebSocketTunnelServlet.java#L81-L87
115,885
glyptodon/guacamole-client
guacamole-common/src/main/java/org/apache/guacamole/protocol/GuacamoleParser.java
GuacamoleParser.append
public int append(char chunk[], int offset, int length) throws GuacamoleException { int charsParsed = 0; // Do not exceed maximum number of elements if (elementCount == INSTRUCTION_MAX_ELEMENTS && state != State.COMPLETE) { state = State.ERROR; throw new GuacamoleServer...
java
public int append(char chunk[], int offset, int length) throws GuacamoleException { int charsParsed = 0; // Do not exceed maximum number of elements if (elementCount == INSTRUCTION_MAX_ELEMENTS && state != State.COMPLETE) { state = State.ERROR; throw new GuacamoleServer...
[ "public", "int", "append", "(", "char", "chunk", "[", "]", ",", "int", "offset", ",", "int", "length", ")", "throws", "GuacamoleException", "{", "int", "charsParsed", "=", "0", ";", "// Do not exceed maximum number of elements", "if", "(", "elementCount", "==", ...
Appends data from the given buffer to the current instruction. @param chunk The buffer containing the data to append. @param offset The offset within the buffer where the data begins. @param length The length of the data to append. @return The number of characters appended, or 0 if complete instructions have already b...
[ "Appends", "data", "from", "the", "given", "buffer", "to", "the", "current", "instruction", "." ]
ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole-common/src/main/java/org/apache/guacamole/protocol/GuacamoleParser.java#L115-L198
115,886
glyptodon/guacamole-client
extensions/guacamole-auth-totp/src/main/java/org/apache/guacamole/totp/TOTPGenerator.java
TOTPGenerator.getMacInstance
private static Mac getMacInstance(Mode mode, Key key) throws InvalidKeyException { try { Mac hmac = Mac.getInstance(mode.getAlgorithmName()); hmac.init(key); return hmac; } catch (NoSuchAlgorithmException e) { throw new UnsupportedOper...
java
private static Mac getMacInstance(Mode mode, Key key) throws InvalidKeyException { try { Mac hmac = Mac.getInstance(mode.getAlgorithmName()); hmac.init(key); return hmac; } catch (NoSuchAlgorithmException e) { throw new UnsupportedOper...
[ "private", "static", "Mac", "getMacInstance", "(", "Mode", "mode", ",", "Key", "key", ")", "throws", "InvalidKeyException", "{", "try", "{", "Mac", "hmac", "=", "Mac", ".", "getInstance", "(", "mode", ".", "getAlgorithmName", "(", ")", ")", ";", "hmac", ...
Returns a new Mac instance which produces message authentication codes using the given secret key and the algorithm required by the given TOTP mode. @param mode The TOTP mode which dictates the HMAC algorithm to be used. @param key The secret key to use to produce message authentication codes. @return A new Mac inst...
[ "Returns", "a", "new", "Mac", "instance", "which", "produces", "message", "authentication", "codes", "using", "the", "given", "secret", "key", "and", "the", "algorithm", "required", "by", "the", "given", "TOTP", "mode", "." ]
ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-totp/src/main/java/org/apache/guacamole/totp/TOTPGenerator.java#L298-L312
115,887
glyptodon/guacamole-client
extensions/guacamole-auth-totp/src/main/java/org/apache/guacamole/totp/TOTPGenerator.java
TOTPGenerator.getHMAC
private byte[] getHMAC(byte[] message) { try { return getMacInstance(mode, key).doFinal(message); } catch (InvalidKeyException e) { // As the key is verified during construction of the TOTPGenerator, // this should never happen throw new IllegalS...
java
private byte[] getHMAC(byte[] message) { try { return getMacInstance(mode, key).doFinal(message); } catch (InvalidKeyException e) { // As the key is verified during construction of the TOTPGenerator, // this should never happen throw new IllegalS...
[ "private", "byte", "[", "]", "getHMAC", "(", "byte", "[", "]", "message", ")", "{", "try", "{", "return", "getMacInstance", "(", "mode", ",", "key", ")", ".", "doFinal", "(", "message", ")", ";", "}", "catch", "(", "InvalidKeyException", "e", ")", "{...
Calculates the HMAC for the given message using the key and algorithm provided when this TOTPGenerator was created. @param message The message to calculate the HMAC of. @return The HMAC of the given message.
[ "Calculates", "the", "HMAC", "for", "the", "given", "message", "using", "the", "key", "and", "algorithm", "provided", "when", "this", "TOTPGenerator", "was", "created", "." ]
ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-totp/src/main/java/org/apache/guacamole/totp/TOTPGenerator.java#L324-L338
115,888
glyptodon/guacamole-client
guacamole-ext/src/main/java/org/apache/guacamole/form/TimeZoneField.java
TimeZoneField.parse
public static String parse(String timeZone) { // Return null if no time zone provided if (timeZone == null || timeZone.isEmpty()) return null; // Otherwise, assume time zone is valid return timeZone; }
java
public static String parse(String timeZone) { // Return null if no time zone provided if (timeZone == null || timeZone.isEmpty()) return null; // Otherwise, assume time zone is valid return timeZone; }
[ "public", "static", "String", "parse", "(", "String", "timeZone", ")", "{", "// Return null if no time zone provided", "if", "(", "timeZone", "==", "null", "||", "timeZone", ".", "isEmpty", "(", ")", ")", "return", "null", ";", "// Otherwise, assume time zone is val...
Parses the given string into a time zone ID string. As these strings are equivalent, the only transformation currently performed by this function is to ensure that a blank time zone string is parsed into null. @param timeZone The time zone string to parse, which may be null. @return The ID of the time zone correspond...
[ "Parses", "the", "given", "string", "into", "a", "time", "zone", "ID", "string", ".", "As", "these", "strings", "are", "equivalent", "the", "only", "transformation", "currently", "performed", "by", "this", "function", "is", "to", "ensure", "that", "a", "blan...
ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole-ext/src/main/java/org/apache/guacamole/form/TimeZoneField.java#L50-L59
115,889
glyptodon/guacamole-client
guacamole/src/main/java/org/apache/guacamole/rest/sharingprofile/SharingProfileResource.java
SharingProfileResource.getParameters
@GET @Path("parameters") public Map<String, String> getParameters() throws GuacamoleException { // Pull effective permissions Permissions effective = userContext.self().getEffectivePermissions(); // Retrieve permission sets SystemPermissionSet systemPermissions = ef...
java
@GET @Path("parameters") public Map<String, String> getParameters() throws GuacamoleException { // Pull effective permissions Permissions effective = userContext.self().getEffectivePermissions(); // Retrieve permission sets SystemPermissionSet systemPermissions = ef...
[ "@", "GET", "@", "Path", "(", "\"parameters\"", ")", "public", "Map", "<", "String", ",", "String", ">", "getParameters", "(", ")", "throws", "GuacamoleException", "{", "// Pull effective permissions", "Permissions", "effective", "=", "userContext", ".", "self", ...
Retrieves the connection parameters associated with the SharingProfile exposed by this SharingProfile resource. @return A map of parameter name/value pairs. @throws GuacamoleException If an error occurs while retrieving the connection parameters of the SharingProfile.
[ "Retrieves", "the", "connection", "parameters", "associated", "with", "the", "SharingProfile", "exposed", "by", "this", "SharingProfile", "resource", "." ]
ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/sharingprofile/SharingProfileResource.java#L101-L122
115,890
glyptodon/guacamole-client
extensions/guacamole-auth-totp/src/main/java/org/apache/guacamole/auth/totp/user/CodeUsageTrackingService.java
CodeUsageTrackingService.useCode
public boolean useCode(String username, String code) throws GuacamoleException { // Repeatedly attempt to use the given code until an explicit success // or failure has occurred UsedCode usedCode = new UsedCode(username, code); for (;;) { // Explicitly invalidat...
java
public boolean useCode(String username, String code) throws GuacamoleException { // Repeatedly attempt to use the given code until an explicit success // or failure has occurred UsedCode usedCode = new UsedCode(username, code); for (;;) { // Explicitly invalidat...
[ "public", "boolean", "useCode", "(", "String", "username", ",", "String", "code", ")", "throws", "GuacamoleException", "{", "// Repeatedly attempt to use the given code until an explicit success", "// or failure has occurred", "UsedCode", "usedCode", "=", "new", "UsedCode", "...
Attempts to mark the given code as used. The code MUST have already been validated against the user's secret key, as this function only verifies whether the code has been previously used, not whether it is actually valid. If the code has not previously been used, the code is stored as having been used by the given user...
[ "Attempts", "to", "mark", "the", "given", "code", "as", "used", ".", "The", "code", "MUST", "have", "already", "been", "validated", "against", "the", "user", "s", "secret", "key", "as", "this", "function", "only", "verifies", "whether", "the", "code", "has...
ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-totp/src/main/java/org/apache/guacamole/auth/totp/user/CodeUsageTrackingService.java#L220-L253
115,891
glyptodon/guacamole-client
guacamole-common/src/main/java/org/apache/guacamole/protocol/FailoverGuacamoleSocket.java
FailoverGuacamoleSocket.handleUpstreamErrors
private static void handleUpstreamErrors(GuacamoleInstruction instruction) throws GuacamoleUpstreamException { // Ignore error instructions which are missing the status code List<String> args = instruction.getArgs(); if (args.size() < 2) { logger.debug("Received \"error\...
java
private static void handleUpstreamErrors(GuacamoleInstruction instruction) throws GuacamoleUpstreamException { // Ignore error instructions which are missing the status code List<String> args = instruction.getArgs(); if (args.size() < 2) { logger.debug("Received \"error\...
[ "private", "static", "void", "handleUpstreamErrors", "(", "GuacamoleInstruction", "instruction", ")", "throws", "GuacamoleUpstreamException", "{", "// Ignore error instructions which are missing the status code", "List", "<", "String", ">", "args", "=", "instruction", ".", "g...
Parses the given "error" instruction, throwing an exception if the instruction represents an error from the upstream remote desktop. @param instruction The "error" instruction to parse. @throws GuacamoleUpstreamException If the "error" instruction represents an error from the upstream remote desktop.
[ "Parses", "the", "given", "error", "instruction", "throwing", "an", "exception", "if", "the", "instruction", "represents", "an", "error", "from", "the", "upstream", "remote", "desktop", "." ]
ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole-common/src/main/java/org/apache/guacamole/protocol/FailoverGuacamoleSocket.java#L80-L128
115,892
glyptodon/guacamole-client
extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/ActiveConnectionRecord.java
ActiveConnectionRecord.init
private void init(RemoteAuthenticatedUser user, ModeledConnectionGroup balancingGroup, ModeledConnection connection, ModeledSharingProfile sharingProfile) { this.user = user; this.balancingGroup = balancingGroup; this.connection = connection; this.shar...
java
private void init(RemoteAuthenticatedUser user, ModeledConnectionGroup balancingGroup, ModeledConnection connection, ModeledSharingProfile sharingProfile) { this.user = user; this.balancingGroup = balancingGroup; this.connection = connection; this.shar...
[ "private", "void", "init", "(", "RemoteAuthenticatedUser", "user", ",", "ModeledConnectionGroup", "balancingGroup", ",", "ModeledConnection", "connection", ",", "ModeledSharingProfile", "sharingProfile", ")", "{", "this", ".", "user", "=", "user", ";", "this", ".", ...
Initializes this connection record, associating it with the given user, connection, balancing connection group, and sharing profile. The given balancing connection group MUST be the connection group from which the given connection was chosen, and the given sharing profile MUST be the sharing profile that was used to sh...
[ "Initializes", "this", "connection", "record", "associating", "it", "with", "the", "given", "user", "connection", "balancing", "connection", "group", "and", "sharing", "profile", ".", "The", "given", "balancing", "connection", "group", "MUST", "be", "the", "connec...
ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/ActiveConnectionRecord.java#L138-L146
115,893
glyptodon/guacamole-client
extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/ActiveConnectionRecord.java
ActiveConnectionRecord.init
public void init(RemoteAuthenticatedUser user, ModeledConnectionGroup balancingGroup, ModeledConnection connection) { init(user, balancingGroup, connection, null); }
java
public void init(RemoteAuthenticatedUser user, ModeledConnectionGroup balancingGroup, ModeledConnection connection) { init(user, balancingGroup, connection, null); }
[ "public", "void", "init", "(", "RemoteAuthenticatedUser", "user", ",", "ModeledConnectionGroup", "balancingGroup", ",", "ModeledConnection", "connection", ")", "{", "init", "(", "user", ",", "balancingGroup", ",", "connection", ",", "null", ")", ";", "}" ]
Initializes this connection record, associating it with the given user, connection, and balancing connection group. The given balancing connection group MUST be the connection group from which the given connection was chosen. The start date of this connection record will be the time of its creation. @param user The us...
[ "Initializes", "this", "connection", "record", "associating", "it", "with", "the", "given", "user", "connection", "and", "balancing", "connection", "group", ".", "The", "given", "balancing", "connection", "group", "MUST", "be", "the", "connection", "group", "from"...
ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/ActiveConnectionRecord.java#L165-L169
115,894
glyptodon/guacamole-client
extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/ActiveConnectionRecord.java
ActiveConnectionRecord.init
public void init(RemoteAuthenticatedUser user, ActiveConnectionRecord activeConnection, ModeledSharingProfile sharingProfile) { init(user, null, activeConnection.getConnection(), sharingProfile); this.connectionID = activeConnection.getConnectionID(); }
java
public void init(RemoteAuthenticatedUser user, ActiveConnectionRecord activeConnection, ModeledSharingProfile sharingProfile) { init(user, null, activeConnection.getConnection(), sharingProfile); this.connectionID = activeConnection.getConnectionID(); }
[ "public", "void", "init", "(", "RemoteAuthenticatedUser", "user", ",", "ActiveConnectionRecord", "activeConnection", ",", "ModeledSharingProfile", "sharingProfile", ")", "{", "init", "(", "user", ",", "null", ",", "activeConnection", ".", "getConnection", "(", ")", ...
Initializes this connection record, associating it with the given user, active connection, and sharing profile. The given sharing profile MUST be the sharing profile that was used to share access to the given connection. The start date of this connection record will be the time of its creation. @param user The user th...
[ "Initializes", "this", "connection", "record", "associating", "it", "with", "the", "given", "user", "active", "connection", "and", "sharing", "profile", ".", "The", "given", "sharing", "profile", "MUST", "be", "the", "sharing", "profile", "that", "was", "used", ...
ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/ActiveConnectionRecord.java#L208-L213
115,895
glyptodon/guacamole-client
extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/ActiveConnectionRecord.java
ActiveConnectionRecord.assignGuacamoleTunnel
public GuacamoleTunnel assignGuacamoleTunnel(final GuacamoleSocket socket, String connectionID) { // Create tunnel with given socket this.tunnel = new AbstractGuacamoleTunnel() { @Override public GuacamoleSocket getSocket() { return socket; ...
java
public GuacamoleTunnel assignGuacamoleTunnel(final GuacamoleSocket socket, String connectionID) { // Create tunnel with given socket this.tunnel = new AbstractGuacamoleTunnel() { @Override public GuacamoleSocket getSocket() { return socket; ...
[ "public", "GuacamoleTunnel", "assignGuacamoleTunnel", "(", "final", "GuacamoleSocket", "socket", ",", "String", "connectionID", ")", "{", "// Create tunnel with given socket", "this", ".", "tunnel", "=", "new", "AbstractGuacamoleTunnel", "(", ")", "{", "@", "Override", ...
Associates a new GuacamoleTunnel with this connection record using the given socket. @param socket The GuacamoleSocket to use to create the tunnel associated with this connection record. @param connectionID The connection ID assigned to this connection by guacd. @return The newly-created tunnel associated with this ...
[ "Associates", "a", "new", "GuacamoleTunnel", "with", "this", "connection", "record", "using", "the", "given", "socket", "." ]
ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/ActiveConnectionRecord.java#L378-L403
115,896
glyptodon/guacamole-client
guacamole-ext/src/main/java/org/apache/guacamole/form/TimeField.java
TimeField.format
public static String format(Date time) { DateFormat timeFormat = new SimpleDateFormat(TimeField.FORMAT); return time == null ? null : timeFormat.format(time); }
java
public static String format(Date time) { DateFormat timeFormat = new SimpleDateFormat(TimeField.FORMAT); return time == null ? null : timeFormat.format(time); }
[ "public", "static", "String", "format", "(", "Date", "time", ")", "{", "DateFormat", "timeFormat", "=", "new", "SimpleDateFormat", "(", "TimeField", ".", "FORMAT", ")", ";", "return", "time", "==", "null", "?", "null", ":", "timeFormat", ".", "format", "("...
Converts the given time into a string which follows the format used by time fields. @param time The time value to format, which may be null. @return The formatted time, or null if the provided time was null.
[ "Converts", "the", "given", "time", "into", "a", "string", "which", "follows", "the", "format", "used", "by", "time", "fields", "." ]
ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole-ext/src/main/java/org/apache/guacamole/form/TimeField.java#L87-L90
115,897
glyptodon/guacamole-client
extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/usergroup/ModeledUserGroup.java
ModeledUserGroup.init
public void init(ModeledAuthenticatedUser currentUser, UserGroupModel model, boolean exposeRestrictedAttributes) { super.init(currentUser, model); this.exposeRestrictedAttributes = exposeRestrictedAttributes; }
java
public void init(ModeledAuthenticatedUser currentUser, UserGroupModel model, boolean exposeRestrictedAttributes) { super.init(currentUser, model); this.exposeRestrictedAttributes = exposeRestrictedAttributes; }
[ "public", "void", "init", "(", "ModeledAuthenticatedUser", "currentUser", ",", "UserGroupModel", "model", ",", "boolean", "exposeRestrictedAttributes", ")", "{", "super", ".", "init", "(", "currentUser", ",", "model", ")", ";", "this", ".", "exposeRestrictedAttribut...
Initializes this ModeledUserGroup, associating it with the current authenticated user and populating it with data from the given user group model. @param currentUser The user that created or retrieved this object. @param model The backing model object. @param exposeRestrictedAttributes Whether attributes which contr...
[ "Initializes", "this", "ModeledUserGroup", "associating", "it", "with", "the", "current", "authenticated", "user", "and", "populating", "it", "with", "data", "from", "the", "given", "user", "group", "model", "." ]
ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/usergroup/ModeledUserGroup.java#L119-L123
115,898
glyptodon/guacamole-client
extensions/guacamole-auth-duo/src/main/java/org/apache/guacamole/auth/duo/api/DuoService.java
DuoService.createSignedRequest
public String createSignedRequest(AuthenticatedUser authenticatedUser) throws GuacamoleException { // Generate a cookie associating the username with the integration key DuoCookie cookie = new DuoCookie(authenticatedUser.getIdentifier(), confService.getIntegrationKey(), ...
java
public String createSignedRequest(AuthenticatedUser authenticatedUser) throws GuacamoleException { // Generate a cookie associating the username with the integration key DuoCookie cookie = new DuoCookie(authenticatedUser.getIdentifier(), confService.getIntegrationKey(), ...
[ "public", "String", "createSignedRequest", "(", "AuthenticatedUser", "authenticatedUser", ")", "throws", "GuacamoleException", "{", "// Generate a cookie associating the username with the integration key", "DuoCookie", "cookie", "=", "new", "DuoCookie", "(", "authenticatedUser", ...
Creates and signs a new request to verify the identity of the given user. This request may ultimately be sent to Duo, resulting in a signed response from Duo if that verification succeeds. @param authenticatedUser The user whose identity should be verified. @return A signed user verification request which can be sent...
[ "Creates", "and", "signs", "a", "new", "request", "to", "verify", "the", "identity", "of", "the", "given", "user", ".", "This", "request", "may", "ultimately", "be", "sent", "to", "Duo", "resulting", "in", "a", "signed", "response", "from", "Duo", "if", ...
ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-duo/src/main/java/org/apache/guacamole/auth/duo/api/DuoService.java#L87-L109
115,899
glyptodon/guacamole-client
guacamole/src/main/java/org/apache/guacamole/rest/RESTExceptionMapper.java
RESTExceptionMapper.getAuthenticationToken
private String getAuthenticationToken() { String token = request.getParameter("token"); if (token != null && !token.isEmpty()) return token; return null; }
java
private String getAuthenticationToken() { String token = request.getParameter("token"); if (token != null && !token.isEmpty()) return token; return null; }
[ "private", "String", "getAuthenticationToken", "(", ")", "{", "String", "token", "=", "request", ".", "getParameter", "(", "\"token\"", ")", ";", "if", "(", "token", "!=", "null", "&&", "!", "token", ".", "isEmpty", "(", ")", ")", "return", "token", ";",...
Returns the authentication token that is in use in the current session, if present, or null if otherwise. @return The authentication token for the current session, or null if no token is present.
[ "Returns", "the", "authentication", "token", "that", "is", "in", "use", "in", "the", "current", "session", "if", "present", "or", "null", "if", "otherwise", "." ]
ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/RESTExceptionMapper.java#L72-L80