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-rendering/src/main/java/org/apereo/portal/portlet/container/properties/PropertyToAttributePropertiesManager.java | PropertyToAttributePropertiesManager.getPropertyName | private String getPropertyName(final String windowIdStr, final String fullAttributeName) {
final String attributeName;
if (this.nonNamespacedProperties.contains(fullAttributeName)) {
attributeName = fullAttributeName;
} else if (fullAttributeName.startsWith(windowIdStr)) {
... | java | private String getPropertyName(final String windowIdStr, final String fullAttributeName) {
final String attributeName;
if (this.nonNamespacedProperties.contains(fullAttributeName)) {
attributeName = fullAttributeName;
} else if (fullAttributeName.startsWith(windowIdStr)) {
... | [
"private",
"String",
"getPropertyName",
"(",
"final",
"String",
"windowIdStr",
",",
"final",
"String",
"fullAttributeName",
")",
"{",
"final",
"String",
"attributeName",
";",
"if",
"(",
"this",
".",
"nonNamespacedProperties",
".",
"contains",
"(",
"fullAttributeName... | Convert a request attribute name to a portlet property name | [
"Convert",
"a",
"request",
"attribute",
"name",
"to",
"a",
"portlet",
"property",
"name"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-rendering/src/main/java/org/apereo/portal/portlet/container/properties/PropertyToAttributePropertiesManager.java#L179-L198 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-core/src/main/java/org/apereo/portal/layout/LayoutStructure.java | LayoutStructure.addParameter | public void addParameter(String paramName, String paramValue) {
this.parameters.add(new StructureParameter(paramName, paramValue));
} | java | public void addParameter(String paramName, String paramValue) {
this.parameters.add(new StructureParameter(paramName, paramValue));
} | [
"public",
"void",
"addParameter",
"(",
"String",
"paramName",
",",
"String",
"paramValue",
")",
"{",
"this",
".",
"parameters",
".",
"add",
"(",
"new",
"StructureParameter",
"(",
"paramName",
",",
"paramValue",
")",
")",
";",
"}"
] | Add a parameter to this LayoutStructure.
@param paramName the name of the parameter
@param paramValue the value of the parameter | [
"Add",
"a",
"parameter",
"to",
"this",
"LayoutStructure",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-core/src/main/java/org/apereo/portal/layout/LayoutStructure.java#L168-L170 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-core/src/main/java/org/apereo/portal/layout/dao/jpa/JpaStylesheetUserPreferencesDao.java | JpaStylesheetUserPreferencesDao.addFetches | protected void addFetches(final Root<StylesheetUserPreferencesImpl> descriptorRoot) {
descriptorRoot.fetch(StylesheetUserPreferencesImpl_.layoutAttributes, JoinType.LEFT);
descriptorRoot.fetch(StylesheetUserPreferencesImpl_.outputProperties, JoinType.LEFT);
descriptorRoot.fetch(StylesheetUserPre... | java | protected void addFetches(final Root<StylesheetUserPreferencesImpl> descriptorRoot) {
descriptorRoot.fetch(StylesheetUserPreferencesImpl_.layoutAttributes, JoinType.LEFT);
descriptorRoot.fetch(StylesheetUserPreferencesImpl_.outputProperties, JoinType.LEFT);
descriptorRoot.fetch(StylesheetUserPre... | [
"protected",
"void",
"addFetches",
"(",
"final",
"Root",
"<",
"StylesheetUserPreferencesImpl",
">",
"descriptorRoot",
")",
"{",
"descriptorRoot",
".",
"fetch",
"(",
"StylesheetUserPreferencesImpl_",
".",
"layoutAttributes",
",",
"JoinType",
".",
"LEFT",
")",
";",
"d... | Add the needed fetches to a critera query | [
"Add",
"the",
"needed",
"fetches",
"to",
"a",
"critera",
"query"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-core/src/main/java/org/apereo/portal/layout/dao/jpa/JpaStylesheetUserPreferencesDao.java#L132-L136 | train |
Jasig/uPortal | uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/RDBMEntityGroupStore.java | RDBMEntityGroupStore.initialize | private void initialize() {
String sep;
try {
sep = GroupServiceConfiguration.getConfiguration().getNodeSeparator();
} catch (Exception ex) {
sep = DEFAULT_NODE_SEPARATOR;
}
groupNodeSeparator = sep;
if (LOG.isDebugEnabled()) {
LOG.debu... | java | private void initialize() {
String sep;
try {
sep = GroupServiceConfiguration.getConfiguration().getNodeSeparator();
} catch (Exception ex) {
sep = DEFAULT_NODE_SEPARATOR;
}
groupNodeSeparator = sep;
if (LOG.isDebugEnabled()) {
LOG.debu... | [
"private",
"void",
"initialize",
"(",
")",
"{",
"String",
"sep",
";",
"try",
"{",
"sep",
"=",
"GroupServiceConfiguration",
".",
"getConfiguration",
"(",
")",
".",
"getNodeSeparator",
"(",
")",
";",
"}",
"catch",
"(",
"Exception",
"ex",
")",
"{",
"sep",
"... | Get the node separator character from the GroupServiceConfiguration. Default it to
IGroupConstants.DEFAULT_NODE_SEPARATOR. | [
"Get",
"the",
"node",
"separator",
"character",
"from",
"the",
"GroupServiceConfiguration",
".",
"Default",
"it",
"to",
"IGroupConstants",
".",
"DEFAULT_NODE_SEPARATOR",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/RDBMEntityGroupStore.java#L141-L152 | train |
Jasig/uPortal | uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/RDBMEntityGroupStore.java | RDBMEntityGroupStore.delete | @Override
public void delete(IEntityGroup group) throws GroupsException {
if (existsInDatabase(group)) {
try {
primDelete(group);
} catch (SQLException sqle) {
throw new GroupsException("Problem deleting " + group, sqle);
}
}
} | java | @Override
public void delete(IEntityGroup group) throws GroupsException {
if (existsInDatabase(group)) {
try {
primDelete(group);
} catch (SQLException sqle) {
throw new GroupsException("Problem deleting " + group, sqle);
}
}
} | [
"@",
"Override",
"public",
"void",
"delete",
"(",
"IEntityGroup",
"group",
")",
"throws",
"GroupsException",
"{",
"if",
"(",
"existsInDatabase",
"(",
"group",
")",
")",
"{",
"try",
"{",
"primDelete",
"(",
"group",
")",
";",
"}",
"catch",
"(",
"SQLException... | If this entity exists, delete it.
@param group IEntityGroup | [
"If",
"this",
"entity",
"exists",
"delete",
"it",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/RDBMEntityGroupStore.java#L259-L268 | train |
Jasig/uPortal | uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/RDBMEntityGroupStore.java | RDBMEntityGroupStore.existsInDatabase | private boolean existsInDatabase(IEntityGroup group) throws GroupsException {
IEntityGroup ug = this.find(group.getLocalKey());
return ug != null;
} | java | private boolean existsInDatabase(IEntityGroup group) throws GroupsException {
IEntityGroup ug = this.find(group.getLocalKey());
return ug != null;
} | [
"private",
"boolean",
"existsInDatabase",
"(",
"IEntityGroup",
"group",
")",
"throws",
"GroupsException",
"{",
"IEntityGroup",
"ug",
"=",
"this",
".",
"find",
"(",
"group",
".",
"getLocalKey",
"(",
")",
")",
";",
"return",
"ug",
"!=",
"null",
";",
"}"
] | Answer if the IEntityGroup entity exists in the database.
@return boolean
@param group IEntityGroup | [
"Answer",
"if",
"the",
"IEntityGroup",
"entity",
"exists",
"in",
"the",
"database",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/RDBMEntityGroupStore.java#L276-L279 | train |
Jasig/uPortal | uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/RDBMEntityGroupStore.java | RDBMEntityGroupStore.findParentGroups | public java.util.Iterator findParentGroups(IEntity ent) throws GroupsException {
String memberKey = ent.getKey();
Integer type = EntityTypesLocator.getEntityTypes().getEntityIDFromType(ent.getLeafType());
return findParentGroupsForEntity(memberKey, type.intValue());
} | java | public java.util.Iterator findParentGroups(IEntity ent) throws GroupsException {
String memberKey = ent.getKey();
Integer type = EntityTypesLocator.getEntityTypes().getEntityIDFromType(ent.getLeafType());
return findParentGroupsForEntity(memberKey, type.intValue());
} | [
"public",
"java",
".",
"util",
".",
"Iterator",
"findParentGroups",
"(",
"IEntity",
"ent",
")",
"throws",
"GroupsException",
"{",
"String",
"memberKey",
"=",
"ent",
".",
"getKey",
"(",
")",
";",
"Integer",
"type",
"=",
"EntityTypesLocator",
".",
"getEntityType... | Find the groups that this entity belongs to.
@param ent the entity in question
@return java.util.Iterator | [
"Find",
"the",
"groups",
"that",
"this",
"entity",
"belongs",
"to",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/RDBMEntityGroupStore.java#L298-L302 | train |
Jasig/uPortal | uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/RDBMEntityGroupStore.java | RDBMEntityGroupStore.findParentGroups | public java.util.Iterator findParentGroups(IEntityGroup group) throws GroupsException {
String memberKey = group.getLocalKey();
String serviceName = group.getServiceName().toString();
Integer type = EntityTypesLocator.getEntityTypes().getEntityIDFromType(group.getLeafType());
return find... | java | public java.util.Iterator findParentGroups(IEntityGroup group) throws GroupsException {
String memberKey = group.getLocalKey();
String serviceName = group.getServiceName().toString();
Integer type = EntityTypesLocator.getEntityTypes().getEntityIDFromType(group.getLeafType());
return find... | [
"public",
"java",
".",
"util",
".",
"Iterator",
"findParentGroups",
"(",
"IEntityGroup",
"group",
")",
"throws",
"GroupsException",
"{",
"String",
"memberKey",
"=",
"group",
".",
"getLocalKey",
"(",
")",
";",
"String",
"serviceName",
"=",
"group",
".",
"getSer... | Find the groups that this group belongs to.
@param group IEntityGroup
@return java.util.Iterator | [
"Find",
"the",
"groups",
"that",
"this",
"group",
"belongs",
"to",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/RDBMEntityGroupStore.java#L310-L315 | train |
Jasig/uPortal | uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/RDBMEntityGroupStore.java | RDBMEntityGroupStore.findParentGroups | @Override
public Iterator findParentGroups(IGroupMember gm) throws GroupsException {
if (gm.isGroup()) {
IEntityGroup group = (IEntityGroup) gm;
return findParentGroups(group);
} else {
IEntity ent = (IEntity) gm;
return findParentGroups(ent);
... | java | @Override
public Iterator findParentGroups(IGroupMember gm) throws GroupsException {
if (gm.isGroup()) {
IEntityGroup group = (IEntityGroup) gm;
return findParentGroups(group);
} else {
IEntity ent = (IEntity) gm;
return findParentGroups(ent);
... | [
"@",
"Override",
"public",
"Iterator",
"findParentGroups",
"(",
"IGroupMember",
"gm",
")",
"throws",
"GroupsException",
"{",
"if",
"(",
"gm",
".",
"isGroup",
"(",
")",
")",
"{",
"IEntityGroup",
"group",
"=",
"(",
"IEntityGroup",
")",
"gm",
";",
"return",
"... | Find the groups that this group member belongs to.
@param gm the group member in question
@return java.util.Iterator | [
"Find",
"the",
"groups",
"that",
"this",
"group",
"member",
"belongs",
"to",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/RDBMEntityGroupStore.java#L323-L332 | train |
Jasig/uPortal | uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/RDBMEntityGroupStore.java | RDBMEntityGroupStore.findParentGroupsForEntity | private java.util.Iterator findParentGroupsForEntity(String memberKey, int type)
throws GroupsException {
Connection conn = null;
Collection groups = new ArrayList();
IEntityGroup eg = null;
try {
conn = RDBMServices.getConnection();
String sql = getF... | java | private java.util.Iterator findParentGroupsForEntity(String memberKey, int type)
throws GroupsException {
Connection conn = null;
Collection groups = new ArrayList();
IEntityGroup eg = null;
try {
conn = RDBMServices.getConnection();
String sql = getF... | [
"private",
"java",
".",
"util",
".",
"Iterator",
"findParentGroupsForEntity",
"(",
"String",
"memberKey",
",",
"int",
"type",
")",
"throws",
"GroupsException",
"{",
"Connection",
"conn",
"=",
"null",
";",
"Collection",
"groups",
"=",
"new",
"ArrayList",
"(",
"... | Find the groups associated with this member key.
@param memberKey
@param type
@return java.util.Iterator | [
"Find",
"the",
"groups",
"associated",
"with",
"this",
"member",
"key",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/RDBMEntityGroupStore.java#L341-L383 | train |
Jasig/uPortal | uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/RDBMEntityGroupStore.java | RDBMEntityGroupStore.findMemberGroupKeys | @Override
public String[] findMemberGroupKeys(IEntityGroup group) throws GroupsException {
Connection conn = null;
Collection groupKeys = new ArrayList();
String groupKey = null;
try {
conn = RDBMServices.getConnection();
String sql = getFindMemberGroupKeysSq... | java | @Override
public String[] findMemberGroupKeys(IEntityGroup group) throws GroupsException {
Connection conn = null;
Collection groupKeys = new ArrayList();
String groupKey = null;
try {
conn = RDBMServices.getConnection();
String sql = getFindMemberGroupKeysSq... | [
"@",
"Override",
"public",
"String",
"[",
"]",
"findMemberGroupKeys",
"(",
"IEntityGroup",
"group",
")",
"throws",
"GroupsException",
"{",
"Connection",
"conn",
"=",
"null",
";",
"Collection",
"groupKeys",
"=",
"new",
"ArrayList",
"(",
")",
";",
"String",
"gro... | Find the keys of groups that are members of group.
@param group the IEntityGroup
@return String[] | [
"Find",
"the",
"keys",
"of",
"groups",
"that",
"are",
"members",
"of",
"group",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/RDBMEntityGroupStore.java#L513-L552 | train |
Jasig/uPortal | uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/RDBMEntityGroupStore.java | RDBMEntityGroupStore.findMemberGroups | @Override
public Iterator findMemberGroups(IEntityGroup group) throws GroupsException {
Connection conn = null;
Collection groups = new ArrayList();
IEntityGroup eg = null;
String serviceName = group.getServiceName().toString();
String localKey = group.getLocalKey();
... | java | @Override
public Iterator findMemberGroups(IEntityGroup group) throws GroupsException {
Connection conn = null;
Collection groups = new ArrayList();
IEntityGroup eg = null;
String serviceName = group.getServiceName().toString();
String localKey = group.getLocalKey();
... | [
"@",
"Override",
"public",
"Iterator",
"findMemberGroups",
"(",
"IEntityGroup",
"group",
")",
"throws",
"GroupsException",
"{",
"Connection",
"conn",
"=",
"null",
";",
"Collection",
"groups",
"=",
"new",
"ArrayList",
"(",
")",
";",
"IEntityGroup",
"eg",
"=",
"... | Find the IUserGroups that are members of the group.
@param group IEntityGroup
@return java.util.Iterator | [
"Find",
"the",
"IUserGroups",
"that",
"are",
"members",
"of",
"the",
"group",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/RDBMEntityGroupStore.java#L559-L603 | train |
Jasig/uPortal | uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/RDBMEntityGroupStore.java | RDBMEntityGroupStore.primDelete | private void primDelete(IEntityGroup group) throws SQLException {
Connection conn = null;
String deleteGroupSql = getDeleteGroupSql(group);
String deleteMembershipSql = getDeleteMembersInGroupSql(group);
try {
conn = RDBMServices.getConnection();
Statement stmnt ... | java | private void primDelete(IEntityGroup group) throws SQLException {
Connection conn = null;
String deleteGroupSql = getDeleteGroupSql(group);
String deleteMembershipSql = getDeleteMembersInGroupSql(group);
try {
conn = RDBMServices.getConnection();
Statement stmnt ... | [
"private",
"void",
"primDelete",
"(",
"IEntityGroup",
"group",
")",
"throws",
"SQLException",
"{",
"Connection",
"conn",
"=",
"null",
";",
"String",
"deleteGroupSql",
"=",
"getDeleteGroupSql",
"(",
"group",
")",
";",
"String",
"deleteMembershipSql",
"=",
"getDelet... | Delete this entity from the database after first deleting its memberships. Exception
SQLException - if we catch a SQLException, we rollback and re-throw it.
@param group IEntityGroup | [
"Delete",
"this",
"entity",
"from",
"the",
"database",
"after",
"first",
"deleting",
"its",
"memberships",
".",
"Exception",
"SQLException",
"-",
"if",
"we",
"catch",
"a",
"SQLException",
"we",
"rollback",
"and",
"re",
"-",
"throw",
"it",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/RDBMEntityGroupStore.java#L1072-L1106 | train |
Jasig/uPortal | uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/RDBMEntityGroupStore.java | RDBMEntityGroupStore.primUpdate | private void primUpdate(IEntityGroup group, Connection conn)
throws SQLException, GroupsException {
try {
PreparedStatement ps = conn.prepareStatement(getUpdateGroupSql());
try {
Integer typeID =
EntityTypesLocator.getEntityTypes()
... | java | private void primUpdate(IEntityGroup group, Connection conn)
throws SQLException, GroupsException {
try {
PreparedStatement ps = conn.prepareStatement(getUpdateGroupSql());
try {
Integer typeID =
EntityTypesLocator.getEntityTypes()
... | [
"private",
"void",
"primUpdate",
"(",
"IEntityGroup",
"group",
",",
"Connection",
"conn",
")",
"throws",
"SQLException",
",",
"GroupsException",
"{",
"try",
"{",
"PreparedStatement",
"ps",
"=",
"conn",
".",
"prepareStatement",
"(",
"getUpdateGroupSql",
"(",
")",
... | Update the entity in the database.
@param group IEntityGroup
@param conn the database connection | [
"Update",
"the",
"entity",
"in",
"the",
"database",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/RDBMEntityGroupStore.java#L1155-L1201 | train |
Jasig/uPortal | uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/RDBMEntityGroupStore.java | RDBMEntityGroupStore.update | @Override
public void update(IEntityGroup group) throws GroupsException {
Connection conn = null;
boolean exists = existsInDatabase(group);
try {
conn = RDBMServices.getConnection();
setAutoCommit(conn, false);
try {
if (exists) {
... | java | @Override
public void update(IEntityGroup group) throws GroupsException {
Connection conn = null;
boolean exists = existsInDatabase(group);
try {
conn = RDBMServices.getConnection();
setAutoCommit(conn, false);
try {
if (exists) {
... | [
"@",
"Override",
"public",
"void",
"update",
"(",
"IEntityGroup",
"group",
")",
"throws",
"GroupsException",
"{",
"Connection",
"conn",
"=",
"null",
";",
"boolean",
"exists",
"=",
"existsInDatabase",
"(",
"group",
")",
";",
"try",
"{",
"conn",
"=",
"RDBMServ... | Commit this entity AND ITS MEMBERSHIPS to the underlying store.
@param group IEntityGroup | [
"Commit",
"this",
"entity",
"AND",
"ITS",
"MEMBERSHIPS",
"to",
"the",
"underlying",
"store",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/RDBMEntityGroupStore.java#L1456-L1489 | train |
Jasig/uPortal | uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/RDBMEntityGroupStore.java | RDBMEntityGroupStore.updateMembers | @Override
public void updateMembers(IEntityGroup eg) throws GroupsException {
Connection conn = null;
EntityGroupImpl egi = (EntityGroupImpl) eg;
if (egi.isDirty())
try {
conn = RDBMServices.getConnection();
setAutoCommit(conn, false);
... | java | @Override
public void updateMembers(IEntityGroup eg) throws GroupsException {
Connection conn = null;
EntityGroupImpl egi = (EntityGroupImpl) eg;
if (egi.isDirty())
try {
conn = RDBMServices.getConnection();
setAutoCommit(conn, false);
... | [
"@",
"Override",
"public",
"void",
"updateMembers",
"(",
"IEntityGroup",
"eg",
")",
"throws",
"GroupsException",
"{",
"Connection",
"conn",
"=",
"null",
";",
"EntityGroupImpl",
"egi",
"=",
"(",
"EntityGroupImpl",
")",
"eg",
";",
"if",
"(",
"egi",
".",
"isDir... | Insert and delete group membership rows inside a transaction.
@param eg IEntityGroup | [
"Insert",
"and",
"delete",
"group",
"membership",
"rows",
"inside",
"a",
"transaction",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/RDBMEntityGroupStore.java#L1496-L1525 | train |
Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/sqlquery/SqlQueryPortletController.java | SqlQueryPortletController.evaluateSpelExpression | protected String evaluateSpelExpression(String value, PortletRequest request) {
if (StringUtils.isNotBlank(value)) {
String result = portletSpELService.parseString(value, request);
return result;
}
throw new IllegalArgumentException("SQL Query expression required");
} | java | protected String evaluateSpelExpression(String value, PortletRequest request) {
if (StringUtils.isNotBlank(value)) {
String result = portletSpELService.parseString(value, request);
return result;
}
throw new IllegalArgumentException("SQL Query expression required");
} | [
"protected",
"String",
"evaluateSpelExpression",
"(",
"String",
"value",
",",
"PortletRequest",
"request",
")",
"{",
"if",
"(",
"StringUtils",
".",
"isNotBlank",
"(",
"value",
")",
")",
"{",
"String",
"result",
"=",
"portletSpELService",
".",
"parseString",
"(",... | Substitute any SpEL expressions with values from the PortletRequest and other attributes
added to the SpEL context.
@param value SQL Query String with optional SpEL expressions in it
@param request Portlet request
@return SQL Query string with SpEL substitutions | [
"Substitute",
"any",
"SpEL",
"expressions",
"with",
"values",
"from",
"the",
"PortletRequest",
"and",
"other",
"attributes",
"added",
"to",
"the",
"SpEL",
"context",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/sqlquery/SqlQueryPortletController.java#L163-L169 | train |
Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/sqlquery/SqlQueryPortletController.java | SqlQueryPortletController.getCache | private Cache getCache(PortletRequest req) {
String cacheName = req.getPreferences().getValue(PREF_CACHE_NAME, DEFAULT_CACHE_NAME);
if (StringUtils.isNotBlank(cacheName)) {
log.debug("Looking up cache '{}'", cacheName);
Cache cache = CacheManager.getInstance().getCache(cacheName)... | java | private Cache getCache(PortletRequest req) {
String cacheName = req.getPreferences().getValue(PREF_CACHE_NAME, DEFAULT_CACHE_NAME);
if (StringUtils.isNotBlank(cacheName)) {
log.debug("Looking up cache '{}'", cacheName);
Cache cache = CacheManager.getInstance().getCache(cacheName)... | [
"private",
"Cache",
"getCache",
"(",
"PortletRequest",
"req",
")",
"{",
"String",
"cacheName",
"=",
"req",
".",
"getPreferences",
"(",
")",
".",
"getValue",
"(",
"PREF_CACHE_NAME",
",",
"DEFAULT_CACHE_NAME",
")",
";",
"if",
"(",
"StringUtils",
".",
"isNotBlank... | Obtain the cache configured for this portlet instance.
@param req Portlet request
@return Cache configured for this portlet instance. | [
"Obtain",
"the",
"cache",
"configured",
"for",
"this",
"portlet",
"instance",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/sqlquery/SqlQueryPortletController.java#L177-L197 | train |
Jasig/uPortal | uPortal-url/src/main/java/org/apereo/portal/url/processing/RequestParameterProcessorInterceptor.java | RequestParameterProcessorInterceptor.preHandle | @Override
public boolean preHandle(
HttpServletRequest request, HttpServletResponse response, Object handler)
throws Exception {
final List<IRequestParameterProcessor> incompleteDynamicProcessors =
new LinkedList<IRequestParameterProcessor>(this.dynamicRequestParamete... | java | @Override
public boolean preHandle(
HttpServletRequest request, HttpServletResponse response, Object handler)
throws Exception {
final List<IRequestParameterProcessor> incompleteDynamicProcessors =
new LinkedList<IRequestParameterProcessor>(this.dynamicRequestParamete... | [
"@",
"Override",
"public",
"boolean",
"preHandle",
"(",
"HttpServletRequest",
"request",
",",
"HttpServletResponse",
"response",
",",
"Object",
"handler",
")",
"throws",
"Exception",
"{",
"final",
"List",
"<",
"IRequestParameterProcessor",
">",
"incompleteDynamicProcess... | Process the request first with the dynamic processors until all are complete and then the
static processors.
@see
org.apereo.portal.url.processing.IRequestParameterController#processParameters(org.apereo.portal.url.IWritableHttpServletRequest,
javax.servlet.http.HttpServletResponse) | [
"Process",
"the",
"request",
"first",
"with",
"the",
"dynamic",
"processors",
"until",
"all",
"are",
"complete",
"and",
"then",
"the",
"static",
"processors",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-url/src/main/java/org/apereo/portal/url/processing/RequestParameterProcessorInterceptor.java#L78-L119 | train |
Jasig/uPortal | uPortal-spring/src/main/java/org/apereo/portal/spring/security/preauth/PortalPreAuthenticatedProcessingFilter.java | PortalPreAuthenticatedProcessingFilter.getPropertyFromRequest | private HashMap<String, String> getPropertyFromRequest(
HashMap<String, String> tokens, HttpServletRequest request) {
// Iterate through all of the other property keys looking for the first property
// named like propname that has a value in the request
HashMap<String, String> retHas... | java | private HashMap<String, String> getPropertyFromRequest(
HashMap<String, String> tokens, HttpServletRequest request) {
// Iterate through all of the other property keys looking for the first property
// named like propname that has a value in the request
HashMap<String, String> retHas... | [
"private",
"HashMap",
"<",
"String",
",",
"String",
">",
"getPropertyFromRequest",
"(",
"HashMap",
"<",
"String",
",",
"String",
">",
"tokens",
",",
"HttpServletRequest",
"request",
")",
"{",
"// Iterate through all of the other property keys looking for the first property"... | Get the values represented by each token from the request and load them into a HashMap that
is returned.
@param tokens
@param request
@return HashMap of properties | [
"Get",
"the",
"values",
"represented",
"by",
"each",
"token",
"from",
"the",
"request",
"and",
"load",
"them",
"into",
"a",
"HashMap",
"that",
"is",
"returned",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-spring/src/main/java/org/apereo/portal/spring/security/preauth/PortalPreAuthenticatedProcessingFilter.java#L525-L568 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/RDBMEntityLockStore.java | RDBMEntityLockStore.add | @Override
public void add(IEntityLock lock) throws LockingException {
Connection conn = null;
try {
conn = RDBMServices.getConnection();
primDeleteExpired(new Date(), lock.getEntityType(), lock.getEntityKey(), conn);
primAdd(lock, conn);
} catch (SQLExcept... | java | @Override
public void add(IEntityLock lock) throws LockingException {
Connection conn = null;
try {
conn = RDBMServices.getConnection();
primDeleteExpired(new Date(), lock.getEntityType(), lock.getEntityKey(), conn);
primAdd(lock, conn);
} catch (SQLExcept... | [
"@",
"Override",
"public",
"void",
"add",
"(",
"IEntityLock",
"lock",
")",
"throws",
"LockingException",
"{",
"Connection",
"conn",
"=",
"null",
";",
"try",
"{",
"conn",
"=",
"RDBMServices",
".",
"getConnection",
"(",
")",
";",
"primDeleteExpired",
"(",
"new... | Adds the lock to the underlying store.
@param lock | [
"Adds",
"the",
"lock",
"to",
"the",
"underlying",
"store",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/RDBMEntityLockStore.java#L74-L86 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/RDBMEntityLockStore.java | RDBMEntityLockStore.delete | @Override
public void delete(IEntityLock lock) throws LockingException {
Connection conn = null;
try {
conn = RDBMServices.getConnection();
primDelete(lock, conn);
} catch (SQLException sqle) {
throw new LockingException("Problem deleting " + lock, sqle);
... | java | @Override
public void delete(IEntityLock lock) throws LockingException {
Connection conn = null;
try {
conn = RDBMServices.getConnection();
primDelete(lock, conn);
} catch (SQLException sqle) {
throw new LockingException("Problem deleting " + lock, sqle);
... | [
"@",
"Override",
"public",
"void",
"delete",
"(",
"IEntityLock",
"lock",
")",
"throws",
"LockingException",
"{",
"Connection",
"conn",
"=",
"null",
";",
"try",
"{",
"conn",
"=",
"RDBMServices",
".",
"getConnection",
"(",
")",
";",
"primDelete",
"(",
"lock",
... | If this IEntityLock exists, delete it.
@param lock | [
"If",
"this",
"IEntityLock",
"exists",
"delete",
"it",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/RDBMEntityLockStore.java#L93-L104 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/RDBMEntityLockStore.java | RDBMEntityLockStore.deleteAll | @Override
public void deleteAll() throws LockingException {
Connection conn = null;
Statement stmnt = null;
try {
String sql = "DELETE FROM " + LOCK_TABLE;
if (log.isDebugEnabled()) log.debug("RDBMEntityLockStore.deleteAll(): " + sql);
conn = RDBMServices... | java | @Override
public void deleteAll() throws LockingException {
Connection conn = null;
Statement stmnt = null;
try {
String sql = "DELETE FROM " + LOCK_TABLE;
if (log.isDebugEnabled()) log.debug("RDBMEntityLockStore.deleteAll(): " + sql);
conn = RDBMServices... | [
"@",
"Override",
"public",
"void",
"deleteAll",
"(",
")",
"throws",
"LockingException",
"{",
"Connection",
"conn",
"=",
"null",
";",
"Statement",
"stmnt",
"=",
"null",
";",
"try",
"{",
"String",
"sql",
"=",
"\"DELETE FROM \"",
"+",
"LOCK_TABLE",
";",
"if",
... | Delete all IEntityLocks from the underlying store. | [
"Delete",
"all",
"IEntityLocks",
"from",
"the",
"underlying",
"store",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/RDBMEntityLockStore.java#L107-L131 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/RDBMEntityLockStore.java | RDBMEntityLockStore.deleteExpired | public void deleteExpired(IEntityLock lock) throws LockingException {
deleteExpired(new Date(), lock.getEntityType(), lock.getEntityKey());
} | java | public void deleteExpired(IEntityLock lock) throws LockingException {
deleteExpired(new Date(), lock.getEntityType(), lock.getEntityKey());
} | [
"public",
"void",
"deleteExpired",
"(",
"IEntityLock",
"lock",
")",
"throws",
"LockingException",
"{",
"deleteExpired",
"(",
"new",
"Date",
"(",
")",
",",
"lock",
".",
"getEntityType",
"(",
")",
",",
"lock",
".",
"getEntityKey",
"(",
")",
")",
";",
"}"
] | Delete all expired IEntityLocks from the underlying store.
@param lock IEntityLock | [
"Delete",
"all",
"expired",
"IEntityLocks",
"from",
"the",
"underlying",
"store",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/RDBMEntityLockStore.java#L169-L171 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/RDBMEntityLockStore.java | RDBMEntityLockStore.findUnexpired | @Override
public IEntityLock[] findUnexpired(
Date expiration, Class entityType, String entityKey, Integer lockType, String lockOwner)
throws LockingException {
Timestamp ts = new Timestamp(expiration.getTime());
return selectUnexpired(ts, entityType, entityKey, lockType, loc... | java | @Override
public IEntityLock[] findUnexpired(
Date expiration, Class entityType, String entityKey, Integer lockType, String lockOwner)
throws LockingException {
Timestamp ts = new Timestamp(expiration.getTime());
return selectUnexpired(ts, entityType, entityKey, lockType, loc... | [
"@",
"Override",
"public",
"IEntityLock",
"[",
"]",
"findUnexpired",
"(",
"Date",
"expiration",
",",
"Class",
"entityType",
",",
"String",
"entityKey",
",",
"Integer",
"lockType",
",",
"String",
"lockOwner",
")",
"throws",
"LockingException",
"{",
"Timestamp",
"... | Retrieve IEntityLocks from the underlying store. Expiration must not be null.
@param expiration Date
@param entityType Class
@param entityKey String
@param lockType Integer - so we can accept a null value.
@param lockOwner String
@exception LockingException - wraps an Exception specific to the store. | [
"Retrieve",
"IEntityLocks",
"from",
"the",
"underlying",
"store",
".",
"Expiration",
"must",
"not",
"be",
"null",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/RDBMEntityLockStore.java#L200-L206 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/RDBMEntityLockStore.java | RDBMEntityLockStore.getDeleteLockSql | private static String getDeleteLockSql() {
if (deleteLockSql == null) {
deleteLockSql =
"DELETE FROM "
+ LOCK_TABLE
+ " WHERE "
+ ENTITY_TYPE_COLUMN
+ EQ
... | java | private static String getDeleteLockSql() {
if (deleteLockSql == null) {
deleteLockSql =
"DELETE FROM "
+ LOCK_TABLE
+ " WHERE "
+ ENTITY_TYPE_COLUMN
+ EQ
... | [
"private",
"static",
"String",
"getDeleteLockSql",
"(",
")",
"{",
"if",
"(",
"deleteLockSql",
"==",
"null",
")",
"{",
"deleteLockSql",
"=",
"\"DELETE FROM \"",
"+",
"LOCK_TABLE",
"+",
"\" WHERE \"",
"+",
"ENTITY_TYPE_COLUMN",
"+",
"EQ",
"+",
"\"?\"",
"+",
"\" ... | SQL for deleting a row on the lock table. | [
"SQL",
"for",
"deleting",
"a",
"row",
"on",
"the",
"lock",
"table",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/RDBMEntityLockStore.java#L241-L268 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/RDBMEntityLockStore.java | RDBMEntityLockStore.getUpdateSql | private static String getUpdateSql() {
if (updateSql == null) {
updateSql =
"UPDATE "
+ LOCK_TABLE
+ " SET "
+ EXPIRATION_TIME_COLUMN
+ EQ
+... | java | private static String getUpdateSql() {
if (updateSql == null) {
updateSql =
"UPDATE "
+ LOCK_TABLE
+ " SET "
+ EXPIRATION_TIME_COLUMN
+ EQ
+... | [
"private",
"static",
"String",
"getUpdateSql",
"(",
")",
"{",
"if",
"(",
"updateSql",
"==",
"null",
")",
"{",
"updateSql",
"=",
"\"UPDATE \"",
"+",
"LOCK_TABLE",
"+",
"\" SET \"",
"+",
"EXPIRATION_TIME_COLUMN",
"+",
"EQ",
"+",
"\"?, \"",
"+",
"LOCK_TYPE_COLUMN... | SQL for updating a row on the lock table. | [
"SQL",
"for",
"updating",
"a",
"row",
"on",
"the",
"lock",
"table",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/RDBMEntityLockStore.java#L276-L310 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/RDBMEntityLockStore.java | RDBMEntityLockStore.initialize | private void initialize() throws LockingException {
Date expiration = new Date(System.currentTimeMillis() - (60 * 60 * 1000));
deleteExpired(expiration, null, null);
} | java | private void initialize() throws LockingException {
Date expiration = new Date(System.currentTimeMillis() - (60 * 60 * 1000));
deleteExpired(expiration, null, null);
} | [
"private",
"void",
"initialize",
"(",
")",
"throws",
"LockingException",
"{",
"Date",
"expiration",
"=",
"new",
"Date",
"(",
"System",
".",
"currentTimeMillis",
"(",
")",
"-",
"(",
"60",
"*",
"60",
"*",
"1000",
")",
")",
";",
"deleteExpired",
"(",
"expir... | Cleanup the store by deleting locks expired an hour ago. | [
"Cleanup",
"the",
"store",
"by",
"deleting",
"locks",
"expired",
"an",
"hour",
"ago",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/RDBMEntityLockStore.java#L313-L316 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/RDBMEntityLockStore.java | RDBMEntityLockStore.instanceFromResultSet | private IEntityLock instanceFromResultSet(java.sql.ResultSet rs)
throws SQLException, LockingException {
Integer entityTypeID = rs.getInt(1);
Class entityType = EntityTypesLocator.getEntityTypes().getEntityTypeFromID(entityTypeID);
String key = rs.getString(2);
int lockType =... | java | private IEntityLock instanceFromResultSet(java.sql.ResultSet rs)
throws SQLException, LockingException {
Integer entityTypeID = rs.getInt(1);
Class entityType = EntityTypesLocator.getEntityTypes().getEntityTypeFromID(entityTypeID);
String key = rs.getString(2);
int lockType =... | [
"private",
"IEntityLock",
"instanceFromResultSet",
"(",
"java",
".",
"sql",
".",
"ResultSet",
"rs",
")",
"throws",
"SQLException",
",",
"LockingException",
"{",
"Integer",
"entityTypeID",
"=",
"rs",
".",
"getInt",
"(",
"1",
")",
";",
"Class",
"entityType",
"="... | Extract values from ResultSet and create a new lock.
@return org.apereo.portal.groups.IEntityLock
@param rs java.sql.ResultSet | [
"Extract",
"values",
"from",
"ResultSet",
"and",
"create",
"a",
"new",
"lock",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/RDBMEntityLockStore.java#L324-L334 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/RDBMEntityLockStore.java | RDBMEntityLockStore.primAdd | private void primAdd(IEntityLock lock, Connection conn) throws SQLException, LockingException {
Integer typeID =
EntityTypesLocator.getEntityTypes().getEntityIDFromType(lock.getEntityType());
String key = lock.getEntityKey();
int lockType = lock.getLockType();
Timestamp t... | java | private void primAdd(IEntityLock lock, Connection conn) throws SQLException, LockingException {
Integer typeID =
EntityTypesLocator.getEntityTypes().getEntityIDFromType(lock.getEntityType());
String key = lock.getEntityKey();
int lockType = lock.getLockType();
Timestamp t... | [
"private",
"void",
"primAdd",
"(",
"IEntityLock",
"lock",
",",
"Connection",
"conn",
")",
"throws",
"SQLException",
",",
"LockingException",
"{",
"Integer",
"typeID",
"=",
"EntityTypesLocator",
".",
"getEntityTypes",
"(",
")",
".",
"getEntityIDFromType",
"(",
"loc... | Add the lock to the underlying store.
@param lock org.apereo.portal.concurrency.locking.IEntityLock
@param conn java.sql.Connection | [
"Add",
"the",
"lock",
"to",
"the",
"underlying",
"store",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/RDBMEntityLockStore.java#L349-L381 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/RDBMEntityLockStore.java | RDBMEntityLockStore.primSelect | private IEntityLock[] primSelect(String sql) throws LockingException {
Connection conn = null;
Statement stmnt = null;
ResultSet rs = null;
List locks = new ArrayList();
if (log.isDebugEnabled()) log.debug("RDBMEntityLockStore.primSelect(): " + sql);
try {
c... | java | private IEntityLock[] primSelect(String sql) throws LockingException {
Connection conn = null;
Statement stmnt = null;
ResultSet rs = null;
List locks = new ArrayList();
if (log.isDebugEnabled()) log.debug("RDBMEntityLockStore.primSelect(): " + sql);
try {
c... | [
"private",
"IEntityLock",
"[",
"]",
"primSelect",
"(",
"String",
"sql",
")",
"throws",
"LockingException",
"{",
"Connection",
"conn",
"=",
"null",
";",
"Statement",
"stmnt",
"=",
"null",
";",
"ResultSet",
"rs",
"=",
"null",
";",
"List",
"locks",
"=",
"new"... | Retrieve IEntityLocks from the underlying store.
@param sql String - the sql string used to select the entity lock rows.
@exception LockingException - wraps an Exception specific to the store. | [
"Retrieve",
"IEntityLocks",
"from",
"the",
"underlying",
"store",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/RDBMEntityLockStore.java#L471-L502 | train |
Jasig/uPortal | uPortal-groups/uPortal-groups-filesystem/src/main/java/org/apereo/portal/groups/filesystem/FileSystemGroupStoreFactory.java | FileSystemGroupStoreFactory.newGroupStore | @Override
public IEntityGroupStore newGroupStore(ComponentGroupServiceDescriptor svcDescriptor)
throws GroupsException {
FileSystemGroupStore fsGroupStore = (FileSystemGroupStore) getGroupStore();
String groupsRoot = (String) svcDescriptor.get("groupsRoot");
if (groupsRoot != nul... | java | @Override
public IEntityGroupStore newGroupStore(ComponentGroupServiceDescriptor svcDescriptor)
throws GroupsException {
FileSystemGroupStore fsGroupStore = (FileSystemGroupStore) getGroupStore();
String groupsRoot = (String) svcDescriptor.get("groupsRoot");
if (groupsRoot != nul... | [
"@",
"Override",
"public",
"IEntityGroupStore",
"newGroupStore",
"(",
"ComponentGroupServiceDescriptor",
"svcDescriptor",
")",
"throws",
"GroupsException",
"{",
"FileSystemGroupStore",
"fsGroupStore",
"=",
"(",
"FileSystemGroupStore",
")",
"getGroupStore",
"(",
")",
";",
... | Return an instance of the entity group store implementation.
@return IEntityGroupStore
@exception GroupsException | [
"Return",
"an",
"instance",
"of",
"the",
"entity",
"group",
"store",
"implementation",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-filesystem/src/main/java/org/apereo/portal/groups/filesystem/FileSystemGroupStoreFactory.java#L68-L77 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/jdbc/RDBMServices.java | RDBMServices.getDataSource | @Deprecated
public static DataSource getDataSource(String name) {
if (PORTAL_DB.equals(name)) {
return PortalDbLocator.getPortalDb();
}
final ApplicationContext applicationContext =
PortalApplicationContextLocator.getApplicationContext();
final DataSource... | java | @Deprecated
public static DataSource getDataSource(String name) {
if (PORTAL_DB.equals(name)) {
return PortalDbLocator.getPortalDb();
}
final ApplicationContext applicationContext =
PortalApplicationContextLocator.getApplicationContext();
final DataSource... | [
"@",
"Deprecated",
"public",
"static",
"DataSource",
"getDataSource",
"(",
"String",
"name",
")",
"{",
"if",
"(",
"PORTAL_DB",
".",
"equals",
"(",
"name",
")",
")",
"{",
"return",
"PortalDbLocator",
".",
"getPortalDb",
"(",
")",
";",
"}",
"final",
"Applica... | Gets a named DataSource from JNDI, with special handling for the PORTAL_DB datasource.
Successful lookups are cached and not done again. Lookup failure is remembered and blocks
retry for a number of milliseconds specified by JNDI_RETRY_TIME to reduce JNDI overhead and
log spam.
<p>There are two ways in which we handle... | [
"Gets",
"a",
"named",
"DataSource",
"from",
"JNDI",
"with",
"special",
"handling",
"for",
"the",
"PORTAL_DB",
"datasource",
".",
"Successful",
"lookups",
"are",
"cached",
"and",
"not",
"done",
"again",
".",
"Lookup",
"failure",
"is",
"remembered",
"and",
"bloc... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/jdbc/RDBMServices.java#L110-L121 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/jdbc/RDBMServices.java | RDBMServices.getConnection | @Deprecated
public static Connection getConnection(String dbName) {
final DataSource dataSource = getDataSource(dbName);
try {
final long start = System.currentTimeMillis();
final Connection c = dataSource.getConnection();
lastDatabase = databaseTimes.add(System.... | java | @Deprecated
public static Connection getConnection(String dbName) {
final DataSource dataSource = getDataSource(dbName);
try {
final long start = System.currentTimeMillis();
final Connection c = dataSource.getConnection();
lastDatabase = databaseTimes.add(System.... | [
"@",
"Deprecated",
"public",
"static",
"Connection",
"getConnection",
"(",
"String",
"dbName",
")",
"{",
"final",
"DataSource",
"dataSource",
"=",
"getDataSource",
"(",
"dbName",
")",
";",
"try",
"{",
"final",
"long",
"start",
"=",
"System",
".",
"currentTimeM... | Returns a connection produced by a DataSource found in the JNDI context. The DataSource
should be configured and loaded into JNDI by the J2EE container or may be the portal default
database.
@param dbName the database name which will be retrieved from the JNDI context relative to
"jdbc/"
@return a database Connection ... | [
"Returns",
"a",
"connection",
"produced",
"by",
"a",
"DataSource",
"found",
"in",
"the",
"JNDI",
"context",
".",
"The",
"DataSource",
"should",
"be",
"configured",
"and",
"loaded",
"into",
"JNDI",
"by",
"the",
"J2EE",
"container",
"or",
"may",
"be",
"the",
... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/jdbc/RDBMServices.java#L162-L179 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/jdbc/RDBMServices.java | RDBMServices.closeResultSet | public static void closeResultSet(final ResultSet rs) {
if (rs == null) {
return;
}
try {
rs.close();
} catch (Exception e) {
if (LOG.isWarnEnabled()) LOG.warn("Error closing ResultSet: " + rs, e);
}
} | java | public static void closeResultSet(final ResultSet rs) {
if (rs == null) {
return;
}
try {
rs.close();
} catch (Exception e) {
if (LOG.isWarnEnabled()) LOG.warn("Error closing ResultSet: " + rs, e);
}
} | [
"public",
"static",
"void",
"closeResultSet",
"(",
"final",
"ResultSet",
"rs",
")",
"{",
"if",
"(",
"rs",
"==",
"null",
")",
"{",
"return",
";",
"}",
"try",
"{",
"rs",
".",
"close",
"(",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"i... | Close a ResultSet
@param rs a database ResultSet object | [
"Close",
"a",
"ResultSet"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/jdbc/RDBMServices.java#L214-L224 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/jdbc/RDBMServices.java | RDBMServices.closeStatement | public static void closeStatement(final Statement st) {
if (st == null) {
return;
}
try {
st.close();
} catch (Exception e) {
if (LOG.isWarnEnabled()) LOG.warn("Error closing Statement: " + st, e);
}
} | java | public static void closeStatement(final Statement st) {
if (st == null) {
return;
}
try {
st.close();
} catch (Exception e) {
if (LOG.isWarnEnabled()) LOG.warn("Error closing Statement: " + st, e);
}
} | [
"public",
"static",
"void",
"closeStatement",
"(",
"final",
"Statement",
"st",
")",
"{",
"if",
"(",
"st",
"==",
"null",
")",
"{",
"return",
";",
"}",
"try",
"{",
"st",
".",
"close",
"(",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"i... | Close a Statement
@param st a database Statement object | [
"Close",
"a",
"Statement"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/jdbc/RDBMServices.java#L231-L241 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/jdbc/RDBMServices.java | RDBMServices.rollback | public static final void rollback(final Connection connection) {
try {
connection.rollback();
} catch (Exception e) {
if (LOG.isWarnEnabled()) LOG.warn("Error rolling back Connection: " + connection, e);
}
} | java | public static final void rollback(final Connection connection) {
try {
connection.rollback();
} catch (Exception e) {
if (LOG.isWarnEnabled()) LOG.warn("Error rolling back Connection: " + connection, e);
}
} | [
"public",
"static",
"final",
"void",
"rollback",
"(",
"final",
"Connection",
"connection",
")",
"{",
"try",
"{",
"connection",
".",
"rollback",
"(",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"if",
"(",
"LOG",
".",
"isWarnEnabled",
"(",
"... | rollback unwanted changes to the database
@param connection | [
"rollback",
"unwanted",
"changes",
"to",
"the",
"database"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/jdbc/RDBMServices.java#L284-L290 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/jdbc/RDBMServices.java | RDBMServices.dbFlag | public static final boolean dbFlag(final String flag) {
return flag != null
&& (FLAG_TRUE.equalsIgnoreCase(flag) || FLAG_TRUE_OTHER.equalsIgnoreCase(flag));
} | java | public static final boolean dbFlag(final String flag) {
return flag != null
&& (FLAG_TRUE.equalsIgnoreCase(flag) || FLAG_TRUE_OTHER.equalsIgnoreCase(flag));
} | [
"public",
"static",
"final",
"boolean",
"dbFlag",
"(",
"final",
"String",
"flag",
")",
"{",
"return",
"flag",
"!=",
"null",
"&&",
"(",
"FLAG_TRUE",
".",
"equalsIgnoreCase",
"(",
"flag",
")",
"||",
"FLAG_TRUE_OTHER",
".",
"equalsIgnoreCase",
"(",
"flag",
")",... | Return boolean value of DB flag, "Y" or "N".
@param flag either "Y" or "N"
@return boolean true or false | [
"Return",
"boolean",
"value",
"of",
"DB",
"flag",
"Y",
"or",
"N",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/jdbc/RDBMServices.java#L340-L343 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/jdbc/RDBMServices.java | RDBMServices.sqlEscape | public static final String sqlEscape(final String sql) {
if (sql == null) {
return "";
}
int primePos = sql.indexOf("'");
if (primePos == -1) {
return sql;
}
final StringBuffer sb = new StringBuffer(sql.length() + 4);
int startPos = 0;
... | java | public static final String sqlEscape(final String sql) {
if (sql == null) {
return "";
}
int primePos = sql.indexOf("'");
if (primePos == -1) {
return sql;
}
final StringBuffer sb = new StringBuffer(sql.length() + 4);
int startPos = 0;
... | [
"public",
"static",
"final",
"String",
"sqlEscape",
"(",
"final",
"String",
"sql",
")",
"{",
"if",
"(",
"sql",
"==",
"null",
")",
"{",
"return",
"\"\"",
";",
"}",
"int",
"primePos",
"=",
"sql",
".",
"indexOf",
"(",
"\"'\"",
")",
";",
"if",
"(",
"pr... | Make a string SQL safe
@param sql
@return SQL safe string | [
"Make",
"a",
"string",
"SQL",
"safe"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/jdbc/RDBMServices.java#L351-L374 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/spring/spel/PortalSpELServiceImpl.java | PortalSpELServiceImpl.getEvaluationContext | protected EvaluationContext getEvaluationContext(WebRequest request) {
final HttpServletRequest httpRequest =
this.portalRequestUtils.getOriginalPortalRequest(request);
final IUserInstance userInstance = this.userInstanceManager.getUserInstance(httpRequest);
final IPerson person ... | java | protected EvaluationContext getEvaluationContext(WebRequest request) {
final HttpServletRequest httpRequest =
this.portalRequestUtils.getOriginalPortalRequest(request);
final IUserInstance userInstance = this.userInstanceManager.getUserInstance(httpRequest);
final IPerson person ... | [
"protected",
"EvaluationContext",
"getEvaluationContext",
"(",
"WebRequest",
"request",
")",
"{",
"final",
"HttpServletRequest",
"httpRequest",
"=",
"this",
".",
"portalRequestUtils",
".",
"getOriginalPortalRequest",
"(",
"request",
")",
";",
"final",
"IUserInstance",
"... | Return a SpEL evaluation context for the supplied web request.
@param request
@return | [
"Return",
"a",
"SpEL",
"evaluation",
"context",
"for",
"the",
"supplied",
"web",
"request",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/spring/spel/PortalSpELServiceImpl.java#L160-L170 | train |
Jasig/uPortal | uPortal-security/uPortal-security-permissions/src/main/java/org/apereo/portal/security/provider/PermissionManagerImpl.java | PermissionManagerImpl.getPermissions | @Override
public IPermission[] getPermissions(String activity, String target)
throws AuthorizationException {
return getAuthorizationService().getPermissionsForOwner(getOwner(), activity, target);
} | java | @Override
public IPermission[] getPermissions(String activity, String target)
throws AuthorizationException {
return getAuthorizationService().getPermissionsForOwner(getOwner(), activity, target);
} | [
"@",
"Override",
"public",
"IPermission",
"[",
"]",
"getPermissions",
"(",
"String",
"activity",
",",
"String",
"target",
")",
"throws",
"AuthorizationException",
"{",
"return",
"getAuthorizationService",
"(",
")",
".",
"getPermissionsForOwner",
"(",
"getOwner",
"("... | Retrieve an array of IPermission objects based on the given parameters. Any null parameters
will be ignored.
@param activity String
@param target String
@return IPermission[]
@exception AuthorizationException | [
"Retrieve",
"an",
"array",
"of",
"IPermission",
"objects",
"based",
"on",
"the",
"given",
"parameters",
".",
"Any",
"null",
"parameters",
"will",
"be",
"ignored",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-security/uPortal-security-permissions/src/main/java/org/apereo/portal/security/provider/PermissionManagerImpl.java#L79-L83 | train |
Jasig/uPortal | uPortal-web/src/main/java/org/apereo/portal/portlet/dao/jpa/JpaPortletEntityDao.java | JpaPortletEntityDao.addFetches | protected void addFetches(final Root<PortletEntityImpl> definitionRoot) {
definitionRoot
.fetch(PortletEntityImpl_.portletPreferences, JoinType.LEFT)
.fetch(PortletPreferencesImpl_.portletPreferences, JoinType.LEFT)
.fetch(PortletPreferenceImpl_.values, JoinType.L... | java | protected void addFetches(final Root<PortletEntityImpl> definitionRoot) {
definitionRoot
.fetch(PortletEntityImpl_.portletPreferences, JoinType.LEFT)
.fetch(PortletPreferencesImpl_.portletPreferences, JoinType.LEFT)
.fetch(PortletPreferenceImpl_.values, JoinType.L... | [
"protected",
"void",
"addFetches",
"(",
"final",
"Root",
"<",
"PortletEntityImpl",
">",
"definitionRoot",
")",
"{",
"definitionRoot",
".",
"fetch",
"(",
"PortletEntityImpl_",
".",
"portletPreferences",
",",
"JoinType",
".",
"LEFT",
")",
".",
"fetch",
"(",
"Portl... | Add all the fetches needed for completely loading the object graph | [
"Add",
"all",
"the",
"fetches",
"needed",
"for",
"completely",
"loading",
"the",
"object",
"graph"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-web/src/main/java/org/apereo/portal/portlet/dao/jpa/JpaPortletEntityDao.java#L109-L115 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/xml/stream/BufferedXMLEventReader.java | BufferedXMLEventReader.mark | public void mark(int eventLimit) {
this.eventLimit = eventLimit;
// Buffering no events now, clear the buffer and buffered reader
if (this.eventLimit == 0) {
this.eventBuffer.clear();
this.bufferReader = null;
}
// Buffering limited set of events, lets tr... | java | public void mark(int eventLimit) {
this.eventLimit = eventLimit;
// Buffering no events now, clear the buffer and buffered reader
if (this.eventLimit == 0) {
this.eventBuffer.clear();
this.bufferReader = null;
}
// Buffering limited set of events, lets tr... | [
"public",
"void",
"mark",
"(",
"int",
"eventLimit",
")",
"{",
"this",
".",
"eventLimit",
"=",
"eventLimit",
";",
"// Buffering no events now, clear the buffer and buffered reader",
"if",
"(",
"this",
".",
"eventLimit",
"==",
"0",
")",
"{",
"this",
".",
"eventBuffe... | Start buffering events
@param eventLimit the maximum number of events to buffer. -1 will buffer all events, 0 will
buffer no events. | [
"Start",
"buffering",
"events"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/xml/stream/BufferedXMLEventReader.java#L112-L141 | train |
Jasig/uPortal | uPortal-core/src/main/java/org/apereo/portal/i18n/LocaleManager.java | LocaleManager.addToLocaleList | private void addToLocaleList(List localeList, List<Locale> locales) {
if (locales != null) {
for (Locale locale : locales) {
if (locale != null && !localeList.contains(locale)) localeList.add(locale);
}
}
} | java | private void addToLocaleList(List localeList, List<Locale> locales) {
if (locales != null) {
for (Locale locale : locales) {
if (locale != null && !localeList.contains(locale)) localeList.add(locale);
}
}
} | [
"private",
"void",
"addToLocaleList",
"(",
"List",
"localeList",
",",
"List",
"<",
"Locale",
">",
"locales",
")",
"{",
"if",
"(",
"locales",
"!=",
"null",
")",
"{",
"for",
"(",
"Locale",
"locale",
":",
"locales",
")",
"{",
"if",
"(",
"locale",
"!=",
... | Add locales to the locale list if they aren't in there already | [
"Add",
"locales",
"to",
"the",
"locale",
"list",
"if",
"they",
"aren",
"t",
"in",
"there",
"already"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-core/src/main/java/org/apereo/portal/i18n/LocaleManager.java#L103-L109 | train |
Jasig/uPortal | uPortal-security/uPortal-security-core/src/main/java/org/apereo/portal/security/PermissionHelper.java | PermissionHelper.permissionTargetIdForPortletDefinition | public static String permissionTargetIdForPortletDefinition(
final IPortletDefinition portletDefinition) {
Validate.notNull(
portletDefinition,
"Cannot compute permission target ID for a null portlet definition.");
final String portletPublicationId =
... | java | public static String permissionTargetIdForPortletDefinition(
final IPortletDefinition portletDefinition) {
Validate.notNull(
portletDefinition,
"Cannot compute permission target ID for a null portlet definition.");
final String portletPublicationId =
... | [
"public",
"static",
"String",
"permissionTargetIdForPortletDefinition",
"(",
"final",
"IPortletDefinition",
"portletDefinition",
")",
"{",
"Validate",
".",
"notNull",
"(",
"portletDefinition",
",",
"\"Cannot compute permission target ID for a null portlet definition.\"",
")",
";"... | Static utility method computing the permission target ID for a portlet definition.
@param portletDefinition a portlet definition
@return String permission target ID for the portlet definition.
@throws IllegalArgumentException if portletDefinition is null
@since 4.1 | [
"Static",
"utility",
"method",
"computing",
"the",
"permission",
"target",
"ID",
"for",
"a",
"portlet",
"definition",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-security/uPortal-security-core/src/main/java/org/apereo/portal/security/PermissionHelper.java#L35-L46 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-jmx/src/main/java/org/apereo/portal/jmx/JavaManagementServerBean.java | JavaManagementServerBean.startServer | public void startServer() {
if (!System.getProperties().containsKey(JMX_ENABLED_PROPERTY)) {
this.logger.info(
"System Property '"
+ JMX_ENABLED_PROPERTY
+ "' is not set, skipping initialization.");
return;
... | java | public void startServer() {
if (!System.getProperties().containsKey(JMX_ENABLED_PROPERTY)) {
this.logger.info(
"System Property '"
+ JMX_ENABLED_PROPERTY
+ "' is not set, skipping initialization.");
return;
... | [
"public",
"void",
"startServer",
"(",
")",
"{",
"if",
"(",
"!",
"System",
".",
"getProperties",
"(",
")",
".",
"containsKey",
"(",
"JMX_ENABLED_PROPERTY",
")",
")",
"{",
"this",
".",
"logger",
".",
"info",
"(",
"\"System Property '\"",
"+",
"JMX_ENABLED_PROP... | Starts the RMI server and JMX connector server | [
"Starts",
"the",
"RMI",
"server",
"and",
"JMX",
"connector",
"server"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-jmx/src/main/java/org/apereo/portal/jmx/JavaManagementServerBean.java#L135-L215 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-jmx/src/main/java/org/apereo/portal/jmx/JavaManagementServerBean.java | JavaManagementServerBean.stopServer | public void stopServer() {
if (this.jmxConnectorServer == null) {
this.logger.info("No JMXConnectorServer to stop");
return;
}
try {
try {
this.jmxConnectorServer.stop();
this.logger.info("Stopped JMXConnectorServer");
... | java | public void stopServer() {
if (this.jmxConnectorServer == null) {
this.logger.info("No JMXConnectorServer to stop");
return;
}
try {
try {
this.jmxConnectorServer.stop();
this.logger.info("Stopped JMXConnectorServer");
... | [
"public",
"void",
"stopServer",
"(",
")",
"{",
"if",
"(",
"this",
".",
"jmxConnectorServer",
"==",
"null",
")",
"{",
"this",
".",
"logger",
".",
"info",
"(",
"\"No JMXConnectorServer to stop\"",
")",
";",
"return",
";",
"}",
"try",
"{",
"try",
"{",
"this... | Stops the JMX connector server and RMI server | [
"Stops",
"the",
"JMX",
"connector",
"server",
"and",
"RMI",
"server"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-jmx/src/main/java/org/apereo/portal/jmx/JavaManagementServerBean.java#L218-L240 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-jmx/src/main/java/org/apereo/portal/jmx/JavaManagementServerBean.java | JavaManagementServerBean.calculatePortTwo | protected int calculatePortTwo(final int portOne) {
int portTwo = this.portTwo;
if (portTwo <= 0) {
portTwo = portOne + 1;
}
if (this.logger.isDebugEnabled()) {
this.logger.debug("Using " + portTwo + " for portTwo.");
}
return portTwo;
} | java | protected int calculatePortTwo(final int portOne) {
int portTwo = this.portTwo;
if (portTwo <= 0) {
portTwo = portOne + 1;
}
if (this.logger.isDebugEnabled()) {
this.logger.debug("Using " + portTwo + " for portTwo.");
}
return portTwo;
} | [
"protected",
"int",
"calculatePortTwo",
"(",
"final",
"int",
"portOne",
")",
"{",
"int",
"portTwo",
"=",
"this",
".",
"portTwo",
";",
"if",
"(",
"portTwo",
"<=",
"0",
")",
"{",
"portTwo",
"=",
"portOne",
"+",
"1",
";",
"}",
"if",
"(",
"this",
".",
... | Get the second rmi port from the init parameters or calculate it
@param portOne Base port to calculate the second port from if needed.
@return The second port | [
"Get",
"the",
"second",
"rmi",
"port",
"from",
"the",
"init",
"parameters",
"or",
"calculate",
"it"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-jmx/src/main/java/org/apereo/portal/jmx/JavaManagementServerBean.java#L248-L260 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-jmx/src/main/java/org/apereo/portal/jmx/JavaManagementServerBean.java | JavaManagementServerBean.getServiceUrl | protected JMXServiceURL getServiceUrl(final int portOne, int portTwo) {
final String jmxHost;
if (this.host == null) {
final InetAddress inetHost;
try {
inetHost = InetAddress.getLocalHost();
} catch (UnknownHostException uhe) {
throw n... | java | protected JMXServiceURL getServiceUrl(final int portOne, int portTwo) {
final String jmxHost;
if (this.host == null) {
final InetAddress inetHost;
try {
inetHost = InetAddress.getLocalHost();
} catch (UnknownHostException uhe) {
throw n... | [
"protected",
"JMXServiceURL",
"getServiceUrl",
"(",
"final",
"int",
"portOne",
",",
"int",
"portTwo",
")",
"{",
"final",
"String",
"jmxHost",
";",
"if",
"(",
"this",
".",
"host",
"==",
"null",
")",
"{",
"final",
"InetAddress",
"inetHost",
";",
"try",
"{",
... | Generates the JMXServiceURL for the two specified ports.
@return A JMXServiceURL for this host using the two specified ports.
@throws IllegalStateException If localhost cannot be resolved or if the JMXServiceURL is
malformed. | [
"Generates",
"the",
"JMXServiceURL",
"for",
"the",
"two",
"specified",
"ports",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-jmx/src/main/java/org/apereo/portal/jmx/JavaManagementServerBean.java#L269-L309 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-jmx/src/main/java/org/apereo/portal/jmx/JavaManagementServerBean.java | JavaManagementServerBean.getJmxServerEnvironment | protected Map<String, Object> getJmxServerEnvironment() {
final Map<String, Object> jmxEnv = new HashMap<String, Object>();
// SSL Options
final String enableSSL = System.getProperty(JMX_SSL_PROPERTY);
if (Boolean.getBoolean(enableSSL)) {
SslRMIClientSocketFactory csf = new ... | java | protected Map<String, Object> getJmxServerEnvironment() {
final Map<String, Object> jmxEnv = new HashMap<String, Object>();
// SSL Options
final String enableSSL = System.getProperty(JMX_SSL_PROPERTY);
if (Boolean.getBoolean(enableSSL)) {
SslRMIClientSocketFactory csf = new ... | [
"protected",
"Map",
"<",
"String",
",",
"Object",
">",
"getJmxServerEnvironment",
"(",
")",
"{",
"final",
"Map",
"<",
"String",
",",
"Object",
">",
"jmxEnv",
"=",
"new",
"HashMap",
"<",
"String",
",",
"Object",
">",
"(",
")",
";",
"// SSL Options",
"fina... | Generates the environment Map for the JMX server based on system properties
@return A non-null Map of environment settings for the JMX server. | [
"Generates",
"the",
"environment",
"Map",
"for",
"the",
"JMX",
"server",
"based",
"on",
"system",
"properties"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-jmx/src/main/java/org/apereo/portal/jmx/JavaManagementServerBean.java#L316-L346 | train |
Jasig/uPortal | uPortal-events/src/main/java/org/apereo/portal/events/aggr/JpaBaseAggregationDao.java | JpaBaseAggregationDao.collectAllGroupsFromParams | protected final Set<AggregatedGroupMapping> collectAllGroupsFromParams(
Set<K> keys, AggregatedGroupMapping[] aggregatedGroupMappings) {
final Builder<AggregatedGroupMapping> groupsBuilder =
ImmutableSet.<AggregatedGroupMapping>builder();
// Add all groups from the keyset
... | java | protected final Set<AggregatedGroupMapping> collectAllGroupsFromParams(
Set<K> keys, AggregatedGroupMapping[] aggregatedGroupMappings) {
final Builder<AggregatedGroupMapping> groupsBuilder =
ImmutableSet.<AggregatedGroupMapping>builder();
// Add all groups from the keyset
... | [
"protected",
"final",
"Set",
"<",
"AggregatedGroupMapping",
">",
"collectAllGroupsFromParams",
"(",
"Set",
"<",
"K",
">",
"keys",
",",
"AggregatedGroupMapping",
"[",
"]",
"aggregatedGroupMappings",
")",
"{",
"final",
"Builder",
"<",
"AggregatedGroupMapping",
">",
"g... | and set in query. | [
"and",
"set",
"in",
"query",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-events/src/main/java/org/apereo/portal/events/aggr/JpaBaseAggregationDao.java#L411-L422 | train |
Jasig/uPortal | uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/login/LoginPortletHelper.java | LoginPortletHelper.getSelectedProfile | public String getSelectedProfile(PortletRequest request) {
// if a profile selection exists in the session, use it
final PortletSession session = request.getPortletSession();
String profileName =
(String)
session.getAttribute(
... | java | public String getSelectedProfile(PortletRequest request) {
// if a profile selection exists in the session, use it
final PortletSession session = request.getPortletSession();
String profileName =
(String)
session.getAttribute(
... | [
"public",
"String",
"getSelectedProfile",
"(",
"PortletRequest",
"request",
")",
"{",
"// if a profile selection exists in the session, use it",
"final",
"PortletSession",
"session",
"=",
"request",
".",
"getPortletSession",
"(",
")",
";",
"String",
"profileName",
"=",
"(... | Get the profile that should be pre-selected in the local login form.
@param request
@return | [
"Get",
"the",
"profile",
"that",
"should",
"be",
"pre",
"-",
"selected",
"in",
"the",
"local",
"login",
"form",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/login/LoginPortletHelper.java#L69-L99 | train |
Jasig/uPortal | uPortal-rendering/src/main/java/org/apereo/portal/url/xml/XsltPortalUrlProvider.java | XsltPortalUrlProvider.addParameter | public static void addParameter(IUrlBuilder urlBuilder, String name, String value) {
urlBuilder.addParameter(name, value);
} | java | public static void addParameter(IUrlBuilder urlBuilder, String name, String value) {
urlBuilder.addParameter(name, value);
} | [
"public",
"static",
"void",
"addParameter",
"(",
"IUrlBuilder",
"urlBuilder",
",",
"String",
"name",
",",
"String",
"value",
")",
"{",
"urlBuilder",
".",
"addParameter",
"(",
"name",
",",
"value",
")",
";",
"}"
] | Needed due to compile-time type checking limitations of the XSLTC compiler | [
"Needed",
"due",
"to",
"compile",
"-",
"time",
"type",
"checking",
"limitations",
"of",
"the",
"XSLTC",
"compiler"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-rendering/src/main/java/org/apereo/portal/url/xml/XsltPortalUrlProvider.java#L50-L52 | train |
Jasig/uPortal | uPortal-tenants/src/main/java/org/apereo/portal/tenants/TenantService.java | TenantService.nameExists | public boolean nameExists(final String name) {
boolean rslt = false; // default
try {
final ITenant tenant = this.tenantDao.getTenantByName(name);
rslt = tenant != null;
} catch (IllegalArgumentException iae) {
// This exception is completely fine; it simply
... | java | public boolean nameExists(final String name) {
boolean rslt = false; // default
try {
final ITenant tenant = this.tenantDao.getTenantByName(name);
rslt = tenant != null;
} catch (IllegalArgumentException iae) {
// This exception is completely fine; it simply
... | [
"public",
"boolean",
"nameExists",
"(",
"final",
"String",
"name",
")",
"{",
"boolean",
"rslt",
"=",
"false",
";",
"// default",
"try",
"{",
"final",
"ITenant",
"tenant",
"=",
"this",
".",
"tenantDao",
".",
"getTenantByName",
"(",
"name",
")",
";",
"rslt",... | Returns true if a tenant with the specified name exists, otherwise false.
@since 4.3 | [
"Returns",
"true",
"if",
"a",
"tenant",
"with",
"the",
"specified",
"name",
"exists",
"otherwise",
"false",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-tenants/src/main/java/org/apereo/portal/tenants/TenantService.java#L310-L321 | train |
Jasig/uPortal | uPortal-tenants/src/main/java/org/apereo/portal/tenants/TenantService.java | TenantService.fnameExists | public boolean fnameExists(final String fname) {
boolean rslt = false; // default
try {
final ITenant tenant = getTenantByFName(fname);
rslt = tenant != null;
} catch (IllegalArgumentException iae) {
// This exception is completely fine; it simply
... | java | public boolean fnameExists(final String fname) {
boolean rslt = false; // default
try {
final ITenant tenant = getTenantByFName(fname);
rslt = tenant != null;
} catch (IllegalArgumentException iae) {
// This exception is completely fine; it simply
... | [
"public",
"boolean",
"fnameExists",
"(",
"final",
"String",
"fname",
")",
"{",
"boolean",
"rslt",
"=",
"false",
";",
"// default",
"try",
"{",
"final",
"ITenant",
"tenant",
"=",
"getTenantByFName",
"(",
"fname",
")",
";",
"rslt",
"=",
"tenant",
"!=",
"null... | Returns true if a tenant with the specified fname exists, otherwise false.
@since 4.3 | [
"Returns",
"true",
"if",
"a",
"tenant",
"with",
"the",
"specified",
"fname",
"exists",
"otherwise",
"false",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-tenants/src/main/java/org/apereo/portal/tenants/TenantService.java#L328-L339 | train |
Jasig/uPortal | uPortal-tenants/src/main/java/org/apereo/portal/tenants/TenantService.java | TenantService.validateName | public void validateName(final String name) {
Validate.validState(
TENANT_NAME_VALIDATOR_PATTERN.matcher(name).matches(),
"Invalid tenant name '%s' -- names must match %s .",
name,
TENANT_NAME_VALIDATOR_REGEX);
} | java | public void validateName(final String name) {
Validate.validState(
TENANT_NAME_VALIDATOR_PATTERN.matcher(name).matches(),
"Invalid tenant name '%s' -- names must match %s .",
name,
TENANT_NAME_VALIDATOR_REGEX);
} | [
"public",
"void",
"validateName",
"(",
"final",
"String",
"name",
")",
"{",
"Validate",
".",
"validState",
"(",
"TENANT_NAME_VALIDATOR_PATTERN",
".",
"matcher",
"(",
"name",
")",
".",
"matches",
"(",
")",
",",
"\"Invalid tenant name '%s' -- names must match %s .\"",
... | Throws an exception if the specified String isn't a valid tenant name.
@since 4.3 | [
"Throws",
"an",
"exception",
"if",
"the",
"specified",
"String",
"isn",
"t",
"a",
"valid",
"tenant",
"name",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-tenants/src/main/java/org/apereo/portal/tenants/TenantService.java#L346-L352 | train |
Jasig/uPortal | uPortal-tenants/src/main/java/org/apereo/portal/tenants/TenantService.java | TenantService.validateFname | public void validateFname(final String fname) {
Validate.validState(
TENANT_FNAME_VALIDATOR_PATTERN.matcher(fname).matches(),
"Invalid tenant fname '%s' -- fnames must match %s .",
fname,
TENANT_FNAME_VALIDATOR_REGEX);
} | java | public void validateFname(final String fname) {
Validate.validState(
TENANT_FNAME_VALIDATOR_PATTERN.matcher(fname).matches(),
"Invalid tenant fname '%s' -- fnames must match %s .",
fname,
TENANT_FNAME_VALIDATOR_REGEX);
} | [
"public",
"void",
"validateFname",
"(",
"final",
"String",
"fname",
")",
"{",
"Validate",
".",
"validState",
"(",
"TENANT_FNAME_VALIDATOR_PATTERN",
".",
"matcher",
"(",
"fname",
")",
".",
"matches",
"(",
")",
",",
"\"Invalid tenant fname '%s' -- fnames must match %s ... | Throws an exception if the specified String isn't a valid tenant fname.
@since 4.3 | [
"Throws",
"an",
"exception",
"if",
"the",
"specified",
"String",
"isn",
"t",
"a",
"valid",
"tenant",
"fname",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-tenants/src/main/java/org/apereo/portal/tenants/TenantService.java#L359-L365 | train |
Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/dynamicskin/DynamicRespondrSkinConfigController.java | DynamicRespondrSkinConfigController.showConfigPage | @RenderMapping
public String showConfigPage(
RenderRequest request, PortletPreferences preferences, Model model) {
// Add skin names
SortedSet<String> skins = skinService.getSkinNames(request);
model.addAttribute("skinNames", skins);
// Get the list of preferences and ad... | java | @RenderMapping
public String showConfigPage(
RenderRequest request, PortletPreferences preferences, Model model) {
// Add skin names
SortedSet<String> skins = skinService.getSkinNames(request);
model.addAttribute("skinNames", skins);
// Get the list of preferences and ad... | [
"@",
"RenderMapping",
"public",
"String",
"showConfigPage",
"(",
"RenderRequest",
"request",
",",
"PortletPreferences",
"preferences",
",",
"Model",
"model",
")",
"{",
"// Add skin names",
"SortedSet",
"<",
"String",
">",
"skins",
"=",
"skinService",
".",
"getSkinNa... | Display a form to manage skin choices. | [
"Display",
"a",
"form",
"to",
"manage",
"skin",
"choices",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/dynamicskin/DynamicRespondrSkinConfigController.java#L98-L115 | train |
Jasig/uPortal | uPortal-groups/uPortal-groups-grouper/src/main/java/org/apereo/portal/groups/grouper/GrouperEntityGroupStoreFactory.java | GrouperEntityGroupStoreFactory.getGroupStore | public static synchronized IEntityGroupStore getGroupStore() {
if (groupStore == null) {
groupStore = new GrouperEntityGroupStore();
}
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("returning IEntityGroupStore: " + groupStore);
}
return groupStore;
} | java | public static synchronized IEntityGroupStore getGroupStore() {
if (groupStore == null) {
groupStore = new GrouperEntityGroupStore();
}
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("returning IEntityGroupStore: " + groupStore);
}
return groupStore;
} | [
"public",
"static",
"synchronized",
"IEntityGroupStore",
"getGroupStore",
"(",
")",
"{",
"if",
"(",
"groupStore",
"==",
"null",
")",
"{",
"groupStore",
"=",
"new",
"GrouperEntityGroupStore",
"(",
")",
";",
"}",
"if",
"(",
"LOGGER",
".",
"isDebugEnabled",
"(",
... | returns the instance of GrouperEntityGroupStore.
@return The instance.
@throws GroupsException if there is an error
@see IEntityGroupStoreFactory #newGroupStore() | [
"returns",
"the",
"instance",
"of",
"GrouperEntityGroupStore",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-grouper/src/main/java/org/apereo/portal/groups/grouper/GrouperEntityGroupStoreFactory.java#L39-L47 | train |
Jasig/uPortal | uPortal-groups/uPortal-groups-grouper/src/main/java/org/apereo/portal/groups/grouper/GrouperEntityGroupStoreFactory.java | GrouperEntityGroupStoreFactory.newGroupStore | @Override
public IEntityGroupStore newGroupStore(ComponentGroupServiceDescriptor svcDescriptor)
throws GroupsException {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Creating New Grouper IEntityGroupStore");
}
return getGroupStore();
} | java | @Override
public IEntityGroupStore newGroupStore(ComponentGroupServiceDescriptor svcDescriptor)
throws GroupsException {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Creating New Grouper IEntityGroupStore");
}
return getGroupStore();
} | [
"@",
"Override",
"public",
"IEntityGroupStore",
"newGroupStore",
"(",
"ComponentGroupServiceDescriptor",
"svcDescriptor",
")",
"throws",
"GroupsException",
"{",
"if",
"(",
"LOGGER",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"LOGGER",
".",
"debug",
"(",
"\"Creating ... | Construction with parameters.
@param svcDescriptor The parameters.
@return The instance.
@throws GroupsException if there is an error
@see IEntityGroupStoreFactory
#newGroupStore(org.apereo.portal.groups.ComponentGroupServiceDescriptor) | [
"Construction",
"with",
"parameters",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-grouper/src/main/java/org/apereo/portal/groups/grouper/GrouperEntityGroupStoreFactory.java#L73-L80 | train |
Jasig/uPortal | uPortal-web/src/main/java/org/apereo/portal/portlet/marketplace/MarketplaceService.java | MarketplaceService.onApplicationEvent | @Override
public void onApplicationEvent(LoginEvent loginEvent) {
if (enableMarketplacePreloading) {
final IPerson person = loginEvent.getPerson();
/*
* Passing an empty collection pre-loads an unfiltered collection;
* instances of PortletMarketplace that sp... | java | @Override
public void onApplicationEvent(LoginEvent loginEvent) {
if (enableMarketplacePreloading) {
final IPerson person = loginEvent.getPerson();
/*
* Passing an empty collection pre-loads an unfiltered collection;
* instances of PortletMarketplace that sp... | [
"@",
"Override",
"public",
"void",
"onApplicationEvent",
"(",
"LoginEvent",
"loginEvent",
")",
"{",
"if",
"(",
"enableMarketplacePreloading",
")",
"{",
"final",
"IPerson",
"person",
"=",
"loginEvent",
".",
"getPerson",
"(",
")",
";",
"/*\n * Passing an e... | Handle the portal LoginEvent. If marketplace caching is enabled, will preload marketplace
entries for the currently logged in user.
@param loginEvent the login event. | [
"Handle",
"the",
"portal",
"LoginEvent",
".",
"If",
"marketplace",
"caching",
"is",
"enabled",
"will",
"preload",
"marketplace",
"entries",
"for",
"the",
"currently",
"logged",
"in",
"user",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-web/src/main/java/org/apereo/portal/portlet/marketplace/MarketplaceService.java#L108-L120 | train |
Jasig/uPortal | uPortal-web/src/main/java/org/apereo/portal/portlet/marketplace/MarketplaceService.java | MarketplaceService.collectSpecifiedAndDescendantCategories | private void collectSpecifiedAndDescendantCategories(
PortletCategory specified, Set<PortletCategory> gathered) {
final Set<PortletCategory> children =
portletCategoryRegistry.getAllChildCategories(specified);
for (PortletCategory child : children) {
collectSpecif... | java | private void collectSpecifiedAndDescendantCategories(
PortletCategory specified, Set<PortletCategory> gathered) {
final Set<PortletCategory> children =
portletCategoryRegistry.getAllChildCategories(specified);
for (PortletCategory child : children) {
collectSpecif... | [
"private",
"void",
"collectSpecifiedAndDescendantCategories",
"(",
"PortletCategory",
"specified",
",",
"Set",
"<",
"PortletCategory",
">",
"gathered",
")",
"{",
"final",
"Set",
"<",
"PortletCategory",
">",
"children",
"=",
"portletCategoryRegistry",
".",
"getAllChildCa... | Called recursively to gather all specified categories and descendants | [
"Called",
"recursively",
"to",
"gather",
"all",
"specified",
"categories",
"and",
"descendants"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-web/src/main/java/org/apereo/portal/portlet/marketplace/MarketplaceService.java#L365-L373 | train |
Jasig/uPortal | uPortal-web/src/main/java/org/apereo/portal/portlet/marketplace/MarketplaceService.java | MarketplaceService.mayAddPortlet | @Override
@RequestCache
public boolean mayAddPortlet(final IPerson user, final IPortletDefinition portletDefinition) {
Validate.notNull(user, "Cannot determine if null users can browse portlets.");
Validate.notNull(
portletDefinition,
"Cannot determine whether a u... | java | @Override
@RequestCache
public boolean mayAddPortlet(final IPerson user, final IPortletDefinition portletDefinition) {
Validate.notNull(user, "Cannot determine if null users can browse portlets.");
Validate.notNull(
portletDefinition,
"Cannot determine whether a u... | [
"@",
"Override",
"@",
"RequestCache",
"public",
"boolean",
"mayAddPortlet",
"(",
"final",
"IPerson",
"user",
",",
"final",
"IPortletDefinition",
"portletDefinition",
")",
"{",
"Validate",
".",
"notNull",
"(",
"user",
",",
"\"Cannot determine if null users can browse por... | Answers whether the given user may add the portlet to their layout
@param user a non-null IPerson who might be permitted to add
@param portletDefinition a non-null portlet definition
@return true if permitted, false otherwise
@throws IllegalArgumentException if user is null
@throws IllegalArgumentException if portletD... | [
"Answers",
"whether",
"the",
"given",
"user",
"may",
"add",
"the",
"portlet",
"to",
"their",
"layout"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-web/src/main/java/org/apereo/portal/portlet/marketplace/MarketplaceService.java#L385-L398 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/ClusterMutex.java | ClusterMutex.lock | void lock(String serverId) {
Assert.notNull(serverId);
if (this.locked) {
throw new IllegalStateException("Cannot lock already locked mutex: " + this);
}
this.locked = true;
this.lockStart = new Date();
this.lastUpdate = this.lockStart;
this.serverId =... | java | void lock(String serverId) {
Assert.notNull(serverId);
if (this.locked) {
throw new IllegalStateException("Cannot lock already locked mutex: " + this);
}
this.locked = true;
this.lockStart = new Date();
this.lastUpdate = this.lockStart;
this.serverId =... | [
"void",
"lock",
"(",
"String",
"serverId",
")",
"{",
"Assert",
".",
"notNull",
"(",
"serverId",
")",
";",
"if",
"(",
"this",
".",
"locked",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"Cannot lock already locked mutex: \"",
"+",
"this",
")",
";... | Mark the mutex as locked by the specific server | [
"Mark",
"the",
"mutex",
"as",
"locked",
"by",
"the",
"specific",
"server"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/ClusterMutex.java#L135-L144 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/UserPrefsHandler.java | UserPrefsHandler.setUserPreference | public static void setUserPreference(
Element compViewNode, String attributeName, IPerson person) {
Document doc = compViewNode.getOwnerDocument();
NodeList nodes = doc.getElementsByTagName("layout");
boolean layoutOwner = false;
Attr attrib;
Element e;
// Se... | java | public static void setUserPreference(
Element compViewNode, String attributeName, IPerson person) {
Document doc = compViewNode.getOwnerDocument();
NodeList nodes = doc.getElementsByTagName("layout");
boolean layoutOwner = false;
Attr attrib;
Element e;
// Se... | [
"public",
"static",
"void",
"setUserPreference",
"(",
"Element",
"compViewNode",
",",
"String",
"attributeName",
",",
"IPerson",
"person",
")",
"{",
"Document",
"doc",
"=",
"compViewNode",
".",
"getOwnerDocument",
"(",
")",
";",
"NodeList",
"nodes",
"=",
"doc",
... | Records changes made to element attributes that are defined as being part of a user's user
preferences object and not part of the layout. These attributes are specified in the .sdf
files for the structure and theme stylesheets. The value is not stored in the layout but the
loading of user prefs joins to a layout struct... | [
"Records",
"changes",
"made",
"to",
"element",
"attributes",
"that",
"are",
"defined",
"as",
"being",
"part",
"of",
"a",
"user",
"s",
"user",
"preferences",
"object",
"and",
"not",
"part",
"of",
"the",
"layout",
".",
"These",
"attributes",
"are",
"specified"... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/UserPrefsHandler.java#L42-L69 | train |
Jasig/uPortal | uPortal-persondir/src/main/java/org/apereo/portal/persondir/LocalAccountPersonAttributeDao.java | LocalAccountPersonAttributeDao.getPossibleUserAttributeNames | @Override
public Set<String> getPossibleUserAttributeNames() {
final Set<String> names = new HashSet<String>();
names.addAll(this.possibleUserAttributes);
names.addAll(localAccountDao.getCurrentAttributeNames());
names.add(displayNameAttribute);
return names;
} | java | @Override
public Set<String> getPossibleUserAttributeNames() {
final Set<String> names = new HashSet<String>();
names.addAll(this.possibleUserAttributes);
names.addAll(localAccountDao.getCurrentAttributeNames());
names.add(displayNameAttribute);
return names;
} | [
"@",
"Override",
"public",
"Set",
"<",
"String",
">",
"getPossibleUserAttributeNames",
"(",
")",
"{",
"final",
"Set",
"<",
"String",
">",
"names",
"=",
"new",
"HashSet",
"<",
"String",
">",
"(",
")",
";",
"names",
".",
"addAll",
"(",
"this",
".",
"poss... | Return the list of all possible attribute names. This implementation queries the database to
provide a list of all mapped attribute names, plus all attribute keys currently in-use in the
database.
@return Set | [
"Return",
"the",
"list",
"of",
"all",
"possible",
"attribute",
"names",
".",
"This",
"implementation",
"queries",
"the",
"database",
"to",
"provide",
"a",
"list",
"of",
"all",
"mapped",
"attribute",
"names",
"plus",
"all",
"attribute",
"keys",
"currently",
"in... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-persondir/src/main/java/org/apereo/portal/persondir/LocalAccountPersonAttributeDao.java#L130-L137 | train |
Jasig/uPortal | uPortal-persondir/src/main/java/org/apereo/portal/persondir/LocalAccountPersonAttributeDao.java | LocalAccountPersonAttributeDao.getAvailableQueryAttributes | @Override
public Set<String> getAvailableQueryAttributes() {
if (this.queryAttributeMapping == null) {
return Collections.emptySet();
}
return Collections.unmodifiableSet(this.queryAttributeMapping.keySet());
} | java | @Override
public Set<String> getAvailableQueryAttributes() {
if (this.queryAttributeMapping == null) {
return Collections.emptySet();
}
return Collections.unmodifiableSet(this.queryAttributeMapping.keySet());
} | [
"@",
"Override",
"public",
"Set",
"<",
"String",
">",
"getAvailableQueryAttributes",
"(",
")",
"{",
"if",
"(",
"this",
".",
"queryAttributeMapping",
"==",
"null",
")",
"{",
"return",
"Collections",
".",
"emptySet",
"(",
")",
";",
"}",
"return",
"Collections"... | Return the list of all possible query attributes. This implementation queries the database to
provide a list of all mapped query attribute names, plus all attribute keys currently in-use
in the database.
@return Set | [
"Return",
"the",
"list",
"of",
"all",
"possible",
"query",
"attributes",
".",
"This",
"implementation",
"queries",
"the",
"database",
"to",
"provide",
"a",
"list",
"of",
"all",
"mapped",
"query",
"attribute",
"names",
"plus",
"all",
"attribute",
"keys",
"curre... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-persondir/src/main/java/org/apereo/portal/persondir/LocalAccountPersonAttributeDao.java#L146-L153 | train |
Jasig/uPortal | uPortal-persondir/src/main/java/org/apereo/portal/persondir/LocalAccountPersonAttributeDao.java | LocalAccountPersonAttributeDao.mapPersonAttributes | protected IPersonAttributes mapPersonAttributes(final ILocalAccountPerson person) {
final Map<String, List<Object>> mappedAttributes =
new LinkedHashMap<String, List<Object>>();
mappedAttributes.putAll(person.getAttributes());
// map the user's username to the portal's username... | java | protected IPersonAttributes mapPersonAttributes(final ILocalAccountPerson person) {
final Map<String, List<Object>> mappedAttributes =
new LinkedHashMap<String, List<Object>>();
mappedAttributes.putAll(person.getAttributes());
// map the user's username to the portal's username... | [
"protected",
"IPersonAttributes",
"mapPersonAttributes",
"(",
"final",
"ILocalAccountPerson",
"person",
")",
"{",
"final",
"Map",
"<",
"String",
",",
"List",
"<",
"Object",
">",
">",
"mappedAttributes",
"=",
"new",
"LinkedHashMap",
"<",
"String",
",",
"List",
"<... | This implementation uses the result attribute mapping to supplement, rather than replace, the
attributes returned from the database. | [
"This",
"implementation",
"uses",
"the",
"result",
"attribute",
"mapping",
"to",
"supplement",
"rather",
"than",
"replace",
"the",
"attributes",
"returned",
"from",
"the",
"database",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-persondir/src/main/java/org/apereo/portal/persondir/LocalAccountPersonAttributeDao.java#L225-L296 | train |
Jasig/uPortal | uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/ReferenceCompositeGroupService.java | ReferenceCompositeGroupService.searchForGroups | @Override
public EntityIdentifier[] searchForGroups(
String query, IGroupConstants.SearchMethod method, Class leaftype)
throws GroupsException {
Set allIds = new HashSet();
for (Iterator services = getComponentServices().values().iterator(); services.hasNext(); ) {
... | java | @Override
public EntityIdentifier[] searchForGroups(
String query, IGroupConstants.SearchMethod method, Class leaftype)
throws GroupsException {
Set allIds = new HashSet();
for (Iterator services = getComponentServices().values().iterator(); services.hasNext(); ) {
... | [
"@",
"Override",
"public",
"EntityIdentifier",
"[",
"]",
"searchForGroups",
"(",
"String",
"query",
",",
"IGroupConstants",
".",
"SearchMethod",
"method",
",",
"Class",
"leaftype",
")",
"throws",
"GroupsException",
"{",
"Set",
"allIds",
"=",
"new",
"HashSet",
"(... | Find EntityIdentifiers for groups whose name matches the query string according to the
specified method and matches the provided leaf type | [
"Find",
"EntityIdentifiers",
"for",
"groups",
"whose",
"name",
"matches",
"the",
"query",
"string",
"according",
"to",
"the",
"specified",
"method",
"and",
"matches",
"the",
"provided",
"leaf",
"type"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/ReferenceCompositeGroupService.java#L258-L278 | train |
Jasig/uPortal | uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/ReferenceEntityGroupStoreFactory.java | ReferenceEntityGroupStoreFactory.newInstance | public IEntityGroupStore newInstance() throws GroupsException {
try {
return new RDBMEntityGroupStore();
} catch (Exception ex) {
log.error("ReferenceEntityGroupStoreFactory.newInstance(): " + ex);
throw new GroupsException(ex);
}
} | java | public IEntityGroupStore newInstance() throws GroupsException {
try {
return new RDBMEntityGroupStore();
} catch (Exception ex) {
log.error("ReferenceEntityGroupStoreFactory.newInstance(): " + ex);
throw new GroupsException(ex);
}
} | [
"public",
"IEntityGroupStore",
"newInstance",
"(",
")",
"throws",
"GroupsException",
"{",
"try",
"{",
"return",
"new",
"RDBMEntityGroupStore",
"(",
")",
";",
"}",
"catch",
"(",
"Exception",
"ex",
")",
"{",
"log",
".",
"error",
"(",
"\"ReferenceEntityGroupStoreFa... | Return an instance of the group store implementation.
@return IEntityGroupStore
@exception GroupsException | [
"Return",
"an",
"instance",
"of",
"the",
"group",
"store",
"implementation",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/ReferenceEntityGroupStoreFactory.java#L56-L63 | train |
Jasig/uPortal | uPortal-web/src/main/java/org/apereo/portal/rendering/AnalyticsIncorporationComponent.java | AnalyticsIncorporationComponent.initMapper | private void initMapper() {
final BeanPropertyFilter filterOutAllExcept =
SimpleBeanPropertyFilter.filterOutAllExcept("fname", "executionTimeNano");
this.mapper.addMixInAnnotations(
PortalEvent.class, PortletRenderExecutionEventFilterMixIn.class);
final SimpleFilt... | java | private void initMapper() {
final BeanPropertyFilter filterOutAllExcept =
SimpleBeanPropertyFilter.filterOutAllExcept("fname", "executionTimeNano");
this.mapper.addMixInAnnotations(
PortalEvent.class, PortletRenderExecutionEventFilterMixIn.class);
final SimpleFilt... | [
"private",
"void",
"initMapper",
"(",
")",
"{",
"final",
"BeanPropertyFilter",
"filterOutAllExcept",
"=",
"SimpleBeanPropertyFilter",
".",
"filterOutAllExcept",
"(",
"\"fname\"",
",",
"\"executionTimeNano\"",
")",
";",
"this",
".",
"mapper",
".",
"addMixInAnnotations",
... | Configure the ObjectMapper to filter out all fields on the events except those that are
actually needed for the analytics reporting | [
"Configure",
"the",
"ObjectMapper",
"to",
"filter",
"out",
"all",
"fields",
"on",
"the",
"events",
"except",
"those",
"that",
"are",
"actually",
"needed",
"for",
"the",
"analytics",
"reporting"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-web/src/main/java/org/apereo/portal/rendering/AnalyticsIncorporationComponent.java#L85-L94 | train |
Jasig/uPortal | uPortal-spring/src/main/java/org/springframework/context/support/PortalPropertySourcesPlaceholderConfigurer.java | PortalPropertySourcesPlaceholderConfigurer.mergeProperties | @Override
protected Properties mergeProperties() throws IOException {
Properties rslt = null;
/*
* If properties file encryption is used in this deployment, the
* encryption key will be made available to the application as an
* environment variable called UP_JASYPT_KEY.
... | java | @Override
protected Properties mergeProperties() throws IOException {
Properties rslt = null;
/*
* If properties file encryption is used in this deployment, the
* encryption key will be made available to the application as an
* environment variable called UP_JASYPT_KEY.
... | [
"@",
"Override",
"protected",
"Properties",
"mergeProperties",
"(",
")",
"throws",
"IOException",
"{",
"Properties",
"rslt",
"=",
"null",
";",
"/*\n * If properties file encryption is used in this deployment, the\n * encryption key will be made available to the applicat... | Override PropertiesLoaderSupport.mergeProprties in order to slip in a properly-configured
EncryptableProperties instance, allowing us to encrypt property values at rest. | [
"Override",
"PropertiesLoaderSupport",
".",
"mergeProprties",
"in",
"order",
"to",
"slip",
"in",
"a",
"properly",
"-",
"configured",
"EncryptableProperties",
"instance",
"allowing",
"us",
"to",
"encrypt",
"property",
"values",
"at",
"rest",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-spring/src/main/java/org/springframework/context/support/PortalPropertySourcesPlaceholderConfigurer.java#L147-L205 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/RandomTokenGenerator.java | RandomTokenGenerator.generateRandomToken | public String generateRandomToken(int length) {
final char[] token = new char[length];
for (int i = 0; i < length; i++) {
final int tokenIndex = random.nextInt(this.tokenChars.length);
token[i] = tokenChars[tokenIndex];
}
return new String(token);
} | java | public String generateRandomToken(int length) {
final char[] token = new char[length];
for (int i = 0; i < length; i++) {
final int tokenIndex = random.nextInt(this.tokenChars.length);
token[i] = tokenChars[tokenIndex];
}
return new String(token);
} | [
"public",
"String",
"generateRandomToken",
"(",
"int",
"length",
")",
"{",
"final",
"char",
"[",
"]",
"token",
"=",
"new",
"char",
"[",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"fina... | Generate a random token of the specified length | [
"Generate",
"a",
"random",
"token",
"of",
"the",
"specified",
"length"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/RandomTokenGenerator.java#L66-L75 | train |
Jasig/uPortal | uPortal-content/uPortal-content-portlet/src/main/java/org/apereo/portal/portlet/dao/jpa/PortletDefinitionImpl.java | PortletDefinitionImpl.init | @PostLoad
@PostPersist
@PostUpdate
@PostRemove
private void init() {
if (this.internalPortletDefinitionId != -1
&& (this.portletDefinitionId == null
|| this.portletDefinitionId.getLongId()
!= this.internalPortletDefinitionId... | java | @PostLoad
@PostPersist
@PostUpdate
@PostRemove
private void init() {
if (this.internalPortletDefinitionId != -1
&& (this.portletDefinitionId == null
|| this.portletDefinitionId.getLongId()
!= this.internalPortletDefinitionId... | [
"@",
"PostLoad",
"@",
"PostPersist",
"@",
"PostUpdate",
"@",
"PostRemove",
"private",
"void",
"init",
"(",
")",
"{",
"if",
"(",
"this",
".",
"internalPortletDefinitionId",
"!=",
"-",
"1",
"&&",
"(",
"this",
".",
"portletDefinitionId",
"==",
"null",
"||",
"... | Used to initialize fields after persistence actions. | [
"Used",
"to",
"initialize",
"fields",
"after",
"persistence",
"actions",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-content/uPortal-content-portlet/src/main/java/org/apereo/portal/portlet/dao/jpa/PortletDefinitionImpl.java#L210-L222 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-core/src/main/java/org/apereo/portal/layout/UserLayoutHelperImpl.java | UserLayoutHelperImpl.resetUserLayoutAllProfiles | @BasePortalJpaDao.PortalTransactional
public void resetUserLayoutAllProfiles(final IPersonAttributes personAttributes) {
final IPerson person = PersonFactory.createRestrictedPerson();
person.setAttributes(personAttributes.getAttributes());
// get the integer uid into the person object withou... | java | @BasePortalJpaDao.PortalTransactional
public void resetUserLayoutAllProfiles(final IPersonAttributes personAttributes) {
final IPerson person = PersonFactory.createRestrictedPerson();
person.setAttributes(personAttributes.getAttributes());
// get the integer uid into the person object withou... | [
"@",
"BasePortalJpaDao",
".",
"PortalTransactional",
"public",
"void",
"resetUserLayoutAllProfiles",
"(",
"final",
"IPersonAttributes",
"personAttributes",
")",
"{",
"final",
"IPerson",
"person",
"=",
"PersonFactory",
".",
"createRestrictedPerson",
"(",
")",
";",
"perso... | Resets a users layout for all the users profiles
@param personAttributes | [
"Resets",
"a",
"users",
"layout",
"for",
"all",
"the",
"users",
"profiles"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-core/src/main/java/org/apereo/portal/layout/UserLayoutHelperImpl.java#L82-L95 | train |
Jasig/uPortal | uPortal-web/src/main/java/org/apereo/portal/portlet/dao/jpa/JpaMarketplaceRatingDao.java | JpaMarketplaceRatingDao.createOrUpdateRating | @Override
@PortalTransactional
public IMarketplaceRating createOrUpdateRating(
IMarketplaceRating marketplaceRatingImplementation) {
Validate.notNull(marketplaceRatingImplementation, "MarketplaceRatingImpl must not be null");
final EntityManager entityManager = this.getEntityManager(... | java | @Override
@PortalTransactional
public IMarketplaceRating createOrUpdateRating(
IMarketplaceRating marketplaceRatingImplementation) {
Validate.notNull(marketplaceRatingImplementation, "MarketplaceRatingImpl must not be null");
final EntityManager entityManager = this.getEntityManager(... | [
"@",
"Override",
"@",
"PortalTransactional",
"public",
"IMarketplaceRating",
"createOrUpdateRating",
"(",
"IMarketplaceRating",
"marketplaceRatingImplementation",
")",
"{",
"Validate",
".",
"notNull",
"(",
"marketplaceRatingImplementation",
",",
"\"MarketplaceRatingImpl must not ... | This method will either create a new rating or update an existing rating
@param Must not be null
@return the attached entity | [
"This",
"method",
"will",
"either",
"create",
"a",
"new",
"rating",
"or",
"update",
"an",
"existing",
"rating"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-web/src/main/java/org/apereo/portal/portlet/dao/jpa/JpaMarketplaceRatingDao.java#L82-L99 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/xml/stream/IndentingXMLEventWriter.java | IndentingXMLEventWriter.afterMarkup | protected void afterMarkup() {
final Set<StackState> state = scopeState.getFirst();
state.add(StackState.WROTE_MARKUP);
} | java | protected void afterMarkup() {
final Set<StackState> state = scopeState.getFirst();
state.add(StackState.WROTE_MARKUP);
} | [
"protected",
"void",
"afterMarkup",
"(",
")",
"{",
"final",
"Set",
"<",
"StackState",
">",
"state",
"=",
"scopeState",
".",
"getFirst",
"(",
")",
";",
"state",
".",
"add",
"(",
"StackState",
".",
"WROTE_MARKUP",
")",
";",
"}"
] | Note that markup or indentation was written. | [
"Note",
"that",
"markup",
"or",
"indentation",
"was",
"written",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/xml/stream/IndentingXMLEventWriter.java#L133-L136 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/xml/stream/IndentingXMLEventWriter.java | IndentingXMLEventWriter.afterData | protected void afterData() {
final Set<StackState> state = scopeState.getFirst();
state.add(StackState.WROTE_DATA);
} | java | protected void afterData() {
final Set<StackState> state = scopeState.getFirst();
state.add(StackState.WROTE_DATA);
} | [
"protected",
"void",
"afterData",
"(",
")",
"{",
"final",
"Set",
"<",
"StackState",
">",
"state",
"=",
"scopeState",
".",
"getFirst",
"(",
")",
";",
"state",
".",
"add",
"(",
"StackState",
".",
"WROTE_DATA",
")",
";",
"}"
] | Note that data were written. | [
"Note",
"that",
"data",
"were",
"written",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/xml/stream/IndentingXMLEventWriter.java#L139-L142 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/xml/stream/IndentingXMLEventWriter.java | IndentingXMLEventWriter.getIndent | protected String getIndent(int depth, int size) {
final int length = depth * size;
String indent = indentCache.get(length);
if (indent == null) {
indent = getLineSeparator() + StringUtils.repeat(" ", length);
indentCache.put(length, indent);
}
return inden... | java | protected String getIndent(int depth, int size) {
final int length = depth * size;
String indent = indentCache.get(length);
if (indent == null) {
indent = getLineSeparator() + StringUtils.repeat(" ", length);
indentCache.put(length, indent);
}
return inden... | [
"protected",
"String",
"getIndent",
"(",
"int",
"depth",
",",
"int",
"size",
")",
"{",
"final",
"int",
"length",
"=",
"depth",
"*",
"size",
";",
"String",
"indent",
"=",
"indentCache",
".",
"get",
"(",
"length",
")",
";",
"if",
"(",
"indent",
"==",
"... | Generate an indentation string for the specified depth and indent size | [
"Generate",
"an",
"indentation",
"string",
"for",
"the",
"specified",
"depth",
"and",
"indent",
"size"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/xml/stream/IndentingXMLEventWriter.java#L199-L207 | train |
Jasig/uPortal | uPortal-rendering/src/main/java/org/apereo/portal/url/UrlSyntaxProviderImpl.java | UrlSyntaxProviderImpl.parsePortletParameterName | protected Tuple<String, IPortletWindowId> parsePortletParameterName(
HttpServletRequest request, String name, Set<String> additionalPortletIds) {
// Look for a 2nd separator which might indicate a portlet window id
for (final String additionalPortletId : additionalPortletIds) {
f... | java | protected Tuple<String, IPortletWindowId> parsePortletParameterName(
HttpServletRequest request, String name, Set<String> additionalPortletIds) {
// Look for a 2nd separator which might indicate a portlet window id
for (final String additionalPortletId : additionalPortletIds) {
f... | [
"protected",
"Tuple",
"<",
"String",
",",
"IPortletWindowId",
">",
"parsePortletParameterName",
"(",
"HttpServletRequest",
"request",
",",
"String",
"name",
",",
"Set",
"<",
"String",
">",
"additionalPortletIds",
")",
"{",
"// Look for a 2nd separator which might indicate... | Parse the parameter name and the optional portlet window id from a fully qualified query
parameter. | [
"Parse",
"the",
"parameter",
"name",
"and",
"the",
"optional",
"portlet",
"window",
"id",
"from",
"a",
"fully",
"qualified",
"query",
"parameter",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-rendering/src/main/java/org/apereo/portal/url/UrlSyntaxProviderImpl.java#L930-L951 | train |
Jasig/uPortal | uPortal-rendering/src/main/java/org/apereo/portal/url/UrlSyntaxProviderImpl.java | UrlSyntaxProviderImpl.addPortletUrlData | protected void addPortletUrlData(
final HttpServletRequest request,
final UrlStringBuilder url,
final UrlType urlType,
final IPortletUrlBuilder portletUrlBuilder,
final IPortletWindowId targetedPortletWindowId,
final boolean statelessUrl) {
... | java | protected void addPortletUrlData(
final HttpServletRequest request,
final UrlStringBuilder url,
final UrlType urlType,
final IPortletUrlBuilder portletUrlBuilder,
final IPortletWindowId targetedPortletWindowId,
final boolean statelessUrl) {
... | [
"protected",
"void",
"addPortletUrlData",
"(",
"final",
"HttpServletRequest",
"request",
",",
"final",
"UrlStringBuilder",
"url",
",",
"final",
"UrlType",
"urlType",
",",
"final",
"IPortletUrlBuilder",
"portletUrlBuilder",
",",
"final",
"IPortletWindowId",
"targetedPortle... | Add the provided portlet url builder data to the url string builder | [
"Add",
"the",
"provided",
"portlet",
"url",
"builder",
"data",
"to",
"the",
"url",
"string",
"builder"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-rendering/src/main/java/org/apereo/portal/url/UrlSyntaxProviderImpl.java#L1272-L1399 | train |
Jasig/uPortal | uPortal-rendering/src/main/java/org/apereo/portal/url/UrlSyntaxProviderImpl.java | UrlSyntaxProviderImpl.getEncoding | protected String getEncoding(HttpServletRequest request) {
final String encoding = request.getCharacterEncoding();
if (encoding != null) {
return encoding;
}
return this.defaultEncoding;
} | java | protected String getEncoding(HttpServletRequest request) {
final String encoding = request.getCharacterEncoding();
if (encoding != null) {
return encoding;
}
return this.defaultEncoding;
} | [
"protected",
"String",
"getEncoding",
"(",
"HttpServletRequest",
"request",
")",
"{",
"final",
"String",
"encoding",
"=",
"request",
".",
"getCharacterEncoding",
"(",
")",
";",
"if",
"(",
"encoding",
"!=",
"null",
")",
"{",
"return",
"encoding",
";",
"}",
"r... | Tries to determine the encoded from the request, if not available falls back to configured
default.
@param request The current request.
@return The encoding to use. | [
"Tries",
"to",
"determine",
"the",
"encoded",
"from",
"the",
"request",
"if",
"not",
"available",
"falls",
"back",
"to",
"configured",
"default",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-rendering/src/main/java/org/apereo/portal/url/UrlSyntaxProviderImpl.java#L1454-L1461 | train |
Jasig/uPortal | uPortal-index/src/main/java/org/apereo/portal/index/PortalSearchIndexer.java | PortalSearchIndexer.updateIndex | public void updateIndex() {
if (!isEnabled()) {
return;
}
final IndexWriterConfig indexWriterConfig = new IndexWriterConfig(new StandardAnalyzer());
indexWriterConfig
.setCommitOnClose(true)
.setOpenMode(IndexWriterConfig.OpenMode.CREATE_OR_A... | java | public void updateIndex() {
if (!isEnabled()) {
return;
}
final IndexWriterConfig indexWriterConfig = new IndexWriterConfig(new StandardAnalyzer());
indexWriterConfig
.setCommitOnClose(true)
.setOpenMode(IndexWriterConfig.OpenMode.CREATE_OR_A... | [
"public",
"void",
"updateIndex",
"(",
")",
"{",
"if",
"(",
"!",
"isEnabled",
"(",
")",
")",
"{",
"return",
";",
"}",
"final",
"IndexWriterConfig",
"indexWriterConfig",
"=",
"new",
"IndexWriterConfig",
"(",
"new",
"StandardAnalyzer",
"(",
")",
")",
";",
"in... | Called by Quatrz. | [
"Called",
"by",
"Quatrz",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-index/src/main/java/org/apereo/portal/index/PortalSearchIndexer.java#L60-L77 | train |
Jasig/uPortal | uPortal-groups/uPortal-groups-grouper/src/main/java/org/apereo/portal/groups/grouper/GrouperEntitySearcherFactory.java | GrouperEntitySearcherFactory.newEntitySearcher | @Override
public IEntitySearcher newEntitySearcher() throws GroupsException {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Creating New Grouper GrouperEntitySearcherFactory");
}
return (IEntitySearcher) new GrouperEntityGroupStoreFactory().newGroupStore();
} | java | @Override
public IEntitySearcher newEntitySearcher() throws GroupsException {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Creating New Grouper GrouperEntitySearcherFactory");
}
return (IEntitySearcher) new GrouperEntityGroupStoreFactory().newGroupStore();
} | [
"@",
"Override",
"public",
"IEntitySearcher",
"newEntitySearcher",
"(",
")",
"throws",
"GroupsException",
"{",
"if",
"(",
"LOGGER",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"LOGGER",
".",
"debug",
"(",
"\"Creating New Grouper GrouperEntitySearcherFactory\"",
")",
... | Creates an instance of EntitySearcher.
@return The instance.
@see IEntitySearcherFactory#newEntitySearcher() | [
"Creates",
"an",
"instance",
"of",
"EntitySearcher",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-grouper/src/main/java/org/apereo/portal/groups/grouper/GrouperEntitySearcherFactory.java#L35-L41 | train |
Jasig/uPortal | uPortal-events/src/main/java/org/apereo/portal/events/aggr/PortalEventProcessingManagerImpl.java | PortalEventProcessingManagerImpl.checkDatabaseVersion | private boolean checkDatabaseVersion(String databaseName) {
final Version softwareVersion = this.requiredProductVersions.get(databaseName);
if (softwareVersion == null) {
throw new IllegalStateException("No version number is configured for: " + databaseName);
}
final Version... | java | private boolean checkDatabaseVersion(String databaseName) {
final Version softwareVersion = this.requiredProductVersions.get(databaseName);
if (softwareVersion == null) {
throw new IllegalStateException("No version number is configured for: " + databaseName);
}
final Version... | [
"private",
"boolean",
"checkDatabaseVersion",
"(",
"String",
"databaseName",
")",
"{",
"final",
"Version",
"softwareVersion",
"=",
"this",
".",
"requiredProductVersions",
".",
"get",
"(",
"databaseName",
")",
";",
"if",
"(",
"softwareVersion",
"==",
"null",
")",
... | Check if the database and software versions match | [
"Check",
"if",
"the",
"database",
"and",
"software",
"versions",
"match"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-events/src/main/java/org/apereo/portal/events/aggr/PortalEventProcessingManagerImpl.java#L436-L449 | train |
Jasig/uPortal | uPortal-web/src/main/java/org/apereo/portal/portlet/marketplace/MarketplaceSearchService.java | MarketplaceSearchService.getSearchResults | @Override
public SearchResults getSearchResults(PortletRequest request, SearchRequest query) {
final String queryString = query.getSearchTerms().toLowerCase();
final List<IPortletDefinition> portlets =
portletDefinitionRegistry.getAllPortletDefinitions();
final HttpServletR... | java | @Override
public SearchResults getSearchResults(PortletRequest request, SearchRequest query) {
final String queryString = query.getSearchTerms().toLowerCase();
final List<IPortletDefinition> portlets =
portletDefinitionRegistry.getAllPortletDefinitions();
final HttpServletR... | [
"@",
"Override",
"public",
"SearchResults",
"getSearchResults",
"(",
"PortletRequest",
"request",
",",
"SearchRequest",
"query",
")",
"{",
"final",
"String",
"queryString",
"=",
"query",
".",
"getSearchTerms",
"(",
")",
".",
"toLowerCase",
"(",
")",
";",
"final"... | Returns a list of search results that pertain to the marketplace query is the query to search
will search name, title, description, fname, and captions | [
"Returns",
"a",
"list",
"of",
"search",
"results",
"that",
"pertain",
"to",
"the",
"marketplace",
"query",
"is",
"the",
"query",
"to",
"search",
"will",
"search",
"name",
"title",
"description",
"fname",
"and",
"captions"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-web/src/main/java/org/apereo/portal/portlet/marketplace/MarketplaceSearchService.java#L93-L152 | train |
Jasig/uPortal | uPortal-security/uPortal-security-authn/src/main/java/org/apereo/portal/security/provider/CacheSecurityContext.java | CacheSecurityContext.getOpaqueCredentials | @Override
public IOpaqueCredentials getOpaqueCredentials() {
if (parentContext != null && parentContext.isAuthenticated()) {
NotSoOpaqueCredentials oc = new CacheOpaqueCredentials();
oc.setCredentials(this.cachedcredentials);
return oc;
} else return null;
} | java | @Override
public IOpaqueCredentials getOpaqueCredentials() {
if (parentContext != null && parentContext.isAuthenticated()) {
NotSoOpaqueCredentials oc = new CacheOpaqueCredentials();
oc.setCredentials(this.cachedcredentials);
return oc;
} else return null;
} | [
"@",
"Override",
"public",
"IOpaqueCredentials",
"getOpaqueCredentials",
"(",
")",
"{",
"if",
"(",
"parentContext",
"!=",
"null",
"&&",
"parentContext",
".",
"isAuthenticated",
"(",
")",
")",
"{",
"NotSoOpaqueCredentials",
"oc",
"=",
"new",
"CacheOpaqueCredentials",... | We need to override this method in order to return a class that implements the
NotSoOpaqueCredentials interface. | [
"We",
"need",
"to",
"override",
"this",
"method",
"in",
"order",
"to",
"return",
"a",
"class",
"that",
"implements",
"the",
"NotSoOpaqueCredentials",
"interface",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-security/uPortal-security-authn/src/main/java/org/apereo/portal/security/provider/CacheSecurityContext.java#L116-L123 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/security/AdminEvaluator.java | AdminEvaluator.isAdmin | public static boolean isAdmin(IPerson p) {
IAuthorizationPrincipal iap =
AuthorizationServiceFacade.instance()
.newPrincipal(
p.getEntityIdentifier().getKey(),
p.getEntityIdentifier().getType());
ret... | java | public static boolean isAdmin(IPerson p) {
IAuthorizationPrincipal iap =
AuthorizationServiceFacade.instance()
.newPrincipal(
p.getEntityIdentifier().getKey(),
p.getEntityIdentifier().getType());
ret... | [
"public",
"static",
"boolean",
"isAdmin",
"(",
"IPerson",
"p",
")",
"{",
"IAuthorizationPrincipal",
"iap",
"=",
"AuthorizationServiceFacade",
".",
"instance",
"(",
")",
".",
"newPrincipal",
"(",
"p",
".",
"getEntityIdentifier",
"(",
")",
".",
"getKey",
"(",
")... | Determines if the passed-in IPerson represents a user that is a member of the administrator
group or any of its sub groups.
@param p
@return | [
"Determines",
"if",
"the",
"passed",
"-",
"in",
"IPerson",
"represents",
"a",
"user",
"that",
"is",
"a",
"member",
"of",
"the",
"administrator",
"group",
"or",
"any",
"of",
"its",
"sub",
"groups",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/security/AdminEvaluator.java#L46-L54 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/security/AdminEvaluator.java | AdminEvaluator.isAdmin | public static boolean isAdmin(IAuthorizationPrincipal ap) {
IGroupMember member = AuthorizationServiceFacade.instance().getGroupMember(ap);
return isAdmin(member);
} | java | public static boolean isAdmin(IAuthorizationPrincipal ap) {
IGroupMember member = AuthorizationServiceFacade.instance().getGroupMember(ap);
return isAdmin(member);
} | [
"public",
"static",
"boolean",
"isAdmin",
"(",
"IAuthorizationPrincipal",
"ap",
")",
"{",
"IGroupMember",
"member",
"=",
"AuthorizationServiceFacade",
".",
"instance",
"(",
")",
".",
"getGroupMember",
"(",
"ap",
")",
";",
"return",
"isAdmin",
"(",
"member",
")",... | Determines if the passed-in authorization principal represents a user that is a member of the
administrator group or any of its sub groups. | [
"Determines",
"if",
"the",
"passed",
"-",
"in",
"authorization",
"principal",
"represents",
"a",
"user",
"that",
"is",
"a",
"member",
"of",
"the",
"administrator",
"group",
"or",
"any",
"of",
"its",
"sub",
"groups",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/security/AdminEvaluator.java#L60-L63 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/security/AdminEvaluator.java | AdminEvaluator.isAdmin | public static boolean isAdmin(IGroupMember member) {
IEntityGroup adminGroup = null;
try {
adminGroup =
GroupService.getDistinguishedGroup(PORTAL_ADMINISTRATORS_DISTINGUISHED_GROUP);
} catch (GroupsException ge) {
// cannot determine whether or not th... | java | public static boolean isAdmin(IGroupMember member) {
IEntityGroup adminGroup = null;
try {
adminGroup =
GroupService.getDistinguishedGroup(PORTAL_ADMINISTRATORS_DISTINGUISHED_GROUP);
} catch (GroupsException ge) {
// cannot determine whether or not th... | [
"public",
"static",
"boolean",
"isAdmin",
"(",
"IGroupMember",
"member",
")",
"{",
"IEntityGroup",
"adminGroup",
"=",
"null",
";",
"try",
"{",
"adminGroup",
"=",
"GroupService",
".",
"getDistinguishedGroup",
"(",
"PORTAL_ADMINISTRATORS_DISTINGUISHED_GROUP",
")",
";",
... | Determines if the passed-in group member represents a user that is a member of the
administrator group or any of its sub groups. | [
"Determines",
"if",
"the",
"passed",
"-",
"in",
"group",
"member",
"represents",
"a",
"user",
"that",
"is",
"a",
"member",
"of",
"the",
"administrator",
"group",
"or",
"any",
"of",
"its",
"sub",
"groups",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/security/AdminEvaluator.java#L69-L84 | train |
Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/dynamicskin/storage/AbstractDynamicSkinService.java | AbstractDynamicSkinService.skinCssFileExists | @Override
public boolean skinCssFileExists(DynamicSkinInstanceData data) {
final String cssInstanceKey = getCssInstanceKey(data);
// Check the existing map first since it is faster than accessing the actual file.
if (instanceKeysForExistingCss.contains(cssInstanceKey)) {
return t... | java | @Override
public boolean skinCssFileExists(DynamicSkinInstanceData data) {
final String cssInstanceKey = getCssInstanceKey(data);
// Check the existing map first since it is faster than accessing the actual file.
if (instanceKeysForExistingCss.contains(cssInstanceKey)) {
return t... | [
"@",
"Override",
"public",
"boolean",
"skinCssFileExists",
"(",
"DynamicSkinInstanceData",
"data",
")",
"{",
"final",
"String",
"cssInstanceKey",
"=",
"getCssInstanceKey",
"(",
"data",
")",
";",
"// Check the existing map first since it is faster than accessing the actual file.... | Return true if the skin file already exists. Check memory first in a concurrent manner to
allow multiple threads to check simultaneously. | [
"Return",
"true",
"if",
"the",
"skin",
"file",
"already",
"exists",
".",
"Check",
"memory",
"first",
"in",
"a",
"concurrent",
"manner",
"to",
"allow",
"multiple",
"threads",
"to",
"check",
"simultaneously",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/dynamicskin/storage/AbstractDynamicSkinService.java#L108-L123 | train |
Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/dynamicskin/storage/AbstractDynamicSkinService.java | AbstractDynamicSkinService.generateSkinCssFile | @Override
public void generateSkinCssFile(DynamicSkinInstanceData data) {
final String cssInstanceKey = getCssInstanceKey(data);
synchronized (cssInstanceKey) {
if (instanceKeysForExistingCss.contains(cssInstanceKey)) {
/*
* Two or more threads needing th... | java | @Override
public void generateSkinCssFile(DynamicSkinInstanceData data) {
final String cssInstanceKey = getCssInstanceKey(data);
synchronized (cssInstanceKey) {
if (instanceKeysForExistingCss.contains(cssInstanceKey)) {
/*
* Two or more threads needing th... | [
"@",
"Override",
"public",
"void",
"generateSkinCssFile",
"(",
"DynamicSkinInstanceData",
"data",
")",
"{",
"final",
"String",
"cssInstanceKey",
"=",
"getCssInstanceKey",
"(",
"data",
")",
";",
"synchronized",
"(",
"cssInstanceKey",
")",
"{",
"if",
"(",
"instanceK... | Creates the skin css file in a thread-safe manner that allows multiple different skin files
to be created simultaneously to handle large tenant situations where all the custom CSS files
were cleared away after a uPortal deploy.
<p>Since the less compilation phase is fairly slow (several seconds) and intensive, this
me... | [
"Creates",
"the",
"skin",
"css",
"file",
"in",
"a",
"thread",
"-",
"safe",
"manner",
"that",
"allows",
"multiple",
"different",
"skin",
"files",
"to",
"be",
"created",
"simultaneously",
"to",
"handle",
"large",
"tenant",
"situations",
"where",
"all",
"the",
... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/dynamicskin/storage/AbstractDynamicSkinService.java#L165-L206 | train |
Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/dynamicskin/storage/AbstractDynamicSkinService.java | AbstractDynamicSkinService.processLessFile | private void processLessFile(DynamicSkinInstanceData data) throws IOException, LessException {
// Prepare the LESS sources for compilation
final LessSource lessSource = new LessSource(new File(getSkinLessPath(data)));
if (logger.isDebugEnabled()) {
final String result = lessSource.... | java | private void processLessFile(DynamicSkinInstanceData data) throws IOException, LessException {
// Prepare the LESS sources for compilation
final LessSource lessSource = new LessSource(new File(getSkinLessPath(data)));
if (logger.isDebugEnabled()) {
final String result = lessSource.... | [
"private",
"void",
"processLessFile",
"(",
"DynamicSkinInstanceData",
"data",
")",
"throws",
"IOException",
",",
"LessException",
"{",
"// Prepare the LESS sources for compilation",
"final",
"LessSource",
"lessSource",
"=",
"new",
"LessSource",
"(",
"new",
"File",
"(",
... | Less compile the include file into a temporary css file. When done rename the temporary css
file to the correct output filename. Since the less compilation phase takes several seconds,
this insures the output css file is does not exist on the filesystem until it is complete. | [
"Less",
"compile",
"the",
"include",
"file",
"into",
"a",
"temporary",
"css",
"file",
".",
"When",
"done",
"rename",
"the",
"temporary",
"css",
"file",
"to",
"the",
"correct",
"output",
"filename",
".",
"Since",
"the",
"less",
"compilation",
"phase",
"takes"... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/dynamicskin/storage/AbstractDynamicSkinService.java#L263-L285 | train |
Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/dynamicskin/storage/AbstractDynamicSkinService.java | AbstractDynamicSkinService.getSkinNames | @Override
public SortedSet<String> getSkinNames(PortletRequest request) {
// Context to access the filesystem
PortletContext ctx = request.getPortletSession().getPortletContext();
// Determine the full path to the skins directory
String skinsFilepath = ctx.getRealPath(localRelativeR... | java | @Override
public SortedSet<String> getSkinNames(PortletRequest request) {
// Context to access the filesystem
PortletContext ctx = request.getPortletSession().getPortletContext();
// Determine the full path to the skins directory
String skinsFilepath = ctx.getRealPath(localRelativeR... | [
"@",
"Override",
"public",
"SortedSet",
"<",
"String",
">",
"getSkinNames",
"(",
"PortletRequest",
"request",
")",
"{",
"// Context to access the filesystem",
"PortletContext",
"ctx",
"=",
"request",
".",
"getPortletSession",
"(",
")",
".",
"getPortletContext",
"(",
... | Returns the set of skins to use. This implementation parses the skinList.xml file and returns
the set of skin-key element values. If there is an error parsing the XML file, return an
empty set. | [
"Returns",
"the",
"set",
"of",
"skins",
"to",
"use",
".",
"This",
"implementation",
"parses",
"the",
"skinList",
".",
"xml",
"file",
"and",
"returns",
"the",
"set",
"of",
"skin",
"-",
"key",
"element",
"values",
".",
"If",
"there",
"is",
"an",
"error",
... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/dynamicskin/storage/AbstractDynamicSkinService.java#L319-L349 | train |
Jasig/uPortal | uPortal-spring/src/main/java/org/springframework/web/client/interceptors/ZeroLeggedOAuthInterceptor.java | ZeroLeggedOAuthInterceptor.intercept | @Override
public ClientHttpResponse intercept(
HttpRequest req, byte[] body, ClientHttpRequestExecution execution) throws IOException {
Assert.notNull(propertyResolver);
Assert.notNull(id);
try {
String authString = getOAuthAuthString(req);
req.getHeaders... | java | @Override
public ClientHttpResponse intercept(
HttpRequest req, byte[] body, ClientHttpRequestExecution execution) throws IOException {
Assert.notNull(propertyResolver);
Assert.notNull(id);
try {
String authString = getOAuthAuthString(req);
req.getHeaders... | [
"@",
"Override",
"public",
"ClientHttpResponse",
"intercept",
"(",
"HttpRequest",
"req",
",",
"byte",
"[",
"]",
"body",
",",
"ClientHttpRequestExecution",
"execution",
")",
"throws",
"IOException",
"{",
"Assert",
".",
"notNull",
"(",
"propertyResolver",
")",
";",
... | Intercept a request and add the oauth headers.
@param req the request
@param body the request body
@param execution the request execution.
@return the request response
@throws IOException on error | [
"Intercept",
"a",
"request",
"and",
"add",
"the",
"oauth",
"headers",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-spring/src/main/java/org/springframework/web/client/interceptors/ZeroLeggedOAuthInterceptor.java#L59-L73 | train |
Jasig/uPortal | uPortal-spring/src/main/java/org/springframework/web/client/interceptors/ZeroLeggedOAuthInterceptor.java | ZeroLeggedOAuthInterceptor.getOAuthAuthString | private String getOAuthAuthString(HttpRequest req)
throws OAuthException, IOException, URISyntaxException {
RealmOAuthConsumer consumer = getConsumer();
OAuthAccessor accessor = new OAuthAccessor(consumer);
String method = req.getMethod().name();
URI uri = req.getURI();
... | java | private String getOAuthAuthString(HttpRequest req)
throws OAuthException, IOException, URISyntaxException {
RealmOAuthConsumer consumer = getConsumer();
OAuthAccessor accessor = new OAuthAccessor(consumer);
String method = req.getMethod().name();
URI uri = req.getURI();
... | [
"private",
"String",
"getOAuthAuthString",
"(",
"HttpRequest",
"req",
")",
"throws",
"OAuthException",
",",
"IOException",
",",
"URISyntaxException",
"{",
"RealmOAuthConsumer",
"consumer",
"=",
"getConsumer",
"(",
")",
";",
"OAuthAccessor",
"accessor",
"=",
"new",
"... | Get the oauth Authorization string.
@param req the request
@return the Authorization string | [
"Get",
"the",
"oauth",
"Authorization",
"string",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-spring/src/main/java/org/springframework/web/client/interceptors/ZeroLeggedOAuthInterceptor.java#L81-L91 | train |
Jasig/uPortal | uPortal-spring/src/main/java/org/springframework/web/client/interceptors/ZeroLeggedOAuthInterceptor.java | ZeroLeggedOAuthInterceptor.getConsumer | private synchronized RealmOAuthConsumer getConsumer() {
// could just inject these, but I kinda prefer pushing this out
// to the properties file...
if (consumer == null) {
OAuthServiceProvider serviceProvider = new OAuthServiceProvider("", "", "");
String realm =
... | java | private synchronized RealmOAuthConsumer getConsumer() {
// could just inject these, but I kinda prefer pushing this out
// to the properties file...
if (consumer == null) {
OAuthServiceProvider serviceProvider = new OAuthServiceProvider("", "", "");
String realm =
... | [
"private",
"synchronized",
"RealmOAuthConsumer",
"getConsumer",
"(",
")",
"{",
"// could just inject these, but I kinda prefer pushing this out",
"// to the properties file...",
"if",
"(",
"consumer",
"==",
"null",
")",
"{",
"OAuthServiceProvider",
"serviceProvider",
"=",
"new"... | Get the OAuthConsumer. Will initialize it lazily.
@return the OAuthConsumer object. | [
"Get",
"the",
"OAuthConsumer",
".",
"Will",
"initialize",
"it",
"lazily",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-spring/src/main/java/org/springframework/web/client/interceptors/ZeroLeggedOAuthInterceptor.java#L98-L128 | train |
Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/backgroundpreference/ViewBackgroundPreferenceController.java | ViewBackgroundPreferenceController.getView | @RenderMapping
public String getView(RenderRequest req, Model model) {
final String[] images = imageSetSelectionStrategy.getImageSet(req);
model.addAttribute("images", images);
final String[] thumbnailImages = imageSetSelectionStrategy.getImageThumbnailSet(req);
model.addAttribute(... | java | @RenderMapping
public String getView(RenderRequest req, Model model) {
final String[] images = imageSetSelectionStrategy.getImageSet(req);
model.addAttribute("images", images);
final String[] thumbnailImages = imageSetSelectionStrategy.getImageThumbnailSet(req);
model.addAttribute(... | [
"@",
"RenderMapping",
"public",
"String",
"getView",
"(",
"RenderRequest",
"req",
",",
"Model",
"model",
")",
"{",
"final",
"String",
"[",
"]",
"images",
"=",
"imageSetSelectionStrategy",
".",
"getImageSet",
"(",
"req",
")",
";",
"model",
".",
"addAttribute",
... | Display the main user-facing view of the portlet.
@param request
@return | [
"Display",
"the",
"main",
"user",
"-",
"facing",
"view",
"of",
"the",
"portlet",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/backgroundpreference/ViewBackgroundPreferenceController.java#L42-L66 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/xml/XmlUtilitiesImpl.java | XmlUtilitiesImpl.getElementIndex | private int getElementIndex(Node node) {
final String nodeName = node.getNodeName();
int count = 1;
for (Node previousSibling = node.getPreviousSibling();
previousSibling != null;
previousSibling = previousSibling.getPreviousSibling()) {
if (previousS... | java | private int getElementIndex(Node node) {
final String nodeName = node.getNodeName();
int count = 1;
for (Node previousSibling = node.getPreviousSibling();
previousSibling != null;
previousSibling = previousSibling.getPreviousSibling()) {
if (previousS... | [
"private",
"int",
"getElementIndex",
"(",
"Node",
"node",
")",
"{",
"final",
"String",
"nodeName",
"=",
"node",
".",
"getNodeName",
"(",
")",
";",
"int",
"count",
"=",
"1",
";",
"for",
"(",
"Node",
"previousSibling",
"=",
"node",
".",
"getPreviousSibling",... | Gets the index of this element relative to other siblings with the same node name | [
"Gets",
"the",
"index",
"of",
"this",
"element",
"relative",
"to",
"other",
"siblings",
"with",
"the",
"same",
"node",
"name"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/xml/XmlUtilitiesImpl.java#L201-L215 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/DeleteManager.java | DeleteManager.applyAndUpdateDeleteSet | static void applyAndUpdateDeleteSet(Document plf, Document ilf, IntegrationResult result) {
Element dSet = null;
try {
dSet = getDeleteSet(plf, null, false);
} catch (Exception e) {
LOG.error("Exception occurred while getting user's DLM delete-set.", e);
}
... | java | static void applyAndUpdateDeleteSet(Document plf, Document ilf, IntegrationResult result) {
Element dSet = null;
try {
dSet = getDeleteSet(plf, null, false);
} catch (Exception e) {
LOG.error("Exception occurred while getting user's DLM delete-set.", e);
}
... | [
"static",
"void",
"applyAndUpdateDeleteSet",
"(",
"Document",
"plf",
",",
"Document",
"ilf",
",",
"IntegrationResult",
"result",
")",
"{",
"Element",
"dSet",
"=",
"null",
";",
"try",
"{",
"dSet",
"=",
"getDeleteSet",
"(",
"plf",
",",
"null",
",",
"false",
... | Get the delete set if any from the plf and process each delete command removing any that fail
from the delete set so that the delete set is self cleaning. | [
"Get",
"the",
"delete",
"set",
"if",
"any",
"from",
"the",
"plf",
"and",
"process",
"each",
"delete",
"command",
"removing",
"any",
"that",
"fail",
"from",
"the",
"delete",
"set",
"so",
"that",
"the",
"delete",
"set",
"is",
"self",
"cleaning",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/DeleteManager.java#L55-L81 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.