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-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/localization/UserLocaleHelper.java | UserLocaleHelper.getLocales | public List<LocaleBean> getLocales(Locale currentLocale) {
List<LocaleBean> locales = new ArrayList<>();
// get the array of locales available from the portal
List<Locale> portalLocales = localeManagerFactory.getPortalLocales();
for (Locale locale : portalLocales) {
if (curr... | java | public List<LocaleBean> getLocales(Locale currentLocale) {
List<LocaleBean> locales = new ArrayList<>();
// get the array of locales available from the portal
List<Locale> portalLocales = localeManagerFactory.getPortalLocales();
for (Locale locale : portalLocales) {
if (curr... | [
"public",
"List",
"<",
"LocaleBean",
">",
"getLocales",
"(",
"Locale",
"currentLocale",
")",
"{",
"List",
"<",
"LocaleBean",
">",
"locales",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"// get the array of locales available from the portal",
"List",
"<",
"Locale... | Return a list of LocaleBeans matching the currently available locales for the portal.
@param currentLocale
@return | [
"Return",
"a",
"list",
"of",
"LocaleBeans",
"matching",
"the",
"currently",
"available",
"locales",
"for",
"the",
"portal",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/localization/UserLocaleHelper.java#L77-L92 | train |
Jasig/uPortal | uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/localization/UserLocaleHelper.java | UserLocaleHelper.getCurrentUserLocale | public Locale getCurrentUserLocale(PortletRequest request) {
final HttpServletRequest originalPortalRequest =
this.portalRequestUtils.getPortletHttpRequest(request);
IUserInstance ui = userInstanceManager.getUserInstance(originalPortalRequest);
IUserPreferencesManager upm = ui.ge... | java | public Locale getCurrentUserLocale(PortletRequest request) {
final HttpServletRequest originalPortalRequest =
this.portalRequestUtils.getPortletHttpRequest(request);
IUserInstance ui = userInstanceManager.getUserInstance(originalPortalRequest);
IUserPreferencesManager upm = ui.ge... | [
"public",
"Locale",
"getCurrentUserLocale",
"(",
"PortletRequest",
"request",
")",
"{",
"final",
"HttpServletRequest",
"originalPortalRequest",
"=",
"this",
".",
"portalRequestUtils",
".",
"getPortletHttpRequest",
"(",
"request",
")",
";",
"IUserInstance",
"ui",
"=",
... | Return the current user's locale.
@param request The current {@link PortletRequest}
@return | [
"Return",
"the",
"current",
"user",
"s",
"locale",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/localization/UserLocaleHelper.java#L100-L123 | train |
Jasig/uPortal | uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/localization/UserLocaleHelper.java | UserLocaleHelper.updateUserLocale | public void updateUserLocale(HttpServletRequest request, String localeString) {
IUserInstance ui = userInstanceManager.getUserInstance(request);
IUserPreferencesManager upm = ui.getPreferencesManager();
final IUserProfile userProfile = upm.getUserProfile();
LocaleManager localeManager =... | java | public void updateUserLocale(HttpServletRequest request, String localeString) {
IUserInstance ui = userInstanceManager.getUserInstance(request);
IUserPreferencesManager upm = ui.getPreferencesManager();
final IUserProfile userProfile = upm.getUserProfile();
LocaleManager localeManager =... | [
"public",
"void",
"updateUserLocale",
"(",
"HttpServletRequest",
"request",
",",
"String",
"localeString",
")",
"{",
"IUserInstance",
"ui",
"=",
"userInstanceManager",
".",
"getUserInstance",
"(",
"request",
")",
";",
"IUserPreferencesManager",
"upm",
"=",
"ui",
"."... | Update the current user's locale to match the selected locale. This implementation will
update the session locale, and if the user is not a guest, will also update the locale in the
user's persisted preferences.
@param request
@param localeString | [
"Update",
"the",
"current",
"user",
"s",
"locale",
"to",
"match",
"the",
"selected",
"locale",
".",
"This",
"implementation",
"will",
"update",
"the",
"session",
"locale",
"and",
"if",
"the",
"user",
"is",
"not",
"a",
"guest",
"will",
"also",
"update",
"th... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/localization/UserLocaleHelper.java#L133-L168 | train |
Jasig/uPortal | uPortal-tenants/src/main/java/org/apereo/portal/tenants/TemplateDataTenantOperationsListener.java | TemplateDataTenantOperationsListener.importWithResources | public TenantOperationResponse importWithResources(
final ITenant tenant, final Set<Resource> resources) {
/*
* First load dom4j Documents and sort the entity files into the proper order
*/
final Map<PortalDataKey, Set<BucketTuple>> importQueue;
try {
im... | java | public TenantOperationResponse importWithResources(
final ITenant tenant, final Set<Resource> resources) {
/*
* First load dom4j Documents and sort the entity files into the proper order
*/
final Map<PortalDataKey, Set<BucketTuple>> importQueue;
try {
im... | [
"public",
"TenantOperationResponse",
"importWithResources",
"(",
"final",
"ITenant",
"tenant",
",",
"final",
"Set",
"<",
"Resource",
">",
"resources",
")",
"{",
"/*\n * First load dom4j Documents and sort the entity files into the proper order\n */",
"final",
"Map... | High-level implementation method that brokers the queuing, importing, and reporting that is
common to Create and Update. | [
"High",
"-",
"level",
"implementation",
"method",
"that",
"brokers",
"the",
"queuing",
"importing",
"and",
"reporting",
"that",
"is",
"common",
"to",
"Create",
"and",
"Update",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-tenants/src/main/java/org/apereo/portal/tenants/TemplateDataTenantOperationsListener.java#L319-L367 | train |
Jasig/uPortal | uPortal-tenants/src/main/java/org/apereo/portal/tenants/TemplateDataTenantOperationsListener.java | TemplateDataTenantOperationsListener.prepareImportQueue | private Map<PortalDataKey, Set<BucketTuple>> prepareImportQueue(
final ITenant tenant, final Set<Resource> templates) throws Exception {
final Map<PortalDataKey, Set<BucketTuple>> rslt = new HashMap<>();
Resource rsc = null;
try {
for (Resource r : templates) {
... | java | private Map<PortalDataKey, Set<BucketTuple>> prepareImportQueue(
final ITenant tenant, final Set<Resource> templates) throws Exception {
final Map<PortalDataKey, Set<BucketTuple>> rslt = new HashMap<>();
Resource rsc = null;
try {
for (Resource r : templates) {
... | [
"private",
"Map",
"<",
"PortalDataKey",
",",
"Set",
"<",
"BucketTuple",
">",
">",
"prepareImportQueue",
"(",
"final",
"ITenant",
"tenant",
",",
"final",
"Set",
"<",
"Resource",
">",
"templates",
")",
"throws",
"Exception",
"{",
"final",
"Map",
"<",
"PortalDa... | Loads dom4j Documents and sorts the entity files into the proper order for Import. | [
"Loads",
"dom4j",
"Documents",
"and",
"sorts",
"the",
"entity",
"files",
"into",
"the",
"proper",
"order",
"for",
"Import",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-tenants/src/main/java/org/apereo/portal/tenants/TemplateDataTenantOperationsListener.java#L370-L423 | train |
Jasig/uPortal | uPortal-tenants/src/main/java/org/apereo/portal/tenants/TemplateDataTenantOperationsListener.java | TemplateDataTenantOperationsListener.importQueue | private void importQueue(
final ITenant tenant,
final Map<PortalDataKey, Set<BucketTuple>> queue,
final StringBuilder importReport)
throws Exception {
final StandardEvaluationContext ctx = new StandardEvaluationContext();
ctx.setRootObject(new RootObjectI... | java | private void importQueue(
final ITenant tenant,
final Map<PortalDataKey, Set<BucketTuple>> queue,
final StringBuilder importReport)
throws Exception {
final StandardEvaluationContext ctx = new StandardEvaluationContext();
ctx.setRootObject(new RootObjectI... | [
"private",
"void",
"importQueue",
"(",
"final",
"ITenant",
"tenant",
",",
"final",
"Map",
"<",
"PortalDataKey",
",",
"Set",
"<",
"BucketTuple",
">",
">",
"queue",
",",
"final",
"StringBuilder",
"importReport",
")",
"throws",
"Exception",
"{",
"final",
"Standar... | Imports the specified entities in the proper order. | [
"Imports",
"the",
"specified",
"entities",
"in",
"the",
"proper",
"order",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-tenants/src/main/java/org/apereo/portal/tenants/TemplateDataTenantOperationsListener.java#L426-L462 | train |
Jasig/uPortal | uPortal-security/uPortal-security-core/src/main/java/org/apereo/portal/security/ThreadNamingRequestFilter.java | ThreadNamingRequestFilter.updateCurrentUsername | public void updateCurrentUsername(String newUsername) {
final String originalThreadName = originalThreadNameLocal.get();
if (originalThreadName != null && newUsername != null) {
final Thread currentThread = Thread.currentThread();
final String threadName = getThreadName(originalT... | java | public void updateCurrentUsername(String newUsername) {
final String originalThreadName = originalThreadNameLocal.get();
if (originalThreadName != null && newUsername != null) {
final Thread currentThread = Thread.currentThread();
final String threadName = getThreadName(originalT... | [
"public",
"void",
"updateCurrentUsername",
"(",
"String",
"newUsername",
")",
"{",
"final",
"String",
"originalThreadName",
"=",
"originalThreadNameLocal",
".",
"get",
"(",
")",
";",
"if",
"(",
"originalThreadName",
"!=",
"null",
"&&",
"newUsername",
"!=",
"null",... | Update the thread name to use the specified username. Useful for authentication requests
where the username changes mid-request | [
"Update",
"the",
"thread",
"name",
"to",
"use",
"the",
"specified",
"username",
".",
"Useful",
"for",
"authentication",
"requests",
"where",
"the",
"username",
"changes",
"mid",
"-",
"request"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-security/uPortal-security-core/src/main/java/org/apereo/portal/security/ThreadNamingRequestFilter.java#L41-L48 | train |
Jasig/uPortal | uPortal-api/uPortal-api-platform-impl/src/main/java/org/apereo/portal/api/groups/EntityService.java | EntityService.search | public Set<Entity> search(String entityType, String searchTerm) {
if (StringUtils.isBlank(entityType) && StringUtils.isBlank(searchTerm)) {
return null;
}
Set<Entity> results = new HashSet<Entity>();
EntityEnum entityEnum = EntityEnum.getEntityEnum(entityType);
Entity... | java | public Set<Entity> search(String entityType, String searchTerm) {
if (StringUtils.isBlank(entityType) && StringUtils.isBlank(searchTerm)) {
return null;
}
Set<Entity> results = new HashSet<Entity>();
EntityEnum entityEnum = EntityEnum.getEntityEnum(entityType);
Entity... | [
"public",
"Set",
"<",
"Entity",
">",
"search",
"(",
"String",
"entityType",
",",
"String",
"searchTerm",
")",
"{",
"if",
"(",
"StringUtils",
".",
"isBlank",
"(",
"entityType",
")",
"&&",
"StringUtils",
".",
"isBlank",
"(",
"searchTerm",
")",
")",
"{",
"r... | External search, thus case insensitive. | [
"External",
"search",
"thus",
"case",
"insensitive",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-platform-impl/src/main/java/org/apereo/portal/api/groups/EntityService.java#L52-L90 | train |
Jasig/uPortal | uPortal-spring/src/main/java/org/apereo/portal/spring/security/evaluator/PortalPermissionEvaluator.java | PortalPermissionEvaluator.getAuthorizationPrincipal | private IAuthorizationPrincipal getAuthorizationPrincipal(Authentication authentication) {
final Object authPrincipal = authentication.getPrincipal();
logger.trace("getAuthorizationPrincipal -- authPrincipal=[{}]", authPrincipal);
String username;
if (authPrincipal instanceof UserDetai... | java | private IAuthorizationPrincipal getAuthorizationPrincipal(Authentication authentication) {
final Object authPrincipal = authentication.getPrincipal();
logger.trace("getAuthorizationPrincipal -- authPrincipal=[{}]", authPrincipal);
String username;
if (authPrincipal instanceof UserDetai... | [
"private",
"IAuthorizationPrincipal",
"getAuthorizationPrincipal",
"(",
"Authentication",
"authentication",
")",
"{",
"final",
"Object",
"authPrincipal",
"=",
"authentication",
".",
"getPrincipal",
"(",
")",
";",
"logger",
".",
"trace",
"(",
"\"getAuthorizationPrincipal -... | Prepare a uPortal IAuthorizationPrincipal based in the Spring principal | [
"Prepare",
"a",
"uPortal",
"IAuthorizationPrincipal",
"based",
"in",
"the",
"Spring",
"principal"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-spring/src/main/java/org/apereo/portal/spring/security/evaluator/PortalPermissionEvaluator.java#L153-L174 | train |
Jasig/uPortal | uPortal-events/src/main/java/org/apereo/portal/events/aggr/BaseAggregationImpl.java | BaseAggregationImpl.setDuration | public final void setDuration(int duration) {
if (isComplete()) {
this.getLogger()
.warn(
"{} is already closed, the new duration of {} will be ignored on: {}",
this.getClass().getSimpleName(),
du... | java | public final void setDuration(int duration) {
if (isComplete()) {
this.getLogger()
.warn(
"{} is already closed, the new duration of {} will be ignored on: {}",
this.getClass().getSimpleName(),
du... | [
"public",
"final",
"void",
"setDuration",
"(",
"int",
"duration",
")",
"{",
"if",
"(",
"isComplete",
"(",
")",
")",
"{",
"this",
".",
"getLogger",
"(",
")",
".",
"warn",
"(",
"\"{} is already closed, the new duration of {} will be ignored on: {}\"",
",",
"this",
... | Set the duration of the interval | [
"Set",
"the",
"duration",
"of",
"the",
"interval"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-events/src/main/java/org/apereo/portal/events/aggr/BaseAggregationImpl.java#L133-L144 | train |
Jasig/uPortal | uPortal-groups/uPortal-groups-grouper/src/main/java/org/apereo/portal/groups/grouper/GrouperEntityGroupStore.java | GrouperEntityGroupStore.createUportalGroupFromGrouperGroup | protected IEntityGroup createUportalGroupFromGrouperGroup(WsGroup wsGroup) {
IEntityGroup iEntityGroup = new EntityGroupImpl(wsGroup.getName(), IPerson.class);
// need to set the group name and description to the actual
// display name and description
iEntityGroup.setName(wsGroup.getDis... | java | protected IEntityGroup createUportalGroupFromGrouperGroup(WsGroup wsGroup) {
IEntityGroup iEntityGroup = new EntityGroupImpl(wsGroup.getName(), IPerson.class);
// need to set the group name and description to the actual
// display name and description
iEntityGroup.setName(wsGroup.getDis... | [
"protected",
"IEntityGroup",
"createUportalGroupFromGrouperGroup",
"(",
"WsGroup",
"wsGroup",
")",
"{",
"IEntityGroup",
"iEntityGroup",
"=",
"new",
"EntityGroupImpl",
"(",
"wsGroup",
".",
"getName",
"(",
")",
",",
"IPerson",
".",
"class",
")",
";",
"// need to set t... | Construct an IEntityGroup from a Grouper WsGroup.
@param wsGroup
@return the group | [
"Construct",
"an",
"IEntityGroup",
"from",
"a",
"Grouper",
"WsGroup",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-grouper/src/main/java/org/apereo/portal/groups/grouper/GrouperEntityGroupStore.java#L508-L516 | train |
Jasig/uPortal | uPortal-groups/uPortal-groups-grouper/src/main/java/org/apereo/portal/groups/grouper/GrouperEntityGroupStore.java | GrouperEntityGroupStore.findGroupFromKey | protected WsGroup findGroupFromKey(String key) {
WsGroup wsGroup = null;
if (key != null) {
GcFindGroups gcFindGroups = new GcFindGroups();
gcFindGroups.addGroupName(key);
WsFindGroupsResults results = gcFindGroups.execute();
// if no results were retur... | java | protected WsGroup findGroupFromKey(String key) {
WsGroup wsGroup = null;
if (key != null) {
GcFindGroups gcFindGroups = new GcFindGroups();
gcFindGroups.addGroupName(key);
WsFindGroupsResults results = gcFindGroups.execute();
// if no results were retur... | [
"protected",
"WsGroup",
"findGroupFromKey",
"(",
"String",
"key",
")",
"{",
"WsGroup",
"wsGroup",
"=",
"null",
";",
"if",
"(",
"key",
"!=",
"null",
")",
"{",
"GcFindGroups",
"gcFindGroups",
"=",
"new",
"GcFindGroups",
"(",
")",
";",
"gcFindGroups",
".",
"a... | Find the Grouper group matching the specified key.
@param key
@return the group or null | [
"Find",
"the",
"Grouper",
"group",
"matching",
"the",
"specified",
"key",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-grouper/src/main/java/org/apereo/portal/groups/grouper/GrouperEntityGroupStore.java#L524-L548 | train |
Jasig/uPortal | uPortal-groups/uPortal-groups-grouper/src/main/java/org/apereo/portal/groups/grouper/GrouperEntityGroupStore.java | GrouperEntityGroupStore.getStemPrefix | protected static String getStemPrefix() {
String uportalStem = GrouperClientUtils.propertiesValue(STEM_PREFIX, false);
// make sure it ends in colon
if (!StringUtils.isBlank(uportalStem)) {
if (uportalStem.endsWith(":")) {
uportalStem = uportalStem.substring(0, upor... | java | protected static String getStemPrefix() {
String uportalStem = GrouperClientUtils.propertiesValue(STEM_PREFIX, false);
// make sure it ends in colon
if (!StringUtils.isBlank(uportalStem)) {
if (uportalStem.endsWith(":")) {
uportalStem = uportalStem.substring(0, upor... | [
"protected",
"static",
"String",
"getStemPrefix",
"(",
")",
"{",
"String",
"uportalStem",
"=",
"GrouperClientUtils",
".",
"propertiesValue",
"(",
"STEM_PREFIX",
",",
"false",
")",
";",
"// make sure it ends in colon",
"if",
"(",
"!",
"StringUtils",
".",
"isBlank",
... | Get the prefix for the stem containing uPortal groups. If this value is non-empty, all groups
will be required to be prefixed with the specified stem name.
@return the uportal stem in the registry, without trailing colon | [
"Get",
"the",
"prefix",
"for",
"the",
"stem",
"containing",
"uPortal",
"groups",
".",
"If",
"this",
"value",
"is",
"non",
"-",
"empty",
"all",
"groups",
"will",
"be",
"required",
"to",
"be",
"prefixed",
"with",
"the",
"specified",
"stem",
"name",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-grouper/src/main/java/org/apereo/portal/groups/grouper/GrouperEntityGroupStore.java#L556-L568 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/LPARemoveParameter.java | LPARemoveParameter.perform | @Override
public void perform() throws PortalException {
// push the change into the PLF
if (nodeId.startsWith(Constants.FRAGMENT_ID_USER_PREFIX)) {
// we are dealing with an incorporated node
ParameterEditManager.removeParmEditDirective(nodeId, name, person);
} else ... | java | @Override
public void perform() throws PortalException {
// push the change into the PLF
if (nodeId.startsWith(Constants.FRAGMENT_ID_USER_PREFIX)) {
// we are dealing with an incorporated node
ParameterEditManager.removeParmEditDirective(nodeId, name, person);
} else ... | [
"@",
"Override",
"public",
"void",
"perform",
"(",
")",
"throws",
"PortalException",
"{",
"// push the change into the PLF",
"if",
"(",
"nodeId",
".",
"startsWith",
"(",
"Constants",
".",
"FRAGMENT_ID_USER_PREFIX",
")",
")",
"{",
"// we are dealing with an incorporated ... | Remove the parameter from a channel in both the ILF and PLF using the appropriate mechanisms
for incorporated nodes versus owned nodes. | [
"Remove",
"the",
"parameter",
"from",
"a",
"channel",
"in",
"both",
"the",
"ILF",
"and",
"PLF",
"using",
"the",
"appropriate",
"mechanisms",
"for",
"incorporated",
"nodes",
"versus",
"owned",
"nodes",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/LPARemoveParameter.java#L40-L54 | train |
Jasig/uPortal | uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/layout/dlm/remoting/registry/v43/PortletCategoryBean.java | PortletCategoryBean.create | public static PortletCategoryBean create(
String id,
String name,
String description,
Set<PortletCategoryBean> subcategories,
Set<PortletDefinitionBean> portlets) {
return new PortletCategoryBean(id, name, description, subcategories, portlets);
} | java | public static PortletCategoryBean create(
String id,
String name,
String description,
Set<PortletCategoryBean> subcategories,
Set<PortletDefinitionBean> portlets) {
return new PortletCategoryBean(id, name, description, subcategories, portlets);
} | [
"public",
"static",
"PortletCategoryBean",
"create",
"(",
"String",
"id",
",",
"String",
"name",
",",
"String",
"description",
",",
"Set",
"<",
"PortletCategoryBean",
">",
"subcategories",
",",
"Set",
"<",
"PortletDefinitionBean",
">",
"portlets",
")",
"{",
"ret... | Creates a new bean based on the provided inputs. | [
"Creates",
"a",
"new",
"bean",
"based",
"on",
"the",
"provided",
"inputs",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/layout/dlm/remoting/registry/v43/PortletCategoryBean.java#L57-L64 | train |
Jasig/uPortal | uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/rest/permissions/PermissionsRESTController.java | PermissionsRESTController.getOwners | @PreAuthorize(
"hasPermission('ALL', 'java.lang.String', new org.apereo.portal.spring.security.evaluator.AuthorizableActivity('UP_PERMISSIONS', 'VIEW_PERMISSIONS'))")
@RequestMapping(value = "/permissions/owners.json", method = RequestMethod.GET)
public ModelAndView getOwners() {
// get a l... | java | @PreAuthorize(
"hasPermission('ALL', 'java.lang.String', new org.apereo.portal.spring.security.evaluator.AuthorizableActivity('UP_PERMISSIONS', 'VIEW_PERMISSIONS'))")
@RequestMapping(value = "/permissions/owners.json", method = RequestMethod.GET)
public ModelAndView getOwners() {
// get a l... | [
"@",
"PreAuthorize",
"(",
"\"hasPermission('ALL', 'java.lang.String', new org.apereo.portal.spring.security.evaluator.AuthorizableActivity('UP_PERMISSIONS', 'VIEW_PERMISSIONS'))\"",
")",
"@",
"RequestMapping",
"(",
"value",
"=",
"\"/permissions/owners.json\"",
",",
"method",
"=",
"Reques... | Provide a JSON view of all known permission owners registered with uPortal. | [
"Provide",
"a",
"JSON",
"view",
"of",
"all",
"known",
"permission",
"owners",
"registered",
"with",
"uPortal",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/rest/permissions/PermissionsRESTController.java#L96-L109 | train |
Jasig/uPortal | uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/rest/permissions/PermissionsRESTController.java | PermissionsRESTController.getOwners | @PreAuthorize(
"hasPermission('ALL', 'java.lang.String', new org.apereo.portal.spring.security.evaluator.AuthorizableActivity('UP_PERMISSIONS', 'VIEW_PERMISSIONS'))")
@RequestMapping(value = "/permissions/owners/{owner}.json", method = RequestMethod.GET)
public ModelAndView getOwners(
@P... | java | @PreAuthorize(
"hasPermission('ALL', 'java.lang.String', new org.apereo.portal.spring.security.evaluator.AuthorizableActivity('UP_PERMISSIONS', 'VIEW_PERMISSIONS'))")
@RequestMapping(value = "/permissions/owners/{owner}.json", method = RequestMethod.GET)
public ModelAndView getOwners(
@P... | [
"@",
"PreAuthorize",
"(",
"\"hasPermission('ALL', 'java.lang.String', new org.apereo.portal.spring.security.evaluator.AuthorizableActivity('UP_PERMISSIONS', 'VIEW_PERMISSIONS'))\"",
")",
"@",
"RequestMapping",
"(",
"value",
"=",
"\"/permissions/owners/{owner}.json\"",
",",
"method",
"=",
... | Provide a detailed view of the specified IPermissionOwner. This view should contain a list of
the owner's defined activities. | [
"Provide",
"a",
"detailed",
"view",
"of",
"the",
"specified",
"IPermissionOwner",
".",
"This",
"view",
"should",
"contain",
"a",
"list",
"of",
"the",
"owner",
"s",
"defined",
"activities",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/rest/permissions/PermissionsRESTController.java#L115-L143 | train |
Jasig/uPortal | uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/rest/permissions/PermissionsRESTController.java | PermissionsRESTController.getActivities | @PreAuthorize(
"hasPermission('ALL', 'java.lang.String', new org.apereo.portal.spring.security.evaluator.AuthorizableActivity('UP_PERMISSIONS', 'VIEW_PERMISSIONS'))")
@RequestMapping(value = "/permissions/activities.json", method = RequestMethod.GET)
public ModelAndView getActivities(@RequestParam(v... | java | @PreAuthorize(
"hasPermission('ALL', 'java.lang.String', new org.apereo.portal.spring.security.evaluator.AuthorizableActivity('UP_PERMISSIONS', 'VIEW_PERMISSIONS'))")
@RequestMapping(value = "/permissions/activities.json", method = RequestMethod.GET)
public ModelAndView getActivities(@RequestParam(v... | [
"@",
"PreAuthorize",
"(",
"\"hasPermission('ALL', 'java.lang.String', new org.apereo.portal.spring.security.evaluator.AuthorizableActivity('UP_PERMISSIONS', 'VIEW_PERMISSIONS'))\"",
")",
"@",
"RequestMapping",
"(",
"value",
"=",
"\"/permissions/activities.json\"",
",",
"method",
"=",
"Re... | Provide a list of all registered IPermissionActivities. If an optional search string is
provided, the returned list will be restricted to activities matching the query. | [
"Provide",
"a",
"list",
"of",
"all",
"registered",
"IPermissionActivities",
".",
"If",
"an",
"optional",
"search",
"string",
"is",
"provided",
"the",
"returned",
"list",
"will",
"be",
"restricted",
"to",
"activities",
"matching",
"the",
"query",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/rest/permissions/PermissionsRESTController.java#L149-L176 | train |
Jasig/uPortal | uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/rest/permissions/PermissionsRESTController.java | PermissionsRESTController.getTargets | @PreAuthorize(
"hasPermission('ALL', 'java.lang.String', new org.apereo.portal.spring.security.evaluator.AuthorizableActivity('UP_PERMISSIONS', 'VIEW_PERMISSIONS'))")
@RequestMapping(value = "/permissions/{activity}/targets.json", method = RequestMethod.GET)
public ModelAndView getTargets(
... | java | @PreAuthorize(
"hasPermission('ALL', 'java.lang.String', new org.apereo.portal.spring.security.evaluator.AuthorizableActivity('UP_PERMISSIONS', 'VIEW_PERMISSIONS'))")
@RequestMapping(value = "/permissions/{activity}/targets.json", method = RequestMethod.GET)
public ModelAndView getTargets(
... | [
"@",
"PreAuthorize",
"(",
"\"hasPermission('ALL', 'java.lang.String', new org.apereo.portal.spring.security.evaluator.AuthorizableActivity('UP_PERMISSIONS', 'VIEW_PERMISSIONS'))\"",
")",
"@",
"RequestMapping",
"(",
"value",
"=",
"\"/permissions/{activity}/targets.json\"",
",",
"method",
"=... | Return a list of targets defined for a particular IPermissionActivity matching the specified
search query. | [
"Return",
"a",
"list",
"of",
"targets",
"defined",
"for",
"a",
"particular",
"IPermissionActivity",
"matching",
"the",
"specified",
"search",
"query",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/rest/permissions/PermissionsRESTController.java#L182-L210 | train |
Jasig/uPortal | uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/rest/permissions/PermissionsRESTController.java | PermissionsRESTController.getAssignmentsForUser | @PreAuthorize(
"hasPermission('ALL', 'java.lang.String', new org.apereo.portal.spring.security.evaluator.AuthorizableActivity('UP_PERMISSIONS', 'VIEW_PERMISSIONS'))")
@RequestMapping("/v5-5/permissions/assignments/users/{username}")
public ModelAndView getAssignmentsForUser(
@PathVariabl... | java | @PreAuthorize(
"hasPermission('ALL', 'java.lang.String', new org.apereo.portal.spring.security.evaluator.AuthorizableActivity('UP_PERMISSIONS', 'VIEW_PERMISSIONS'))")
@RequestMapping("/v5-5/permissions/assignments/users/{username}")
public ModelAndView getAssignmentsForUser(
@PathVariabl... | [
"@",
"PreAuthorize",
"(",
"\"hasPermission('ALL', 'java.lang.String', new org.apereo.portal.spring.security.evaluator.AuthorizableActivity('UP_PERMISSIONS', 'VIEW_PERMISSIONS'))\"",
")",
"@",
"RequestMapping",
"(",
"\"/v5-5/permissions/assignments/users/{username}\"",
")",
"public",
"ModelAndV... | Provides the collection of permission assignments that apply to the specified user,
optionally including inherited assignments.
@since 5.5 | [
"Provides",
"the",
"collection",
"of",
"permission",
"assignments",
"that",
"apply",
"to",
"the",
"specified",
"user",
"optionally",
"including",
"inherited",
"assignments",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/rest/permissions/PermissionsRESTController.java#L235-L252 | train |
Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/statistics/TabRenderStatisticsController.java | TabRenderStatisticsController.setReportFormTabs | private void setReportFormTabs(final TabRenderReportForm report) {
if (!report.getTabs().isEmpty()) {
// Tabs are already set, do nothing
return;
}
final Set<AggregatedTabMapping> tabs = this.getTabs();
if (!tabs.isEmpty()) {
report.getTabs().add(tabs... | java | private void setReportFormTabs(final TabRenderReportForm report) {
if (!report.getTabs().isEmpty()) {
// Tabs are already set, do nothing
return;
}
final Set<AggregatedTabMapping> tabs = this.getTabs();
if (!tabs.isEmpty()) {
report.getTabs().add(tabs... | [
"private",
"void",
"setReportFormTabs",
"(",
"final",
"TabRenderReportForm",
"report",
")",
"{",
"if",
"(",
"!",
"report",
".",
"getTabs",
"(",
")",
".",
"isEmpty",
"(",
")",
")",
"{",
"// Tabs are already set, do nothing",
"return",
";",
"}",
"final",
"Set",
... | Set the tab names to have first selected by default | [
"Set",
"the",
"tab",
"names",
"to",
"have",
"first",
"selected",
"by",
"default"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/statistics/TabRenderStatisticsController.java#L99-L109 | train |
Jasig/uPortal | uPortal-io/uPortal-io-core/src/main/java/org/apereo/portal/io/xml/JaxbPortalDataHandlerService.java | JaxbPortalDataHandlerService.setDataFileIncludes | @javax.annotation.Resource(name = "dataFileIncludes")
public void setDataFileIncludes(Set<String> dataFileIncludes) {
this.dataFileIncludes = dataFileIncludes;
} | java | @javax.annotation.Resource(name = "dataFileIncludes")
public void setDataFileIncludes(Set<String> dataFileIncludes) {
this.dataFileIncludes = dataFileIncludes;
} | [
"@",
"javax",
".",
"annotation",
".",
"Resource",
"(",
"name",
"=",
"\"dataFileIncludes\"",
")",
"public",
"void",
"setDataFileIncludes",
"(",
"Set",
"<",
"String",
">",
"dataFileIncludes",
")",
"{",
"this",
".",
"dataFileIncludes",
"=",
"dataFileIncludes",
";",... | Ant path matching patterns that files must match to be included | [
"Ant",
"path",
"matching",
"patterns",
"that",
"files",
"must",
"match",
"to",
"be",
"included"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-io/uPortal-io-core/src/main/java/org/apereo/portal/io/xml/JaxbPortalDataHandlerService.java#L221-L224 | train |
Jasig/uPortal | uPortal-io/uPortal-io-core/src/main/java/org/apereo/portal/io/xml/JaxbPortalDataHandlerService.java | JaxbPortalDataHandlerService.importDataArchive | private void importDataArchive(
final Resource resource,
final ArchiveInputStream resourceStream,
BatchImportOptions options) {
final File tempDir = Files.createTempDir();
try {
ArchiveEntry archiveEntry;
while ((archiveEntry = resourceStream.... | java | private void importDataArchive(
final Resource resource,
final ArchiveInputStream resourceStream,
BatchImportOptions options) {
final File tempDir = Files.createTempDir();
try {
ArchiveEntry archiveEntry;
while ((archiveEntry = resourceStream.... | [
"private",
"void",
"importDataArchive",
"(",
"final",
"Resource",
"resource",
",",
"final",
"ArchiveInputStream",
"resourceStream",
",",
"BatchImportOptions",
"options",
")",
"{",
"final",
"File",
"tempDir",
"=",
"Files",
".",
"createTempDir",
"(",
")",
";",
"try"... | Extracts the archive resource and then runs the batch-import process on it. | [
"Extracts",
"the",
"archive",
"resource",
"and",
"then",
"runs",
"the",
"batch",
"-",
"import",
"process",
"on",
"it",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-io/uPortal-io-core/src/main/java/org/apereo/portal/io/xml/JaxbPortalDataHandlerService.java#L490-L520 | train |
Jasig/uPortal | uPortal-io/uPortal-io-core/src/main/java/org/apereo/portal/io/xml/JaxbPortalDataHandlerService.java | JaxbPortalDataHandlerService.waitForFutures | private List<FutureHolder<?>> waitForFutures(
final Queue<? extends FutureHolder<?>> futures,
final PrintWriter reportWriter,
final File reportDirectory,
final boolean wait)
throws InterruptedException {
final List<FutureHolder<?>> failedFutures = new... | java | private List<FutureHolder<?>> waitForFutures(
final Queue<? extends FutureHolder<?>> futures,
final PrintWriter reportWriter,
final File reportDirectory,
final boolean wait)
throws InterruptedException {
final List<FutureHolder<?>> failedFutures = new... | [
"private",
"List",
"<",
"FutureHolder",
"<",
"?",
">",
">",
"waitForFutures",
"(",
"final",
"Queue",
"<",
"?",
"extends",
"FutureHolder",
"<",
"?",
">",
">",
"futures",
",",
"final",
"PrintWriter",
"reportWriter",
",",
"final",
"File",
"reportDirectory",
","... | Used by batch import and export to wait for queued tasks to complete. Handles fail-fast
behavior if any of the tasks threw and exception by canceling all queued futures and logging
a summary of the failures. All completed futures are removed from the queue.
@param futures Queued futures to check for completeness
@para... | [
"Used",
"by",
"batch",
"import",
"and",
"export",
"to",
"wait",
"for",
"queued",
"tasks",
"to",
"complete",
".",
"Handles",
"fail",
"-",
"fast",
"behavior",
"if",
"any",
"of",
"the",
"tasks",
"threw",
"and",
"exception",
"by",
"canceling",
"all",
"queued",... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-io/uPortal-io-core/src/main/java/org/apereo/portal/io/xml/JaxbPortalDataHandlerService.java#L1123-L1214 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-core/src/main/java/org/apereo/portal/layout/node/UserLayoutChannelDescription.java | UserLayoutChannelDescription.setParameterValue | @Override
public String setParameterValue(String parameterName, String parameterValue) {
// don't try to store a null value
if (parameterValue == null) return null;
return (String) parameters.put(parameterName, parameterValue);
} | java | @Override
public String setParameterValue(String parameterName, String parameterValue) {
// don't try to store a null value
if (parameterValue == null) return null;
return (String) parameters.put(parameterName, parameterValue);
} | [
"@",
"Override",
"public",
"String",
"setParameterValue",
"(",
"String",
"parameterName",
",",
"String",
"parameterValue",
")",
"{",
"// don't try to store a null value",
"if",
"(",
"parameterValue",
"==",
"null",
")",
"return",
"null",
";",
"return",
"(",
"String",... | Set a channel parameter value.
@param parameterValue a <code>String</code> value
@param parameterName a <code>String</code> value
@return a <code>String</code> value that was set. | [
"Set",
"a",
"channel",
"parameter",
"value",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-core/src/main/java/org/apereo/portal/layout/node/UserLayoutChannelDescription.java#L374-L379 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/ParameterEditManager.java | ParameterEditManager.applyAndUpdateParmEditSet | static void applyAndUpdateParmEditSet(Document plf, Document ilf, IntegrationResult result) {
Element pSet = null;
try {
pSet = getParmEditSet(plf, null, false);
} catch (Exception e) {
LOG.error("Exception occurred while getting user's DLM " + "paramter-edit-set.", e);
... | java | static void applyAndUpdateParmEditSet(Document plf, Document ilf, IntegrationResult result) {
Element pSet = null;
try {
pSet = getParmEditSet(plf, null, false);
} catch (Exception e) {
LOG.error("Exception occurred while getting user's DLM " + "paramter-edit-set.", e);
... | [
"static",
"void",
"applyAndUpdateParmEditSet",
"(",
"Document",
"plf",
",",
"Document",
"ilf",
",",
"IntegrationResult",
"result",
")",
"{",
"Element",
"pSet",
"=",
"null",
";",
"try",
"{",
"pSet",
"=",
"getParmEditSet",
"(",
"plf",
",",
"null",
",",
"false"... | Get the parm edit set if any from the plf and process each edit command removing any that
fail from the set so that the set is self cleaning.
@throws Exception | [
"Get",
"the",
"parm",
"edit",
"set",
"if",
"any",
"from",
"the",
"plf",
"and",
"process",
"each",
"edit",
"command",
"removing",
"any",
"that",
"fail",
"from",
"the",
"set",
"so",
"that",
"the",
"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/ParameterEditManager.java#L59-L85 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/ParameterEditManager.java | ParameterEditManager.applyEdit | private static boolean applyEdit(Element edit, Document ilf) {
String nodeID = edit.getAttribute(Constants.ATT_TARGET);
Element channel = ilf.getElementById(nodeID);
if (channel == null) return false;
// now get the name of the parameter to be edited and find that element
Stri... | java | private static boolean applyEdit(Element edit, Document ilf) {
String nodeID = edit.getAttribute(Constants.ATT_TARGET);
Element channel = ilf.getElementById(nodeID);
if (channel == null) return false;
// now get the name of the parameter to be edited and find that element
Stri... | [
"private",
"static",
"boolean",
"applyEdit",
"(",
"Element",
"edit",
",",
"Document",
"ilf",
")",
"{",
"String",
"nodeID",
"=",
"edit",
".",
"getAttribute",
"(",
"Constants",
".",
"ATT_TARGET",
")",
";",
"Element",
"channel",
"=",
"ilf",
".",
"getElementById... | Attempt to apply a single channel parameter edit command and return true if it succeeds or
false otherwise. If the edit is disallowed or the target element no longer exists in the
document the edit command fails and returns false.
@throws Exception | [
"Attempt",
"to",
"apply",
"a",
"single",
"channel",
"parameter",
"edit",
"command",
"and",
"return",
"true",
"if",
"it",
"succeeds",
"or",
"false",
"otherwise",
".",
"If",
"the",
"edit",
"is",
"disallowed",
"or",
"the",
"target",
"element",
"no",
"longer",
... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/ParameterEditManager.java#L94-L168 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/ParameterEditManager.java | ParameterEditManager.getParmEditSet | private static Element getParmEditSet(Document plf, IPerson person, boolean create)
throws PortalException {
Node root = plf.getDocumentElement();
Node child = root.getFirstChild();
while (child != null) {
if (child.getNodeName().equals(Constants.ELM_PARM_SET)) return (E... | java | private static Element getParmEditSet(Document plf, IPerson person, boolean create)
throws PortalException {
Node root = plf.getDocumentElement();
Node child = root.getFirstChild();
while (child != null) {
if (child.getNodeName().equals(Constants.ELM_PARM_SET)) return (E... | [
"private",
"static",
"Element",
"getParmEditSet",
"(",
"Document",
"plf",
",",
"IPerson",
"person",
",",
"boolean",
"create",
")",
"throws",
"PortalException",
"{",
"Node",
"root",
"=",
"plf",
".",
"getDocumentElement",
"(",
")",
";",
"Node",
"child",
"=",
"... | Get the parameter edits set if any stored in the root of the document or create it if
passed-in create flag is true. | [
"Get",
"the",
"parameter",
"edits",
"set",
"if",
"any",
"stored",
"in",
"the",
"root",
"of",
"the",
"document",
"or",
"create",
"it",
"if",
"passed",
"-",
"in",
"create",
"flag",
"is",
"true",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/ParameterEditManager.java#L174-L204 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/ParameterEditManager.java | ParameterEditManager.addParmEditDirective | public static synchronized void addParmEditDirective(
String targetId, String name, String value, IPerson person) throws PortalException {
Document plf = (Document) person.getAttribute(Constants.PLF);
Element parmSet = getParmEditSet(plf, person, true);
NodeList edits = parmSet.getCh... | java | public static synchronized void addParmEditDirective(
String targetId, String name, String value, IPerson person) throws PortalException {
Document plf = (Document) person.getAttribute(Constants.PLF);
Element parmSet = getParmEditSet(plf, person, true);
NodeList edits = parmSet.getCh... | [
"public",
"static",
"synchronized",
"void",
"addParmEditDirective",
"(",
"String",
"targetId",
",",
"String",
"name",
",",
"String",
"value",
",",
"IPerson",
"person",
")",
"throws",
"PortalException",
"{",
"Document",
"plf",
"=",
"(",
"Document",
")",
"person",... | Create and append a parameter edit directive to parameter edits set for applying a user
specified value to a named parameter of the incorporated channel represented by the passed-in
target id. If one already exists for that node and that name then the value of the existing
edit is changed to the passed-in value. | [
"Create",
"and",
"append",
"a",
"parameter",
"edit",
"directive",
"to",
"parameter",
"edits",
"set",
"for",
"applying",
"a",
"user",
"specified",
"value",
"to",
"a",
"named",
"parameter",
"of",
"the",
"incorporated",
"channel",
"represented",
"by",
"the",
"pas... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/ParameterEditManager.java#L212-L233 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/ParameterEditManager.java | ParameterEditManager.addParmEditDirective | private static void addParmEditDirective(
String targetID,
String name,
String value,
IPerson person,
Document plf,
Element parmSet)
throws PortalException {
String ID = null;
try {
ID = getDLS().getNextStr... | java | private static void addParmEditDirective(
String targetID,
String name,
String value,
IPerson person,
Document plf,
Element parmSet)
throws PortalException {
String ID = null;
try {
ID = getDLS().getNextStr... | [
"private",
"static",
"void",
"addParmEditDirective",
"(",
"String",
"targetID",
",",
"String",
"name",
",",
"String",
"value",
",",
"IPerson",
"person",
",",
"Document",
"plf",
",",
"Element",
"parmSet",
")",
"throws",
"PortalException",
"{",
"String",
"ID",
"... | This method does the actual work of adding a newly created parameter edit and adding it to
the parameter edits set. | [
"This",
"method",
"does",
"the",
"actual",
"work",
"of",
"adding",
"a",
"newly",
"created",
"parameter",
"edit",
"and",
"adding",
"it",
"to",
"the",
"parameter",
"edits",
"set",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/ParameterEditManager.java#L239-L268 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/ParameterEditManager.java | ParameterEditManager.removeParmEditDirective | public static void removeParmEditDirective(String targetId, String name, IPerson person)
throws PortalException {
Document plf = (Document) person.getAttribute(Constants.PLF);
Element parmSet = getParmEditSet(plf, person, false);
if (parmSet == null) return; // no set so no edit to ... | java | public static void removeParmEditDirective(String targetId, String name, IPerson person)
throws PortalException {
Document plf = (Document) person.getAttribute(Constants.PLF);
Element parmSet = getParmEditSet(plf, person, false);
if (parmSet == null) return; // no set so no edit to ... | [
"public",
"static",
"void",
"removeParmEditDirective",
"(",
"String",
"targetId",
",",
"String",
"name",
",",
"IPerson",
"person",
")",
"throws",
"PortalException",
"{",
"Document",
"plf",
"=",
"(",
"Document",
")",
"person",
".",
"getAttribute",
"(",
"Constants... | Remove a parameter edit directive from the parameter edits set for applying user specified
values to a named parameter of an incorporated channel represented by the passed-in target
id. If one doesn't exists for that node and that name then this call returns without any
effects. | [
"Remove",
"a",
"parameter",
"edit",
"directive",
"from",
"the",
"parameter",
"edits",
"set",
"for",
"applying",
"user",
"specified",
"values",
"to",
"a",
"named",
"parameter",
"of",
"an",
"incorporated",
"channel",
"represented",
"by",
"the",
"passed",
"-",
"i... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/ParameterEditManager.java#L275-L297 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/JdbcUtils.java | JdbcUtils.dropTableIfExists | public static final <T> T dropTableIfExists(
JdbcOperations jdbcOperations,
final String table,
final Function<JdbcOperations, T> preDropCallback) {
LOGGER.info("Dropping table: " + table);
final boolean tableExists = doesTableExist(jdbcOperations, table);
i... | java | public static final <T> T dropTableIfExists(
JdbcOperations jdbcOperations,
final String table,
final Function<JdbcOperations, T> preDropCallback) {
LOGGER.info("Dropping table: " + table);
final boolean tableExists = doesTableExist(jdbcOperations, table);
i... | [
"public",
"static",
"final",
"<",
"T",
">",
"T",
"dropTableIfExists",
"(",
"JdbcOperations",
"jdbcOperations",
",",
"final",
"String",
"table",
",",
"final",
"Function",
"<",
"JdbcOperations",
",",
"T",
">",
"preDropCallback",
")",
"{",
"LOGGER",
".",
"info",
... | Check if the named table exists, if it does drop it, calling the preDropCallback first
@param jdbcOperations {@link JdbcOperations} used to check if the table exists and execute
the drop
@param table The name of the table to drop, case insensitive
@param preDropCallback The callback to execute immediately before the t... | [
"Check",
"if",
"the",
"named",
"table",
"exists",
"if",
"it",
"does",
"drop",
"it",
"calling",
"the",
"preDropCallback",
"first"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/JdbcUtils.java#L44-L59 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/JdbcUtils.java | JdbcUtils.doesTableExist | public static boolean doesTableExist(JdbcOperations jdbcOperations, final String table) {
final boolean tableExists =
jdbcOperations.execute(
new ConnectionCallback<Boolean>() {
@Override
public Boolean doInConnecti... | java | public static boolean doesTableExist(JdbcOperations jdbcOperations, final String table) {
final boolean tableExists =
jdbcOperations.execute(
new ConnectionCallback<Boolean>() {
@Override
public Boolean doInConnecti... | [
"public",
"static",
"boolean",
"doesTableExist",
"(",
"JdbcOperations",
"jdbcOperations",
",",
"final",
"String",
"table",
")",
"{",
"final",
"boolean",
"tableExists",
"=",
"jdbcOperations",
".",
"execute",
"(",
"new",
"ConnectionCallback",
"<",
"Boolean",
">",
"(... | Check if the specified table exists | [
"Check",
"if",
"the",
"specified",
"table",
"exists"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/JdbcUtils.java#L62-L86 | train |
Jasig/uPortal | uPortal-persondir/src/main/java/org/apereo/portal/RDBMUserIdentityStore.java | RDBMUserIdentityStore.getPortalUID | @Override
public int getPortalUID(IPerson person, boolean createPortalData)
throws AuthorizationException {
int uid;
String username = (String) person.getAttribute(IPerson.USERNAME);
// only synchronize a non-guest request.
if (PersonFactory.getGuestUsernames().contains(... | java | @Override
public int getPortalUID(IPerson person, boolean createPortalData)
throws AuthorizationException {
int uid;
String username = (String) person.getAttribute(IPerson.USERNAME);
// only synchronize a non-guest request.
if (PersonFactory.getGuestUsernames().contains(... | [
"@",
"Override",
"public",
"int",
"getPortalUID",
"(",
"IPerson",
"person",
",",
"boolean",
"createPortalData",
")",
"throws",
"AuthorizationException",
"{",
"int",
"uid",
";",
"String",
"username",
"=",
"(",
"String",
")",
"person",
".",
"getAttribute",
"(",
... | Get the portal user ID for this person object.
@param person The {@link IPerson} for whom a UID is requested
@param createPortalData indicating whether to try to create all uPortal data for this user
from template prototype
@return uPortalUID number or -1 if unable to create user.
@throws AuthorizationException if cre... | [
"Get",
"the",
"portal",
"user",
"ID",
"for",
"this",
"person",
"object",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-persondir/src/main/java/org/apereo/portal/RDBMUserIdentityStore.java#L268-L283 | train |
Jasig/uPortal | uPortal-persondir/src/main/java/org/apereo/portal/RDBMUserIdentityStore.java | RDBMUserIdentityStore.getPortalUser | private PortalUser getPortalUser(final String userName) {
return jdbcOperations.execute(
(ConnectionCallback<PortalUser>)
con -> {
PortalUser portalUser = null;
PreparedStatement pstmt = null;
... | java | private PortalUser getPortalUser(final String userName) {
return jdbcOperations.execute(
(ConnectionCallback<PortalUser>)
con -> {
PortalUser portalUser = null;
PreparedStatement pstmt = null;
... | [
"private",
"PortalUser",
"getPortalUser",
"(",
"final",
"String",
"userName",
")",
"{",
"return",
"jdbcOperations",
".",
"execute",
"(",
"(",
"ConnectionCallback",
"<",
"PortalUser",
">",
")",
"con",
"->",
"{",
"PortalUser",
"portalUser",
"=",
"null",
";",
"Pr... | Gets the PortalUser data store object for the specified user name.
@param userName The user's name
@return A PortalUser object or null if the user doesn't exist. | [
"Gets",
"the",
"PortalUser",
"data",
"store",
"object",
"for",
"the",
"specified",
"user",
"name",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-persondir/src/main/java/org/apereo/portal/RDBMUserIdentityStore.java#L377-L423 | train |
Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/importexport/ImportExportPortletController.java | ImportExportPortletController.getExportView | @RequestMapping(params = "action=export")
public ModelAndView getExportView(PortletRequest request) {
Map<String, Object> model = new HashMap<String, Object>();
// add a list of all permitted export types
final Iterable<IPortalDataType> exportPortalDataTypes =
this.portalDat... | java | @RequestMapping(params = "action=export")
public ModelAndView getExportView(PortletRequest request) {
Map<String, Object> model = new HashMap<String, Object>();
// add a list of all permitted export types
final Iterable<IPortalDataType> exportPortalDataTypes =
this.portalDat... | [
"@",
"RequestMapping",
"(",
"params",
"=",
"\"action=export\"",
")",
"public",
"ModelAndView",
"getExportView",
"(",
"PortletRequest",
"request",
")",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"model",
"=",
"new",
"HashMap",
"<",
"String",
",",
"Object",
... | Display the entity export form view.
@param request
@return | [
"Display",
"the",
"entity",
"export",
"form",
"view",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/importexport/ImportExportPortletController.java#L84-L96 | train |
Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/importexport/ImportExportPortletController.java | ImportExportPortletController.getDeleteView | @RequestMapping(params = "action=delete")
public ModelAndView getDeleteView(PortletRequest request) {
Map<String, Object> model = new HashMap<String, Object>();
// add a list of all permitted deletion types
final Iterable<IPortalDataType> deletePortalDataTypes =
this.portalD... | java | @RequestMapping(params = "action=delete")
public ModelAndView getDeleteView(PortletRequest request) {
Map<String, Object> model = new HashMap<String, Object>();
// add a list of all permitted deletion types
final Iterable<IPortalDataType> deletePortalDataTypes =
this.portalD... | [
"@",
"RequestMapping",
"(",
"params",
"=",
"\"action=delete\"",
")",
"public",
"ModelAndView",
"getDeleteView",
"(",
"PortletRequest",
"request",
")",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"model",
"=",
"new",
"HashMap",
"<",
"String",
",",
"Object",
... | Display the entity deletion form view.
@param request
@return | [
"Display",
"the",
"entity",
"deletion",
"form",
"view",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/importexport/ImportExportPortletController.java#L104-L116 | train |
Jasig/uPortal | uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/groupadmin/GroupFormValidator.java | GroupFormValidator.validateEditDetails | public void validateEditDetails(GroupForm group, MessageContext context) {
// ensure the group name is set
if (StringUtils.isBlank(group.getName())) {
context.addMessage(
new MessageBuilder().error().source("name").code("please.enter.name").build());
}
} | java | public void validateEditDetails(GroupForm group, MessageContext context) {
// ensure the group name is set
if (StringUtils.isBlank(group.getName())) {
context.addMessage(
new MessageBuilder().error().source("name").code("please.enter.name").build());
}
} | [
"public",
"void",
"validateEditDetails",
"(",
"GroupForm",
"group",
",",
"MessageContext",
"context",
")",
"{",
"// ensure the group name is set",
"if",
"(",
"StringUtils",
".",
"isBlank",
"(",
"group",
".",
"getName",
"(",
")",
")",
")",
"{",
"context",
".",
... | Validate the detail editing group view
@param group
@param context | [
"Validate",
"the",
"detail",
"editing",
"group",
"view"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/groupadmin/GroupFormValidator.java#L30-L37 | train |
Jasig/uPortal | uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/layout/dlm/remoting/JsonEntityBean.java | JsonEntityBean.getTypeAndIdHash | public String getTypeAndIdHash() {
assert (entityType != null);
assert (id != null);
String idStr = id.replaceAll("\\W", "__");
return entityType.toString().toLowerCase() + "_" + idStr;
} | java | public String getTypeAndIdHash() {
assert (entityType != null);
assert (id != null);
String idStr = id.replaceAll("\\W", "__");
return entityType.toString().toLowerCase() + "_" + idStr;
} | [
"public",
"String",
"getTypeAndIdHash",
"(",
")",
"{",
"assert",
"(",
"entityType",
"!=",
"null",
")",
";",
"assert",
"(",
"id",
"!=",
"null",
")",
";",
"String",
"idStr",
"=",
"id",
".",
"replaceAll",
"(",
"\"\\\\W\"",
",",
"\"__\"",
")",
";",
"return... | Compute a hash based on type and ID to uniquely identify this bean. This method helps avoid
the unlikely case where a group and person in the same principal list have the same ID.
<p>Periods are replaced to avoid issues in JSP EL and form names can't contain spaces. Also
SpEL parsing of form field names fails with cha... | [
"Compute",
"a",
"hash",
"based",
"on",
"type",
"and",
"ID",
"to",
"uniquely",
"identify",
"this",
"bean",
".",
"This",
"method",
"helps",
"avoid",
"the",
"unlikely",
"case",
"where",
"a",
"group",
"and",
"person",
"in",
"the",
"same",
"principal",
"list",
... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/layout/dlm/remoting/JsonEntityBean.java#L173-L178 | train |
Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/googleanalytics/GoogleAnalyticsController.java | GoogleAnalyticsController.filterAnalyticsGroups | private void filterAnalyticsGroups(
IGroupMember groupMember, JsonNode config, Map<String, Boolean> isMemberCache) {
if (config == null) {
return;
}
final JsonNode dimensionGroups = config.get("dimensionGroups");
if (dimensionGroups == null) {
return;... | java | private void filterAnalyticsGroups(
IGroupMember groupMember, JsonNode config, Map<String, Boolean> isMemberCache) {
if (config == null) {
return;
}
final JsonNode dimensionGroups = config.get("dimensionGroups");
if (dimensionGroups == null) {
return;... | [
"private",
"void",
"filterAnalyticsGroups",
"(",
"IGroupMember",
"groupMember",
",",
"JsonNode",
"config",
",",
"Map",
"<",
"String",
",",
"Boolean",
">",
"isMemberCache",
")",
"{",
"if",
"(",
"config",
"==",
"null",
")",
"{",
"return",
";",
"}",
"final",
... | Remove groups from the AnalyticsConfig that the current user is not a member of | [
"Remove",
"groups",
"from",
"the",
"AnalyticsConfig",
"that",
"the",
"current",
"user",
"is",
"not",
"a",
"member",
"of"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/googleanalytics/GoogleAnalyticsController.java#L94-L125 | train |
Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/googleanalytics/GoogleAnalyticsController.java | GoogleAnalyticsController.isMember | private boolean isMember(IGroupMember groupMember, String groupName) {
try {
IEntityGroup group = GroupService.findGroup(groupName);
if (group != null) {
return groupMember.isDeepMemberOf(group);
}
final EntityIdentifier[] results =
... | java | private boolean isMember(IGroupMember groupMember, String groupName) {
try {
IEntityGroup group = GroupService.findGroup(groupName);
if (group != null) {
return groupMember.isDeepMemberOf(group);
}
final EntityIdentifier[] results =
... | [
"private",
"boolean",
"isMember",
"(",
"IGroupMember",
"groupMember",
",",
"String",
"groupName",
")",
"{",
"try",
"{",
"IEntityGroup",
"group",
"=",
"GroupService",
".",
"findGroup",
"(",
"groupName",
")",
";",
"if",
"(",
"group",
"!=",
"null",
")",
"{",
... | Check if the user is a member of the specified group name
<p>Internal search, thus case sensitive. | [
"Check",
"if",
"the",
"user",
"is",
"a",
"member",
"of",
"the",
"specified",
"group",
"name"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/googleanalytics/GoogleAnalyticsController.java#L132-L166 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-core/src/main/java/org/apereo/portal/layout/profile/StickyProfileMapperImpl.java | StickyProfileMapperImpl.warnOnApathyKeyInMappings | @PostConstruct
public void warnOnApathyKeyInMappings() {
if (null != profileKeyForNoSelection
&& immutableMappings.containsKey(profileKeyForNoSelection)) {
logger.warn(
"Configured to treat profile key {} as apathy, "
+ "yet also co... | java | @PostConstruct
public void warnOnApathyKeyInMappings() {
if (null != profileKeyForNoSelection
&& immutableMappings.containsKey(profileKeyForNoSelection)) {
logger.warn(
"Configured to treat profile key {} as apathy, "
+ "yet also co... | [
"@",
"PostConstruct",
"public",
"void",
"warnOnApathyKeyInMappings",
"(",
")",
"{",
"if",
"(",
"null",
"!=",
"profileKeyForNoSelection",
"&&",
"immutableMappings",
".",
"containsKey",
"(",
"profileKeyForNoSelection",
")",
")",
"{",
"logger",
".",
"warn",
"(",
"\"C... | Log a warning when configured such that a profile key both means apathy and means a
particular profile fname. | [
"Log",
"a",
"warning",
"when",
"configured",
"such",
"that",
"a",
"profile",
"key",
"both",
"means",
"apathy",
"and",
"means",
"a",
"particular",
"profile",
"fname",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-core/src/main/java/org/apereo/portal/layout/profile/StickyProfileMapperImpl.java#L81-L92 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/xml/stream/ChunkingEventReader.java | ChunkingEventReader.chunkString | protected void chunkString(
final List<CharacterEvent> characterEvents,
final CharSequence buffer,
int patternIndex) {
// Iterate over the chunking patterns
for (; patternIndex < this.chunkingPatterns.length; patternIndex++) {
final Pattern pattern = this.... | java | protected void chunkString(
final List<CharacterEvent> characterEvents,
final CharSequence buffer,
int patternIndex) {
// Iterate over the chunking patterns
for (; patternIndex < this.chunkingPatterns.length; patternIndex++) {
final Pattern pattern = this.... | [
"protected",
"void",
"chunkString",
"(",
"final",
"List",
"<",
"CharacterEvent",
">",
"characterEvents",
",",
"final",
"CharSequence",
"buffer",
",",
"int",
"patternIndex",
")",
"{",
"// Iterate over the chunking patterns",
"for",
"(",
";",
"patternIndex",
"<",
"thi... | Breaks up the String into a List of CharacterEvents based on the configured Map of Patterns
to CharacterEventSources | [
"Breaks",
"up",
"the",
"String",
"into",
"a",
"List",
"of",
"CharacterEvents",
"based",
"on",
"the",
"configured",
"Map",
"of",
"Patterns",
"to",
"CharacterEventSources"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/xml/stream/ChunkingEventReader.java#L192-L238 | train |
Jasig/uPortal | uPortal-security/uPortal-security-authn/src/main/java/org/apereo/portal/security/provider/RemoteUserPersonManager.java | RemoteUserPersonManager.getPerson | @Override
public IPerson getPerson(HttpServletRequest request) throws PortalSecurityException {
/*
* This method overrides the implementation of getPerson() in BasePersonManager, but we only
* want the RemoteUser behavior here if we're using RemoteUser AuthN.
*/
if (!remo... | java | @Override
public IPerson getPerson(HttpServletRequest request) throws PortalSecurityException {
/*
* This method overrides the implementation of getPerson() in BasePersonManager, but we only
* want the RemoteUser behavior here if we're using RemoteUser AuthN.
*/
if (!remo... | [
"@",
"Override",
"public",
"IPerson",
"getPerson",
"(",
"HttpServletRequest",
"request",
")",
"throws",
"PortalSecurityException",
"{",
"/*\n * This method overrides the implementation of getPerson() in BasePersonManager, but we only\n * want the RemoteUser behavior here if w... | Retrieve an IPerson object for the incoming request
@param request The current HttpServletRequest
@return IPerson object for the incoming request
@exception PortalSecurityException Description of the Exception | [
"Retrieve",
"an",
"IPerson",
"object",
"for",
"the",
"incoming",
"request"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-security/uPortal-security-authn/src/main/java/org/apereo/portal/security/provider/RemoteUserPersonManager.java#L45-L121 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/SafeFilenameUtils.java | SafeFilenameUtils.makeSafeFilename | public static String makeSafeFilename(String filename) {
// Replace invalid characters
for (final Map.Entry<Pattern, String> pair : REPLACEMENT_PAIRS.entrySet()) {
final Pattern pattern = pair.getKey();
final Matcher matcher = pattern.matcher(filename);
filename = mat... | java | public static String makeSafeFilename(String filename) {
// Replace invalid characters
for (final Map.Entry<Pattern, String> pair : REPLACEMENT_PAIRS.entrySet()) {
final Pattern pattern = pair.getKey();
final Matcher matcher = pattern.matcher(filename);
filename = mat... | [
"public",
"static",
"String",
"makeSafeFilename",
"(",
"String",
"filename",
")",
"{",
"// Replace invalid characters",
"for",
"(",
"final",
"Map",
".",
"Entry",
"<",
"Pattern",
",",
"String",
">",
"pair",
":",
"REPLACEMENT_PAIRS",
".",
"entrySet",
"(",
")",
"... | Makes 'safe' filename | [
"Makes",
"safe",
"filename"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/SafeFilenameUtils.java#L48-L65 | train |
Jasig/uPortal | uPortal-rendering/src/main/java/org/apereo/portal/portlet/container/cache/PortletCacheControlServiceImpl.java | PortletCacheControlServiceImpl.getPortletCacheState | @SuppressWarnings("unchecked")
protected <D extends CachedPortletResultHolder<T>, T extends Serializable>
CacheState<D, T> getPortletCacheState(
HttpServletRequest request,
IPortletWindow portletWindow,
PublicPortletCacheKey publicCacheKey,
... | java | @SuppressWarnings("unchecked")
protected <D extends CachedPortletResultHolder<T>, T extends Serializable>
CacheState<D, T> getPortletCacheState(
HttpServletRequest request,
IPortletWindow portletWindow,
PublicPortletCacheKey publicCacheKey,
... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"protected",
"<",
"D",
"extends",
"CachedPortletResultHolder",
"<",
"T",
">",
",",
"T",
"extends",
"Serializable",
">",
"CacheState",
"<",
"D",
",",
"T",
">",
"getPortletCacheState",
"(",
"HttpServletRequest",
... | Get the cached portlet data looking in both the public and then private caches returning the
first found
@param request The current request
@param portletWindow The window to get data for
@param publicCacheKey The public cache key
@param publicOutputCache The public cache
@param privateOutputCache The private cache | [
"Get",
"the",
"cached",
"portlet",
"data",
"looking",
"in",
"both",
"the",
"public",
"and",
"then",
"private",
"caches",
"returning",
"the",
"first",
"found"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-rendering/src/main/java/org/apereo/portal/portlet/container/cache/PortletCacheControlServiceImpl.java#L345-L384 | train |
Jasig/uPortal | uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/rest/PrincipalsRESTController.java | PrincipalsRESTController.getPrincipals | @PreAuthorize(
"hasPermission('ALL', 'java.lang.String', new org.apereo.portal.spring.security.evaluator.AuthorizableActivity('UP_PERMISSIONS', 'VIEW_PERMISSIONS'))")
@RequestMapping(value = "/permissions/principals.json", method = RequestMethod.GET)
public ModelAndView getPrincipals(
@R... | java | @PreAuthorize(
"hasPermission('ALL', 'java.lang.String', new org.apereo.portal.spring.security.evaluator.AuthorizableActivity('UP_PERMISSIONS', 'VIEW_PERMISSIONS'))")
@RequestMapping(value = "/permissions/principals.json", method = RequestMethod.GET)
public ModelAndView getPrincipals(
@R... | [
"@",
"PreAuthorize",
"(",
"\"hasPermission('ALL', 'java.lang.String', new org.apereo.portal.spring.security.evaluator.AuthorizableActivity('UP_PERMISSIONS', 'VIEW_PERMISSIONS'))\"",
")",
"@",
"RequestMapping",
"(",
"value",
"=",
"\"/permissions/principals.json\"",
",",
"method",
"=",
"Re... | Return a JSON view of the uPortal principals matching the supplied query string.
@param query
@param request
@param response
@return
@throws Exception | [
"Return",
"a",
"JSON",
"view",
"of",
"the",
"uPortal",
"principals",
"matching",
"the",
"supplied",
"query",
"string",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/rest/PrincipalsRESTController.java#L53-L79 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/PLFIntegrator.java | PLFIntegrator.appendChild | static Element appendChild(Element plfChild, Element parent, boolean copyChildren) {
Document document = parent.getOwnerDocument();
Element copy = (Element) document.importNode(plfChild, false);
parent.appendChild(copy);
// set the identifier for the doc if warrented
String id =... | java | static Element appendChild(Element plfChild, Element parent, boolean copyChildren) {
Document document = parent.getOwnerDocument();
Element copy = (Element) document.importNode(plfChild, false);
parent.appendChild(copy);
// set the identifier for the doc if warrented
String id =... | [
"static",
"Element",
"appendChild",
"(",
"Element",
"plfChild",
",",
"Element",
"parent",
",",
"boolean",
"copyChildren",
")",
"{",
"Document",
"document",
"=",
"parent",
".",
"getOwnerDocument",
"(",
")",
";",
"Element",
"copy",
"=",
"(",
"Element",
")",
"d... | This method copies a plf node and any of its children into the passed in compViewParent. | [
"This",
"method",
"copies",
"a",
"plf",
"node",
"and",
"any",
"of",
"its",
"children",
"into",
"the",
"passed",
"in",
"compViewParent",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/PLFIntegrator.java#L208-L225 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/ReferenceEntityLockService.java | ReferenceEntityLockService.isLocked | private boolean isLocked(Class entityType, String entityKey) throws LockingException {
return isLocked(entityType, entityKey, null);
} | java | private boolean isLocked(Class entityType, String entityKey) throws LockingException {
return isLocked(entityType, entityKey, null);
} | [
"private",
"boolean",
"isLocked",
"(",
"Class",
"entityType",
",",
"String",
"entityKey",
")",
"throws",
"LockingException",
"{",
"return",
"isLocked",
"(",
"entityType",
",",
"entityKey",
",",
"null",
")",
";",
"}"
] | Answers if the entity represented by the entityType and entityKey already has a lock of some
type.
@param entityType
@param entityKey
@exception org.apereo.portal.concurrency.LockingException | [
"Answers",
"if",
"the",
"entity",
"represented",
"by",
"the",
"entityType",
"and",
"entityKey",
"already",
"has",
"a",
"lock",
"of",
"some",
"type",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/ReferenceEntityLockService.java#L190-L192 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/ReferenceEntityLockService.java | ReferenceEntityLockService.renew | @Override
public void renew(IEntityLock lock, int duration) throws LockingException {
if (isValid(lock)) {
Date newExpiration = getNewExpiration(duration);
getLockStore().update(lock, newExpiration);
((EntityLockImpl) lock).setExpirationTime(newExpiration);
} else... | java | @Override
public void renew(IEntityLock lock, int duration) throws LockingException {
if (isValid(lock)) {
Date newExpiration = getNewExpiration(duration);
getLockStore().update(lock, newExpiration);
((EntityLockImpl) lock).setExpirationTime(newExpiration);
} else... | [
"@",
"Override",
"public",
"void",
"renew",
"(",
"IEntityLock",
"lock",
",",
"int",
"duration",
")",
"throws",
"LockingException",
"{",
"if",
"(",
"isValid",
"(",
"lock",
")",
")",
"{",
"Date",
"newExpiration",
"=",
"getNewExpiration",
"(",
"duration",
")",
... | Extends the expiration time of the lock by some service-defined increment.
@param lock IEntityLock
@exception LockingException | [
"Extends",
"the",
"expiration",
"time",
"of",
"the",
"lock",
"by",
"some",
"service",
"-",
"defined",
"increment",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/ReferenceEntityLockService.java#L370-L379 | train |
Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/portletadmin/PortletAdministrationHelper.java | PortletAdministrationHelper.createPortletDefinitionForm | public PortletDefinitionForm createPortletDefinitionForm(IPerson person, String portletId) {
IPortletDefinition def = portletDefinitionRegistry.getPortletDefinition(portletId);
// create the new form
final PortletDefinitionForm form;
if (def != null) {
// if this is a pre-e... | java | public PortletDefinitionForm createPortletDefinitionForm(IPerson person, String portletId) {
IPortletDefinition def = portletDefinitionRegistry.getPortletDefinition(portletId);
// create the new form
final PortletDefinitionForm form;
if (def != null) {
// if this is a pre-e... | [
"public",
"PortletDefinitionForm",
"createPortletDefinitionForm",
"(",
"IPerson",
"person",
",",
"String",
"portletId",
")",
"{",
"IPortletDefinition",
"def",
"=",
"portletDefinitionRegistry",
".",
"getPortletDefinition",
"(",
"portletId",
")",
";",
"// create the new form"... | Construct a new PortletDefinitionForm for the given IPortletDefinition id. If a
PortletDefinition matching this ID already exists, the form will be pre-populated with the
PortletDefinition's current configuration. If the PortletDefinition does not yet exist, a new
default form will be created.
@param person user that ... | [
"Construct",
"a",
"new",
"PortletDefinitionForm",
"for",
"the",
"given",
"IPortletDefinition",
"id",
".",
"If",
"a",
"PortletDefinition",
"matching",
"this",
"ID",
"already",
"exists",
"the",
"form",
"will",
"be",
"pre",
"-",
"populated",
"with",
"the",
"Portlet... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/portletadmin/PortletAdministrationHelper.java#L179-L216 | train |
Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/portletadmin/PortletAdministrationHelper.java | PortletAdministrationHelper.removePortletRegistration | public void removePortletRegistration(IPerson person, PortletDefinitionForm form) {
/* TODO: Service-Layer Security Reboot (great need of refactoring with a community-approved plan in place) */
// Arguably a check here is redundant since -- in the current
// portlet-manager webflow -- you can'... | java | public void removePortletRegistration(IPerson person, PortletDefinitionForm form) {
/* TODO: Service-Layer Security Reboot (great need of refactoring with a community-approved plan in place) */
// Arguably a check here is redundant since -- in the current
// portlet-manager webflow -- you can'... | [
"public",
"void",
"removePortletRegistration",
"(",
"IPerson",
"person",
",",
"PortletDefinitionForm",
"form",
")",
"{",
"/* TODO: Service-Layer Security Reboot (great need of refactoring with a community-approved plan in place) */",
"// Arguably a check here is redundant since -- in the cu... | Delete the portlet with the given portlet ID.
@param person the person removing the portlet
@param form | [
"Delete",
"the",
"portlet",
"with",
"the",
"given",
"portlet",
"ID",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/portletadmin/PortletAdministrationHelper.java#L518-L546 | train |
Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/portletadmin/PortletAdministrationHelper.java | PortletAdministrationHelper.shouldDisplayLayoutLink | public boolean shouldDisplayLayoutLink(
IPerson person, PortletDefinitionForm form, String portletId) {
if (!form.isNew()) {
return false;
}
// only include the "do layout" link for published portlets.
if (form.getLifecycleState() != PortletLifecycleState.PUBLISH... | java | public boolean shouldDisplayLayoutLink(
IPerson person, PortletDefinitionForm form, String portletId) {
if (!form.isNew()) {
return false;
}
// only include the "do layout" link for published portlets.
if (form.getLifecycleState() != PortletLifecycleState.PUBLISH... | [
"public",
"boolean",
"shouldDisplayLayoutLink",
"(",
"IPerson",
"person",
",",
"PortletDefinitionForm",
"form",
",",
"String",
"portletId",
")",
"{",
"if",
"(",
"!",
"form",
".",
"isNew",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"// only include the \"... | Check if the link to the Fragment admin portlet should display in the status message.
<p>Checks that the portlet is new, that the portlet has been published and that the user has
necessary permissions to go to the fragment admin page.
@param person the person publishing/editing the portlet
@param form the portlet bei... | [
"Check",
"if",
"the",
"link",
"to",
"the",
"Fragment",
"admin",
"portlet",
"should",
"display",
"in",
"the",
"status",
"message",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/portletadmin/PortletAdministrationHelper.java#L559-L583 | train |
Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/portletadmin/PortletAdministrationHelper.java | PortletAdministrationHelper.getFragmentAdminURL | public String getFragmentAdminURL(HttpServletRequest request) {
IPortalUrlBuilder builder =
urlProvider.getPortalUrlBuilderByPortletFName(
request, PORTLET_FNAME_FRAGMENT_ADMIN_PORTLET, UrlType.RENDER);
IPortletUrlBuilder portletUrlBuilder = builder.getTargetedPor... | java | public String getFragmentAdminURL(HttpServletRequest request) {
IPortalUrlBuilder builder =
urlProvider.getPortalUrlBuilderByPortletFName(
request, PORTLET_FNAME_FRAGMENT_ADMIN_PORTLET, UrlType.RENDER);
IPortletUrlBuilder portletUrlBuilder = builder.getTargetedPor... | [
"public",
"String",
"getFragmentAdminURL",
"(",
"HttpServletRequest",
"request",
")",
"{",
"IPortalUrlBuilder",
"builder",
"=",
"urlProvider",
".",
"getPortalUrlBuilderByPortletFName",
"(",
"request",
",",
"PORTLET_FNAME_FRAGMENT_ADMIN_PORTLET",
",",
"UrlType",
".",
"RENDER... | Get the link to the fragment admin portlet.
@param request the current http request.
@return the portlet link | [
"Get",
"the",
"link",
"to",
"the",
"fragment",
"admin",
"portlet",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/portletadmin/PortletAdministrationHelper.java#L591-L600 | train |
Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/portletadmin/PortletAdministrationHelper.java | PortletAdministrationHelper.getArbitraryPortletPreferenceNames | public Set<String> getArbitraryPortletPreferenceNames(PortletDefinitionForm form) {
// set default values for all portlet parameters
PortletPublishingDefinition cpd =
this.portletPublishingDefinitionDao.getChannelPublishingDefinition(
form.getTypeId());
Se... | java | public Set<String> getArbitraryPortletPreferenceNames(PortletDefinitionForm form) {
// set default values for all portlet parameters
PortletPublishingDefinition cpd =
this.portletPublishingDefinitionDao.getChannelPublishingDefinition(
form.getTypeId());
Se... | [
"public",
"Set",
"<",
"String",
">",
"getArbitraryPortletPreferenceNames",
"(",
"PortletDefinitionForm",
"form",
")",
"{",
"// set default values for all portlet parameters",
"PortletPublishingDefinition",
"cpd",
"=",
"this",
".",
"portletPublishingDefinitionDao",
".",
"getChan... | Get a list of the key names of the currently-set arbitrary portlet preferences.
@param form
@return | [
"Get",
"a",
"list",
"of",
"the",
"key",
"names",
"of",
"the",
"currently",
"-",
"set",
"arbitrary",
"portlet",
"preferences",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/portletadmin/PortletAdministrationHelper.java#L608-L623 | train |
Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/portletadmin/PortletAdministrationHelper.java | PortletAdministrationHelper.getPortletApplications | public List<PortletApplicationDefinition> getPortletApplications() {
final PortletRegistryService portletRegistryService =
portalDriverContainerServices.getPortletRegistryService();
final List<PortletApplicationDefinition> contexts = new ArrayList<>();
for (final Iterator<String... | java | public List<PortletApplicationDefinition> getPortletApplications() {
final PortletRegistryService portletRegistryService =
portalDriverContainerServices.getPortletRegistryService();
final List<PortletApplicationDefinition> contexts = new ArrayList<>();
for (final Iterator<String... | [
"public",
"List",
"<",
"PortletApplicationDefinition",
">",
"getPortletApplications",
"(",
")",
"{",
"final",
"PortletRegistryService",
"portletRegistryService",
"=",
"portalDriverContainerServices",
".",
"getPortletRegistryService",
"(",
")",
";",
"final",
"List",
"<",
"... | Retreive the list of portlet application contexts currently available in this portlet
container.
@return list of portlet context | [
"Retreive",
"the",
"list",
"of",
"portlet",
"application",
"contexts",
"currently",
"available",
"in",
"this",
"portlet",
"container",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/portletadmin/PortletAdministrationHelper.java#L830-L891 | train |
Jasig/uPortal | uPortal-security/uPortal-security-authn/src/main/java/org/apereo/portal/security/provider/cas/CasAssertionSecurityContext.java | CasAssertionSecurityContext.copyAssertionAttributesToUserAttributes | private void copyAssertionAttributesToUserAttributes(Assertion assertion) {
if (!copyAssertionAttributesToUserAttributes) {
return;
}
// skip this if there are no attributes or if the attribute set is empty.
if (assertion.getPrincipal().getAttributes() == null
... | java | private void copyAssertionAttributesToUserAttributes(Assertion assertion) {
if (!copyAssertionAttributesToUserAttributes) {
return;
}
// skip this if there are no attributes or if the attribute set is empty.
if (assertion.getPrincipal().getAttributes() == null
... | [
"private",
"void",
"copyAssertionAttributesToUserAttributes",
"(",
"Assertion",
"assertion",
")",
"{",
"if",
"(",
"!",
"copyAssertionAttributesToUserAttributes",
")",
"{",
"return",
";",
"}",
"// skip this if there are no attributes or if the attribute set is empty.",
"if",
"("... | If enabled, convert CAS assertion person attributes into uPortal user attributes.
@param assertion the Assertion that was retrieved from the ThreadLocal. CANNOT be NULL. | [
"If",
"enabled",
"convert",
"CAS",
"assertion",
"person",
"attributes",
"into",
"uPortal",
"user",
"attributes",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-security/uPortal-security-authn/src/main/java/org/apereo/portal/security/provider/cas/CasAssertionSecurityContext.java#L219-L280 | train |
Jasig/uPortal | uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/services/EntityCachingService.java | EntityCachingService.get | @Override
public IBasicEntity get(Class<? extends IBasicEntity> type, String key)
throws CachingException {
return EntityCachingServiceLocator.getEntityCachingService().get(type, key);
} | java | @Override
public IBasicEntity get(Class<? extends IBasicEntity> type, String key)
throws CachingException {
return EntityCachingServiceLocator.getEntityCachingService().get(type, key);
} | [
"@",
"Override",
"public",
"IBasicEntity",
"get",
"(",
"Class",
"<",
"?",
"extends",
"IBasicEntity",
">",
"type",
",",
"String",
"key",
")",
"throws",
"CachingException",
"{",
"return",
"EntityCachingServiceLocator",
".",
"getEntityCachingService",
"(",
")",
".",
... | Returns the cached entity identified by type and key.
@param type Class
@param key String
@return IBasicEntity entity
@exception org.apereo.portal.concurrency.CachingException | [
"Returns",
"the",
"cached",
"entity",
"identified",
"by",
"type",
"and",
"key",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/services/EntityCachingService.java#L103-L107 | train |
Jasig/uPortal | uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/services/EntityCachingService.java | EntityCachingService.get | public IBasicEntity get(EntityIdentifier entityID) throws CachingException {
return EntityCachingServiceLocator.getEntityCachingService()
.get(entityID.getType(), entityID.getKey());
} | java | public IBasicEntity get(EntityIdentifier entityID) throws CachingException {
return EntityCachingServiceLocator.getEntityCachingService()
.get(entityID.getType(), entityID.getKey());
} | [
"public",
"IBasicEntity",
"get",
"(",
"EntityIdentifier",
"entityID",
")",
"throws",
"CachingException",
"{",
"return",
"EntityCachingServiceLocator",
".",
"getEntityCachingService",
"(",
")",
".",
"get",
"(",
"entityID",
".",
"getType",
"(",
")",
",",
"entityID",
... | Returns the cached entity referred to by entityID.
@param entityID entity identifier
@return IBasicEntity entity
@exception org.apereo.portal.concurrency.CachingException | [
"Returns",
"the",
"cached",
"entity",
"referred",
"to",
"by",
"entityID",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/services/EntityCachingService.java#L116-L119 | train |
Jasig/uPortal | uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/services/EntityCachingService.java | EntityCachingService.remove | @Override
public void remove(Class<? extends IBasicEntity> type, String key) throws CachingException {
EntityCachingServiceLocator.getEntityCachingService().remove(type, key);
} | java | @Override
public void remove(Class<? extends IBasicEntity> type, String key) throws CachingException {
EntityCachingServiceLocator.getEntityCachingService().remove(type, key);
} | [
"@",
"Override",
"public",
"void",
"remove",
"(",
"Class",
"<",
"?",
"extends",
"IBasicEntity",
">",
"type",
",",
"String",
"key",
")",
"throws",
"CachingException",
"{",
"EntityCachingServiceLocator",
".",
"getEntityCachingService",
"(",
")",
".",
"remove",
"("... | Removes the entity identified by type and key from the cache and notifies peer caches.
@param type Class
@param key String
@exception org.apereo.portal.concurrency.CachingException | [
"Removes",
"the",
"entity",
"identified",
"by",
"type",
"and",
"key",
"from",
"the",
"cache",
"and",
"notifies",
"peer",
"caches",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/services/EntityCachingService.java#L128-L131 | train |
Jasig/uPortal | uPortal-web/src/main/java/org/apereo/portal/portlets/error/PortletErrorController.java | PortletErrorController.renderError | @RequestMapping("VIEW")
public String renderError(RenderRequest request, RenderResponse response, ModelMap model)
throws Exception {
HttpServletRequest httpRequest = this.portalRequestUtils.getPortletHttpRequest(request);
IPortletWindowId currentFailedPortletWindowId =
(... | java | @RequestMapping("VIEW")
public String renderError(RenderRequest request, RenderResponse response, ModelMap model)
throws Exception {
HttpServletRequest httpRequest = this.portalRequestUtils.getPortletHttpRequest(request);
IPortletWindowId currentFailedPortletWindowId =
(... | [
"@",
"RequestMapping",
"(",
"\"VIEW\"",
")",
"public",
"String",
"renderError",
"(",
"RenderRequest",
"request",
",",
"RenderResponse",
"response",
",",
"ModelMap",
"model",
")",
"throws",
"Exception",
"{",
"HttpServletRequest",
"httpRequest",
"=",
"this",
".",
"p... | Render the error portlet view.
@param request
@param response
@param model
@return the name of the view to display
@throws Exception | [
"Render",
"the",
"error",
"portlet",
"view",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-web/src/main/java/org/apereo/portal/portlets/error/PortletErrorController.java#L101-L149 | train |
Jasig/uPortal | uPortal-security/uPortal-security-authn/src/main/java/org/apereo/portal/security/provider/SimpleLdapSecurityContext.java | SimpleLdapSecurityContext.getAttributeValue | private String getAttributeValue(Attributes attrs, int attribute) throws NamingException {
NamingEnumeration values = null;
String aValue = "";
if (!isAttribute(attribute)) return aValue;
Attribute attrib = attrs.get(attributes[attribute]);
if (attrib != null) {
for (... | java | private String getAttributeValue(Attributes attrs, int attribute) throws NamingException {
NamingEnumeration values = null;
String aValue = "";
if (!isAttribute(attribute)) return aValue;
Attribute attrib = attrs.get(attributes[attribute]);
if (attrib != null) {
for (... | [
"private",
"String",
"getAttributeValue",
"(",
"Attributes",
"attrs",
",",
"int",
"attribute",
")",
"throws",
"NamingException",
"{",
"NamingEnumeration",
"values",
"=",
"null",
";",
"String",
"aValue",
"=",
"\"\"",
";",
"if",
"(",
"!",
"isAttribute",
"(",
"at... | Return a single value of an attribute from possibly multiple values, grossly ignoring
anything else. If there are no values, then return an empty string.
@param attrs LDAP query results
@param attribute LDAP attribute we are interested in
@return a single value of the attribute | [
"Return",
"a",
"single",
"value",
"of",
"an",
"attribute",
"from",
"possibly",
"multiple",
"values",
"grossly",
"ignoring",
"anything",
"else",
".",
"If",
"there",
"are",
"no",
"values",
"then",
"return",
"an",
"empty",
"string",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-security/uPortal-security-authn/src/main/java/org/apereo/portal/security/provider/SimpleLdapSecurityContext.java#L203-L215 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/simple/RDBMUserLayoutStore.java | RDBMUserLayoutStore.addUserProfile | @Override
public UserProfile addUserProfile(final IPerson person, final IUserProfile profile) {
final int userId = person.getID();
final int layoutId = getLayoutId(person, profile);
// generate an id for this profile
return jdbcOperations.execute(
(ConnectionCallback... | java | @Override
public UserProfile addUserProfile(final IPerson person, final IUserProfile profile) {
final int userId = person.getID();
final int layoutId = getLayoutId(person, profile);
// generate an id for this profile
return jdbcOperations.execute(
(ConnectionCallback... | [
"@",
"Override",
"public",
"UserProfile",
"addUserProfile",
"(",
"final",
"IPerson",
"person",
",",
"final",
"IUserProfile",
"profile",
")",
"{",
"final",
"int",
"userId",
"=",
"person",
".",
"getID",
"(",
")",
";",
"final",
"int",
"layoutId",
"=",
"getLayou... | Add a user profile | [
"Add",
"a",
"user",
"profile"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/simple/RDBMUserLayoutStore.java#L208-L272 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/simple/RDBMUserLayoutStore.java | RDBMUserLayoutStore.createLayout | private void createLayout(HashMap layoutStructure, Document doc, Element root, int structId) {
while (structId != 0) {
LayoutStructure ls = (LayoutStructure) layoutStructure.get(structId);
// replaced with call to method in containing class to allow overriding
// by subclasse... | java | private void createLayout(HashMap layoutStructure, Document doc, Element root, int structId) {
while (structId != 0) {
LayoutStructure ls = (LayoutStructure) layoutStructure.get(structId);
// replaced with call to method in containing class to allow overriding
// by subclasse... | [
"private",
"void",
"createLayout",
"(",
"HashMap",
"layoutStructure",
",",
"Document",
"doc",
",",
"Element",
"root",
",",
"int",
"structId",
")",
"{",
"while",
"(",
"structId",
"!=",
"0",
")",
"{",
"LayoutStructure",
"ls",
"=",
"(",
"LayoutStructure",
")",
... | Create a layout | [
"Create",
"a",
"layout"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/simple/RDBMUserLayoutStore.java#L314-L331 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/simple/RDBMUserLayoutStore.java | RDBMUserLayoutStore.getNextStructId | protected String getNextStructId(final IPerson person, final String prefix) {
final int userId = person.getID();
return nextStructTransactionOperations.execute(
status ->
jdbcOperations.execute(
new ConnectionCallback<String>() {
... | java | protected String getNextStructId(final IPerson person, final String prefix) {
final int userId = person.getID();
return nextStructTransactionOperations.execute(
status ->
jdbcOperations.execute(
new ConnectionCallback<String>() {
... | [
"protected",
"String",
"getNextStructId",
"(",
"final",
"IPerson",
"person",
",",
"final",
"String",
"prefix",
")",
"{",
"final",
"int",
"userId",
"=",
"person",
".",
"getID",
"(",
")",
";",
"return",
"nextStructTransactionOperations",
".",
"execute",
"(",
"st... | Return the next available structure id for a user
@return next free structure ID | [
"Return",
"the",
"next",
"available",
"structure",
"id",
"for",
"a",
"user"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/simple/RDBMUserLayoutStore.java#L367-L407 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/simple/RDBMUserLayoutStore.java | RDBMUserLayoutStore.getLayoutID | private int getLayoutID(final int userId, final int profileId) {
return jdbcOperations.execute(
(ConnectionCallback<Integer>)
con -> {
String query =
"SELECT LAYOUT_ID "
... | java | private int getLayoutID(final int userId, final int profileId) {
return jdbcOperations.execute(
(ConnectionCallback<Integer>)
con -> {
String query =
"SELECT LAYOUT_ID "
... | [
"private",
"int",
"getLayoutID",
"(",
"final",
"int",
"userId",
",",
"final",
"int",
"profileId",
")",
"{",
"return",
"jdbcOperations",
".",
"execute",
"(",
"(",
"ConnectionCallback",
"<",
"Integer",
">",
")",
"con",
"->",
"{",
"String",
"query",
"=",
"\"S... | Returns the current layout ID for the user and profile. If the profile doesn't exist or the
layout_id field is null 0 is returned.
@param userId The userId for the profile
@param profileId The profileId for the profile
@return The layout_id field or 0 if it does not exist or is null | [
"Returns",
"the",
"current",
"layout",
"ID",
"for",
"the",
"user",
"and",
"profile",
".",
"If",
"the",
"profile",
"doesn",
"t",
"exist",
"or",
"the",
"layout_id",
"field",
"is",
"null",
"0",
"is",
"returned",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/simple/RDBMUserLayoutStore.java#L1491-L1525 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/ResourceLoader.java | ResourceLoader.getResourceAsURLString | public static String getResourceAsURLString(Class<?> requestingClass, String resource)
throws ResourceMissingException {
return getResourceAsURL(requestingClass, resource).toString();
} | java | public static String getResourceAsURLString(Class<?> requestingClass, String resource)
throws ResourceMissingException {
return getResourceAsURL(requestingClass, resource).toString();
} | [
"public",
"static",
"String",
"getResourceAsURLString",
"(",
"Class",
"<",
"?",
">",
"requestingClass",
",",
"String",
"resource",
")",
"throws",
"ResourceMissingException",
"{",
"return",
"getResourceAsURL",
"(",
"requestingClass",
",",
"resource",
")",
".",
"toStr... | Returns the requested resource as a URL string.
@param requestingClass the java.lang.Class object of the class that is attempting to load the
resource
@param resource a String describing the full or partial URL of the resource to load
@return the requested resource as a URL string
@throws ResourceMissingException | [
"Returns",
"the",
"requested",
"resource",
"as",
"a",
"URL",
"string",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/ResourceLoader.java#L180-L183 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/ResourceLoader.java | ResourceLoader.getResourceAsStream | public static InputStream getResourceAsStream(Class<?> requestingClass, String resource)
throws ResourceMissingException, IOException {
return getResourceAsURL(requestingClass, resource).openStream();
} | java | public static InputStream getResourceAsStream(Class<?> requestingClass, String resource)
throws ResourceMissingException, IOException {
return getResourceAsURL(requestingClass, resource).openStream();
} | [
"public",
"static",
"InputStream",
"getResourceAsStream",
"(",
"Class",
"<",
"?",
">",
"requestingClass",
",",
"String",
"resource",
")",
"throws",
"ResourceMissingException",
",",
"IOException",
"{",
"return",
"getResourceAsURL",
"(",
"requestingClass",
",",
"resourc... | Returns the requested resource as a stream.
@param requestingClass the java.lang.Class object of the class that is attempting to load the
resource
@param resource a String describing the full or partial URL of the resource to load
@return the requested resource as a stream
@throws ResourceMissingException
@throws java... | [
"Returns",
"the",
"requested",
"resource",
"as",
"a",
"stream",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/ResourceLoader.java#L212-L215 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/ResourceLoader.java | ResourceLoader.getResourceAsSAXInputSource | public static InputSource getResourceAsSAXInputSource(Class<?> requestingClass, String resource)
throws ResourceMissingException, IOException {
URL url = getResourceAsURL(requestingClass, resource);
InputSource source = new InputSource(url.openStream());
source.setPublicId(url.toExte... | java | public static InputSource getResourceAsSAXInputSource(Class<?> requestingClass, String resource)
throws ResourceMissingException, IOException {
URL url = getResourceAsURL(requestingClass, resource);
InputSource source = new InputSource(url.openStream());
source.setPublicId(url.toExte... | [
"public",
"static",
"InputSource",
"getResourceAsSAXInputSource",
"(",
"Class",
"<",
"?",
">",
"requestingClass",
",",
"String",
"resource",
")",
"throws",
"ResourceMissingException",
",",
"IOException",
"{",
"URL",
"url",
"=",
"getResourceAsURL",
"(",
"requestingClas... | Returns the requested resource as a SAX input source.
@param requestingClass the java.lang.Class object of the class that is attempting to load the
resource
@param resource a String describing the full or partial URL of the resource to load
@return the requested resource as a SAX input source
@throws ResourceMissingEx... | [
"Returns",
"the",
"requested",
"resource",
"as",
"a",
"SAX",
"input",
"source",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/ResourceLoader.java#L227-L233 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/ResourceLoader.java | ResourceLoader.getResourceAsDocument | public static Document getResourceAsDocument(
Class<?> requestingClass, String resource, boolean validate)
throws ResourceMissingException, IOException, ParserConfigurationException,
SAXException {
Document document = null;
InputStream inputStream = null;
... | java | public static Document getResourceAsDocument(
Class<?> requestingClass, String resource, boolean validate)
throws ResourceMissingException, IOException, ParserConfigurationException,
SAXException {
Document document = null;
InputStream inputStream = null;
... | [
"public",
"static",
"Document",
"getResourceAsDocument",
"(",
"Class",
"<",
"?",
">",
"requestingClass",
",",
"String",
"resource",
",",
"boolean",
"validate",
")",
"throws",
"ResourceMissingException",
",",
"IOException",
",",
"ParserConfigurationException",
",",
"SA... | Get the contents of a URL as an XML Document
@param requestingClass the java.lang.Class object of the class that is attempting to load the
resource
@param resource a String describing the full or partial URL of the resource whose contents to
load
@param validate boolean. True if the document builder factory should val... | [
"Get",
"the",
"contents",
"of",
"a",
"URL",
"as",
"an",
"XML",
"Document"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/ResourceLoader.java#L250-L277 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/ResourceLoader.java | ResourceLoader.getResourceAsDocument | public static Document getResourceAsDocument(Class<?> requestingClass, String resource)
throws ResourceMissingException, IOException, ParserConfigurationException,
SAXException {
// Default is non-validating...
return getResourceAsDocument(requestingClass, resource, fals... | java | public static Document getResourceAsDocument(Class<?> requestingClass, String resource)
throws ResourceMissingException, IOException, ParserConfigurationException,
SAXException {
// Default is non-validating...
return getResourceAsDocument(requestingClass, resource, fals... | [
"public",
"static",
"Document",
"getResourceAsDocument",
"(",
"Class",
"<",
"?",
">",
"requestingClass",
",",
"String",
"resource",
")",
"throws",
"ResourceMissingException",
",",
"IOException",
",",
"ParserConfigurationException",
",",
"SAXException",
"{",
"// Default ... | Get the contents of a URL as an XML Document, first trying to read the Document with
validation turned on, and falling back to reading it with validation turned off.
@param requestingClass the java.lang.Class object of the class that is attempting to load the
resource
@param resource a String describing the full or pa... | [
"Get",
"the",
"contents",
"of",
"a",
"URL",
"as",
"an",
"XML",
"Document",
"first",
"trying",
"to",
"read",
"the",
"Document",
"with",
"validation",
"turned",
"on",
"and",
"falling",
"back",
"to",
"reading",
"it",
"with",
"validation",
"turned",
"off",
"."... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/ResourceLoader.java#L293-L299 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/ResourceLoader.java | ResourceLoader.getResourceAsProperties | public static Properties getResourceAsProperties(Class<?> requestingClass, String resource)
throws ResourceMissingException, IOException {
InputStream inputStream = null;
Properties props = null;
try {
inputStream = getResourceAsStream(requestingClass, resource);
... | java | public static Properties getResourceAsProperties(Class<?> requestingClass, String resource)
throws ResourceMissingException, IOException {
InputStream inputStream = null;
Properties props = null;
try {
inputStream = getResourceAsStream(requestingClass, resource);
... | [
"public",
"static",
"Properties",
"getResourceAsProperties",
"(",
"Class",
"<",
"?",
">",
"requestingClass",
",",
"String",
"resource",
")",
"throws",
"ResourceMissingException",
",",
"IOException",
"{",
"InputStream",
"inputStream",
"=",
"null",
";",
"Properties",
... | Get the contents of a URL as a java.util.Properties object
@param requestingClass the java.lang.Class object of the class that is attempting to load the
resource
@param resource a String describing the full or partial URL of the resource whose contents to
load
@return the actual contents of the resource as a Propertie... | [
"Get",
"the",
"contents",
"of",
"a",
"URL",
"as",
"a",
"java",
".",
"util",
".",
"Properties",
"object"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/ResourceLoader.java#L312-L324 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/ResourceLoader.java | ResourceLoader.getResourceAsString | public static String getResourceAsString(Class<?> requestingClass, String resource)
throws ResourceMissingException, IOException {
String line = null;
BufferedReader in = null;
StringBuffer sbText = null;
try {
in =
new BufferedReader(
... | java | public static String getResourceAsString(Class<?> requestingClass, String resource)
throws ResourceMissingException, IOException {
String line = null;
BufferedReader in = null;
StringBuffer sbText = null;
try {
in =
new BufferedReader(
... | [
"public",
"static",
"String",
"getResourceAsString",
"(",
"Class",
"<",
"?",
">",
"requestingClass",
",",
"String",
"resource",
")",
"throws",
"ResourceMissingException",
",",
"IOException",
"{",
"String",
"line",
"=",
"null",
";",
"BufferedReader",
"in",
"=",
"... | Get the contents of a URL as a String
@param requestingClass the java.lang.Class object of the class that is attempting to load the
resource
@param resource a String describing the full or partial URL of the resource whose contents to
load
@return the actual contents of the resource as a String
@throws ResourceMissing... | [
"Get",
"the",
"contents",
"of",
"a",
"URL",
"as",
"a",
"String"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/ResourceLoader.java#L337-L353 | train |
Jasig/uPortal | uPortal-security/uPortal-security-services/src/main/java/org/apereo/portal/services/Authentication.java | Authentication.setContextParameters | public void setContextParameters(
Map<String, String> principals,
Map<String, String> credentials,
String ctxName,
ISecurityContext securityContext) {
if (log.isDebugEnabled()) {
final StringBuilder msg = new StringBuilder();
msg.append("P... | java | public void setContextParameters(
Map<String, String> principals,
Map<String, String> credentials,
String ctxName,
ISecurityContext securityContext) {
if (log.isDebugEnabled()) {
final StringBuilder msg = new StringBuilder();
msg.append("P... | [
"public",
"void",
"setContextParameters",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"principals",
",",
"Map",
"<",
"String",
",",
"String",
">",
"credentials",
",",
"String",
"ctxName",
",",
"ISecurityContext",
"securityContext",
")",
"{",
"if",
"(",
"l... | Get the principal and credential for a specific context and store them in the context.
@param principals
@param credentials
@param ctxName
@param securityContext | [
"Get",
"the",
"principal",
"and",
"credential",
"for",
"a",
"specific",
"context",
"and",
"store",
"them",
"in",
"the",
"context",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-security/uPortal-security-services/src/main/java/org/apereo/portal/services/Authentication.java#L288-L341 | train |
Jasig/uPortal | uPortal-web/src/main/java/org/apereo/portal/portlet/rendering/PortletRendererImpl.java | PortletRendererImpl.publishRenderEvent | protected void publishRenderEvent(
IPortletWindow portletWindow,
HttpServletRequest httpServletRequest,
RenderPart renderPart,
long executionTime,
boolean cached) {
final IPortletWindowId portletWindowId = portletWindow.getPortletWindowId();
... | java | protected void publishRenderEvent(
IPortletWindow portletWindow,
HttpServletRequest httpServletRequest,
RenderPart renderPart,
long executionTime,
boolean cached) {
final IPortletWindowId portletWindowId = portletWindow.getPortletWindowId();
... | [
"protected",
"void",
"publishRenderEvent",
"(",
"IPortletWindow",
"portletWindow",
",",
"HttpServletRequest",
"httpServletRequest",
",",
"RenderPart",
"renderPart",
",",
"long",
"executionTime",
",",
"boolean",
"cached",
")",
"{",
"final",
"IPortletWindowId",
"portletWind... | Publish the portlet render event | [
"Publish",
"the",
"portlet",
"render",
"event"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-web/src/main/java/org/apereo/portal/portlet/rendering/PortletRendererImpl.java#L579-L602 | train |
Jasig/uPortal | uPortal-web/src/main/java/org/apereo/portal/portlet/rendering/PortletRendererImpl.java | PortletRendererImpl.publishResourceEvent | protected void publishResourceEvent(
IPortletWindow portletWindow,
HttpServletRequest httpServletRequest,
long executionTime,
boolean usedBrowserCache,
boolean usedPortalCache) {
final IPortletWindowId portletWindowId = portletWindow.getPortletWindowI... | java | protected void publishResourceEvent(
IPortletWindow portletWindow,
HttpServletRequest httpServletRequest,
long executionTime,
boolean usedBrowserCache,
boolean usedPortalCache) {
final IPortletWindowId portletWindowId = portletWindow.getPortletWindowI... | [
"protected",
"void",
"publishResourceEvent",
"(",
"IPortletWindow",
"portletWindow",
",",
"HttpServletRequest",
"httpServletRequest",
",",
"long",
"executionTime",
",",
"boolean",
"usedBrowserCache",
",",
"boolean",
"usedPortalCache",
")",
"{",
"final",
"IPortletWindowId",
... | Publish the portlet resource event | [
"Publish",
"the",
"portlet",
"resource",
"event"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-web/src/main/java/org/apereo/portal/portlet/rendering/PortletRendererImpl.java#L840-L856 | train |
Jasig/uPortal | uPortal-web/src/main/java/org/apereo/portal/portlet/rendering/PortletRendererImpl.java | PortletRendererImpl.enforceConfigPermission | protected void enforceConfigPermission(
final HttpServletRequest httpServletRequest, final IPortletWindow portletWindow) {
Validate.notNull(
httpServletRequest, "Servlet request must not be null to determine remote user.");
Validate.notNull(portletWindow, "Portlet window mus... | java | protected void enforceConfigPermission(
final HttpServletRequest httpServletRequest, final IPortletWindow portletWindow) {
Validate.notNull(
httpServletRequest, "Servlet request must not be null to determine remote user.");
Validate.notNull(portletWindow, "Portlet window mus... | [
"protected",
"void",
"enforceConfigPermission",
"(",
"final",
"HttpServletRequest",
"httpServletRequest",
",",
"final",
"IPortletWindow",
"portletWindow",
")",
"{",
"Validate",
".",
"notNull",
"(",
"httpServletRequest",
",",
"\"Servlet request must not be null to determine remo... | Enforces config mode access control. If requesting user does not have CONFIG permission, and
the PortletWindow specifies config mode, throws AuthorizationException. Otherwise does
nothing.
@param httpServletRequest the non-null current HttpServletRequest (for determining requesting
user)
@param portletWindow a non-nul... | [
"Enforces",
"config",
"mode",
"access",
"control",
".",
"If",
"requesting",
"user",
"does",
"not",
"have",
"CONFIG",
"permission",
"and",
"the",
"PortletWindow",
"specifies",
"config",
"mode",
"throws",
"AuthorizationException",
".",
"Otherwise",
"does",
"nothing",
... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-web/src/main/java/org/apereo/portal/portlet/rendering/PortletRendererImpl.java#L960-L1002 | train |
Jasig/uPortal | uPortal-core/src/main/java/org/apereo/portal/security/provider/PersonImpl.java | PersonImpl.getAttributeValues | @Override
public Object[] getAttributeValues(String key) {
if (userAttributes == null) {
return null;
}
final List<Object> values = userAttributes.get(key);
if (values != null) {
return values.toArray();
}
return null;
} | java | @Override
public Object[] getAttributeValues(String key) {
if (userAttributes == null) {
return null;
}
final List<Object> values = userAttributes.get(key);
if (values != null) {
return values.toArray();
}
return null;
} | [
"@",
"Override",
"public",
"Object",
"[",
"]",
"getAttributeValues",
"(",
"String",
"key",
")",
"{",
"if",
"(",
"userAttributes",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"final",
"List",
"<",
"Object",
">",
"values",
"=",
"userAttributes",
".... | Returns multiple attributes for a key. If only one value exists, it will be returned in an
array of size one.
@param key the attribute name
@return the array of attribute values identified by the key | [
"Returns",
"multiple",
"attributes",
"for",
"a",
"key",
".",
"If",
"only",
"one",
"value",
"exists",
"it",
"will",
"be",
"returned",
"in",
"an",
"array",
"of",
"size",
"one",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-core/src/main/java/org/apereo/portal/security/provider/PersonImpl.java#L80-L92 | train |
Jasig/uPortal | uPortal-core/src/main/java/org/apereo/portal/security/provider/PersonImpl.java | PersonImpl.setAttribute | @Override
public void setAttribute(String key, Object value) {
if (value == null) {
setAttribute(key, null);
} else {
setAttribute(key, Collections.singletonList(value));
}
} | java | @Override
public void setAttribute(String key, Object value) {
if (value == null) {
setAttribute(key, null);
} else {
setAttribute(key, Collections.singletonList(value));
}
} | [
"@",
"Override",
"public",
"void",
"setAttribute",
"(",
"String",
"key",
",",
"Object",
"value",
")",
"{",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"setAttribute",
"(",
"key",
",",
"null",
")",
";",
"}",
"else",
"{",
"setAttribute",
"(",
"key",
",... | Sets the specified attribute to a value.
<p>Reference implementation checks for the setting of the username attribute and updates the
EntityIdentifier accordingly
@param key Attribute's name
@param value Attribute's value | [
"Sets",
"the",
"specified",
"attribute",
"to",
"a",
"value",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-core/src/main/java/org/apereo/portal/security/provider/PersonImpl.java#L114-L121 | train |
Jasig/uPortal | uPortal-core/src/main/java/org/apereo/portal/security/provider/PersonImpl.java | PersonImpl.isGuest | @Override
public boolean isGuest() {
String userName = (String) getAttribute(IPerson.USERNAME);
boolean isGuestUsername = PersonFactory.getGuestUsernames().contains(userName);
boolean isAuthenticated = m_securityContext != null && m_securityContext.isAuthenticated();
return isGuestUs... | java | @Override
public boolean isGuest() {
String userName = (String) getAttribute(IPerson.USERNAME);
boolean isGuestUsername = PersonFactory.getGuestUsernames().contains(userName);
boolean isAuthenticated = m_securityContext != null && m_securityContext.isAuthenticated();
return isGuestUs... | [
"@",
"Override",
"public",
"boolean",
"isGuest",
"(",
")",
"{",
"String",
"userName",
"=",
"(",
"String",
")",
"getAttribute",
"(",
"IPerson",
".",
"USERNAME",
")",
";",
"boolean",
"isGuestUsername",
"=",
"PersonFactory",
".",
"getGuestUsernames",
"(",
")",
... | Determines whether or not this person is a "guest" user.
<p>This person is a "guest" if both of the following are true:
<ol>
<li>This person's user name is listed as a guest user account.
<li>This person does not have a live instance ISecurityContext that states he/she has been
successfully authenticated. (It can be ... | [
"Determines",
"whether",
"or",
"not",
"this",
"person",
"is",
"a",
"guest",
"user",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-core/src/main/java/org/apereo/portal/security/provider/PersonImpl.java#L234-L240 | train |
Jasig/uPortal | uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/ReferenceEntityStoreFactory.java | ReferenceEntityStoreFactory.newInstance | public IEntityStore newInstance() throws GroupsException {
try {
return new RDBMEntityStore();
} catch (Exception ex) {
log.error("ReferenceEntityStoreFactory.newInstance(): " + ex);
throw new GroupsException(ex);
}
} | java | public IEntityStore newInstance() throws GroupsException {
try {
return new RDBMEntityStore();
} catch (Exception ex) {
log.error("ReferenceEntityStoreFactory.newInstance(): " + ex);
throw new GroupsException(ex);
}
} | [
"public",
"IEntityStore",
"newInstance",
"(",
")",
"throws",
"GroupsException",
"{",
"try",
"{",
"return",
"new",
"RDBMEntityStore",
"(",
")",
";",
"}",
"catch",
"(",
"Exception",
"ex",
")",
"{",
"log",
".",
"error",
"(",
"\"ReferenceEntityStoreFactory.newInstan... | Return an instance of the entity store implementation.
@return IEntityStore
@exception GroupsException | [
"Return",
"an",
"instance",
"of",
"the",
"entity",
"store",
"implementation",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/ReferenceEntityStoreFactory.java#L45-L52 | train |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/xml/stream/InjectingXMLEventReader.java | InjectingXMLEventReader.getAdditionalEvents | protected Deque<XMLEvent> getAdditionalEvents(XMLEvent event) {
final XMLEvent additionalEvent = this.getAdditionalEvent(event);
if (additionalEvent == null) {
return null;
}
final Deque<XMLEvent> additionalEvents = new LinkedList<XMLEvent>();
additionalEvents.push(a... | java | protected Deque<XMLEvent> getAdditionalEvents(XMLEvent event) {
final XMLEvent additionalEvent = this.getAdditionalEvent(event);
if (additionalEvent == null) {
return null;
}
final Deque<XMLEvent> additionalEvents = new LinkedList<XMLEvent>();
additionalEvents.push(a... | [
"protected",
"Deque",
"<",
"XMLEvent",
">",
"getAdditionalEvents",
"(",
"XMLEvent",
"event",
")",
"{",
"final",
"XMLEvent",
"additionalEvent",
"=",
"this",
".",
"getAdditionalEvent",
"(",
"event",
")",
";",
"if",
"(",
"additionalEvent",
"==",
"null",
")",
"{",... | The Deque with the additional events WILL BE MODIFIED by the calling code.
@param event The current event
@return Any additional events that should be injected before the current event. If null the
current event is returned | [
"The",
"Deque",
"with",
"the",
"additional",
"events",
"WILL",
"BE",
"MODIFIED",
"by",
"the",
"calling",
"code",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/xml/stream/InjectingXMLEventReader.java#L73-L82 | train |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/StylesheetUserPreferencesServiceImpl.java | StylesheetUserPreferencesServiceImpl.getStyleSheetName | protected String getStyleSheetName(final HttpServletRequest request, PreferencesScope scope) {
final String stylesheetNameFromRequest;
if (scope.equals(PreferencesScope.STRUCTURE)) {
stylesheetNameFromRequest =
(String) request.getAttribute(STYLESHEET_STRUCTURE_OVERRIDE_... | java | protected String getStyleSheetName(final HttpServletRequest request, PreferencesScope scope) {
final String stylesheetNameFromRequest;
if (scope.equals(PreferencesScope.STRUCTURE)) {
stylesheetNameFromRequest =
(String) request.getAttribute(STYLESHEET_STRUCTURE_OVERRIDE_... | [
"protected",
"String",
"getStyleSheetName",
"(",
"final",
"HttpServletRequest",
"request",
",",
"PreferencesScope",
"scope",
")",
"{",
"final",
"String",
"stylesheetNameFromRequest",
";",
"if",
"(",
"scope",
".",
"equals",
"(",
"PreferencesScope",
".",
"STRUCTURE",
... | Returns the stylesheet name if overridden in the request object.
@param request HttpRequest
@param scope Scope (Structure or Theme)
@return Stylesheet name if set as an override in the request, else null if it was not. | [
"Returns",
"the",
"stylesheet",
"name",
"if",
"overridden",
"in",
"the",
"request",
"object",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/StylesheetUserPreferencesServiceImpl.java#L1254-L1266 | train |
Jasig/uPortal | uPortal-security/uPortal-security-mvc/src/main/java/org/apereo/portal/security/mvc/LogoutController.java | LogoutController.doLogout | @RequestMapping
public void doLogout(HttpServletRequest request, HttpServletResponse response)
throws IOException {
String redirect = this.selectRedirectionUrl(request);
final HttpSession session = request.getSession(false);
if (session != null) {
// Record that an ... | java | @RequestMapping
public void doLogout(HttpServletRequest request, HttpServletResponse response)
throws IOException {
String redirect = this.selectRedirectionUrl(request);
final HttpSession session = request.getSession(false);
if (session != null) {
// Record that an ... | [
"@",
"RequestMapping",
"public",
"void",
"doLogout",
"(",
"HttpServletRequest",
"request",
",",
"HttpServletResponse",
"response",
")",
"throws",
"IOException",
"{",
"String",
"redirect",
"=",
"this",
".",
"selectRedirectionUrl",
"(",
"request",
")",
";",
"final",
... | Process the incoming request and response.
@param request HttpServletRequest object
@param response HttpServletResponse object | [
"Process",
"the",
"incoming",
"request",
"and",
"response",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-security/uPortal-security-mvc/src/main/java/org/apereo/portal/security/mvc/LogoutController.java#L79-L127 | train |
Jasig/uPortal | uPortal-core/src/main/java/org/apereo/portal/properties/PropertiesManager.java | PropertiesManager.loadProps | protected static void loadProps() {
PropertiesManager.props = new Properties();
try {
String pfile = System.getProperty(PORTAL_PROPERTIES_FILE_SYSTEM_VARIABLE);
if (pfile == null) {
pfile = PORTAL_PROPERTIES_FILE_NAME;
}
PropertiesManager.p... | java | protected static void loadProps() {
PropertiesManager.props = new Properties();
try {
String pfile = System.getProperty(PORTAL_PROPERTIES_FILE_SYSTEM_VARIABLE);
if (pfile == null) {
pfile = PORTAL_PROPERTIES_FILE_NAME;
}
PropertiesManager.p... | [
"protected",
"static",
"void",
"loadProps",
"(",
")",
"{",
"PropertiesManager",
".",
"props",
"=",
"new",
"Properties",
"(",
")",
";",
"try",
"{",
"String",
"pfile",
"=",
"System",
".",
"getProperty",
"(",
"PORTAL_PROPERTIES_FILE_SYSTEM_VARIABLE",
")",
";",
"i... | Load up the portal properties. Right now the portal properties is a simple .properties file
with name value pairs. It may evolve to become an XML file later on. | [
"Load",
"up",
"the",
"portal",
"properties",
".",
"Right",
"now",
"the",
"portal",
"properties",
"is",
"a",
"simple",
".",
"properties",
"file",
"with",
"name",
"value",
"pairs",
".",
"It",
"may",
"evolve",
"to",
"become",
"an",
"XML",
"file",
"later",
"... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-core/src/main/java/org/apereo/portal/properties/PropertiesManager.java#L83-L94 | train |
Jasig/uPortal | uPortal-core/src/main/java/org/apereo/portal/properties/PropertiesManager.java | PropertiesManager.getProperty | public static String getProperty(String name) throws MissingPropertyException {
if (log.isTraceEnabled()) {
log.trace("entering getProperty(" + name + ")");
}
if (PropertiesManager.props == null) loadProps();
String val = getPropertyUntrimmed(name);
val = val.trim();
... | java | public static String getProperty(String name) throws MissingPropertyException {
if (log.isTraceEnabled()) {
log.trace("entering getProperty(" + name + ")");
}
if (PropertiesManager.props == null) loadProps();
String val = getPropertyUntrimmed(name);
val = val.trim();
... | [
"public",
"static",
"String",
"getProperty",
"(",
"String",
"name",
")",
"throws",
"MissingPropertyException",
"{",
"if",
"(",
"log",
".",
"isTraceEnabled",
"(",
")",
")",
"{",
"log",
".",
"trace",
"(",
"\"entering getProperty(\"",
"+",
"name",
"+",
"\")\"",
... | Returns the value of a property for a given name. Any whitespace is trimmed off the beginning
and end of the property value. Note that this method will never return null. If the requested
property cannot be found, this method throws an UndeclaredPortalException.
@param name the name of the requested property
@return v... | [
"Returns",
"the",
"value",
"of",
"a",
"property",
"for",
"a",
"given",
"name",
".",
"Any",
"whitespace",
"is",
"trimmed",
"off",
"the",
"beginning",
"and",
"end",
"of",
"the",
"property",
"value",
".",
"Note",
"that",
"this",
"method",
"will",
"never",
"... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-core/src/main/java/org/apereo/portal/properties/PropertiesManager.java#L105-L116 | train |
Jasig/uPortal | uPortal-core/src/main/java/org/apereo/portal/properties/PropertiesManager.java | PropertiesManager.getPropertyUntrimmed | public static String getPropertyUntrimmed(String name) throws MissingPropertyException {
if (PropertiesManager.props == null) loadProps();
if (props == null) {
boolean alreadyReported = registerMissingProperty(name);
throw new MissingPropertyException(name, alreadyReported);
... | java | public static String getPropertyUntrimmed(String name) throws MissingPropertyException {
if (PropertiesManager.props == null) loadProps();
if (props == null) {
boolean alreadyReported = registerMissingProperty(name);
throw new MissingPropertyException(name, alreadyReported);
... | [
"public",
"static",
"String",
"getPropertyUntrimmed",
"(",
"String",
"name",
")",
"throws",
"MissingPropertyException",
"{",
"if",
"(",
"PropertiesManager",
".",
"props",
"==",
"null",
")",
"loadProps",
"(",
")",
";",
"if",
"(",
"props",
"==",
"null",
")",
"... | Returns the value of a property for a given name including whitespace trailing the property
value, but not including whitespace leading the property value. An UndeclaredPortalException
is thrown if the property cannot be found. This method will never return null.
@param name the name of the requested property
@return ... | [
"Returns",
"the",
"value",
"of",
"a",
"property",
"for",
"a",
"given",
"name",
"including",
"whitespace",
"trailing",
"the",
"property",
"value",
"but",
"not",
"including",
"whitespace",
"leading",
"the",
"property",
"value",
".",
"An",
"UndeclaredPortalException"... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-core/src/main/java/org/apereo/portal/properties/PropertiesManager.java#L127-L141 | train |
Jasig/uPortal | uPortal-core/src/main/java/org/apereo/portal/properties/PropertiesManager.java | PropertiesManager.registerMissingProperty | private static boolean registerMissingProperty(String name) {
final boolean previouslyReported = !PropertiesManager.missingProperties.add(name);
if (!previouslyReported && log.isInfoEnabled()) {
log.info("Property [" + name + "] was requested but not found.");
}
return previ... | java | private static boolean registerMissingProperty(String name) {
final boolean previouslyReported = !PropertiesManager.missingProperties.add(name);
if (!previouslyReported && log.isInfoEnabled()) {
log.info("Property [" + name + "] was requested but not found.");
}
return previ... | [
"private",
"static",
"boolean",
"registerMissingProperty",
"(",
"String",
"name",
")",
"{",
"final",
"boolean",
"previouslyReported",
"=",
"!",
"PropertiesManager",
".",
"missingProperties",
".",
"add",
"(",
"name",
")",
";",
"if",
"(",
"!",
"previouslyReported",
... | Registers that a given property was sought but not found. Currently adds the property to the
set of missing properties and logs if this is the first time the property has been requested.
@param name - the name of the missing property
@return true if the property was previously registered, false otherwise | [
"Registers",
"that",
"a",
"given",
"property",
"was",
"sought",
"but",
"not",
"found",
".",
"Currently",
"adds",
"the",
"property",
"to",
"the",
"set",
"of",
"missing",
"properties",
"and",
"logs",
"if",
"this",
"is",
"the",
"first",
"time",
"the",
"proper... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-core/src/main/java/org/apereo/portal/properties/PropertiesManager.java#L308-L315 | train |
Jasig/uPortal | uPortal-core/src/main/java/org/apereo/portal/properties/PropertiesManager.java | PropertiesManager.getProperty | public static String getProperty(String name, String defaultValue) {
if (PropertiesManager.props == null) loadProps();
String returnValue = defaultValue;
try {
returnValue = getProperty(name);
} catch (MissingPropertyException mpe) {
// Do nothing, since we have a... | java | public static String getProperty(String name, String defaultValue) {
if (PropertiesManager.props == null) loadProps();
String returnValue = defaultValue;
try {
returnValue = getProperty(name);
} catch (MissingPropertyException mpe) {
// Do nothing, since we have a... | [
"public",
"static",
"String",
"getProperty",
"(",
"String",
"name",
",",
"String",
"defaultValue",
")",
"{",
"if",
"(",
"PropertiesManager",
".",
"props",
"==",
"null",
")",
"loadProps",
"(",
")",
";",
"String",
"returnValue",
"=",
"defaultValue",
";",
"try"... | Get the value of the property with the given name. If the named property is not found,
returns the supplied default value. This error handling behavior makes this method attractive
for use in static initializers.
@param name - the name of the property to be retrieved.
@param defaultValue - a fallback default value whi... | [
"Get",
"the",
"value",
"of",
"the",
"property",
"with",
"the",
"given",
"name",
".",
"If",
"the",
"named",
"property",
"is",
"not",
"found",
"returns",
"the",
"supplied",
"default",
"value",
".",
"This",
"error",
"handling",
"behavior",
"makes",
"this",
"m... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-core/src/main/java/org/apereo/portal/properties/PropertiesManager.java#L329-L338 | train |
Jasig/uPortal | uPortal-core/src/main/java/org/apereo/portal/properties/PropertiesManager.java | PropertiesManager.getPropertyAsBoolean | public static boolean getPropertyAsBoolean(final String name, final boolean defaultValue) {
if (PropertiesManager.props == null) loadProps();
boolean returnValue = defaultValue;
try {
returnValue = getPropertyAsBoolean(name);
} catch (MissingPropertyException mpe) {
... | java | public static boolean getPropertyAsBoolean(final String name, final boolean defaultValue) {
if (PropertiesManager.props == null) loadProps();
boolean returnValue = defaultValue;
try {
returnValue = getPropertyAsBoolean(name);
} catch (MissingPropertyException mpe) {
... | [
"public",
"static",
"boolean",
"getPropertyAsBoolean",
"(",
"final",
"String",
"name",
",",
"final",
"boolean",
"defaultValue",
")",
"{",
"if",
"(",
"PropertiesManager",
".",
"props",
"==",
"null",
")",
"loadProps",
"(",
")",
";",
"boolean",
"returnValue",
"="... | Get a property as a boolean, specifying a default value. If for any reason we are unable to
lookup the desired property, this method returns the supplied default value. This error
handling behavior makes this method suitable for calling from static initializers.
@param name - the name of the property to be accessed
@p... | [
"Get",
"a",
"property",
"as",
"a",
"boolean",
"specifying",
"a",
"default",
"value",
".",
"If",
"for",
"any",
"reason",
"we",
"are",
"unable",
"to",
"lookup",
"the",
"desired",
"property",
"this",
"method",
"returns",
"the",
"supplied",
"default",
"value",
... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-core/src/main/java/org/apereo/portal/properties/PropertiesManager.java#L350-L359 | train |
Jasig/uPortal | uPortal-core/src/main/java/org/apereo/portal/properties/PropertiesManager.java | PropertiesManager.getPropertyAsByte | public static byte getPropertyAsByte(final String name, final byte defaultValue) {
if (PropertiesManager.props == null) loadProps();
byte returnValue = defaultValue;
try {
returnValue = getPropertyAsByte(name);
} catch (Throwable t) {
log.error(
... | java | public static byte getPropertyAsByte(final String name, final byte defaultValue) {
if (PropertiesManager.props == null) loadProps();
byte returnValue = defaultValue;
try {
returnValue = getPropertyAsByte(name);
} catch (Throwable t) {
log.error(
... | [
"public",
"static",
"byte",
"getPropertyAsByte",
"(",
"final",
"String",
"name",
",",
"final",
"byte",
"defaultValue",
")",
"{",
"if",
"(",
"PropertiesManager",
".",
"props",
"==",
"null",
")",
"loadProps",
"(",
")",
";",
"byte",
"returnValue",
"=",
"default... | Get the value of the given property as a byte, specifying a fallback default value. If for
any reason we are unable to lookup the desired property, this method returns the supplied
default value. This error handling behavior makes this method suitable for calling from
static initializers.
@param name - the name of the... | [
"Get",
"the",
"value",
"of",
"the",
"given",
"property",
"as",
"a",
"byte",
"specifying",
"a",
"fallback",
"default",
"value",
".",
"If",
"for",
"any",
"reason",
"we",
"are",
"unable",
"to",
"lookup",
"the",
"desired",
"property",
"this",
"method",
"return... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-core/src/main/java/org/apereo/portal/properties/PropertiesManager.java#L372-L387 | train |
Jasig/uPortal | uPortal-tools/src/main/java/org/apereo/portal/version/VersionUtils.java | VersionUtils.parseVersion | public static Version parseVersion(String versionString) {
final Matcher versionMatcher = VERSION_PATTERN.matcher(versionString);
if (!versionMatcher.matches()) {
return null;
}
final int major = Integer.parseInt(versionMatcher.group(1));
final int minor = Integer.pa... | java | public static Version parseVersion(String versionString) {
final Matcher versionMatcher = VERSION_PATTERN.matcher(versionString);
if (!versionMatcher.matches()) {
return null;
}
final int major = Integer.parseInt(versionMatcher.group(1));
final int minor = Integer.pa... | [
"public",
"static",
"Version",
"parseVersion",
"(",
"String",
"versionString",
")",
"{",
"final",
"Matcher",
"versionMatcher",
"=",
"VERSION_PATTERN",
".",
"matcher",
"(",
"versionString",
")",
";",
"if",
"(",
"!",
"versionMatcher",
".",
"matches",
"(",
")",
"... | Parse a version string into a Version object, if the string doesn't match the pattern null is
returned.
<p>The regular expression used in parsing is: ^(\d+)\.(\d+)\.(\d+)(?:\.(\d+))?(?:[\.-].*)?$
<p>Examples that match correctly:
<ul>
<li>4.0.5
<li>4.0.5.123123
<li>4.0.5-SNAPSHOT
<ul>
Examples do NOT match correctly... | [
"Parse",
"a",
"version",
"string",
"into",
"a",
"Version",
"object",
"if",
"the",
"string",
"doesn",
"t",
"match",
"the",
"pattern",
"null",
"is",
"returned",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-tools/src/main/java/org/apereo/portal/version/VersionUtils.java#L46-L61 | train |
Jasig/uPortal | uPortal-tools/src/main/java/org/apereo/portal/version/VersionUtils.java | VersionUtils.getMostSpecificMatchingField | public static Version.Field getMostSpecificMatchingField(Version v1, Version v2) {
if (v1.getMajor() != v2.getMajor()) {
return null;
}
if (v1.getMinor() != v2.getMinor()) {
return Version.Field.MAJOR;
}
if (v1.getPatch() != v2.getPatch()) {
... | java | public static Version.Field getMostSpecificMatchingField(Version v1, Version v2) {
if (v1.getMajor() != v2.getMajor()) {
return null;
}
if (v1.getMinor() != v2.getMinor()) {
return Version.Field.MAJOR;
}
if (v1.getPatch() != v2.getPatch()) {
... | [
"public",
"static",
"Version",
".",
"Field",
"getMostSpecificMatchingField",
"(",
"Version",
"v1",
",",
"Version",
"v2",
")",
"{",
"if",
"(",
"v1",
".",
"getMajor",
"(",
")",
"!=",
"v2",
".",
"getMajor",
"(",
")",
")",
"{",
"return",
"null",
";",
"}",
... | Determine how much of two versions match. Returns null if the versions do not match at all.
@return null for no match or the name of the most specific field that matches. | [
"Determine",
"how",
"much",
"of",
"two",
"versions",
"match",
".",
"Returns",
"null",
"if",
"the",
"versions",
"do",
"not",
"match",
"at",
"all",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-tools/src/main/java/org/apereo/portal/version/VersionUtils.java#L68-L88 | train |
Jasig/uPortal | uPortal-url/src/main/java/org/apereo/portal/url/UrlStringBuilder.java | UrlStringBuilder.setParameter | public UrlStringBuilder setParameter(String name, String... values) {
this.setParameter(name, values != null ? Arrays.asList(values) : null);
return this;
} | java | public UrlStringBuilder setParameter(String name, String... values) {
this.setParameter(name, values != null ? Arrays.asList(values) : null);
return this;
} | [
"public",
"UrlStringBuilder",
"setParameter",
"(",
"String",
"name",
",",
"String",
"...",
"values",
")",
"{",
"this",
".",
"setParameter",
"(",
"name",
",",
"values",
"!=",
"null",
"?",
"Arrays",
".",
"asList",
"(",
"values",
")",
":",
"null",
")",
";",... | Sets a URL parameter, replacing any existing parameter with the same name.
@param name Parameter name, can not be null
@param values Values for the parameter, null is valid
@return this | [
"Sets",
"a",
"URL",
"parameter",
"replacing",
"any",
"existing",
"parameter",
"with",
"the",
"same",
"name",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-url/src/main/java/org/apereo/portal/url/UrlStringBuilder.java#L116-L119 | train |
Jasig/uPortal | uPortal-url/src/main/java/org/apereo/portal/url/UrlStringBuilder.java | UrlStringBuilder.addParameter | public UrlStringBuilder addParameter(String name, String... values) {
this.addParameter(name, values != null ? Arrays.asList(values) : null);
return this;
} | java | public UrlStringBuilder addParameter(String name, String... values) {
this.addParameter(name, values != null ? Arrays.asList(values) : null);
return this;
} | [
"public",
"UrlStringBuilder",
"addParameter",
"(",
"String",
"name",
",",
"String",
"...",
"values",
")",
"{",
"this",
".",
"addParameter",
"(",
"name",
",",
"values",
"!=",
"null",
"?",
"Arrays",
".",
"asList",
"(",
"values",
")",
":",
"null",
")",
";",... | Adds to a URL parameter, if a parameter with the same name already exists its values are
added to
@param name Parameter name, can not be null
@param values Values for the parameter, null is valid
@return this | [
"Adds",
"to",
"a",
"URL",
"parameter",
"if",
"a",
"parameter",
"with",
"the",
"same",
"name",
"already",
"exists",
"its",
"values",
"are",
"added",
"to"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-url/src/main/java/org/apereo/portal/url/UrlStringBuilder.java#L137-L140 | train |
Jasig/uPortal | uPortal-url/src/main/java/org/apereo/portal/url/UrlStringBuilder.java | UrlStringBuilder.setParameters | public UrlStringBuilder setParameters(String namespace, Map<String, List<String>> parameters) {
for (final String name : parameters.keySet()) {
Validate.notNull(name, "parameter map cannot contain any null keys");
}
this.parameters.clear();
this.addParameters(namespace, para... | java | public UrlStringBuilder setParameters(String namespace, Map<String, List<String>> parameters) {
for (final String name : parameters.keySet()) {
Validate.notNull(name, "parameter map cannot contain any null keys");
}
this.parameters.clear();
this.addParameters(namespace, para... | [
"public",
"UrlStringBuilder",
"setParameters",
"(",
"String",
"namespace",
",",
"Map",
"<",
"String",
",",
"List",
"<",
"String",
">",
">",
"parameters",
")",
"{",
"for",
"(",
"final",
"String",
"name",
":",
"parameters",
".",
"keySet",
"(",
")",
")",
"{... | Removes all existing parameters and sets the contents of the specified Map as the parameters.
@param namespace String to prepend to each parameter name in the Map
@param parameters Map of parameters to set
@return this | [
"Removes",
"all",
"existing",
"parameters",
"and",
"sets",
"the",
"contents",
"of",
"the",
"specified",
"Map",
"as",
"the",
"parameters",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-url/src/main/java/org/apereo/portal/url/UrlStringBuilder.java#L174-L182 | train |
Jasig/uPortal | uPortal-url/src/main/java/org/apereo/portal/url/UrlStringBuilder.java | UrlStringBuilder.setPath | public UrlStringBuilder setPath(String... elements) {
Validate.noNullElements(elements, "elements cannot be null");
this.path.clear();
this.addPath(elements);
return this;
} | java | public UrlStringBuilder setPath(String... elements) {
Validate.noNullElements(elements, "elements cannot be null");
this.path.clear();
this.addPath(elements);
return this;
} | [
"public",
"UrlStringBuilder",
"setPath",
"(",
"String",
"...",
"elements",
")",
"{",
"Validate",
".",
"noNullElements",
"(",
"elements",
",",
"\"elements cannot be null\"",
")",
";",
"this",
".",
"path",
".",
"clear",
"(",
")",
";",
"this",
".",
"addPath",
"... | Removes any existing path elements and sets the provided elements as the path
@param elements Path elements to set
@return this | [
"Removes",
"any",
"existing",
"path",
"elements",
"and",
"sets",
"the",
"provided",
"elements",
"as",
"the",
"path"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-url/src/main/java/org/apereo/portal/url/UrlStringBuilder.java#L243-L249 | train |
Jasig/uPortal | uPortal-url/src/main/java/org/apereo/portal/url/UrlStringBuilder.java | UrlStringBuilder.addPath | public UrlStringBuilder addPath(String element) {
Validate.notNull(element, "element cannot be null");
this.path.add(element);
return this;
} | java | public UrlStringBuilder addPath(String element) {
Validate.notNull(element, "element cannot be null");
this.path.add(element);
return this;
} | [
"public",
"UrlStringBuilder",
"addPath",
"(",
"String",
"element",
")",
"{",
"Validate",
".",
"notNull",
"(",
"element",
",",
"\"element cannot be null\"",
")",
";",
"this",
".",
"path",
".",
"add",
"(",
"element",
")",
";",
"return",
"this",
";",
"}"
] | Adds a single element to the path.
@param element The element to add
@return this | [
"Adds",
"a",
"single",
"element",
"to",
"the",
"path",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-url/src/main/java/org/apereo/portal/url/UrlStringBuilder.java#L257-L261 | train |
Jasig/uPortal | uPortal-url/src/main/java/org/apereo/portal/url/UrlStringBuilder.java | UrlStringBuilder.addPath | public UrlStringBuilder addPath(String... elements) {
Validate.noNullElements(elements, "elements cannot be null");
for (final String element : elements) {
this.path.add(element);
}
return this;
} | java | public UrlStringBuilder addPath(String... elements) {
Validate.noNullElements(elements, "elements cannot be null");
for (final String element : elements) {
this.path.add(element);
}
return this;
} | [
"public",
"UrlStringBuilder",
"addPath",
"(",
"String",
"...",
"elements",
")",
"{",
"Validate",
".",
"noNullElements",
"(",
"elements",
",",
"\"elements cannot be null\"",
")",
";",
"for",
"(",
"final",
"String",
"element",
":",
"elements",
")",
"{",
"this",
... | Adds the provided elements to the path
@param elements Path elements to add
@return this | [
"Adds",
"the",
"provided",
"elements",
"to",
"the",
"path"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-url/src/main/java/org/apereo/portal/url/UrlStringBuilder.java#L269-L276 | train |
Jasig/uPortal | uPortal-rendering/src/main/java/org/apereo/portal/portlet/container/services/GuestPortletEntityPreferencesImpl.java | GuestPortletEntityPreferencesImpl.getSessionPreferences | @SuppressWarnings("unchecked")
protected Map<String, IPortletPreference> getSessionPreferences(
IPortletEntityId portletEntityId, HttpServletRequest httpServletRequest) {
final HttpSession session = httpServletRequest.getSession();
final Map<IPortletEntityId, Map<String, IPortletPrefere... | java | @SuppressWarnings("unchecked")
protected Map<String, IPortletPreference> getSessionPreferences(
IPortletEntityId portletEntityId, HttpServletRequest httpServletRequest) {
final HttpSession session = httpServletRequest.getSession();
final Map<IPortletEntityId, Map<String, IPortletPrefere... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"protected",
"Map",
"<",
"String",
",",
"IPortletPreference",
">",
"getSessionPreferences",
"(",
"IPortletEntityId",
"portletEntityId",
",",
"HttpServletRequest",
"httpServletRequest",
")",
"{",
"final",
"HttpSession",
... | Gets the session-stored list of IPortletPreferences for the specified request and
IPortletEntityId.
@return List of IPortletPreferences for the entity and session, may be null if no preferences
have been set. | [
"Gets",
"the",
"session",
"-",
"stored",
"list",
"of",
"IPortletPreferences",
"for",
"the",
"specified",
"request",
"and",
"IPortletEntityId",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-rendering/src/main/java/org/apereo/portal/portlet/container/services/GuestPortletEntityPreferencesImpl.java#L138-L157 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.