id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
57,700 | cloudant/sync-android | cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/replication/ReplicatorBuilder.java | ReplicatorBuilder.password | public E password(String password) {
Misc.checkNotNull(password, "password");
this.password = password;
//noinspection unchecked
return (E) this;
} | java | public E password(String password) {
Misc.checkNotNull(password, "password");
this.password = password;
//noinspection unchecked
return (E) this;
} | [
"public",
"E",
"password",
"(",
"String",
"password",
")",
"{",
"Misc",
".",
"checkNotNull",
"(",
"password",
",",
"\"password\"",
")",
";",
"this",
".",
"password",
"=",
"password",
";",
"//noinspection unchecked",
"return",
"(",
"E",
")",
"this",
";",
"}... | Sets the password to use when authenticating with the server.
Setting the username (using the {@link ReplicatorBuilder#username(String)}) and password
method
takes precedence over credentials passed via the URI.
@param password The password to use when authenticating.
@return The current instance of {@link Replicator... | [
"Sets",
"the",
"password",
"to",
"use",
"when",
"authenticating",
"with",
"the",
"server",
"."
] | 5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383 | https://github.com/cloudant/sync-android/blob/5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383/cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/replication/ReplicatorBuilder.java#L513-L518 |
57,701 | cloudant/sync-android | cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/query/QueryImpl.java | QueryImpl.listIndexes | @Override
public List<Index> listIndexes() throws QueryException {
try {
return DatabaseImpl.get(dbQueue.submit(new ListIndexesCallable()));
} catch (ExecutionException e) {
String msg = "Failed to list indexes";
logger.log(Level.SEVERE, msg, e);
thro... | java | @Override
public List<Index> listIndexes() throws QueryException {
try {
return DatabaseImpl.get(dbQueue.submit(new ListIndexesCallable()));
} catch (ExecutionException e) {
String msg = "Failed to list indexes";
logger.log(Level.SEVERE, msg, e);
thro... | [
"@",
"Override",
"public",
"List",
"<",
"Index",
">",
"listIndexes",
"(",
")",
"throws",
"QueryException",
"{",
"try",
"{",
"return",
"DatabaseImpl",
".",
"get",
"(",
"dbQueue",
".",
"submit",
"(",
"new",
"ListIndexesCallable",
"(",
")",
")",
")",
";",
"... | Get a list of indexes and their definitions as a Map.
Returns:
{ indexName: { type: json,
name: indexName,
fields: [field1, field2]
}
@return Map of indexes in the database. | [
"Get",
"a",
"list",
"of",
"indexes",
"and",
"their",
"definitions",
"as",
"a",
"Map",
"."
] | 5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383 | https://github.com/cloudant/sync-android/blob/5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383/cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/query/QueryImpl.java#L124-L134 |
57,702 | cloudant/sync-android | cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/query/QueryImpl.java | QueryImpl.ensureIndexed | private Index ensureIndexed(List<FieldSort> fieldNames,
String indexName,
IndexType indexType,
Tokenizer tokenizer) throws QueryException {
// synchronized to prevent race conditions in IndexCreator when looking for ... | java | private Index ensureIndexed(List<FieldSort> fieldNames,
String indexName,
IndexType indexType,
Tokenizer tokenizer) throws QueryException {
// synchronized to prevent race conditions in IndexCreator when looking for ... | [
"private",
"Index",
"ensureIndexed",
"(",
"List",
"<",
"FieldSort",
">",
"fieldNames",
",",
"String",
"indexName",
",",
"IndexType",
"indexType",
",",
"Tokenizer",
"tokenizer",
")",
"throws",
"QueryException",
"{",
"// synchronized to prevent race conditions in IndexCreat... | Add a single, possibly compound, index for the given field names.
This function generates a name for the new index.
@param fieldNames List of field names in the sort format
@param indexName Name of index to create or null to generate an index name.
@param indexType The type of index (json or text currently supported)... | [
"Add",
"a",
"single",
"possibly",
"compound",
"index",
"for",
"the",
"given",
"field",
"names",
"."
] | 5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383 | https://github.com/cloudant/sync-android/blob/5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383/cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/query/QueryImpl.java#L158-L172 |
57,703 | cloudant/sync-android | cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/query/QueryImpl.java | QueryImpl.deleteIndex | @Override
public void deleteIndex(final String indexName) throws QueryException {
Misc.checkNotNullOrEmpty(indexName, "indexName");
Future<Void> result = dbQueue.submitTransaction(new DeleteIndexCallable(indexName));
try {
result.get();
} catch (ExecutionException e) {
... | java | @Override
public void deleteIndex(final String indexName) throws QueryException {
Misc.checkNotNullOrEmpty(indexName, "indexName");
Future<Void> result = dbQueue.submitTransaction(new DeleteIndexCallable(indexName));
try {
result.get();
} catch (ExecutionException e) {
... | [
"@",
"Override",
"public",
"void",
"deleteIndex",
"(",
"final",
"String",
"indexName",
")",
"throws",
"QueryException",
"{",
"Misc",
".",
"checkNotNullOrEmpty",
"(",
"indexName",
",",
"\"indexName\"",
")",
";",
"Future",
"<",
"Void",
">",
"result",
"=",
"dbQue... | Delete an index.
@param indexName Name of index to delete | [
"Delete",
"an",
"index",
"."
] | 5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383 | https://github.com/cloudant/sync-android/blob/5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383/cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/query/QueryImpl.java#L179-L197 |
57,704 | cloudant/sync-android | cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/query/QueryImpl.java | QueryImpl.refreshAllIndexes | @Override
public void refreshAllIndexes() throws QueryException {
List<Index> indexes = listIndexes();
IndexUpdater.updateAllIndexes(indexes, database, dbQueue);
} | java | @Override
public void refreshAllIndexes() throws QueryException {
List<Index> indexes = listIndexes();
IndexUpdater.updateAllIndexes(indexes, database, dbQueue);
} | [
"@",
"Override",
"public",
"void",
"refreshAllIndexes",
"(",
")",
"throws",
"QueryException",
"{",
"List",
"<",
"Index",
">",
"indexes",
"=",
"listIndexes",
"(",
")",
";",
"IndexUpdater",
".",
"updateAllIndexes",
"(",
"indexes",
",",
"database",
",",
"dbQueue"... | Update all indexes. | [
"Update",
"all",
"indexes",
"."
] | 5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383 | https://github.com/cloudant/sync-android/blob/5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383/cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/query/QueryImpl.java#L203-L208 |
57,705 | cloudant/sync-android | cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/query/QueryExecutor.java | QueryExecutor.find | public QueryResult find(Map<String, Object> query,
final List<Index> indexes,
long skip,
long limit,
List<String> fields,
final List<FieldSort> sortDocument) throws QueryException ... | java | public QueryResult find(Map<String, Object> query,
final List<Index> indexes,
long skip,
long limit,
List<String> fields,
final List<FieldSort> sortDocument) throws QueryException ... | [
"public",
"QueryResult",
"find",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"query",
",",
"final",
"List",
"<",
"Index",
">",
"indexes",
",",
"long",
"skip",
",",
"long",
"limit",
",",
"List",
"<",
"String",
">",
"fields",
",",
"final",
"List",
"... | Execute the query passed using the selection of index definition provided.
The index definitions are presumed to already exist and be up to date for the
{@link Database} and its underlying {@link SQLDatabaseQueue} passed to the constructor.
@param query query to execute.
@param indexes indexes to use (this method wil... | [
"Execute",
"the",
"query",
"passed",
"using",
"the",
"selection",
"of",
"index",
"definition",
"provided",
"."
] | 5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383 | https://github.com/cloudant/sync-android/blob/5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383/cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/query/QueryExecutor.java#L80-L152 |
57,706 | cloudant/sync-android | cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/query/QueryExecutor.java | QueryExecutor.validateFields | private void validateFields(List<String> fields) {
if (fields == null) {
return;
}
List<String> badFields = new ArrayList<String>();
for (String field: fields) {
if (field.contains(".")) {
badFields.add(field);
}
}
if (... | java | private void validateFields(List<String> fields) {
if (fields == null) {
return;
}
List<String> badFields = new ArrayList<String>();
for (String field: fields) {
if (field.contains(".")) {
badFields.add(field);
}
}
if (... | [
"private",
"void",
"validateFields",
"(",
"List",
"<",
"String",
">",
"fields",
")",
"{",
"if",
"(",
"fields",
"==",
"null",
")",
"{",
"return",
";",
"}",
"List",
"<",
"String",
">",
"badFields",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",... | Checks if the fields are valid. | [
"Checks",
"if",
"the",
"fields",
"are",
"valid",
"."
] | 5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383 | https://github.com/cloudant/sync-android/blob/5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383/cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/query/QueryExecutor.java#L170-L187 |
57,707 | cloudant/sync-android | cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/query/QueryExecutor.java | QueryExecutor.sortIds | private List<String> sortIds(Set<String> docIdSet,
List<FieldSort> sortDocument,
List<Index> indexes,
SQLDatabase db) throws QueryException {
boolean smallResultSet = (docIdSet.size() < SMALL_RESULT_SET_SIZE_THRES... | java | private List<String> sortIds(Set<String> docIdSet,
List<FieldSort> sortDocument,
List<Index> indexes,
SQLDatabase db) throws QueryException {
boolean smallResultSet = (docIdSet.size() < SMALL_RESULT_SET_SIZE_THRES... | [
"private",
"List",
"<",
"String",
">",
"sortIds",
"(",
"Set",
"<",
"String",
">",
"docIdSet",
",",
"List",
"<",
"FieldSort",
">",
"sortDocument",
",",
"List",
"<",
"Index",
">",
"indexes",
",",
"SQLDatabase",
"db",
")",
"throws",
"QueryException",
"{",
"... | Return ordered list of document IDs using provided indexes.
Method assumes 'sortDocument' is valid.
@param docIdSet Set of current results which are sorted
@param sortDocument Array of ordering definitions
'[ {"fieldName": "asc"}, {"fieldName2", "desc"} ]'
@param indexes dictionary of indexes
@param db database conta... | [
"Return",
"ordered",
"list",
"of",
"document",
"IDs",
"using",
"provided",
"indexes",
"."
] | 5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383 | https://github.com/cloudant/sync-android/blob/5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383/cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/query/QueryExecutor.java#L288-L327 |
57,708 | cloudant/sync-android | cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/query/QueryExecutor.java | QueryExecutor.sqlToSortIds | protected static SqlParts sqlToSortIds(Set<String> docIdSet,
List<FieldSort> sortDocument,
List<Index> indexes) throws QueryException {
String chosenIndex = chooseIndexForSort(sortDocument, indexes);
if (chosenIndex == null) {
... | java | protected static SqlParts sqlToSortIds(Set<String> docIdSet,
List<FieldSort> sortDocument,
List<Index> indexes) throws QueryException {
String chosenIndex = chooseIndexForSort(sortDocument, indexes);
if (chosenIndex == null) {
... | [
"protected",
"static",
"SqlParts",
"sqlToSortIds",
"(",
"Set",
"<",
"String",
">",
"docIdSet",
",",
"List",
"<",
"FieldSort",
">",
"sortDocument",
",",
"List",
"<",
"Index",
">",
"indexes",
")",
"throws",
"QueryException",
"{",
"String",
"chosenIndex",
"=",
... | Return SQL to get ordered list of docIds.
Method assumes `sortDocument` is valid.
@param docIdSet The original set of document IDs
@param sortDocument Array of ordering definitions
[ { "fieldName" : "asc" }, { "fieldName2", "desc" } ]
@param indexes dictionary of indexes
@return the SQL containing the order by clause | [
"Return",
"SQL",
"to",
"get",
"ordered",
"list",
"of",
"docIds",
"."
] | 5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383 | https://github.com/cloudant/sync-android/blob/5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383/cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/query/QueryExecutor.java#L340-L387 |
57,709 | cloudant/sync-android | cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/common/CouchUtils.java | CouchUtils.generateNextRevisionId | public static String generateNextRevisionId(String revisionId) {
validateRevisionId(revisionId);
int generation = generationFromRevId(revisionId);
String digest = createUUID();
return Integer.toString(generation + 1) + "-" + digest;
} | java | public static String generateNextRevisionId(String revisionId) {
validateRevisionId(revisionId);
int generation = generationFromRevId(revisionId);
String digest = createUUID();
return Integer.toString(generation + 1) + "-" + digest;
} | [
"public",
"static",
"String",
"generateNextRevisionId",
"(",
"String",
"revisionId",
")",
"{",
"validateRevisionId",
"(",
"revisionId",
")",
";",
"int",
"generation",
"=",
"generationFromRevId",
"(",
"revisionId",
")",
";",
"String",
"digest",
"=",
"createUUID",
"... | DBObject IDs have a generation count, a hyphen, and a UUID. | [
"DBObject",
"IDs",
"have",
"a",
"generation",
"count",
"a",
"hyphen",
"and",
"a",
"UUID",
"."
] | 5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383 | https://github.com/cloudant/sync-android/blob/5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383/cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/common/CouchUtils.java#L86-L91 |
57,710 | cloudant/sync-android | cloudant-sync-datastore-android-encryption/src/main/java/com/cloudant/sync/internal/sqlite/android/AndroidSQLCipherSQLite.java | AndroidSQLCipherSQLite.open | public static AndroidSQLCipherSQLite open(File path, KeyProvider provider) {
//Call SQLCipher-based method for opening database, or creating if database not found
SQLiteDatabase db = SQLiteDatabase.openOrCreateDatabase(path,
KeyUtils.sqlCipherKeyForKeyProvider(provider), null);
... | java | public static AndroidSQLCipherSQLite open(File path, KeyProvider provider) {
//Call SQLCipher-based method for opening database, or creating if database not found
SQLiteDatabase db = SQLiteDatabase.openOrCreateDatabase(path,
KeyUtils.sqlCipherKeyForKeyProvider(provider), null);
... | [
"public",
"static",
"AndroidSQLCipherSQLite",
"open",
"(",
"File",
"path",
",",
"KeyProvider",
"provider",
")",
"{",
"//Call SQLCipher-based method for opening database, or creating if database not found",
"SQLiteDatabase",
"db",
"=",
"SQLiteDatabase",
".",
"openOrCreateDatabase"... | Constructor for creating SQLCipher-based SQLite database.
@param path full file path of the db file
@param provider Provider object that contains the key to encrypt the SQLCipher database
@return | [
"Constructor",
"for",
"creating",
"SQLCipher",
"-",
"based",
"SQLite",
"database",
"."
] | 5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383 | https://github.com/cloudant/sync-android/blob/5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383/cloudant-sync-datastore-android-encryption/src/main/java/com/cloudant/sync/internal/sqlite/android/AndroidSQLCipherSQLite.java#L52-L59 |
57,711 | cloudant/sync-android | cloudant-sync-datastore-android/src/main/java/com/cloudant/sync/replication/PeriodicReplicationService.java | PeriodicReplicationService.upgradePreferences | protected void upgradePreferences() {
String alarmDueElapsed = "com.cloudant.sync.replication.PeriodicReplicationService.alarmDueElapsed";
if (mPrefs.contains(alarmDueElapsed)) {
// These are old style preferences. We need to rewrite them in the new form that allows
// multiple r... | java | protected void upgradePreferences() {
String alarmDueElapsed = "com.cloudant.sync.replication.PeriodicReplicationService.alarmDueElapsed";
if (mPrefs.contains(alarmDueElapsed)) {
// These are old style preferences. We need to rewrite them in the new form that allows
// multiple r... | [
"protected",
"void",
"upgradePreferences",
"(",
")",
"{",
"String",
"alarmDueElapsed",
"=",
"\"com.cloudant.sync.replication.PeriodicReplicationService.alarmDueElapsed\"",
";",
"if",
"(",
"mPrefs",
".",
"contains",
"(",
"alarmDueElapsed",
")",
")",
"{",
"// These are old st... | If the stored preferences are in the old format, upgrade them to the new format so that
the app continues to work after upgrade to this version. | [
"If",
"the",
"stored",
"preferences",
"are",
"in",
"the",
"old",
"format",
"upgrade",
"them",
"to",
"the",
"new",
"format",
"so",
"that",
"the",
"app",
"continues",
"to",
"work",
"after",
"upgrade",
"to",
"this",
"version",
"."
] | 5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383 | https://github.com/cloudant/sync-android/blob/5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383/cloudant-sync-datastore-android/src/main/java/com/cloudant/sync/replication/PeriodicReplicationService.java#L134-L158 |
57,712 | cloudant/sync-android | cloudant-sync-datastore-android/src/main/java/com/cloudant/sync/replication/PeriodicReplicationService.java | PeriodicReplicationService.startPeriodicReplication | public synchronized void startPeriodicReplication() {
if (!isPeriodicReplicationEnabled()) {
setPeriodicReplicationEnabled(true);
AlarmManager alarmManager = (AlarmManager) getSystemService(Context.ALARM_SERVICE);
Intent alarmIntent = new Intent(this, clazz);
alar... | java | public synchronized void startPeriodicReplication() {
if (!isPeriodicReplicationEnabled()) {
setPeriodicReplicationEnabled(true);
AlarmManager alarmManager = (AlarmManager) getSystemService(Context.ALARM_SERVICE);
Intent alarmIntent = new Intent(this, clazz);
alar... | [
"public",
"synchronized",
"void",
"startPeriodicReplication",
"(",
")",
"{",
"if",
"(",
"!",
"isPeriodicReplicationEnabled",
"(",
")",
")",
"{",
"setPeriodicReplicationEnabled",
"(",
"true",
")",
";",
"AlarmManager",
"alarmManager",
"=",
"(",
"AlarmManager",
")",
... | Start periodic replications. | [
"Start",
"periodic",
"replications",
"."
] | 5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383 | https://github.com/cloudant/sync-android/blob/5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383/cloudant-sync-datastore-android/src/main/java/com/cloudant/sync/replication/PeriodicReplicationService.java#L253-L283 |
57,713 | cloudant/sync-android | cloudant-sync-datastore-android/src/main/java/com/cloudant/sync/replication/PeriodicReplicationService.java | PeriodicReplicationService.stopPeriodicReplication | public synchronized void stopPeriodicReplication() {
if (isPeriodicReplicationEnabled()) {
setPeriodicReplicationEnabled(false);
AlarmManager alarmManager = (AlarmManager) getSystemService(Context.ALARM_SERVICE);
Intent alarmIntent = new Intent(this, clazz);
alarm... | java | public synchronized void stopPeriodicReplication() {
if (isPeriodicReplicationEnabled()) {
setPeriodicReplicationEnabled(false);
AlarmManager alarmManager = (AlarmManager) getSystemService(Context.ALARM_SERVICE);
Intent alarmIntent = new Intent(this, clazz);
alarm... | [
"public",
"synchronized",
"void",
"stopPeriodicReplication",
"(",
")",
"{",
"if",
"(",
"isPeriodicReplicationEnabled",
"(",
")",
")",
"{",
"setPeriodicReplicationEnabled",
"(",
"false",
")",
";",
"AlarmManager",
"alarmManager",
"=",
"(",
"AlarmManager",
")",
"getSys... | Stop replications currently in progress and cancel future scheduled replications. | [
"Stop",
"replications",
"currently",
"in",
"progress",
"and",
"cancel",
"future",
"scheduled",
"replications",
"."
] | 5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383 | https://github.com/cloudant/sync-android/blob/5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383/cloudant-sync-datastore-android/src/main/java/com/cloudant/sync/replication/PeriodicReplicationService.java#L286-L300 |
57,714 | cloudant/sync-android | cloudant-sync-datastore-android/src/main/java/com/cloudant/sync/replication/PeriodicReplicationService.java | PeriodicReplicationService.setPeriodicReplicationEnabled | private void setPeriodicReplicationEnabled(boolean running) {
SharedPreferences.Editor editor = mPrefs.edit();
editor.putBoolean(constructKey(PERIODIC_REPLICATION_ENABLED_SUFFIX), running);
editor.apply();
} | java | private void setPeriodicReplicationEnabled(boolean running) {
SharedPreferences.Editor editor = mPrefs.edit();
editor.putBoolean(constructKey(PERIODIC_REPLICATION_ENABLED_SUFFIX), running);
editor.apply();
} | [
"private",
"void",
"setPeriodicReplicationEnabled",
"(",
"boolean",
"running",
")",
"{",
"SharedPreferences",
".",
"Editor",
"editor",
"=",
"mPrefs",
".",
"edit",
"(",
")",
";",
"editor",
".",
"putBoolean",
"(",
"constructKey",
"(",
"PERIODIC_REPLICATION_ENABLED_SUF... | Set a flag in SharedPreferences to indicate whether periodic replications are enabled.
@param running true to indicate that periodic replications are enabled, otherwise false. | [
"Set",
"a",
"flag",
"in",
"SharedPreferences",
"to",
"indicate",
"whether",
"periodic",
"replications",
"are",
"enabled",
"."
] | 5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383 | https://github.com/cloudant/sync-android/blob/5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383/cloudant-sync-datastore-android/src/main/java/com/cloudant/sync/replication/PeriodicReplicationService.java#L351-L355 |
57,715 | cloudant/sync-android | cloudant-sync-datastore-android/src/main/java/com/cloudant/sync/replication/PeriodicReplicationService.java | PeriodicReplicationService.setExplicitlyStopped | private void setExplicitlyStopped(boolean explicitlyStopped) {
SharedPreferences.Editor editor = mPrefs.edit();
editor.putBoolean(constructKey(EXPLICITLY_STOPPED_SUFFIX), explicitlyStopped);
editor.apply();
} | java | private void setExplicitlyStopped(boolean explicitlyStopped) {
SharedPreferences.Editor editor = mPrefs.edit();
editor.putBoolean(constructKey(EXPLICITLY_STOPPED_SUFFIX), explicitlyStopped);
editor.apply();
} | [
"private",
"void",
"setExplicitlyStopped",
"(",
"boolean",
"explicitlyStopped",
")",
"{",
"SharedPreferences",
".",
"Editor",
"editor",
"=",
"mPrefs",
".",
"edit",
"(",
")",
";",
"editor",
".",
"putBoolean",
"(",
"constructKey",
"(",
"EXPLICITLY_STOPPED_SUFFIX",
"... | Set a flag in SharedPreferences to indicate whether periodic replications were explicitly
stopped.
@param explicitlyStopped true to indicate that periodic replications were stopped
explicitly by the sending of COMMAND_STOP_PERIODIC_REPLICATION,
otherwise false. | [
"Set",
"a",
"flag",
"in",
"SharedPreferences",
"to",
"indicate",
"whether",
"periodic",
"replications",
"were",
"explicitly",
"stopped",
"."
] | 5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383 | https://github.com/cloudant/sync-android/blob/5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383/cloudant-sync-datastore-android/src/main/java/com/cloudant/sync/replication/PeriodicReplicationService.java#L381-L385 |
57,716 | cloudant/sync-android | cloudant-sync-datastore-android/src/main/java/com/cloudant/sync/replication/PeriodicReplicationService.java | PeriodicReplicationService.resetAlarmDueTimesOnReboot | private void resetAlarmDueTimesOnReboot() {
// As the device has been rebooted, we use clock time rather than elapsed time since
// booting to set check whether we missed any alarms while the device was off and to
// make sure the next alarm time isn't too far in the future (indicating the syste... | java | private void resetAlarmDueTimesOnReboot() {
// As the device has been rebooted, we use clock time rather than elapsed time since
// booting to set check whether we missed any alarms while the device was off and to
// make sure the next alarm time isn't too far in the future (indicating the syste... | [
"private",
"void",
"resetAlarmDueTimesOnReboot",
"(",
")",
"{",
"// As the device has been rebooted, we use clock time rather than elapsed time since",
"// booting to set check whether we missed any alarms while the device was off and to",
"// make sure the next alarm time isn't too far in the futur... | Reset the alarm times stored in SharedPreferences following a reboot of the device.
After a reboot, the AlarmManager must be setup again so that periodic replications will
occur following reboot. | [
"Reset",
"the",
"alarm",
"times",
"stored",
"in",
"SharedPreferences",
"following",
"a",
"reboot",
"of",
"the",
"device",
".",
"After",
"a",
"reboot",
"the",
"AlarmManager",
"must",
"be",
"setup",
"again",
"so",
"that",
"periodic",
"replications",
"will",
"occ... | 5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383 | https://github.com/cloudant/sync-android/blob/5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383/cloudant-sync-datastore-android/src/main/java/com/cloudant/sync/replication/PeriodicReplicationService.java#L400-L433 |
57,717 | cloudant/sync-android | cloudant-sync-datastore-android/src/main/java/com/cloudant/sync/replication/PeriodicReplicationService.java | PeriodicReplicationService.setReplicationsPending | public static void setReplicationsPending(Context context, Class<? extends
PeriodicReplicationService> prsClass, boolean pending) {
SharedPreferences prefs = context.getSharedPreferences(PREFERENCES_FILE_NAME, Context
.MODE_PRIVATE);
SharedPreferences.Editor editor = prefs.edit();
... | java | public static void setReplicationsPending(Context context, Class<? extends
PeriodicReplicationService> prsClass, boolean pending) {
SharedPreferences prefs = context.getSharedPreferences(PREFERENCES_FILE_NAME, Context
.MODE_PRIVATE);
SharedPreferences.Editor editor = prefs.edit();
... | [
"public",
"static",
"void",
"setReplicationsPending",
"(",
"Context",
"context",
",",
"Class",
"<",
"?",
"extends",
"PeriodicReplicationService",
">",
"prsClass",
",",
"boolean",
"pending",
")",
"{",
"SharedPreferences",
"prefs",
"=",
"context",
".",
"getSharedPrefe... | Sets whether there are replications pending. This may be because replications are
currently in progress and have not yet completed, or because a previous scheduled
replication didn't take place because the conditions for replication were not met.
@param context
@param prsClass
@param pending true if there is a replicat... | [
"Sets",
"whether",
"there",
"are",
"replications",
"pending",
".",
"This",
"may",
"be",
"because",
"replications",
"are",
"currently",
"in",
"progress",
"and",
"have",
"not",
"yet",
"completed",
"or",
"because",
"a",
"previous",
"scheduled",
"replication",
"didn... | 5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383 | https://github.com/cloudant/sync-android/blob/5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383/cloudant-sync-datastore-android/src/main/java/com/cloudant/sync/replication/PeriodicReplicationService.java#L470-L477 |
57,718 | cloudant/sync-android | cloudant-sync-datastore-android/src/main/java/com/cloudant/sync/replication/PeriodicReplicationService.java | PeriodicReplicationService.replicationsPending | public static boolean replicationsPending(Context context, Class<? extends
PeriodicReplicationService> prsClass) {
SharedPreferences prefs = context.getSharedPreferences(PREFERENCES_FILE_NAME, Context
.MODE_PRIVATE);
return prefs.getBoolean(constructKey(prsClass, REPLICATIONS_PENDING... | java | public static boolean replicationsPending(Context context, Class<? extends
PeriodicReplicationService> prsClass) {
SharedPreferences prefs = context.getSharedPreferences(PREFERENCES_FILE_NAME, Context
.MODE_PRIVATE);
return prefs.getBoolean(constructKey(prsClass, REPLICATIONS_PENDING... | [
"public",
"static",
"boolean",
"replicationsPending",
"(",
"Context",
"context",
",",
"Class",
"<",
"?",
"extends",
"PeriodicReplicationService",
">",
"prsClass",
")",
"{",
"SharedPreferences",
"prefs",
"=",
"context",
".",
"getSharedPreferences",
"(",
"PREFERENCES_FI... | Gets whether there are replications pending. Replications may be pending because they are
currently in progress and have not yet completed, or because a previous scheduled
replication didn't take place because the conditions for replication were not met.
@param context
@param prsClass
@return | [
"Gets",
"whether",
"there",
"are",
"replications",
"pending",
".",
"Replications",
"may",
"be",
"pending",
"because",
"they",
"are",
"currently",
"in",
"progress",
"and",
"have",
"not",
"yet",
"completed",
"or",
"because",
"a",
"previous",
"scheduled",
"replicat... | 5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383 | https://github.com/cloudant/sync-android/blob/5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383/cloudant-sync-datastore-android/src/main/java/com/cloudant/sync/replication/PeriodicReplicationService.java#L487-L492 |
57,719 | cloudant/sync-android | cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/mazha/CouchClient.java | CouchClient.executeWithRetry | private <T> T executeWithRetry(final Callable<ExecuteResult> task,
InputStreamProcessor<T> processor) throws
CouchException {
int attempts = 10;
CouchException lastException = null;
while (attempts-- > 0) {
ExecuteResult result = null;
... | java | private <T> T executeWithRetry(final Callable<ExecuteResult> task,
InputStreamProcessor<T> processor) throws
CouchException {
int attempts = 10;
CouchException lastException = null;
while (attempts-- > 0) {
ExecuteResult result = null;
... | [
"private",
"<",
"T",
">",
"T",
"executeWithRetry",
"(",
"final",
"Callable",
"<",
"ExecuteResult",
">",
"task",
",",
"InputStreamProcessor",
"<",
"T",
">",
"processor",
")",
"throws",
"CouchException",
"{",
"int",
"attempts",
"=",
"10",
";",
"CouchException",
... | return an InputStream if successful or throw an exception | [
"return",
"an",
"InputStream",
"if",
"successful",
"or",
"throw",
"an",
"exception"
] | 5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383 | https://github.com/cloudant/sync-android/blob/5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383/cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/mazha/CouchClient.java#L344-L381 |
57,720 | cloudant/sync-android | cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/mazha/CouchClient.java | CouchClient.update | public Response update(String id, Object document) {
Misc.checkNotNullOrEmpty(id, "id");
Misc.checkNotNull(document, "Document");
// Get the latest rev, will throw if doc doesn't exist
getDocumentRev(id);
return putUpdate(id, document);
} | java | public Response update(String id, Object document) {
Misc.checkNotNullOrEmpty(id, "id");
Misc.checkNotNull(document, "Document");
// Get the latest rev, will throw if doc doesn't exist
getDocumentRev(id);
return putUpdate(id, document);
} | [
"public",
"Response",
"update",
"(",
"String",
"id",
",",
"Object",
"document",
")",
"{",
"Misc",
".",
"checkNotNullOrEmpty",
"(",
"id",
",",
"\"id\"",
")",
";",
"Misc",
".",
"checkNotNull",
"(",
"document",
",",
"\"Document\"",
")",
";",
"// Get the latest ... | Document should be complete document include "_id" matches ID | [
"Document",
"should",
"be",
"complete",
"document",
"include",
"_id",
"matches",
"ID"
] | 5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383 | https://github.com/cloudant/sync-android/blob/5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383/cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/mazha/CouchClient.java#L738-L746 |
57,721 | cloudant/sync-android | cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/mazha/CouchClient.java | CouchClient.bulkCreateSerializedDocs | public List<Response> bulkCreateSerializedDocs(List<String> serializedDocs) {
Misc.checkNotNull(serializedDocs, "Serialized doc list");
String payload = generateBulkSerializedDocsPayload(serializedDocs);
return bulkCreateDocs(payload);
} | java | public List<Response> bulkCreateSerializedDocs(List<String> serializedDocs) {
Misc.checkNotNull(serializedDocs, "Serialized doc list");
String payload = generateBulkSerializedDocsPayload(serializedDocs);
return bulkCreateDocs(payload);
} | [
"public",
"List",
"<",
"Response",
">",
"bulkCreateSerializedDocs",
"(",
"List",
"<",
"String",
">",
"serializedDocs",
")",
"{",
"Misc",
".",
"checkNotNull",
"(",
"serializedDocs",
",",
"\"Serialized doc list\"",
")",
";",
"String",
"payload",
"=",
"generateBulkSe... | Bulk insert a list of document that are serialized to JSON data already. For performance
reasons,
the JSON doc is not validated.
@param serializedDocs list of JSON documents
@return list of Response | [
"Bulk",
"insert",
"a",
"list",
"of",
"document",
"that",
"are",
"serialized",
"to",
"JSON",
"data",
"already",
".",
"For",
"performance",
"reasons",
"the",
"JSON",
"doc",
"is",
"not",
"validated",
"."
] | 5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383 | https://github.com/cloudant/sync-android/blob/5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383/cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/mazha/CouchClient.java#L820-L824 |
57,722 | Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/favorites/FavoritesEditController.java | FavoritesEditController.initializeView | @RenderMapping
public String initializeView(Model model, RenderRequest renderRequest) {
IUserInstance ui =
userInstanceManager.getUserInstance(portalRequestUtils.getCurrentPortalRequest());
UserPreferencesManager upm = (UserPreferencesManager) ui.getPreferencesManager();
IUs... | java | @RenderMapping
public String initializeView(Model model, RenderRequest renderRequest) {
IUserInstance ui =
userInstanceManager.getUserInstance(portalRequestUtils.getCurrentPortalRequest());
UserPreferencesManager upm = (UserPreferencesManager) ui.getPreferencesManager();
IUs... | [
"@",
"RenderMapping",
"public",
"String",
"initializeView",
"(",
"Model",
"model",
",",
"RenderRequest",
"renderRequest",
")",
"{",
"IUserInstance",
"ui",
"=",
"userInstanceManager",
".",
"getUserInstance",
"(",
"portalRequestUtils",
".",
"getCurrentPortalRequest",
"(",... | Handles all Favorites portlet EDIT mode renders. Populates model with user's favorites and
selects a view to display those favorites.
<p>View selection:
<p>Returns "jsp/Favorites/edit" in the normal case where the user has at least one favorited
portlet or favorited collection.
<p>Returns "jsp/Favorites/edit_zero" i... | [
"Handles",
"all",
"Favorites",
"portlet",
"EDIT",
"mode",
"renders",
".",
"Populates",
"model",
"with",
"user",
"s",
"favorites",
"and",
"selects",
"a",
"view",
"to",
"display",
"those",
"favorites",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/favorites/FavoritesEditController.java#L69-L118 |
57,723 | Jasig/uPortal | uPortal-layout/uPortal-layout-core/src/main/java/org/apereo/portal/layout/dlm/FragmentNodeInfo.java | FragmentNodeInfo.getAttributeValue | public String getAttributeValue(String name) {
Attr att = node.getAttributeNode(name);
if (att == null) return null;
return att.getNodeValue();
} | java | public String getAttributeValue(String name) {
Attr att = node.getAttributeNode(name);
if (att == null) return null;
return att.getNodeValue();
} | [
"public",
"String",
"getAttributeValue",
"(",
"String",
"name",
")",
"{",
"Attr",
"att",
"=",
"node",
".",
"getAttributeNode",
"(",
"name",
")",
";",
"if",
"(",
"att",
"==",
"null",
")",
"return",
"null",
";",
"return",
"att",
".",
"getNodeValue",
"(",
... | Returns the value of an attribute or null if such an attribute is not defined on the
underlying element. | [
"Returns",
"the",
"value",
"of",
"an",
"attribute",
"or",
"null",
"if",
"such",
"an",
"attribute",
"is",
"not",
"defined",
"on",
"the",
"underlying",
"element",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-core/src/main/java/org/apereo/portal/layout/dlm/FragmentNodeInfo.java#L39-L43 |
57,724 | Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/HandlerUtils.java | HandlerUtils.getPLFNode | public static Element getPLFNode(
Element compViewNode, IPerson person, boolean create, boolean includeChildNodes)
throws PortalException {
Document plf = (Document) person.getAttribute(Constants.PLF);
String ID = compViewNode.getAttribute(Constants.ATT_ID);
Element plfNo... | java | public static Element getPLFNode(
Element compViewNode, IPerson person, boolean create, boolean includeChildNodes)
throws PortalException {
Document plf = (Document) person.getAttribute(Constants.PLF);
String ID = compViewNode.getAttribute(Constants.ATT_ID);
Element plfNo... | [
"public",
"static",
"Element",
"getPLFNode",
"(",
"Element",
"compViewNode",
",",
"IPerson",
"person",
",",
"boolean",
"create",
",",
"boolean",
"includeChildNodes",
")",
"throws",
"PortalException",
"{",
"Document",
"plf",
"=",
"(",
"Document",
")",
"person",
"... | This method returns the PLF version of the passed in compViewNode. If create is false and a
node with the same id is not found in the PLF then null is returned. If the create is true
then an attempt is made to create the node along with any necessary ancestor nodes needed to
represent the path along the tree. | [
"This",
"method",
"returns",
"the",
"PLF",
"version",
"of",
"the",
"passed",
"in",
"compViewNode",
".",
"If",
"create",
"is",
"false",
"and",
"a",
"node",
"with",
"the",
"same",
"id",
"is",
"not",
"found",
"in",
"the",
"PLF",
"then",
"null",
"is",
"ret... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/HandlerUtils.java#L36-L53 |
57,725 | Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/HandlerUtils.java | HandlerUtils.createPlfNodeAndPath | public static Element createPlfNodeAndPath(
Element compViewNode, boolean includeChildNodes, IPerson person)
throws PortalException {
// first attempt to get parent
Element compViewParent = (Element) compViewNode.getParentNode();
Element plfParent = getPLFNode(compViewPar... | java | public static Element createPlfNodeAndPath(
Element compViewNode, boolean includeChildNodes, IPerson person)
throws PortalException {
// first attempt to get parent
Element compViewParent = (Element) compViewNode.getParentNode();
Element plfParent = getPLFNode(compViewPar... | [
"public",
"static",
"Element",
"createPlfNodeAndPath",
"(",
"Element",
"compViewNode",
",",
"boolean",
"includeChildNodes",
",",
"IPerson",
"person",
")",
"throws",
"PortalException",
"{",
"// first attempt to get parent",
"Element",
"compViewParent",
"=",
"(",
"Element",... | Creates a copy of the passed in ILF node in the PLF if not already there as well as creating
any ancestor nodes along the path from this node up to the layout root if they are not there. | [
"Creates",
"a",
"copy",
"of",
"the",
"passed",
"in",
"ILF",
"node",
"in",
"the",
"PLF",
"if",
"not",
"already",
"there",
"as",
"well",
"as",
"creating",
"any",
"ancestor",
"nodes",
"along",
"the",
"path",
"from",
"this",
"node",
"up",
"to",
"the",
"lay... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/HandlerUtils.java#L59-L83 |
57,726 | Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/HandlerUtils.java | HandlerUtils.createILFCopy | private static Element createILFCopy(
Element compViewNode,
Element compViewParent,
boolean includeChildNodes,
Document plf,
Element plfParent,
IPerson person)
throws PortalException {
Element plfNode = (Element) plf.importNode(... | java | private static Element createILFCopy(
Element compViewNode,
Element compViewParent,
boolean includeChildNodes,
Document plf,
Element plfParent,
IPerson person)
throws PortalException {
Element plfNode = (Element) plf.importNode(... | [
"private",
"static",
"Element",
"createILFCopy",
"(",
"Element",
"compViewNode",
",",
"Element",
"compViewParent",
",",
"boolean",
"includeChildNodes",
",",
"Document",
"plf",
",",
"Element",
"plfParent",
",",
"IPerson",
"person",
")",
"throws",
"PortalException",
"... | Creates a copy of an ilf node in the plf and sets up necessary storage attributes. | [
"Creates",
"a",
"copy",
"of",
"an",
"ilf",
"node",
"in",
"the",
"plf",
"and",
"sets",
"up",
"necessary",
"storage",
"attributes",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/HandlerUtils.java#L86-L132 |
57,727 | Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/HandlerUtils.java | HandlerUtils.createOrMovePLFOwnedNode | static Element createOrMovePLFOwnedNode(
Element compViewNode,
Element compViewParent,
boolean createIfNotFound,
boolean createChildNodes,
Document plf,
Element plfParent,
IPerson person)
throws PortalException {
Ele... | java | static Element createOrMovePLFOwnedNode(
Element compViewNode,
Element compViewParent,
boolean createIfNotFound,
boolean createChildNodes,
Document plf,
Element plfParent,
IPerson person)
throws PortalException {
Ele... | [
"static",
"Element",
"createOrMovePLFOwnedNode",
"(",
"Element",
"compViewNode",
",",
"Element",
"compViewParent",
",",
"boolean",
"createIfNotFound",
",",
"boolean",
"createChildNodes",
",",
"Document",
"plf",
",",
"Element",
"plfParent",
",",
"IPerson",
"person",
")... | Creates or moves the plf copy of a node in the composite view and inserting it before its
next highest sibling so that if dlm is not used then the model ends up exactly like the
original non-dlm persistance version. The position set is also updated and if no ilf copy
nodes are found in the sibling list the set is clear... | [
"Creates",
"or",
"moves",
"the",
"plf",
"copy",
"of",
"a",
"node",
"in",
"the",
"composite",
"view",
"and",
"inserting",
"it",
"before",
"its",
"next",
"highest",
"sibling",
"so",
"that",
"if",
"dlm",
"is",
"not",
"used",
"then",
"the",
"model",
"ends",
... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/HandlerUtils.java#L140-L189 |
57,728 | Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/ILFBuilder.java | ILFBuilder.mergeFragment | public static void mergeFragment(
Document fragment, Document composite, IAuthorizationPrincipal ap)
throws AuthorizationException {
Element fragmentLayout = fragment.getDocumentElement();
Element fragmentRoot = (Element) fragmentLayout.getFirstChild();
Element compositeL... | java | public static void mergeFragment(
Document fragment, Document composite, IAuthorizationPrincipal ap)
throws AuthorizationException {
Element fragmentLayout = fragment.getDocumentElement();
Element fragmentRoot = (Element) fragmentLayout.getFirstChild();
Element compositeL... | [
"public",
"static",
"void",
"mergeFragment",
"(",
"Document",
"fragment",
",",
"Document",
"composite",
",",
"IAuthorizationPrincipal",
"ap",
")",
"throws",
"AuthorizationException",
"{",
"Element",
"fragmentLayout",
"=",
"fragment",
".",
"getDocumentElement",
"(",
")... | Passes the layout root of each of these documents to mergeChildren causing all children of
newLayout to be merged into compositeLayout following merging protocal for distributed layout
management.
@throws AuthorizationException | [
"Passes",
"the",
"layout",
"root",
"of",
"each",
"of",
"these",
"documents",
"to",
"mergeChildren",
"causing",
"all",
"children",
"of",
"newLayout",
"to",
"be",
"merged",
"into",
"compositeLayout",
"following",
"merging",
"protocal",
"for",
"distributed",
"layout"... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/ILFBuilder.java#L93-L101 |
57,729 | Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/ILFBuilder.java | ILFBuilder.mergeAllowed | private static boolean mergeAllowed(Element child, IAuthorizationPrincipal ap)
throws AuthorizationException {
if (!child.getTagName().equals("channel")) return true;
String channelPublishId = child.getAttribute("chanID");
return ap.canRender(channelPublishId);
} | java | private static boolean mergeAllowed(Element child, IAuthorizationPrincipal ap)
throws AuthorizationException {
if (!child.getTagName().equals("channel")) return true;
String channelPublishId = child.getAttribute("chanID");
return ap.canRender(channelPublishId);
} | [
"private",
"static",
"boolean",
"mergeAllowed",
"(",
"Element",
"child",
",",
"IAuthorizationPrincipal",
"ap",
")",
"throws",
"AuthorizationException",
"{",
"if",
"(",
"!",
"child",
".",
"getTagName",
"(",
")",
".",
"equals",
"(",
"\"channel\"",
")",
")",
"ret... | Tests to see if channels to be merged from ILF can be rendered by the end user. If not then
they are discarded from the merge.
@param child
@param person
@return
@throws AuthorizationException
@throws NumberFormatException | [
"Tests",
"to",
"see",
"if",
"channels",
"to",
"be",
"merged",
"from",
"ILF",
"can",
"be",
"rendered",
"by",
"the",
"end",
"user",
".",
"If",
"not",
"then",
"they",
"are",
"discarded",
"from",
"the",
"merge",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/ILFBuilder.java#L169-L175 |
57,730 | Jasig/uPortal | uPortal-groups/uPortal-groups-smartldap/src/main/java/org/apereo/portal/groups/smartldap/SmartLdapGroupStore.java | SmartLdapGroupStore.getPersonGroupMemberKeys | private Object[] getPersonGroupMemberKeys(IGroupMember gm) {
Object[] keys = null;
EntityIdentifier ei = gm.getUnderlyingEntityIdentifier();
IPersonAttributes attr = personAttributeDao.getPerson(ei.getKey());
if (attr != null && attr.getAttributes() != null && !attr.getAttributes().isEmp... | java | private Object[] getPersonGroupMemberKeys(IGroupMember gm) {
Object[] keys = null;
EntityIdentifier ei = gm.getUnderlyingEntityIdentifier();
IPersonAttributes attr = personAttributeDao.getPerson(ei.getKey());
if (attr != null && attr.getAttributes() != null && !attr.getAttributes().isEmp... | [
"private",
"Object",
"[",
"]",
"getPersonGroupMemberKeys",
"(",
"IGroupMember",
"gm",
")",
"{",
"Object",
"[",
"]",
"keys",
"=",
"null",
";",
"EntityIdentifier",
"ei",
"=",
"gm",
".",
"getUnderlyingEntityIdentifier",
"(",
")",
";",
"IPersonAttributes",
"attr",
... | gm should already be determined to be reference to person | [
"gm",
"should",
"already",
"be",
"determined",
"to",
"be",
"reference",
"to",
"person"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-smartldap/src/main/java/org/apereo/portal/groups/smartldap/SmartLdapGroupStore.java#L270-L281 |
57,731 | Jasig/uPortal | uPortal-groups/uPortal-groups-smartldap/src/main/java/org/apereo/portal/groups/smartldap/SmartLdapGroupStore.java | SmartLdapGroupStore.newInstance | @Override
public IEntityGroup newInstance(Class entityType) throws GroupsException {
log.warn("Unsupported method accessed: SmartLdapGroupStore.newInstance");
throw new UnsupportedOperationException(UNSUPPORTED_MESSAGE);
} | java | @Override
public IEntityGroup newInstance(Class entityType) throws GroupsException {
log.warn("Unsupported method accessed: SmartLdapGroupStore.newInstance");
throw new UnsupportedOperationException(UNSUPPORTED_MESSAGE);
} | [
"@",
"Override",
"public",
"IEntityGroup",
"newInstance",
"(",
"Class",
"entityType",
")",
"throws",
"GroupsException",
"{",
"log",
".",
"warn",
"(",
"\"Unsupported method accessed: SmartLdapGroupStore.newInstance\"",
")",
";",
"throw",
"new",
"UnsupportedOperationExceptio... | Return an UnsupportedOperationException !
@param entityType
@return
@throws GroupsException | [
"Return",
"an",
"UnsupportedOperationException",
"!"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-smartldap/src/main/java/org/apereo/portal/groups/smartldap/SmartLdapGroupStore.java#L415-L419 |
57,732 | Jasig/uPortal | uPortal-groups/uPortal-groups-smartldap/src/main/java/org/apereo/portal/groups/smartldap/SmartLdapGroupStore.java | SmartLdapGroupStore.searchForGroups | @Override
public EntityIdentifier[] searchForGroups(String query, SearchMethod method, Class leaftype)
throws GroupsException {
if (isTreeRefreshRequired()) {
refreshTree();
}
log.debug(
"Invoking searchForGroups(): query={}, method={}, leaftype=",
... | java | @Override
public EntityIdentifier[] searchForGroups(String query, SearchMethod method, Class leaftype)
throws GroupsException {
if (isTreeRefreshRequired()) {
refreshTree();
}
log.debug(
"Invoking searchForGroups(): query={}, method={}, leaftype=",
... | [
"@",
"Override",
"public",
"EntityIdentifier",
"[",
"]",
"searchForGroups",
"(",
"String",
"query",
",",
"SearchMethod",
"method",
",",
"Class",
"leaftype",
")",
"throws",
"GroupsException",
"{",
"if",
"(",
"isTreeRefreshRequired",
"(",
")",
")",
"{",
"refreshTr... | Treats case sensitive and case insensitive searching the same. | [
"Treats",
"case",
"sensitive",
"and",
"case",
"insensitive",
"searching",
"the",
"same",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-smartldap/src/main/java/org/apereo/portal/groups/smartldap/SmartLdapGroupStore.java#L422-L500 |
57,733 | Jasig/uPortal | uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/layout/dlm/remoting/UpdatePreferencesServlet.java | UpdatePreferencesServlet.removeElement | @RequestMapping(method = RequestMethod.POST, params = "action=removeElement")
public ModelAndView removeElement(HttpServletRequest request, HttpServletResponse response)
throws IOException {
IUserInstance ui = userInstanceManager.getUserInstance(request);
IPerson per = getPerson(ui, res... | java | @RequestMapping(method = RequestMethod.POST, params = "action=removeElement")
public ModelAndView removeElement(HttpServletRequest request, HttpServletResponse response)
throws IOException {
IUserInstance ui = userInstanceManager.getUserInstance(request);
IPerson per = getPerson(ui, res... | [
"@",
"RequestMapping",
"(",
"method",
"=",
"RequestMethod",
".",
"POST",
",",
"params",
"=",
"\"action=removeElement\"",
")",
"public",
"ModelAndView",
"removeElement",
"(",
"HttpServletRequest",
"request",
",",
"HttpServletResponse",
"response",
")",
"throws",
"IOExc... | Remove an element from the layout.
@param request
@param response
@return
@throws IOException | [
"Remove",
"an",
"element",
"from",
"the",
"layout",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/layout/dlm/remoting/UpdatePreferencesServlet.java#L167-L205 |
57,734 | Jasig/uPortal | uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/layout/dlm/remoting/UpdatePreferencesServlet.java | UpdatePreferencesServlet.removeByFName | @RequestMapping(method = RequestMethod.POST, params = "action=removeByFName")
public ModelAndView removeByFName(
HttpServletRequest request,
HttpServletResponse response,
@RequestParam(value = "fname") String fname)
throws IOException {
IUserInstance ui = use... | java | @RequestMapping(method = RequestMethod.POST, params = "action=removeByFName")
public ModelAndView removeByFName(
HttpServletRequest request,
HttpServletResponse response,
@RequestParam(value = "fname") String fname)
throws IOException {
IUserInstance ui = use... | [
"@",
"RequestMapping",
"(",
"method",
"=",
"RequestMethod",
".",
"POST",
",",
"params",
"=",
"\"action=removeByFName\"",
")",
"public",
"ModelAndView",
"removeByFName",
"(",
"HttpServletRequest",
"request",
",",
"HttpServletResponse",
"response",
",",
"@",
"RequestPar... | Remove the first element with the provided fname from the layout.
@param request HttpServletRequest
@param response HttpServletResponse
@param fname fname of the portlet to remove from the layout
@return json response
@throws IOException if the person cannot be retrieved | [
"Remove",
"the",
"first",
"element",
"with",
"the",
"provided",
"fname",
"from",
"the",
"layout",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/layout/dlm/remoting/UpdatePreferencesServlet.java#L216-L261 |
57,735 | Jasig/uPortal | uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/layout/dlm/remoting/UpdatePreferencesServlet.java | UpdatePreferencesServlet.addFolder | @RequestMapping(method = RequestMethod.POST, params = "action=addFolder")
public ModelAndView addFolder(
HttpServletRequest request,
HttpServletResponse response,
@RequestParam("targetId") String targetId,
@RequestParam(value = "siblingId", required = false) String si... | java | @RequestMapping(method = RequestMethod.POST, params = "action=addFolder")
public ModelAndView addFolder(
HttpServletRequest request,
HttpServletResponse response,
@RequestParam("targetId") String targetId,
@RequestParam(value = "siblingId", required = false) String si... | [
"@",
"RequestMapping",
"(",
"method",
"=",
"RequestMethod",
".",
"POST",
",",
"params",
"=",
"\"action=addFolder\"",
")",
"public",
"ModelAndView",
"addFolder",
"(",
"HttpServletRequest",
"request",
",",
"HttpServletResponse",
"response",
",",
"@",
"RequestParam",
"... | Add a new folder to the layout.
@param request
@param response
@param targetId - id of the folder node to add the new folder to. By default, the folder will
be inserted after other existing items in the node unless a siblingId is provided.
@param siblingId - if set, insert new folder prior to the node with this id, ot... | [
"Add",
"a",
"new",
"folder",
"to",
"the",
"layout",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/layout/dlm/remoting/UpdatePreferencesServlet.java#L993-L1040 |
57,736 | Jasig/uPortal | uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/layout/dlm/remoting/UpdatePreferencesServlet.java | UpdatePreferencesServlet.renameTab | @RequestMapping(method = RequestMethod.POST, params = "action=renameTab")
public ModelAndView renameTab(HttpServletRequest request, HttpServletResponse response)
throws IOException {
IUserInstance ui = userInstanceManager.getUserInstance(request);
UserPreferencesManager upm = (UserPrefe... | java | @RequestMapping(method = RequestMethod.POST, params = "action=renameTab")
public ModelAndView renameTab(HttpServletRequest request, HttpServletResponse response)
throws IOException {
IUserInstance ui = userInstanceManager.getUserInstance(request);
UserPreferencesManager upm = (UserPrefe... | [
"@",
"RequestMapping",
"(",
"method",
"=",
"RequestMethod",
".",
"POST",
",",
"params",
"=",
"\"action=renameTab\"",
")",
"public",
"ModelAndView",
"renameTab",
"(",
"HttpServletRequest",
"request",
",",
"HttpServletResponse",
"response",
")",
"throws",
"IOException",... | Rename a specified tab.
@param request
@throws IOException | [
"Rename",
"a",
"specified",
"tab",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/layout/dlm/remoting/UpdatePreferencesServlet.java#L1113-L1163 |
57,737 | Jasig/uPortal | uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/layout/dlm/remoting/UpdatePreferencesServlet.java | UpdatePreferencesServlet.setObjectAttributes | private void setObjectAttributes(
IUserLayoutNodeDescription node,
HttpServletRequest request,
Map<String, Map<String, String>> attributes) {
// Attempt to set the object attributes
for (String name : attributes.get("attributes").keySet()) {
try {
... | java | private void setObjectAttributes(
IUserLayoutNodeDescription node,
HttpServletRequest request,
Map<String, Map<String, String>> attributes) {
// Attempt to set the object attributes
for (String name : attributes.get("attributes").keySet()) {
try {
... | [
"private",
"void",
"setObjectAttributes",
"(",
"IUserLayoutNodeDescription",
"node",
",",
"HttpServletRequest",
"request",
",",
"Map",
"<",
"String",
",",
"Map",
"<",
"String",
",",
"String",
">",
">",
"attributes",
")",
"{",
"// Attempt to set the object attributes",... | Attempt to map the attribute values to the given object.
@param node
@param request
@param attributes | [
"Attempt",
"to",
"map",
"the",
"attribute",
"values",
"to",
"the",
"given",
"object",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/layout/dlm/remoting/UpdatePreferencesServlet.java#L1349-L1378 |
57,738 | Jasig/uPortal | uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/layout/dlm/remoting/UpdatePreferencesServlet.java | UpdatePreferencesServlet.isTab | protected boolean isTab(IUserLayoutManager ulm, String folderId) throws PortalException {
// we could be a bit more careful here and actually check the type
return ulm.getRootFolderId().equals(ulm.getParentId(folderId));
} | java | protected boolean isTab(IUserLayoutManager ulm, String folderId) throws PortalException {
// we could be a bit more careful here and actually check the type
return ulm.getRootFolderId().equals(ulm.getParentId(folderId));
} | [
"protected",
"boolean",
"isTab",
"(",
"IUserLayoutManager",
"ulm",
",",
"String",
"folderId",
")",
"throws",
"PortalException",
"{",
"// we could be a bit more careful here and actually check the type",
"return",
"ulm",
".",
"getRootFolderId",
"(",
")",
".",
"equals",
"("... | A folder is a tab if its parent element is the layout element
@param ulm User Layout Manager
@param folderId the folder in question
@return <code>true</code> if the folder is a tab, otherwise <code>false</code> | [
"A",
"folder",
"is",
"a",
"tab",
"if",
"its",
"parent",
"element",
"is",
"the",
"layout",
"element"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/layout/dlm/remoting/UpdatePreferencesServlet.java#L1401-L1404 |
57,739 | Jasig/uPortal | uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/layout/dlm/remoting/UpdatePreferencesServlet.java | UpdatePreferencesServlet.getMessage | protected String getMessage(String key, String defaultMessage, Locale locale) {
try {
return messageSource.getMessage(key, new Object[] {}, defaultMessage, locale);
} catch (Exception e) {
// sadly, messageSource.getMessage can throw e.g. when message is ill formatted.
... | java | protected String getMessage(String key, String defaultMessage, Locale locale) {
try {
return messageSource.getMessage(key, new Object[] {}, defaultMessage, locale);
} catch (Exception e) {
// sadly, messageSource.getMessage can throw e.g. when message is ill formatted.
... | [
"protected",
"String",
"getMessage",
"(",
"String",
"key",
",",
"String",
"defaultMessage",
",",
"Locale",
"locale",
")",
"{",
"try",
"{",
"return",
"messageSource",
".",
"getMessage",
"(",
"key",
",",
"new",
"Object",
"[",
"]",
"{",
"}",
",",
"defaultMess... | Syntactic sugar for safely resolving a no-args message from message bundle.
@param key Message bundle key
@param defaultMessage Ready-to-present message to fall back upon.
@param locale desired locale
@return Resolved interpolated message or defaultMessage. | [
"Syntactic",
"sugar",
"for",
"safely",
"resolving",
"a",
"no",
"-",
"args",
"message",
"from",
"message",
"bundle",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/layout/dlm/remoting/UpdatePreferencesServlet.java#L1424-L1432 |
57,740 | Jasig/uPortal | uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/layout/dlm/remoting/UpdatePreferencesServlet.java | UpdatePreferencesServlet.moveElementInternal | private boolean moveElementInternal(
HttpServletRequest request, String sourceId, String destinationId, String method) {
logger.debug(
"moveElementInternal invoked for sourceId={}, destinationId={}, method={}",
sourceId,
destinationId,
... | java | private boolean moveElementInternal(
HttpServletRequest request, String sourceId, String destinationId, String method) {
logger.debug(
"moveElementInternal invoked for sourceId={}, destinationId={}, method={}",
sourceId,
destinationId,
... | [
"private",
"boolean",
"moveElementInternal",
"(",
"HttpServletRequest",
"request",
",",
"String",
"sourceId",
",",
"String",
"destinationId",
",",
"String",
"method",
")",
"{",
"logger",
".",
"debug",
"(",
"\"moveElementInternal invoked for sourceId={}, destinationId={}, me... | Moves the source element.
<p>- If the destination is a tab, the new element automatically goes to the end of the first
column or in a new column. - If the destination is a folder, the element is added to the end
of the folder. - Otherwise, the element is inserted before the destination (the destination
can't be a tab ... | [
"Moves",
"the",
"source",
"element",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/layout/dlm/remoting/UpdatePreferencesServlet.java#L1504-L1577 |
57,741 | Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/statistics/BaseStatisticsReportController.java | BaseStatisticsReportController.setReportFormGroups | protected final void setReportFormGroups(final F report) {
if (!report.getGroups().isEmpty()) {
return;
}
final Set<AggregatedGroupMapping> groups = this.getGroups();
if (!groups.isEmpty()) {
report.getGroups().add(groups.iterator().next().getId());
}
... | java | protected final void setReportFormGroups(final F report) {
if (!report.getGroups().isEmpty()) {
return;
}
final Set<AggregatedGroupMapping> groups = this.getGroups();
if (!groups.isEmpty()) {
report.getGroups().add(groups.iterator().next().getId());
}
... | [
"protected",
"final",
"void",
"setReportFormGroups",
"(",
"final",
"F",
"report",
")",
"{",
"if",
"(",
"!",
"report",
".",
"getGroups",
"(",
")",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
";",
"}",
"final",
"Set",
"<",
"AggregatedGroupMapping",
">",
... | Set the groups to have selected by default if not already set | [
"Set",
"the",
"groups",
"to",
"have",
"selected",
"by",
"default",
"if",
"not",
"already",
"set"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/statistics/BaseStatisticsReportController.java#L173-L182 |
57,742 | Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/statistics/BaseStatisticsReportController.java | BaseStatisticsReportController.showFullColumnHeaderDescriptions | protected final boolean showFullColumnHeaderDescriptions(F form) {
boolean showFullHeaderDescriptions = false;
switch (form.getFormat()) {
case csv:
{
showFullHeaderDescriptions = true;
break;
}
case html:
... | java | protected final boolean showFullColumnHeaderDescriptions(F form) {
boolean showFullHeaderDescriptions = false;
switch (form.getFormat()) {
case csv:
{
showFullHeaderDescriptions = true;
break;
}
case html:
... | [
"protected",
"final",
"boolean",
"showFullColumnHeaderDescriptions",
"(",
"F",
"form",
")",
"{",
"boolean",
"showFullHeaderDescriptions",
"=",
"false",
";",
"switch",
"(",
"form",
".",
"getFormat",
"(",
")",
")",
"{",
"case",
"csv",
":",
"{",
"showFullHeaderDesc... | Returns true to indicate report format is only data table and doesn't have report graph
titles, etc. so the report columns needs to fully describe the data columns. CSV and HTML
tables require full column header descriptions.
@param form the form
@return True if report columns should have full header descriptions. | [
"Returns",
"true",
"to",
"indicate",
"report",
"format",
"is",
"only",
"data",
"table",
"and",
"doesn",
"t",
"have",
"report",
"graph",
"titles",
"etc",
".",
"so",
"the",
"report",
"columns",
"needs",
"to",
"fully",
"describe",
"the",
"data",
"columns",
".... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/statistics/BaseStatisticsReportController.java#L386-L405 |
57,743 | Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/statistics/BaseStatisticsReportController.java | BaseStatisticsReportController.extractGroupsArray | private AggregatedGroupMapping[] extractGroupsArray(Set<D> columnGroups) {
Set<AggregatedGroupMapping> groupMappings = new HashSet<AggregatedGroupMapping>();
for (D discriminator : columnGroups) {
groupMappings.add(discriminator.getAggregatedGroup());
}
return groupMappings.t... | java | private AggregatedGroupMapping[] extractGroupsArray(Set<D> columnGroups) {
Set<AggregatedGroupMapping> groupMappings = new HashSet<AggregatedGroupMapping>();
for (D discriminator : columnGroups) {
groupMappings.add(discriminator.getAggregatedGroup());
}
return groupMappings.t... | [
"private",
"AggregatedGroupMapping",
"[",
"]",
"extractGroupsArray",
"(",
"Set",
"<",
"D",
">",
"columnGroups",
")",
"{",
"Set",
"<",
"AggregatedGroupMapping",
">",
"groupMappings",
"=",
"new",
"HashSet",
"<",
"AggregatedGroupMapping",
">",
"(",
")",
";",
"for",... | use a Set to filter down to unique values. | [
"use",
"a",
"Set",
"to",
"filter",
"down",
"to",
"unique",
"values",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/statistics/BaseStatisticsReportController.java#L574-L580 |
57,744 | Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/account/PreferenceInputFactory.java | PreferenceInputFactory.createSingleTextPreference | public static Preference createSingleTextPreference(String name, String label) {
return createSingleTextPreference(
name, "attribute.displayName." + name, TextDisplay.TEXT, null);
} | java | public static Preference createSingleTextPreference(String name, String label) {
return createSingleTextPreference(
name, "attribute.displayName." + name, TextDisplay.TEXT, null);
} | [
"public",
"static",
"Preference",
"createSingleTextPreference",
"(",
"String",
"name",
",",
"String",
"label",
")",
"{",
"return",
"createSingleTextPreference",
"(",
"name",
",",
"\"attribute.displayName.\"",
"+",
"name",
",",
"TextDisplay",
".",
"TEXT",
",",
"null"... | Define a single-valued text input preferences. This method is a convenient wrapper for the
most common expected use case and assumes null values for the default value and a predictable
label.
@param name
@param label
@return | [
"Define",
"a",
"single",
"-",
"valued",
"text",
"input",
"preferences",
".",
"This",
"method",
"is",
"a",
"convenient",
"wrapper",
"for",
"the",
"most",
"common",
"expected",
"use",
"case",
"and",
"assumes",
"null",
"values",
"for",
"the",
"default",
"value"... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/account/PreferenceInputFactory.java#L45-L48 |
57,745 | Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/account/PreferenceInputFactory.java | PreferenceInputFactory.createSingleTextPreference | public static Preference createSingleTextPreference(
String name, String label, TextDisplay displayType, String defaultValue) {
SingleTextPreferenceInput input = new SingleTextPreferenceInput();
input.setDefault(defaultValue);
input.setDisplay(displayType);
Preference pref =... | java | public static Preference createSingleTextPreference(
String name, String label, TextDisplay displayType, String defaultValue) {
SingleTextPreferenceInput input = new SingleTextPreferenceInput();
input.setDefault(defaultValue);
input.setDisplay(displayType);
Preference pref =... | [
"public",
"static",
"Preference",
"createSingleTextPreference",
"(",
"String",
"name",
",",
"String",
"label",
",",
"TextDisplay",
"displayType",
",",
"String",
"defaultValue",
")",
"{",
"SingleTextPreferenceInput",
"input",
"=",
"new",
"SingleTextPreferenceInput",
"(",... | Craete a single-valued text input preference.
@param name
@param label
@param displayType
@param defaultValue
@return | [
"Craete",
"a",
"single",
"-",
"valued",
"text",
"input",
"preference",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/account/PreferenceInputFactory.java#L59-L75 |
57,746 | Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/account/PreferenceInputFactory.java | PreferenceInputFactory.createSingleChoicePreference | public static Preference createSingleChoicePreference(
String name,
String label,
SingleChoiceDisplay displayType,
List<Option> options,
String defaultValue) {
SingleChoicePreferenceInput input = new SingleChoicePreferenceInput();
input.setDefa... | java | public static Preference createSingleChoicePreference(
String name,
String label,
SingleChoiceDisplay displayType,
List<Option> options,
String defaultValue) {
SingleChoicePreferenceInput input = new SingleChoicePreferenceInput();
input.setDefa... | [
"public",
"static",
"Preference",
"createSingleChoicePreference",
"(",
"String",
"name",
",",
"String",
"label",
",",
"SingleChoiceDisplay",
"displayType",
",",
"List",
"<",
"Option",
">",
"options",
",",
"String",
"defaultValue",
")",
"{",
"SingleChoicePreferenceInpu... | Create a single-valued choice preference input.
@param name
@param label
@param displayType
@param options
@param defaultValue
@return | [
"Create",
"a",
"single",
"-",
"valued",
"choice",
"preference",
"input",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/account/PreferenceInputFactory.java#L87-L108 |
57,747 | Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/account/PreferenceInputFactory.java | PreferenceInputFactory.createMultiTextPreference | public static Preference createMultiTextPreference(
String name, String label, TextDisplay displayType, List<String> defaultValues) {
MultiTextPreferenceInput input = new MultiTextPreferenceInput();
input.getDefaults().addAll(defaultValues);
input.setDisplay(displayType);
Pr... | java | public static Preference createMultiTextPreference(
String name, String label, TextDisplay displayType, List<String> defaultValues) {
MultiTextPreferenceInput input = new MultiTextPreferenceInput();
input.getDefaults().addAll(defaultValues);
input.setDisplay(displayType);
Pr... | [
"public",
"static",
"Preference",
"createMultiTextPreference",
"(",
"String",
"name",
",",
"String",
"label",
",",
"TextDisplay",
"displayType",
",",
"List",
"<",
"String",
">",
"defaultValues",
")",
"{",
"MultiTextPreferenceInput",
"input",
"=",
"new",
"MultiTextPr... | Create a multi-valued text input preference.
@param name
@param label
@param displayType
@param defaultValues
@return | [
"Create",
"a",
"multi",
"-",
"valued",
"text",
"input",
"preference",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/account/PreferenceInputFactory.java#L119-L135 |
57,748 | Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/account/PreferenceInputFactory.java | PreferenceInputFactory.createMultiChoicePreference | public static Preference createMultiChoicePreference(
String name,
String label,
MultiChoiceDisplay displayType,
List<Option> options,
List<String> defaultValues) {
MultiChoicePreferenceInput input = new MultiChoicePreferenceInput();
input.getD... | java | public static Preference createMultiChoicePreference(
String name,
String label,
MultiChoiceDisplay displayType,
List<Option> options,
List<String> defaultValues) {
MultiChoicePreferenceInput input = new MultiChoicePreferenceInput();
input.getD... | [
"public",
"static",
"Preference",
"createMultiChoicePreference",
"(",
"String",
"name",
",",
"String",
"label",
",",
"MultiChoiceDisplay",
"displayType",
",",
"List",
"<",
"Option",
">",
"options",
",",
"List",
"<",
"String",
">",
"defaultValues",
")",
"{",
"Mul... | Create a multi-valued choice input preference.
@param name
@param label
@param displayType
@param options
@param defaultValues
@return | [
"Create",
"a",
"multi",
"-",
"valued",
"choice",
"input",
"preference",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/account/PreferenceInputFactory.java#L147-L168 |
57,749 | Jasig/uPortal | uPortal-marketplace/src/main/java/org/apereo/portal/portlet/marketplace/MarketplacePortletDefinition.java | MarketplacePortletDefinition.initRelatedPortlets | private void initRelatedPortlets() {
final Set<MarketplacePortletDefinition> allRelatedPortlets = new HashSet<>();
for (PortletCategory parentCategory :
this.portletCategoryRegistry.getParentCategories(this)) {
final Set<IPortletDefinition> portletsInCategory =
... | java | private void initRelatedPortlets() {
final Set<MarketplacePortletDefinition> allRelatedPortlets = new HashSet<>();
for (PortletCategory parentCategory :
this.portletCategoryRegistry.getParentCategories(this)) {
final Set<IPortletDefinition> portletsInCategory =
... | [
"private",
"void",
"initRelatedPortlets",
"(",
")",
"{",
"final",
"Set",
"<",
"MarketplacePortletDefinition",
">",
"allRelatedPortlets",
"=",
"new",
"HashSet",
"<>",
"(",
")",
";",
"for",
"(",
"PortletCategory",
"parentCategory",
":",
"this",
".",
"portletCategory... | Initialize related portlets. This must be called lazily so that MarketplacePortletDefinitions
instantiated as related portlets off of a MarketplacePortletDefinition do not always
instantiate their related MarketplacePortletDefinitions, ad infinitem. | [
"Initialize",
"related",
"portlets",
".",
"This",
"must",
"be",
"called",
"lazily",
"so",
"that",
"MarketplacePortletDefinitions",
"instantiated",
"as",
"related",
"portlets",
"off",
"of",
"a",
"MarketplacePortletDefinition",
"do",
"not",
"always",
"instantiate",
"the... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-marketplace/src/main/java/org/apereo/portal/portlet/marketplace/MarketplacePortletDefinition.java#L243-L263 |
57,750 | Jasig/uPortal | uPortal-marketplace/src/main/java/org/apereo/portal/portlet/marketplace/MarketplacePortletDefinition.java | MarketplacePortletDefinition.getRandomSamplingRelatedPortlets | public Set<MarketplacePortletDefinition> getRandomSamplingRelatedPortlets(final IPerson user) {
Validate.notNull(user, "Cannot filter to BROWSEable by a null user");
final IAuthorizationPrincipal principal =
AuthorizationPrincipalHelper.principalFromUser(user);
// lazy init is... | java | public Set<MarketplacePortletDefinition> getRandomSamplingRelatedPortlets(final IPerson user) {
Validate.notNull(user, "Cannot filter to BROWSEable by a null user");
final IAuthorizationPrincipal principal =
AuthorizationPrincipalHelper.principalFromUser(user);
// lazy init is... | [
"public",
"Set",
"<",
"MarketplacePortletDefinition",
">",
"getRandomSamplingRelatedPortlets",
"(",
"final",
"IPerson",
"user",
")",
"{",
"Validate",
".",
"notNull",
"(",
"user",
",",
"\"Cannot filter to BROWSEable by a null user\"",
")",
";",
"final",
"IAuthorizationPrin... | Obtain up to QUANTITY_RELATED_PORTLETS_TO_SHOW random related portlets BROWSEable by the
given user.
@return a non-null potentially empty Set of related portlets BROWSEable by the user | [
"Obtain",
"up",
"to",
"QUANTITY_RELATED_PORTLETS_TO_SHOW",
"random",
"related",
"portlets",
"BROWSEable",
"by",
"the",
"given",
"user",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-marketplace/src/main/java/org/apereo/portal/portlet/marketplace/MarketplacePortletDefinition.java#L345-L378 |
57,751 | Jasig/uPortal | uPortal-marketplace/src/main/java/org/apereo/portal/portlet/marketplace/MarketplacePortletDefinition.java | MarketplacePortletDefinition.getRenderUrl | public String getRenderUrl() {
final String alternativeMaximizedUrl = getAlternativeMaximizedLink();
if (null != alternativeMaximizedUrl) {
return alternativeMaximizedUrl;
}
final String contextPath = PortalWebUtils.currentRequestContextPath();
// TODO: stop abstra... | java | public String getRenderUrl() {
final String alternativeMaximizedUrl = getAlternativeMaximizedLink();
if (null != alternativeMaximizedUrl) {
return alternativeMaximizedUrl;
}
final String contextPath = PortalWebUtils.currentRequestContextPath();
// TODO: stop abstra... | [
"public",
"String",
"getRenderUrl",
"(",
")",
"{",
"final",
"String",
"alternativeMaximizedUrl",
"=",
"getAlternativeMaximizedLink",
"(",
")",
";",
"if",
"(",
"null",
"!=",
"alternativeMaximizedUrl",
")",
"{",
"return",
"alternativeMaximizedUrl",
";",
"}",
"final",
... | Convenience method for getting a bookmarkable URL for rendering the defined portlet,
<p>Normally this is the portal rendering of the portlet, addressed by fname, and in that case
this method will *ONLY* work when invoked in the context of a Spring-managed
HttpServletRequest available via RequestContextHolder.
<p>When... | [
"Convenience",
"method",
"for",
"getting",
"a",
"bookmarkable",
"URL",
"for",
"rendering",
"the",
"defined",
"portlet"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-marketplace/src/main/java/org/apereo/portal/portlet/marketplace/MarketplacePortletDefinition.java#L395-L407 |
57,752 | Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/PositionManager.java | PositionManager.evaluateAndApply | static void evaluateAndApply(
List<NodeInfo> order,
Element compViewParent,
Element positionSet,
IntegrationResult result)
throws PortalException {
adjustPositionSet(order, positionSet, result);
if (hasAffectOnCVP(order, compViewParent)) {
... | java | static void evaluateAndApply(
List<NodeInfo> order,
Element compViewParent,
Element positionSet,
IntegrationResult result)
throws PortalException {
adjustPositionSet(order, positionSet, result);
if (hasAffectOnCVP(order, compViewParent)) {
... | [
"static",
"void",
"evaluateAndApply",
"(",
"List",
"<",
"NodeInfo",
">",
"order",
",",
"Element",
"compViewParent",
",",
"Element",
"positionSet",
",",
"IntegrationResult",
"result",
")",
"throws",
"PortalException",
"{",
"adjustPositionSet",
"(",
"order",
",",
"p... | This method determines if applying all of the positioning rules and restrictions ended up
making changes to the compViewParent or the original position set. If changes are applicable
to the CVP then they are applied. If the position set changed then the original stored in the
PLF is updated. | [
"This",
"method",
"determines",
"if",
"applying",
"all",
"of",
"the",
"positioning",
"rules",
"and",
"restrictions",
"ended",
"up",
"making",
"changes",
"to",
"the",
"compViewParent",
"or",
"the",
"original",
"position",
"set",
".",
"If",
"changes",
"are",
"ap... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/PositionManager.java#L137-L150 |
57,753 | Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/PositionManager.java | PositionManager.adjustPositionSet | static void adjustPositionSet(
List<NodeInfo> order, Element positionSet, IntegrationResult result) {
Node nodeToMatch = positionSet.getFirstChild();
Element nodeToInsertBefore = positionSet.getOwnerDocument().createElement("INSERT_POINT");
positionSet.insertBefore(nodeToInsertBefore... | java | static void adjustPositionSet(
List<NodeInfo> order, Element positionSet, IntegrationResult result) {
Node nodeToMatch = positionSet.getFirstChild();
Element nodeToInsertBefore = positionSet.getOwnerDocument().createElement("INSERT_POINT");
positionSet.insertBefore(nodeToInsertBefore... | [
"static",
"void",
"adjustPositionSet",
"(",
"List",
"<",
"NodeInfo",
">",
"order",
",",
"Element",
"positionSet",
",",
"IntegrationResult",
"result",
")",
"{",
"Node",
"nodeToMatch",
"=",
"positionSet",
".",
"getFirstChild",
"(",
")",
";",
"Element",
"nodeToInse... | This method trims down the position set to the position directives on the node info elements
still having a position directive. Any directives that violated restrictions were removed
from the node info objects so the position set should be made to match the order of those
still having one. | [
"This",
"method",
"trims",
"down",
"the",
"position",
"set",
"to",
"the",
"position",
"directives",
"on",
"the",
"node",
"info",
"elements",
"still",
"having",
"a",
"position",
"directive",
".",
"Any",
"directives",
"that",
"violated",
"restrictions",
"were",
... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/PositionManager.java#L158-L202 |
57,754 | Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/PositionManager.java | PositionManager.hasAffectOnCVP | static boolean hasAffectOnCVP(List<NodeInfo> order, Element compViewParent) {
if (order.size() == 0) return false;
int idx = 0;
Element child = (Element) compViewParent.getFirstChild();
NodeInfo ni = order.get(idx);
if (child == null && ni != null) // most likely nodes to be pu... | java | static boolean hasAffectOnCVP(List<NodeInfo> order, Element compViewParent) {
if (order.size() == 0) return false;
int idx = 0;
Element child = (Element) compViewParent.getFirstChild();
NodeInfo ni = order.get(idx);
if (child == null && ni != null) // most likely nodes to be pu... | [
"static",
"boolean",
"hasAffectOnCVP",
"(",
"List",
"<",
"NodeInfo",
">",
"order",
",",
"Element",
"compViewParent",
")",
"{",
"if",
"(",
"order",
".",
"size",
"(",
")",
"==",
"0",
")",
"return",
"false",
";",
"int",
"idx",
"=",
"0",
";",
"Element",
... | This method compares the children by id in the order list with the order in the
compViewParent's ui visible children and returns true if the ordering differs indicating that
the positioning if needed. | [
"This",
"method",
"compares",
"the",
"children",
"by",
"id",
"in",
"the",
"order",
"list",
"with",
"the",
"order",
"in",
"the",
"compViewParent",
"s",
"ui",
"visible",
"children",
"and",
"returns",
"true",
"if",
"the",
"ordering",
"differs",
"indicating",
"t... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/PositionManager.java#L209-L235 |
57,755 | Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/PositionManager.java | PositionManager.applyToNodes | static void applyToNodes(List<NodeInfo> order, Element compViewParent) {
// first set up a bogus node to assist with inserting
Node insertPoint = compViewParent.getOwnerDocument().createElement("bogus");
Node first = compViewParent.getFirstChild();
if (first != null) compViewParent.inse... | java | static void applyToNodes(List<NodeInfo> order, Element compViewParent) {
// first set up a bogus node to assist with inserting
Node insertPoint = compViewParent.getOwnerDocument().createElement("bogus");
Node first = compViewParent.getFirstChild();
if (first != null) compViewParent.inse... | [
"static",
"void",
"applyToNodes",
"(",
"List",
"<",
"NodeInfo",
">",
"order",
",",
"Element",
"compViewParent",
")",
"{",
"// first set up a bogus node to assist with inserting",
"Node",
"insertPoint",
"=",
"compViewParent",
".",
"getOwnerDocument",
"(",
")",
".",
"cr... | This method applies the ordering specified in the passed in order list to the child nodes of
the compViewParent. Nodes specified in the list but located elsewhere are pulled in. | [
"This",
"method",
"applies",
"the",
"ordering",
"specified",
"in",
"the",
"passed",
"in",
"order",
"list",
"to",
"the",
"child",
"nodes",
"of",
"the",
"compViewParent",
".",
"Nodes",
"specified",
"in",
"the",
"list",
"but",
"located",
"elsewhere",
"are",
"pu... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/PositionManager.java#L241-L254 |
57,756 | Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/PositionManager.java | PositionManager.applyNoHopping | static void applyNoHopping(List<NodeInfo> order) {
if (isIllegalHoppingSpecified(order) == true) {
ArrayList<NodeInfo> cvpNodeInfos = new ArrayList<>();
// pull those out of the position list from the CVP
for (int i = order.size() - 1; i >= 0; i--)
if (order.... | java | static void applyNoHopping(List<NodeInfo> order) {
if (isIllegalHoppingSpecified(order) == true) {
ArrayList<NodeInfo> cvpNodeInfos = new ArrayList<>();
// pull those out of the position list from the CVP
for (int i = order.size() - 1; i >= 0; i--)
if (order.... | [
"static",
"void",
"applyNoHopping",
"(",
"List",
"<",
"NodeInfo",
">",
"order",
")",
"{",
"if",
"(",
"isIllegalHoppingSpecified",
"(",
"order",
")",
"==",
"true",
")",
"{",
"ArrayList",
"<",
"NodeInfo",
">",
"cvpNodeInfos",
"=",
"new",
"ArrayList",
"<>",
"... | This method is responsible for preventing nodes with identical precedence in the same parent
from hopping over each other so that a layout fragment can lock two tabs that are next to
each other and they can only be separated by tabs with higher precedence.
<p>If this situation is detected then the positioning of all n... | [
"This",
"method",
"is",
"responsible",
"for",
"preventing",
"nodes",
"with",
"identical",
"precedence",
"in",
"the",
"same",
"parent",
"from",
"hopping",
"over",
"each",
"other",
"so",
"that",
"a",
"layout",
"fragment",
"can",
"lock",
"two",
"tabs",
"that",
... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/PositionManager.java#L285-L301 |
57,757 | Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/PositionManager.java | PositionManager.isIllegalHoppingSpecified | static boolean isIllegalHoppingSpecified(List<NodeInfo> order) {
for (int i = 0; i < order.size(); i++) {
NodeInfo ni = (NodeInfo) order.get(i);
// look for move restricted nodes
if (!ni.getNode().getAttribute(Constants.ATT_MOVE_ALLOWED).equals("false")) continue;
... | java | static boolean isIllegalHoppingSpecified(List<NodeInfo> order) {
for (int i = 0; i < order.size(); i++) {
NodeInfo ni = (NodeInfo) order.get(i);
// look for move restricted nodes
if (!ni.getNode().getAttribute(Constants.ATT_MOVE_ALLOWED).equals("false")) continue;
... | [
"static",
"boolean",
"isIllegalHoppingSpecified",
"(",
"List",
"<",
"NodeInfo",
">",
"order",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"order",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"NodeInfo",
"ni",
"=",
"(",
"NodeInfo... | This method determines if any illegal hopping is being specified. To determine if the
positioning is specifying an ordering that will result in hopping I need to determine for
each node n in the list if any of the nodes to be positioned to its right currently lie to
its left in the CVP and have moveAllowed="false" and ... | [
"This",
"method",
"determines",
"if",
"any",
"illegal",
"hopping",
"is",
"being",
"specified",
".",
"To",
"determine",
"if",
"the",
"positioning",
"is",
"specifying",
"an",
"ordering",
"that",
"will",
"result",
"in",
"hopping",
"I",
"need",
"to",
"determine",
... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/PositionManager.java#L311-L350 |
57,758 | Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/PositionManager.java | PositionManager.applyOrdering | static void applyOrdering(
List<NodeInfo> order,
Element compViewParent,
Element positionSet,
NodeInfoTracker tracker) {
// first pull out all visible channel or visible folder children and
// put their id's in a list of available children and record thei... | java | static void applyOrdering(
List<NodeInfo> order,
Element compViewParent,
Element positionSet,
NodeInfoTracker tracker) {
// first pull out all visible channel or visible folder children and
// put their id's in a list of available children and record thei... | [
"static",
"void",
"applyOrdering",
"(",
"List",
"<",
"NodeInfo",
">",
"order",
",",
"Element",
"compViewParent",
",",
"Element",
"positionSet",
",",
"NodeInfoTracker",
"tracker",
")",
"{",
"// first pull out all visible channel or visible folder children and",
"// put their... | This method assembles in the passed in order object a list of NodeInfo objects ordered first
by those specified in the position set and whose nodes still exist in the composite view and
then by any remaining children in the compViewParent. | [
"This",
"method",
"assembles",
"in",
"the",
"passed",
"in",
"order",
"object",
"a",
"list",
"of",
"NodeInfo",
"objects",
"ordered",
"first",
"by",
"those",
"specified",
"in",
"the",
"position",
"set",
"and",
"whose",
"nodes",
"still",
"exist",
"in",
"the",
... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/PositionManager.java#L517-L594 |
57,759 | Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/PositionManager.java | PositionManager.updatePositionSet | public static void updatePositionSet(Element compViewParent, Element plfParent, IPerson person)
throws PortalException {
if (LOG.isDebugEnabled()) LOG.debug("Updating Position Set");
if (compViewParent.getChildNodes().getLength() == 0) {
// no nodes to position. if set exists re... | java | public static void updatePositionSet(Element compViewParent, Element plfParent, IPerson person)
throws PortalException {
if (LOG.isDebugEnabled()) LOG.debug("Updating Position Set");
if (compViewParent.getChildNodes().getLength() == 0) {
// no nodes to position. if set exists re... | [
"public",
"static",
"void",
"updatePositionSet",
"(",
"Element",
"compViewParent",
",",
"Element",
"plfParent",
",",
"IPerson",
"person",
")",
"throws",
"PortalException",
"{",
"if",
"(",
"LOG",
".",
"isDebugEnabled",
"(",
")",
")",
"LOG",
".",
"debug",
"(",
... | This method updates the positions recorded in a position set to reflect the ids of the nodes
in the composite view of the layout. Any position nodes already in existence are reused to
reduce database interaction needed to generate a new ID attribute. If any are left over after
updating those position elements are remov... | [
"This",
"method",
"updates",
"the",
"positions",
"recorded",
"in",
"a",
"position",
"set",
"to",
"reflect",
"the",
"ids",
"of",
"the",
"nodes",
"in",
"the",
"composite",
"view",
"of",
"the",
"layout",
".",
"Any",
"position",
"nodes",
"already",
"in",
"exis... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/PositionManager.java#L604-L650 |
57,760 | Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/PositionManager.java | PositionManager.getPositionSet | private static Element getPositionSet(Element plfParent, IPerson person, boolean create)
throws PortalException {
Node child = plfParent.getFirstChild();
while (child != null) {
if (child.getNodeName().equals(Constants.ELM_POSITION_SET)) return (Element) child;
child... | java | private static Element getPositionSet(Element plfParent, IPerson person, boolean create)
throws PortalException {
Node child = plfParent.getFirstChild();
while (child != null) {
if (child.getNodeName().equals(Constants.ELM_POSITION_SET)) return (Element) child;
child... | [
"private",
"static",
"Element",
"getPositionSet",
"(",
"Element",
"plfParent",
",",
"IPerson",
"person",
",",
"boolean",
"create",
")",
"throws",
"PortalException",
"{",
"Node",
"child",
"=",
"plfParent",
".",
"getFirstChild",
"(",
")",
";",
"while",
"(",
"chi... | This method locates the position set element in the child list of the passed in plfParent or
if not found it will create one automatically and return it if the passed in create flag is
true. | [
"This",
"method",
"locates",
"the",
"position",
"set",
"element",
"in",
"the",
"child",
"list",
"of",
"the",
"passed",
"in",
"plfParent",
"or",
"if",
"not",
"found",
"it",
"will",
"create",
"one",
"automatically",
"and",
"return",
"it",
"if",
"the",
"passe... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/PositionManager.java#L657-L685 |
57,761 | Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/PositionManager.java | PositionManager.createAndAppendPosition | private static Element createAndAppendPosition(
String elementID, Element positions, IPerson person) throws PortalException {
if (LOG.isDebugEnabled()) LOG.debug("Adding Position Set entry " + elementID + ".");
String ID = null;
try {
ID = getDLS().getNextStructDirectiv... | java | private static Element createAndAppendPosition(
String elementID, Element positions, IPerson person) throws PortalException {
if (LOG.isDebugEnabled()) LOG.debug("Adding Position Set entry " + elementID + ".");
String ID = null;
try {
ID = getDLS().getNextStructDirectiv... | [
"private",
"static",
"Element",
"createAndAppendPosition",
"(",
"String",
"elementID",
",",
"Element",
"positions",
",",
"IPerson",
"person",
")",
"throws",
"PortalException",
"{",
"if",
"(",
"LOG",
".",
"isDebugEnabled",
"(",
")",
")",
"LOG",
".",
"debug",
"(... | Create, append to the passed in position set, and return a position element that references
the passed in elementID. | [
"Create",
"append",
"to",
"the",
"passed",
"in",
"position",
"set",
"and",
"return",
"a",
"position",
"element",
"that",
"references",
"the",
"passed",
"in",
"elementID",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/PositionManager.java#L691-L714 |
57,762 | Jasig/uPortal | uPortal-tools/src/main/java/org/apereo/portal/shell/PortalShellBuildHelperImpl.java | PortalShellBuildHelperImpl.updateScript | private void updateScript(
String target, String databaseQualifier, String outputFile, boolean runIt) {
final ISchemaExport schemaExportBean = this.getSchemaExport(databaseQualifier);
if (schemaExportBean == null) {
throw new RuntimeException(
target + " could... | java | private void updateScript(
String target, String databaseQualifier, String outputFile, boolean runIt) {
final ISchemaExport schemaExportBean = this.getSchemaExport(databaseQualifier);
if (schemaExportBean == null) {
throw new RuntimeException(
target + " could... | [
"private",
"void",
"updateScript",
"(",
"String",
"target",
",",
"String",
"databaseQualifier",
",",
"String",
"outputFile",
",",
"boolean",
"runIt",
")",
"{",
"final",
"ISchemaExport",
"schemaExportBean",
"=",
"this",
".",
"getSchemaExport",
"(",
"databaseQualifier... | This runs a database update or just generates the script
@param target the database to target
@param databaseQualifier The Spring database qualifier
@param outputFile The output file to utilize to generate the scripts
@param runIt Do you want to run it, or just generate the script? | [
"This",
"runs",
"a",
"database",
"update",
"or",
"just",
"generates",
"the",
"script"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-tools/src/main/java/org/apereo/portal/shell/PortalShellBuildHelperImpl.java#L189-L208 |
57,763 | Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/account/EmailPasswordResetNotificationImpl.java | EmailPasswordResetNotificationImpl.formatBody | private String formatBody(URL resetUrl, ILocalAccountPerson account, Locale locale) {
final STGroup group = new STGroupDir(templateDir, '$', '$');
final ST template = group.getInstanceOf(templateName);
String name = findDisplayNameFromLocalAccountPerson(account);
template.add("displayNa... | java | private String formatBody(URL resetUrl, ILocalAccountPerson account, Locale locale) {
final STGroup group = new STGroupDir(templateDir, '$', '$');
final ST template = group.getInstanceOf(templateName);
String name = findDisplayNameFromLocalAccountPerson(account);
template.add("displayNa... | [
"private",
"String",
"formatBody",
"(",
"URL",
"resetUrl",
",",
"ILocalAccountPerson",
"account",
",",
"Locale",
"locale",
")",
"{",
"final",
"STGroup",
"group",
"=",
"new",
"STGroupDir",
"(",
"templateDir",
",",
"'",
"'",
",",
"'",
"'",
")",
";",
"final",... | Get the body content of the email.
@param resetUrl the password reset URL
@param account the user account that has had its password reset
@param locale the locale of the user who reset the password
@return The message body as a string. | [
"Get",
"the",
"body",
"content",
"of",
"the",
"email",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/account/EmailPasswordResetNotificationImpl.java#L119-L128 |
57,764 | Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/account/EmailPasswordResetNotificationImpl.java | EmailPasswordResetNotificationImpl.findDisplayNameFromLocalAccountPerson | protected String findDisplayNameFromLocalAccountPerson(ILocalAccountPerson person) {
Object name = person.getAttributeValue(ILocalAccountPerson.ATTR_DISPLAY_NAME);
if ((name instanceof String) && !StringUtils.isEmpty((String) name)) {
return (String) name;
}
// if display na... | java | protected String findDisplayNameFromLocalAccountPerson(ILocalAccountPerson person) {
Object name = person.getAttributeValue(ILocalAccountPerson.ATTR_DISPLAY_NAME);
if ((name instanceof String) && !StringUtils.isEmpty((String) name)) {
return (String) name;
}
// if display na... | [
"protected",
"String",
"findDisplayNameFromLocalAccountPerson",
"(",
"ILocalAccountPerson",
"person",
")",
"{",
"Object",
"name",
"=",
"person",
".",
"getAttributeValue",
"(",
"ILocalAccountPerson",
".",
"ATTR_DISPLAY_NAME",
")",
";",
"if",
"(",
"(",
"name",
"instance... | Determine the name to use in the password reset email that identifies the users whose
password has been reset.
@param person the account that has had its password reset
@return the account holders name | [
"Determine",
"the",
"name",
"to",
"use",
"in",
"the",
"password",
"reset",
"email",
"that",
"identifies",
"the",
"users",
"whose",
"password",
"has",
"been",
"reset",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/account/EmailPasswordResetNotificationImpl.java#L137-L145 |
57,765 | Jasig/uPortal | uPortal-events/src/main/java/org/apereo/portal/events/aggr/PortalEventDimensionPopulatorImpl.java | PortalEventDimensionPopulatorImpl.doPopulateTimeDimensions | final void doPopulateTimeDimensions() {
final List<TimeDimension> timeDimensions = this.timeDimensionDao.getTimeDimensions();
if (timeDimensions.isEmpty()) {
logger.info("No TimeDimensions exist, creating them");
} else if (timeDimensions.size() != (24 * 60)) {
this.logge... | java | final void doPopulateTimeDimensions() {
final List<TimeDimension> timeDimensions = this.timeDimensionDao.getTimeDimensions();
if (timeDimensions.isEmpty()) {
logger.info("No TimeDimensions exist, creating them");
} else if (timeDimensions.size() != (24 * 60)) {
this.logge... | [
"final",
"void",
"doPopulateTimeDimensions",
"(",
")",
"{",
"final",
"List",
"<",
"TimeDimension",
">",
"timeDimensions",
"=",
"this",
".",
"timeDimensionDao",
".",
"getTimeDimensions",
"(",
")",
";",
"if",
"(",
"timeDimensions",
".",
"isEmpty",
"(",
")",
")",... | Populate the time dimensions | [
"Populate",
"the",
"time",
"dimensions"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-events/src/main/java/org/apereo/portal/events/aggr/PortalEventDimensionPopulatorImpl.java#L139-L186 |
57,766 | Jasig/uPortal | uPortal-events/src/main/java/org/apereo/portal/events/aggr/PortalEventDimensionPopulatorImpl.java | PortalEventDimensionPopulatorImpl.createDateDimension | protected void createDateDimension(
List<QuarterDetail> quartersDetails,
List<AcademicTermDetail> academicTermDetails,
DateMidnight date) {
final QuarterDetail quarterDetail =
EventDateTimeUtils.findDateRangeSorted(date, quartersDetails);
final Academ... | java | protected void createDateDimension(
List<QuarterDetail> quartersDetails,
List<AcademicTermDetail> academicTermDetails,
DateMidnight date) {
final QuarterDetail quarterDetail =
EventDateTimeUtils.findDateRangeSorted(date, quartersDetails);
final Academ... | [
"protected",
"void",
"createDateDimension",
"(",
"List",
"<",
"QuarterDetail",
">",
"quartersDetails",
",",
"List",
"<",
"AcademicTermDetail",
">",
"academicTermDetails",
",",
"DateMidnight",
"date",
")",
"{",
"final",
"QuarterDetail",
"quarterDetail",
"=",
"EventDate... | Creates a date dimension, handling the quarter and term lookup logic | [
"Creates",
"a",
"date",
"dimension",
"handling",
"the",
"quarter",
"and",
"term",
"lookup",
"logic"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-events/src/main/java/org/apereo/portal/events/aggr/PortalEventDimensionPopulatorImpl.java#L288-L301 |
57,767 | Jasig/uPortal | uPortal-rendering/src/main/java/org/apereo/portal/portlet/PortletUtils.java | PortletUtils.getStringFromPortletUrl | public static String getStringFromPortletUrl(
PortletUrl portletUrl, HttpServletRequest request) {
if (portletUrl == null) {
return null;
}
// Default urlType
UrlType urlType = UrlType.RENDER;
final PortletUrlType type = portletUrl.getType();
switc... | java | public static String getStringFromPortletUrl(
PortletUrl portletUrl, HttpServletRequest request) {
if (portletUrl == null) {
return null;
}
// Default urlType
UrlType urlType = UrlType.RENDER;
final PortletUrlType type = portletUrl.getType();
switc... | [
"public",
"static",
"String",
"getStringFromPortletUrl",
"(",
"PortletUrl",
"portletUrl",
",",
"HttpServletRequest",
"request",
")",
"{",
"if",
"(",
"portletUrl",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"// Default urlType",
"UrlType",
"urlType",
"=",
... | A static EL function that is defined in portletUrl.tld Takes a portletUrl object and coverts
it into an actual Url Example is in search, returns a marketplace entry Url
@param portletUrl
@param request
@return the Url represented by portletUrl | [
"A",
"static",
"EL",
"function",
"that",
"is",
"defined",
"in",
"portletUrl",
".",
"tld",
"Takes",
"a",
"portletUrl",
"object",
"and",
"coverts",
"it",
"into",
"an",
"actual",
"Url",
"Example",
"is",
"in",
"search",
"returns",
"a",
"marketplace",
"entry",
... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-rendering/src/main/java/org/apereo/portal/portlet/PortletUtils.java#L130-L173 |
57,768 | Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/portletadmin/PortletDefinitionForm.java | PortletDefinitionForm.setChannelPublishingDefinition | public void setChannelPublishingDefinition(PortletPublishingDefinition cpd) {
// Set appName/portletName if a descriptor is present. If a framework
// portlet, the applicationId is /uPortal.
if (cpd.getPortletDescriptor() != null) {
final PortletDescriptor pDesc = cpd.getPortletDes... | java | public void setChannelPublishingDefinition(PortletPublishingDefinition cpd) {
// Set appName/portletName if a descriptor is present. If a framework
// portlet, the applicationId is /uPortal.
if (cpd.getPortletDescriptor() != null) {
final PortletDescriptor pDesc = cpd.getPortletDes... | [
"public",
"void",
"setChannelPublishingDefinition",
"(",
"PortletPublishingDefinition",
"cpd",
")",
"{",
"// Set appName/portletName if a descriptor is present. If a framework",
"// portlet, the applicationId is /uPortal.",
"if",
"(",
"cpd",
".",
"getPortletDescriptor",
"(",
")",
... | Sets the Java class name and parameter defaults based on the PortletPublishingDefinition. | [
"Sets",
"the",
"Java",
"class",
"name",
"and",
"parameter",
"defaults",
"based",
"on",
"the",
"PortletPublishingDefinition",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/portletadmin/PortletDefinitionForm.java#L201-L277 |
57,769 | Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/portletadmin/PortletDefinitionForm.java | PortletDefinitionForm.initPermissionsForPrincipal | private void initPermissionsForPrincipal(JsonEntityBean principal) {
permissions.add(
principal.getTypeAndIdHash()
+ "_"
+ PortletAdministrationHelper.PortletPermissionsOnForm.BROWSE
.getActivity());
permissi... | java | private void initPermissionsForPrincipal(JsonEntityBean principal) {
permissions.add(
principal.getTypeAndIdHash()
+ "_"
+ PortletAdministrationHelper.PortletPermissionsOnForm.BROWSE
.getActivity());
permissi... | [
"private",
"void",
"initPermissionsForPrincipal",
"(",
"JsonEntityBean",
"principal",
")",
"{",
"permissions",
".",
"add",
"(",
"principal",
".",
"getTypeAndIdHash",
"(",
")",
"+",
"\"_\"",
"+",
"PortletAdministrationHelper",
".",
"PortletPermissionsOnForm",
".",
"BRO... | Sets the default collection of permissions for newly-added principals. They are BROWSE and
SUBSCRIBE.
@since 5.0 | [
"Sets",
"the",
"default",
"collection",
"of",
"permissions",
"for",
"newly",
"-",
"added",
"principals",
".",
"They",
"are",
"BROWSE",
"and",
"SUBSCRIBE",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/portletadmin/PortletDefinitionForm.java#L506-L517 |
57,770 | Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/portletadmin/PortletDefinitionForm.java | PortletDefinitionForm.setExpirationDateString | public void setExpirationDateString(String date) throws ParseException {
if (StringUtils.isBlank(date)) {
expirationDate = null;
return;
}
expirationDate = dateFormat.parse(date);
} | java | public void setExpirationDateString(String date) throws ParseException {
if (StringUtils.isBlank(date)) {
expirationDate = null;
return;
}
expirationDate = dateFormat.parse(date);
} | [
"public",
"void",
"setExpirationDateString",
"(",
"String",
"date",
")",
"throws",
"ParseException",
"{",
"if",
"(",
"StringUtils",
".",
"isBlank",
"(",
"date",
")",
")",
"{",
"expirationDate",
"=",
"null",
";",
"return",
";",
"}",
"expirationDate",
"=",
"da... | Set the expiration date as a string.
@param date the date string
@throws ParseException if the string cannot be parsed | [
"Set",
"the",
"expiration",
"date",
"as",
"a",
"string",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/portletadmin/PortletDefinitionForm.java#L658-L665 |
57,771 | Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/portletadmin/PortletDefinitionForm.java | PortletDefinitionForm.setPublishDateString | public void setPublishDateString(String date) throws ParseException {
if (StringUtils.isBlank(date)) {
publishDate = null;
return;
}
publishDate = dateFormat.parse(date);
} | java | public void setPublishDateString(String date) throws ParseException {
if (StringUtils.isBlank(date)) {
publishDate = null;
return;
}
publishDate = dateFormat.parse(date);
} | [
"public",
"void",
"setPublishDateString",
"(",
"String",
"date",
")",
"throws",
"ParseException",
"{",
"if",
"(",
"StringUtils",
".",
"isBlank",
"(",
"date",
")",
")",
"{",
"publishDate",
"=",
"null",
";",
"return",
";",
"}",
"publishDate",
"=",
"dateFormat"... | Set the publish date as a string. This is just a webflow workaround.
@param date the date string
@throws ParseException if the date cannot be parsed | [
"Set",
"the",
"publish",
"date",
"as",
"a",
"string",
".",
"This",
"is",
"just",
"a",
"webflow",
"workaround",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/portletadmin/PortletDefinitionForm.java#L701-L708 |
57,772 | Jasig/uPortal | uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/EntityGroupImpl.java | EntityGroupImpl.setServiceName | public void setServiceName(Name newServiceName) throws GroupsException {
try {
getCompositeEntityIdentifier().setServiceName(newServiceName);
} catch (javax.naming.InvalidNameException ine) {
throw new GroupsException("Problem setting service name", ine);
}
} | java | public void setServiceName(Name newServiceName) throws GroupsException {
try {
getCompositeEntityIdentifier().setServiceName(newServiceName);
} catch (javax.naming.InvalidNameException ine) {
throw new GroupsException("Problem setting service name", ine);
}
} | [
"public",
"void",
"setServiceName",
"(",
"Name",
"newServiceName",
")",
"throws",
"GroupsException",
"{",
"try",
"{",
"getCompositeEntityIdentifier",
"(",
")",
".",
"setServiceName",
"(",
"newServiceName",
")",
";",
"}",
"catch",
"(",
"javax",
".",
"naming",
"."... | Sets the service Name of the group service of origin. | [
"Sets",
"the",
"service",
"Name",
"of",
"the",
"group",
"service",
"of",
"origin",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/EntityGroupImpl.java#L498-L504 |
57,773 | Jasig/uPortal | uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/EntityGroupImpl.java | EntityGroupImpl.updateMembers | @Override
public void updateMembers() throws GroupsException {
// Track objects to invalidate
Set<IGroupMember> invalidate = new HashSet<>();
invalidate.addAll(getAddedMembers().values());
invalidate.addAll(getRemovedMembers().values());
getLocalGroupService().updateGroupMe... | java | @Override
public void updateMembers() throws GroupsException {
// Track objects to invalidate
Set<IGroupMember> invalidate = new HashSet<>();
invalidate.addAll(getAddedMembers().values());
invalidate.addAll(getRemovedMembers().values());
getLocalGroupService().updateGroupMe... | [
"@",
"Override",
"public",
"void",
"updateMembers",
"(",
")",
"throws",
"GroupsException",
"{",
"// Track objects to invalidate",
"Set",
"<",
"IGroupMember",
">",
"invalidate",
"=",
"new",
"HashSet",
"<>",
"(",
")",
";",
"invalidate",
".",
"addAll",
"(",
"getAdd... | Delegate to the factory. | [
"Delegate",
"to",
"the",
"factory",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/EntityGroupImpl.java#L521-L534 |
57,774 | Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/xml/stream/XMLStreamConstantsUtils.java | XMLStreamConstantsUtils.getEventName | public static String getEventName(int eventId) {
switch (eventId) {
case XMLStreamConstants.START_ELEMENT:
return "StartElementEvent";
case XMLStreamConstants.END_ELEMENT:
return "EndElementEvent";
case XMLStreamConstants.PROCESSING_INSTRUCTION... | java | public static String getEventName(int eventId) {
switch (eventId) {
case XMLStreamConstants.START_ELEMENT:
return "StartElementEvent";
case XMLStreamConstants.END_ELEMENT:
return "EndElementEvent";
case XMLStreamConstants.PROCESSING_INSTRUCTION... | [
"public",
"static",
"String",
"getEventName",
"(",
"int",
"eventId",
")",
"{",
"switch",
"(",
"eventId",
")",
"{",
"case",
"XMLStreamConstants",
".",
"START_ELEMENT",
":",
"return",
"\"StartElementEvent\"",
";",
"case",
"XMLStreamConstants",
".",
"END_ELEMENT",
":... | Get the human readable event name for the numeric event id | [
"Get",
"the",
"human",
"readable",
"event",
"name",
"for",
"the",
"numeric",
"event",
"id"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/xml/stream/XMLStreamConstantsUtils.java#L22-L48 |
57,775 | Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/providers/GroupMembershipEvaluatorFactory.java | GroupMembershipEvaluatorFactory.getAttributeEvaluator | @Override
public Evaluator getAttributeEvaluator(String name, String mode, String value) {
return new GroupMembershipEvaluator(mode, name);
} | java | @Override
public Evaluator getAttributeEvaluator(String name, String mode, String value) {
return new GroupMembershipEvaluator(mode, name);
} | [
"@",
"Override",
"public",
"Evaluator",
"getAttributeEvaluator",
"(",
"String",
"name",
",",
"String",
"mode",
",",
"String",
"value",
")",
"{",
"return",
"new",
"GroupMembershipEvaluator",
"(",
"mode",
",",
"name",
")",
";",
"}"
] | Returns an instance of an evaluator specific to this factory and the passed in values. Name
should be a well known group name. Case is important. The mode should be "memberOf" for now.
Other modes may be added in the future like, "deepMemberOf". | [
"Returns",
"an",
"instance",
"of",
"an",
"evaluator",
"specific",
"to",
"this",
"factory",
"and",
"the",
"passed",
"in",
"values",
".",
"Name",
"should",
"be",
"a",
"well",
"known",
"group",
"name",
".",
"Case",
"is",
"important",
".",
"The",
"mode",
"sh... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/providers/GroupMembershipEvaluatorFactory.java#L56-L59 |
57,776 | Jasig/uPortal | uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/lookup/PersonLookupHelperImpl.java | PersonLookupHelperImpl.getVisiblePersons | private List<IPersonAttributes> getVisiblePersons(
final IAuthorizationPrincipal principal,
final Set<String> permittedAttributes,
List<IPersonAttributes> peopleList) {
List<Future<IPersonAttributes>> futures = new ArrayList<>();
List<IPersonAttributes> list = new Arr... | java | private List<IPersonAttributes> getVisiblePersons(
final IAuthorizationPrincipal principal,
final Set<String> permittedAttributes,
List<IPersonAttributes> peopleList) {
List<Future<IPersonAttributes>> futures = new ArrayList<>();
List<IPersonAttributes> list = new Arr... | [
"private",
"List",
"<",
"IPersonAttributes",
">",
"getVisiblePersons",
"(",
"final",
"IAuthorizationPrincipal",
"principal",
",",
"final",
"Set",
"<",
"String",
">",
"permittedAttributes",
",",
"List",
"<",
"IPersonAttributes",
">",
"peopleList",
")",
"{",
"List",
... | Returns a list of the personAttributes that this principal has permission to view. This
implementation does the check on the list items in parallel because personDirectory is
consulted for non-admin principals to get the person attributes which is really slow if done
on N entries in parallel because personDirectory oft... | [
"Returns",
"a",
"list",
"of",
"the",
"personAttributes",
"that",
"this",
"principal",
"has",
"permission",
"to",
"view",
".",
"This",
"implementation",
"does",
"the",
"check",
"on",
"the",
"list",
"items",
"in",
"parallel",
"because",
"personDirectory",
"is",
... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/lookup/PersonLookupHelperImpl.java#L285-L325 |
57,777 | Jasig/uPortal | uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/lookup/PersonLookupHelperImpl.java | PersonLookupHelperImpl.allListItemsHaveDisplayName | private boolean allListItemsHaveDisplayName(List<IPersonAttributes> people) {
for (IPersonAttributes person : people) {
if (person.getAttributeValue("displayName") == null) {
return false;
}
}
return true;
} | java | private boolean allListItemsHaveDisplayName(List<IPersonAttributes> people) {
for (IPersonAttributes person : people) {
if (person.getAttributeValue("displayName") == null) {
return false;
}
}
return true;
} | [
"private",
"boolean",
"allListItemsHaveDisplayName",
"(",
"List",
"<",
"IPersonAttributes",
">",
"people",
")",
"{",
"for",
"(",
"IPersonAttributes",
"person",
":",
"people",
")",
"{",
"if",
"(",
"person",
".",
"getAttributeValue",
"(",
"\"displayName\"",
")",
"... | Utility class to determine if all items in the list of people have a displayName.
@param people list of personAttributes
@return true if all list items have an attribute displayName | [
"Utility",
"class",
"to",
"determine",
"if",
"all",
"items",
"in",
"the",
"list",
"of",
"people",
"have",
"a",
"displayName",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/lookup/PersonLookupHelperImpl.java#L369-L376 |
57,778 | Jasig/uPortal | uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/lookup/PersonLookupHelperImpl.java | PersonLookupHelperImpl.getPrincipalForUser | protected IAuthorizationPrincipal getPrincipalForUser(final IPerson person) {
final EntityIdentifier ei = person.getEntityIdentifier();
return AuthorizationServiceFacade.instance().newPrincipal(ei.getKey(), ei.getType());
} | java | protected IAuthorizationPrincipal getPrincipalForUser(final IPerson person) {
final EntityIdentifier ei = person.getEntityIdentifier();
return AuthorizationServiceFacade.instance().newPrincipal(ei.getKey(), ei.getType());
} | [
"protected",
"IAuthorizationPrincipal",
"getPrincipalForUser",
"(",
"final",
"IPerson",
"person",
")",
"{",
"final",
"EntityIdentifier",
"ei",
"=",
"person",
".",
"getEntityIdentifier",
"(",
")",
";",
"return",
"AuthorizationServiceFacade",
".",
"instance",
"(",
")",
... | Get the authoriztaion principal matching the supplied IPerson.
@param person
@return | [
"Get",
"the",
"authoriztaion",
"principal",
"matching",
"the",
"supplied",
"IPerson",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/lookup/PersonLookupHelperImpl.java#L411-L414 |
57,779 | Jasig/uPortal | uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/lookup/PersonLookupHelperImpl.java | PersonLookupHelperImpl.getPermittedAttributes | protected Set<String> getPermittedAttributes(final IAuthorizationPrincipal principal) {
final Set<String> attributeNames = personAttributeDao.getPossibleUserAttributeNames();
return getPermittedAttributes(principal, attributeNames);
} | java | protected Set<String> getPermittedAttributes(final IAuthorizationPrincipal principal) {
final Set<String> attributeNames = personAttributeDao.getPossibleUserAttributeNames();
return getPermittedAttributes(principal, attributeNames);
} | [
"protected",
"Set",
"<",
"String",
">",
"getPermittedAttributes",
"(",
"final",
"IAuthorizationPrincipal",
"principal",
")",
"{",
"final",
"Set",
"<",
"String",
">",
"attributeNames",
"=",
"personAttributeDao",
".",
"getPossibleUserAttributeNames",
"(",
")",
";",
"r... | Get the set of all user attribute names defined in the portal for which the specified
principal has the attribute viewing permission.
@param principal
@return | [
"Get",
"the",
"set",
"of",
"all",
"user",
"attribute",
"names",
"defined",
"in",
"the",
"portal",
"for",
"which",
"the",
"specified",
"principal",
"has",
"the",
"attribute",
"viewing",
"permission",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/lookup/PersonLookupHelperImpl.java#L423-L426 |
57,780 | Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/RDBMDistributedLayoutStore.java | RDBMDistributedLayoutStore.getFragmentLayoutCopies | @Override
public Map<String, Document> getFragmentLayoutCopies() {
// since this is only visible in fragment list in administrative portlet, use default portal
// locale
final Locale defaultLocale = localeManagerFactory.getPortalLocales().get(0);
final Map<String, Document> layouts ... | java | @Override
public Map<String, Document> getFragmentLayoutCopies() {
// since this is only visible in fragment list in administrative portlet, use default portal
// locale
final Locale defaultLocale = localeManagerFactory.getPortalLocales().get(0);
final Map<String, Document> layouts ... | [
"@",
"Override",
"public",
"Map",
"<",
"String",
",",
"Document",
">",
"getFragmentLayoutCopies",
"(",
")",
"{",
"// since this is only visible in fragment list in administrative portlet, use default portal",
"// locale",
"final",
"Locale",
"defaultLocale",
"=",
"localeManagerF... | Method for acquiring copies of fragment layouts to assist in debugging. No infrastructure
code calls this but channels designed to expose the structure of the cached fragments use
this to obtain copies.
@return Map | [
"Method",
"for",
"acquiring",
"copies",
"of",
"fragment",
"layouts",
"to",
"assist",
"in",
"debugging",
".",
"No",
"infrastructure",
"code",
"calls",
"this",
"but",
"channels",
"designed",
"to",
"expose",
"the",
"structure",
"of",
"the",
"cached",
"fragments",
... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/RDBMDistributedLayoutStore.java#L189-L213 |
57,781 | Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/RDBMDistributedLayoutStore.java | RDBMDistributedLayoutStore.getUserLayout | @Override
public DistributedUserLayout getUserLayout(IPerson person, IUserProfile profile) {
final DistributedUserLayout layout = this._getUserLayout(person, profile);
return layout;
} | java | @Override
public DistributedUserLayout getUserLayout(IPerson person, IUserProfile profile) {
final DistributedUserLayout layout = this._getUserLayout(person, profile);
return layout;
} | [
"@",
"Override",
"public",
"DistributedUserLayout",
"getUserLayout",
"(",
"IPerson",
"person",
",",
"IUserProfile",
"profile",
")",
"{",
"final",
"DistributedUserLayout",
"layout",
"=",
"this",
".",
"_getUserLayout",
"(",
"person",
",",
"profile",
")",
";",
"retur... | Returns the layout for a user decorated with any specified decorator. The layout returned is
a composite layout for non fragment owners and a regular layout for layout owners. A
composite layout is made up of layout pieces from potentially multiple incorporated layouts.
If no layouts are defined then the composite layo... | [
"Returns",
"the",
"layout",
"for",
"a",
"user",
"decorated",
"with",
"any",
"specified",
"decorator",
".",
"The",
"layout",
"returned",
"is",
"a",
"composite",
"layout",
"for",
"non",
"fragment",
"owners",
"and",
"a",
"regular",
"layout",
"for",
"layout",
"o... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/RDBMDistributedLayoutStore.java#L337-L343 |
57,782 | Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/RDBMDistributedLayoutStore.java | RDBMDistributedLayoutStore._safeGetUserLayout | private Document _safeGetUserLayout(IPerson person, IUserProfile profile) {
Document layoutDoc;
Tuple<String, String> key = null;
final Cache<Tuple<String, String>, Document> layoutCache = getLayoutImportExportCache();
if (layoutCache != null) {
key = new Tuple<>(person.get... | java | private Document _safeGetUserLayout(IPerson person, IUserProfile profile) {
Document layoutDoc;
Tuple<String, String> key = null;
final Cache<Tuple<String, String>, Document> layoutCache = getLayoutImportExportCache();
if (layoutCache != null) {
key = new Tuple<>(person.get... | [
"private",
"Document",
"_safeGetUserLayout",
"(",
"IPerson",
"person",
",",
"IUserProfile",
"profile",
")",
"{",
"Document",
"layoutDoc",
";",
"Tuple",
"<",
"String",
",",
"String",
">",
"key",
"=",
"null",
";",
"final",
"Cache",
"<",
"Tuple",
"<",
"String",... | Handles locking and identifying proper root and namespaces that used to take place in super
class.
@param person
@param profile
@return @ | [
"Handles",
"locking",
"and",
"identifying",
"proper",
"root",
"and",
"namespaces",
"that",
"used",
"to",
"take",
"place",
"in",
"super",
"class",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/RDBMDistributedLayoutStore.java#L1198-L1221 |
57,783 | Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/RDBMDistributedLayoutStore.java | RDBMDistributedLayoutStore._getUserLayout | private DistributedUserLayout _getUserLayout(IPerson person, IUserProfile profile) {
final String userName = (String) person.getAttribute("username");
final FragmentDefinition ownedFragment =
this.fragmentUtils.getFragmentDefinitionByOwner(person);
final boolean isLayoutOwnerDef... | java | private DistributedUserLayout _getUserLayout(IPerson person, IUserProfile profile) {
final String userName = (String) person.getAttribute("username");
final FragmentDefinition ownedFragment =
this.fragmentUtils.getFragmentDefinitionByOwner(person);
final boolean isLayoutOwnerDef... | [
"private",
"DistributedUserLayout",
"_getUserLayout",
"(",
"IPerson",
"person",
",",
"IUserProfile",
"profile",
")",
"{",
"final",
"String",
"userName",
"=",
"(",
"String",
")",
"person",
".",
"getAttribute",
"(",
"\"username\"",
")",
";",
"final",
"FragmentDefini... | Returns the layout for a user. This method overrides the same method in the superclass to
return a composite layout for non fragment owners and a regular layout for layout owners. A
composite layout is made up of layout pieces from potentially multiple incorporated layouts.
If no layouts are defined then the composite ... | [
"Returns",
"the",
"layout",
"for",
"a",
"user",
".",
"This",
"method",
"overrides",
"the",
"same",
"method",
"in",
"the",
"superclass",
"to",
"return",
"a",
"composite",
"layout",
"for",
"non",
"fragment",
"owners",
"and",
"a",
"regular",
"layout",
"for",
... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/RDBMDistributedLayoutStore.java#L1231-L1296 |
57,784 | Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/RDBMDistributedLayoutStore.java | RDBMDistributedLayoutStore.getFragmentLayout | @Override
public Document getFragmentLayout(IPerson person, IUserProfile profile) {
return this._safeGetUserLayout(person, profile);
} | java | @Override
public Document getFragmentLayout(IPerson person, IUserProfile profile) {
return this._safeGetUserLayout(person, profile);
} | [
"@",
"Override",
"public",
"Document",
"getFragmentLayout",
"(",
"IPerson",
"person",
",",
"IUserProfile",
"profile",
")",
"{",
"return",
"this",
".",
"_safeGetUserLayout",
"(",
"person",
",",
"profile",
")",
";",
"}"
] | Convenience method for fragment activator to obtain raw layouts for fragments during
initialization. | [
"Convenience",
"method",
"for",
"fragment",
"activator",
"to",
"obtain",
"raw",
"layouts",
"for",
"fragments",
"during",
"initialization",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/RDBMDistributedLayoutStore.java#L1362-L1366 |
57,785 | Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/RDBMDistributedLayoutStore.java | RDBMDistributedLayoutStore.updateCachedLayout | private void updateCachedLayout(
Document layout, IUserProfile profile, FragmentDefinition fragment) {
final Locale locale = profile.getLocaleManager().getLocales().get(0);
// need to make a copy that we can fragmentize
layout = (Document) layout.cloneNode(true);
// Fix late... | java | private void updateCachedLayout(
Document layout, IUserProfile profile, FragmentDefinition fragment) {
final Locale locale = profile.getLocaleManager().getLocales().get(0);
// need to make a copy that we can fragmentize
layout = (Document) layout.cloneNode(true);
// Fix late... | [
"private",
"void",
"updateCachedLayout",
"(",
"Document",
"layout",
",",
"IUserProfile",
"profile",
",",
"FragmentDefinition",
"fragment",
")",
"{",
"final",
"Locale",
"locale",
"=",
"profile",
".",
"getLocaleManager",
"(",
")",
".",
"getLocales",
"(",
")",
".",... | Replaces the layout Document stored on a fragment definition with a new version. This is
called when a fragment owner updates their layout. | [
"Replaces",
"the",
"layout",
"Document",
"stored",
"on",
"a",
"fragment",
"definition",
"with",
"a",
"new",
"version",
".",
"This",
"is",
"called",
"when",
"a",
"fragment",
"owner",
"updates",
"their",
"layout",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/RDBMDistributedLayoutStore.java#L1382-L1408 |
57,786 | Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/RDBMDistributedLayoutStore.java | RDBMDistributedLayoutStore.isLayoutOwnerDefault | private boolean isLayoutOwnerDefault(IPerson person) {
final String userName = (String) person.getAttribute("username");
final List<FragmentDefinition> definitions = this.fragmentUtils.getFragmentDefinitions();
if (userName != null && definitions != null) {
for (final FragmentDefini... | java | private boolean isLayoutOwnerDefault(IPerson person) {
final String userName = (String) person.getAttribute("username");
final List<FragmentDefinition> definitions = this.fragmentUtils.getFragmentDefinitions();
if (userName != null && definitions != null) {
for (final FragmentDefini... | [
"private",
"boolean",
"isLayoutOwnerDefault",
"(",
"IPerson",
"person",
")",
"{",
"final",
"String",
"userName",
"=",
"(",
"String",
")",
"person",
".",
"getAttribute",
"(",
"\"username\"",
")",
";",
"final",
"List",
"<",
"FragmentDefinition",
">",
"definitions"... | Returns true if the user is the owner of a layout which is copied as the default for any
fragment when first created. | [
"Returns",
"true",
"if",
"the",
"user",
"is",
"the",
"owner",
"of",
"a",
"layout",
"which",
"is",
"copied",
"as",
"the",
"default",
"for",
"any",
"fragment",
"when",
"first",
"created",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/RDBMDistributedLayoutStore.java#L1414-L1432 |
57,787 | Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/RDBMDistributedLayoutStore.java | RDBMDistributedLayoutStore.setUserLayout | @Override
public void setUserLayout(
IPerson person, IUserProfile profile, Document layoutXML, boolean channelsAdded) {
this.setUserLayout(person, profile, layoutXML, channelsAdded, true);
} | java | @Override
public void setUserLayout(
IPerson person, IUserProfile profile, Document layoutXML, boolean channelsAdded) {
this.setUserLayout(person, profile, layoutXML, channelsAdded, true);
} | [
"@",
"Override",
"public",
"void",
"setUserLayout",
"(",
"IPerson",
"person",
",",
"IUserProfile",
"profile",
",",
"Document",
"layoutXML",
",",
"boolean",
"channelsAdded",
")",
"{",
"this",
".",
"setUserLayout",
"(",
"person",
",",
"profile",
",",
"layoutXML",
... | This method overrides the same method in the super class to persist only layout information
stored in the user's person layout fragment or PLF. If this person is a layout owner then
their changes are pushed into the appropriate layout fragment. | [
"This",
"method",
"overrides",
"the",
"same",
"method",
"in",
"the",
"super",
"class",
"to",
"persist",
"only",
"layout",
"information",
"stored",
"in",
"the",
"user",
"s",
"person",
"layout",
"fragment",
"or",
"PLF",
".",
"If",
"this",
"person",
"is",
"a"... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/RDBMDistributedLayoutStore.java#L1462-L1467 |
57,788 | Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/RDBMDistributedLayoutStore.java | RDBMDistributedLayoutStore.setUserLayout | @Override
public void setUserLayout(
IPerson person,
IUserProfile profile,
Document layoutXML,
boolean channelsAdded,
boolean updateFragmentCache) {
final Document plf = (Document) person.getAttribute(Constants.PLF);
if (logger.isDebugEnab... | java | @Override
public void setUserLayout(
IPerson person,
IUserProfile profile,
Document layoutXML,
boolean channelsAdded,
boolean updateFragmentCache) {
final Document plf = (Document) person.getAttribute(Constants.PLF);
if (logger.isDebugEnab... | [
"@",
"Override",
"public",
"void",
"setUserLayout",
"(",
"IPerson",
"person",
",",
"IUserProfile",
"profile",
",",
"Document",
"layoutXML",
",",
"boolean",
"channelsAdded",
",",
"boolean",
"updateFragmentCache",
")",
"{",
"final",
"Document",
"plf",
"=",
"(",
"D... | This method overrides the same method in the super class to persist only layout information
stored in the user's person layout fragment or PLF. If fragment cache update is requested
then it checks to see if this person is a layout owner and if so then their changes are
pushed into the appropriate layout fragment. | [
"This",
"method",
"overrides",
"the",
"same",
"method",
"in",
"the",
"super",
"class",
"to",
"persist",
"only",
"layout",
"information",
"stored",
"in",
"the",
"user",
"s",
"person",
"layout",
"fragment",
"or",
"PLF",
".",
"If",
"fragment",
"cache",
"update"... | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/RDBMDistributedLayoutStore.java#L1475-L1500 |
57,789 | Jasig/uPortal | uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/PersonDirNameFinderFactory.java | PersonDirNameFinderFactory.storeSingleton | private static synchronized void storeSingleton() {
// recheck that we need to run because field could have been
// set since we decided to invoke this method but before we acquired
// the lock on this object
if (PERSON_DIR_NAME_FINDER_INSTANCE == null) {
IPersonAttributeDao ... | java | private static synchronized void storeSingleton() {
// recheck that we need to run because field could have been
// set since we decided to invoke this method but before we acquired
// the lock on this object
if (PERSON_DIR_NAME_FINDER_INSTANCE == null) {
IPersonAttributeDao ... | [
"private",
"static",
"synchronized",
"void",
"storeSingleton",
"(",
")",
"{",
"// recheck that we need to run because field could have been",
"// set since we decided to invoke this method but before we acquired",
"// the lock on this object",
"if",
"(",
"PERSON_DIR_NAME_FINDER_INSTANCE",
... | Instantiates the static singleton field PERSON_DIR_NAME_FINDER_INSTANCE. Synchronized to
guarantee singleton-ness of the field. | [
"Instantiates",
"the",
"static",
"singleton",
"field",
"PERSON_DIR_NAME_FINDER_INSTANCE",
".",
"Synchronized",
"to",
"guarantee",
"singleton",
"-",
"ness",
"of",
"the",
"field",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/PersonDirNameFinderFactory.java#L56-L65 |
57,790 | Jasig/uPortal | uPortal-events/src/main/java/org/apereo/portal/events/PortalEventFactoryImpl.java | PortalEventFactoryImpl.getResourceId | protected String getResourceId(
IPortletWindowId portletWindowId, final IPortalRequestInfo portalRequestInfo) {
final IPortletRequestInfo portletRequestInfo =
portalRequestInfo.getPortletRequestInfo(portletWindowId);
if (portletRequestInfo == null) {
return null;
... | java | protected String getResourceId(
IPortletWindowId portletWindowId, final IPortalRequestInfo portalRequestInfo) {
final IPortletRequestInfo portletRequestInfo =
portalRequestInfo.getPortletRequestInfo(portletWindowId);
if (portletRequestInfo == null) {
return null;
... | [
"protected",
"String",
"getResourceId",
"(",
"IPortletWindowId",
"portletWindowId",
",",
"final",
"IPortalRequestInfo",
"portalRequestInfo",
")",
"{",
"final",
"IPortletRequestInfo",
"portletRequestInfo",
"=",
"portalRequestInfo",
".",
"getPortletRequestInfo",
"(",
"portletWi... | The portlet resource request resourceId | [
"The",
"portlet",
"resource",
"request",
"resourceId"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-events/src/main/java/org/apereo/portal/events/PortalEventFactoryImpl.java#L618-L627 |
57,791 | Jasig/uPortal | uPortal-events/src/main/java/org/apereo/portal/events/PortalEventFactoryImpl.java | PortalEventFactoryImpl.getEventSessionMutex | protected final Object getEventSessionMutex(HttpSession session) {
synchronized (WebUtils.getSessionMutex(session)) {
SerializableObject mutex =
(SerializableObject) session.getAttribute(EVENT_SESSION_MUTEX);
if (mutex == null) {
mutex = new Serializab... | java | protected final Object getEventSessionMutex(HttpSession session) {
synchronized (WebUtils.getSessionMutex(session)) {
SerializableObject mutex =
(SerializableObject) session.getAttribute(EVENT_SESSION_MUTEX);
if (mutex == null) {
mutex = new Serializab... | [
"protected",
"final",
"Object",
"getEventSessionMutex",
"(",
"HttpSession",
"session",
")",
"{",
"synchronized",
"(",
"WebUtils",
".",
"getSessionMutex",
"(",
"session",
")",
")",
"{",
"SerializableObject",
"mutex",
"=",
"(",
"SerializableObject",
")",
"session",
... | Get a session scoped mutex specific to this class | [
"Get",
"a",
"session",
"scoped",
"mutex",
"specific",
"to",
"this",
"class"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-events/src/main/java/org/apereo/portal/events/PortalEventFactoryImpl.java#L781-L792 |
57,792 | Jasig/uPortal | uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/groupadmin/GroupAdministrationHelper.java | GroupAdministrationHelper.getGroupForm | public GroupForm getGroupForm(String key) {
log.debug("Initializing group form for group key " + key);
// find the current version of this group entity
IEntityGroup group = GroupService.findGroup(key);
// update the group form with the existing group's main information
GroupFo... | java | public GroupForm getGroupForm(String key) {
log.debug("Initializing group form for group key " + key);
// find the current version of this group entity
IEntityGroup group = GroupService.findGroup(key);
// update the group form with the existing group's main information
GroupFo... | [
"public",
"GroupForm",
"getGroupForm",
"(",
"String",
"key",
")",
"{",
"log",
".",
"debug",
"(",
"\"Initializing group form for group key \"",
"+",
"key",
")",
";",
"// find the current version of this group entity",
"IEntityGroup",
"group",
"=",
"GroupService",
".",
"f... | Construct a group form for the group with the specified key.
@param key
@param entityEnum
@return | [
"Construct",
"a",
"group",
"form",
"for",
"the",
"group",
"with",
"the",
"specified",
"key",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/groupadmin/GroupAdministrationHelper.java#L58-L80 |
57,793 | Jasig/uPortal | uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/groupadmin/GroupAdministrationHelper.java | GroupAdministrationHelper.deleteGroup | public void deleteGroup(String key, IPerson deleter) {
if (!canDeleteGroup(deleter, key)) {
throw new RuntimeAuthorizationException(
deleter, IPermission.DELETE_GROUP_ACTIVITY, key);
}
log.info("Deleting group with key " + key);
// find the current vers... | java | public void deleteGroup(String key, IPerson deleter) {
if (!canDeleteGroup(deleter, key)) {
throw new RuntimeAuthorizationException(
deleter, IPermission.DELETE_GROUP_ACTIVITY, key);
}
log.info("Deleting group with key " + key);
// find the current vers... | [
"public",
"void",
"deleteGroup",
"(",
"String",
"key",
",",
"IPerson",
"deleter",
")",
"{",
"if",
"(",
"!",
"canDeleteGroup",
"(",
"deleter",
",",
"key",
")",
")",
"{",
"throw",
"new",
"RuntimeAuthorizationException",
"(",
"deleter",
",",
"IPermission",
".",... | Delete a group from the group store
@param key key of the group to be deleted
@param user performing the delete operation | [
"Delete",
"a",
"group",
"from",
"the",
"group",
"store"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/groupadmin/GroupAdministrationHelper.java#L88-L109 |
57,794 | Jasig/uPortal | uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/groupadmin/GroupAdministrationHelper.java | GroupAdministrationHelper.updateGroupDetails | public void updateGroupDetails(GroupForm groupForm, IPerson updater) {
if (!canEditGroup(updater, groupForm.getKey())) {
throw new RuntimeAuthorizationException(
updater, IPermission.EDIT_GROUP_ACTIVITY, groupForm.getKey());
}
if (log.isDebugEnabled()) {
... | java | public void updateGroupDetails(GroupForm groupForm, IPerson updater) {
if (!canEditGroup(updater, groupForm.getKey())) {
throw new RuntimeAuthorizationException(
updater, IPermission.EDIT_GROUP_ACTIVITY, groupForm.getKey());
}
if (log.isDebugEnabled()) {
... | [
"public",
"void",
"updateGroupDetails",
"(",
"GroupForm",
"groupForm",
",",
"IPerson",
"updater",
")",
"{",
"if",
"(",
"!",
"canEditGroup",
"(",
"updater",
",",
"groupForm",
".",
"getKey",
"(",
")",
")",
")",
"{",
"throw",
"new",
"RuntimeAuthorizationException... | Update the title and description of an existing group in the group store.
@param groupForm Form representing the new group configuration
@param updater Updating user | [
"Update",
"the",
"title",
"and",
"description",
"of",
"an",
"existing",
"group",
"in",
"the",
"group",
"store",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/groupadmin/GroupAdministrationHelper.java#L117-L136 |
57,795 | Jasig/uPortal | uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/groupadmin/GroupAdministrationHelper.java | GroupAdministrationHelper.updateGroupMembers | public void updateGroupMembers(GroupForm groupForm, IPerson updater) {
if (!canEditGroup(updater, groupForm.getKey())) {
throw new RuntimeAuthorizationException(
updater, IPermission.EDIT_GROUP_ACTIVITY, groupForm.getKey());
}
if (log.isDebugEnabled()) {
... | java | public void updateGroupMembers(GroupForm groupForm, IPerson updater) {
if (!canEditGroup(updater, groupForm.getKey())) {
throw new RuntimeAuthorizationException(
updater, IPermission.EDIT_GROUP_ACTIVITY, groupForm.getKey());
}
if (log.isDebugEnabled()) {
... | [
"public",
"void",
"updateGroupMembers",
"(",
"GroupForm",
"groupForm",
",",
"IPerson",
"updater",
")",
"{",
"if",
"(",
"!",
"canEditGroup",
"(",
"updater",
",",
"groupForm",
".",
"getKey",
"(",
")",
")",
")",
"{",
"throw",
"new",
"RuntimeAuthorizationException... | Update the members of an existing group in the group store.
@param groupForm Form representing the new group configuration
@param updater Updating user | [
"Update",
"the",
"members",
"of",
"an",
"existing",
"group",
"in",
"the",
"group",
"store",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/groupadmin/GroupAdministrationHelper.java#L144-L179 |
57,796 | Jasig/uPortal | uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/groupadmin/GroupAdministrationHelper.java | GroupAdministrationHelper.createGroup | public void createGroup(GroupForm groupForm, JsonEntityBean parent, IPerson creator) {
if (!canCreateMemberGroup(creator, parent.getId())) {
throw new RuntimeAuthorizationException(
creator, IPermission.CREATE_GROUP_ACTIVITY, groupForm.getKey());
}
if (log.isDeb... | java | public void createGroup(GroupForm groupForm, JsonEntityBean parent, IPerson creator) {
if (!canCreateMemberGroup(creator, parent.getId())) {
throw new RuntimeAuthorizationException(
creator, IPermission.CREATE_GROUP_ACTIVITY, groupForm.getKey());
}
if (log.isDeb... | [
"public",
"void",
"createGroup",
"(",
"GroupForm",
"groupForm",
",",
"JsonEntityBean",
"parent",
",",
"IPerson",
"creator",
")",
"{",
"if",
"(",
"!",
"canCreateMemberGroup",
"(",
"creator",
",",
"parent",
".",
"getId",
"(",
")",
")",
")",
"{",
"throw",
"ne... | Create a new group under the specified parent. The new group will automatically be added to
the parent group.
@param groupForm form object representing the new group
@param parent parent group for this new group
@param creator the uPortal user creating the new group | [
"Create",
"a",
"new",
"group",
"under",
"the",
"specified",
"parent",
".",
"The",
"new",
"group",
"will",
"automatically",
"be",
"added",
"to",
"the",
"parent",
"group",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/groupadmin/GroupAdministrationHelper.java#L189-L236 |
57,797 | Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/statistics/PortletExecutionStatisticsController.java | PortletExecutionStatisticsController.selectFormExecutionType | private void selectFormExecutionType(final PortletExecutionReportForm report) {
if (!report.getExecutionTypeNames().isEmpty()) {
// Already execution types set, do nothing
return;
}
report.getExecutionTypeNames().add(ExecutionType.RENDER.name());
} | java | private void selectFormExecutionType(final PortletExecutionReportForm report) {
if (!report.getExecutionTypeNames().isEmpty()) {
// Already execution types set, do nothing
return;
}
report.getExecutionTypeNames().add(ExecutionType.RENDER.name());
} | [
"private",
"void",
"selectFormExecutionType",
"(",
"final",
"PortletExecutionReportForm",
"report",
")",
"{",
"if",
"(",
"!",
"report",
".",
"getExecutionTypeNames",
"(",
")",
".",
"isEmpty",
"(",
")",
")",
"{",
"// Already execution types set, do nothing",
"return",
... | Select the XXXX execution type by default for the form | [
"Select",
"the",
"XXXX",
"execution",
"type",
"by",
"default",
"for",
"the",
"form"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/statistics/PortletExecutionStatisticsController.java#L132-L139 |
57,798 | Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/statistics/PortletExecutionStatisticsController.java | PortletExecutionStatisticsController.getColumnDescriptions | @Override
protected List<ColumnDescription> getColumnDescriptions(
PortletExecutionAggregationDiscriminator reportColumnDiscriminator,
PortletExecutionReportForm form) {
int groupSize = form.getGroups().size();
int portletSize = form.getPortlets().size();
int executio... | java | @Override
protected List<ColumnDescription> getColumnDescriptions(
PortletExecutionAggregationDiscriminator reportColumnDiscriminator,
PortletExecutionReportForm form) {
int groupSize = form.getGroups().size();
int portletSize = form.getPortlets().size();
int executio... | [
"@",
"Override",
"protected",
"List",
"<",
"ColumnDescription",
">",
"getColumnDescriptions",
"(",
"PortletExecutionAggregationDiscriminator",
"reportColumnDiscriminator",
",",
"PortletExecutionReportForm",
"form",
")",
"{",
"int",
"groupSize",
"=",
"form",
".",
"getGroups"... | Create column descriptions for the portlet report using the configured report labelling
strategy.
@param reportColumnDiscriminator
@param form The original query form
@return | [
"Create",
"column",
"descriptions",
"for",
"the",
"portlet",
"report",
"using",
"the",
"configured",
"report",
"labelling",
"strategy",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/statistics/PortletExecutionStatisticsController.java#L274-L295 |
57,799 | Jasig/uPortal | uPortal-layout/uPortal-layout-core/src/main/java/org/apereo/portal/layout/profile/ServerProfileMapperImpl.java | ServerProfileMapperImpl.setServerRegex | @Required
public void setServerRegex(String serverRegex) {
Validate.notBlank(serverRegex);
this.serverRegex = serverRegex;
this.pattern = Pattern.compile(this.serverRegex);
} | java | @Required
public void setServerRegex(String serverRegex) {
Validate.notBlank(serverRegex);
this.serverRegex = serverRegex;
this.pattern = Pattern.compile(this.serverRegex);
} | [
"@",
"Required",
"public",
"void",
"setServerRegex",
"(",
"String",
"serverRegex",
")",
"{",
"Validate",
".",
"notBlank",
"(",
"serverRegex",
")",
";",
"this",
".",
"serverRegex",
"=",
"serverRegex",
";",
"this",
".",
"pattern",
"=",
"Pattern",
".",
"compile... | Sets the regular expression for the servers you want to select a profile for
@param serverRegex | [
"Sets",
"the",
"regular",
"expression",
"for",
"the",
"servers",
"you",
"want",
"to",
"select",
"a",
"profile",
"for"
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-core/src/main/java/org/apereo/portal/layout/profile/ServerProfileMapperImpl.java#L48-L53 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.