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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
22,100 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/helper/Utils.java | Utils.checkGrpcUrl | public static Exception checkGrpcUrl(String url) {
try {
parseGrpcUrl(url);
return null;
} catch (Exception e) {
return e;
}
} | java | public static Exception checkGrpcUrl(String url) {
try {
parseGrpcUrl(url);
return null;
} catch (Exception e) {
return e;
}
} | [
"public",
"static",
"Exception",
"checkGrpcUrl",
"(",
"String",
"url",
")",
"{",
"try",
"{",
"parseGrpcUrl",
"(",
"url",
")",
";",
"return",
"null",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"return",
"e",
";",
"}",
"}"
] | Check if the strings Grpc url is valid
@param url
@return Return the exception that indicates the error or null if ok. | [
"Check",
"if",
"the",
"strings",
"Grpc",
"url",
"is",
"valid"
] | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/helper/Utils.java#L346-L355 |
22,101 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/helper/Utils.java | Utils.logString | public static String logString(final String string) {
if (string == null || string.length() == 0) {
return string;
}
String ret = string.replaceAll("[^\\p{Print}]", "?");
ret = ret.substring(0, Math.min(ret.length(), MAX_LOG_STRING_LENGTH)) + (ret.length() > MAX_LOG_STRING_... | java | public static String logString(final String string) {
if (string == null || string.length() == 0) {
return string;
}
String ret = string.replaceAll("[^\\p{Print}]", "?");
ret = ret.substring(0, Math.min(ret.length(), MAX_LOG_STRING_LENGTH)) + (ret.length() > MAX_LOG_STRING_... | [
"public",
"static",
"String",
"logString",
"(",
"final",
"String",
"string",
")",
"{",
"if",
"(",
"string",
"==",
"null",
"||",
"string",
".",
"length",
"(",
")",
"==",
"0",
")",
"{",
"return",
"string",
";",
"}",
"String",
"ret",
"=",
"string",
".",... | Makes logging strings which can be long or with unprintable characters be logged and trimmed.
@param string Unsafe string too long
@return returns a string which does not have unprintable characters and trimmed in length. | [
"Makes",
"logging",
"strings",
"which",
"can",
"be",
"long",
"or",
"with",
"unprintable",
"characters",
"be",
"logged",
"and",
"trimmed",
"."
] | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/helper/Utils.java#L373-L384 |
22,102 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/helper/Config.java | Config.getSecurityCurveMapping | public Map<Integer, String> getSecurityCurveMapping() {
if (curveMapping == null) {
curveMapping = parseSecurityCurveMappings(getProperty(SECURITY_CURVE_MAPPING));
}
return Collections.unmodifiableMap(curveMapping);
} | java | public Map<Integer, String> getSecurityCurveMapping() {
if (curveMapping == null) {
curveMapping = parseSecurityCurveMappings(getProperty(SECURITY_CURVE_MAPPING));
}
return Collections.unmodifiableMap(curveMapping);
} | [
"public",
"Map",
"<",
"Integer",
",",
"String",
">",
"getSecurityCurveMapping",
"(",
")",
"{",
"if",
"(",
"curveMapping",
"==",
"null",
")",
"{",
"curveMapping",
"=",
"parseSecurityCurveMappings",
"(",
"getProperty",
"(",
"SECURITY_CURVE_MAPPING",
")",
")",
";",... | Get a mapping from strength to curve desired.
@return mapping from strength to curve name to use. | [
"Get",
"a",
"mapping",
"from",
"strength",
"to",
"curve",
"desired",
"."
] | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/helper/Config.java#L359-L367 |
22,103 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/helper/Config.java | Config.getDiagnosticFileDumper | public DiagnosticFileDumper getDiagnosticFileDumper() {
if (diagnosticFileDumper != null) {
return diagnosticFileDumper;
}
String dd = sdkProperties.getProperty(DIAGNOTISTIC_FILE_DIRECTORY);
if (dd != null) {
diagnosticFileDumper = DiagnosticFileDumper.configI... | java | public DiagnosticFileDumper getDiagnosticFileDumper() {
if (diagnosticFileDumper != null) {
return diagnosticFileDumper;
}
String dd = sdkProperties.getProperty(DIAGNOTISTIC_FILE_DIRECTORY);
if (dd != null) {
diagnosticFileDumper = DiagnosticFileDumper.configI... | [
"public",
"DiagnosticFileDumper",
"getDiagnosticFileDumper",
"(",
")",
"{",
"if",
"(",
"diagnosticFileDumper",
"!=",
"null",
")",
"{",
"return",
"diagnosticFileDumper",
";",
"}",
"String",
"dd",
"=",
"sdkProperties",
".",
"getProperty",
"(",
"DIAGNOTISTIC_FILE_DIRECTO... | The directory where diagnostic dumps are to be place, null if none should be done.
@return The directory where diagnostic dumps are to be place, null if none should be done. | [
"The",
"directory",
"where",
"diagnostic",
"dumps",
"are",
"to",
"be",
"place",
"null",
"if",
"none",
"should",
"be",
"done",
"."
] | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/helper/Config.java#L528-L543 |
22,104 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/helper/Config.java | Config.getLifecycleInitRequiredDefault | public Boolean getLifecycleInitRequiredDefault() {
String property = getProperty(LIFECYCLE_INITREQUIREDDEFAULT);
if (property != null) {
return Boolean.parseBoolean(property);
}
return null;
} | java | public Boolean getLifecycleInitRequiredDefault() {
String property = getProperty(LIFECYCLE_INITREQUIREDDEFAULT);
if (property != null) {
return Boolean.parseBoolean(property);
}
return null;
} | [
"public",
"Boolean",
"getLifecycleInitRequiredDefault",
"(",
")",
"{",
"String",
"property",
"=",
"getProperty",
"(",
"LIFECYCLE_INITREQUIREDDEFAULT",
")",
";",
"if",
"(",
"property",
"!=",
"null",
")",
"{",
"return",
"Boolean",
".",
"parseBoolean",
"(",
"property... | Whether require init method in chaincode to be run.
The default will return null which will not set the Fabric protobuf value which then sets false. False is the Fabric
default.
@return The default setting for initRequired in chaincode approve for my org and commit chaincode definition. | [
"Whether",
"require",
"init",
"method",
"in",
"chaincode",
"to",
"be",
"run",
".",
"The",
"default",
"will",
"return",
"null",
"which",
"will",
"not",
"set",
"the",
"Fabric",
"protobuf",
"value",
"which",
"then",
"sets",
"false",
".",
"False",
"is",
"the",... | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/helper/Config.java#L626-L636 |
22,105 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/InstallProposalRequest.java | InstallProposalRequest.setChaincodeInputStream | public void setChaincodeInputStream(InputStream chaincodeInputStream) throws InvalidArgumentException {
if (chaincodeInputStream == null) {
throw new InvalidArgumentException("Chaincode input stream may not be null.");
}
if (chaincodeSourceLocation != null) {
throw new In... | java | public void setChaincodeInputStream(InputStream chaincodeInputStream) throws InvalidArgumentException {
if (chaincodeInputStream == null) {
throw new InvalidArgumentException("Chaincode input stream may not be null.");
}
if (chaincodeSourceLocation != null) {
throw new In... | [
"public",
"void",
"setChaincodeInputStream",
"(",
"InputStream",
"chaincodeInputStream",
")",
"throws",
"InvalidArgumentException",
"{",
"if",
"(",
"chaincodeInputStream",
"==",
"null",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"\"Chaincode input stream may... | Chaincode input stream containing the actual chaincode. Only format supported is a tar zip compressed input of the source.
Only input stream or source location maybe used at the same time.
The contents of the stream are not validated or inspected by the SDK.
@param chaincodeInputStream
@throws InvalidArgumentException | [
"Chaincode",
"input",
"stream",
"containing",
"the",
"actual",
"chaincode",
".",
"Only",
"format",
"supported",
"is",
"a",
"tar",
"zip",
"compressed",
"input",
"of",
"the",
"source",
".",
"Only",
"input",
"stream",
"or",
"source",
"location",
"maybe",
"used",
... | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/InstallProposalRequest.java#L66-L77 |
22,106 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/InstallProposalRequest.java | InstallProposalRequest.setChaincodeSourceLocation | public void setChaincodeSourceLocation(File chaincodeSourceLocation) throws InvalidArgumentException {
if (chaincodeSourceLocation == null) {
throw new InvalidArgumentException("Chaincode source location may not be null.");
}
if (chaincodeInputStream != null) {
throw new ... | java | public void setChaincodeSourceLocation(File chaincodeSourceLocation) throws InvalidArgumentException {
if (chaincodeSourceLocation == null) {
throw new InvalidArgumentException("Chaincode source location may not be null.");
}
if (chaincodeInputStream != null) {
throw new ... | [
"public",
"void",
"setChaincodeSourceLocation",
"(",
"File",
"chaincodeSourceLocation",
")",
"throws",
"InvalidArgumentException",
"{",
"if",
"(",
"chaincodeSourceLocation",
"==",
"null",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"\"Chaincode source locatio... | The location of the chaincode.
Chaincode input stream and source location can not both be set.
@param chaincodeSourceLocation
@throws InvalidArgumentException | [
"The",
"location",
"of",
"the",
"chaincode",
".",
"Chaincode",
"input",
"stream",
"and",
"source",
"location",
"can",
"not",
"both",
"be",
"set",
"."
] | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/InstallProposalRequest.java#L90-L99 |
22,107 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/LifecycleQueryApprovalStatusRequest.java | LifecycleQueryApprovalStatusRequest.setChaincodeCollectionConfiguration | public void setChaincodeCollectionConfiguration(ChaincodeCollectionConfiguration collectionConfigPackage) throws InvalidArgumentException {
if (null == collectionConfigPackage) {
throw new InvalidArgumentException("The parameter collectionConfigPackage may not be null.");
}
this.col... | java | public void setChaincodeCollectionConfiguration(ChaincodeCollectionConfiguration collectionConfigPackage) throws InvalidArgumentException {
if (null == collectionConfigPackage) {
throw new InvalidArgumentException("The parameter collectionConfigPackage may not be null.");
}
this.col... | [
"public",
"void",
"setChaincodeCollectionConfiguration",
"(",
"ChaincodeCollectionConfiguration",
"collectionConfigPackage",
")",
"throws",
"InvalidArgumentException",
"{",
"if",
"(",
"null",
"==",
"collectionConfigPackage",
")",
"{",
"throw",
"new",
"InvalidArgumentException",... | The collection configuration for the approval being queried for.
@param collectionConfigPackage
@throws InvalidArgumentException | [
"The",
"collection",
"configuration",
"for",
"the",
"approval",
"being",
"queried",
"for",
"."
] | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/LifecycleQueryApprovalStatusRequest.java#L199-L205 |
22,108 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/Channel.java | Channel.addPeer | public Channel addPeer(Peer peer, PeerOptions peerOptions) throws InvalidArgumentException {
if (shutdown) {
throw new InvalidArgumentException(format("Channel %s has been shutdown.", name));
}
if (null == peer) {
throw new InvalidArgumentException("Peer is invalid can n... | java | public Channel addPeer(Peer peer, PeerOptions peerOptions) throws InvalidArgumentException {
if (shutdown) {
throw new InvalidArgumentException(format("Channel %s has been shutdown.", name));
}
if (null == peer) {
throw new InvalidArgumentException("Peer is invalid can n... | [
"public",
"Channel",
"addPeer",
"(",
"Peer",
"peer",
",",
"PeerOptions",
"peerOptions",
")",
"throws",
"InvalidArgumentException",
"{",
"if",
"(",
"shutdown",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"format",
"(",
"\"Channel %s has been shutdown.\""... | Add a peer to the channel
@param peer The Peer to add.
@param peerOptions see {@link PeerRole}
@return Channel The current channel added.
@throws InvalidArgumentException | [
"Add",
"a",
"peer",
"to",
"the",
"channel"
] | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L626-L680 |
22,109 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/Channel.java | Channel.addOrderer | public Channel addOrderer(Orderer orderer) throws InvalidArgumentException {
if (shutdown) {
throw new InvalidArgumentException(format("Channel %s has been shutdown.", name));
}
if (null == orderer) {
throw new InvalidArgumentException("Orderer is invalid can not be nul... | java | public Channel addOrderer(Orderer orderer) throws InvalidArgumentException {
if (shutdown) {
throw new InvalidArgumentException(format("Channel %s has been shutdown.", name));
}
if (null == orderer) {
throw new InvalidArgumentException("Orderer is invalid can not be nul... | [
"public",
"Channel",
"addOrderer",
"(",
"Orderer",
"orderer",
")",
"throws",
"InvalidArgumentException",
"{",
"if",
"(",
"shutdown",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"format",
"(",
"\"Channel %s has been shutdown.\"",
",",
"name",
")",
")",... | Add an Orderer to this channel.
@param orderer the orderer to add.
@return this channel.
@throws InvalidArgumentException | [
"Add",
"an",
"Orderer",
"to",
"this",
"channel",
"."
] | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L923-L939 |
22,110 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/Channel.java | Channel.getPeers | public Collection<Peer> getPeers(EnumSet<PeerRole> roles) {
Set<Peer> ret = new HashSet<>(getPeers().size());
for (PeerRole peerRole : roles) {
ret.addAll(peerRoleSetMap.get(peerRole));
}
return Collections.unmodifiableCollection(ret);
} | java | public Collection<Peer> getPeers(EnumSet<PeerRole> roles) {
Set<Peer> ret = new HashSet<>(getPeers().size());
for (PeerRole peerRole : roles) {
ret.addAll(peerRoleSetMap.get(peerRole));
}
return Collections.unmodifiableCollection(ret);
} | [
"public",
"Collection",
"<",
"Peer",
">",
"getPeers",
"(",
"EnumSet",
"<",
"PeerRole",
">",
"roles",
")",
"{",
"Set",
"<",
"Peer",
">",
"ret",
"=",
"new",
"HashSet",
"<>",
"(",
"getPeers",
"(",
")",
".",
"size",
"(",
")",
")",
";",
"for",
"(",
"P... | Get the peers for this channel.
@return the peers. | [
"Get",
"the",
"peers",
"for",
"this",
"channel",
"."
] | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L982-L991 |
22,111 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/Channel.java | Channel.setPeerOptions | PeerOptions setPeerOptions(Peer peer, PeerOptions peerOptions) throws InvalidArgumentException {
if (initialized) {
throw new InvalidArgumentException(format("Channel %s already initialized.", name));
}
checkPeer(peer);
PeerOptions ret = getPeersOptions(peer);
remove... | java | PeerOptions setPeerOptions(Peer peer, PeerOptions peerOptions) throws InvalidArgumentException {
if (initialized) {
throw new InvalidArgumentException(format("Channel %s already initialized.", name));
}
checkPeer(peer);
PeerOptions ret = getPeersOptions(peer);
remove... | [
"PeerOptions",
"setPeerOptions",
"(",
"Peer",
"peer",
",",
"PeerOptions",
"peerOptions",
")",
"throws",
"InvalidArgumentException",
"{",
"if",
"(",
"initialized",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"format",
"(",
"\"Channel %s already initialized... | Set peerOptions in the channel that has not be initialized yet.
@param peer the peer to set options on.
@param peerOptions see {@link PeerOptions}
@return old options. | [
"Set",
"peerOptions",
"in",
"the",
"channel",
"that",
"has",
"not",
"be",
"initialized",
"yet",
"."
] | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L1001-L1013 |
22,112 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/Channel.java | Channel.initialize | public Channel initialize() throws InvalidArgumentException, TransactionException {
logger.debug(format("Channel %s initialize shutdown %b", name, shutdown));
if (isInitialized()) {
return this;
}
if (shutdown) {
throw new InvalidArgumentException(format("Chann... | java | public Channel initialize() throws InvalidArgumentException, TransactionException {
logger.debug(format("Channel %s initialize shutdown %b", name, shutdown));
if (isInitialized()) {
return this;
}
if (shutdown) {
throw new InvalidArgumentException(format("Chann... | [
"public",
"Channel",
"initialize",
"(",
")",
"throws",
"InvalidArgumentException",
",",
"TransactionException",
"{",
"logger",
".",
"debug",
"(",
"format",
"(",
"\"Channel %s initialize shutdown %b\"",
",",
"name",
",",
"shutdown",
")",
")",
";",
"if",
"(",
"isIni... | Initialize the Channel. Starts the channel. event hubs will connect.
@return this channel.
@throws InvalidArgumentException
@throws TransactionException | [
"Initialize",
"the",
"Channel",
".",
"Starts",
"the",
"channel",
".",
"event",
"hubs",
"will",
"connect",
"."
] | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L1034-L1119 |
22,113 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/Channel.java | Channel.loadCACertificates | protected synchronized void loadCACertificates(boolean force) throws InvalidArgumentException, CryptoException, TransactionException {
if (!force && msps != null && !msps.isEmpty()) {
return;
}
logger.debug(format("Channel %s loadCACertificates", name));
Map<String, MSP> lm... | java | protected synchronized void loadCACertificates(boolean force) throws InvalidArgumentException, CryptoException, TransactionException {
if (!force && msps != null && !msps.isEmpty()) {
return;
}
logger.debug(format("Channel %s loadCACertificates", name));
Map<String, MSP> lm... | [
"protected",
"synchronized",
"void",
"loadCACertificates",
"(",
"boolean",
"force",
")",
"throws",
"InvalidArgumentException",
",",
"CryptoException",
",",
"TransactionException",
"{",
"if",
"(",
"!",
"force",
"&&",
"msps",
"!=",
"null",
"&&",
"!",
"msps",
".",
... | load the peer organizations CA certificates into the channel's trust store so that we
can verify signatures from peer messages
@throws InvalidArgumentException
@throws CryptoException | [
"load",
"the",
"peer",
"organizations",
"CA",
"certificates",
"into",
"the",
"channel",
"s",
"trust",
"store",
"so",
"that",
"we",
"can",
"verify",
"signatures",
"from",
"peer",
"messages"
] | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L1562-L1589 |
22,114 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/Channel.java | Channel.getUpdateChannelConfigurationSignature | public byte[] getUpdateChannelConfigurationSignature(UpdateChannelConfiguration updateChannelConfiguration, User signer) throws InvalidArgumentException {
userContextCheck(signer);
if (null == updateChannelConfiguration) {
throw new InvalidArgumentException("channelConfiguration is null")... | java | public byte[] getUpdateChannelConfigurationSignature(UpdateChannelConfiguration updateChannelConfiguration, User signer) throws InvalidArgumentException {
userContextCheck(signer);
if (null == updateChannelConfiguration) {
throw new InvalidArgumentException("channelConfiguration is null")... | [
"public",
"byte",
"[",
"]",
"getUpdateChannelConfigurationSignature",
"(",
"UpdateChannelConfiguration",
"updateChannelConfiguration",
",",
"User",
"signer",
")",
"throws",
"InvalidArgumentException",
"{",
"userContextCheck",
"(",
"signer",
")",
";",
"if",
"(",
"null",
... | Get signed byes of the update channel.
@param updateChannelConfiguration
@param signer
@return
@throws InvalidArgumentException | [
"Get",
"signed",
"byes",
"of",
"the",
"update",
"channel",
"."
] | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L1680-L1712 |
22,115 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/Channel.java | Channel.getConfigurationBlock | private Block getConfigurationBlock() throws TransactionException {
logger.debug(format("getConfigurationBlock for channel %s", name));
try {
Orderer orderer = getRandomOrderer();
long lastConfigIndex = getLastConfigIndex(orderer);
logger.debug(format("Last config... | java | private Block getConfigurationBlock() throws TransactionException {
logger.debug(format("getConfigurationBlock for channel %s", name));
try {
Orderer orderer = getRandomOrderer();
long lastConfigIndex = getLastConfigIndex(orderer);
logger.debug(format("Last config... | [
"private",
"Block",
"getConfigurationBlock",
"(",
")",
"throws",
"TransactionException",
"{",
"logger",
".",
"debug",
"(",
"format",
"(",
"\"getConfigurationBlock for channel %s\"",
",",
"name",
")",
")",
";",
"try",
"{",
"Orderer",
"orderer",
"=",
"getRandomOrderer... | Provide the Channel's latest raw Configuration Block.
@return Channel configuration block.
@throws TransactionException | [
"Provide",
"the",
"Channel",
"s",
"latest",
"raw",
"Configuration",
"Block",
"."
] | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L2137-L2182 |
22,116 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/Channel.java | Channel.sendInstallProposal | Collection<ProposalResponse> sendInstallProposal(InstallProposalRequest installProposalRequest)
throws ProposalException, InvalidArgumentException {
return sendInstallProposal(installProposalRequest, getChaincodePeers());
} | java | Collection<ProposalResponse> sendInstallProposal(InstallProposalRequest installProposalRequest)
throws ProposalException, InvalidArgumentException {
return sendInstallProposal(installProposalRequest, getChaincodePeers());
} | [
"Collection",
"<",
"ProposalResponse",
">",
"sendInstallProposal",
"(",
"InstallProposalRequest",
"installProposalRequest",
")",
"throws",
"ProposalException",
",",
"InvalidArgumentException",
"{",
"return",
"sendInstallProposal",
"(",
"installProposalRequest",
",",
"getChainco... | Send install chaincode request proposal to all the channels on the peer.
@param installProposalRequest
@return
@throws ProposalException
@throws InvalidArgumentException | [
"Send",
"install",
"chaincode",
"request",
"proposal",
"to",
"all",
"the",
"channels",
"on",
"the",
"peer",
"."
] | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L2512-L2516 |
22,117 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/Channel.java | Channel.sendInstallProposal | Collection<ProposalResponse> sendInstallProposal(InstallProposalRequest installProposalRequest, Collection<Peer> peers)
throws ProposalException, InvalidArgumentException {
checkChannelState();
checkPeers(peers);
if (null == installProposalRequest) {
throw new InvalidArg... | java | Collection<ProposalResponse> sendInstallProposal(InstallProposalRequest installProposalRequest, Collection<Peer> peers)
throws ProposalException, InvalidArgumentException {
checkChannelState();
checkPeers(peers);
if (null == installProposalRequest) {
throw new InvalidArg... | [
"Collection",
"<",
"ProposalResponse",
">",
"sendInstallProposal",
"(",
"InstallProposalRequest",
"installProposalRequest",
",",
"Collection",
"<",
"Peer",
">",
"peers",
")",
"throws",
"ProposalException",
",",
"InvalidArgumentException",
"{",
"checkChannelState",
"(",
")... | Send install chaincode request proposal to the channel.
@param installProposalRequest
@param peers
@return
@throws ProposalException
@throws InvalidArgumentException | [
"Send",
"install",
"chaincode",
"request",
"proposal",
"to",
"the",
"channel",
"."
] | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L2528-L2559 |
22,118 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/Channel.java | Channel.queryBlockByHash | public BlockInfo queryBlockByHash(byte[] blockHash) throws InvalidArgumentException, ProposalException {
return queryBlockByHash(getShuffledPeers(EnumSet.of(PeerRole.LEDGER_QUERY)), blockHash);
} | java | public BlockInfo queryBlockByHash(byte[] blockHash) throws InvalidArgumentException, ProposalException {
return queryBlockByHash(getShuffledPeers(EnumSet.of(PeerRole.LEDGER_QUERY)), blockHash);
} | [
"public",
"BlockInfo",
"queryBlockByHash",
"(",
"byte",
"[",
"]",
"blockHash",
")",
"throws",
"InvalidArgumentException",
",",
"ProposalException",
"{",
"return",
"queryBlockByHash",
"(",
"getShuffledPeers",
"(",
"EnumSet",
".",
"of",
"(",
"PeerRole",
".",
"LEDGER_Q... | query this channel for a Block by the block hash.
The request is retried on each peer on the channel till successful.
<STRONG>This method may not be thread safe if client context is changed!</STRONG>
@param blockHash the hash of the Block in the chain
@return the {@link BlockInfo} with the given block Hash
@throws In... | [
"query",
"this",
"channel",
"for",
"a",
"Block",
"by",
"the",
"block",
"hash",
".",
"The",
"request",
"is",
"retried",
"on",
"each",
"peer",
"on",
"the",
"channel",
"till",
"successful",
"."
] | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L2654-L2656 |
22,119 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/Channel.java | Channel.queryBlockByHash | public BlockInfo queryBlockByHash(Collection<Peer> peers, byte[] blockHash) throws InvalidArgumentException, ProposalException {
return queryBlockByHash(peers, blockHash, client.getUserContext());
} | java | public BlockInfo queryBlockByHash(Collection<Peer> peers, byte[] blockHash) throws InvalidArgumentException, ProposalException {
return queryBlockByHash(peers, blockHash, client.getUserContext());
} | [
"public",
"BlockInfo",
"queryBlockByHash",
"(",
"Collection",
"<",
"Peer",
">",
"peers",
",",
"byte",
"[",
"]",
"blockHash",
")",
"throws",
"InvalidArgumentException",
",",
"ProposalException",
"{",
"return",
"queryBlockByHash",
"(",
"peers",
",",
"blockHash",
","... | Query a peer in this channel for a Block by the block hash.
Each peer is tried until successful response.
<STRONG>This method may not be thread safe if client context is changed!</STRONG>
@param peers the Peers to query.
@param blockHash the hash of the Block in the chain.
@return the {@link BlockInfo} with the g... | [
"Query",
"a",
"peer",
"in",
"this",
"channel",
"for",
"a",
"Block",
"by",
"the",
"block",
"hash",
".",
"Each",
"peer",
"is",
"tried",
"until",
"successful",
"response",
"."
] | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L2699-L2703 |
22,120 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/Channel.java | Channel.queryBlockByNumber | public BlockInfo queryBlockByNumber(long blockNumber) throws InvalidArgumentException, ProposalException {
return queryBlockByNumber(getShuffledPeers(EnumSet.of(PeerRole.LEDGER_QUERY)), blockNumber);
} | java | public BlockInfo queryBlockByNumber(long blockNumber) throws InvalidArgumentException, ProposalException {
return queryBlockByNumber(getShuffledPeers(EnumSet.of(PeerRole.LEDGER_QUERY)), blockNumber);
} | [
"public",
"BlockInfo",
"queryBlockByNumber",
"(",
"long",
"blockNumber",
")",
"throws",
"InvalidArgumentException",
",",
"ProposalException",
"{",
"return",
"queryBlockByNumber",
"(",
"getShuffledPeers",
"(",
"EnumSet",
".",
"of",
"(",
"PeerRole",
".",
"LEDGER_QUERY",
... | query this channel for a Block by the blockNumber.
The request is retried on all peers till successful
<STRONG>This method may not be thread safe if client context is changed!</STRONG>
@param blockNumber index of the Block in the chain
@return the {@link BlockInfo} with the given blockNumber
@throws InvalidArgumentEx... | [
"query",
"this",
"channel",
"for",
"a",
"Block",
"by",
"the",
"blockNumber",
".",
"The",
"request",
"is",
"retried",
"on",
"all",
"peers",
"till",
"successful"
] | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L2850-L2852 |
22,121 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/Channel.java | Channel.queryBlockByNumber | public BlockInfo queryBlockByNumber(Peer peer, long blockNumber) throws InvalidArgumentException, ProposalException {
return queryBlockByNumber(Collections.singleton(peer), blockNumber);
} | java | public BlockInfo queryBlockByNumber(Peer peer, long blockNumber) throws InvalidArgumentException, ProposalException {
return queryBlockByNumber(Collections.singleton(peer), blockNumber);
} | [
"public",
"BlockInfo",
"queryBlockByNumber",
"(",
"Peer",
"peer",
",",
"long",
"blockNumber",
")",
"throws",
"InvalidArgumentException",
",",
"ProposalException",
"{",
"return",
"queryBlockByNumber",
"(",
"Collections",
".",
"singleton",
"(",
"peer",
")",
",",
"bloc... | Query a peer in this channel for a Block by the blockNumber
<STRONG>This method may not be thread safe if client context is changed!</STRONG>
@param peer the peer to send the request to
@param blockNumber index of the Block in the chain
@return the {@link BlockInfo} with the given blockNumber
@throws InvalidAr... | [
"Query",
"a",
"peer",
"in",
"this",
"channel",
"for",
"a",
"Block",
"by",
"the",
"blockNumber"
] | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L2879-L2883 |
22,122 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/Channel.java | Channel.queryBlockByTransactionID | public BlockInfo queryBlockByTransactionID(String txID) throws InvalidArgumentException, ProposalException {
return queryBlockByTransactionID(getShuffledPeers(EnumSet.of(PeerRole.LEDGER_QUERY)), txID);
} | java | public BlockInfo queryBlockByTransactionID(String txID) throws InvalidArgumentException, ProposalException {
return queryBlockByTransactionID(getShuffledPeers(EnumSet.of(PeerRole.LEDGER_QUERY)), txID);
} | [
"public",
"BlockInfo",
"queryBlockByTransactionID",
"(",
"String",
"txID",
")",
"throws",
"InvalidArgumentException",
",",
"ProposalException",
"{",
"return",
"queryBlockByTransactionID",
"(",
"getShuffledPeers",
"(",
"EnumSet",
".",
"of",
"(",
"PeerRole",
".",
"LEDGER_... | query this channel for a Block by a TransactionID contained in the block
The request is tried on on each peer till successful.
<STRONG>This method may not be thread safe if client context is changed!</STRONG>
@param txID the transactionID to query on
@return the {@link BlockInfo} for the Block containing the transact... | [
"query",
"this",
"channel",
"for",
"a",
"Block",
"by",
"a",
"TransactionID",
"contained",
"in",
"the",
"block",
"The",
"request",
"is",
"tried",
"on",
"on",
"each",
"peer",
"till",
"successful",
"."
] | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L2959-L2962 |
22,123 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/Channel.java | Channel.sendLifecycleCommitChaincodeDefinitionProposal | public Collection<LifecycleCommitChaincodeDefinitionProposalResponse> sendLifecycleCommitChaincodeDefinitionProposal(LifecycleCommitChaincodeDefinitionRequest lifecycleCommitChaincodeDefinitionRequest, Collection<Peer> peers) throws InvalidArgumentException, ProposalException {
if (null == lifecycleCommitChain... | java | public Collection<LifecycleCommitChaincodeDefinitionProposalResponse> sendLifecycleCommitChaincodeDefinitionProposal(LifecycleCommitChaincodeDefinitionRequest lifecycleCommitChaincodeDefinitionRequest, Collection<Peer> peers) throws InvalidArgumentException, ProposalException {
if (null == lifecycleCommitChain... | [
"public",
"Collection",
"<",
"LifecycleCommitChaincodeDefinitionProposalResponse",
">",
"sendLifecycleCommitChaincodeDefinitionProposal",
"(",
"LifecycleCommitChaincodeDefinitionRequest",
"lifecycleCommitChaincodeDefinitionRequest",
",",
"Collection",
"<",
"Peer",
">",
"peers",
")",
... | Commit chaincode final approval to run on all organizations that have approved.
@param lifecycleCommitChaincodeDefinitionRequest The request see {@link LifecycleCommitChaincodeDefinitionRequest}
@param peers to send the request to.
@return A {@link LifecycleCommitChaincodeDefinitionProposalResponse}
@throws InvalidArg... | [
"Commit",
"chaincode",
"final",
"approval",
"to",
"run",
"on",
"all",
"organizations",
"that",
"have",
"approved",
"."
] | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L3543-L3620 |
22,124 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/Channel.java | Channel.lifecycleQueryNamespaceDefinitions | public Collection<LifecycleQueryNamespaceDefinitionsProposalResponse> lifecycleQueryNamespaceDefinitions(LifecycleQueryNamespaceDefinitionsRequest queryNamespaceDefinitionsRequest, Collection<Peer> peers) throws InvalidArgumentException, ProposalException {
if (null == queryNamespaceDefinitionsRequest) {
... | java | public Collection<LifecycleQueryNamespaceDefinitionsProposalResponse> lifecycleQueryNamespaceDefinitions(LifecycleQueryNamespaceDefinitionsRequest queryNamespaceDefinitionsRequest, Collection<Peer> peers) throws InvalidArgumentException, ProposalException {
if (null == queryNamespaceDefinitionsRequest) {
... | [
"public",
"Collection",
"<",
"LifecycleQueryNamespaceDefinitionsProposalResponse",
">",
"lifecycleQueryNamespaceDefinitions",
"(",
"LifecycleQueryNamespaceDefinitionsRequest",
"queryNamespaceDefinitionsRequest",
",",
"Collection",
"<",
"Peer",
">",
"peers",
")",
"throws",
"InvalidA... | Query namespaces. Takes no specific arguments returns namespaces including chaincode names that have been committed.
@param queryNamespaceDefinitionsRequest the request see {@link LifecycleQueryNamespaceDefinitionsRequest}
@param peers to send the request.
@return A {@link LifecycleQueryNa... | [
"Query",
"namespaces",
".",
"Takes",
"no",
"specific",
"arguments",
"returns",
"namespaces",
"including",
"chaincode",
"names",
"that",
"have",
"been",
"committed",
"."
] | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L3701-L3725 |
22,125 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/Channel.java | Channel.sendLifecycleQueryApprovalStatusRequest | public Collection<LifecycleQueryApprovalStatusProposalResponse> sendLifecycleQueryApprovalStatusRequest(LifecycleQueryApprovalStatusRequest lifecycleQueryApprovalStatusRequest, Collection<Peer> peers) throws InvalidArgumentException, ProposalException {
if (null == lifecycleQueryApprovalStatusRequest) {
... | java | public Collection<LifecycleQueryApprovalStatusProposalResponse> sendLifecycleQueryApprovalStatusRequest(LifecycleQueryApprovalStatusRequest lifecycleQueryApprovalStatusRequest, Collection<Peer> peers) throws InvalidArgumentException, ProposalException {
if (null == lifecycleQueryApprovalStatusRequest) {
... | [
"public",
"Collection",
"<",
"LifecycleQueryApprovalStatusProposalResponse",
">",
"sendLifecycleQueryApprovalStatusRequest",
"(",
"LifecycleQueryApprovalStatusRequest",
"lifecycleQueryApprovalStatusRequest",
",",
"Collection",
"<",
"Peer",
">",
"peers",
")",
"throws",
"InvalidArgum... | Query approval status for all organizations.
@param lifecycleQueryApprovalStatusRequest The request see {@link LifecycleQueryApprovalStatusRequest}
@param peers Peers to send the request. Usually only need one.
@return A {@link LifecycleQueryApprovalStatusProposalResponse}
@throws Invalid... | [
"Query",
"approval",
"status",
"for",
"all",
"organizations",
"."
] | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L3736-L3816 |
22,126 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/Channel.java | Channel.lifecycleQueryChaincodeDefinition | public Collection<LifecycleQueryChaincodeDefinitionProposalResponse> lifecycleQueryChaincodeDefinition(
QueryLifecycleQueryChaincodeDefinitionRequest queryLifecycleQueryChaincodeDefinitionRequest, Collection<Peer> peers) throws InvalidArgumentException, ProposalException {
if (null == queryLifecycl... | java | public Collection<LifecycleQueryChaincodeDefinitionProposalResponse> lifecycleQueryChaincodeDefinition(
QueryLifecycleQueryChaincodeDefinitionRequest queryLifecycleQueryChaincodeDefinitionRequest, Collection<Peer> peers) throws InvalidArgumentException, ProposalException {
if (null == queryLifecycl... | [
"public",
"Collection",
"<",
"LifecycleQueryChaincodeDefinitionProposalResponse",
">",
"lifecycleQueryChaincodeDefinition",
"(",
"QueryLifecycleQueryChaincodeDefinitionRequest",
"queryLifecycleQueryChaincodeDefinitionRequest",
",",
"Collection",
"<",
"Peer",
">",
"peers",
")",
"throw... | lifecycleQueryChaincodeDefinition get definition of chaincode.
@param queryLifecycleQueryChaincodeDefinitionRequest The request see {@link QueryLifecycleQueryChaincodeDefinitionRequest}
@param peers The peers to send the request to.
@return A {@link LifecycleQueryChaincodeDefini... | [
"lifecycleQueryChaincodeDefinition",
"get",
"definition",
"of",
"chaincode",
"."
] | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L3828-L3855 |
22,127 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/Channel.java | Channel.queryInstantiatedChaincodes | public List<ChaincodeInfo> queryInstantiatedChaincodes(Peer peer) throws InvalidArgumentException, ProposalException {
return queryInstantiatedChaincodes(peer, client.getUserContext());
} | java | public List<ChaincodeInfo> queryInstantiatedChaincodes(Peer peer) throws InvalidArgumentException, ProposalException {
return queryInstantiatedChaincodes(peer, client.getUserContext());
} | [
"public",
"List",
"<",
"ChaincodeInfo",
">",
"queryInstantiatedChaincodes",
"(",
"Peer",
"peer",
")",
"throws",
"InvalidArgumentException",
",",
"ProposalException",
"{",
"return",
"queryInstantiatedChaincodes",
"(",
"peer",
",",
"client",
".",
"getUserContext",
"(",
... | Query peer for chaincode that has been instantiated
<STRONG>This method may not be thread safe if client context is changed!</STRONG>
@param peer The peer to query.
@return A list of ChaincodeInfo @see {@link ChaincodeInfo}
@throws InvalidArgumentException
@throws ProposalException | [
"Query",
"peer",
"for",
"chaincode",
"that",
"has",
"been",
"instantiated"
] | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L3868-L3871 |
22,128 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/Channel.java | Channel.queryCollectionsConfig | public CollectionConfigPackage queryCollectionsConfig(String chaincodeName, Peer peer, User userContext) throws InvalidArgumentException, ProposalException {
if (isNullOrEmpty(chaincodeName)) {
throw new InvalidArgumentException("Parameter chaincodeName expected to be non null or empty string.");
... | java | public CollectionConfigPackage queryCollectionsConfig(String chaincodeName, Peer peer, User userContext) throws InvalidArgumentException, ProposalException {
if (isNullOrEmpty(chaincodeName)) {
throw new InvalidArgumentException("Parameter chaincodeName expected to be non null or empty string.");
... | [
"public",
"CollectionConfigPackage",
"queryCollectionsConfig",
"(",
"String",
"chaincodeName",
",",
"Peer",
"peer",
",",
"User",
"userContext",
")",
"throws",
"InvalidArgumentException",
",",
"ProposalException",
"{",
"if",
"(",
"isNullOrEmpty",
"(",
"chaincodeName",
")... | Get information on the collections used by the chaincode.
@param chaincodeName The name of the chaincode to query.
@param peer Peer to query.
@param userContext The context of the user to sign the request.
@return CollectionConfigPackage with information on the collection used by the chaincode.
@throws Inva... | [
"Get",
"information",
"on",
"the",
"collections",
"used",
"by",
"the",
"chaincode",
"."
] | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L3951-L4010 |
22,129 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/Channel.java | Channel.sendTransactionProposal | public Collection<ProposalResponse> sendTransactionProposal(TransactionProposalRequest transactionProposalRequest, Collection<Peer> peers) throws ProposalException, InvalidArgumentException {
return sendProposal(transactionProposalRequest, peers);
} | java | public Collection<ProposalResponse> sendTransactionProposal(TransactionProposalRequest transactionProposalRequest, Collection<Peer> peers) throws ProposalException, InvalidArgumentException {
return sendProposal(transactionProposalRequest, peers);
} | [
"public",
"Collection",
"<",
"ProposalResponse",
">",
"sendTransactionProposal",
"(",
"TransactionProposalRequest",
"transactionProposalRequest",
",",
"Collection",
"<",
"Peer",
">",
"peers",
")",
"throws",
"ProposalException",
",",
"InvalidArgumentException",
"{",
"return"... | Send a transaction proposal to specific peers.
@param transactionProposalRequest The transaction proposal to be sent to the peers.
@param peers
@return responses from peers.
@throws InvalidArgumentException
@throws ProposalException | [
"Send",
"a",
"transaction",
"proposal",
"to",
"specific",
"peers",
"."
] | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L4354-L4357 |
22,130 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/Channel.java | Channel.sendTransaction | public CompletableFuture<TransactionEvent> sendTransaction(Collection<ProposalResponse> proposalResponses, User userContext) {
return sendTransaction(proposalResponses, getOrderers(), userContext);
} | java | public CompletableFuture<TransactionEvent> sendTransaction(Collection<ProposalResponse> proposalResponses, User userContext) {
return sendTransaction(proposalResponses, getOrderers(), userContext);
} | [
"public",
"CompletableFuture",
"<",
"TransactionEvent",
">",
"sendTransaction",
"(",
"Collection",
"<",
"ProposalResponse",
">",
"proposalResponses",
",",
"User",
"userContext",
")",
"{",
"return",
"sendTransaction",
"(",
"proposalResponses",
",",
"getOrderers",
"(",
... | Send transaction to one of the orderers on the channel using a specific user context.
@param proposalResponses The proposal responses to be sent to the orderer.
@param userContext The usercontext used for signing transaction.
@return a future allowing access to the result of the transaction invocation once compl... | [
"Send",
"transaction",
"to",
"one",
"of",
"the",
"orderers",
"on",
"the",
"channel",
"using",
"a",
"specific",
"user",
"context",
"."
] | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L4631-L4635 |
22,131 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/Channel.java | Channel.sendTransaction | public CompletableFuture<TransactionEvent> sendTransaction(Collection<? extends ProposalResponse> proposalResponses, Collection<Orderer> orderers) {
return sendTransaction(proposalResponses, orderers, client.getUserContext());
} | java | public CompletableFuture<TransactionEvent> sendTransaction(Collection<? extends ProposalResponse> proposalResponses, Collection<Orderer> orderers) {
return sendTransaction(proposalResponses, orderers, client.getUserContext());
} | [
"public",
"CompletableFuture",
"<",
"TransactionEvent",
">",
"sendTransaction",
"(",
"Collection",
"<",
"?",
"extends",
"ProposalResponse",
">",
"proposalResponses",
",",
"Collection",
"<",
"Orderer",
">",
"orderers",
")",
"{",
"return",
"sendTransaction",
"(",
"pro... | Send transaction to one of the specified orderers using the usercontext set on the client..
@param proposalResponses The proposal responses to be sent to the orderer
@param orderers The orderers to send the transaction to.
@return a future allowing access to the result of the transaction invocation once compl... | [
"Send",
"transaction",
"to",
"one",
"of",
"the",
"specified",
"orderers",
"using",
"the",
"usercontext",
"set",
"on",
"the",
"client",
".."
] | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L4657-L4660 |
22,132 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/Channel.java | Channel.getRespData | private String getRespData(BroadcastResponse resp) {
StringBuilder respdata = new StringBuilder(400);
if (resp != null) {
Status status = resp.getStatus();
if (null != status) {
respdata.append(status.name());
respdata.append("-");
... | java | private String getRespData(BroadcastResponse resp) {
StringBuilder respdata = new StringBuilder(400);
if (resp != null) {
Status status = resp.getStatus();
if (null != status) {
respdata.append(status.name());
respdata.append("-");
... | [
"private",
"String",
"getRespData",
"(",
"BroadcastResponse",
"resp",
")",
"{",
"StringBuilder",
"respdata",
"=",
"new",
"StringBuilder",
"(",
"400",
")",
";",
"if",
"(",
"resp",
"!=",
"null",
")",
"{",
"Status",
"status",
"=",
"resp",
".",
"getStatus",
"(... | Build response details
@param resp
@return | [
"Build",
"response",
"details"
] | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L5405-L5430 |
22,133 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/Channel.java | Channel.registerBlockListener | public String registerBlockListener(BlockListener listener) throws InvalidArgumentException {
if (shutdown) {
throw new InvalidArgumentException(format("Channel %s has been shutdown.", name));
}
if (null == listener) {
throw new InvalidArgumentException("Listener parame... | java | public String registerBlockListener(BlockListener listener) throws InvalidArgumentException {
if (shutdown) {
throw new InvalidArgumentException(format("Channel %s has been shutdown.", name));
}
if (null == listener) {
throw new InvalidArgumentException("Listener parame... | [
"public",
"String",
"registerBlockListener",
"(",
"BlockListener",
"listener",
")",
"throws",
"InvalidArgumentException",
"{",
"if",
"(",
"shutdown",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"format",
"(",
"\"Channel %s has been shutdown.\"",
",",
"nam... | Register a block listener.
@param listener function with single argument with type {@link BlockEvent}
@return The handle of the registered block listener.
@throws InvalidArgumentException if the channel is shutdown. | [
"Register",
"a",
"block",
"listener",
"."
] | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L5489-L5505 |
22,134 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/Channel.java | Channel.unregisterBlockListener | public boolean unregisterBlockListener(String handle) throws InvalidArgumentException {
if (shutdown) {
throw new InvalidArgumentException(format("Channel %s has been shutdown.", name));
}
checkHandle(BLOCK_LISTENER_TAG, handle);
logger.trace(format("Unregister BlockListene... | java | public boolean unregisterBlockListener(String handle) throws InvalidArgumentException {
if (shutdown) {
throw new InvalidArgumentException(format("Channel %s has been shutdown.", name));
}
checkHandle(BLOCK_LISTENER_TAG, handle);
logger.trace(format("Unregister BlockListene... | [
"public",
"boolean",
"unregisterBlockListener",
"(",
"String",
"handle",
")",
"throws",
"InvalidArgumentException",
"{",
"if",
"(",
"shutdown",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"format",
"(",
"\"Channel %s has been shutdown.\"",
",",
"name",
... | Unregister a block listener.
@param handle of Block listener to remove.
@return false if not found.
@throws InvalidArgumentException if the channel is shutdown or invalid arguments. | [
"Unregister",
"a",
"block",
"listener",
"."
] | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L5576-L5595 |
22,135 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/Channel.java | Channel.registerTransactionListenerProcessor | private String registerTransactionListenerProcessor() throws InvalidArgumentException {
logger.debug(format("Channel %s registerTransactionListenerProcessor starting", name));
// Transaction listener is internal Block listener for transactions
return registerBlockListener(blockEvent -> {
... | java | private String registerTransactionListenerProcessor() throws InvalidArgumentException {
logger.debug(format("Channel %s registerTransactionListenerProcessor starting", name));
// Transaction listener is internal Block listener for transactions
return registerBlockListener(blockEvent -> {
... | [
"private",
"String",
"registerTransactionListenerProcessor",
"(",
")",
"throws",
"InvalidArgumentException",
"{",
"logger",
".",
"debug",
"(",
"format",
"(",
"\"Channel %s registerTransactionListenerProcessor starting\"",
",",
"name",
")",
")",
";",
"// Transaction listener i... | Own block listener to manage transactions.
@return | [
"Own",
"block",
"listener",
"to",
"manage",
"transactions",
"."
] | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L5718-L5800 |
22,136 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/Channel.java | Channel.registerTxListener | private CompletableFuture<TransactionEvent> registerTxListener(String txid, NOfEvents nOfEvents, boolean failFast) {
CompletableFuture<TransactionEvent> future = new CompletableFuture<>();
new TL(txid, future, nOfEvents, failFast);
return future;
} | java | private CompletableFuture<TransactionEvent> registerTxListener(String txid, NOfEvents nOfEvents, boolean failFast) {
CompletableFuture<TransactionEvent> future = new CompletableFuture<>();
new TL(txid, future, nOfEvents, failFast);
return future;
} | [
"private",
"CompletableFuture",
"<",
"TransactionEvent",
">",
"registerTxListener",
"(",
"String",
"txid",
",",
"NOfEvents",
"nOfEvents",
",",
"boolean",
"failFast",
")",
"{",
"CompletableFuture",
"<",
"TransactionEvent",
">",
"future",
"=",
"new",
"CompletableFuture"... | Register a transactionId that to get notification on when the event is seen in the block chain.
@param txid
@param nOfEvents
@return | [
"Register",
"a",
"transactionId",
"that",
"to",
"get",
"notification",
"on",
"when",
"the",
"event",
"is",
"seen",
"in",
"the",
"block",
"chain",
"."
] | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L5862-L5870 |
22,137 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/Channel.java | Channel.registerChaincodeEventListener | public String registerChaincodeEventListener(Pattern chaincodeId, Pattern eventName, ChaincodeEventListener chaincodeEventListener) throws InvalidArgumentException {
if (shutdown) {
throw new InvalidArgumentException(format("Channel %s has been shutdown.", name));
}
if (chaincodeId... | java | public String registerChaincodeEventListener(Pattern chaincodeId, Pattern eventName, ChaincodeEventListener chaincodeEventListener) throws InvalidArgumentException {
if (shutdown) {
throw new InvalidArgumentException(format("Channel %s has been shutdown.", name));
}
if (chaincodeId... | [
"public",
"String",
"registerChaincodeEventListener",
"(",
"Pattern",
"chaincodeId",
",",
"Pattern",
"eventName",
",",
"ChaincodeEventListener",
"chaincodeEventListener",
")",
"throws",
"InvalidArgumentException",
"{",
"if",
"(",
"shutdown",
")",
"{",
"throw",
"new",
"I... | Register a chaincode event listener. Both chaincodeId pattern AND eventName pattern must match to invoke
the chaincodeEventListener
@param chaincodeId Java pattern for chaincode identifier also know as chaincode name. If ma
@param eventName Java pattern to match the event name.
@param chaincode... | [
"Register",
"a",
"chaincode",
"event",
"listener",
".",
"Both",
"chaincodeId",
"pattern",
"AND",
"eventName",
"pattern",
"must",
"match",
"to",
"invoke",
"the",
"chaincodeEventListener"
] | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L5897-L5923 |
22,138 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/Channel.java | Channel.unregisterChaincodeEventListener | public boolean unregisterChaincodeEventListener(String handle) throws InvalidArgumentException {
boolean ret;
if (shutdown) {
throw new InvalidArgumentException(format("Channel %s has been shutdown.", name));
}
checkHandle(CHAINCODE_EVENTS_TAG, handle);
synchronize... | java | public boolean unregisterChaincodeEventListener(String handle) throws InvalidArgumentException {
boolean ret;
if (shutdown) {
throw new InvalidArgumentException(format("Channel %s has been shutdown.", name));
}
checkHandle(CHAINCODE_EVENTS_TAG, handle);
synchronize... | [
"public",
"boolean",
"unregisterChaincodeEventListener",
"(",
"String",
"handle",
")",
"throws",
"InvalidArgumentException",
"{",
"boolean",
"ret",
";",
"if",
"(",
"shutdown",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"format",
"(",
"\"Channel %s has ... | Unregister an existing chaincode event listener.
@param handle Chaincode event listener handle to be unregistered.
@return True if the chaincode handler was found and removed.
@throws InvalidArgumentException | [
"Unregister",
"an",
"existing",
"chaincode",
"event",
"listener",
"."
] | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L5933-L5957 |
22,139 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/Channel.java | Channel.shutdown | public synchronized void shutdown(boolean force) {
if (shutdown) {
return;
}
String ltransactionListenerProcessorHandle = transactionListenerProcessorHandle;
transactionListenerProcessorHandle = null;
if (null != ltransactionListenerProcessorHandle) {
t... | java | public synchronized void shutdown(boolean force) {
if (shutdown) {
return;
}
String ltransactionListenerProcessorHandle = transactionListenerProcessorHandle;
transactionListenerProcessorHandle = null;
if (null != ltransactionListenerProcessorHandle) {
t... | [
"public",
"synchronized",
"void",
"shutdown",
"(",
"boolean",
"force",
")",
"{",
"if",
"(",
"shutdown",
")",
"{",
"return",
";",
"}",
"String",
"ltransactionListenerProcessorHandle",
"=",
"transactionListenerProcessorHandle",
";",
"transactionListenerProcessorHandle",
"... | Shutdown the channel with all resources released.
@param force force immediate shutdown. | [
"Shutdown",
"the",
"channel",
"with",
"all",
"resources",
"released",
"."
] | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L6042-L6135 |
22,140 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/Channel.java | Channel.serializeChannel | public void serializeChannel(File file) throws IOException, InvalidArgumentException {
if (null == file) {
throw new InvalidArgumentException("File parameter may not be null");
}
Files.write(Paths.get(file.getAbsolutePath()), serializeChannel(),
StandardOpenOption.C... | java | public void serializeChannel(File file) throws IOException, InvalidArgumentException {
if (null == file) {
throw new InvalidArgumentException("File parameter may not be null");
}
Files.write(Paths.get(file.getAbsolutePath()), serializeChannel(),
StandardOpenOption.C... | [
"public",
"void",
"serializeChannel",
"(",
"File",
"file",
")",
"throws",
"IOException",
",",
"InvalidArgumentException",
"{",
"if",
"(",
"null",
"==",
"file",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"\"File parameter may not be null\"",
")",
";",... | Serialize channel to a file using Java serialization.
Deserialized channel will NOT be in an initialized state.
@param file file
@throws IOException
@throws InvalidArgumentException | [
"Serialize",
"channel",
"to",
"a",
"file",
"using",
"Java",
"serialization",
".",
"Deserialized",
"channel",
"will",
"NOT",
"be",
"in",
"an",
"initialized",
"state",
"."
] | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L6146-L6155 |
22,141 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/Channel.java | Channel.serializeChannel | public byte[] serializeChannel() throws IOException, InvalidArgumentException {
if (isShutdown()) {
throw new InvalidArgumentException(format("Channel %s has been shutdown.", getName()));
}
ObjectOutputStream out = null;
try {
ByteArrayOutputStream bai = new By... | java | public byte[] serializeChannel() throws IOException, InvalidArgumentException {
if (isShutdown()) {
throw new InvalidArgumentException(format("Channel %s has been shutdown.", getName()));
}
ObjectOutputStream out = null;
try {
ByteArrayOutputStream bai = new By... | [
"public",
"byte",
"[",
"]",
"serializeChannel",
"(",
")",
"throws",
"IOException",
",",
"InvalidArgumentException",
"{",
"if",
"(",
"isShutdown",
"(",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"format",
"(",
"\"Channel %s has been shutdown.\"",... | Serialize channel to a byte array using Java serialization.
Deserialized channel will NOT be in an initialized state.
@throws InvalidArgumentException
@throws IOException | [
"Serialize",
"channel",
"to",
"a",
"byte",
"array",
"using",
"Java",
"serialization",
".",
"Deserialized",
"channel",
"will",
"NOT",
"be",
"in",
"an",
"initialized",
"state",
"."
] | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L6164-L6188 |
22,142 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/idemix/RevocationAuthority.java | RevocationAuthority.getProofBytes | public static int getProofBytes(RevocationAlgorithm alg) {
if (alg == null) {
throw new IllegalArgumentException("Revocation algorithm cannot be null");
}
switch (alg) {
case ALG_NO_REVOCATION:
return 0;
default:
throw new Illeg... | java | public static int getProofBytes(RevocationAlgorithm alg) {
if (alg == null) {
throw new IllegalArgumentException("Revocation algorithm cannot be null");
}
switch (alg) {
case ALG_NO_REVOCATION:
return 0;
default:
throw new Illeg... | [
"public",
"static",
"int",
"getProofBytes",
"(",
"RevocationAlgorithm",
"alg",
")",
"{",
"if",
"(",
"alg",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Revocation algorithm cannot be null\"",
")",
";",
"}",
"switch",
"(",
"alg",
")... | Depending on the selected revocation algorithm, the proof data length will be different.
This method will give the proof length for any supported revocation algorithm.
@param alg The revocation algorithm
@return The proof data length for the given revocation algorithm | [
"Depending",
"on",
"the",
"selected",
"revocation",
"algorithm",
"the",
"proof",
"data",
"length",
"will",
"be",
"different",
".",
"This",
"method",
"will",
"give",
"the",
"proof",
"length",
"for",
"any",
"supported",
"revocation",
"algorithm",
"."
] | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/idemix/RevocationAuthority.java#L48-L58 |
22,143 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/idemix/RevocationAuthority.java | RevocationAuthority.generateLongTermRevocationKey | public static java.security.KeyPair generateLongTermRevocationKey() {
try {
KeyPairGenerator keyGen = KeyPairGenerator.getInstance("EC");
SecureRandom random = new SecureRandom();
AlgorithmParameterSpec params = new ECGenParameterSpec("secp384r1");
keyGen.initiali... | java | public static java.security.KeyPair generateLongTermRevocationKey() {
try {
KeyPairGenerator keyGen = KeyPairGenerator.getInstance("EC");
SecureRandom random = new SecureRandom();
AlgorithmParameterSpec params = new ECGenParameterSpec("secp384r1");
keyGen.initiali... | [
"public",
"static",
"java",
".",
"security",
".",
"KeyPair",
"generateLongTermRevocationKey",
"(",
")",
"{",
"try",
"{",
"KeyPairGenerator",
"keyGen",
"=",
"KeyPairGenerator",
".",
"getInstance",
"(",
"\"EC\"",
")",
";",
"SecureRandom",
"random",
"=",
"new",
"Se... | Generate a long term ECDSA key pair used for revocation
@return Freshly generated ECDSA key pair | [
"Generate",
"a",
"long",
"term",
"ECDSA",
"key",
"pair",
"used",
"for",
"revocation"
] | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/idemix/RevocationAuthority.java#L65-L76 |
22,144 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/idemix/RevocationAuthority.java | RevocationAuthority.createCRI | public static Idemix.CredentialRevocationInformation createCRI(PrivateKey key, BIG[] unrevokedHandles, int epoch, RevocationAlgorithm alg) throws CryptoException {
Idemix.CredentialRevocationInformation.Builder builder = Idemix.CredentialRevocationInformation.newBuilder();
builder.setRevocationAlg(alg.o... | java | public static Idemix.CredentialRevocationInformation createCRI(PrivateKey key, BIG[] unrevokedHandles, int epoch, RevocationAlgorithm alg) throws CryptoException {
Idemix.CredentialRevocationInformation.Builder builder = Idemix.CredentialRevocationInformation.newBuilder();
builder.setRevocationAlg(alg.o... | [
"public",
"static",
"Idemix",
".",
"CredentialRevocationInformation",
"createCRI",
"(",
"PrivateKey",
"key",
",",
"BIG",
"[",
"]",
"unrevokedHandles",
",",
"int",
"epoch",
",",
"RevocationAlgorithm",
"alg",
")",
"throws",
"CryptoException",
"{",
"Idemix",
".",
"Cr... | Creates a Credential Revocation Information object
@param key Private key
@param unrevokedHandles Array of unrevoked revocation handles
@param epoch The counter (representing a time window) in which this CRI is valid
@param alg Revocation algorithm
@return CredentialRevocationInfor... | [
"Creates",
"a",
"Credential",
"Revocation",
"Information",
"object"
] | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/idemix/RevocationAuthority.java#L87-L123 |
22,145 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/idemix/RevocationAuthority.java | RevocationAuthority.verifyEpochPK | public static boolean verifyEpochPK(PublicKey pk, Idemix.ECP2 epochPK, byte[] epochPkSig, long epoch, RevocationAlgorithm alg) throws CryptoException {
Idemix.CredentialRevocationInformation.Builder builder = Idemix.CredentialRevocationInformation.newBuilder();
builder.setRevocationAlg(alg.ordinal());
... | java | public static boolean verifyEpochPK(PublicKey pk, Idemix.ECP2 epochPK, byte[] epochPkSig, long epoch, RevocationAlgorithm alg) throws CryptoException {
Idemix.CredentialRevocationInformation.Builder builder = Idemix.CredentialRevocationInformation.newBuilder();
builder.setRevocationAlg(alg.ordinal());
... | [
"public",
"static",
"boolean",
"verifyEpochPK",
"(",
"PublicKey",
"pk",
",",
"Idemix",
".",
"ECP2",
"epochPK",
",",
"byte",
"[",
"]",
"epochPkSig",
",",
"long",
"epoch",
",",
"RevocationAlgorithm",
"alg",
")",
"throws",
"CryptoException",
"{",
"Idemix",
".",
... | Verifies that the revocation PK for a certain epoch is valid,
by checking that it was signed with the long term revocation key
@param pk Public Key
@param epochPK Epoch PK
@param epochPkSig Epoch PK Signature
@param epoch Epoch
@param alg Revocation algorithm
@return True if valid | [
"Verifies",
"that",
"the",
"revocation",
"PK",
"for",
"a",
"certain",
"epoch",
"is",
"valid",
"by",
"checking",
"that",
"it",
"was",
"signed",
"with",
"the",
"long",
"term",
"revocation",
"key"
] | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/idemix/RevocationAuthority.java#L136-L152 |
22,146 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/identity/IdemixIdentity.java | IdemixIdentity.createSerializedIdentity | @Override
public Identities.SerializedIdentity createSerializedIdentity() {
MspPrincipal.OrganizationUnit ou = MspPrincipal.OrganizationUnit.newBuilder()
.setCertifiersIdentifier(ByteString.copyFrom(this.ipkHash))
.setMspIdentifier(this.mspId)
.setOrganization... | java | @Override
public Identities.SerializedIdentity createSerializedIdentity() {
MspPrincipal.OrganizationUnit ou = MspPrincipal.OrganizationUnit.newBuilder()
.setCertifiersIdentifier(ByteString.copyFrom(this.ipkHash))
.setMspIdentifier(this.mspId)
.setOrganization... | [
"@",
"Override",
"public",
"Identities",
".",
"SerializedIdentity",
"createSerializedIdentity",
"(",
")",
"{",
"MspPrincipal",
".",
"OrganizationUnit",
"ou",
"=",
"MspPrincipal",
".",
"OrganizationUnit",
".",
"newBuilder",
"(",
")",
".",
"setCertifiersIdentifier",
"("... | Serialize Idemix Identity | [
"Serialize",
"Idemix",
"Identity"
] | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/identity/IdemixIdentity.java#L155-L182 |
22,147 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric_ca/sdk/RegistrationRequest.java | RegistrationRequest.toJsonObject | JsonObject toJsonObject() {
JsonObjectBuilder ob = Json.createObjectBuilder();
ob.add("id", enrollmentID);
ob.add("type", type);
if (this.secret != null) {
ob.add("secret", secret);
}
if (null != maxEnrollments) {
ob.add("max_enrollments", maxEnro... | java | JsonObject toJsonObject() {
JsonObjectBuilder ob = Json.createObjectBuilder();
ob.add("id", enrollmentID);
ob.add("type", type);
if (this.secret != null) {
ob.add("secret", secret);
}
if (null != maxEnrollments) {
ob.add("max_enrollments", maxEnro... | [
"JsonObject",
"toJsonObject",
"(",
")",
"{",
"JsonObjectBuilder",
"ob",
"=",
"Json",
".",
"createObjectBuilder",
"(",
")",
";",
"ob",
".",
"add",
"(",
"\"id\"",
",",
"enrollmentID",
")",
";",
"ob",
".",
"add",
"(",
"\"type\"",
",",
"type",
")",
";",
"i... | Convert the registration request to a JSON object | [
"Convert",
"the",
"registration",
"request",
"to",
"a",
"JSON",
"object"
] | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric_ca/sdk/RegistrationRequest.java#L147-L171 |
22,148 | hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/LifecycleQueryNamespaceDefinitionsProposalResponse.java | LifecycleQueryNamespaceDefinitionsProposalResponse.getChaincodeNamespaceTypes | public Collection<String> getChaincodeNamespaceTypes() throws ProposalException {
final Lifecycle.QueryNamespaceDefinitionsResult queryNamespaceDefinitionsResult = parsePayload();
if (queryNamespaceDefinitionsResult == null) {
return Collections.emptySet();
}
final Map<Stri... | java | public Collection<String> getChaincodeNamespaceTypes() throws ProposalException {
final Lifecycle.QueryNamespaceDefinitionsResult queryNamespaceDefinitionsResult = parsePayload();
if (queryNamespaceDefinitionsResult == null) {
return Collections.emptySet();
}
final Map<Stri... | [
"public",
"Collection",
"<",
"String",
">",
"getChaincodeNamespaceTypes",
"(",
")",
"throws",
"ProposalException",
"{",
"final",
"Lifecycle",
".",
"QueryNamespaceDefinitionsResult",
"queryNamespaceDefinitionsResult",
"=",
"parsePayload",
"(",
")",
";",
"if",
"(",
"query... | The names of chaincode that have been committed.
@return The names of chaincode that have been committed.
@throws ProposalException | [
"The",
"names",
"of",
"chaincode",
"that",
"have",
"been",
"committed",
"."
] | 4a2d7b3408b8b0a1ed812aa36942c438159c37a0 | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/LifecycleQueryNamespaceDefinitionsProposalResponse.java#L74-L94 |
22,149 | primefaces/primefaces | src/main/java/org/primefaces/model/charts/axes/radial/linear/RadialLinearAngleLines.java | RadialLinearAngleLines.encode | public String encode() throws IOException {
FastStringWriter fsw = new FastStringWriter();
try {
fsw.write("{");
ChartUtils.writeDataValue(fsw, "display", this.display, false);
ChartUtils.writeDataValue(fsw, "color", this.color, true);
ChartUtils.writeDa... | java | public String encode() throws IOException {
FastStringWriter fsw = new FastStringWriter();
try {
fsw.write("{");
ChartUtils.writeDataValue(fsw, "display", this.display, false);
ChartUtils.writeDataValue(fsw, "color", this.color, true);
ChartUtils.writeDa... | [
"public",
"String",
"encode",
"(",
")",
"throws",
"IOException",
"{",
"FastStringWriter",
"fsw",
"=",
"new",
"FastStringWriter",
"(",
")",
";",
"try",
"{",
"fsw",
".",
"write",
"(",
"\"{\"",
")",
";",
"ChartUtils",
".",
"writeDataValue",
"(",
"fsw",
",",
... | Write the options of angled lines on radial linear type
@return options as JSON object
@throws java.io.IOException If an I/O error occurs | [
"Write",
"the",
"options",
"of",
"angled",
"lines",
"on",
"radial",
"linear",
"type"
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/model/charts/axes/radial/linear/RadialLinearAngleLines.java#L103-L120 |
22,150 | primefaces/primefaces | src/main/java/org/primefaces/component/imagecropper/ImageCropperRenderer.java | ImageCropperRenderer.guessImageFormat | private String guessImageFormat(String contentType, String imagePath) throws IOException {
String format = "png";
if (contentType == null) {
contentType = URLConnection.guessContentTypeFromName(imagePath);
}
if (contentType != null) {
format = contentType.repla... | java | private String guessImageFormat(String contentType, String imagePath) throws IOException {
String format = "png";
if (contentType == null) {
contentType = URLConnection.guessContentTypeFromName(imagePath);
}
if (contentType != null) {
format = contentType.repla... | [
"private",
"String",
"guessImageFormat",
"(",
"String",
"contentType",
",",
"String",
"imagePath",
")",
"throws",
"IOException",
"{",
"String",
"format",
"=",
"\"png\"",
";",
"if",
"(",
"contentType",
"==",
"null",
")",
"{",
"contentType",
"=",
"URLConnection",
... | Attempt to obtain the image format used to write the image from the contentType or the image's file extension. | [
"Attempt",
"to",
"obtain",
"the",
"image",
"format",
"used",
"to",
"write",
"the",
"image",
"from",
"the",
"contentType",
"or",
"the",
"image",
"s",
"file",
"extension",
"."
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/component/imagecropper/ImageCropperRenderer.java#L281-L307 |
22,151 | primefaces/primefaces | src/main/java/org/primefaces/util/ChartUtils.java | ChartUtils.writeDataValue | public static void writeDataValue(Writer fsw, String optionName, Object value, boolean hasComma) throws IOException {
if (value == null) {
return;
}
boolean isList = value instanceof List;
if (hasComma) {
fsw.write(",");
}
fsw.write("\"" + optio... | java | public static void writeDataValue(Writer fsw, String optionName, Object value, boolean hasComma) throws IOException {
if (value == null) {
return;
}
boolean isList = value instanceof List;
if (hasComma) {
fsw.write(",");
}
fsw.write("\"" + optio... | [
"public",
"static",
"void",
"writeDataValue",
"(",
"Writer",
"fsw",
",",
"String",
"optionName",
",",
"Object",
"value",
",",
"boolean",
"hasComma",
")",
"throws",
"IOException",
"{",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"return",
";",
"}",
"boolean... | Write the value of chartJs options
@param fsw a writer object that use to write the value of an option
@param optionName the name of an option
@param value the value of an option
@param hasComma specifies whether to add a comma at the beginning of the option name
@throws java.io.IOException if writer named fsw is null | [
"Write",
"the",
"value",
"of",
"chartJs",
"options"
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/util/ChartUtils.java#L48-L91 |
22,152 | primefaces/primefaces | src/main/java/org/primefaces/model/charts/axes/radial/linear/RadialLinearTicks.java | RadialLinearTicks.encode | @Override
public String encode() throws IOException {
FastStringWriter fsw = new FastStringWriter();
try {
fsw.write("{");
fsw.write(super.encode());
ChartUtils.writeDataValue(fsw, "beginAtZero", this.beginAtZero, true);
ChartUtils.writeDataValue(fsw... | java | @Override
public String encode() throws IOException {
FastStringWriter fsw = new FastStringWriter();
try {
fsw.write("{");
fsw.write(super.encode());
ChartUtils.writeDataValue(fsw, "beginAtZero", this.beginAtZero, true);
ChartUtils.writeDataValue(fsw... | [
"@",
"Override",
"public",
"String",
"encode",
"(",
")",
"throws",
"IOException",
"{",
"FastStringWriter",
"fsw",
"=",
"new",
"FastStringWriter",
"(",
")",
";",
"try",
"{",
"fsw",
".",
"write",
"(",
"\"{\"",
")",
";",
"fsw",
".",
"write",
"(",
"super",
... | Write the radial linear ticks
@return options as JSON object
@throws java.io.IOException If an I/O error occurs | [
"Write",
"the",
"radial",
"linear",
"ticks"
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/model/charts/axes/radial/linear/RadialLinearTicks.java#L255-L282 |
22,153 | primefaces/primefaces | src/main/java/org/primefaces/model/charts/optionconfig/elements/ElementsArc.java | ElementsArc.encode | public String encode() throws IOException {
FastStringWriter fsw = new FastStringWriter();
try {
ChartUtils.writeDataValue(fsw, "borderWidth", this.borderWidth, false);
ChartUtils.writeDataValue(fsw, "backgroundColor", this.backgroundColor, true);
ChartUtils.writeDat... | java | public String encode() throws IOException {
FastStringWriter fsw = new FastStringWriter();
try {
ChartUtils.writeDataValue(fsw, "borderWidth", this.borderWidth, false);
ChartUtils.writeDataValue(fsw, "backgroundColor", this.backgroundColor, true);
ChartUtils.writeDat... | [
"public",
"String",
"encode",
"(",
")",
"throws",
"IOException",
"{",
"FastStringWriter",
"fsw",
"=",
"new",
"FastStringWriter",
"(",
")",
";",
"try",
"{",
"ChartUtils",
".",
"writeDataValue",
"(",
"fsw",
",",
"\"borderWidth\"",
",",
"this",
".",
"borderWidth"... | Write the arc options of Elements
@return options as JSON object
@throws java.io.IOException If an I/O error occurs | [
"Write",
"the",
"arc",
"options",
"of",
"Elements"
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/model/charts/optionconfig/elements/ElementsArc.java#L103-L116 |
22,154 | primefaces/primefaces | src/main/java/org/primefaces/model/CheckboxTreeNodeChildren.java | CheckboxTreeNodeChildren.setSibling | @Override
public TreeNode setSibling(int index, TreeNode node) {
if (node == null) {
throw new NullPointerException();
}
else if ((index < 0) || (index >= size())) {
throw new IndexOutOfBoundsException();
}
else {
if (!parent.equals(node.ge... | java | @Override
public TreeNode setSibling(int index, TreeNode node) {
if (node == null) {
throw new NullPointerException();
}
else if ((index < 0) || (index >= size())) {
throw new IndexOutOfBoundsException();
}
else {
if (!parent.equals(node.ge... | [
"@",
"Override",
"public",
"TreeNode",
"setSibling",
"(",
"int",
"index",
",",
"TreeNode",
"node",
")",
"{",
"if",
"(",
"node",
"==",
"null",
")",
"{",
"throw",
"new",
"NullPointerException",
"(",
")",
";",
"}",
"else",
"if",
"(",
"(",
"index",
"<",
... | Optimized set implementation to be used in sorting
@param index index of the element to replace
@param node node to be stored at the specified position
@return the node previously at the specified position | [
"Optimized",
"set",
"implementation",
"to",
"be",
"used",
"in",
"sorting"
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/model/CheckboxTreeNodeChildren.java#L160-L180 |
22,155 | primefaces/primefaces | src/main/java/org/primefaces/util/DateUtils.java | DateUtils.toLocalDate | public static long toLocalDate(TimeZone browserTZ, TimeZone targetTZ, Date utcDate) {
long utc = utcDate.getTime();
int targetOffsetFromUTC = targetTZ.getOffset(utc);
int browserOffsetFromUTC = browserTZ.getOffset(utc);
return utc + targetOffsetFromUTC - browserOffsetFromUTC;
} | java | public static long toLocalDate(TimeZone browserTZ, TimeZone targetTZ, Date utcDate) {
long utc = utcDate.getTime();
int targetOffsetFromUTC = targetTZ.getOffset(utc);
int browserOffsetFromUTC = browserTZ.getOffset(utc);
return utc + targetOffsetFromUTC - browserOffsetFromUTC;
} | [
"public",
"static",
"long",
"toLocalDate",
"(",
"TimeZone",
"browserTZ",
",",
"TimeZone",
"targetTZ",
",",
"Date",
"utcDate",
")",
"{",
"long",
"utc",
"=",
"utcDate",
".",
"getTime",
"(",
")",
";",
"int",
"targetOffsetFromUTC",
"=",
"targetTZ",
".",
"getOffs... | convert from UTC to local date | [
"convert",
"from",
"UTC",
"to",
"local",
"date"
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/util/DateUtils.java#L62-L68 |
22,156 | primefaces/primefaces | src/main/java/org/primefaces/renderkit/InputRenderer.java | InputRenderer.renderARIARequired | protected void renderARIARequired(FacesContext context, UIInput component) throws IOException {
if (component.isRequired()) {
ResponseWriter writer = context.getResponseWriter();
writer.writeAttribute(HTML.ARIA_REQUIRED, "true", null);
}
} | java | protected void renderARIARequired(FacesContext context, UIInput component) throws IOException {
if (component.isRequired()) {
ResponseWriter writer = context.getResponseWriter();
writer.writeAttribute(HTML.ARIA_REQUIRED, "true", null);
}
} | [
"protected",
"void",
"renderARIARequired",
"(",
"FacesContext",
"context",
",",
"UIInput",
"component",
")",
"throws",
"IOException",
"{",
"if",
"(",
"component",
".",
"isRequired",
"(",
")",
")",
"{",
"ResponseWriter",
"writer",
"=",
"context",
".",
"getRespons... | Adds "aria-required" if the component is required.
@param context the {@link FacesContext}
@param component the {@link UIInput} component to add attributes for
@throws IOException if any error occurs writing the response | [
"Adds",
"aria",
"-",
"required",
"if",
"the",
"component",
"is",
"required",
"."
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/renderkit/InputRenderer.java#L81-L86 |
22,157 | primefaces/primefaces | src/main/java/org/primefaces/renderkit/InputRenderer.java | InputRenderer.renderARIAInvalid | protected void renderARIAInvalid(FacesContext context, UIInput component) throws IOException {
if (!component.isValid()) {
ResponseWriter writer = context.getResponseWriter();
writer.writeAttribute(HTML.ARIA_INVALID, "true", null);
}
} | java | protected void renderARIAInvalid(FacesContext context, UIInput component) throws IOException {
if (!component.isValid()) {
ResponseWriter writer = context.getResponseWriter();
writer.writeAttribute(HTML.ARIA_INVALID, "true", null);
}
} | [
"protected",
"void",
"renderARIAInvalid",
"(",
"FacesContext",
"context",
",",
"UIInput",
"component",
")",
"throws",
"IOException",
"{",
"if",
"(",
"!",
"component",
".",
"isValid",
"(",
")",
")",
"{",
"ResponseWriter",
"writer",
"=",
"context",
".",
"getResp... | Adds "aria-invalid" if the component is invalid.
@param context the {@link FacesContext}
@param component the {@link UIInput} component to add attributes for
@throws IOException if any error occurs writing the response | [
"Adds",
"aria",
"-",
"invalid",
"if",
"the",
"component",
"is",
"invalid",
"."
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/renderkit/InputRenderer.java#L95-L100 |
22,158 | primefaces/primefaces | src/main/java/org/primefaces/renderkit/InputRenderer.java | InputRenderer.renderARIACombobox | protected void renderARIACombobox(FacesContext context, UIInput component) throws IOException {
ResponseWriter writer = context.getResponseWriter();
writer.writeAttribute("role", "combobox", null);
writer.writeAttribute(HTML.ARIA_HASPOPUP, "true", null);
writer.writeAttribute(HTML.ARIA_E... | java | protected void renderARIACombobox(FacesContext context, UIInput component) throws IOException {
ResponseWriter writer = context.getResponseWriter();
writer.writeAttribute("role", "combobox", null);
writer.writeAttribute(HTML.ARIA_HASPOPUP, "true", null);
writer.writeAttribute(HTML.ARIA_E... | [
"protected",
"void",
"renderARIACombobox",
"(",
"FacesContext",
"context",
",",
"UIInput",
"component",
")",
"throws",
"IOException",
"{",
"ResponseWriter",
"writer",
"=",
"context",
".",
"getResponseWriter",
"(",
")",
";",
"writer",
".",
"writeAttribute",
"(",
"\... | Adds ARIA attributes if the component is "role=combobox".
@param context the {@link FacesContext}
@param component the {@link UIInput} component to add attributes for
@throws IOException if any error occurs writing the response
@see https://www.w3.org/TR/wai-aria-practices/#combobox | [
"Adds",
"ARIA",
"attributes",
"if",
"the",
"component",
"is",
"role",
"=",
"combobox",
"."
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/renderkit/InputRenderer.java#L153-L158 |
22,159 | primefaces/primefaces | src/main/java/org/primefaces/PrimeFaces.java | PrimeFaces.focus | public void focus(String expression, UIComponent base) {
if (LangUtils.isValueBlank(expression)) {
return;
}
FacesContext facesContext = getFacesContext();
String clientId = SearchExpressionFacade.resolveClientId(facesContext,
base,
expressio... | java | public void focus(String expression, UIComponent base) {
if (LangUtils.isValueBlank(expression)) {
return;
}
FacesContext facesContext = getFacesContext();
String clientId = SearchExpressionFacade.resolveClientId(facesContext,
base,
expressio... | [
"public",
"void",
"focus",
"(",
"String",
"expression",
",",
"UIComponent",
"base",
")",
"{",
"if",
"(",
"LangUtils",
".",
"isValueBlank",
"(",
"expression",
")",
")",
"{",
"return",
";",
"}",
"FacesContext",
"facesContext",
"=",
"getFacesContext",
"(",
")",... | Resolves the search expression and focus the resolved component.
@param expression the search expression.
@param base the base component from which we will start to resolve the search expression. | [
"Resolves",
"the",
"search",
"expression",
"and",
"focus",
"the",
"resolved",
"component",
"."
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/PrimeFaces.java#L128-L139 |
22,160 | primefaces/primefaces | src/main/java/org/primefaces/PrimeFaces.java | PrimeFaces.clearTableState | public void clearTableState(String key) {
Map<String, Object> sessionMap = getFacesContext().getExternalContext().getSessionMap();
Map<String, TableState> dtState = (Map) sessionMap.get(Constants.TABLE_STATE);
if (dtState != null) {
dtState.remove(key);
}
} | java | public void clearTableState(String key) {
Map<String, Object> sessionMap = getFacesContext().getExternalContext().getSessionMap();
Map<String, TableState> dtState = (Map) sessionMap.get(Constants.TABLE_STATE);
if (dtState != null) {
dtState.remove(key);
}
} | [
"public",
"void",
"clearTableState",
"(",
"String",
"key",
")",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"sessionMap",
"=",
"getFacesContext",
"(",
")",
".",
"getExternalContext",
"(",
")",
".",
"getSessionMap",
"(",
")",
";",
"Map",
"<",
"String",
... | Removes the multiViewState for one specific DataTable within the current session.
@param key Key of the DataTable. See {@link org.primefaces.component.datatable.DataTable#getTableState(boolean)} for the namebuild of this key. | [
"Removes",
"the",
"multiViewState",
"for",
"one",
"specific",
"DataTable",
"within",
"the",
"current",
"session",
"."
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/PrimeFaces.java#L188-L194 |
22,161 | primefaces/primefaces | src/main/java/org/primefaces/PrimeFaces.java | PrimeFaces.clearDataListState | public void clearDataListState(String key) {
Map<String, Object> sessionMap = getFacesContext().getExternalContext().getSessionMap();
Map<String, TableState> dtState = (Map) sessionMap.get(Constants.DATALIST_STATE);
if (dtState != null) {
dtState.remove(key);
}
} | java | public void clearDataListState(String key) {
Map<String, Object> sessionMap = getFacesContext().getExternalContext().getSessionMap();
Map<String, TableState> dtState = (Map) sessionMap.get(Constants.DATALIST_STATE);
if (dtState != null) {
dtState.remove(key);
}
} | [
"public",
"void",
"clearDataListState",
"(",
"String",
"key",
")",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"sessionMap",
"=",
"getFacesContext",
"(",
")",
".",
"getExternalContext",
"(",
")",
".",
"getSessionMap",
"(",
")",
";",
"Map",
"<",
"String"... | Removes the multiViewState for one specific DataList within the current session.
@param key Key of the DataList. See {@link org.primefaces.component.datalist.DataList#getDataListState(boolean)}} for the namebuild of this key. | [
"Removes",
"the",
"multiViewState",
"for",
"one",
"specific",
"DataList",
"within",
"the",
"current",
"session",
"."
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/PrimeFaces.java#L207-L213 |
22,162 | primefaces/primefaces | src/main/java/org/primefaces/model/charts/optionconfig/tooltip/Tooltip.java | Tooltip.encode | public String encode() throws IOException {
FastStringWriter fsw = new FastStringWriter();
try {
ChartUtils.writeDataValue(fsw, "enabled", this.enabled, false);
ChartUtils.writeDataValue(fsw, "mode", this.mode, true);
ChartUtils.writeDataValue(fsw, "intersect", this.... | java | public String encode() throws IOException {
FastStringWriter fsw = new FastStringWriter();
try {
ChartUtils.writeDataValue(fsw, "enabled", this.enabled, false);
ChartUtils.writeDataValue(fsw, "mode", this.mode, true);
ChartUtils.writeDataValue(fsw, "intersect", this.... | [
"public",
"String",
"encode",
"(",
")",
"throws",
"IOException",
"{",
"FastStringWriter",
"fsw",
"=",
"new",
"FastStringWriter",
"(",
")",
";",
"try",
"{",
"ChartUtils",
".",
"writeDataValue",
"(",
"fsw",
",",
"\"enabled\"",
",",
"this",
".",
"enabled",
",",... | Write the options of Tooltip
@return options as JSON object
@throws java.io.IOException If an I/O error occurs | [
"Write",
"the",
"options",
"of",
"Tooltip"
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/model/charts/optionconfig/tooltip/Tooltip.java#L636-L677 |
22,163 | primefaces/primefaces | src/main/java/org/primefaces/util/ComponentUtils.java | ComponentUtils.getConverter | public static Converter getConverter(FacesContext context, UIComponent component) {
if (!(component instanceof ValueHolder)) {
return null;
}
Converter converter = ((ValueHolder) component).getConverter();
if (converter != null) {
return converter;
}
... | java | public static Converter getConverter(FacesContext context, UIComponent component) {
if (!(component instanceof ValueHolder)) {
return null;
}
Converter converter = ((ValueHolder) component).getConverter();
if (converter != null) {
return converter;
}
... | [
"public",
"static",
"Converter",
"getConverter",
"(",
"FacesContext",
"context",
",",
"UIComponent",
"component",
")",
"{",
"if",
"(",
"!",
"(",
"component",
"instanceof",
"ValueHolder",
")",
")",
"{",
"return",
"null",
";",
"}",
"Converter",
"converter",
"=",... | Finds appropriate converter for a given value holder
@param context FacesContext instance
@param component ValueHolder instance to look converter for
@return Converter | [
"Finds",
"appropriate",
"converter",
"for",
"a",
"given",
"value",
"holder"
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/util/ComponentUtils.java#L139-L166 |
22,164 | primefaces/primefaces | src/main/java/org/primefaces/util/ComponentUtils.java | ComponentUtils.calculateViewId | public static String calculateViewId(FacesContext context) {
Map<String, Object> requestMap = context.getExternalContext().getRequestMap();
String viewId = (String) requestMap.get("javax.servlet.include.path_info");
if (viewId == null) {
viewId = context.getExternalContext().getRequ... | java | public static String calculateViewId(FacesContext context) {
Map<String, Object> requestMap = context.getExternalContext().getRequestMap();
String viewId = (String) requestMap.get("javax.servlet.include.path_info");
if (viewId == null) {
viewId = context.getExternalContext().getRequ... | [
"public",
"static",
"String",
"calculateViewId",
"(",
"FacesContext",
"context",
")",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"requestMap",
"=",
"context",
".",
"getExternalContext",
"(",
")",
".",
"getRequestMap",
"(",
")",
";",
"String",
"viewId",
"... | Calculates the current viewId - we can't get it from the ViewRoot if it's not available.
@param context The {@link FacesContext}.
@return The current viewId. | [
"Calculates",
"the",
"current",
"viewId",
"-",
"we",
"can",
"t",
"get",
"it",
"from",
"the",
"ViewRoot",
"if",
"it",
"s",
"not",
"available",
"."
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/util/ComponentUtils.java#L458-L475 |
22,165 | primefaces/primefaces | src/main/java/org/primefaces/util/ComponentUtils.java | ComponentUtils.shouldRenderFacet | public static boolean shouldRenderFacet(UIComponent facet) {
if (facet == null || !facet.isRendered()) {
// For any future version of JSF where the f:facet gets a rendered attribute (https://github.com/javaserverfaces/mojarra/issues/4299)
// or there is only 1 child.
return f... | java | public static boolean shouldRenderFacet(UIComponent facet) {
if (facet == null || !facet.isRendered()) {
// For any future version of JSF where the f:facet gets a rendered attribute (https://github.com/javaserverfaces/mojarra/issues/4299)
// or there is only 1 child.
return f... | [
"public",
"static",
"boolean",
"shouldRenderFacet",
"(",
"UIComponent",
"facet",
")",
"{",
"if",
"(",
"facet",
"==",
"null",
"||",
"!",
"facet",
".",
"isRendered",
"(",
")",
")",
"{",
"// For any future version of JSF where the f:facet gets a rendered attribute (https:/... | Checks if the facet and one of the first level child's is rendered.
@param facet The Facet component to check
@return true when facet and one of the first level child's is rendered. | [
"Checks",
"if",
"the",
"facet",
"and",
"one",
"of",
"the",
"first",
"level",
"child",
"s",
"is",
"rendered",
"."
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/util/ComponentUtils.java#L528-L541 |
22,166 | primefaces/primefaces | src/main/java/org/primefaces/util/ComponentUtils.java | ComponentUtils.shouldRenderChildren | public static boolean shouldRenderChildren(UIComponent component) {
for (int i = 0; i < component.getChildren().size(); i++) {
if (component.getChildren().get(i).isRendered()) {
return true;
}
}
return false;
} | java | public static boolean shouldRenderChildren(UIComponent component) {
for (int i = 0; i < component.getChildren().size(); i++) {
if (component.getChildren().get(i).isRendered()) {
return true;
}
}
return false;
} | [
"public",
"static",
"boolean",
"shouldRenderChildren",
"(",
"UIComponent",
"component",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"component",
".",
"getChildren",
"(",
")",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"if",
"(",
... | Checks if the component's children are rendered
@param component The component to check
@return true if one of the first level child's is rendered. | [
"Checks",
"if",
"the",
"component",
"s",
"children",
"are",
"rendered"
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/util/ComponentUtils.java#L548-L556 |
22,167 | primefaces/primefaces | src/main/java/org/primefaces/component/api/UIData.java | UIData.setRowIndexRowStatePreserved | private void setRowIndexRowStatePreserved(int rowIndex) {
if (rowIndex < -1) {
throw new IllegalArgumentException("rowIndex is less than -1");
}
if (getRowIndex() == rowIndex) {
return;
}
FacesContext facesContext = getFacesContext();
if (_initi... | java | private void setRowIndexRowStatePreserved(int rowIndex) {
if (rowIndex < -1) {
throw new IllegalArgumentException("rowIndex is less than -1");
}
if (getRowIndex() == rowIndex) {
return;
}
FacesContext facesContext = getFacesContext();
if (_initi... | [
"private",
"void",
"setRowIndexRowStatePreserved",
"(",
"int",
"rowIndex",
")",
"{",
"if",
"(",
"rowIndex",
"<",
"-",
"1",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"rowIndex is less than -1\"",
")",
";",
"}",
"if",
"(",
"getRowIndex",
"(",
... | Row State preserved implementation is taken from Mojarra | [
"Row",
"State",
"preserved",
"implementation",
"is",
"taken",
"from",
"Mojarra"
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/component/api/UIData.java#L498-L576 |
22,168 | primefaces/primefaces | src/main/java/org/primefaces/util/TreeUtils.java | TreeUtils.sortNode | public static void sortNode(TreeNode node, Comparator comparator) {
TreeNodeList children = (TreeNodeList) node.getChildren();
if (children != null && !children.isEmpty()) {
Object[] childrenArray = children.toArray();
Arrays.sort(childrenArray, comparator);
for (int... | java | public static void sortNode(TreeNode node, Comparator comparator) {
TreeNodeList children = (TreeNodeList) node.getChildren();
if (children != null && !children.isEmpty()) {
Object[] childrenArray = children.toArray();
Arrays.sort(childrenArray, comparator);
for (int... | [
"public",
"static",
"void",
"sortNode",
"(",
"TreeNode",
"node",
",",
"Comparator",
"comparator",
")",
"{",
"TreeNodeList",
"children",
"=",
"(",
"TreeNodeList",
")",
"node",
".",
"getChildren",
"(",
")",
";",
"if",
"(",
"children",
"!=",
"null",
"&&",
"!"... | Sorts children of a node using a comparator
@param node Node instance whose children to be sorted
@param comparator Comparator to use in sorting | [
"Sorts",
"children",
"of",
"a",
"node",
"using",
"a",
"comparator"
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/util/TreeUtils.java#L45-L59 |
22,169 | primefaces/primefaces | src/main/java/org/primefaces/util/ComponentTraversalUtils.java | ComponentTraversalUtils.firstById | public static void firstById(String id, UIComponent base, char separatorChar, FacesContext context, ContextCallback callback) {
// try #findComponent first
UIComponent component = base.findComponent(id);
// try #invokeOnComponent
// it's required to support e.g. a full client id for a ... | java | public static void firstById(String id, UIComponent base, char separatorChar, FacesContext context, ContextCallback callback) {
// try #findComponent first
UIComponent component = base.findComponent(id);
// try #invokeOnComponent
// it's required to support e.g. a full client id for a ... | [
"public",
"static",
"void",
"firstById",
"(",
"String",
"id",
",",
"UIComponent",
"base",
",",
"char",
"separatorChar",
",",
"FacesContext",
"context",
",",
"ContextCallback",
"callback",
")",
"{",
"// try #findComponent first",
"UIComponent",
"component",
"=",
"bas... | Finds the first component by the given id expression or client id.
@param id The id.
@param base The base component to start the traversal.
@param separatorChar The separatorChar (e.g. :).
@param context The FacesContext.
@param callback the callback for the found component | [
"Finds",
"the",
"first",
"component",
"by",
"the",
"given",
"id",
"expression",
"or",
"client",
"id",
"."
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/util/ComponentTraversalUtils.java#L148-L167 |
22,170 | primefaces/primefaces | src/main/java/org/primefaces/expression/SearchExpressionFacade.java | SearchExpressionFacade.split | public static String[] split(FacesContext context, String value, char... separators) {
if (LangUtils.isValueBlank(value)) {
return null;
}
List<String> tokens = new ArrayList<>(5);
StringBuilder buffer = SharedStringBuilder.get(context, SHARED_SPLIT_BUFFER_KEY);
in... | java | public static String[] split(FacesContext context, String value, char... separators) {
if (LangUtils.isValueBlank(value)) {
return null;
}
List<String> tokens = new ArrayList<>(5);
StringBuilder buffer = SharedStringBuilder.get(context, SHARED_SPLIT_BUFFER_KEY);
in... | [
"public",
"static",
"String",
"[",
"]",
"split",
"(",
"FacesContext",
"context",
",",
"String",
"value",
",",
"char",
"...",
"separators",
")",
"{",
"if",
"(",
"LangUtils",
".",
"isValueBlank",
"(",
"value",
")",
")",
"{",
"return",
"null",
";",
"}",
"... | Splits the given string by the given separator, but ignoring separators inside parentheses.
@param context The current {@link FacesContext}.
@param value The string value.
@param separators The separators.
@return The splitted string. | [
"Splits",
"the",
"given",
"string",
"by",
"the",
"given",
"separator",
"but",
"ignoring",
"separators",
"inside",
"parentheses",
"."
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/expression/SearchExpressionFacade.java#L809-L858 |
22,171 | primefaces/primefaces | src/main/java/org/primefaces/model/charts/optionconfig/elements/Elements.java | Elements.encode | public String encode() throws IOException {
FastStringWriter fsw = new FastStringWriter();
boolean hasComma = false;
String preString;
try {
if (this.point != null) {
fsw.write("\"point\":{");
fsw.write(this.point.encode());
fs... | java | public String encode() throws IOException {
FastStringWriter fsw = new FastStringWriter();
boolean hasComma = false;
String preString;
try {
if (this.point != null) {
fsw.write("\"point\":{");
fsw.write(this.point.encode());
fs... | [
"public",
"String",
"encode",
"(",
")",
"throws",
"IOException",
"{",
"FastStringWriter",
"fsw",
"=",
"new",
"FastStringWriter",
"(",
")",
";",
"boolean",
"hasComma",
"=",
"false",
";",
"String",
"preString",
";",
"try",
"{",
"if",
"(",
"this",
".",
"point... | Write the options of Elements
@return options as JSON object
@throws java.io.IOException If an I/O error occurs | [
"Write",
"the",
"options",
"of",
"Elements"
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/model/charts/optionconfig/elements/Elements.java#L123-L167 |
22,172 | primefaces/primefaces | src/main/java/org/primefaces/component/repeat/UIRepeat.java | UIRepeat.saveInitialChildState | private void saveInitialChildState(FacesContext facesContext, UIComponent component) {
if (component instanceof EditableValueHolder && !component.isTransient()) {
String clientId = component.getClientId(facesContext);
SavedState state = new SavedState();
initialChildState.put... | java | private void saveInitialChildState(FacesContext facesContext, UIComponent component) {
if (component instanceof EditableValueHolder && !component.isTransient()) {
String clientId = component.getClientId(facesContext);
SavedState state = new SavedState();
initialChildState.put... | [
"private",
"void",
"saveInitialChildState",
"(",
"FacesContext",
"facesContext",
",",
"UIComponent",
"component",
")",
"{",
"if",
"(",
"component",
"instanceof",
"EditableValueHolder",
"&&",
"!",
"component",
".",
"isTransient",
"(",
")",
")",
"{",
"String",
"clie... | Recursively create the initial state for the given component.
@param facesContext the Faces context.
@param component the UI component to save the state for.
@see #saveInitialChildState(javax.faces.context.FacesContext) | [
"Recursively",
"create",
"the",
"initial",
"state",
"for",
"the",
"given",
"component",
"."
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/component/repeat/UIRepeat.java#L470-L482 |
22,173 | primefaces/primefaces | src/main/java/org/primefaces/model/charts/axes/cartesian/linear/CartesianLinearTicks.java | CartesianLinearTicks.encode | @Override
public String encode() throws IOException {
FastStringWriter fsw = new FastStringWriter();
try {
fsw.write(super.encode());
ChartUtils.writeDataValue(fsw, "beginAtZero", this.beginAtZero, true);
ChartUtils.writeDataValue(fsw, "min", this.min, true);
... | java | @Override
public String encode() throws IOException {
FastStringWriter fsw = new FastStringWriter();
try {
fsw.write(super.encode());
ChartUtils.writeDataValue(fsw, "beginAtZero", this.beginAtZero, true);
ChartUtils.writeDataValue(fsw, "min", this.min, true);
... | [
"@",
"Override",
"public",
"String",
"encode",
"(",
")",
"throws",
"IOException",
"{",
"FastStringWriter",
"fsw",
"=",
"new",
"FastStringWriter",
"(",
")",
";",
"try",
"{",
"fsw",
".",
"write",
"(",
"super",
".",
"encode",
"(",
")",
")",
";",
"ChartUtils... | Write the options of cartesian linear ticks
@return options as JSON object
@throws java.io.IOException If an I/O error occurs | [
"Write",
"the",
"options",
"of",
"cartesian",
"linear",
"ticks"
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/model/charts/axes/cartesian/linear/CartesianLinearTicks.java#L198-L218 |
22,174 | primefaces/primefaces | src/main/java/org/primefaces/model/charts/axes/radial/linear/RadialLinearPointLabels.java | RadialLinearPointLabels.encode | public String encode() throws IOException {
FastStringWriter fsw = new FastStringWriter();
try {
fsw.write("{");
ChartUtils.writeDataValue(fsw, "fontSize", this.fontSize, false);
ChartUtils.writeDataValue(fsw, "fontColor", this.fontColor, true);
ChartUti... | java | public String encode() throws IOException {
FastStringWriter fsw = new FastStringWriter();
try {
fsw.write("{");
ChartUtils.writeDataValue(fsw, "fontSize", this.fontSize, false);
ChartUtils.writeDataValue(fsw, "fontColor", this.fontColor, true);
ChartUti... | [
"public",
"String",
"encode",
"(",
")",
"throws",
"IOException",
"{",
"FastStringWriter",
"fsw",
"=",
"new",
"FastStringWriter",
"(",
")",
";",
"try",
"{",
"fsw",
".",
"write",
"(",
"\"{\"",
")",
";",
"ChartUtils",
".",
"writeDataValue",
"(",
"fsw",
",",
... | Write the options of point labels on radial linear type
@return options as JSON object
@throws java.io.IOException If an I/O error occurs | [
"Write",
"the",
"options",
"of",
"point",
"labels",
"on",
"radial",
"linear",
"type"
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/model/charts/axes/radial/linear/RadialLinearPointLabels.java#L122-L140 |
22,175 | primefaces/primefaces | src/main/java/org/primefaces/model/charts/axes/cartesian/CartesianTicks.java | CartesianTicks.encode | public String encode() throws IOException {
FastStringWriter fsw = new FastStringWriter();
try {
ChartUtils.writeDataValue(fsw, "autoSkip", this.autoSkip, false);
ChartUtils.writeDataValue(fsw, "autoSkipPadding", this.autoSkipPadding, true);
ChartUtils.writeDataValue... | java | public String encode() throws IOException {
FastStringWriter fsw = new FastStringWriter();
try {
ChartUtils.writeDataValue(fsw, "autoSkip", this.autoSkip, false);
ChartUtils.writeDataValue(fsw, "autoSkipPadding", this.autoSkipPadding, true);
ChartUtils.writeDataValue... | [
"public",
"String",
"encode",
"(",
")",
"throws",
"IOException",
"{",
"FastStringWriter",
"fsw",
"=",
"new",
"FastStringWriter",
"(",
")",
";",
"try",
"{",
"ChartUtils",
".",
"writeDataValue",
"(",
"fsw",
",",
"\"autoSkip\"",
",",
"this",
".",
"autoSkip",
",... | Write the common ticks options
@return options as JSON object
@throws java.io.IOException If an I/O error occurs | [
"Write",
"the",
"common",
"ticks",
"options"
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/model/charts/axes/cartesian/CartesianTicks.java#L187-L204 |
22,176 | primefaces/primefaces | src/main/java/org/primefaces/context/PrimeRequestContext.java | PrimeRequestContext.isSecure | public boolean isSecure() {
// currently called once per request - later we might cache the result per request
// and even the method lookup
Object request = context.getExternalContext().getRequest();
if (request instanceof HttpServletRequest) {
return ((HttpServletRequest) ... | java | public boolean isSecure() {
// currently called once per request - later we might cache the result per request
// and even the method lookup
Object request = context.getExternalContext().getRequest();
if (request instanceof HttpServletRequest) {
return ((HttpServletRequest) ... | [
"public",
"boolean",
"isSecure",
"(",
")",
"{",
"// currently called once per request - later we might cache the result per request",
"// and even the method lookup",
"Object",
"request",
"=",
"context",
".",
"getExternalContext",
"(",
")",
".",
"getRequest",
"(",
")",
";",
... | Returns a boolean indicating whether this request was made using a secure channel, such as HTTPS.
@return if secure or not. | [
"Returns",
"a",
"boolean",
"indicating",
"whether",
"this",
"request",
"was",
"made",
"using",
"a",
"secure",
"channel",
"such",
"as",
"HTTPS",
"."
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/context/PrimeRequestContext.java#L190-L207 |
22,177 | primefaces/primefaces | src/main/java/org/primefaces/model/charts/optionconfig/elements/ElementsPoint.java | ElementsPoint.encode | public String encode() throws IOException {
FastStringWriter fsw = new FastStringWriter();
try {
ChartUtils.writeDataValue(fsw, "radius", this.radius, false);
ChartUtils.writeDataValue(fsw, "pointStyle", this.pointStyle, true);
ChartUtils.writeDataValue(fsw, "backgro... | java | public String encode() throws IOException {
FastStringWriter fsw = new FastStringWriter();
try {
ChartUtils.writeDataValue(fsw, "radius", this.radius, false);
ChartUtils.writeDataValue(fsw, "pointStyle", this.pointStyle, true);
ChartUtils.writeDataValue(fsw, "backgro... | [
"public",
"String",
"encode",
"(",
")",
"throws",
"IOException",
"{",
"FastStringWriter",
"fsw",
"=",
"new",
"FastStringWriter",
"(",
")",
";",
"try",
"{",
"ChartUtils",
".",
"writeDataValue",
"(",
"fsw",
",",
"\"radius\"",
",",
"this",
".",
"radius",
",",
... | Write the point options of Elements
@return options as JSON object
@throws java.io.IOException If an I/O error occurs | [
"Write",
"the",
"point",
"options",
"of",
"Elements"
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/model/charts/optionconfig/elements/ElementsPoint.java#L198-L216 |
22,178 | primefaces/primefaces | src/main/java/org/primefaces/component/timeline/TimelineUpdater.java | TimelineUpdater.getCurrentInstance | public static TimelineUpdater getCurrentInstance(String id) {
FacesContext fc = FacesContext.getCurrentInstance();
@SuppressWarnings("unchecked")
Map<String, TimelineUpdater> map = (Map<String, TimelineUpdater>) fc.getAttributes().get(TimelineUpdater.class.getName());
if (map == null) {... | java | public static TimelineUpdater getCurrentInstance(String id) {
FacesContext fc = FacesContext.getCurrentInstance();
@SuppressWarnings("unchecked")
Map<String, TimelineUpdater> map = (Map<String, TimelineUpdater>) fc.getAttributes().get(TimelineUpdater.class.getName());
if (map == null) {... | [
"public",
"static",
"TimelineUpdater",
"getCurrentInstance",
"(",
"String",
"id",
")",
"{",
"FacesContext",
"fc",
"=",
"FacesContext",
".",
"getCurrentInstance",
"(",
")",
";",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"Map",
"<",
"String",
",",
"Timel... | Gets the current thread-safe TimelineUpdater instance by Id.
@param id Id of the Timeline component in terms of findComponent()
@return TimelineUpdater instance.
@throws FacesException if the Timeline component can not be found by the given Id | [
"Gets",
"the",
"current",
"thread",
"-",
"safe",
"TimelineUpdater",
"instance",
"by",
"Id",
"."
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/component/timeline/TimelineUpdater.java#L48-L68 |
22,179 | primefaces/primefaces | src/main/java/org/primefaces/model/charts/axes/cartesian/category/CartesianCategoryTicks.java | CartesianCategoryTicks.encode | @Override
public String encode() throws IOException {
FastStringWriter fsw = new FastStringWriter();
try {
fsw.write(super.encode());
ChartUtils.writeDataValue(fsw, "labels", this.labels, true);
ChartUtils.writeDataValue(fsw, "min", this.min, true);
C... | java | @Override
public String encode() throws IOException {
FastStringWriter fsw = new FastStringWriter();
try {
fsw.write(super.encode());
ChartUtils.writeDataValue(fsw, "labels", this.labels, true);
ChartUtils.writeDataValue(fsw, "min", this.min, true);
C... | [
"@",
"Override",
"public",
"String",
"encode",
"(",
")",
"throws",
"IOException",
"{",
"FastStringWriter",
"fsw",
"=",
"new",
"FastStringWriter",
"(",
")",
";",
"try",
"{",
"fsw",
".",
"write",
"(",
"super",
".",
"encode",
"(",
")",
")",
";",
"ChartUtils... | Write the options of cartesian category ticks
@return options as JSON object
@throws java.io.IOException If an I/O error occurs | [
"Write",
"the",
"options",
"of",
"cartesian",
"category",
"ticks"
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/model/charts/axes/cartesian/category/CartesianCategoryTicks.java#L104-L119 |
22,180 | primefaces/primefaces | src/main/java/org/primefaces/component/timeline/TimelineRenderer.java | TimelineRenderer.encodeDate | private String encodeDate(TimeZone browserTZ, TimeZone targetTZ, Date utcDate) {
return "new Date(" + DateUtils.toLocalDate(browserTZ, targetTZ, utcDate) + ")";
} | java | private String encodeDate(TimeZone browserTZ, TimeZone targetTZ, Date utcDate) {
return "new Date(" + DateUtils.toLocalDate(browserTZ, targetTZ, utcDate) + ")";
} | [
"private",
"String",
"encodeDate",
"(",
"TimeZone",
"browserTZ",
",",
"TimeZone",
"targetTZ",
",",
"Date",
"utcDate",
")",
"{",
"return",
"\"new Date(\"",
"+",
"DateUtils",
".",
"toLocalDate",
"(",
"browserTZ",
",",
"targetTZ",
",",
"utcDate",
")",
"+",
"\")\"... | convert from UTC to locale date | [
"convert",
"from",
"UTC",
"to",
"locale",
"date"
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/component/timeline/TimelineRenderer.java#L338-L340 |
22,181 | primefaces/primefaces | src/main/java/org/primefaces/application/exceptionhandler/PrimeExceptionHandler.java | PrimeExceptionHandler.buildView | protected Throwable buildView(FacesContext context, Throwable throwable, Throwable rootCause) throws IOException {
if (context.getViewRoot() == null) {
ViewHandler viewHandler = context.getApplication().getViewHandler();
String viewId = viewHandler.deriveViewId(context, ComponentUtils.c... | java | protected Throwable buildView(FacesContext context, Throwable throwable, Throwable rootCause) throws IOException {
if (context.getViewRoot() == null) {
ViewHandler viewHandler = context.getApplication().getViewHandler();
String viewId = viewHandler.deriveViewId(context, ComponentUtils.c... | [
"protected",
"Throwable",
"buildView",
"(",
"FacesContext",
"context",
",",
"Throwable",
"throwable",
",",
"Throwable",
"rootCause",
")",
"throws",
"IOException",
"{",
"if",
"(",
"context",
".",
"getViewRoot",
"(",
")",
"==",
"null",
")",
"{",
"ViewHandler",
"... | Builds the view if not already available. This is mostly required for ViewExpiredException's.
@param context The {@link FacesContext}.
@param throwable The occurred {@link Throwable}.
@param rootCause The root cause.
@return The unwrapped {@link Throwable}.
@throws java.io.IOException If building the view fails. | [
"Builds",
"the",
"view",
"if",
"not",
"already",
"available",
".",
"This",
"is",
"mostly",
"required",
"for",
"ViewExpiredException",
"s",
"."
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/application/exceptionhandler/PrimeExceptionHandler.java#L318-L337 |
22,182 | primefaces/primefaces | src/main/java/org/primefaces/model/timeline/TimelineModel.java | TimelineModel.addGroup | public void addGroup(TimelineGroup group) {
if (groups == null) {
groups = new ArrayList<>();
}
groups.add(group);
} | java | public void addGroup(TimelineGroup group) {
if (groups == null) {
groups = new ArrayList<>();
}
groups.add(group);
} | [
"public",
"void",
"addGroup",
"(",
"TimelineGroup",
"group",
")",
"{",
"if",
"(",
"groups",
"==",
"null",
")",
"{",
"groups",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"}",
"groups",
".",
"add",
"(",
"group",
")",
";",
"}"
] | Adds a given group to the model.
@param group group to be added | [
"Adds",
"a",
"given",
"group",
"to",
"the",
"model",
"."
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/model/timeline/TimelineModel.java#L82-L88 |
22,183 | primefaces/primefaces | src/main/java/org/primefaces/model/timeline/TimelineModel.java | TimelineModel.add | public void add(TimelineEvent event, TimelineUpdater timelineUpdater) {
events.add(event);
if (timelineUpdater != null) {
// update UI
timelineUpdater.add(event);
}
} | java | public void add(TimelineEvent event, TimelineUpdater timelineUpdater) {
events.add(event);
if (timelineUpdater != null) {
// update UI
timelineUpdater.add(event);
}
} | [
"public",
"void",
"add",
"(",
"TimelineEvent",
"event",
",",
"TimelineUpdater",
"timelineUpdater",
")",
"{",
"events",
".",
"add",
"(",
"event",
")",
";",
"if",
"(",
"timelineUpdater",
"!=",
"null",
")",
"{",
"// update UI",
"timelineUpdater",
".",
"add",
"(... | Adds a given event to the model with UI update.
@param event event to be added
@param timelineUpdater TimelineUpdater instance to add the event in UI | [
"Adds",
"a",
"given",
"event",
"to",
"the",
"model",
"with",
"UI",
"update",
"."
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/model/timeline/TimelineModel.java#L96-L103 |
22,184 | primefaces/primefaces | src/main/java/org/primefaces/model/timeline/TimelineModel.java | TimelineModel.addAllGroups | public void addAllGroups(Collection<TimelineGroup> groups) {
if (groups == null) {
groups = new ArrayList<>();
}
groups.addAll(groups);
} | java | public void addAllGroups(Collection<TimelineGroup> groups) {
if (groups == null) {
groups = new ArrayList<>();
}
groups.addAll(groups);
} | [
"public",
"void",
"addAllGroups",
"(",
"Collection",
"<",
"TimelineGroup",
">",
"groups",
")",
"{",
"if",
"(",
"groups",
"==",
"null",
")",
"{",
"groups",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"}",
"groups",
".",
"addAll",
"(",
"groups",
")",
... | Adds all given groups to the model.
@param groups collection of groups to be added | [
"Adds",
"all",
"given",
"groups",
"to",
"the",
"model",
"."
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/model/timeline/TimelineModel.java#L119-L125 |
22,185 | primefaces/primefaces | src/main/java/org/primefaces/model/timeline/TimelineModel.java | TimelineModel.addAll | public void addAll(Collection<TimelineEvent> events, TimelineUpdater timelineUpdater) {
if (events != null && !events.isEmpty()) {
for (TimelineEvent event : events) {
add(event, timelineUpdater);
}
}
} | java | public void addAll(Collection<TimelineEvent> events, TimelineUpdater timelineUpdater) {
if (events != null && !events.isEmpty()) {
for (TimelineEvent event : events) {
add(event, timelineUpdater);
}
}
} | [
"public",
"void",
"addAll",
"(",
"Collection",
"<",
"TimelineEvent",
">",
"events",
",",
"TimelineUpdater",
"timelineUpdater",
")",
"{",
"if",
"(",
"events",
"!=",
"null",
"&&",
"!",
"events",
".",
"isEmpty",
"(",
")",
")",
"{",
"for",
"(",
"TimelineEvent"... | Adds all given events to the model with UI update.
@param events collection of events to be added
@param timelineUpdater TimelineUpdater instance to add the events in UI | [
"Adds",
"all",
"given",
"events",
"to",
"the",
"model",
"with",
"UI",
"update",
"."
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/model/timeline/TimelineModel.java#L133-L139 |
22,186 | primefaces/primefaces | src/main/java/org/primefaces/model/timeline/TimelineModel.java | TimelineModel.update | public void update(TimelineEvent event, TimelineUpdater timelineUpdater) {
int index = getIndex(event);
if (index >= 0) {
events.set(index, event);
if (timelineUpdater != null) {
// update UI
timelineUpdater.update(event, index);
}
... | java | public void update(TimelineEvent event, TimelineUpdater timelineUpdater) {
int index = getIndex(event);
if (index >= 0) {
events.set(index, event);
if (timelineUpdater != null) {
// update UI
timelineUpdater.update(event, index);
}
... | [
"public",
"void",
"update",
"(",
"TimelineEvent",
"event",
",",
"TimelineUpdater",
"timelineUpdater",
")",
"{",
"int",
"index",
"=",
"getIndex",
"(",
"event",
")",
";",
"if",
"(",
"index",
">=",
"0",
")",
"{",
"events",
".",
"set",
"(",
"index",
",",
"... | Updates a given event in the model with UI update.
@param event event to be added
@param timelineUpdater TimelineUpdater instance to update the event in UI | [
"Updates",
"a",
"given",
"event",
"in",
"the",
"model",
"with",
"UI",
"update",
"."
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/model/timeline/TimelineModel.java#L156-L166 |
22,187 | primefaces/primefaces | src/main/java/org/primefaces/model/timeline/TimelineModel.java | TimelineModel.updateAll | public void updateAll(Collection<TimelineEvent> events, TimelineUpdater timelineUpdater) {
if (events != null && !events.isEmpty()) {
for (TimelineEvent event : events) {
update(event, timelineUpdater);
}
}
} | java | public void updateAll(Collection<TimelineEvent> events, TimelineUpdater timelineUpdater) {
if (events != null && !events.isEmpty()) {
for (TimelineEvent event : events) {
update(event, timelineUpdater);
}
}
} | [
"public",
"void",
"updateAll",
"(",
"Collection",
"<",
"TimelineEvent",
">",
"events",
",",
"TimelineUpdater",
"timelineUpdater",
")",
"{",
"if",
"(",
"events",
"!=",
"null",
"&&",
"!",
"events",
".",
"isEmpty",
"(",
")",
")",
"{",
"for",
"(",
"TimelineEve... | Updates all given events in the model with UI update.
@param events collection of events to be updated
@param timelineUpdater TimelineUpdater instance to update the events in UI | [
"Updates",
"all",
"given",
"events",
"in",
"the",
"model",
"with",
"UI",
"update",
"."
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/model/timeline/TimelineModel.java#L183-L189 |
22,188 | primefaces/primefaces | src/main/java/org/primefaces/model/timeline/TimelineModel.java | TimelineModel.delete | public void delete(TimelineEvent event, TimelineUpdater timelineUpdater) {
int index = getIndex(event);
if (index >= 0) {
events.remove(event);
if (timelineUpdater != null) {
// update UI
timelineUpdater.delete(index);
}
}
... | java | public void delete(TimelineEvent event, TimelineUpdater timelineUpdater) {
int index = getIndex(event);
if (index >= 0) {
events.remove(event);
if (timelineUpdater != null) {
// update UI
timelineUpdater.delete(index);
}
}
... | [
"public",
"void",
"delete",
"(",
"TimelineEvent",
"event",
",",
"TimelineUpdater",
"timelineUpdater",
")",
"{",
"int",
"index",
"=",
"getIndex",
"(",
"event",
")",
";",
"if",
"(",
"index",
">=",
"0",
")",
"{",
"events",
".",
"remove",
"(",
"event",
")",
... | Deletes a given event in the model with UI update.
@param event event to be deleted
@param timelineUpdater TimelineUpdater instance to delete the event in UI | [
"Deletes",
"a",
"given",
"event",
"in",
"the",
"model",
"with",
"UI",
"update",
"."
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/model/timeline/TimelineModel.java#L206-L216 |
22,189 | primefaces/primefaces | src/main/java/org/primefaces/model/timeline/TimelineModel.java | TimelineModel.deleteAll | public void deleteAll(Collection<TimelineEvent> events, TimelineUpdater timelineUpdater) {
if (events != null && !events.isEmpty()) {
for (TimelineEvent event : events) {
delete(event, timelineUpdater);
}
}
} | java | public void deleteAll(Collection<TimelineEvent> events, TimelineUpdater timelineUpdater) {
if (events != null && !events.isEmpty()) {
for (TimelineEvent event : events) {
delete(event, timelineUpdater);
}
}
} | [
"public",
"void",
"deleteAll",
"(",
"Collection",
"<",
"TimelineEvent",
">",
"events",
",",
"TimelineUpdater",
"timelineUpdater",
")",
"{",
"if",
"(",
"events",
"!=",
"null",
"&&",
"!",
"events",
".",
"isEmpty",
"(",
")",
")",
"{",
"for",
"(",
"TimelineEve... | Deletes all given events in the model with UI update.
@param events collection of events to be deleted
@param timelineUpdater TimelineUpdater instance to delete the events in UI | [
"Deletes",
"all",
"given",
"events",
"in",
"the",
"model",
"with",
"UI",
"update",
"."
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/model/timeline/TimelineModel.java#L233-L239 |
22,190 | primefaces/primefaces | src/main/java/org/primefaces/model/timeline/TimelineModel.java | TimelineModel.select | public void select(TimelineEvent event, TimelineUpdater timelineUpdater) {
int index = getIndex(event);
if (timelineUpdater != null) {
// update UI
timelineUpdater.select(index);
}
} | java | public void select(TimelineEvent event, TimelineUpdater timelineUpdater) {
int index = getIndex(event);
if (timelineUpdater != null) {
// update UI
timelineUpdater.select(index);
}
} | [
"public",
"void",
"select",
"(",
"TimelineEvent",
"event",
",",
"TimelineUpdater",
"timelineUpdater",
")",
"{",
"int",
"index",
"=",
"getIndex",
"(",
"event",
")",
";",
"if",
"(",
"timelineUpdater",
"!=",
"null",
")",
"{",
"// update UI",
"timelineUpdater",
".... | Selects a given event in UI visually. To unselect all events, pass a null as event.
@param event event to be selected
@param timelineUpdater TimelineUpdater instance to select the event in UI | [
"Selects",
"a",
"given",
"event",
"in",
"UI",
"visually",
".",
"To",
"unselect",
"all",
"events",
"pass",
"a",
"null",
"as",
"event",
"."
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/model/timeline/TimelineModel.java#L247-L254 |
22,191 | primefaces/primefaces | src/main/java/org/primefaces/model/timeline/TimelineModel.java | TimelineModel.getOverlappedEvents | public TreeSet<TimelineEvent> getOverlappedEvents(TimelineEvent event) {
if (event == null) {
return null;
}
List<TimelineEvent> overlappedEvents = null;
for (TimelineEvent e : events) {
if (e.equals(event)) {
// given event should not be included... | java | public TreeSet<TimelineEvent> getOverlappedEvents(TimelineEvent event) {
if (event == null) {
return null;
}
List<TimelineEvent> overlappedEvents = null;
for (TimelineEvent e : events) {
if (e.equals(event)) {
// given event should not be included... | [
"public",
"TreeSet",
"<",
"TimelineEvent",
">",
"getOverlappedEvents",
"(",
"TimelineEvent",
"event",
")",
"{",
"if",
"(",
"event",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"List",
"<",
"TimelineEvent",
">",
"overlappedEvents",
"=",
"null",
";",
... | Gets all overlapped events to the given one. The given and overlapped events belong to the same group. Events are ordered
by their start dates - first events with more recent start dates and then events with older start dates. If start dates are
equal, events will be ordered by their end dates. In this case, if an even... | [
"Gets",
"all",
"overlapped",
"events",
"to",
"the",
"given",
"one",
".",
"The",
"given",
"and",
"overlapped",
"events",
"belong",
"to",
"the",
"same",
"group",
".",
"Events",
"are",
"ordered",
"by",
"their",
"start",
"dates",
"-",
"first",
"events",
"with"... | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/model/timeline/TimelineModel.java#L286-L322 |
22,192 | primefaces/primefaces | src/main/java/org/primefaces/model/timeline/TimelineModel.java | TimelineModel.getEvent | public TimelineEvent getEvent(String index) {
return getEvent(index != null ? Integer.valueOf(index) : -1);
} | java | public TimelineEvent getEvent(String index) {
return getEvent(index != null ? Integer.valueOf(index) : -1);
} | [
"public",
"TimelineEvent",
"getEvent",
"(",
"String",
"index",
")",
"{",
"return",
"getEvent",
"(",
"index",
"!=",
"null",
"?",
"Integer",
".",
"valueOf",
"(",
"index",
")",
":",
"-",
"1",
")",
";",
"}"
] | Gets event by its index as String
@param index index
@return TimelineEvent found event or null | [
"Gets",
"event",
"by",
"its",
"index",
"as",
"String"
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/model/timeline/TimelineModel.java#L436-L438 |
22,193 | primefaces/primefaces | src/main/java/org/primefaces/model/timeline/TimelineModel.java | TimelineModel.getIndex | public int getIndex(TimelineEvent event) {
int index = -1;
if (event != null) {
for (int i = 0; i < events.size(); i++) {
if (events.get(i).equals(event)) {
index = i;
break;
}
}
}
return i... | java | public int getIndex(TimelineEvent event) {
int index = -1;
if (event != null) {
for (int i = 0; i < events.size(); i++) {
if (events.get(i).equals(event)) {
index = i;
break;
}
}
}
return i... | [
"public",
"int",
"getIndex",
"(",
"TimelineEvent",
"event",
")",
"{",
"int",
"index",
"=",
"-",
"1",
";",
"if",
"(",
"event",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"events",
".",
"size",
"(",
")",
";",
"i",
... | Gets index of the given timeline event
@param event given event
@return int positive index or -1 if the given event is not available in the timeline | [
"Gets",
"index",
"of",
"the",
"given",
"timeline",
"event"
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/model/timeline/TimelineModel.java#L460-L474 |
22,194 | primefaces/primefaces | src/main/java/org/primefaces/el/InterceptingResolver.java | InterceptingResolver.setValue | @Override
public void setValue(ELContext context, Object base, Object property, Object value) {
// currently not used -> see #7114
if (base != null && property != null) {
context.setPropertyResolved(true);
valueReference = new ValueReference(base, property.toString());
... | java | @Override
public void setValue(ELContext context, Object base, Object property, Object value) {
// currently not used -> see #7114
if (base != null && property != null) {
context.setPropertyResolved(true);
valueReference = new ValueReference(base, property.toString());
... | [
"@",
"Override",
"public",
"void",
"setValue",
"(",
"ELContext",
"context",
",",
"Object",
"base",
",",
"Object",
"property",
",",
"Object",
"value",
")",
"{",
"// currently not used -> see #7114",
"if",
"(",
"base",
"!=",
"null",
"&&",
"property",
"!=",
"null... | Capture the base and property rather than write the value | [
"Capture",
"the",
"base",
"and",
"property",
"rather",
"than",
"write",
"the",
"value"
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/el/InterceptingResolver.java#L47-L54 |
22,195 | primefaces/primefaces | src/main/java/org/primefaces/model/charts/optionconfig/elements/ElementsLine.java | ElementsLine.encode | public String encode() throws IOException {
FastStringWriter fsw = new FastStringWriter();
try {
ChartUtils.writeDataValue(fsw, "tension", this.tension, false);
ChartUtils.writeDataValue(fsw, "backgroundColor", this.backgroundColor, true);
ChartUtils.writeDataValue(f... | java | public String encode() throws IOException {
FastStringWriter fsw = new FastStringWriter();
try {
ChartUtils.writeDataValue(fsw, "tension", this.tension, false);
ChartUtils.writeDataValue(fsw, "backgroundColor", this.backgroundColor, true);
ChartUtils.writeDataValue(f... | [
"public",
"String",
"encode",
"(",
")",
"throws",
"IOException",
"{",
"FastStringWriter",
"fsw",
"=",
"new",
"FastStringWriter",
"(",
")",
";",
"try",
"{",
"ChartUtils",
".",
"writeDataValue",
"(",
"fsw",
",",
"\"tension\"",
",",
"this",
".",
"tension",
",",... | Write the line options of Elements
@return options as JSON object
@throws java.io.IOException If an I/O error occurs | [
"Write",
"the",
"line",
"options",
"of",
"Elements"
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/model/charts/optionconfig/elements/ElementsLine.java#L256-L277 |
22,196 | primefaces/primefaces | src/main/java/org/primefaces/util/CalendarUtils.java | CalendarUtils.convertPattern | public static final String convertPattern(String pattern) {
if (pattern == null) {
return null;
}
else {
String convertedPattern = pattern;
for (PatternConverter converter : PATTERN_CONVERTERS) {
convertedPattern = converter.convert(convertedPa... | java | public static final String convertPattern(String pattern) {
if (pattern == null) {
return null;
}
else {
String convertedPattern = pattern;
for (PatternConverter converter : PATTERN_CONVERTERS) {
convertedPattern = converter.convert(convertedPa... | [
"public",
"static",
"final",
"String",
"convertPattern",
"(",
"String",
"pattern",
")",
"{",
"if",
"(",
"pattern",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"else",
"{",
"String",
"convertedPattern",
"=",
"pattern",
";",
"for",
"(",
"PatternConve... | Converts a java date pattern to a jquery date pattern
@param pattern Pattern to be converted
@return converted pattern | [
"Converts",
"a",
"java",
"date",
"pattern",
"to",
"a",
"jquery",
"date",
"pattern"
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/util/CalendarUtils.java#L198-L210 |
22,197 | primefaces/primefaces | src/main/java/org/primefaces/util/CalendarUtils.java | CalendarUtils.encodeListValue | public static void encodeListValue(FacesContext context, UICalendar uicalendar, String optionName, List<Object> values) throws IOException {
if (values == null) {
return;
}
ResponseWriter writer = context.getResponseWriter();
writer.write("," + optionName + ":[");
f... | java | public static void encodeListValue(FacesContext context, UICalendar uicalendar, String optionName, List<Object> values) throws IOException {
if (values == null) {
return;
}
ResponseWriter writer = context.getResponseWriter();
writer.write("," + optionName + ":[");
f... | [
"public",
"static",
"void",
"encodeListValue",
"(",
"FacesContext",
"context",
",",
"UICalendar",
"uicalendar",
",",
"String",
"optionName",
",",
"List",
"<",
"Object",
">",
"values",
")",
"throws",
"IOException",
"{",
"if",
"(",
"values",
"==",
"null",
")",
... | Write the value of Calendar options
@param context
@param uicalendar component
@param optionName the name of an option
@param values the List values of an option
@throws java.io.IOException if writer is null | [
"Write",
"the",
"value",
"of",
"Calendar",
"options"
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/util/CalendarUtils.java#L221-L242 |
22,198 | primefaces/primefaces | src/main/java/org/primefaces/model/charts/axes/AxesGridLines.java | AxesGridLines.encode | public String encode() throws IOException {
FastStringWriter fsw = new FastStringWriter();
try {
fsw.write("{");
ChartUtils.writeDataValue(fsw, "display", this.display, false);
ChartUtils.writeDataValue(fsw, "color", this.color, true);
ChartUtils.writeDa... | java | public String encode() throws IOException {
FastStringWriter fsw = new FastStringWriter();
try {
fsw.write("{");
ChartUtils.writeDataValue(fsw, "display", this.display, false);
ChartUtils.writeDataValue(fsw, "color", this.color, true);
ChartUtils.writeDa... | [
"public",
"String",
"encode",
"(",
")",
"throws",
"IOException",
"{",
"FastStringWriter",
"fsw",
"=",
"new",
"FastStringWriter",
"(",
")",
";",
"try",
"{",
"fsw",
".",
"write",
"(",
"\"{\"",
")",
";",
"ChartUtils",
".",
"writeDataValue",
"(",
"fsw",
",",
... | Write the common ticks options of axes
@return options as JSON object
@throws java.io.IOException If an I/O error occurs | [
"Write",
"the",
"common",
"ticks",
"options",
"of",
"axes"
] | b8cdd5ed395d09826e40e3302d6b14901d3ef4e7 | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/model/charts/axes/AxesGridLines.java#L316-L344 |
22,199 | prometheus/client_java | simpleclient/src/main/java/io/prometheus/client/Histogram.java | Histogram.build | public static Builder build(String name, String help) {
return new Builder().name(name).help(help);
} | java | public static Builder build(String name, String help) {
return new Builder().name(name).help(help);
} | [
"public",
"static",
"Builder",
"build",
"(",
"String",
"name",
",",
"String",
"help",
")",
"{",
"return",
"new",
"Builder",
"(",
")",
".",
"name",
"(",
"name",
")",
".",
"help",
"(",
"help",
")",
";",
"}"
] | Return a Builder to allow configuration of a new Histogram. Ensures required fields are provided.
@param name The name of the metric
@param help The help string of the metric | [
"Return",
"a",
"Builder",
"to",
"allow",
"configuration",
"of",
"a",
"new",
"Histogram",
".",
"Ensures",
"required",
"fields",
"are",
"provided",
"."
] | 4e0e7527b048f1ffd0382dcb74c0b9dab23b4d9f | https://github.com/prometheus/client_java/blob/4e0e7527b048f1ffd0382dcb74c0b9dab23b4d9f/simpleclient/src/main/java/io/prometheus/client/Histogram.java#L140-L142 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.