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 | partition stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/PositionManager.java | PositionManager.adjustPositionSet | static void adjustPositionSet(
List<NodeInfo> order, Element positionSet, IntegrationResult result) {
Node nodeToMatch = positionSet.getFirstChild();
Element nodeToInsertBefore = positionSet.getOwnerDocument().createElement("INSERT_POINT");
positionSet.insertBefore(nodeToInsertBefore... | java | static void adjustPositionSet(
List<NodeInfo> order, Element positionSet, IntegrationResult result) {
Node nodeToMatch = positionSet.getFirstChild();
Element nodeToInsertBefore = positionSet.getOwnerDocument().createElement("INSERT_POINT");
positionSet.insertBefore(nodeToInsertBefore... | [
"static",
"void",
"adjustPositionSet",
"(",
"List",
"<",
"NodeInfo",
">",
"order",
",",
"Element",
"positionSet",
",",
"IntegrationResult",
"result",
")",
"{",
"Node",
"nodeToMatch",
"=",
"positionSet",
".",
"getFirstChild",
"(",
")",
";",
"Element",
"nodeToInse... | This method trims down the position set to the position directives on the node info elements
still having a position directive. Any directives that violated restrictions were removed
from the node info objects so the position set should be made to match the order of those
still having one. | [
"This",
"method",
"trims",
"down",
"the",
"position",
"set",
"to",
"the",
"position",
"directives",
"on",
"the",
"node",
"info",
"elements",
"still",
"having",
"a",
"position",
"directive",
".",
"Any",
"directives",
"that",
"violated",
"restrictions",
"were",
... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/PositionManager.java#L158-L202 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/PositionManager.java | PositionManager.hasAffectOnCVP | static boolean hasAffectOnCVP(List<NodeInfo> order, Element compViewParent) {
if (order.size() == 0) return false;
int idx = 0;
Element child = (Element) compViewParent.getFirstChild();
NodeInfo ni = order.get(idx);
if (child == null && ni != null) // most likely nodes to be pu... | java | static boolean hasAffectOnCVP(List<NodeInfo> order, Element compViewParent) {
if (order.size() == 0) return false;
int idx = 0;
Element child = (Element) compViewParent.getFirstChild();
NodeInfo ni = order.get(idx);
if (child == null && ni != null) // most likely nodes to be pu... | [
"static",
"boolean",
"hasAffectOnCVP",
"(",
"List",
"<",
"NodeInfo",
">",
"order",
",",
"Element",
"compViewParent",
")",
"{",
"if",
"(",
"order",
".",
"size",
"(",
")",
"==",
"0",
")",
"return",
"false",
";",
"int",
"idx",
"=",
"0",
";",
"Element",
... | This method compares the children by id in the order list with the order in the
compViewParent's ui visible children and returns true if the ordering differs indicating that
the positioning if needed. | [
"This",
"method",
"compares",
"the",
"children",
"by",
"id",
"in",
"the",
"order",
"list",
"with",
"the",
"order",
"in",
"the",
"compViewParent",
"s",
"ui",
"visible",
"children",
"and",
"returns",
"true",
"if",
"the",
"ordering",
"differs",
"indicating",
"t... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/PositionManager.java#L209-L235 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/PositionManager.java | PositionManager.applyToNodes | static void applyToNodes(List<NodeInfo> order, Element compViewParent) {
// first set up a bogus node to assist with inserting
Node insertPoint = compViewParent.getOwnerDocument().createElement("bogus");
Node first = compViewParent.getFirstChild();
if (first != null) compViewParent.inse... | java | static void applyToNodes(List<NodeInfo> order, Element compViewParent) {
// first set up a bogus node to assist with inserting
Node insertPoint = compViewParent.getOwnerDocument().createElement("bogus");
Node first = compViewParent.getFirstChild();
if (first != null) compViewParent.inse... | [
"static",
"void",
"applyToNodes",
"(",
"List",
"<",
"NodeInfo",
">",
"order",
",",
"Element",
"compViewParent",
")",
"{",
"// first set up a bogus node to assist with inserting",
"Node",
"insertPoint",
"=",
"compViewParent",
".",
"getOwnerDocument",
"(",
")",
".",
"cr... | This method applies the ordering specified in the passed in order list to the child nodes of
the compViewParent. Nodes specified in the list but located elsewhere are pulled in. | [
"This",
"method",
"applies",
"the",
"ordering",
"specified",
"in",
"the",
"passed",
"in",
"order",
"list",
"to",
"the",
"child",
"nodes",
"of",
"the",
"compViewParent",
".",
"Nodes",
"specified",
"in",
"the",
"list",
"but",
"located",
"elsewhere",
"are",
"pu... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/PositionManager.java#L241-L254 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/PositionManager.java | PositionManager.applyNoHopping | static void applyNoHopping(List<NodeInfo> order) {
if (isIllegalHoppingSpecified(order) == true) {
ArrayList<NodeInfo> cvpNodeInfos = new ArrayList<>();
// pull those out of the position list from the CVP
for (int i = order.size() - 1; i >= 0; i--)
if (order.... | java | static void applyNoHopping(List<NodeInfo> order) {
if (isIllegalHoppingSpecified(order) == true) {
ArrayList<NodeInfo> cvpNodeInfos = new ArrayList<>();
// pull those out of the position list from the CVP
for (int i = order.size() - 1; i >= 0; i--)
if (order.... | [
"static",
"void",
"applyNoHopping",
"(",
"List",
"<",
"NodeInfo",
">",
"order",
")",
"{",
"if",
"(",
"isIllegalHoppingSpecified",
"(",
"order",
")",
"==",
"true",
")",
"{",
"ArrayList",
"<",
"NodeInfo",
">",
"cvpNodeInfos",
"=",
"new",
"ArrayList",
"<>",
"... | This method is responsible for preventing nodes with identical precedence in the same parent
from hopping over each other so that a layout fragment can lock two tabs that are next to
each other and they can only be separated by tabs with higher precedence.
<p>If this situation is detected then the positioning of all n... | [
"This",
"method",
"is",
"responsible",
"for",
"preventing",
"nodes",
"with",
"identical",
"precedence",
"in",
"the",
"same",
"parent",
"from",
"hopping",
"over",
"each",
"other",
"so",
"that",
"a",
"layout",
"fragment",
"can",
"lock",
"two",
"tabs",
"that",
... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/PositionManager.java#L285-L301 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/PositionManager.java | PositionManager.isIllegalHoppingSpecified | static boolean isIllegalHoppingSpecified(List<NodeInfo> order) {
for (int i = 0; i < order.size(); i++) {
NodeInfo ni = (NodeInfo) order.get(i);
// look for move restricted nodes
if (!ni.getNode().getAttribute(Constants.ATT_MOVE_ALLOWED).equals("false")) continue;
... | java | static boolean isIllegalHoppingSpecified(List<NodeInfo> order) {
for (int i = 0; i < order.size(); i++) {
NodeInfo ni = (NodeInfo) order.get(i);
// look for move restricted nodes
if (!ni.getNode().getAttribute(Constants.ATT_MOVE_ALLOWED).equals("false")) continue;
... | [
"static",
"boolean",
"isIllegalHoppingSpecified",
"(",
"List",
"<",
"NodeInfo",
">",
"order",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"order",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"NodeInfo",
"ni",
"=",
"(",
"NodeInfo... | This method determines if any illegal hopping is being specified. To determine if the
positioning is specifying an ordering that will result in hopping I need to determine for
each node n in the list if any of the nodes to be positioned to its right currently lie to
its left in the CVP and have moveAllowed="false" and ... | [
"This",
"method",
"determines",
"if",
"any",
"illegal",
"hopping",
"is",
"being",
"specified",
".",
"To",
"determine",
"if",
"the",
"positioning",
"is",
"specifying",
"an",
"ordering",
"that",
"will",
"result",
"in",
"hopping",
"I",
"need",
"to",
"determine",
... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/PositionManager.java#L311-L350 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/PositionManager.java | PositionManager.applyOrdering | static void applyOrdering(
List<NodeInfo> order,
Element compViewParent,
Element positionSet,
NodeInfoTracker tracker) {
// first pull out all visible channel or visible folder children and
// put their id's in a list of available children and record thei... | java | static void applyOrdering(
List<NodeInfo> order,
Element compViewParent,
Element positionSet,
NodeInfoTracker tracker) {
// first pull out all visible channel or visible folder children and
// put their id's in a list of available children and record thei... | [
"static",
"void",
"applyOrdering",
"(",
"List",
"<",
"NodeInfo",
">",
"order",
",",
"Element",
"compViewParent",
",",
"Element",
"positionSet",
",",
"NodeInfoTracker",
"tracker",
")",
"{",
"// first pull out all visible channel or visible folder children and",
"// put their... | This method assembles in the passed in order object a list of NodeInfo objects ordered first
by those specified in the position set and whose nodes still exist in the composite view and
then by any remaining children in the compViewParent. | [
"This",
"method",
"assembles",
"in",
"the",
"passed",
"in",
"order",
"object",
"a",
"list",
"of",
"NodeInfo",
"objects",
"ordered",
"first",
"by",
"those",
"specified",
"in",
"the",
"position",
"set",
"and",
"whose",
"nodes",
"still",
"exist",
"in",
"the",
... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/PositionManager.java#L517-L594 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/PositionManager.java | PositionManager.updatePositionSet | public static void updatePositionSet(Element compViewParent, Element plfParent, IPerson person)
throws PortalException {
if (LOG.isDebugEnabled()) LOG.debug("Updating Position Set");
if (compViewParent.getChildNodes().getLength() == 0) {
// no nodes to position. if set exists re... | java | public static void updatePositionSet(Element compViewParent, Element plfParent, IPerson person)
throws PortalException {
if (LOG.isDebugEnabled()) LOG.debug("Updating Position Set");
if (compViewParent.getChildNodes().getLength() == 0) {
// no nodes to position. if set exists re... | [
"public",
"static",
"void",
"updatePositionSet",
"(",
"Element",
"compViewParent",
",",
"Element",
"plfParent",
",",
"IPerson",
"person",
")",
"throws",
"PortalException",
"{",
"if",
"(",
"LOG",
".",
"isDebugEnabled",
"(",
")",
")",
"LOG",
".",
"debug",
"(",
... | This method updates the positions recorded in a position set to reflect the ids of the nodes
in the composite view of the layout. Any position nodes already in existence are reused to
reduce database interaction needed to generate a new ID attribute. If any are left over after
updating those position elements are remov... | [
"This",
"method",
"updates",
"the",
"positions",
"recorded",
"in",
"a",
"position",
"set",
"to",
"reflect",
"the",
"ids",
"of",
"the",
"nodes",
"in",
"the",
"composite",
"view",
"of",
"the",
"layout",
".",
"Any",
"position",
"nodes",
"already",
"in",
"exis... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/PositionManager.java#L604-L650 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/PositionManager.java | PositionManager.getPositionSet | private static Element getPositionSet(Element plfParent, IPerson person, boolean create)
throws PortalException {
Node child = plfParent.getFirstChild();
while (child != null) {
if (child.getNodeName().equals(Constants.ELM_POSITION_SET)) return (Element) child;
child... | java | private static Element getPositionSet(Element plfParent, IPerson person, boolean create)
throws PortalException {
Node child = plfParent.getFirstChild();
while (child != null) {
if (child.getNodeName().equals(Constants.ELM_POSITION_SET)) return (Element) child;
child... | [
"private",
"static",
"Element",
"getPositionSet",
"(",
"Element",
"plfParent",
",",
"IPerson",
"person",
",",
"boolean",
"create",
")",
"throws",
"PortalException",
"{",
"Node",
"child",
"=",
"plfParent",
".",
"getFirstChild",
"(",
")",
";",
"while",
"(",
"chi... | This method locates the position set element in the child list of the passed in plfParent or
if not found it will create one automatically and return it if the passed in create flag is
true. | [
"This",
"method",
"locates",
"the",
"position",
"set",
"element",
"in",
"the",
"child",
"list",
"of",
"the",
"passed",
"in",
"plfParent",
"or",
"if",
"not",
"found",
"it",
"will",
"create",
"one",
"automatically",
"and",
"return",
"it",
"if",
"the",
"passe... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/PositionManager.java#L657-L685 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/PositionManager.java | PositionManager.createAndAppendPosition | private static Element createAndAppendPosition(
String elementID, Element positions, IPerson person) throws PortalException {
if (LOG.isDebugEnabled()) LOG.debug("Adding Position Set entry " + elementID + ".");
String ID = null;
try {
ID = getDLS().getNextStructDirectiv... | java | private static Element createAndAppendPosition(
String elementID, Element positions, IPerson person) throws PortalException {
if (LOG.isDebugEnabled()) LOG.debug("Adding Position Set entry " + elementID + ".");
String ID = null;
try {
ID = getDLS().getNextStructDirectiv... | [
"private",
"static",
"Element",
"createAndAppendPosition",
"(",
"String",
"elementID",
",",
"Element",
"positions",
",",
"IPerson",
"person",
")",
"throws",
"PortalException",
"{",
"if",
"(",
"LOG",
".",
"isDebugEnabled",
"(",
")",
")",
"LOG",
".",
"debug",
"(... | Create, append to the passed in position set, and return a position element that references
the passed in elementID. | [
"Create",
"append",
"to",
"the",
"passed",
"in",
"position",
"set",
"and",
"return",
"a",
"position",
"element",
"that",
"references",
"the",
"passed",
"in",
"elementID",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/PositionManager.java#L691-L714 | train |
Jasig/uPortal | uPortal-tools/src/main/java/org/apereo/portal/shell/PortalShellBuildHelperImpl.java | PortalShellBuildHelperImpl.updateScript | private void updateScript(
String target, String databaseQualifier, String outputFile, boolean runIt) {
final ISchemaExport schemaExportBean = this.getSchemaExport(databaseQualifier);
if (schemaExportBean == null) {
throw new RuntimeException(
target + " could... | java | private void updateScript(
String target, String databaseQualifier, String outputFile, boolean runIt) {
final ISchemaExport schemaExportBean = this.getSchemaExport(databaseQualifier);
if (schemaExportBean == null) {
throw new RuntimeException(
target + " could... | [
"private",
"void",
"updateScript",
"(",
"String",
"target",
",",
"String",
"databaseQualifier",
",",
"String",
"outputFile",
",",
"boolean",
"runIt",
")",
"{",
"final",
"ISchemaExport",
"schemaExportBean",
"=",
"this",
".",
"getSchemaExport",
"(",
"databaseQualifier... | This runs a database update or just generates the script
@param target the database to target
@param databaseQualifier The Spring database qualifier
@param outputFile The output file to utilize to generate the scripts
@param runIt Do you want to run it, or just generate the script? | [
"This",
"runs",
"a",
"database",
"update",
"or",
"just",
"generates",
"the",
"script"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-tools/src/main/java/org/apereo/portal/shell/PortalShellBuildHelperImpl.java#L189-L208 | train |
Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/account/EmailPasswordResetNotificationImpl.java | EmailPasswordResetNotificationImpl.formatBody | private String formatBody(URL resetUrl, ILocalAccountPerson account, Locale locale) {
final STGroup group = new STGroupDir(templateDir, '$', '$');
final ST template = group.getInstanceOf(templateName);
String name = findDisplayNameFromLocalAccountPerson(account);
template.add("displayNa... | java | private String formatBody(URL resetUrl, ILocalAccountPerson account, Locale locale) {
final STGroup group = new STGroupDir(templateDir, '$', '$');
final ST template = group.getInstanceOf(templateName);
String name = findDisplayNameFromLocalAccountPerson(account);
template.add("displayNa... | [
"private",
"String",
"formatBody",
"(",
"URL",
"resetUrl",
",",
"ILocalAccountPerson",
"account",
",",
"Locale",
"locale",
")",
"{",
"final",
"STGroup",
"group",
"=",
"new",
"STGroupDir",
"(",
"templateDir",
",",
"'",
"'",
",",
"'",
"'",
")",
";",
"final",... | Get the body content of the email.
@param resetUrl the password reset URL
@param account the user account that has had its password reset
@param locale the locale of the user who reset the password
@return The message body as a string. | [
"Get",
"the",
"body",
"content",
"of",
"the",
"email",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/account/EmailPasswordResetNotificationImpl.java#L119-L128 | train |
Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/account/EmailPasswordResetNotificationImpl.java | EmailPasswordResetNotificationImpl.findDisplayNameFromLocalAccountPerson | protected String findDisplayNameFromLocalAccountPerson(ILocalAccountPerson person) {
Object name = person.getAttributeValue(ILocalAccountPerson.ATTR_DISPLAY_NAME);
if ((name instanceof String) && !StringUtils.isEmpty((String) name)) {
return (String) name;
}
// if display na... | java | protected String findDisplayNameFromLocalAccountPerson(ILocalAccountPerson person) {
Object name = person.getAttributeValue(ILocalAccountPerson.ATTR_DISPLAY_NAME);
if ((name instanceof String) && !StringUtils.isEmpty((String) name)) {
return (String) name;
}
// if display na... | [
"protected",
"String",
"findDisplayNameFromLocalAccountPerson",
"(",
"ILocalAccountPerson",
"person",
")",
"{",
"Object",
"name",
"=",
"person",
".",
"getAttributeValue",
"(",
"ILocalAccountPerson",
".",
"ATTR_DISPLAY_NAME",
")",
";",
"if",
"(",
"(",
"name",
"instance... | Determine the name to use in the password reset email that identifies the users whose
password has been reset.
@param person the account that has had its password reset
@return the account holders name | [
"Determine",
"the",
"name",
"to",
"use",
"in",
"the",
"password",
"reset",
"email",
"that",
"identifies",
"the",
"users",
"whose",
"password",
"has",
"been",
"reset",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/account/EmailPasswordResetNotificationImpl.java#L137-L145 | train |
Jasig/uPortal | uPortal-events/src/main/java/org/apereo/portal/events/aggr/PortalEventDimensionPopulatorImpl.java | PortalEventDimensionPopulatorImpl.doPopulateTimeDimensions | final void doPopulateTimeDimensions() {
final List<TimeDimension> timeDimensions = this.timeDimensionDao.getTimeDimensions();
if (timeDimensions.isEmpty()) {
logger.info("No TimeDimensions exist, creating them");
} else if (timeDimensions.size() != (24 * 60)) {
this.logge... | java | final void doPopulateTimeDimensions() {
final List<TimeDimension> timeDimensions = this.timeDimensionDao.getTimeDimensions();
if (timeDimensions.isEmpty()) {
logger.info("No TimeDimensions exist, creating them");
} else if (timeDimensions.size() != (24 * 60)) {
this.logge... | [
"final",
"void",
"doPopulateTimeDimensions",
"(",
")",
"{",
"final",
"List",
"<",
"TimeDimension",
">",
"timeDimensions",
"=",
"this",
".",
"timeDimensionDao",
".",
"getTimeDimensions",
"(",
")",
";",
"if",
"(",
"timeDimensions",
".",
"isEmpty",
"(",
")",
")",... | Populate the time dimensions | [
"Populate",
"the",
"time",
"dimensions"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-events/src/main/java/org/apereo/portal/events/aggr/PortalEventDimensionPopulatorImpl.java#L139-L186 | train |
Jasig/uPortal | uPortal-events/src/main/java/org/apereo/portal/events/aggr/PortalEventDimensionPopulatorImpl.java | PortalEventDimensionPopulatorImpl.createDateDimension | protected void createDateDimension(
List<QuarterDetail> quartersDetails,
List<AcademicTermDetail> academicTermDetails,
DateMidnight date) {
final QuarterDetail quarterDetail =
EventDateTimeUtils.findDateRangeSorted(date, quartersDetails);
final Academ... | java | protected void createDateDimension(
List<QuarterDetail> quartersDetails,
List<AcademicTermDetail> academicTermDetails,
DateMidnight date) {
final QuarterDetail quarterDetail =
EventDateTimeUtils.findDateRangeSorted(date, quartersDetails);
final Academ... | [
"protected",
"void",
"createDateDimension",
"(",
"List",
"<",
"QuarterDetail",
">",
"quartersDetails",
",",
"List",
"<",
"AcademicTermDetail",
">",
"academicTermDetails",
",",
"DateMidnight",
"date",
")",
"{",
"final",
"QuarterDetail",
"quarterDetail",
"=",
"EventDate... | Creates a date dimension, handling the quarter and term lookup logic | [
"Creates",
"a",
"date",
"dimension",
"handling",
"the",
"quarter",
"and",
"term",
"lookup",
"logic"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-events/src/main/java/org/apereo/portal/events/aggr/PortalEventDimensionPopulatorImpl.java#L288-L301 | train |
Jasig/uPortal | uPortal-rendering/src/main/java/org/apereo/portal/portlet/PortletUtils.java | PortletUtils.getStringFromPortletUrl | public static String getStringFromPortletUrl(
PortletUrl portletUrl, HttpServletRequest request) {
if (portletUrl == null) {
return null;
}
// Default urlType
UrlType urlType = UrlType.RENDER;
final PortletUrlType type = portletUrl.getType();
switc... | java | public static String getStringFromPortletUrl(
PortletUrl portletUrl, HttpServletRequest request) {
if (portletUrl == null) {
return null;
}
// Default urlType
UrlType urlType = UrlType.RENDER;
final PortletUrlType type = portletUrl.getType();
switc... | [
"public",
"static",
"String",
"getStringFromPortletUrl",
"(",
"PortletUrl",
"portletUrl",
",",
"HttpServletRequest",
"request",
")",
"{",
"if",
"(",
"portletUrl",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"// Default urlType",
"UrlType",
"urlType",
"=",
... | A static EL function that is defined in portletUrl.tld Takes a portletUrl object and coverts
it into an actual Url Example is in search, returns a marketplace entry Url
@param portletUrl
@param request
@return the Url represented by portletUrl | [
"A",
"static",
"EL",
"function",
"that",
"is",
"defined",
"in",
"portletUrl",
".",
"tld",
"Takes",
"a",
"portletUrl",
"object",
"and",
"coverts",
"it",
"into",
"an",
"actual",
"Url",
"Example",
"is",
"in",
"search",
"returns",
"a",
"marketplace",
"entry",
... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-rendering/src/main/java/org/apereo/portal/portlet/PortletUtils.java#L130-L173 | train |
Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/portletadmin/PortletDefinitionForm.java | PortletDefinitionForm.setChannelPublishingDefinition | public void setChannelPublishingDefinition(PortletPublishingDefinition cpd) {
// Set appName/portletName if a descriptor is present. If a framework
// portlet, the applicationId is /uPortal.
if (cpd.getPortletDescriptor() != null) {
final PortletDescriptor pDesc = cpd.getPortletDes... | java | public void setChannelPublishingDefinition(PortletPublishingDefinition cpd) {
// Set appName/portletName if a descriptor is present. If a framework
// portlet, the applicationId is /uPortal.
if (cpd.getPortletDescriptor() != null) {
final PortletDescriptor pDesc = cpd.getPortletDes... | [
"public",
"void",
"setChannelPublishingDefinition",
"(",
"PortletPublishingDefinition",
"cpd",
")",
"{",
"// Set appName/portletName if a descriptor is present. If a framework",
"// portlet, the applicationId is /uPortal.",
"if",
"(",
"cpd",
".",
"getPortletDescriptor",
"(",
")",
... | Sets the Java class name and parameter defaults based on the PortletPublishingDefinition. | [
"Sets",
"the",
"Java",
"class",
"name",
"and",
"parameter",
"defaults",
"based",
"on",
"the",
"PortletPublishingDefinition",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/portletadmin/PortletDefinitionForm.java#L201-L277 | train |
Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/portletadmin/PortletDefinitionForm.java | PortletDefinitionForm.initPermissionsForPrincipal | private void initPermissionsForPrincipal(JsonEntityBean principal) {
permissions.add(
principal.getTypeAndIdHash()
+ "_"
+ PortletAdministrationHelper.PortletPermissionsOnForm.BROWSE
.getActivity());
permissi... | java | private void initPermissionsForPrincipal(JsonEntityBean principal) {
permissions.add(
principal.getTypeAndIdHash()
+ "_"
+ PortletAdministrationHelper.PortletPermissionsOnForm.BROWSE
.getActivity());
permissi... | [
"private",
"void",
"initPermissionsForPrincipal",
"(",
"JsonEntityBean",
"principal",
")",
"{",
"permissions",
".",
"add",
"(",
"principal",
".",
"getTypeAndIdHash",
"(",
")",
"+",
"\"_\"",
"+",
"PortletAdministrationHelper",
".",
"PortletPermissionsOnForm",
".",
"BRO... | Sets the default collection of permissions for newly-added principals. They are BROWSE and
SUBSCRIBE.
@since 5.0 | [
"Sets",
"the",
"default",
"collection",
"of",
"permissions",
"for",
"newly",
"-",
"added",
"principals",
".",
"They",
"are",
"BROWSE",
"and",
"SUBSCRIBE",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/portletadmin/PortletDefinitionForm.java#L506-L517 | train |
Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/portletadmin/PortletDefinitionForm.java | PortletDefinitionForm.setExpirationDateString | public void setExpirationDateString(String date) throws ParseException {
if (StringUtils.isBlank(date)) {
expirationDate = null;
return;
}
expirationDate = dateFormat.parse(date);
} | java | public void setExpirationDateString(String date) throws ParseException {
if (StringUtils.isBlank(date)) {
expirationDate = null;
return;
}
expirationDate = dateFormat.parse(date);
} | [
"public",
"void",
"setExpirationDateString",
"(",
"String",
"date",
")",
"throws",
"ParseException",
"{",
"if",
"(",
"StringUtils",
".",
"isBlank",
"(",
"date",
")",
")",
"{",
"expirationDate",
"=",
"null",
";",
"return",
";",
"}",
"expirationDate",
"=",
"da... | Set the expiration date as a string.
@param date the date string
@throws ParseException if the string cannot be parsed | [
"Set",
"the",
"expiration",
"date",
"as",
"a",
"string",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/portletadmin/PortletDefinitionForm.java#L658-L665 | train |
Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/portletadmin/PortletDefinitionForm.java | PortletDefinitionForm.setPublishDateString | public void setPublishDateString(String date) throws ParseException {
if (StringUtils.isBlank(date)) {
publishDate = null;
return;
}
publishDate = dateFormat.parse(date);
} | java | public void setPublishDateString(String date) throws ParseException {
if (StringUtils.isBlank(date)) {
publishDate = null;
return;
}
publishDate = dateFormat.parse(date);
} | [
"public",
"void",
"setPublishDateString",
"(",
"String",
"date",
")",
"throws",
"ParseException",
"{",
"if",
"(",
"StringUtils",
".",
"isBlank",
"(",
"date",
")",
")",
"{",
"publishDate",
"=",
"null",
";",
"return",
";",
"}",
"publishDate",
"=",
"dateFormat"... | Set the publish date as a string. This is just a webflow workaround.
@param date the date string
@throws ParseException if the date cannot be parsed | [
"Set",
"the",
"publish",
"date",
"as",
"a",
"string",
".",
"This",
"is",
"just",
"a",
"webflow",
"workaround",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/portletadmin/PortletDefinitionForm.java#L701-L708 | train |
Jasig/uPortal | uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/EntityGroupImpl.java | EntityGroupImpl.setServiceName | public void setServiceName(Name newServiceName) throws GroupsException {
try {
getCompositeEntityIdentifier().setServiceName(newServiceName);
} catch (javax.naming.InvalidNameException ine) {
throw new GroupsException("Problem setting service name", ine);
}
} | java | public void setServiceName(Name newServiceName) throws GroupsException {
try {
getCompositeEntityIdentifier().setServiceName(newServiceName);
} catch (javax.naming.InvalidNameException ine) {
throw new GroupsException("Problem setting service name", ine);
}
} | [
"public",
"void",
"setServiceName",
"(",
"Name",
"newServiceName",
")",
"throws",
"GroupsException",
"{",
"try",
"{",
"getCompositeEntityIdentifier",
"(",
")",
".",
"setServiceName",
"(",
"newServiceName",
")",
";",
"}",
"catch",
"(",
"javax",
".",
"naming",
"."... | Sets the service Name of the group service of origin. | [
"Sets",
"the",
"service",
"Name",
"of",
"the",
"group",
"service",
"of",
"origin",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/EntityGroupImpl.java#L498-L504 | train |
Jasig/uPortal | uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/EntityGroupImpl.java | EntityGroupImpl.updateMembers | @Override
public void updateMembers() throws GroupsException {
// Track objects to invalidate
Set<IGroupMember> invalidate = new HashSet<>();
invalidate.addAll(getAddedMembers().values());
invalidate.addAll(getRemovedMembers().values());
getLocalGroupService().updateGroupMe... | java | @Override
public void updateMembers() throws GroupsException {
// Track objects to invalidate
Set<IGroupMember> invalidate = new HashSet<>();
invalidate.addAll(getAddedMembers().values());
invalidate.addAll(getRemovedMembers().values());
getLocalGroupService().updateGroupMe... | [
"@",
"Override",
"public",
"void",
"updateMembers",
"(",
")",
"throws",
"GroupsException",
"{",
"// Track objects to invalidate",
"Set",
"<",
"IGroupMember",
">",
"invalidate",
"=",
"new",
"HashSet",
"<>",
"(",
")",
";",
"invalidate",
".",
"addAll",
"(",
"getAdd... | Delegate to the factory. | [
"Delegate",
"to",
"the",
"factory",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/EntityGroupImpl.java#L521-L534 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/xml/stream/XMLStreamConstantsUtils.java | XMLStreamConstantsUtils.getEventName | public static String getEventName(int eventId) {
switch (eventId) {
case XMLStreamConstants.START_ELEMENT:
return "StartElementEvent";
case XMLStreamConstants.END_ELEMENT:
return "EndElementEvent";
case XMLStreamConstants.PROCESSING_INSTRUCTION... | java | public static String getEventName(int eventId) {
switch (eventId) {
case XMLStreamConstants.START_ELEMENT:
return "StartElementEvent";
case XMLStreamConstants.END_ELEMENT:
return "EndElementEvent";
case XMLStreamConstants.PROCESSING_INSTRUCTION... | [
"public",
"static",
"String",
"getEventName",
"(",
"int",
"eventId",
")",
"{",
"switch",
"(",
"eventId",
")",
"{",
"case",
"XMLStreamConstants",
".",
"START_ELEMENT",
":",
"return",
"\"StartElementEvent\"",
";",
"case",
"XMLStreamConstants",
".",
"END_ELEMENT",
":... | Get the human readable event name for the numeric event id | [
"Get",
"the",
"human",
"readable",
"event",
"name",
"for",
"the",
"numeric",
"event",
"id"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/xml/stream/XMLStreamConstantsUtils.java#L22-L48 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/providers/GroupMembershipEvaluatorFactory.java | GroupMembershipEvaluatorFactory.getAttributeEvaluator | @Override
public Evaluator getAttributeEvaluator(String name, String mode, String value) {
return new GroupMembershipEvaluator(mode, name);
} | java | @Override
public Evaluator getAttributeEvaluator(String name, String mode, String value) {
return new GroupMembershipEvaluator(mode, name);
} | [
"@",
"Override",
"public",
"Evaluator",
"getAttributeEvaluator",
"(",
"String",
"name",
",",
"String",
"mode",
",",
"String",
"value",
")",
"{",
"return",
"new",
"GroupMembershipEvaluator",
"(",
"mode",
",",
"name",
")",
";",
"}"
] | Returns an instance of an evaluator specific to this factory and the passed in values. Name
should be a well known group name. Case is important. The mode should be "memberOf" for now.
Other modes may be added in the future like, "deepMemberOf". | [
"Returns",
"an",
"instance",
"of",
"an",
"evaluator",
"specific",
"to",
"this",
"factory",
"and",
"the",
"passed",
"in",
"values",
".",
"Name",
"should",
"be",
"a",
"well",
"known",
"group",
"name",
".",
"Case",
"is",
"important",
".",
"The",
"mode",
"sh... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/providers/GroupMembershipEvaluatorFactory.java#L56-L59 | train |
Jasig/uPortal | uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/lookup/PersonLookupHelperImpl.java | PersonLookupHelperImpl.getVisiblePersons | private List<IPersonAttributes> getVisiblePersons(
final IAuthorizationPrincipal principal,
final Set<String> permittedAttributes,
List<IPersonAttributes> peopleList) {
List<Future<IPersonAttributes>> futures = new ArrayList<>();
List<IPersonAttributes> list = new Arr... | java | private List<IPersonAttributes> getVisiblePersons(
final IAuthorizationPrincipal principal,
final Set<String> permittedAttributes,
List<IPersonAttributes> peopleList) {
List<Future<IPersonAttributes>> futures = new ArrayList<>();
List<IPersonAttributes> list = new Arr... | [
"private",
"List",
"<",
"IPersonAttributes",
">",
"getVisiblePersons",
"(",
"final",
"IAuthorizationPrincipal",
"principal",
",",
"final",
"Set",
"<",
"String",
">",
"permittedAttributes",
",",
"List",
"<",
"IPersonAttributes",
">",
"peopleList",
")",
"{",
"List",
... | Returns a list of the personAttributes that this principal has permission to view. This
implementation does the check on the list items in parallel because personDirectory is
consulted for non-admin principals to get the person attributes which is really slow if done
on N entries in parallel because personDirectory oft... | [
"Returns",
"a",
"list",
"of",
"the",
"personAttributes",
"that",
"this",
"principal",
"has",
"permission",
"to",
"view",
".",
"This",
"implementation",
"does",
"the",
"check",
"on",
"the",
"list",
"items",
"in",
"parallel",
"because",
"personDirectory",
"is",
... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/lookup/PersonLookupHelperImpl.java#L285-L325 | train |
Jasig/uPortal | uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/lookup/PersonLookupHelperImpl.java | PersonLookupHelperImpl.allListItemsHaveDisplayName | private boolean allListItemsHaveDisplayName(List<IPersonAttributes> people) {
for (IPersonAttributes person : people) {
if (person.getAttributeValue("displayName") == null) {
return false;
}
}
return true;
} | java | private boolean allListItemsHaveDisplayName(List<IPersonAttributes> people) {
for (IPersonAttributes person : people) {
if (person.getAttributeValue("displayName") == null) {
return false;
}
}
return true;
} | [
"private",
"boolean",
"allListItemsHaveDisplayName",
"(",
"List",
"<",
"IPersonAttributes",
">",
"people",
")",
"{",
"for",
"(",
"IPersonAttributes",
"person",
":",
"people",
")",
"{",
"if",
"(",
"person",
".",
"getAttributeValue",
"(",
"\"displayName\"",
")",
"... | Utility class to determine if all items in the list of people have a displayName.
@param people list of personAttributes
@return true if all list items have an attribute displayName | [
"Utility",
"class",
"to",
"determine",
"if",
"all",
"items",
"in",
"the",
"list",
"of",
"people",
"have",
"a",
"displayName",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/lookup/PersonLookupHelperImpl.java#L369-L376 | train |
Jasig/uPortal | uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/lookup/PersonLookupHelperImpl.java | PersonLookupHelperImpl.getPrincipalForUser | protected IAuthorizationPrincipal getPrincipalForUser(final IPerson person) {
final EntityIdentifier ei = person.getEntityIdentifier();
return AuthorizationServiceFacade.instance().newPrincipal(ei.getKey(), ei.getType());
} | java | protected IAuthorizationPrincipal getPrincipalForUser(final IPerson person) {
final EntityIdentifier ei = person.getEntityIdentifier();
return AuthorizationServiceFacade.instance().newPrincipal(ei.getKey(), ei.getType());
} | [
"protected",
"IAuthorizationPrincipal",
"getPrincipalForUser",
"(",
"final",
"IPerson",
"person",
")",
"{",
"final",
"EntityIdentifier",
"ei",
"=",
"person",
".",
"getEntityIdentifier",
"(",
")",
";",
"return",
"AuthorizationServiceFacade",
".",
"instance",
"(",
")",
... | Get the authoriztaion principal matching the supplied IPerson.
@param person
@return | [
"Get",
"the",
"authoriztaion",
"principal",
"matching",
"the",
"supplied",
"IPerson",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/lookup/PersonLookupHelperImpl.java#L411-L414 | train |
Jasig/uPortal | uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/lookup/PersonLookupHelperImpl.java | PersonLookupHelperImpl.getPermittedAttributes | protected Set<String> getPermittedAttributes(final IAuthorizationPrincipal principal) {
final Set<String> attributeNames = personAttributeDao.getPossibleUserAttributeNames();
return getPermittedAttributes(principal, attributeNames);
} | java | protected Set<String> getPermittedAttributes(final IAuthorizationPrincipal principal) {
final Set<String> attributeNames = personAttributeDao.getPossibleUserAttributeNames();
return getPermittedAttributes(principal, attributeNames);
} | [
"protected",
"Set",
"<",
"String",
">",
"getPermittedAttributes",
"(",
"final",
"IAuthorizationPrincipal",
"principal",
")",
"{",
"final",
"Set",
"<",
"String",
">",
"attributeNames",
"=",
"personAttributeDao",
".",
"getPossibleUserAttributeNames",
"(",
")",
";",
"r... | Get the set of all user attribute names defined in the portal for which the specified
principal has the attribute viewing permission.
@param principal
@return | [
"Get",
"the",
"set",
"of",
"all",
"user",
"attribute",
"names",
"defined",
"in",
"the",
"portal",
"for",
"which",
"the",
"specified",
"principal",
"has",
"the",
"attribute",
"viewing",
"permission",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/lookup/PersonLookupHelperImpl.java#L423-L426 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/RDBMDistributedLayoutStore.java | RDBMDistributedLayoutStore.getFragmentLayoutCopies | @Override
public Map<String, Document> getFragmentLayoutCopies() {
// since this is only visible in fragment list in administrative portlet, use default portal
// locale
final Locale defaultLocale = localeManagerFactory.getPortalLocales().get(0);
final Map<String, Document> layouts ... | java | @Override
public Map<String, Document> getFragmentLayoutCopies() {
// since this is only visible in fragment list in administrative portlet, use default portal
// locale
final Locale defaultLocale = localeManagerFactory.getPortalLocales().get(0);
final Map<String, Document> layouts ... | [
"@",
"Override",
"public",
"Map",
"<",
"String",
",",
"Document",
">",
"getFragmentLayoutCopies",
"(",
")",
"{",
"// since this is only visible in fragment list in administrative portlet, use default portal",
"// locale",
"final",
"Locale",
"defaultLocale",
"=",
"localeManagerF... | Method for acquiring copies of fragment layouts to assist in debugging. No infrastructure
code calls this but channels designed to expose the structure of the cached fragments use
this to obtain copies.
@return Map | [
"Method",
"for",
"acquiring",
"copies",
"of",
"fragment",
"layouts",
"to",
"assist",
"in",
"debugging",
".",
"No",
"infrastructure",
"code",
"calls",
"this",
"but",
"channels",
"designed",
"to",
"expose",
"the",
"structure",
"of",
"the",
"cached",
"fragments",
... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/RDBMDistributedLayoutStore.java#L189-L213 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/RDBMDistributedLayoutStore.java | RDBMDistributedLayoutStore.getUserLayout | @Override
public DistributedUserLayout getUserLayout(IPerson person, IUserProfile profile) {
final DistributedUserLayout layout = this._getUserLayout(person, profile);
return layout;
} | java | @Override
public DistributedUserLayout getUserLayout(IPerson person, IUserProfile profile) {
final DistributedUserLayout layout = this._getUserLayout(person, profile);
return layout;
} | [
"@",
"Override",
"public",
"DistributedUserLayout",
"getUserLayout",
"(",
"IPerson",
"person",
",",
"IUserProfile",
"profile",
")",
"{",
"final",
"DistributedUserLayout",
"layout",
"=",
"this",
".",
"_getUserLayout",
"(",
"person",
",",
"profile",
")",
";",
"retur... | Returns the layout for a user decorated with any specified decorator. The layout returned is
a composite layout for non fragment owners and a regular layout for layout owners. A
composite layout is made up of layout pieces from potentially multiple incorporated layouts.
If no layouts are defined then the composite layo... | [
"Returns",
"the",
"layout",
"for",
"a",
"user",
"decorated",
"with",
"any",
"specified",
"decorator",
".",
"The",
"layout",
"returned",
"is",
"a",
"composite",
"layout",
"for",
"non",
"fragment",
"owners",
"and",
"a",
"regular",
"layout",
"for",
"layout",
"o... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/RDBMDistributedLayoutStore.java#L337-L343 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/RDBMDistributedLayoutStore.java | RDBMDistributedLayoutStore._safeGetUserLayout | private Document _safeGetUserLayout(IPerson person, IUserProfile profile) {
Document layoutDoc;
Tuple<String, String> key = null;
final Cache<Tuple<String, String>, Document> layoutCache = getLayoutImportExportCache();
if (layoutCache != null) {
key = new Tuple<>(person.get... | java | private Document _safeGetUserLayout(IPerson person, IUserProfile profile) {
Document layoutDoc;
Tuple<String, String> key = null;
final Cache<Tuple<String, String>, Document> layoutCache = getLayoutImportExportCache();
if (layoutCache != null) {
key = new Tuple<>(person.get... | [
"private",
"Document",
"_safeGetUserLayout",
"(",
"IPerson",
"person",
",",
"IUserProfile",
"profile",
")",
"{",
"Document",
"layoutDoc",
";",
"Tuple",
"<",
"String",
",",
"String",
">",
"key",
"=",
"null",
";",
"final",
"Cache",
"<",
"Tuple",
"<",
"String",... | Handles locking and identifying proper root and namespaces that used to take place in super
class.
@param person
@param profile
@return @ | [
"Handles",
"locking",
"and",
"identifying",
"proper",
"root",
"and",
"namespaces",
"that",
"used",
"to",
"take",
"place",
"in",
"super",
"class",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/RDBMDistributedLayoutStore.java#L1198-L1221 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/RDBMDistributedLayoutStore.java | RDBMDistributedLayoutStore._getUserLayout | private DistributedUserLayout _getUserLayout(IPerson person, IUserProfile profile) {
final String userName = (String) person.getAttribute("username");
final FragmentDefinition ownedFragment =
this.fragmentUtils.getFragmentDefinitionByOwner(person);
final boolean isLayoutOwnerDef... | java | private DistributedUserLayout _getUserLayout(IPerson person, IUserProfile profile) {
final String userName = (String) person.getAttribute("username");
final FragmentDefinition ownedFragment =
this.fragmentUtils.getFragmentDefinitionByOwner(person);
final boolean isLayoutOwnerDef... | [
"private",
"DistributedUserLayout",
"_getUserLayout",
"(",
"IPerson",
"person",
",",
"IUserProfile",
"profile",
")",
"{",
"final",
"String",
"userName",
"=",
"(",
"String",
")",
"person",
".",
"getAttribute",
"(",
"\"username\"",
")",
";",
"final",
"FragmentDefini... | Returns the layout for a user. This method overrides the same method in the superclass to
return a composite layout for non fragment owners and a regular layout for layout owners. A
composite layout is made up of layout pieces from potentially multiple incorporated layouts.
If no layouts are defined then the composite ... | [
"Returns",
"the",
"layout",
"for",
"a",
"user",
".",
"This",
"method",
"overrides",
"the",
"same",
"method",
"in",
"the",
"superclass",
"to",
"return",
"a",
"composite",
"layout",
"for",
"non",
"fragment",
"owners",
"and",
"a",
"regular",
"layout",
"for",
... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/RDBMDistributedLayoutStore.java#L1231-L1296 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/RDBMDistributedLayoutStore.java | RDBMDistributedLayoutStore.getFragmentLayout | @Override
public Document getFragmentLayout(IPerson person, IUserProfile profile) {
return this._safeGetUserLayout(person, profile);
} | java | @Override
public Document getFragmentLayout(IPerson person, IUserProfile profile) {
return this._safeGetUserLayout(person, profile);
} | [
"@",
"Override",
"public",
"Document",
"getFragmentLayout",
"(",
"IPerson",
"person",
",",
"IUserProfile",
"profile",
")",
"{",
"return",
"this",
".",
"_safeGetUserLayout",
"(",
"person",
",",
"profile",
")",
";",
"}"
] | Convenience method for fragment activator to obtain raw layouts for fragments during
initialization. | [
"Convenience",
"method",
"for",
"fragment",
"activator",
"to",
"obtain",
"raw",
"layouts",
"for",
"fragments",
"during",
"initialization",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/RDBMDistributedLayoutStore.java#L1362-L1366 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/RDBMDistributedLayoutStore.java | RDBMDistributedLayoutStore.updateCachedLayout | private void updateCachedLayout(
Document layout, IUserProfile profile, FragmentDefinition fragment) {
final Locale locale = profile.getLocaleManager().getLocales().get(0);
// need to make a copy that we can fragmentize
layout = (Document) layout.cloneNode(true);
// Fix late... | java | private void updateCachedLayout(
Document layout, IUserProfile profile, FragmentDefinition fragment) {
final Locale locale = profile.getLocaleManager().getLocales().get(0);
// need to make a copy that we can fragmentize
layout = (Document) layout.cloneNode(true);
// Fix late... | [
"private",
"void",
"updateCachedLayout",
"(",
"Document",
"layout",
",",
"IUserProfile",
"profile",
",",
"FragmentDefinition",
"fragment",
")",
"{",
"final",
"Locale",
"locale",
"=",
"profile",
".",
"getLocaleManager",
"(",
")",
".",
"getLocales",
"(",
")",
".",... | Replaces the layout Document stored on a fragment definition with a new version. This is
called when a fragment owner updates their layout. | [
"Replaces",
"the",
"layout",
"Document",
"stored",
"on",
"a",
"fragment",
"definition",
"with",
"a",
"new",
"version",
".",
"This",
"is",
"called",
"when",
"a",
"fragment",
"owner",
"updates",
"their",
"layout",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/RDBMDistributedLayoutStore.java#L1382-L1408 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/RDBMDistributedLayoutStore.java | RDBMDistributedLayoutStore.isLayoutOwnerDefault | private boolean isLayoutOwnerDefault(IPerson person) {
final String userName = (String) person.getAttribute("username");
final List<FragmentDefinition> definitions = this.fragmentUtils.getFragmentDefinitions();
if (userName != null && definitions != null) {
for (final FragmentDefini... | java | private boolean isLayoutOwnerDefault(IPerson person) {
final String userName = (String) person.getAttribute("username");
final List<FragmentDefinition> definitions = this.fragmentUtils.getFragmentDefinitions();
if (userName != null && definitions != null) {
for (final FragmentDefini... | [
"private",
"boolean",
"isLayoutOwnerDefault",
"(",
"IPerson",
"person",
")",
"{",
"final",
"String",
"userName",
"=",
"(",
"String",
")",
"person",
".",
"getAttribute",
"(",
"\"username\"",
")",
";",
"final",
"List",
"<",
"FragmentDefinition",
">",
"definitions"... | Returns true if the user is the owner of a layout which is copied as the default for any
fragment when first created. | [
"Returns",
"true",
"if",
"the",
"user",
"is",
"the",
"owner",
"of",
"a",
"layout",
"which",
"is",
"copied",
"as",
"the",
"default",
"for",
"any",
"fragment",
"when",
"first",
"created",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/RDBMDistributedLayoutStore.java#L1414-L1432 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/RDBMDistributedLayoutStore.java | RDBMDistributedLayoutStore.setUserLayout | @Override
public void setUserLayout(
IPerson person, IUserProfile profile, Document layoutXML, boolean channelsAdded) {
this.setUserLayout(person, profile, layoutXML, channelsAdded, true);
} | java | @Override
public void setUserLayout(
IPerson person, IUserProfile profile, Document layoutXML, boolean channelsAdded) {
this.setUserLayout(person, profile, layoutXML, channelsAdded, true);
} | [
"@",
"Override",
"public",
"void",
"setUserLayout",
"(",
"IPerson",
"person",
",",
"IUserProfile",
"profile",
",",
"Document",
"layoutXML",
",",
"boolean",
"channelsAdded",
")",
"{",
"this",
".",
"setUserLayout",
"(",
"person",
",",
"profile",
",",
"layoutXML",
... | This method overrides the same method in the super class to persist only layout information
stored in the user's person layout fragment or PLF. If this person is a layout owner then
their changes are pushed into the appropriate layout fragment. | [
"This",
"method",
"overrides",
"the",
"same",
"method",
"in",
"the",
"super",
"class",
"to",
"persist",
"only",
"layout",
"information",
"stored",
"in",
"the",
"user",
"s",
"person",
"layout",
"fragment",
"or",
"PLF",
".",
"If",
"this",
"person",
"is",
"a"... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/RDBMDistributedLayoutStore.java#L1462-L1467 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/RDBMDistributedLayoutStore.java | RDBMDistributedLayoutStore.setUserLayout | @Override
public void setUserLayout(
IPerson person,
IUserProfile profile,
Document layoutXML,
boolean channelsAdded,
boolean updateFragmentCache) {
final Document plf = (Document) person.getAttribute(Constants.PLF);
if (logger.isDebugEnab... | java | @Override
public void setUserLayout(
IPerson person,
IUserProfile profile,
Document layoutXML,
boolean channelsAdded,
boolean updateFragmentCache) {
final Document plf = (Document) person.getAttribute(Constants.PLF);
if (logger.isDebugEnab... | [
"@",
"Override",
"public",
"void",
"setUserLayout",
"(",
"IPerson",
"person",
",",
"IUserProfile",
"profile",
",",
"Document",
"layoutXML",
",",
"boolean",
"channelsAdded",
",",
"boolean",
"updateFragmentCache",
")",
"{",
"final",
"Document",
"plf",
"=",
"(",
"D... | This method overrides the same method in the super class to persist only layout information
stored in the user's person layout fragment or PLF. If fragment cache update is requested
then it checks to see if this person is a layout owner and if so then their changes are
pushed into the appropriate layout fragment. | [
"This",
"method",
"overrides",
"the",
"same",
"method",
"in",
"the",
"super",
"class",
"to",
"persist",
"only",
"layout",
"information",
"stored",
"in",
"the",
"user",
"s",
"person",
"layout",
"fragment",
"or",
"PLF",
".",
"If",
"fragment",
"cache",
"update"... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/RDBMDistributedLayoutStore.java#L1475-L1500 | train |
Jasig/uPortal | uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/PersonDirNameFinderFactory.java | PersonDirNameFinderFactory.storeSingleton | private static synchronized void storeSingleton() {
// recheck that we need to run because field could have been
// set since we decided to invoke this method but before we acquired
// the lock on this object
if (PERSON_DIR_NAME_FINDER_INSTANCE == null) {
IPersonAttributeDao ... | java | private static synchronized void storeSingleton() {
// recheck that we need to run because field could have been
// set since we decided to invoke this method but before we acquired
// the lock on this object
if (PERSON_DIR_NAME_FINDER_INSTANCE == null) {
IPersonAttributeDao ... | [
"private",
"static",
"synchronized",
"void",
"storeSingleton",
"(",
")",
"{",
"// recheck that we need to run because field could have been",
"// set since we decided to invoke this method but before we acquired",
"// the lock on this object",
"if",
"(",
"PERSON_DIR_NAME_FINDER_INSTANCE",
... | Instantiates the static singleton field PERSON_DIR_NAME_FINDER_INSTANCE. Synchronized to
guarantee singleton-ness of the field. | [
"Instantiates",
"the",
"static",
"singleton",
"field",
"PERSON_DIR_NAME_FINDER_INSTANCE",
".",
"Synchronized",
"to",
"guarantee",
"singleton",
"-",
"ness",
"of",
"the",
"field",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/PersonDirNameFinderFactory.java#L56-L65 | train |
Jasig/uPortal | uPortal-events/src/main/java/org/apereo/portal/events/PortalEventFactoryImpl.java | PortalEventFactoryImpl.getResourceId | protected String getResourceId(
IPortletWindowId portletWindowId, final IPortalRequestInfo portalRequestInfo) {
final IPortletRequestInfo portletRequestInfo =
portalRequestInfo.getPortletRequestInfo(portletWindowId);
if (portletRequestInfo == null) {
return null;
... | java | protected String getResourceId(
IPortletWindowId portletWindowId, final IPortalRequestInfo portalRequestInfo) {
final IPortletRequestInfo portletRequestInfo =
portalRequestInfo.getPortletRequestInfo(portletWindowId);
if (portletRequestInfo == null) {
return null;
... | [
"protected",
"String",
"getResourceId",
"(",
"IPortletWindowId",
"portletWindowId",
",",
"final",
"IPortalRequestInfo",
"portalRequestInfo",
")",
"{",
"final",
"IPortletRequestInfo",
"portletRequestInfo",
"=",
"portalRequestInfo",
".",
"getPortletRequestInfo",
"(",
"portletWi... | The portlet resource request resourceId | [
"The",
"portlet",
"resource",
"request",
"resourceId"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-events/src/main/java/org/apereo/portal/events/PortalEventFactoryImpl.java#L618-L627 | train |
Jasig/uPortal | uPortal-events/src/main/java/org/apereo/portal/events/PortalEventFactoryImpl.java | PortalEventFactoryImpl.getEventSessionMutex | protected final Object getEventSessionMutex(HttpSession session) {
synchronized (WebUtils.getSessionMutex(session)) {
SerializableObject mutex =
(SerializableObject) session.getAttribute(EVENT_SESSION_MUTEX);
if (mutex == null) {
mutex = new Serializab... | java | protected final Object getEventSessionMutex(HttpSession session) {
synchronized (WebUtils.getSessionMutex(session)) {
SerializableObject mutex =
(SerializableObject) session.getAttribute(EVENT_SESSION_MUTEX);
if (mutex == null) {
mutex = new Serializab... | [
"protected",
"final",
"Object",
"getEventSessionMutex",
"(",
"HttpSession",
"session",
")",
"{",
"synchronized",
"(",
"WebUtils",
".",
"getSessionMutex",
"(",
"session",
")",
")",
"{",
"SerializableObject",
"mutex",
"=",
"(",
"SerializableObject",
")",
"session",
... | Get a session scoped mutex specific to this class | [
"Get",
"a",
"session",
"scoped",
"mutex",
"specific",
"to",
"this",
"class"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-events/src/main/java/org/apereo/portal/events/PortalEventFactoryImpl.java#L781-L792 | train |
Jasig/uPortal | uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/groupadmin/GroupAdministrationHelper.java | GroupAdministrationHelper.getGroupForm | public GroupForm getGroupForm(String key) {
log.debug("Initializing group form for group key " + key);
// find the current version of this group entity
IEntityGroup group = GroupService.findGroup(key);
// update the group form with the existing group's main information
GroupFo... | java | public GroupForm getGroupForm(String key) {
log.debug("Initializing group form for group key " + key);
// find the current version of this group entity
IEntityGroup group = GroupService.findGroup(key);
// update the group form with the existing group's main information
GroupFo... | [
"public",
"GroupForm",
"getGroupForm",
"(",
"String",
"key",
")",
"{",
"log",
".",
"debug",
"(",
"\"Initializing group form for group key \"",
"+",
"key",
")",
";",
"// find the current version of this group entity",
"IEntityGroup",
"group",
"=",
"GroupService",
".",
"f... | Construct a group form for the group with the specified key.
@param key
@param entityEnum
@return | [
"Construct",
"a",
"group",
"form",
"for",
"the",
"group",
"with",
"the",
"specified",
"key",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/groupadmin/GroupAdministrationHelper.java#L58-L80 | train |
Jasig/uPortal | uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/groupadmin/GroupAdministrationHelper.java | GroupAdministrationHelper.deleteGroup | public void deleteGroup(String key, IPerson deleter) {
if (!canDeleteGroup(deleter, key)) {
throw new RuntimeAuthorizationException(
deleter, IPermission.DELETE_GROUP_ACTIVITY, key);
}
log.info("Deleting group with key " + key);
// find the current vers... | java | public void deleteGroup(String key, IPerson deleter) {
if (!canDeleteGroup(deleter, key)) {
throw new RuntimeAuthorizationException(
deleter, IPermission.DELETE_GROUP_ACTIVITY, key);
}
log.info("Deleting group with key " + key);
// find the current vers... | [
"public",
"void",
"deleteGroup",
"(",
"String",
"key",
",",
"IPerson",
"deleter",
")",
"{",
"if",
"(",
"!",
"canDeleteGroup",
"(",
"deleter",
",",
"key",
")",
")",
"{",
"throw",
"new",
"RuntimeAuthorizationException",
"(",
"deleter",
",",
"IPermission",
".",... | Delete a group from the group store
@param key key of the group to be deleted
@param user performing the delete operation | [
"Delete",
"a",
"group",
"from",
"the",
"group",
"store"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/groupadmin/GroupAdministrationHelper.java#L88-L109 | train |
Jasig/uPortal | uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/groupadmin/GroupAdministrationHelper.java | GroupAdministrationHelper.updateGroupDetails | public void updateGroupDetails(GroupForm groupForm, IPerson updater) {
if (!canEditGroup(updater, groupForm.getKey())) {
throw new RuntimeAuthorizationException(
updater, IPermission.EDIT_GROUP_ACTIVITY, groupForm.getKey());
}
if (log.isDebugEnabled()) {
... | java | public void updateGroupDetails(GroupForm groupForm, IPerson updater) {
if (!canEditGroup(updater, groupForm.getKey())) {
throw new RuntimeAuthorizationException(
updater, IPermission.EDIT_GROUP_ACTIVITY, groupForm.getKey());
}
if (log.isDebugEnabled()) {
... | [
"public",
"void",
"updateGroupDetails",
"(",
"GroupForm",
"groupForm",
",",
"IPerson",
"updater",
")",
"{",
"if",
"(",
"!",
"canEditGroup",
"(",
"updater",
",",
"groupForm",
".",
"getKey",
"(",
")",
")",
")",
"{",
"throw",
"new",
"RuntimeAuthorizationException... | Update the title and description of an existing group in the group store.
@param groupForm Form representing the new group configuration
@param updater Updating user | [
"Update",
"the",
"title",
"and",
"description",
"of",
"an",
"existing",
"group",
"in",
"the",
"group",
"store",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/groupadmin/GroupAdministrationHelper.java#L117-L136 | train |
Jasig/uPortal | uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/groupadmin/GroupAdministrationHelper.java | GroupAdministrationHelper.updateGroupMembers | public void updateGroupMembers(GroupForm groupForm, IPerson updater) {
if (!canEditGroup(updater, groupForm.getKey())) {
throw new RuntimeAuthorizationException(
updater, IPermission.EDIT_GROUP_ACTIVITY, groupForm.getKey());
}
if (log.isDebugEnabled()) {
... | java | public void updateGroupMembers(GroupForm groupForm, IPerson updater) {
if (!canEditGroup(updater, groupForm.getKey())) {
throw new RuntimeAuthorizationException(
updater, IPermission.EDIT_GROUP_ACTIVITY, groupForm.getKey());
}
if (log.isDebugEnabled()) {
... | [
"public",
"void",
"updateGroupMembers",
"(",
"GroupForm",
"groupForm",
",",
"IPerson",
"updater",
")",
"{",
"if",
"(",
"!",
"canEditGroup",
"(",
"updater",
",",
"groupForm",
".",
"getKey",
"(",
")",
")",
")",
"{",
"throw",
"new",
"RuntimeAuthorizationException... | Update the members of an existing group in the group store.
@param groupForm Form representing the new group configuration
@param updater Updating user | [
"Update",
"the",
"members",
"of",
"an",
"existing",
"group",
"in",
"the",
"group",
"store",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/groupadmin/GroupAdministrationHelper.java#L144-L179 | train |
Jasig/uPortal | uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/groupadmin/GroupAdministrationHelper.java | GroupAdministrationHelper.createGroup | public void createGroup(GroupForm groupForm, JsonEntityBean parent, IPerson creator) {
if (!canCreateMemberGroup(creator, parent.getId())) {
throw new RuntimeAuthorizationException(
creator, IPermission.CREATE_GROUP_ACTIVITY, groupForm.getKey());
}
if (log.isDeb... | java | public void createGroup(GroupForm groupForm, JsonEntityBean parent, IPerson creator) {
if (!canCreateMemberGroup(creator, parent.getId())) {
throw new RuntimeAuthorizationException(
creator, IPermission.CREATE_GROUP_ACTIVITY, groupForm.getKey());
}
if (log.isDeb... | [
"public",
"void",
"createGroup",
"(",
"GroupForm",
"groupForm",
",",
"JsonEntityBean",
"parent",
",",
"IPerson",
"creator",
")",
"{",
"if",
"(",
"!",
"canCreateMemberGroup",
"(",
"creator",
",",
"parent",
".",
"getId",
"(",
")",
")",
")",
"{",
"throw",
"ne... | Create a new group under the specified parent. The new group will automatically be added to
the parent group.
@param groupForm form object representing the new group
@param parent parent group for this new group
@param creator the uPortal user creating the new group | [
"Create",
"a",
"new",
"group",
"under",
"the",
"specified",
"parent",
".",
"The",
"new",
"group",
"will",
"automatically",
"be",
"added",
"to",
"the",
"parent",
"group",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/groupadmin/GroupAdministrationHelper.java#L189-L236 | train |
Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/statistics/PortletExecutionStatisticsController.java | PortletExecutionStatisticsController.selectFormExecutionType | private void selectFormExecutionType(final PortletExecutionReportForm report) {
if (!report.getExecutionTypeNames().isEmpty()) {
// Already execution types set, do nothing
return;
}
report.getExecutionTypeNames().add(ExecutionType.RENDER.name());
} | java | private void selectFormExecutionType(final PortletExecutionReportForm report) {
if (!report.getExecutionTypeNames().isEmpty()) {
// Already execution types set, do nothing
return;
}
report.getExecutionTypeNames().add(ExecutionType.RENDER.name());
} | [
"private",
"void",
"selectFormExecutionType",
"(",
"final",
"PortletExecutionReportForm",
"report",
")",
"{",
"if",
"(",
"!",
"report",
".",
"getExecutionTypeNames",
"(",
")",
".",
"isEmpty",
"(",
")",
")",
"{",
"// Already execution types set, do nothing",
"return",
... | Select the XXXX execution type by default for the form | [
"Select",
"the",
"XXXX",
"execution",
"type",
"by",
"default",
"for",
"the",
"form"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/statistics/PortletExecutionStatisticsController.java#L132-L139 | train |
Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/statistics/PortletExecutionStatisticsController.java | PortletExecutionStatisticsController.getColumnDescriptions | @Override
protected List<ColumnDescription> getColumnDescriptions(
PortletExecutionAggregationDiscriminator reportColumnDiscriminator,
PortletExecutionReportForm form) {
int groupSize = form.getGroups().size();
int portletSize = form.getPortlets().size();
int executio... | java | @Override
protected List<ColumnDescription> getColumnDescriptions(
PortletExecutionAggregationDiscriminator reportColumnDiscriminator,
PortletExecutionReportForm form) {
int groupSize = form.getGroups().size();
int portletSize = form.getPortlets().size();
int executio... | [
"@",
"Override",
"protected",
"List",
"<",
"ColumnDescription",
">",
"getColumnDescriptions",
"(",
"PortletExecutionAggregationDiscriminator",
"reportColumnDiscriminator",
",",
"PortletExecutionReportForm",
"form",
")",
"{",
"int",
"groupSize",
"=",
"form",
".",
"getGroups"... | Create column descriptions for the portlet report using the configured report labelling
strategy.
@param reportColumnDiscriminator
@param form The original query form
@return | [
"Create",
"column",
"descriptions",
"for",
"the",
"portlet",
"report",
"using",
"the",
"configured",
"report",
"labelling",
"strategy",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/statistics/PortletExecutionStatisticsController.java#L274-L295 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-core/src/main/java/org/apereo/portal/layout/profile/ServerProfileMapperImpl.java | ServerProfileMapperImpl.setServerRegex | @Required
public void setServerRegex(String serverRegex) {
Validate.notBlank(serverRegex);
this.serverRegex = serverRegex;
this.pattern = Pattern.compile(this.serverRegex);
} | java | @Required
public void setServerRegex(String serverRegex) {
Validate.notBlank(serverRegex);
this.serverRegex = serverRegex;
this.pattern = Pattern.compile(this.serverRegex);
} | [
"@",
"Required",
"public",
"void",
"setServerRegex",
"(",
"String",
"serverRegex",
")",
"{",
"Validate",
".",
"notBlank",
"(",
"serverRegex",
")",
";",
"this",
".",
"serverRegex",
"=",
"serverRegex",
";",
"this",
".",
"pattern",
"=",
"Pattern",
".",
"compile... | Sets the regular expression for the servers you want to select a profile for
@param serverRegex | [
"Sets",
"the",
"regular",
"expression",
"for",
"the",
"servers",
"you",
"want",
"to",
"select",
"a",
"profile",
"for"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-core/src/main/java/org/apereo/portal/layout/profile/ServerProfileMapperImpl.java#L48-L53 | train |
Jasig/uPortal | uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/CompositeEntityIdentifier.java | CompositeEntityIdentifier.getServiceName | public synchronized Name getServiceName() {
if (size() < 2) {
return null;
}
if (cachedServiceName == null) {
cachedServiceName = getCompositeKey().getPrefix(size() - 1);
}
return cachedServiceName;
} | java | public synchronized Name getServiceName() {
if (size() < 2) {
return null;
}
if (cachedServiceName == null) {
cachedServiceName = getCompositeKey().getPrefix(size() - 1);
}
return cachedServiceName;
} | [
"public",
"synchronized",
"Name",
"getServiceName",
"(",
")",
"{",
"if",
"(",
"size",
"(",
")",
"<",
"2",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"cachedServiceName",
"==",
"null",
")",
"{",
"cachedServiceName",
"=",
"getCompositeKey",
"(",
")",... | If the composite key is either empty or has a single node, there is no service name.
@return javax.naming.Name | [
"If",
"the",
"composite",
"key",
"is",
"either",
"empty",
"or",
"has",
"a",
"single",
"node",
"there",
"is",
"no",
"service",
"name",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/CompositeEntityIdentifier.java#L114-L122 | train |
Jasig/uPortal | uPortal-web/src/main/java/org/apereo/portal/rendering/DynamicRenderingPipeline.java | DynamicRenderingPipeline.getMediaType | protected String getMediaType(
HttpServletRequest req,
HttpServletResponse res,
PipelineEventReader<CharacterEventReader, CharacterEvent> pipelineEventReader) {
final String mediaType = pipelineEventReader.getOutputProperty(OutputKeys.MEDIA_TYPE);
if (mediaType != nul... | java | protected String getMediaType(
HttpServletRequest req,
HttpServletResponse res,
PipelineEventReader<CharacterEventReader, CharacterEvent> pipelineEventReader) {
final String mediaType = pipelineEventReader.getOutputProperty(OutputKeys.MEDIA_TYPE);
if (mediaType != nul... | [
"protected",
"String",
"getMediaType",
"(",
"HttpServletRequest",
"req",
",",
"HttpServletResponse",
"res",
",",
"PipelineEventReader",
"<",
"CharacterEventReader",
",",
"CharacterEvent",
">",
"pipelineEventReader",
")",
"{",
"final",
"String",
"mediaType",
"=",
"pipeli... | Determine the media type to use for the response | [
"Determine",
"the",
"media",
"type",
"to",
"use",
"for",
"the",
"response"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-web/src/main/java/org/apereo/portal/rendering/DynamicRenderingPipeline.java#L105-L118 | train |
Jasig/uPortal | uPortal-events/src/main/java/org/apereo/portal/events/aggr/session/JpaEventSessionDao.java | JpaEventSessionDao.getGroupsForEvent | protected Set<AggregatedGroupMapping> getGroupsForEvent(PortalEvent event) {
final Set<AggregatedGroupMapping> groupMappings =
new LinkedHashSet<AggregatedGroupMapping>();
if (event instanceof LoginEvent) {
for (final String groupKey : ((LoginEvent) event).getGroups()) {
... | java | protected Set<AggregatedGroupMapping> getGroupsForEvent(PortalEvent event) {
final Set<AggregatedGroupMapping> groupMappings =
new LinkedHashSet<AggregatedGroupMapping>();
if (event instanceof LoginEvent) {
for (final String groupKey : ((LoginEvent) event).getGroups()) {
... | [
"protected",
"Set",
"<",
"AggregatedGroupMapping",
">",
"getGroupsForEvent",
"(",
"PortalEvent",
"event",
")",
"{",
"final",
"Set",
"<",
"AggregatedGroupMapping",
">",
"groupMappings",
"=",
"new",
"LinkedHashSet",
"<",
"AggregatedGroupMapping",
">",
"(",
")",
";",
... | Get groups for the event | [
"Get",
"groups",
"for",
"the",
"event"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-events/src/main/java/org/apereo/portal/events/aggr/session/JpaEventSessionDao.java#L212-L241 | train |
Jasig/uPortal | uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/services/GroupService.java | GroupService.finishedSession | public static void finishedSession(IPerson person) {
LOGGER.trace("Invoking finishedSession for IPerson [{}]", person);
try {
instance().ifinishedSession(person);
} catch (GroupsException ge) {
LOGGER.error("Error upon session finishing for person [{}]", person, ge);
... | java | public static void finishedSession(IPerson person) {
LOGGER.trace("Invoking finishedSession for IPerson [{}]", person);
try {
instance().ifinishedSession(person);
} catch (GroupsException ge) {
LOGGER.error("Error upon session finishing for person [{}]", person, ge);
... | [
"public",
"static",
"void",
"finishedSession",
"(",
"IPerson",
"person",
")",
"{",
"LOGGER",
".",
"trace",
"(",
"\"Invoking finishedSession for IPerson [{}]\"",
",",
"person",
")",
";",
"try",
"{",
"instance",
"(",
")",
".",
"ifinishedSession",
"(",
"person",
")... | Receives notice that the UserInstance has been unbound from the HttpSession. In response, we
remove the corresponding group member from the cache.
@param person org.apereo.portal.security.IPerson | [
"Receives",
"notice",
"that",
"the",
"UserInstance",
"has",
"been",
"unbound",
"from",
"the",
"HttpSession",
".",
"In",
"response",
"we",
"remove",
"the",
"corresponding",
"group",
"member",
"from",
"the",
"cache",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/services/GroupService.java#L103-L110 | train |
Jasig/uPortal | uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/services/GroupService.java | GroupService.ifinishedSession | private void ifinishedSession(IPerson person) throws GroupsException {
IGroupMember gm = getGroupMember(person.getEntityIdentifier());
try {
final EntityIdentifier entityIdentifier = gm.getEntityIdentifier();
EntityCachingService.getEntityCachingService()
.rem... | java | private void ifinishedSession(IPerson person) throws GroupsException {
IGroupMember gm = getGroupMember(person.getEntityIdentifier());
try {
final EntityIdentifier entityIdentifier = gm.getEntityIdentifier();
EntityCachingService.getEntityCachingService()
.rem... | [
"private",
"void",
"ifinishedSession",
"(",
"IPerson",
"person",
")",
"throws",
"GroupsException",
"{",
"IGroupMember",
"gm",
"=",
"getGroupMember",
"(",
"person",
".",
"getEntityIdentifier",
"(",
")",
")",
";",
"try",
"{",
"final",
"EntityIdentifier",
"entityIden... | Receives notice that the UserInstance has been unbound from the HttpSession. In response, we
remove the corresponding group member from the cache. We use the roundabout route of creating
a group member and then getting its EntityIdentifier because we need the EntityIdentifier for
the group member, which is cached, not ... | [
"Receives",
"notice",
"that",
"the",
"UserInstance",
"has",
"been",
"unbound",
"from",
"the",
"HttpSession",
".",
"In",
"response",
"we",
"remove",
"the",
"corresponding",
"group",
"member",
"from",
"the",
"cache",
".",
"We",
"use",
"the",
"roundabout",
"route... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/services/GroupService.java#L252-L262 | train |
Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/dynamicskin/ConfigurablePreferencesBasedTokenGenerator.java | ConfigurablePreferencesBasedTokenGenerator.generateToken | @Override
public String generateToken(final DynamicSkinInstanceData data) {
final PortletPreferences preferences = data.getPortletRequest().getPreferences();
int hash = 0;
// Add the list of preference names to an ordered list so we can get reliable hashcode
// calculations.
... | java | @Override
public String generateToken(final DynamicSkinInstanceData data) {
final PortletPreferences preferences = data.getPortletRequest().getPreferences();
int hash = 0;
// Add the list of preference names to an ordered list so we can get reliable hashcode
// calculations.
... | [
"@",
"Override",
"public",
"String",
"generateToken",
"(",
"final",
"DynamicSkinInstanceData",
"data",
")",
"{",
"final",
"PortletPreferences",
"preferences",
"=",
"data",
".",
"getPortletRequest",
"(",
")",
".",
"getPreferences",
"(",
")",
";",
"int",
"hash",
"... | Returns a String hashcode of the values for the portlet preferences that are configurable by
the Dynamic Skin portlet. The hashcode is generated in a repeatable fashion by calculating it
based on sorted portlet preference names. Though hashcode does not guarantee uniqueness, from
a practical perspective we'll have so f... | [
"Returns",
"a",
"String",
"hashcode",
"of",
"the",
"values",
"for",
"the",
"portlet",
"preferences",
"that",
"are",
"configurable",
"by",
"the",
"Dynamic",
"Skin",
"portlet",
".",
"The",
"hashcode",
"is",
"generated",
"in",
"a",
"repeatable",
"fashion",
"by",
... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/dynamicskin/ConfigurablePreferencesBasedTokenGenerator.java#L40-L56 | train |
Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/marketplace/PortletMarketplaceController.java | PortletMarketplaceController.initializeView | @RenderMapping
public String initializeView(
WebRequest webRequest,
PortletRequest portletRequest,
Model model,
@RequestParam(required = false) String initialFilter) {
this.setUpInitialView(webRequest, portletRequest, model, initialFilter);
return "jsp... | java | @RenderMapping
public String initializeView(
WebRequest webRequest,
PortletRequest portletRequest,
Model model,
@RequestParam(required = false) String initialFilter) {
this.setUpInitialView(webRequest, portletRequest, model, initialFilter);
return "jsp... | [
"@",
"RenderMapping",
"public",
"String",
"initializeView",
"(",
"WebRequest",
"webRequest",
",",
"PortletRequest",
"portletRequest",
",",
"Model",
"model",
",",
"@",
"RequestParam",
"(",
"required",
"=",
"false",
")",
"String",
"initialFilter",
")",
"{",
"this",
... | Returns a view of the marketplace landing page
@param webRequest
@param portletRequest
@param model
@param initialFilter - optional request paramter. Use to init filter on initial view
@return a string representing the initial view. | [
"Returns",
"a",
"view",
"of",
"the",
"marketplace",
"landing",
"page"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/marketplace/PortletMarketplaceController.java#L187-L195 | train |
Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/marketplace/PortletMarketplaceController.java | PortletMarketplaceController.getRegistry | public Map<String, Set<?>> getRegistry(final IPerson user, final PortletRequest req) {
Map<String, Set<?>> registry = new TreeMap<String, Set<?>>();
// Empty, or the set of categories that are permitted to
// be displayed in the Portlet Marketplace (portlet)
final Set<PortletCategory> ... | java | public Map<String, Set<?>> getRegistry(final IPerson user, final PortletRequest req) {
Map<String, Set<?>> registry = new TreeMap<String, Set<?>>();
// Empty, or the set of categories that are permitted to
// be displayed in the Portlet Marketplace (portlet)
final Set<PortletCategory> ... | [
"public",
"Map",
"<",
"String",
",",
"Set",
"<",
"?",
">",
">",
"getRegistry",
"(",
"final",
"IPerson",
"user",
",",
"final",
"PortletRequest",
"req",
")",
"{",
"Map",
"<",
"String",
",",
"Set",
"<",
"?",
">",
">",
"registry",
"=",
"new",
"TreeMap",
... | Returns a set of MarketplacePortletDefinitions. Supply a user to limit the set to only
portlets the user can use. If user is null, this will return all portlets. Setting user to
null will superscede all other parameters.
@param user - non-null user to limit results by. This will filter results to only portlets
that us... | [
"Returns",
"a",
"set",
"of",
"MarketplacePortletDefinitions",
".",
"Supply",
"a",
"user",
"to",
"limit",
"the",
"set",
"to",
"only",
"portlets",
"the",
"user",
"can",
"use",
".",
"If",
"user",
"is",
"null",
"this",
"will",
"return",
"all",
"portlets",
".",... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/marketplace/PortletMarketplaceController.java#L418-L441 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/TabColumnPrefsHandler.java | TabColumnPrefsHandler.deleteNode | public static void deleteNode(Element compViewNode, IPerson person) throws PortalException {
String ID = compViewNode.getAttribute(Constants.ATT_ID);
if (ID.startsWith(Constants.FRAGMENT_ID_USER_PREFIX)) // ilf node
DeleteManager.addDeleteDirective(compViewNode, ID, person);
else {
... | java | public static void deleteNode(Element compViewNode, IPerson person) throws PortalException {
String ID = compViewNode.getAttribute(Constants.ATT_ID);
if (ID.startsWith(Constants.FRAGMENT_ID_USER_PREFIX)) // ilf node
DeleteManager.addDeleteDirective(compViewNode, ID, person);
else {
... | [
"public",
"static",
"void",
"deleteNode",
"(",
"Element",
"compViewNode",
",",
"IPerson",
"person",
")",
"throws",
"PortalException",
"{",
"String",
"ID",
"=",
"compViewNode",
".",
"getAttribute",
"(",
"Constants",
".",
"ATT_ID",
")",
";",
"if",
"(",
"ID",
"... | Handles user requests to delete UI elements. For ILF owned nodes it delegates to the
DeleteManager to add a delete directive. For PLF owned nodes it deletes the node outright. | [
"Handles",
"user",
"requests",
"to",
"delete",
"UI",
"elements",
".",
"For",
"ILF",
"owned",
"nodes",
"it",
"delegates",
"to",
"the",
"DeleteManager",
"to",
"add",
"a",
"delete",
"directive",
".",
"For",
"PLF",
"owned",
"nodes",
"it",
"deletes",
"the",
"no... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/TabColumnPrefsHandler.java#L101-L116 | train |
Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/tenantmanager/TenantManagerController.java | TenantManagerController.detectInvalidFields | private Set<String> detectInvalidFields(
final String name, final String fname, final Map<String, String> attributes) {
final Set<String> rslt = new HashSet<>();
// Name & Fname
try {
tenantService.validateName(name);
// Fname is generated from name; the onl... | java | private Set<String> detectInvalidFields(
final String name, final String fname, final Map<String, String> attributes) {
final Set<String> rslt = new HashSet<>();
// Name & Fname
try {
tenantService.validateName(name);
// Fname is generated from name; the onl... | [
"private",
"Set",
"<",
"String",
">",
"detectInvalidFields",
"(",
"final",
"String",
"name",
",",
"final",
"String",
"fname",
",",
"final",
"Map",
"<",
"String",
",",
"String",
">",
"attributes",
")",
"{",
"final",
"Set",
"<",
"String",
">",
"rslt",
"=",... | Returns a collection of invalid fields, if any. | [
"Returns",
"a",
"collection",
"of",
"invalid",
"fields",
"if",
"any",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/tenantmanager/TenantManagerController.java#L335-L362 | train |
Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/statistics/BaseSimpleGroupedStatisticsReportController.java | BaseSimpleGroupedStatisticsReportController.getDefaultGroupedColumnDiscriminatorMap | protected Map<D, SortedSet<T>> getDefaultGroupedColumnDiscriminatorMap(F form) {
List<Long> groups = form.getGroups();
// Collections used to track the queried groups and the results
final Map<D, SortedSet<T>> groupedAggregations =
new TreeMap<D, SortedSet<T>>((Comparator<? super... | java | protected Map<D, SortedSet<T>> getDefaultGroupedColumnDiscriminatorMap(F form) {
List<Long> groups = form.getGroups();
// Collections used to track the queried groups and the results
final Map<D, SortedSet<T>> groupedAggregations =
new TreeMap<D, SortedSet<T>>((Comparator<? super... | [
"protected",
"Map",
"<",
"D",
",",
"SortedSet",
"<",
"T",
">",
">",
"getDefaultGroupedColumnDiscriminatorMap",
"(",
"F",
"form",
")",
"{",
"List",
"<",
"Long",
">",
"groups",
"=",
"form",
".",
"getGroups",
"(",
")",
";",
"// Collections used to track the queri... | Default implementation to create a map of the report column discriminators based on the
submitted form to collate the aggregation data into each column of a report when the only
grouping parameter is AggregatedGroupMapping.
<p>The map entries are a time-ordered sorted set of aggregation data points.
@param form Form ... | [
"Default",
"implementation",
"to",
"create",
"a",
"map",
"of",
"the",
"report",
"column",
"discriminators",
"based",
"on",
"the",
"submitted",
"form",
"to",
"collate",
"the",
"aggregation",
"data",
"into",
"each",
"column",
"of",
"a",
"report",
"when",
"the",
... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/statistics/BaseSimpleGroupedStatisticsReportController.java#L50-L72 | train |
Jasig/uPortal | uPortal-spring/src/main/java/org/springframework/web/portlet/HeaderHandlingDispatcherPortlet.java | HeaderHandlingDispatcherPortlet.doHeaders | @Override
protected void doHeaders(RenderRequest request, RenderResponse response) {
try {
doDispatch(request, response);
} catch (IOException | PortletException ex) {
logger.error(
"Exception rendering headers for portlet "
+ g... | java | @Override
protected void doHeaders(RenderRequest request, RenderResponse response) {
try {
doDispatch(request, response);
} catch (IOException | PortletException ex) {
logger.error(
"Exception rendering headers for portlet "
+ g... | [
"@",
"Override",
"protected",
"void",
"doHeaders",
"(",
"RenderRequest",
"request",
",",
"RenderResponse",
"response",
")",
"{",
"try",
"{",
"doDispatch",
"(",
"request",
",",
"response",
")",
";",
"}",
"catch",
"(",
"IOException",
"|",
"PortletException",
"ex... | Used by the render method to set the response properties and headers.
<p>The portlet should override this method and set its response header using this method in
order to ensure that they are set before anything is written to the output stream.
<p>
@param request the render request
@param response the render respons... | [
"Used",
"by",
"the",
"render",
"method",
"to",
"set",
"the",
"response",
"properties",
"and",
"headers",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-spring/src/main/java/org/springframework/web/portlet/HeaderHandlingDispatcherPortlet.java#L40-L51 | train |
Jasig/uPortal | uPortal-spring/src/main/java/org/springframework/web/portlet/HeaderHandlingDispatcherPortlet.java | HeaderHandlingDispatcherPortlet.doRenderService | @Override
protected void doRenderService(RenderRequest request, RenderResponse response)
throws Exception {
super.doRenderService(request, response);
} | java | @Override
protected void doRenderService(RenderRequest request, RenderResponse response)
throws Exception {
super.doRenderService(request, response);
} | [
"@",
"Override",
"protected",
"void",
"doRenderService",
"(",
"RenderRequest",
"request",
",",
"RenderResponse",
"response",
")",
"throws",
"Exception",
"{",
"super",
".",
"doRenderService",
"(",
"request",
",",
"response",
")",
";",
"}"
] | Processes the actual dispatching to the handler for render requests.
<p>The handler will be obtained by applying the portlet's HandlerMappings in order. The
HandlerAdapter will be obtained by querying the portlet's installed HandlerAdapters to find
the first that supports the handler class.
<p>For two-phase render pr... | [
"Processes",
"the",
"actual",
"dispatching",
"to",
"the",
"handler",
"for",
"render",
"requests",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-spring/src/main/java/org/springframework/web/portlet/HeaderHandlingDispatcherPortlet.java#L86-L90 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/cache/TagTrackingCacheEventListener.java | TagTrackingCacheEventListener.purgeCacheEntries | @Override
public int purgeCacheEntries(CacheEntryTag tag) {
final String tagType = tag.getTagType();
final Set<Ehcache> caches = taggedCaches.getIfPresent(tagType);
// Tag exists in cache(s)
if (caches == null || caches.isEmpty()) {
return 0;
}
int purge... | java | @Override
public int purgeCacheEntries(CacheEntryTag tag) {
final String tagType = tag.getTagType();
final Set<Ehcache> caches = taggedCaches.getIfPresent(tagType);
// Tag exists in cache(s)
if (caches == null || caches.isEmpty()) {
return 0;
}
int purge... | [
"@",
"Override",
"public",
"int",
"purgeCacheEntries",
"(",
"CacheEntryTag",
"tag",
")",
"{",
"final",
"String",
"tagType",
"=",
"tag",
".",
"getTagType",
"(",
")",
";",
"final",
"Set",
"<",
"Ehcache",
">",
"caches",
"=",
"taggedCaches",
".",
"getIfPresent",... | Remove all cache entries with keys that have the specified tag | [
"Remove",
"all",
"cache",
"entries",
"with",
"keys",
"that",
"have",
"the",
"specified",
"tag"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/cache/TagTrackingCacheEventListener.java#L82-L116 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/cache/TagTrackingCacheEventListener.java | TagTrackingCacheEventListener.getTags | protected Set<CacheEntryTag> getTags(Element element) {
final Object key = element.getObjectKey();
if (key instanceof TaggedCacheEntry) {
return ((TaggedCacheEntry) key).getTags();
}
final Object value = element.getObjectValue();
if (value instanceof TaggedCacheEntry... | java | protected Set<CacheEntryTag> getTags(Element element) {
final Object key = element.getObjectKey();
if (key instanceof TaggedCacheEntry) {
return ((TaggedCacheEntry) key).getTags();
}
final Object value = element.getObjectValue();
if (value instanceof TaggedCacheEntry... | [
"protected",
"Set",
"<",
"CacheEntryTag",
">",
"getTags",
"(",
"Element",
"element",
")",
"{",
"final",
"Object",
"key",
"=",
"element",
".",
"getObjectKey",
"(",
")",
";",
"if",
"(",
"key",
"instanceof",
"TaggedCacheEntry",
")",
"{",
"return",
"(",
"(",
... | Get the tags associated with the element | [
"Get",
"the",
"tags",
"associated",
"with",
"the",
"element"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/cache/TagTrackingCacheEventListener.java#L119-L131 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/cache/TagTrackingCacheEventListener.java | TagTrackingCacheEventListener.putElement | protected void putElement(Ehcache cache, Element element) {
final Set<CacheEntryTag> tags = this.getTags(element);
// Check if the key is tagged
if (tags != null && !tags.isEmpty()) {
final String cacheName = cache.getName();
final Object key = element.getObjectKey();
... | java | protected void putElement(Ehcache cache, Element element) {
final Set<CacheEntryTag> tags = this.getTags(element);
// Check if the key is tagged
if (tags != null && !tags.isEmpty()) {
final String cacheName = cache.getName();
final Object key = element.getObjectKey();
... | [
"protected",
"void",
"putElement",
"(",
"Ehcache",
"cache",
",",
"Element",
"element",
")",
"{",
"final",
"Set",
"<",
"CacheEntryTag",
">",
"tags",
"=",
"this",
".",
"getTags",
"(",
"element",
")",
";",
"// Check if the key is tagged",
"if",
"(",
"tags",
"!=... | If the element has a TaggedCacheKey record the tag associations | [
"If",
"the",
"element",
"has",
"a",
"TaggedCacheKey",
"record",
"the",
"tag",
"associations"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/cache/TagTrackingCacheEventListener.java#L134-L158 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/cache/TagTrackingCacheEventListener.java | TagTrackingCacheEventListener.removeElement | protected void removeElement(Ehcache cache, Element element) {
final Set<CacheEntryTag> tags = this.getTags(element);
// Check if the key is tagged
if (tags != null && !tags.isEmpty()) {
final String cacheName = cache.getName();
final LoadingCache<CacheEntryTag, Set<Obje... | java | protected void removeElement(Ehcache cache, Element element) {
final Set<CacheEntryTag> tags = this.getTags(element);
// Check if the key is tagged
if (tags != null && !tags.isEmpty()) {
final String cacheName = cache.getName();
final LoadingCache<CacheEntryTag, Set<Obje... | [
"protected",
"void",
"removeElement",
"(",
"Ehcache",
"cache",
",",
"Element",
"element",
")",
"{",
"final",
"Set",
"<",
"CacheEntryTag",
">",
"tags",
"=",
"this",
".",
"getTags",
"(",
"element",
")",
";",
"// Check if the key is tagged",
"if",
"(",
"tags",
... | If the element has a TaggedCacheKey remove the tag associations | [
"If",
"the",
"element",
"has",
"a",
"TaggedCacheKey",
"remove",
"the",
"tag",
"associations"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/cache/TagTrackingCacheEventListener.java#L161-L187 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/providers/PersonEvaluatorFactory.java | PersonEvaluatorFactory.getAttributeEvaluator | public Evaluator getAttributeEvaluator(String name, String mode, String value)
throws Exception {
return new AttributeEvaluator(name, mode, value);
} | java | public Evaluator getAttributeEvaluator(String name, String mode, String value)
throws Exception {
return new AttributeEvaluator(name, mode, value);
} | [
"public",
"Evaluator",
"getAttributeEvaluator",
"(",
"String",
"name",
",",
"String",
"mode",
",",
"String",
"value",
")",
"throws",
"Exception",
"{",
"return",
"new",
"AttributeEvaluator",
"(",
"name",
",",
"mode",
",",
"value",
")",
";",
"}"
] | returns an Evaluator unique to the type of attribute being evaluated. subclasses can override
this method to return the Evaluator that's appropriate to their implementation.
@param name the attribute's name.
@param mode the attribute's mode. (i.e. 'equals')
@param value the attribute's value.
@return an Evaluator for ... | [
"returns",
"an",
"Evaluator",
"unique",
"to",
"the",
"type",
"of",
"attribute",
"being",
"evaluated",
".",
"subclasses",
"can",
"override",
"this",
"method",
"to",
"return",
"the",
"Evaluator",
"that",
"s",
"appropriate",
"to",
"their",
"implementation",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/providers/PersonEvaluatorFactory.java#L155-L158 | train |
Jasig/uPortal | uPortal-security/uPortal-security-authn/src/main/java/org/apereo/portal/security/provider/RemoteUserSecurityContext.java | RemoteUserSecurityContext.authenticate | @Override
public synchronized void authenticate() throws PortalSecurityException {
if (this.remoteUser != null) {
// Set the UID for the principal
this.myPrincipal.setUID(this.remoteUser);
// Check that the principal UID matches the remote user
final String n... | java | @Override
public synchronized void authenticate() throws PortalSecurityException {
if (this.remoteUser != null) {
// Set the UID for the principal
this.myPrincipal.setUID(this.remoteUser);
// Check that the principal UID matches the remote user
final String n... | [
"@",
"Override",
"public",
"synchronized",
"void",
"authenticate",
"(",
")",
"throws",
"PortalSecurityException",
"{",
"if",
"(",
"this",
".",
"remoteUser",
"!=",
"null",
")",
"{",
"// Set the UID for the principal",
"this",
".",
"myPrincipal",
".",
"setUID",
"(",... | Verify that remoteUser is not null and set the principal's UID to this value.
@exception PortalSecurityException | [
"Verify",
"that",
"remoteUser",
"is",
"not",
"null",
"and",
"set",
"the",
"principal",
"s",
"UID",
"to",
"this",
"value",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-security/uPortal-security-authn/src/main/java/org/apereo/portal/security/provider/RemoteUserSecurityContext.java#L68-L100 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/DistributedLayoutManager.java | DistributedLayoutManager.updateNode | @Override
public synchronized boolean updateNode(IUserLayoutNodeDescription node) throws PortalException {
if (canUpdateNode(node)) {
String nodeId = node.getId();
IUserLayoutNodeDescription oldNode = getNode(nodeId);
if (oldNode instanceof IUserLayoutChannelDescription)... | java | @Override
public synchronized boolean updateNode(IUserLayoutNodeDescription node) throws PortalException {
if (canUpdateNode(node)) {
String nodeId = node.getId();
IUserLayoutNodeDescription oldNode = getNode(nodeId);
if (oldNode instanceof IUserLayoutChannelDescription)... | [
"@",
"Override",
"public",
"synchronized",
"boolean",
"updateNode",
"(",
"IUserLayoutNodeDescription",
"node",
")",
"throws",
"PortalException",
"{",
"if",
"(",
"canUpdateNode",
"(",
"node",
")",
")",
"{",
"String",
"nodeId",
"=",
"node",
".",
"getId",
"(",
")... | Handles pushing changes made to the passed-in node into the user's layout. If the node is an
ILF node then the change is recorded via directives in the PLF if such changes are allowed by
the owning fragment. If the node is a user owned node then the changes are applied directly
to the corresponding node in the PLF. | [
"Handles",
"pushing",
"changes",
"made",
"to",
"the",
"passed",
"-",
"in",
"node",
"into",
"the",
"user",
"s",
"layout",
".",
"If",
"the",
"node",
"is",
"an",
"ILF",
"node",
"then",
"the",
"change",
"is",
"recorded",
"via",
"directives",
"in",
"the",
"... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/DistributedLayoutManager.java#L546-L580 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/DistributedLayoutManager.java | DistributedLayoutManager.updateFolderNode | private void updateFolderNode(
String nodeId,
IUserLayoutFolderDescription newFolderDesc,
IUserLayoutFolderDescription oldFolderDesc)
throws PortalException {
Element ilfNode = (Element) getUserLayoutDOM().getElementById(nodeId);
List<ILayoutProcessingActi... | java | private void updateFolderNode(
String nodeId,
IUserLayoutFolderDescription newFolderDesc,
IUserLayoutFolderDescription oldFolderDesc)
throws PortalException {
Element ilfNode = (Element) getUserLayoutDOM().getElementById(nodeId);
List<ILayoutProcessingActi... | [
"private",
"void",
"updateFolderNode",
"(",
"String",
"nodeId",
",",
"IUserLayoutFolderDescription",
"newFolderDesc",
",",
"IUserLayoutFolderDescription",
"oldFolderDesc",
")",
"throws",
"PortalException",
"{",
"Element",
"ilfNode",
"=",
"(",
"Element",
")",
"getUserLayou... | Compares the new folder description object with the old folder description object to
determine what items were changed and if those changes are allowed. Once all changes are
verified as being allowed changes then they are pushed into both the ILF and the PLF as
appropriate. No changes are made until we determine that a... | [
"Compares",
"the",
"new",
"folder",
"description",
"object",
"with",
"the",
"old",
"folder",
"description",
"object",
"to",
"determine",
"what",
"items",
"were",
"changed",
"and",
"if",
"those",
"changes",
"are",
"allowed",
".",
"Once",
"all",
"changes",
"are"... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/DistributedLayoutManager.java#L593-L645 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/DistributedLayoutManager.java | DistributedLayoutManager.updateNodeAttribute | private void updateNodeAttribute(
Element ilfNode,
String nodeId,
String attName,
String newVal,
String oldVal,
List<ILayoutProcessingAction> pendingActions)
throws PortalException {
if (newVal == null && oldVal != null
... | java | private void updateNodeAttribute(
Element ilfNode,
String nodeId,
String attName,
String newVal,
String oldVal,
List<ILayoutProcessingAction> pendingActions)
throws PortalException {
if (newVal == null && oldVal != null
... | [
"private",
"void",
"updateNodeAttribute",
"(",
"Element",
"ilfNode",
",",
"String",
"nodeId",
",",
"String",
"attName",
",",
"String",
"newVal",
",",
"String",
"oldVal",
",",
"List",
"<",
"ILayoutProcessingAction",
">",
"pendingActions",
")",
"throws",
"PortalExce... | Handles checking for updates to a named attribute, verifying such change is allowed, and
generates an action object to make that change.
@param ilfNode the node in the viewed layout
@param nodeId the id of the ilfNode
@param attName the attribute to be checked
@param newVal the attribute's new value
@param oldVal the ... | [
"Handles",
"checking",
"for",
"updates",
"to",
"a",
"named",
"attribute",
"verifying",
"such",
"change",
"is",
"allowed",
"and",
"generates",
"an",
"action",
"object",
"to",
"make",
"that",
"change",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/DistributedLayoutManager.java#L659-L721 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/DistributedLayoutManager.java | DistributedLayoutManager.getPublishedChannelParametersMap | private Map getPublishedChannelParametersMap(String channelPublishId) throws PortalException {
try {
IPortletDefinitionRegistry registry =
PortletDefinitionRegistryLocator.getPortletDefinitionRegistry();
IPortletDefinition def = registry.getPortletDefinition(channelPu... | java | private Map getPublishedChannelParametersMap(String channelPublishId) throws PortalException {
try {
IPortletDefinitionRegistry registry =
PortletDefinitionRegistryLocator.getPortletDefinitionRegistry();
IPortletDefinition def = registry.getPortletDefinition(channelPu... | [
"private",
"Map",
"getPublishedChannelParametersMap",
"(",
"String",
"channelPublishId",
")",
"throws",
"PortalException",
"{",
"try",
"{",
"IPortletDefinitionRegistry",
"registry",
"=",
"PortletDefinitionRegistryLocator",
".",
"getPortletDefinitionRegistry",
"(",
")",
";",
... | Return a map parameter names to channel parameter objects representing the parameters
specified at publish time for the channel with the passed-in publish id.
@param channelPublishId
@return
@throws PortalException | [
"Return",
"a",
"map",
"parameter",
"names",
"to",
"channel",
"parameter",
"objects",
"representing",
"the",
"parameters",
"specified",
"at",
"publish",
"time",
"for",
"the",
"channel",
"with",
"the",
"passed",
"-",
"in",
"publish",
"id",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/DistributedLayoutManager.java#L894-L903 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/DistributedLayoutManager.java | DistributedLayoutManager.canDeleteNode | protected boolean canDeleteNode(IUserLayoutNodeDescription node) throws PortalException {
if (node == null) return false;
// todo if isFragmentOwner should probably verify node is part of the
// same layout fragment as the fragment owner to insure a misbehaving front-end doesn't
// do a... | java | protected boolean canDeleteNode(IUserLayoutNodeDescription node) throws PortalException {
if (node == null) return false;
// todo if isFragmentOwner should probably verify node is part of the
// same layout fragment as the fragment owner to insure a misbehaving front-end doesn't
// do a... | [
"protected",
"boolean",
"canDeleteNode",
"(",
"IUserLayoutNodeDescription",
"node",
")",
"throws",
"PortalException",
"{",
"if",
"(",
"node",
"==",
"null",
")",
"return",
"false",
";",
"// todo if isFragmentOwner should probably verify node is part of the",
"// same layout fr... | Returns true if the node exists in the underlying DOM model and it does not contain a
'deleteAllowed' attribute with a value of 'false'. | [
"Returns",
"true",
"if",
"the",
"node",
"exists",
"in",
"the",
"underlying",
"DOM",
"model",
"and",
"it",
"does",
"not",
"contain",
"a",
"deleteAllowed",
"attribute",
"with",
"a",
"value",
"of",
"false",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/DistributedLayoutManager.java#L1065-L1073 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/DistributedLayoutManager.java | DistributedLayoutManager.canUpdateNode | @Override
public boolean canUpdateNode(IUserLayoutNodeDescription node) {
if (node == null) return false;
return isFragmentOwner
|| node.isEditAllowed()
|| node instanceof IUserLayoutChannelDescription;
} | java | @Override
public boolean canUpdateNode(IUserLayoutNodeDescription node) {
if (node == null) return false;
return isFragmentOwner
|| node.isEditAllowed()
|| node instanceof IUserLayoutChannelDescription;
} | [
"@",
"Override",
"public",
"boolean",
"canUpdateNode",
"(",
"IUserLayoutNodeDescription",
"node",
")",
"{",
"if",
"(",
"node",
"==",
"null",
")",
"return",
"false",
";",
"return",
"isFragmentOwner",
"||",
"node",
".",
"isEditAllowed",
"(",
")",
"||",
"node",
... | Returns true if we are dealing with a fragment layout or if editing of attributes is allowed,
or the node is a channel since ad-hoc parameters can always be added. | [
"Returns",
"true",
"if",
"we",
"are",
"dealing",
"with",
"a",
"fragment",
"layout",
"or",
"if",
"editing",
"of",
"attributes",
"is",
"allowed",
"or",
"the",
"node",
"is",
"a",
"channel",
"since",
"ad",
"-",
"hoc",
"parameters",
"can",
"always",
"be",
"ad... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/DistributedLayoutManager.java#L1079-L1086 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/DistributedLayoutManager.java | DistributedLayoutManager.getSubscribeId | @Override
public String getSubscribeId(String fname) {
final Document userLayout = this.getUserLayoutDOM();
return new PortletSubscribeIdResolver(fname).traverseDocument(userLayout);
} | java | @Override
public String getSubscribeId(String fname) {
final Document userLayout = this.getUserLayoutDOM();
return new PortletSubscribeIdResolver(fname).traverseDocument(userLayout);
} | [
"@",
"Override",
"public",
"String",
"getSubscribeId",
"(",
"String",
"fname",
")",
"{",
"final",
"Document",
"userLayout",
"=",
"this",
".",
"getUserLayoutDOM",
"(",
")",
";",
"return",
"new",
"PortletSubscribeIdResolver",
"(",
"fname",
")",
".",
"traverseDocum... | Returns the subscribe ID of a channel having the passed in functional name or null if it
can't find such a channel in the layout. | [
"Returns",
"the",
"subscribe",
"ID",
"of",
"a",
"channel",
"having",
"the",
"passed",
"in",
"functional",
"name",
"or",
"null",
"if",
"it",
"can",
"t",
"find",
"such",
"a",
"channel",
"in",
"the",
"layout",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/DistributedLayoutManager.java#L1241-L1245 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/DistributedLayoutManager.java | DistributedLayoutManager.resetLayout | public boolean resetLayout(String loginId) {
boolean resetSuccess = false;
boolean resetCurrentUserLayout = (null == loginId);
if (resetCurrentUserLayout || (!resetCurrentUserLayout && AdminEvaluator.isAdmin(owner))) {
if (LOG.isDebugEnabled()) {
LOG.debug("Reset lay... | java | public boolean resetLayout(String loginId) {
boolean resetSuccess = false;
boolean resetCurrentUserLayout = (null == loginId);
if (resetCurrentUserLayout || (!resetCurrentUserLayout && AdminEvaluator.isAdmin(owner))) {
if (LOG.isDebugEnabled()) {
LOG.debug("Reset lay... | [
"public",
"boolean",
"resetLayout",
"(",
"String",
"loginId",
")",
"{",
"boolean",
"resetSuccess",
"=",
"false",
";",
"boolean",
"resetCurrentUserLayout",
"=",
"(",
"null",
"==",
"loginId",
")",
";",
"if",
"(",
"resetCurrentUserLayout",
"||",
"(",
"!",
"resetC... | Resets the layout of the user with the specified user id if the current user is an
administrator or a member of any administrative sub-group. Has no effect if these
requirements are not met.
@return true if layout was reset, false otherwise.
@param loginId | [
"Resets",
"the",
"layout",
"of",
"the",
"user",
"with",
"the",
"specified",
"user",
"id",
"if",
"the",
"current",
"user",
"is",
"an",
"administrator",
"or",
"a",
"member",
"of",
"any",
"administrative",
"sub",
"-",
"group",
".",
"Has",
"no",
"effect",
"i... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/DistributedLayoutManager.java#L1352-L1390 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/DistributedLayoutManager.java | DistributedLayoutManager.resetLayout | private boolean resetLayout(IPerson person) {
final String userName = person.getUserName();
if (PersonFactory.getGuestUsernames().contains(userName)) {
throw new IllegalArgumentException("CANNOT RESET LAYOUT FOR A GUEST USER: " + person);
}
LOG.warn("Resetting user layout for... | java | private boolean resetLayout(IPerson person) {
final String userName = person.getUserName();
if (PersonFactory.getGuestUsernames().contains(userName)) {
throw new IllegalArgumentException("CANNOT RESET LAYOUT FOR A GUEST USER: " + person);
}
LOG.warn("Resetting user layout for... | [
"private",
"boolean",
"resetLayout",
"(",
"IPerson",
"person",
")",
"{",
"final",
"String",
"userName",
"=",
"person",
".",
"getUserName",
"(",
")",
";",
"if",
"(",
"PersonFactory",
".",
"getGuestUsernames",
"(",
")",
".",
"contains",
"(",
"userName",
")",
... | Resets the layout of the specified user. | [
"Resets",
"the",
"layout",
"of",
"the",
"specified",
"user",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/DistributedLayoutManager.java#L1393-L1423 | train |
Jasig/uPortal | uPortal-rendering/src/main/java/org/apereo/portal/url/SingleTabUrlNodeSyntaxHelper.java | SingleTabUrlNodeSyntaxHelper.getDefaultTabIndex | protected String getDefaultTabIndex(HttpServletRequest httpServletRequest) {
final String stylesheetParameter =
this.stylesheetUserPreferencesService.getStylesheetParameter(
httpServletRequest, PreferencesScope.STRUCTURE, this.defaultTabParameter);
if (stylesheetP... | java | protected String getDefaultTabIndex(HttpServletRequest httpServletRequest) {
final String stylesheetParameter =
this.stylesheetUserPreferencesService.getStylesheetParameter(
httpServletRequest, PreferencesScope.STRUCTURE, this.defaultTabParameter);
if (stylesheetP... | [
"protected",
"String",
"getDefaultTabIndex",
"(",
"HttpServletRequest",
"httpServletRequest",
")",
"{",
"final",
"String",
"stylesheetParameter",
"=",
"this",
".",
"stylesheetUserPreferencesService",
".",
"getStylesheetParameter",
"(",
"httpServletRequest",
",",
"PreferencesS... | Get the index of the default tab for the user | [
"Get",
"the",
"index",
"of",
"the",
"default",
"tab",
"for",
"the",
"user"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-rendering/src/main/java/org/apereo/portal/url/SingleTabUrlNodeSyntaxHelper.java#L159-L177 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/MemoryEntityLockStore.java | MemoryEntityLockStore.delete | @Override
public void delete(IEntityLock lock) throws LockingException {
Map m = getLockCache(lock.getEntityType());
synchronized (m) {
m.remove(getCacheKey(lock));
}
} | java | @Override
public void delete(IEntityLock lock) throws LockingException {
Map m = getLockCache(lock.getEntityType());
synchronized (m) {
m.remove(getCacheKey(lock));
}
} | [
"@",
"Override",
"public",
"void",
"delete",
"(",
"IEntityLock",
"lock",
")",
"throws",
"LockingException",
"{",
"Map",
"m",
"=",
"getLockCache",
"(",
"lock",
".",
"getEntityType",
"(",
")",
")",
";",
"synchronized",
"(",
"m",
")",
"{",
"m",
".",
"remove... | Deletes this IEntityLock from the store.
@param lock | [
"Deletes",
"this",
"IEntityLock",
"from",
"the",
"store",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/MemoryEntityLockStore.java#L56-L62 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/MemoryEntityLockStore.java | MemoryEntityLockStore.find | public IEntityLock find(IEntityLock lock) throws LockingException {
IEntityLock foundLock = null;
Map m = getLockCache(lock.getEntityType());
foundLock = getLockFromCache(getCacheKey(lock), m);
if (foundLock != null) {
if (lock.getLockType() != foundLock.getLockType()
... | java | public IEntityLock find(IEntityLock lock) throws LockingException {
IEntityLock foundLock = null;
Map m = getLockCache(lock.getEntityType());
foundLock = getLockFromCache(getCacheKey(lock), m);
if (foundLock != null) {
if (lock.getLockType() != foundLock.getLockType()
... | [
"public",
"IEntityLock",
"find",
"(",
"IEntityLock",
"lock",
")",
"throws",
"LockingException",
"{",
"IEntityLock",
"foundLock",
"=",
"null",
";",
"Map",
"m",
"=",
"getLockCache",
"(",
"lock",
".",
"getEntityType",
"(",
")",
")",
";",
"foundLock",
"=",
"getL... | Returns this lock if it exists in the store.
@param lock
@return IEntityLock | [
"Returns",
"this",
"lock",
"if",
"it",
"exists",
"in",
"the",
"store",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/MemoryEntityLockStore.java#L151-L164 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/MemoryEntityLockStore.java | MemoryEntityLockStore.update | @Override
public void update(IEntityLock lock, java.util.Date newExpiration, Integer newLockType)
throws LockingException {
if (find(lock) == null) {
throw new LockingException("Problem updating " + lock + " : not found in store.");
}
primAdd(lock, newExpiration);
... | java | @Override
public void update(IEntityLock lock, java.util.Date newExpiration, Integer newLockType)
throws LockingException {
if (find(lock) == null) {
throw new LockingException("Problem updating " + lock + " : not found in store.");
}
primAdd(lock, newExpiration);
... | [
"@",
"Override",
"public",
"void",
"update",
"(",
"IEntityLock",
"lock",
",",
"java",
".",
"util",
".",
"Date",
"newExpiration",
",",
"Integer",
"newLockType",
")",
"throws",
"LockingException",
"{",
"if",
"(",
"find",
"(",
"lock",
")",
"==",
"null",
")",
... | Make sure the store has a reference to the lock, and then add the lock to refresh the
SmartCache wrapper.
@param lock org.apereo.portal.concurrency.locking.IEntityLock
@param newExpiration java.util.Date
@param newLockType Integer | [
"Make",
"sure",
"the",
"store",
"has",
"a",
"reference",
"to",
"the",
"lock",
"and",
"then",
"add",
"the",
"lock",
"to",
"refresh",
"the",
"SmartCache",
"wrapper",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/MemoryEntityLockStore.java#L257-L264 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/MemoryEntityLockStore.java | MemoryEntityLockStore.primAdd | private void primAdd(IEntityLock lock, Date expiration) throws LockingException {
long now = System.currentTimeMillis();
long willExpire = expiration.getTime();
long cacheIntervalSecs = (willExpire - now) / 1000;
if (cacheIntervalSecs > 0) {
SmartCache sc = (SmartCache) getL... | java | private void primAdd(IEntityLock lock, Date expiration) throws LockingException {
long now = System.currentTimeMillis();
long willExpire = expiration.getTime();
long cacheIntervalSecs = (willExpire - now) / 1000;
if (cacheIntervalSecs > 0) {
SmartCache sc = (SmartCache) getL... | [
"private",
"void",
"primAdd",
"(",
"IEntityLock",
"lock",
",",
"Date",
"expiration",
")",
"throws",
"LockingException",
"{",
"long",
"now",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
";",
"long",
"willExpire",
"=",
"expiration",
".",
"getTime",
"(",
... | Adds this IEntityLock to the store.
@param lock
@param expiration | [
"Adds",
"this",
"IEntityLock",
"to",
"the",
"store",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/MemoryEntityLockStore.java#L272-L285 | train |
Jasig/uPortal | uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/services/EntityLockService.java | EntityLockService.newReadLock | public IEntityLock newReadLock(Class entityType, String entityKey, String owner)
throws LockingException {
return lockService.newLock(entityType, entityKey, IEntityLockService.READ_LOCK, owner);
} | java | public IEntityLock newReadLock(Class entityType, String entityKey, String owner)
throws LockingException {
return lockService.newLock(entityType, entityKey, IEntityLockService.READ_LOCK, owner);
} | [
"public",
"IEntityLock",
"newReadLock",
"(",
"Class",
"entityType",
",",
"String",
"entityKey",
",",
"String",
"owner",
")",
"throws",
"LockingException",
"{",
"return",
"lockService",
".",
"newLock",
"(",
"entityType",
",",
"entityKey",
",",
"IEntityLockService",
... | Returns a read lock for the entity type, entity key and owner.
@return org.apereo.portal.concurrency.locking.IEntityLock
@param entityType Class
@param entityKey String
@param owner String
@exception LockingException | [
"Returns",
"a",
"read",
"lock",
"for",
"the",
"entity",
"type",
"entity",
"key",
"and",
"owner",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/services/EntityLockService.java#L118-L121 | train |
Jasig/uPortal | uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/services/EntityLockService.java | EntityLockService.newWriteLock | public IEntityLock newWriteLock(Class entityType, String entityKey, String owner)
throws LockingException {
return lockService.newLock(entityType, entityKey, IEntityLockService.WRITE_LOCK, owner);
} | java | public IEntityLock newWriteLock(Class entityType, String entityKey, String owner)
throws LockingException {
return lockService.newLock(entityType, entityKey, IEntityLockService.WRITE_LOCK, owner);
} | [
"public",
"IEntityLock",
"newWriteLock",
"(",
"Class",
"entityType",
",",
"String",
"entityKey",
",",
"String",
"owner",
")",
"throws",
"LockingException",
"{",
"return",
"lockService",
".",
"newLock",
"(",
"entityType",
",",
"entityKey",
",",
"IEntityLockService",
... | Returns a write lock for the entity type, entity key and owner.
@return org.apereo.portal.concurrency.locking.IEntityLock
@param entityType Class
@param entityKey String
@param owner String
@exception LockingException | [
"Returns",
"a",
"write",
"lock",
"for",
"the",
"entity",
"type",
"entity",
"key",
"and",
"owner",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/services/EntityLockService.java#L177-L180 | train |
Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/PortletPreferencesJsonDaoImpl.java | PortletPreferencesJsonDaoImpl.storeJson | @Override
public void storeJson(PortletPreferences prefs, String key, Object data)
throws IOException, ReadOnlyException, ValidatorException {
final String configData = mapper.writeValueAsString(data);
prefs.setValue(key, configData);
prefs.store();
} | java | @Override
public void storeJson(PortletPreferences prefs, String key, Object data)
throws IOException, ReadOnlyException, ValidatorException {
final String configData = mapper.writeValueAsString(data);
prefs.setValue(key, configData);
prefs.store();
} | [
"@",
"Override",
"public",
"void",
"storeJson",
"(",
"PortletPreferences",
"prefs",
",",
"String",
"key",
",",
"Object",
"data",
")",
"throws",
"IOException",
",",
"ReadOnlyException",
",",
"ValidatorException",
"{",
"final",
"String",
"configData",
"=",
"mapper",... | Stores a Java object as JSON in a portlet preference
@param prefs Preferences to persist to
@param key Preference key to store in
@param data Object to store as JSON | [
"Stores",
"a",
"Java",
"object",
"as",
"JSON",
"in",
"a",
"portlet",
"preference"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/PortletPreferencesJsonDaoImpl.java#L48-L54 | train |
Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/PortletPreferencesJsonDaoImpl.java | PortletPreferencesJsonDaoImpl.getJson | @Override
public <E> E getJson(PortletPreferences prefs, String key, Class<E> type) throws IOException {
final String prefValue = StringUtils.trimToNull(prefs.getValue(key, null));
if (prefValue == null) {
return null;
}
return mapper.readValue(prefValue, type);
} | java | @Override
public <E> E getJson(PortletPreferences prefs, String key, Class<E> type) throws IOException {
final String prefValue = StringUtils.trimToNull(prefs.getValue(key, null));
if (prefValue == null) {
return null;
}
return mapper.readValue(prefValue, type);
} | [
"@",
"Override",
"public",
"<",
"E",
">",
"E",
"getJson",
"(",
"PortletPreferences",
"prefs",
",",
"String",
"key",
",",
"Class",
"<",
"E",
">",
"type",
")",
"throws",
"IOException",
"{",
"final",
"String",
"prefValue",
"=",
"StringUtils",
".",
"trimToNull... | Read the specified portlet preference and parse it as a JSON string into the specified type.
If the preference is null returns null.
@param prefs Preferences to read from
@param key Preference key to read from
@param type The class type parse the JSON into | [
"Read",
"the",
"specified",
"portlet",
"preference",
"and",
"parse",
"it",
"as",
"a",
"JSON",
"string",
"into",
"the",
"specified",
"type",
".",
"If",
"the",
"preference",
"is",
"null",
"returns",
"null",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/PortletPreferencesJsonDaoImpl.java#L64-L71 | train |
Jasig/uPortal | uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/account/UserAccountHelper.java | UserAccountHelper.getEditableUserAttributes | public List<Preference> getEditableUserAttributes(IPerson currentUser) {
EntityIdentifier ei = currentUser.getEntityIdentifier();
IAuthorizationPrincipal ap =
AuthorizationServiceFacade.instance().newPrincipal(ei.getKey(), ei.getType());
List<Preference> allowedAttributes = new... | java | public List<Preference> getEditableUserAttributes(IPerson currentUser) {
EntityIdentifier ei = currentUser.getEntityIdentifier();
IAuthorizationPrincipal ap =
AuthorizationServiceFacade.instance().newPrincipal(ei.getKey(), ei.getType());
List<Preference> allowedAttributes = new... | [
"public",
"List",
"<",
"Preference",
">",
"getEditableUserAttributes",
"(",
"IPerson",
"currentUser",
")",
"{",
"EntityIdentifier",
"ei",
"=",
"currentUser",
".",
"getEntityIdentifier",
"(",
")",
";",
"IAuthorizationPrincipal",
"ap",
"=",
"AuthorizationServiceFacade",
... | Returns the collection of attributes that the specified currentUser can edit.
@param currentUser
@return | [
"Returns",
"the",
"collection",
"of",
"attributes",
"that",
"the",
"specified",
"currentUser",
"can",
"edit",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/account/UserAccountHelper.java#L223-L236 | train |
Jasig/uPortal | uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/account/UserAccountHelper.java | UserAccountHelper.fixPortletPath | private String fixPortletPath(HttpServletRequest request, IPortalUrlBuilder urlBuilder) {
String path = urlBuilder.getUrlString();
String context = request.getContextPath();
if (StringUtils.isBlank(context)) {
context = "/";
}
if (!path.startsWith(context + "/f/")) {... | java | private String fixPortletPath(HttpServletRequest request, IPortalUrlBuilder urlBuilder) {
String path = urlBuilder.getUrlString();
String context = request.getContextPath();
if (StringUtils.isBlank(context)) {
context = "/";
}
if (!path.startsWith(context + "/f/")) {... | [
"private",
"String",
"fixPortletPath",
"(",
"HttpServletRequest",
"request",
",",
"IPortalUrlBuilder",
"urlBuilder",
")",
"{",
"String",
"path",
"=",
"urlBuilder",
".",
"getUrlString",
"(",
")",
";",
"String",
"context",
"=",
"request",
".",
"getContextPath",
"(",... | This entire method is a hack! The login portlet URL only seems to load correctly if you pass
in the folder name for the guest layout. For the short term, allow configuration of the
folder name and manually re-write the URL to include the folder if it doesn't already.
<p>This is terrible and needs to go away as soon as... | [
"This",
"entire",
"method",
"is",
"a",
"hack!",
"The",
"login",
"portlet",
"URL",
"only",
"seems",
"to",
"load",
"correctly",
"if",
"you",
"pass",
"in",
"the",
"folder",
"name",
"for",
"the",
"guest",
"layout",
".",
"For",
"the",
"short",
"term",
"allow"... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/account/UserAccountHelper.java#L515-L527 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/FragmentActivator.java | FragmentActivator.saveLayout | private void saveLayout(UserView view, IPerson owner) throws Exception {
IUserProfile profile = new UserProfile();
profile.setProfileId(view.getProfileId());
userLayoutStore.setUserLayout(owner, profile, view.getLayout(), true, false);
} | java | private void saveLayout(UserView view, IPerson owner) throws Exception {
IUserProfile profile = new UserProfile();
profile.setProfileId(view.getProfileId());
userLayoutStore.setUserLayout(owner, profile, view.getLayout(), true, false);
} | [
"private",
"void",
"saveLayout",
"(",
"UserView",
"view",
",",
"IPerson",
"owner",
")",
"throws",
"Exception",
"{",
"IUserProfile",
"profile",
"=",
"new",
"UserProfile",
"(",
")",
";",
"profile",
".",
"setProfileId",
"(",
"view",
".",
"getProfileId",
"(",
")... | Saves the loaded layout in the database for the user and profile.
@param view
@param owner
@throws Exception | [
"Saves",
"the",
"loaded",
"layout",
"in",
"the",
"database",
"for",
"the",
"user",
"and",
"profile",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/FragmentActivator.java#L255-L259 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/FragmentActivator.java | FragmentActivator.fragmentizeLayout | private void fragmentizeLayout(UserView view, FragmentDefinition fragment) {
// if fragment not bound to user or layout empty due to error, return
if (view.getUserId() == -1 || view.getLayout() == null) {
return;
}
// Choose what types of content to apply from the fragment
... | java | private void fragmentizeLayout(UserView view, FragmentDefinition fragment) {
// if fragment not bound to user or layout empty due to error, return
if (view.getUserId() == -1 || view.getLayout() == null) {
return;
}
// Choose what types of content to apply from the fragment
... | [
"private",
"void",
"fragmentizeLayout",
"(",
"UserView",
"view",
",",
"FragmentDefinition",
"fragment",
")",
"{",
"// if fragment not bound to user or layout empty due to error, return",
"if",
"(",
"view",
".",
"getUserId",
"(",
")",
"==",
"-",
"1",
"||",
"view",
".",... | Removes unwanted and hidden folders, then changes all node ids to their globally safe
incorporated version. | [
"Removes",
"unwanted",
"and",
"hidden",
"folders",
"then",
"changes",
"all",
"node",
"ids",
"to",
"their",
"globally",
"safe",
"incorporated",
"version",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/FragmentActivator.java#L377-L432 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/FragmentActivator.java | FragmentActivator.setIdsAndAttribs | private void setIdsAndAttribs(
Element parent, String labelBase, String index, String precedence) {
NodeList children = parent.getChildNodes();
for (int i = 0; i < children.getLength(); i++) {
if (children.item(i).getNodeType() == Node.ELEMENT_NODE) {
Element chi... | java | private void setIdsAndAttribs(
Element parent, String labelBase, String index, String precedence) {
NodeList children = parent.getChildNodes();
for (int i = 0; i < children.getLength(); i++) {
if (children.item(i).getNodeType() == Node.ELEMENT_NODE) {
Element chi... | [
"private",
"void",
"setIdsAndAttribs",
"(",
"Element",
"parent",
",",
"String",
"labelBase",
",",
"String",
"index",
",",
"String",
"precedence",
")",
"{",
"NodeList",
"children",
"=",
"parent",
".",
"getChildNodes",
"(",
")",
";",
"for",
"(",
"int",
"i",
... | Recursive method that passes through a layout tree and changes all ids from the regular
format of sXX or nXX to the globally safe incorporated id of form uXlXsXX or uXlXnXX
indicating the user id and layout id from which this node came. | [
"Recursive",
"method",
"that",
"passes",
"through",
"a",
"layout",
"tree",
"and",
"changes",
"all",
"ids",
"from",
"the",
"regular",
"format",
"of",
"sXX",
"or",
"nXX",
"to",
"the",
"globally",
"safe",
"incorporated",
"id",
"of",
"form",
"uXlXsXX",
"or",
"... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/FragmentActivator.java#L439-L457 | train |
Jasig/uPortal | uPortal-rendering/src/main/java/org/apereo/portal/portlet/container/services/CachedPasswordUserInfoService.java | CachedPasswordUserInfoService.isPasswordRequested | public boolean isPasswordRequested(PortletRequest request, PortletWindow plutoPortletWindow)
throws PortletContainerException {
// get the list of requested user attributes
final HttpServletRequest httpServletRequest =
this.portalRequestUtils.getPortletHttpRequest(request);
... | java | public boolean isPasswordRequested(PortletRequest request, PortletWindow plutoPortletWindow)
throws PortletContainerException {
// get the list of requested user attributes
final HttpServletRequest httpServletRequest =
this.portalRequestUtils.getPortletHttpRequest(request);
... | [
"public",
"boolean",
"isPasswordRequested",
"(",
"PortletRequest",
"request",
",",
"PortletWindow",
"plutoPortletWindow",
")",
"throws",
"PortletContainerException",
"{",
"// get the list of requested user attributes",
"final",
"HttpServletRequest",
"httpServletRequest",
"=",
"th... | Determine whether the portlet has expects a password as one of the user attributes.
@param request portlet request
@param plutoPortletWindow portlet window
@return <code>true</code> if a password is expected, <code>false</code> otherwise
@throws PortletContainerException if expeced attributes cannot be determined | [
"Determine",
"whether",
"the",
"portlet",
"has",
"expects",
"a",
"password",
"as",
"one",
"of",
"the",
"user",
"attributes",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-rendering/src/main/java/org/apereo/portal/portlet/container/services/CachedPasswordUserInfoService.java#L185-L210 | train |
Jasig/uPortal | uPortal-rendering/src/main/java/org/apereo/portal/portlet/container/services/CachedPasswordUserInfoService.java | CachedPasswordUserInfoService.getPassword | private String getPassword(ISecurityContext baseContext) {
String password = null;
IOpaqueCredentials oc = baseContext.getOpaqueCredentials();
if (oc instanceof NotSoOpaqueCredentials) {
NotSoOpaqueCredentials nsoc = (NotSoOpaqueCredentials) oc;
password = nsoc.getCreden... | java | private String getPassword(ISecurityContext baseContext) {
String password = null;
IOpaqueCredentials oc = baseContext.getOpaqueCredentials();
if (oc instanceof NotSoOpaqueCredentials) {
NotSoOpaqueCredentials nsoc = (NotSoOpaqueCredentials) oc;
password = nsoc.getCreden... | [
"private",
"String",
"getPassword",
"(",
"ISecurityContext",
"baseContext",
")",
"{",
"String",
"password",
"=",
"null",
";",
"IOpaqueCredentials",
"oc",
"=",
"baseContext",
".",
"getOpaqueCredentials",
"(",
")",
";",
"if",
"(",
"oc",
"instanceof",
"NotSoOpaqueCre... | Retrieves the users password by iterating over the user's security contexts and returning the
first available cached password.
@param baseContext The security context to start looking for a password from.
@return the users password | [
"Retrieves",
"the",
"users",
"password",
"by",
"iterating",
"over",
"the",
"user",
"s",
"security",
"contexts",
"and",
"returning",
"the",
"first",
"available",
"cached",
"password",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-rendering/src/main/java/org/apereo/portal/portlet/container/services/CachedPasswordUserInfoService.java#L219-L236 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/LPAChangeParameter.java | LPAChangeParameter.perform | @Override
public void perform() throws PortalException {
// push the change into the PLF
if (nodeId.startsWith(Constants.FRAGMENT_ID_USER_PREFIX)) {
// we are dealing with an incorporated node, adding will replace
// an existing one for the same target node id and name
... | java | @Override
public void perform() throws PortalException {
// push the change into the PLF
if (nodeId.startsWith(Constants.FRAGMENT_ID_USER_PREFIX)) {
// we are dealing with an incorporated node, adding will replace
// an existing one for the same target node id and name
... | [
"@",
"Override",
"public",
"void",
"perform",
"(",
")",
"throws",
"PortalException",
"{",
"// push the change into the PLF",
"if",
"(",
"nodeId",
".",
"startsWith",
"(",
"Constants",
".",
"FRAGMENT_ID_USER_PREFIX",
")",
")",
"{",
"// we are dealing with an incorporated ... | Change the parameter for a channel in both the ILF and PLF using the appropriate mechanisms
for incorporated nodes versus owned nodes. | [
"Change",
"the",
"parameter",
"for",
"a",
"channel",
"in",
"both",
"the",
"ILF",
"and",
"PLF",
"using",
"the",
"appropriate",
"mechanisms",
"for",
"incorporated",
"nodes",
"versus",
"owned",
"nodes",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/LPAChangeParameter.java#L43-L58 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/LPAChangeParameter.java | LPAChangeParameter.changeParameterChild | static void changeParameterChild(Element node, String name, String value) {
if (node != null) {
boolean foundIt = false;
for (Element parm = (Element) node.getFirstChild();
parm != null;
parm = (Element) parm.getNextSibling()) {
At... | java | static void changeParameterChild(Element node, String name, String value) {
if (node != null) {
boolean foundIt = false;
for (Element parm = (Element) node.getFirstChild();
parm != null;
parm = (Element) parm.getNextSibling()) {
At... | [
"static",
"void",
"changeParameterChild",
"(",
"Element",
"node",
",",
"String",
"name",
",",
"String",
"value",
")",
"{",
"if",
"(",
"node",
"!=",
"null",
")",
"{",
"boolean",
"foundIt",
"=",
"false",
";",
"for",
"(",
"Element",
"parm",
"=",
"(",
"Ele... | Look in the passed-in element for a parameter child element whose value is to be changed to
the passed-in value.
@param node the parent node in which to create the parameter.
@param name the name of the parameter to be created.
@param value the value of the parameter to be created. | [
"Look",
"in",
"the",
"passed",
"-",
"in",
"element",
"for",
"a",
"parameter",
"child",
"element",
"whose",
"value",
"is",
"to",
"be",
"changed",
"to",
"the",
"passed",
"-",
"in",
"value",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/LPAChangeParameter.java#L68-L85 | train |
Jasig/uPortal | uPortal-webapp/src/main/java/org/apereo/portal/context/rendering/RenderingPipelineConfiguration.java | RenderingPipelineConfiguration.getResourcesElementsProvider | @Bean(name = "resourcesElementsProvider")
public ResourcesElementsProvider getResourcesElementsProvider() {
ResourcesElementsProviderImpl rslt = new ResourcesElementsProviderImpl();
rslt.setResourcesDao(getResourcesDao());
return rslt;
} | java | @Bean(name = "resourcesElementsProvider")
public ResourcesElementsProvider getResourcesElementsProvider() {
ResourcesElementsProviderImpl rslt = new ResourcesElementsProviderImpl();
rslt.setResourcesDao(getResourcesDao());
return rslt;
} | [
"@",
"Bean",
"(",
"name",
"=",
"\"resourcesElementsProvider\"",
")",
"public",
"ResourcesElementsProvider",
"getResourcesElementsProvider",
"(",
")",
"{",
"ResourcesElementsProviderImpl",
"rslt",
"=",
"new",
"ResourcesElementsProviderImpl",
"(",
")",
";",
"rslt",
".",
"... | This bean is not an element of the rendering pipeline. | [
"This",
"bean",
"is",
"not",
"an",
"element",
"of",
"the",
"rendering",
"pipeline",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-webapp/src/main/java/org/apereo/portal/context/rendering/RenderingPipelineConfiguration.java#L324-L329 | train |
Jasig/uPortal | uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/swapper/AttributeSwapRequestValidator.java | AttributeSwapRequestValidator.checkAttributesMap | protected void checkAttributesMap(
MessageContext context,
String basePath,
Set<String> swappableAttributes,
Map<String, Attribute> attributesToCopy) {
for (final String attribute : attributesToCopy.keySet()) {
if (!swappableAttributes.contains(attribu... | java | protected void checkAttributesMap(
MessageContext context,
String basePath,
Set<String> swappableAttributes,
Map<String, Attribute> attributesToCopy) {
for (final String attribute : attributesToCopy.keySet()) {
if (!swappableAttributes.contains(attribu... | [
"protected",
"void",
"checkAttributesMap",
"(",
"MessageContext",
"context",
",",
"String",
"basePath",
",",
"Set",
"<",
"String",
">",
"swappableAttributes",
",",
"Map",
"<",
"String",
",",
"Attribute",
">",
"attributesToCopy",
")",
"{",
"for",
"(",
"final",
... | Checks the keys in the Map on the model against a Set to ensure there are no values in the
Map that aren't also in the Set | [
"Checks",
"the",
"keys",
"in",
"the",
"Map",
"on",
"the",
"model",
"against",
"a",
"Set",
"to",
"ensure",
"there",
"are",
"no",
"values",
"in",
"the",
"Map",
"that",
"aren",
"t",
"also",
"in",
"the",
"Set"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/swapper/AttributeSwapRequestValidator.java#L63-L80 | train |
Jasig/uPortal | uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/rest/LayoutRESTController.java | LayoutRESTController.getRESTController | @Deprecated
@RequestMapping(value = "/layoutDoc", method = RequestMethod.GET)
public ModelAndView getRESTController(
HttpServletRequest request, @RequestParam(value = "tab", required = false) String tab) {
final IPerson person = personManager.getPerson(request);
List<LayoutPortlet> p... | java | @Deprecated
@RequestMapping(value = "/layoutDoc", method = RequestMethod.GET)
public ModelAndView getRESTController(
HttpServletRequest request, @RequestParam(value = "tab", required = false) String tab) {
final IPerson person = personManager.getPerson(request);
List<LayoutPortlet> p... | [
"@",
"Deprecated",
"@",
"RequestMapping",
"(",
"value",
"=",
"\"/layoutDoc\"",
",",
"method",
"=",
"RequestMethod",
".",
"GET",
")",
"public",
"ModelAndView",
"getRESTController",
"(",
"HttpServletRequest",
"request",
",",
"@",
"RequestParam",
"(",
"value",
"=",
... | A REST call to get a json feed of the current users layout. Intent was to provide a layout
document without per-tab information for mobile device rendering.
@param request The servlet request. Utilized to get the users instance and eventually there
layout
@param tab The tab name of which you would like to filter; opti... | [
"A",
"REST",
"call",
"to",
"get",
"a",
"json",
"feed",
"of",
"the",
"current",
"users",
"layout",
".",
"Intent",
"was",
"to",
"provide",
"a",
"layout",
"document",
"without",
"per",
"-",
"tab",
"information",
"for",
"mobile",
"device",
"rendering",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/rest/LayoutRESTController.java#L103-L185 | train |
Jasig/uPortal | uPortal-groups/uPortal-groups-pags/src/main/java/org/apereo/portal/groups/pags/dao/PagsService.java | PagsService.getPagsDefinitions | public Set<IPersonAttributesGroupDefinition> getPagsDefinitions(IPerson person) {
Set<IPersonAttributesGroupDefinition> rslt = new HashSet<>();
for (IPersonAttributesGroupDefinition def :
pagsGroupDefDao.getPersonAttributesGroupDefinitions()) {
if (hasPermission(
... | java | public Set<IPersonAttributesGroupDefinition> getPagsDefinitions(IPerson person) {
Set<IPersonAttributesGroupDefinition> rslt = new HashSet<>();
for (IPersonAttributesGroupDefinition def :
pagsGroupDefDao.getPersonAttributesGroupDefinitions()) {
if (hasPermission(
... | [
"public",
"Set",
"<",
"IPersonAttributesGroupDefinition",
">",
"getPagsDefinitions",
"(",
"IPerson",
"person",
")",
"{",
"Set",
"<",
"IPersonAttributesGroupDefinition",
">",
"rslt",
"=",
"new",
"HashSet",
"<>",
"(",
")",
";",
"for",
"(",
"IPersonAttributesGroupDefin... | All the definitions, filtered by the user's access rights.
@param person
@return | [
"All",
"the",
"definitions",
"filtered",
"by",
"the",
"user",
"s",
"access",
"rights",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-pags/src/main/java/org/apereo/portal/groups/pags/dao/PagsService.java#L67-L80 | train |
Jasig/uPortal | uPortal-security/uPortal-security-authn/src/main/java/org/apereo/portal/security/provider/SimpleSecurityContext.java | SimpleSecurityContext.authenticate | @Override
public synchronized void authenticate() throws PortalSecurityException {
this.isauth = false;
if (this.myPrincipal.UID != null && this.myOpaqueCredentials.credentialstring != null) {
try {
ILocalAccountDao accountStore = LocalAccountDaoLocator.getLocalAccountD... | java | @Override
public synchronized void authenticate() throws PortalSecurityException {
this.isauth = false;
if (this.myPrincipal.UID != null && this.myOpaqueCredentials.credentialstring != null) {
try {
ILocalAccountDao accountStore = LocalAccountDaoLocator.getLocalAccountD... | [
"@",
"Override",
"public",
"synchronized",
"void",
"authenticate",
"(",
")",
"throws",
"PortalSecurityException",
"{",
"this",
".",
"isauth",
"=",
"false",
";",
"if",
"(",
"this",
".",
"myPrincipal",
".",
"UID",
"!=",
"null",
"&&",
"this",
".",
"myOpaqueCred... | Authenticate user.
@exception PortalSecurityException | [
"Authenticate",
"user",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-security/uPortal-security-authn/src/main/java/org/apereo/portal/security/provider/SimpleSecurityContext.java#L51-L102 | train |
Jasig/uPortal | uPortal-rendering/src/main/java/org/apereo/portal/portlet/container/properties/PropertyToAttributePropertiesManager.java | PropertyToAttributePropertiesManager.setPropertyMappings | @Resource(name = "portletPropertyToAttributeMappings")
public void setPropertyMappings(Map<String, String> propertyMappings) {
this.propertyToAttributeMappings = ImmutableBiMap.copyOf(propertyMappings);
this.attributeToPropertyMappings = this.propertyToAttributeMappings.inverse();
} | java | @Resource(name = "portletPropertyToAttributeMappings")
public void setPropertyMappings(Map<String, String> propertyMappings) {
this.propertyToAttributeMappings = ImmutableBiMap.copyOf(propertyMappings);
this.attributeToPropertyMappings = this.propertyToAttributeMappings.inverse();
} | [
"@",
"Resource",
"(",
"name",
"=",
"\"portletPropertyToAttributeMappings\"",
")",
"public",
"void",
"setPropertyMappings",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"propertyMappings",
")",
"{",
"this",
".",
"propertyToAttributeMappings",
"=",
"ImmutableBiMap",
... | Map of portlet property names to attribute names, if the value is null the key will be used
for both the property and attribute name | [
"Map",
"of",
"portlet",
"property",
"names",
"to",
"attribute",
"names",
"if",
"the",
"value",
"is",
"null",
"the",
"key",
"will",
"be",
"used",
"for",
"both",
"the",
"property",
"and",
"attribute",
"name"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-rendering/src/main/java/org/apereo/portal/portlet/container/properties/PropertyToAttributePropertiesManager.java#L51-L55 | train |
Jasig/uPortal | uPortal-rendering/src/main/java/org/apereo/portal/portlet/container/properties/PropertyToAttributePropertiesManager.java | PropertyToAttributePropertiesManager.setNonNamespacedProperties | @Resource(name = "nonNamespacedPortletProperties")
public void setNonNamespacedProperties(Set<String> nonNamespacedProperties) {
this.nonNamespacedProperties = ImmutableSet.copyOf(nonNamespacedProperties);
} | java | @Resource(name = "nonNamespacedPortletProperties")
public void setNonNamespacedProperties(Set<String> nonNamespacedProperties) {
this.nonNamespacedProperties = ImmutableSet.copyOf(nonNamespacedProperties);
} | [
"@",
"Resource",
"(",
"name",
"=",
"\"nonNamespacedPortletProperties\"",
")",
"public",
"void",
"setNonNamespacedProperties",
"(",
"Set",
"<",
"String",
">",
"nonNamespacedProperties",
")",
"{",
"this",
".",
"nonNamespacedProperties",
"=",
"ImmutableSet",
".",
"copyOf... | Properties that should not be namespaced with the portlet's windowId when stored as request
attributes | [
"Properties",
"that",
"should",
"not",
"be",
"namespaced",
"with",
"the",
"portlet",
"s",
"windowId",
"when",
"stored",
"as",
"request",
"attributes"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-rendering/src/main/java/org/apereo/portal/portlet/container/properties/PropertyToAttributePropertiesManager.java#L61-L64 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.