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
109,400
guardtime/ksi-java-sdk
ksi-api/src/main/java/com/guardtime/ksi/publication/inmemory/InMemoryPublicationsFile.java
InMemoryPublicationsFile.verifyMagicBytes
private void verifyMagicBytes(TLVInputStream input) throws InvalidPublicationsFileException { try { byte[] magicBytes = new byte[PUBLICATIONS_FILE_MAGIC_BYTES_LENGTH]; input.read(magicBytes); if (!Arrays.equals(magicBytes, FILE_BEGINNING_MAGIC_BYTES)) { throw ...
java
private void verifyMagicBytes(TLVInputStream input) throws InvalidPublicationsFileException { try { byte[] magicBytes = new byte[PUBLICATIONS_FILE_MAGIC_BYTES_LENGTH]; input.read(magicBytes); if (!Arrays.equals(magicBytes, FILE_BEGINNING_MAGIC_BYTES)) { throw ...
[ "private", "void", "verifyMagicBytes", "(", "TLVInputStream", "input", ")", "throws", "InvalidPublicationsFileException", "{", "try", "{", "byte", "[", "]", "magicBytes", "=", "new", "byte", "[", "PUBLICATIONS_FILE_MAGIC_BYTES_LENGTH", "]", ";", "input", ".", "read"...
Verifies that input stream starts with publications file magic bytes. @param input instance of input stream to check. not null.
[ "Verifies", "that", "input", "stream", "starts", "with", "publications", "file", "magic", "bytes", "." ]
b2cd877050f0f392657c724452318d10a1002171
https://github.com/guardtime/ksi-java-sdk/blob/b2cd877050f0f392657c724452318d10a1002171/ksi-api/src/main/java/com/guardtime/ksi/publication/inmemory/InMemoryPublicationsFile.java#L155-L165
109,401
guardtime/ksi-java-sdk
ksi-api/src/main/java/com/guardtime/ksi/publication/inmemory/InMemoryPublicationsFile.java
InMemoryPublicationsFile.findCertificateById
public Certificate findCertificateById(byte[] certificateId) throws CertificateNotFoundException { if (certificateId == null) { throw new CertificateNotFoundException("Certificate with id null not found from pubFile='" + this.toString() + "'"); } for (InMemoryCertificateRecord record...
java
public Certificate findCertificateById(byte[] certificateId) throws CertificateNotFoundException { if (certificateId == null) { throw new CertificateNotFoundException("Certificate with id null not found from pubFile='" + this.toString() + "'"); } for (InMemoryCertificateRecord record...
[ "public", "Certificate", "findCertificateById", "(", "byte", "[", "]", "certificateId", ")", "throws", "CertificateNotFoundException", "{", "if", "(", "certificateId", "==", "null", ")", "{", "throw", "new", "CertificateNotFoundException", "(", "\"Certificate with id nu...
Finds a certificate by certificate id. @param certificateId certificate id bytes @return certificate or null, if certificate is not found @throws CertificateNotFoundException if certificate with given id isn't found
[ "Finds", "a", "certificate", "by", "certificate", "id", "." ]
b2cd877050f0f392657c724452318d10a1002171
https://github.com/guardtime/ksi-java-sdk/blob/b2cd877050f0f392657c724452318d10a1002171/ksi-api/src/main/java/com/guardtime/ksi/publication/inmemory/InMemoryPublicationsFile.java#L201-L211
109,402
guardtime/ksi-java-sdk
ksi-api/src/main/java/com/guardtime/ksi/publication/inmemory/InMemoryPublicationsFile.java
InMemoryPublicationsFile.getPublicationRecord
public PublicationRecord getPublicationRecord(Date time) { PublicationRecord nearest = null; for (PublicationRecord publicationRecord : publicationRecords) { Date publicationTime = publicationRecord.getPublicationData().getPublicationTime(); if (publicationTime.equals(time) || pu...
java
public PublicationRecord getPublicationRecord(Date time) { PublicationRecord nearest = null; for (PublicationRecord publicationRecord : publicationRecords) { Date publicationTime = publicationRecord.getPublicationData().getPublicationTime(); if (publicationTime.equals(time) || pu...
[ "public", "PublicationRecord", "getPublicationRecord", "(", "Date", "time", ")", "{", "PublicationRecord", "nearest", "=", "null", ";", "for", "(", "PublicationRecord", "publicationRecord", ":", "publicationRecords", ")", "{", "Date", "publicationTime", "=", "publicat...
Returns the closest publication record to given time.
[ "Returns", "the", "closest", "publication", "record", "to", "given", "time", "." ]
b2cd877050f0f392657c724452318d10a1002171
https://github.com/guardtime/ksi-java-sdk/blob/b2cd877050f0f392657c724452318d10a1002171/ksi-api/src/main/java/com/guardtime/ksi/publication/inmemory/InMemoryPublicationsFile.java#L245-L258
109,403
guardtime/ksi-java-sdk
ksi-api/src/main/java/com/guardtime/ksi/publication/inmemory/InMemoryPublicationsFile.java
InMemoryPublicationsFile.getSignedData
protected byte[] getSignedData() throws KSIException { ByteArrayOutputStream byteStream = new ByteArrayOutputStream(); try { byteStream.write(FILE_BEGINNING_MAGIC_BYTES); for (TLVElement element : elements) { if (ELEMENT_TYPE_CMS_SIGNATURE != element.getType()) { ...
java
protected byte[] getSignedData() throws KSIException { ByteArrayOutputStream byteStream = new ByteArrayOutputStream(); try { byteStream.write(FILE_BEGINNING_MAGIC_BYTES); for (TLVElement element : elements) { if (ELEMENT_TYPE_CMS_SIGNATURE != element.getType()) { ...
[ "protected", "byte", "[", "]", "getSignedData", "(", ")", "throws", "KSIException", "{", "ByteArrayOutputStream", "byteStream", "=", "new", "ByteArrayOutputStream", "(", ")", ";", "try", "{", "byteStream", ".", "write", "(", "FILE_BEGINNING_MAGIC_BYTES", ")", ";",...
Get publications file bytes without signature. @return byte array of publication file bytes without signature
[ "Get", "publications", "file", "bytes", "without", "signature", "." ]
b2cd877050f0f392657c724452318d10a1002171
https://github.com/guardtime/ksi-java-sdk/blob/b2cd877050f0f392657c724452318d10a1002171/ksi-api/src/main/java/com/guardtime/ksi/publication/inmemory/InMemoryPublicationsFile.java#L265-L279
109,404
guardtime/ksi-java-sdk
ksi-api/src/main/java/com/guardtime/ksi/unisignature/AggregationHashChainUtil.java
AggregationHashChainUtil.calculateIndex
public static long calculateIndex(List<AggregationChainLink> links) { notNull(links, "Aggregation chain links"); long chainIndex = 0; for (int i = 0; i < links.size(); i++) { if (links.get(i).isLeft()) { chainIndex |= 1L << i; } } chainInde...
java
public static long calculateIndex(List<AggregationChainLink> links) { notNull(links, "Aggregation chain links"); long chainIndex = 0; for (int i = 0; i < links.size(); i++) { if (links.get(i).isLeft()) { chainIndex |= 1L << i; } } chainInde...
[ "public", "static", "long", "calculateIndex", "(", "List", "<", "AggregationChainLink", ">", "links", ")", "{", "notNull", "(", "links", ",", "\"Aggregation chain links\"", ")", ";", "long", "chainIndex", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";...
Calculates chain index @param links Chain links for which to calculate the index @return Index of the chain
[ "Calculates", "chain", "index" ]
b2cd877050f0f392657c724452318d10a1002171
https://github.com/guardtime/ksi-java-sdk/blob/b2cd877050f0f392657c724452318d10a1002171/ksi-api/src/main/java/com/guardtime/ksi/unisignature/AggregationHashChainUtil.java#L35-L45
109,405
guardtime/ksi-java-sdk
ksi-common/src/main/java/com/guardtime/ksi/tlv/TLVElement.java
TLVElement.create
public static TLVElement create(byte[] bytes) throws TLVParserException { Util.notNull(bytes, "Byte array"); TLVInputStream input = null; try { input = new TLVInputStream(new ByteArrayInputStream(bytes)); TLVElement element = input.readElement(); if (input.has...
java
public static TLVElement create(byte[] bytes) throws TLVParserException { Util.notNull(bytes, "Byte array"); TLVInputStream input = null; try { input = new TLVInputStream(new ByteArrayInputStream(bytes)); TLVElement element = input.readElement(); if (input.has...
[ "public", "static", "TLVElement", "create", "(", "byte", "[", "]", "bytes", ")", "throws", "TLVParserException", "{", "Util", ".", "notNull", "(", "bytes", ",", "\"Byte array\"", ")", ";", "TLVInputStream", "input", "=", "null", ";", "try", "{", "input", "...
Creates TLVElement form byte array. @param bytes byte array to create the TLV element from. @return {@link TLVElement} @throws TLVParserException
[ "Creates", "TLVElement", "form", "byte", "array", "." ]
b2cd877050f0f392657c724452318d10a1002171
https://github.com/guardtime/ksi-java-sdk/blob/b2cd877050f0f392657c724452318d10a1002171/ksi-common/src/main/java/com/guardtime/ksi/tlv/TLVElement.java#L103-L118
109,406
guardtime/ksi-java-sdk
ksi-common/src/main/java/com/guardtime/ksi/tlv/TLVElement.java
TLVElement.create
public static TLVElement create(int type, byte[] value) throws TLVParserException { TLVElement element = create(type); element.setContent(value); return element; }
java
public static TLVElement create(int type, byte[] value) throws TLVParserException { TLVElement element = create(type); element.setContent(value); return element; }
[ "public", "static", "TLVElement", "create", "(", "int", "type", ",", "byte", "[", "]", "value", ")", "throws", "TLVParserException", "{", "TLVElement", "element", "=", "create", "(", "type", ")", ";", "element", ".", "setContent", "(", "value", ")", ";", ...
Creates TLV element with byte array content. TLV element nonCritical and forwarded flags are set to false. @param type TLV element type. @param value value to be the content of the TLV element. @return {@link TLVElement} @throws TLVParserException
[ "Creates", "TLV", "element", "with", "byte", "array", "content", ".", "TLV", "element", "nonCritical", "and", "forwarded", "flags", "are", "set", "to", "false", "." ]
b2cd877050f0f392657c724452318d10a1002171
https://github.com/guardtime/ksi-java-sdk/blob/b2cd877050f0f392657c724452318d10a1002171/ksi-common/src/main/java/com/guardtime/ksi/tlv/TLVElement.java#L199-L203
109,407
guardtime/ksi-java-sdk
ksi-common/src/main/java/com/guardtime/ksi/tlv/TLVElement.java
TLVElement.getDecodedString
public final String getDecodedString() throws TLVParserException { byte[] data = getContent(); if (!(data.length > 0 && data[data.length - 1] == '\0')) { throw new TLVParserException("String must be null terminated"); } try { return Util.decodeString(data, 0, data...
java
public final String getDecodedString() throws TLVParserException { byte[] data = getContent(); if (!(data.length > 0 && data[data.length - 1] == '\0')) { throw new TLVParserException("String must be null terminated"); } try { return Util.decodeString(data, 0, data...
[ "public", "final", "String", "getDecodedString", "(", ")", "throws", "TLVParserException", "{", "byte", "[", "]", "data", "=", "getContent", "(", ")", ";", "if", "(", "!", "(", "data", ".", "length", ">", "0", "&&", "data", "[", "data", ".", "length", ...
Converts the TLV element content data to UTF-8 string. @return Decoded instance of string. @throws TLVParserException when content string isn't null terminated or is malformed UTF-8 data.
[ "Converts", "the", "TLV", "element", "content", "data", "to", "UTF", "-", "8", "string", "." ]
b2cd877050f0f392657c724452318d10a1002171
https://github.com/guardtime/ksi-java-sdk/blob/b2cd877050f0f392657c724452318d10a1002171/ksi-common/src/main/java/com/guardtime/ksi/tlv/TLVElement.java#L257-L267
109,408
guardtime/ksi-java-sdk
ksi-common/src/main/java/com/guardtime/ksi/tlv/TLVElement.java
TLVElement.getDecodedHashAlgorithm
public HashAlgorithm getDecodedHashAlgorithm() throws TLVParserException { int algorithmId = getDecodedLong().intValue(); if (HashAlgorithm.isHashAlgorithmId(algorithmId)) { return HashAlgorithm.getById(algorithmId); } throw new TLVParserException("Unknown hash algorithm with...
java
public HashAlgorithm getDecodedHashAlgorithm() throws TLVParserException { int algorithmId = getDecodedLong().intValue(); if (HashAlgorithm.isHashAlgorithmId(algorithmId)) { return HashAlgorithm.getById(algorithmId); } throw new TLVParserException("Unknown hash algorithm with...
[ "public", "HashAlgorithm", "getDecodedHashAlgorithm", "(", ")", "throws", "TLVParserException", "{", "int", "algorithmId", "=", "getDecodedLong", "(", ")", ".", "intValue", "(", ")", ";", "if", "(", "HashAlgorithm", ".", "isHashAlgorithmId", "(", "algorithmId", ")...
Gets HashAlgorithm form TLV element. @return Instance of {@link HashAlgorithm}. @throws TLVParserException
[ "Gets", "HashAlgorithm", "form", "TLV", "element", "." ]
b2cd877050f0f392657c724452318d10a1002171
https://github.com/guardtime/ksi-java-sdk/blob/b2cd877050f0f392657c724452318d10a1002171/ksi-common/src/main/java/com/guardtime/ksi/tlv/TLVElement.java#L304-L310
109,409
guardtime/ksi-java-sdk
ksi-common/src/main/java/com/guardtime/ksi/tlv/TLVElement.java
TLVElement.getContent
public byte[] getContent() throws TLVParserException { byte[] content = this.content; if (!children.isEmpty()) { for (TLVElement child : children) { content = Util.join(content, child.encodeHeader()); content = Util.join(content, child.getContent()); ...
java
public byte[] getContent() throws TLVParserException { byte[] content = this.content; if (!children.isEmpty()) { for (TLVElement child : children) { content = Util.join(content, child.encodeHeader()); content = Util.join(content, child.getContent()); ...
[ "public", "byte", "[", "]", "getContent", "(", ")", "throws", "TLVParserException", "{", "byte", "[", "]", "content", "=", "this", ".", "content", ";", "if", "(", "!", "children", ".", "isEmpty", "(", ")", ")", "{", "for", "(", "TLVElement", "child", ...
Returns the TLV content. If TLV does not include content then empty array is returned. @return Byte array including TLV element content. @throws TLVParserException
[ "Returns", "the", "TLV", "content", ".", "If", "TLV", "does", "not", "include", "content", "then", "empty", "array", "is", "returned", "." ]
b2cd877050f0f392657c724452318d10a1002171
https://github.com/guardtime/ksi-java-sdk/blob/b2cd877050f0f392657c724452318d10a1002171/ksi-common/src/main/java/com/guardtime/ksi/tlv/TLVElement.java#L319-L328
109,410
guardtime/ksi-java-sdk
ksi-common/src/main/java/com/guardtime/ksi/tlv/TLVElement.java
TLVElement.setContent
public void setContent(byte[] content) throws TLVParserException { Util.notNull(content, "Content"); assertActualContentLengthIsInTLVLimits(content.length); this.content = content; }
java
public void setContent(byte[] content) throws TLVParserException { Util.notNull(content, "Content"); assertActualContentLengthIsInTLVLimits(content.length); this.content = content; }
[ "public", "void", "setContent", "(", "byte", "[", "]", "content", ")", "throws", "TLVParserException", "{", "Util", ".", "notNull", "(", "content", ",", "\"Content\"", ")", ";", "assertActualContentLengthIsInTLVLimits", "(", "content", ".", "length", ")", ";", ...
Sets the value to TLV element content. @param content value to set. @throws TLVParserException
[ "Sets", "the", "value", "to", "TLV", "element", "content", "." ]
b2cd877050f0f392657c724452318d10a1002171
https://github.com/guardtime/ksi-java-sdk/blob/b2cd877050f0f392657c724452318d10a1002171/ksi-common/src/main/java/com/guardtime/ksi/tlv/TLVElement.java#L338-L342
109,411
guardtime/ksi-java-sdk
ksi-common/src/main/java/com/guardtime/ksi/tlv/TLVElement.java
TLVElement.getFirstChildElement
public TLVElement getFirstChildElement(int tag) { for (TLVElement element : children) { if (tag == element.getType()) { return element; } } return null; }
java
public TLVElement getFirstChildElement(int tag) { for (TLVElement element : children) { if (tag == element.getType()) { return element; } } return null; }
[ "public", "TLVElement", "getFirstChildElement", "(", "int", "tag", ")", "{", "for", "(", "TLVElement", "element", ":", "children", ")", "{", "if", "(", "tag", "==", "element", ".", "getType", "(", ")", ")", "{", "return", "element", ";", "}", "}", "ret...
Returns the first child element with specified tag. If tag doesn't exist then null is returned. @param tag tag to search. @return The first instance of {@link TLVElement} with specified tag, or null when the child element with specified tag doesn't exist.
[ "Returns", "the", "first", "child", "element", "with", "specified", "tag", ".", "If", "tag", "doesn", "t", "exist", "then", "null", "is", "returned", "." ]
b2cd877050f0f392657c724452318d10a1002171
https://github.com/guardtime/ksi-java-sdk/blob/b2cd877050f0f392657c724452318d10a1002171/ksi-common/src/main/java/com/guardtime/ksi/tlv/TLVElement.java#L388-L395
109,412
guardtime/ksi-java-sdk
ksi-common/src/main/java/com/guardtime/ksi/tlv/TLVElement.java
TLVElement.getChildElements
public List<TLVElement> getChildElements(int tag) { List<TLVElement> elements = new LinkedList<>(); for (TLVElement element : children) { if (tag == element.getType()) { elements.add(element); } } return elements; }
java
public List<TLVElement> getChildElements(int tag) { List<TLVElement> elements = new LinkedList<>(); for (TLVElement element : children) { if (tag == element.getType()) { elements.add(element); } } return elements; }
[ "public", "List", "<", "TLVElement", ">", "getChildElements", "(", "int", "tag", ")", "{", "List", "<", "TLVElement", ">", "elements", "=", "new", "LinkedList", "<>", "(", ")", ";", "for", "(", "TLVElement", "element", ":", "children", ")", "{", "if", ...
Returns all the tags with the specified tag. @param tag tag to search. @return The list of {@link TLVElement}'s with specified tag or empty list.
[ "Returns", "all", "the", "tags", "with", "the", "specified", "tag", "." ]
b2cd877050f0f392657c724452318d10a1002171
https://github.com/guardtime/ksi-java-sdk/blob/b2cd877050f0f392657c724452318d10a1002171/ksi-common/src/main/java/com/guardtime/ksi/tlv/TLVElement.java#L426-L434
109,413
guardtime/ksi-java-sdk
ksi-common/src/main/java/com/guardtime/ksi/tlv/TLVElement.java
TLVElement.encodeHeader
public byte[] encodeHeader() throws TLVParserException { DataOutputStream out = null; try { ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); out = new DataOutputStream(byteArrayOutputStream); int dataLength = getContentLength(); ...
java
public byte[] encodeHeader() throws TLVParserException { DataOutputStream out = null; try { ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); out = new DataOutputStream(byteArrayOutputStream); int dataLength = getContentLength(); ...
[ "public", "byte", "[", "]", "encodeHeader", "(", ")", "throws", "TLVParserException", "{", "DataOutputStream", "out", "=", "null", ";", "try", "{", "ByteArrayOutputStream", "byteArrayOutputStream", "=", "new", "ByteArrayOutputStream", "(", ")", ";", "out", "=", ...
Encodes TLV header. @return Byte array containing encoded TLV header. @throws TLVParserException when TLV header encoding fails or I/O error occurs.
[ "Encodes", "TLV", "header", "." ]
b2cd877050f0f392657c724452318d10a1002171
https://github.com/guardtime/ksi-java-sdk/blob/b2cd877050f0f392657c724452318d10a1002171/ksi-common/src/main/java/com/guardtime/ksi/tlv/TLVElement.java#L484-L520
109,414
guardtime/ksi-java-sdk
ksi-common/src/main/java/com/guardtime/ksi/tlv/TLVElement.java
TLVElement.replace
public void replace(TLVElement childToBeReplaced, TLVElement newChild) { for (int i = 0; i < children.size(); i++) { if (children.get(i).equals(childToBeReplaced)) { children.set(i, newChild); return; } } }
java
public void replace(TLVElement childToBeReplaced, TLVElement newChild) { for (int i = 0; i < children.size(); i++) { if (children.get(i).equals(childToBeReplaced)) { children.set(i, newChild); return; } } }
[ "public", "void", "replace", "(", "TLVElement", "childToBeReplaced", ",", "TLVElement", "newChild", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "children", ".", "size", "(", ")", ";", "i", "++", ")", "{", "if", "(", "children", ".", ...
Replaces first element with given one. @param childToBeReplaced TLV element to be replaced. @param newChild new TLV element.
[ "Replaces", "first", "element", "with", "given", "one", "." ]
b2cd877050f0f392657c724452318d10a1002171
https://github.com/guardtime/ksi-java-sdk/blob/b2cd877050f0f392657c724452318d10a1002171/ksi-common/src/main/java/com/guardtime/ksi/tlv/TLVElement.java#L548-L555
109,415
guardtime/ksi-java-sdk
ksi-common/src/main/java/com/guardtime/ksi/tlv/TLVElement.java
TLVElement.writeTo
public void writeTo(OutputStream out) throws TLVParserException { Util.notNull(out, "Output stream"); try { assertActualContentLengthIsInTLVLimits(getContentLength()); out.write(encodeHeader()); out.write(getContent()); } catch (IOException e) { th...
java
public void writeTo(OutputStream out) throws TLVParserException { Util.notNull(out, "Output stream"); try { assertActualContentLengthIsInTLVLimits(getContentLength()); out.write(encodeHeader()); out.write(getContent()); } catch (IOException e) { th...
[ "public", "void", "writeTo", "(", "OutputStream", "out", ")", "throws", "TLVParserException", "{", "Util", ".", "notNull", "(", "out", ",", "\"Output stream\"", ")", ";", "try", "{", "assertActualContentLengthIsInTLVLimits", "(", "getContentLength", "(", ")", ")",...
Writes the encoded TLV element to the specified output stream. @param out the output stream to which to write the TLV element data. @throws TLVParserException when I/O error occurred or TLV encoding failed.
[ "Writes", "the", "encoded", "TLV", "element", "to", "the", "specified", "output", "stream", "." ]
b2cd877050f0f392657c724452318d10a1002171
https://github.com/guardtime/ksi-java-sdk/blob/b2cd877050f0f392657c724452318d10a1002171/ksi-common/src/main/java/com/guardtime/ksi/tlv/TLVElement.java#L582-L591
109,416
guardtime/ksi-java-sdk
ksi-service-client-tcp/src/main/java/com/guardtime/ksi/service/tcp/TransactionDecoder.java
TransactionDecoder.extractNextTlvElementLength
private int extractNextTlvElementLength(IoBuffer in) { if (!hasRemainingData(in, 2)) { return NOT_ENOUGH_DATA; } try { in.mark(); int firstByte = in.getUnsigned(); boolean tlv8 = (firstByte & TLV16_MASK) == 0; if (tlv8) { ...
java
private int extractNextTlvElementLength(IoBuffer in) { if (!hasRemainingData(in, 2)) { return NOT_ENOUGH_DATA; } try { in.mark(); int firstByte = in.getUnsigned(); boolean tlv8 = (firstByte & TLV16_MASK) == 0; if (tlv8) { ...
[ "private", "int", "extractNextTlvElementLength", "(", "IoBuffer", "in", ")", "{", "if", "(", "!", "hasRemainingData", "(", "in", ",", "2", ")", ")", "{", "return", "NOT_ENOUGH_DATA", ";", "}", "try", "{", "in", ".", "mark", "(", ")", ";", "int", "first...
Returns the length of the next TLV element. Returns -1 when buffer doesn't contain enough data for next TLV element. @return The length of the TLV element.
[ "Returns", "the", "length", "of", "the", "next", "TLV", "element", ".", "Returns", "-", "1", "when", "buffer", "doesn", "t", "contain", "enough", "data", "for", "next", "TLV", "element", "." ]
b2cd877050f0f392657c724452318d10a1002171
https://github.com/guardtime/ksi-java-sdk/blob/b2cd877050f0f392657c724452318d10a1002171/ksi-service-client-tcp/src/main/java/com/guardtime/ksi/service/tcp/TransactionDecoder.java#L69-L91
109,417
mailosaur/mailosaur-java
src/main/java/com/mailosaur/Servers.java
Servers.create
public Server create(ServerCreateOptions serverCreateOptions) throws IOException, MailosaurException { return client.request("POST", "api/servers", serverCreateOptions).parseAs(Server.class); }
java
public Server create(ServerCreateOptions serverCreateOptions) throws IOException, MailosaurException { return client.request("POST", "api/servers", serverCreateOptions).parseAs(Server.class); }
[ "public", "Server", "create", "(", "ServerCreateOptions", "serverCreateOptions", ")", "throws", "IOException", ",", "MailosaurException", "{", "return", "client", ".", "request", "(", "\"POST\"", ",", "\"api/servers\"", ",", "serverCreateOptions", ")", ".", "parseAs",...
Create a server. Creates a new virtual SMTP server and returns it. @param serverCreateOptions the ServerCreateOptions value @throws MailosaurException thrown if the request is rejected by server @throws IOException @return the Server object if successful.
[ "Create", "a", "server", ".", "Creates", "a", "new", "virtual", "SMTP", "server", "and", "returns", "it", "." ]
a580760f2eb41e034127d93104c7050639eced97
https://github.com/mailosaur/mailosaur-java/blob/a580760f2eb41e034127d93104c7050639eced97/src/main/java/com/mailosaur/Servers.java#L48-L50
109,418
mailosaur/mailosaur-java
src/main/java/com/mailosaur/Servers.java
Servers.get
public Server get(String id) throws IOException, MailosaurException { return client.request("GET", "api/servers/" + id).parseAs(Server.class); }
java
public Server get(String id) throws IOException, MailosaurException { return client.request("GET", "api/servers/" + id).parseAs(Server.class); }
[ "public", "Server", "get", "(", "String", "id", ")", "throws", "IOException", ",", "MailosaurException", "{", "return", "client", ".", "request", "(", "\"GET\"", ",", "\"api/servers/\"", "+", "id", ")", ".", "parseAs", "(", "Server", ".", "class", ")", ";"...
Retrieve a server. Retrieves the detail for a single server. Simply supply the unique identifier for the required server. @param id The identifier of the server to be retrieved. @throws MailosaurException thrown if the request is rejected by server @throws IOException @return the Server object if successful.
[ "Retrieve", "a", "server", ".", "Retrieves", "the", "detail", "for", "a", "single", "server", ".", "Simply", "supply", "the", "unique", "identifier", "for", "the", "required", "server", "." ]
a580760f2eb41e034127d93104c7050639eced97
https://github.com/mailosaur/mailosaur-java/blob/a580760f2eb41e034127d93104c7050639eced97/src/main/java/com/mailosaur/Servers.java#L61-L63
109,419
mailosaur/mailosaur-java
src/main/java/com/mailosaur/Servers.java
Servers.update
public Server update(String id, Server server) throws IOException, MailosaurException { return client.request("PUT", "api/servers/" + id, server).parseAs(Server.class); }
java
public Server update(String id, Server server) throws IOException, MailosaurException { return client.request("PUT", "api/servers/" + id, server).parseAs(Server.class); }
[ "public", "Server", "update", "(", "String", "id", ",", "Server", "server", ")", "throws", "IOException", ",", "MailosaurException", "{", "return", "client", ".", "request", "(", "\"PUT\"", ",", "\"api/servers/\"", "+", "id", ",", "server", ")", ".", "parseA...
Update a server. Updats a single server and returns it. @param id The identifier of the server to be updated. @param server the Server value @throws MailosaurException thrown if the request is rejected by server @throws IOException @return the Server object if successful.
[ "Update", "a", "server", ".", "Updats", "a", "single", "server", "and", "returns", "it", "." ]
a580760f2eb41e034127d93104c7050639eced97
https://github.com/mailosaur/mailosaur-java/blob/a580760f2eb41e034127d93104c7050639eced97/src/main/java/com/mailosaur/Servers.java#L75-L77
109,420
mailosaur/mailosaur-java
src/main/java/com/mailosaur/Messages.java
Messages.get
public Message get(String id) throws IOException, MailosaurException { return client.request("GET", "api/messages/" + id).parseAs(Message.class); }
java
public Message get(String id) throws IOException, MailosaurException { return client.request("GET", "api/messages/" + id).parseAs(Message.class); }
[ "public", "Message", "get", "(", "String", "id", ")", "throws", "IOException", ",", "MailosaurException", "{", "return", "client", ".", "request", "(", "\"GET\"", ",", "\"api/messages/\"", "+", "id", ")", ".", "parseAs", "(", "Message", ".", "class", ")", ...
Retrieve an message. Retrieves the detail for a single message. Simply supply the unique identifier for the required message. @param id The identifier of the message to be retrieved. @throws MailosaurException thrown if the request is rejected by server @throws IOException @return the Message object if successful.
[ "Retrieve", "an", "message", ".", "Retrieves", "the", "detail", "for", "a", "single", "message", ".", "Simply", "supply", "the", "unique", "identifier", "for", "the", "required", "message", "." ]
a580760f2eb41e034127d93104c7050639eced97
https://github.com/mailosaur/mailosaur-java/blob/a580760f2eb41e034127d93104c7050639eced97/src/main/java/com/mailosaur/Messages.java#L36-L38
109,421
mailosaur/mailosaur-java
src/main/java/com/mailosaur/Messages.java
Messages.deleteAll
public void deleteAll(String server) throws MailosaurException { HashMap<String, String> query = new HashMap<String, String>(); query.put("server", server); client.request("DELETE", "api/messages", query); }
java
public void deleteAll(String server) throws MailosaurException { HashMap<String, String> query = new HashMap<String, String>(); query.put("server", server); client.request("DELETE", "api/messages", query); }
[ "public", "void", "deleteAll", "(", "String", "server", ")", "throws", "MailosaurException", "{", "HashMap", "<", "String", ",", "String", ">", "query", "=", "new", "HashMap", "<", "String", ",", "String", ">", "(", ")", ";", "query", ".", "put", "(", ...
Delete all messages. Permanently deletes all messages held by the specified server. This operation cannot be undone. Also deletes any attachments related to each message. @param server The identifier of the server to be emptied. @throws MailosaurException thrown if the request is rejected by server
[ "Delete", "all", "messages", ".", "Permanently", "deletes", "all", "messages", "held", "by", "the", "specified", "server", ".", "This", "operation", "cannot", "be", "undone", ".", "Also", "deletes", "any", "attachments", "related", "to", "each", "message", "."...
a580760f2eb41e034127d93104c7050639eced97
https://github.com/mailosaur/mailosaur-java/blob/a580760f2eb41e034127d93104c7050639eced97/src/main/java/com/mailosaur/Messages.java#L59-L63
109,422
mailosaur/mailosaur-java
src/main/java/com/mailosaur/Messages.java
Messages.list
public MessageListResult list(String server) throws IOException, MailosaurException { HashMap<String, String> query = new HashMap<String, String>(); query.put("server", server); return client.request("GET", "api/messages", query).parseAs(MessageListResult.class); }
java
public MessageListResult list(String server) throws IOException, MailosaurException { HashMap<String, String> query = new HashMap<String, String>(); query.put("server", server); return client.request("GET", "api/messages", query).parseAs(MessageListResult.class); }
[ "public", "MessageListResult", "list", "(", "String", "server", ")", "throws", "IOException", ",", "MailosaurException", "{", "HashMap", "<", "String", ",", "String", ">", "query", "=", "new", "HashMap", "<", "String", ",", "String", ">", "(", ")", ";", "q...
List all messages. Returns a list of your messages. The messages are returned sorted by received date, with the most recently-received messages appearing first. @param server The identifier of the server hosting the messages. @throws MailosaurException thrown if the request is rejected by server @throws IOException @r...
[ "List", "all", "messages", ".", "Returns", "a", "list", "of", "your", "messages", ".", "The", "messages", "are", "returned", "sorted", "by", "received", "date", "with", "the", "most", "recently", "-", "received", "messages", "appearing", "first", "." ]
a580760f2eb41e034127d93104c7050639eced97
https://github.com/mailosaur/mailosaur-java/blob/a580760f2eb41e034127d93104c7050639eced97/src/main/java/com/mailosaur/Messages.java#L74-L78
109,423
mailosaur/mailosaur-java
src/main/java/com/mailosaur/Messages.java
Messages.search
public MessageListResult search(String server, SearchCriteria criteria) throws IOException, MailosaurException { HashMap<String, String> query = new HashMap<String, String>(); query.put("server", server); return client.request("POST", "api/messages/search", criteria, query).parseAs(MessageListResult.clas...
java
public MessageListResult search(String server, SearchCriteria criteria) throws IOException, MailosaurException { HashMap<String, String> query = new HashMap<String, String>(); query.put("server", server); return client.request("POST", "api/messages/search", criteria, query).parseAs(MessageListResult.clas...
[ "public", "MessageListResult", "search", "(", "String", "server", ",", "SearchCriteria", "criteria", ")", "throws", "IOException", ",", "MailosaurException", "{", "HashMap", "<", "String", ",", "String", ">", "query", "=", "new", "HashMap", "<", "String", ",", ...
Search for messages. Returns a list of messages matching the specified search criteria. The messages are returned sorted by received date, with the most recently-received messages appearing first. @param server The identifier of the server hosting the messages. @param criteria The search criteria to match results agai...
[ "Search", "for", "messages", ".", "Returns", "a", "list", "of", "messages", "matching", "the", "specified", "search", "criteria", ".", "The", "messages", "are", "returned", "sorted", "by", "received", "date", "with", "the", "most", "recently", "-", "received",...
a580760f2eb41e034127d93104c7050639eced97
https://github.com/mailosaur/mailosaur-java/blob/a580760f2eb41e034127d93104c7050639eced97/src/main/java/com/mailosaur/Messages.java#L90-L94
109,424
mailosaur/mailosaur-java
src/main/java/com/mailosaur/Messages.java
Messages.waitFor
public Message waitFor(String server, SearchCriteria criteria) throws IOException, MailosaurException { HashMap<String, String> query = new HashMap<String, String>(); query.put("server", server); return client.request("POST", "api/messages/await", criteria, query).parseAs(Message.class); }
java
public Message waitFor(String server, SearchCriteria criteria) throws IOException, MailosaurException { HashMap<String, String> query = new HashMap<String, String>(); query.put("server", server); return client.request("POST", "api/messages/await", criteria, query).parseAs(Message.class); }
[ "public", "Message", "waitFor", "(", "String", "server", ",", "SearchCriteria", "criteria", ")", "throws", "IOException", ",", "MailosaurException", "{", "HashMap", "<", "String", ",", "String", ">", "query", "=", "new", "HashMap", "<", "String", ",", "String"...
Wait for a specific message. Returns as soon as an message matching the specified search criteria is found. @param server The identifier of the server hosting the message. @param criteria The search criteria to use in order to find a match. @throws MailosaurException thrown if the request is rejected by server @throws...
[ "Wait", "for", "a", "specific", "message", ".", "Returns", "as", "soon", "as", "an", "message", "matching", "the", "specified", "search", "criteria", "is", "found", "." ]
a580760f2eb41e034127d93104c7050639eced97
https://github.com/mailosaur/mailosaur-java/blob/a580760f2eb41e034127d93104c7050639eced97/src/main/java/com/mailosaur/Messages.java#L106-L110
109,425
mailosaur/mailosaur-java
src/main/java/com/mailosaur/Analysis.java
Analysis.spam
public SpamAnalysisResult spam(String email) throws IOException, MailosaurException { return client.request("GET", "api/analysis/spam/" + email).parseAs(SpamAnalysisResult.class); }
java
public SpamAnalysisResult spam(String email) throws IOException, MailosaurException { return client.request("GET", "api/analysis/spam/" + email).parseAs(SpamAnalysisResult.class); }
[ "public", "SpamAnalysisResult", "spam", "(", "String", "email", ")", "throws", "IOException", ",", "MailosaurException", "{", "return", "client", ".", "request", "(", "\"GET\"", ",", "\"api/analysis/spam/\"", "+", "email", ")", ".", "parseAs", "(", "SpamAnalysisRe...
Perform spam analysis on the specified email. @param email The identifier of the email to be analyzed. @throws MailosaurException thrown if the request is rejected by server @throws IOException @return the SpamCheckResult object if successful.
[ "Perform", "spam", "analysis", "on", "the", "specified", "email", "." ]
a580760f2eb41e034127d93104c7050639eced97
https://github.com/mailosaur/mailosaur-java/blob/a580760f2eb41e034127d93104c7050639eced97/src/main/java/com/mailosaur/Analysis.java#L32-L34
109,426
BroadleafCommerce/blc-paypal
src/main/java/org/broadleafcommerce/vendor/paypal/web/controller/BroadleafPayPalCheckoutController.java
BroadleafPayPalCheckoutController.completeCheckout
@RequestMapping(value = "/checkout/complete", method = RequestMethod.POST) public String completeCheckout() throws PaymentException { paymentService.updatePayPalPaymentForFulfillment(); String paymentId = paymentService.getPayPalPaymentIdFromCurrentOrder(); String payerId = paymentService.ge...
java
@RequestMapping(value = "/checkout/complete", method = RequestMethod.POST) public String completeCheckout() throws PaymentException { paymentService.updatePayPalPaymentForFulfillment(); String paymentId = paymentService.getPayPalPaymentIdFromCurrentOrder(); String payerId = paymentService.ge...
[ "@", "RequestMapping", "(", "value", "=", "\"/checkout/complete\"", ",", "method", "=", "RequestMethod", ".", "POST", ")", "public", "String", "completeCheckout", "(", ")", "throws", "PaymentException", "{", "paymentService", ".", "updatePayPalPaymentForFulfillment", ...
Completes checkout for a PayPal payment. If there's already a PayPal payment we go ahead and make sure the details of the payment are updated to all of the forms filled out by the customer since they could've updated shipping information, added a promotion, or other various things to the order. @return Redirect URL to...
[ "Completes", "checkout", "for", "a", "PayPal", "payment", ".", "If", "there", "s", "already", "a", "PayPal", "payment", "we", "go", "ahead", "and", "make", "sure", "the", "details", "of", "the", "payment", "are", "updated", "to", "all", "of", "the", "for...
2b38e25722411f136f9012c030519013f6cb010a
https://github.com/BroadleafCommerce/blc-paypal/blob/2b38e25722411f136f9012c030519013f6cb010a/src/main/java/org/broadleafcommerce/vendor/paypal/web/controller/BroadleafPayPalCheckoutController.java#L161-L173
109,427
digipost/signature-api-client-java
src/main/java/no/digipost/signature/client/portal/PortalJobStatusChanged.java
PortalJobStatusChanged.getSignatureFrom
public Signature getSignatureFrom(SignerIdentifier signer) { return signatures.stream() .filter(signatureFrom(signer)) .findFirst() .orElseThrow(() -> new IllegalArgumentException("Unable to find signature from this signer")); }
java
public Signature getSignatureFrom(SignerIdentifier signer) { return signatures.stream() .filter(signatureFrom(signer)) .findFirst() .orElseThrow(() -> new IllegalArgumentException("Unable to find signature from this signer")); }
[ "public", "Signature", "getSignatureFrom", "(", "SignerIdentifier", "signer", ")", "{", "return", "signatures", ".", "stream", "(", ")", ".", "filter", "(", "signatureFrom", "(", "signer", ")", ")", ".", "findFirst", "(", ")", ".", "orElseThrow", "(", "(", ...
Gets the signature from a given signer. @param signer an identifier referring to a signer of the job. It may be a personal identification number or contact information, depending of how the {@link PortalSigner signer} was initially created (using {@link PortalSigner#identifiedByPersonalIdentificationNumber(String, Not...
[ "Gets", "the", "signature", "from", "a", "given", "signer", "." ]
246207571641fbac6beda5ffc585eec188825c45
https://github.com/digipost/signature-api-client-java/blob/246207571641fbac6beda5ffc585eec188825c45/src/main/java/no/digipost/signature/client/portal/PortalJobStatusChanged.java#L115-L120
109,428
digipost/signature-api-client-java
src/main/java/no/digipost/signature/client/direct/RedirectUrls.java
RedirectUrls.getFor
public String getFor(String personalIdentificationNumber) { for (RedirectUrl redirectUrl : urls) { if (redirectUrl.signer.equals(personalIdentificationNumber)) { return redirectUrl.url; } } throw new IllegalArgumentException("Unable to find redirect URL fo...
java
public String getFor(String personalIdentificationNumber) { for (RedirectUrl redirectUrl : urls) { if (redirectUrl.signer.equals(personalIdentificationNumber)) { return redirectUrl.url; } } throw new IllegalArgumentException("Unable to find redirect URL fo...
[ "public", "String", "getFor", "(", "String", "personalIdentificationNumber", ")", "{", "for", "(", "RedirectUrl", "redirectUrl", ":", "urls", ")", "{", "if", "(", "redirectUrl", ".", "signer", ".", "equals", "(", "personalIdentificationNumber", ")", ")", "{", ...
Gets the redirect URL for a given signer. @throws IllegalArgumentException if the job response doesn't contain a redirect URL for this signer @see DirectJobResponse#getSingleRedirectUrl()
[ "Gets", "the", "redirect", "URL", "for", "a", "given", "signer", "." ]
246207571641fbac6beda5ffc585eec188825c45
https://github.com/digipost/signature-api-client-java/blob/246207571641fbac6beda5ffc585eec188825c45/src/main/java/no/digipost/signature/client/direct/RedirectUrls.java#L27-L34
109,429
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/session/InMemoryDocumentSessionOperations.java
InMemoryDocumentSessionOperations.getMetadataFor
public <T> IMetadataDictionary getMetadataFor(T instance) { if (instance == null) { throw new IllegalArgumentException("Instance cannot be null"); } DocumentInfo documentInfo = getDocumentInfo(instance); if (documentInfo.getMetadataInstance() != null) { return do...
java
public <T> IMetadataDictionary getMetadataFor(T instance) { if (instance == null) { throw new IllegalArgumentException("Instance cannot be null"); } DocumentInfo documentInfo = getDocumentInfo(instance); if (documentInfo.getMetadataInstance() != null) { return do...
[ "public", "<", "T", ">", "IMetadataDictionary", "getMetadataFor", "(", "T", "instance", ")", "{", "if", "(", "instance", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Instance cannot be null\"", ")", ";", "}", "DocumentInfo", "docum...
Gets the metadata for the specified entity. @param <T> instance class @param instance Instance to get metadata from @return document metadata
[ "Gets", "the", "metadata", "for", "the", "specified", "entity", "." ]
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/session/InMemoryDocumentSessionOperations.java#L351-L365
109,430
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/session/InMemoryDocumentSessionOperations.java
InMemoryDocumentSessionOperations.getCountersFor
public <T> List<String> getCountersFor(T instance) { if (instance == null) { throw new IllegalArgumentException("Instance cannot be null"); } DocumentInfo documentInfo = getDocumentInfo(instance); ArrayNode countersArray = (ArrayNode) documentInfo.getMetadata().get(Constant...
java
public <T> List<String> getCountersFor(T instance) { if (instance == null) { throw new IllegalArgumentException("Instance cannot be null"); } DocumentInfo documentInfo = getDocumentInfo(instance); ArrayNode countersArray = (ArrayNode) documentInfo.getMetadata().get(Constant...
[ "public", "<", "T", ">", "List", "<", "String", ">", "getCountersFor", "(", "T", "instance", ")", "{", "if", "(", "instance", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Instance cannot be null\"", ")", ";", "}", "DocumentInfo...
Gets all counter names for the specified entity. @param instance Instance @param <T> Instance class @return All counters names
[ "Gets", "all", "counter", "names", "for", "the", "specified", "entity", "." ]
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/session/InMemoryDocumentSessionOperations.java#L373-L388
109,431
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/session/InMemoryDocumentSessionOperations.java
InMemoryDocumentSessionOperations.getChangeVectorFor
public <T> String getChangeVectorFor(T instance) { if (instance == null) { throw new IllegalArgumentException("instance cannot be null"); } DocumentInfo documentInfo = getDocumentInfo(instance); JsonNode changeVector = documentInfo.getMetadata().get(Constants.Documents.Metad...
java
public <T> String getChangeVectorFor(T instance) { if (instance == null) { throw new IllegalArgumentException("instance cannot be null"); } DocumentInfo documentInfo = getDocumentInfo(instance); JsonNode changeVector = documentInfo.getMetadata().get(Constants.Documents.Metad...
[ "public", "<", "T", ">", "String", "getChangeVectorFor", "(", "T", "instance", ")", "{", "if", "(", "instance", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"instance cannot be null\"", ")", ";", "}", "DocumentInfo", "documentInfo",...
Gets the Change Vector for the specified entity. If the entity is transient, it will load the change vector from the store and associate the current state of the entity with the change vector from the server. @param <T> instance class @param instance Instance to get change vector from @return change vector
[ "Gets", "the", "Change", "Vector", "for", "the", "specified", "entity", ".", "If", "the", "entity", "is", "transient", "it", "will", "load", "the", "change", "vector", "from", "the", "store", "and", "associate", "the", "current", "state", "of", "the", "ent...
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/session/InMemoryDocumentSessionOperations.java#L399-L410
109,432
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/session/InMemoryDocumentSessionOperations.java
InMemoryDocumentSessionOperations.getDocumentId
public String getDocumentId(Object instance) { if (instance == null) { return null; } DocumentInfo value = documentsByEntity.get(instance); return value != null ? value.getId() : null; }
java
public String getDocumentId(Object instance) { if (instance == null) { return null; } DocumentInfo value = documentsByEntity.get(instance); return value != null ? value.getId() : null; }
[ "public", "String", "getDocumentId", "(", "Object", "instance", ")", "{", "if", "(", "instance", "==", "null", ")", "{", "return", "null", ";", "}", "DocumentInfo", "value", "=", "documentsByEntity", ".", "get", "(", "instance", ")", ";", "return", "value"...
Gets the document id. @param instance instance to get document id from @return document id
[ "Gets", "the", "document", "id", "." ]
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/session/InMemoryDocumentSessionOperations.java#L475-L481
109,433
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/session/InMemoryDocumentSessionOperations.java
InMemoryDocumentSessionOperations.trackEntity
@SuppressWarnings("unchecked") public <T> T trackEntity(Class<T> clazz, DocumentInfo documentFound) { return (T) trackEntity(clazz, documentFound.getId(), documentFound.getDocument(), documentFound.getMetadata(), noTracking); }
java
@SuppressWarnings("unchecked") public <T> T trackEntity(Class<T> clazz, DocumentInfo documentFound) { return (T) trackEntity(clazz, documentFound.getId(), documentFound.getDocument(), documentFound.getMetadata(), noTracking); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", ">", "T", "trackEntity", "(", "Class", "<", "T", ">", "clazz", ",", "DocumentInfo", "documentFound", ")", "{", "return", "(", "T", ")", "trackEntity", "(", "clazz", ",", "documentFound...
Tracks the entity inside the unit of work @param <T> entity class @param clazz entity class @param documentFound Document info @return tracked entity
[ "Tracks", "the", "entity", "inside", "the", "unit", "of", "work" ]
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/session/InMemoryDocumentSessionOperations.java#L501-L504
109,434
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/session/InMemoryDocumentSessionOperations.java
InMemoryDocumentSessionOperations.trackEntity
public Object trackEntity(Class entityType, String id, ObjectNode document, ObjectNode metadata, boolean noTracking) { noTracking = this.noTracking || noTracking; // if noTracking is session-wide then we want to override the passed argument if (StringUtils.isEmpty(id)) { return deserializ...
java
public Object trackEntity(Class entityType, String id, ObjectNode document, ObjectNode metadata, boolean noTracking) { noTracking = this.noTracking || noTracking; // if noTracking is session-wide then we want to override the passed argument if (StringUtils.isEmpty(id)) { return deserializ...
[ "public", "Object", "trackEntity", "(", "Class", "entityType", ",", "String", "id", ",", "ObjectNode", "document", ",", "ObjectNode", "metadata", ",", "boolean", "noTracking", ")", "{", "noTracking", "=", "this", ".", "noTracking", "||", "noTracking", ";", "//...
Tracks the entity. @param entityType Entity class @param id Id of document @param document raw entity @param metadata raw document metadata @param noTracking no tracking @return entity
[ "Tracks", "the", "entity", "." ]
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/session/InMemoryDocumentSessionOperations.java#L545-L605
109,435
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/session/InMemoryDocumentSessionOperations.java
InMemoryDocumentSessionOperations.delete
public <T> void delete(T entity) { if (entity == null) { throw new IllegalArgumentException("Entity cannot be null"); } DocumentInfo value = documentsByEntity.get(entity); if (value == null) { throw new IllegalStateException(entity + " is not associated with the ...
java
public <T> void delete(T entity) { if (entity == null) { throw new IllegalArgumentException("Entity cannot be null"); } DocumentInfo value = documentsByEntity.get(entity); if (value == null) { throw new IllegalStateException(entity + " is not associated with the ...
[ "public", "<", "T", ">", "void", "delete", "(", "T", "entity", ")", "{", "if", "(", "entity", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Entity cannot be null\"", ")", ";", "}", "DocumentInfo", "value", "=", "documentsByEntit...
Marks the specified entity for deletion. The entity will be deleted when SaveChanges is called. @param <T> entity class @param entity Entity to delete
[ "Marks", "the", "specified", "entity", "for", "deletion", ".", "The", "entity", "will", "be", "deleted", "when", "SaveChanges", "is", "called", "." ]
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/session/InMemoryDocumentSessionOperations.java#L624-L640
109,436
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/session/InMemoryDocumentSessionOperations.java
InMemoryDocumentSessionOperations.store
public void store(Object entity) { Reference<String> stringReference = new Reference<>(); boolean hasId = generateEntityIdOnTheClient.tryGetIdFromInstance(entity, stringReference); storeInternal(entity, null, null, !hasId ? ConcurrencyCheckMode.FORCED : ConcurrencyCheckMode.AUTO); }
java
public void store(Object entity) { Reference<String> stringReference = new Reference<>(); boolean hasId = generateEntityIdOnTheClient.tryGetIdFromInstance(entity, stringReference); storeInternal(entity, null, null, !hasId ? ConcurrencyCheckMode.FORCED : ConcurrencyCheckMode.AUTO); }
[ "public", "void", "store", "(", "Object", "entity", ")", "{", "Reference", "<", "String", ">", "stringReference", "=", "new", "Reference", "<>", "(", ")", ";", "boolean", "hasId", "=", "generateEntityIdOnTheClient", ".", "tryGetIdFromInstance", "(", "entity", ...
Stores the specified entity in the session. The entity will be saved when SaveChanges is called. @param entity Entity to store
[ "Stores", "the", "specified", "entity", "in", "the", "session", ".", "The", "entity", "will", "be", "saved", "when", "SaveChanges", "is", "called", "." ]
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/session/InMemoryDocumentSessionOperations.java#L686-L690
109,437
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/session/InMemoryDocumentSessionOperations.java
InMemoryDocumentSessionOperations.hasChanges
public boolean hasChanges() { for (Map.Entry<Object, DocumentInfo> entity : documentsByEntity.entrySet()) { ObjectNode document = entityToJson.convertEntityToJson(entity.getKey(), entity.getValue()); if (entityChanged(document, entity.getValue(), null)) { return true; ...
java
public boolean hasChanges() { for (Map.Entry<Object, DocumentInfo> entity : documentsByEntity.entrySet()) { ObjectNode document = entityToJson.convertEntityToJson(entity.getKey(), entity.getValue()); if (entityChanged(document, entity.getValue(), null)) { return true; ...
[ "public", "boolean", "hasChanges", "(", ")", "{", "for", "(", "Map", ".", "Entry", "<", "Object", ",", "DocumentInfo", ">", "entity", ":", "documentsByEntity", ".", "entrySet", "(", ")", ")", "{", "ObjectNode", "document", "=", "entityToJson", ".", "conver...
Gets a value indicating whether any of the entities tracked by the session has changes. @return true if session has changes
[ "Gets", "a", "value", "indicating", "whether", "any", "of", "the", "entities", "tracked", "by", "the", "session", "has", "changes", "." ]
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/session/InMemoryDocumentSessionOperations.java#L1074-L1083
109,438
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/session/InMemoryDocumentSessionOperations.java
InMemoryDocumentSessionOperations.hasChanged
public boolean hasChanged(Object entity) { DocumentInfo documentInfo = documentsByEntity.get(entity); if (documentInfo == null) { return false; } ObjectNode document = entityToJson.convertEntityToJson(entity, documentInfo); return entityChanged(document, documentInf...
java
public boolean hasChanged(Object entity) { DocumentInfo documentInfo = documentsByEntity.get(entity); if (documentInfo == null) { return false; } ObjectNode document = entityToJson.convertEntityToJson(entity, documentInfo); return entityChanged(document, documentInf...
[ "public", "boolean", "hasChanged", "(", "Object", "entity", ")", "{", "DocumentInfo", "documentInfo", "=", "documentsByEntity", ".", "get", "(", "entity", ")", ";", "if", "(", "documentInfo", "==", "null", ")", "{", "return", "false", ";", "}", "ObjectNode",...
Determines whether the specified entity has changed. @param entity Entity to check @return true if entity has changed
[ "Determines", "whether", "the", "specified", "entity", "has", "changed", "." ]
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/session/InMemoryDocumentSessionOperations.java#L1091-L1100
109,439
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/session/InMemoryDocumentSessionOperations.java
InMemoryDocumentSessionOperations.evict
public <T> void evict(T entity) { DocumentInfo documentInfo = documentsByEntity.get(entity); if (documentInfo != null) { documentsByEntity.remove(entity); documentsById.remove(documentInfo.getId()); } deletedEntities.remove(entity); if (_countersByDocId !...
java
public <T> void evict(T entity) { DocumentInfo documentInfo = documentsByEntity.get(entity); if (documentInfo != null) { documentsByEntity.remove(entity); documentsById.remove(documentInfo.getId()); } deletedEntities.remove(entity); if (_countersByDocId !...
[ "public", "<", "T", ">", "void", "evict", "(", "T", "entity", ")", "{", "DocumentInfo", "documentInfo", "=", "documentsByEntity", ".", "get", "(", "entity", ")", ";", "if", "(", "documentInfo", "!=", "null", ")", "{", "documentsByEntity", ".", "remove", ...
Evicts the specified entity from the session. Remove the entity from the delete queue and stops tracking changes for this entity. @param <T> entity class @param entity Entity to evict
[ "Evicts", "the", "specified", "entity", "from", "the", "session", ".", "Remove", "the", "entity", "from", "the", "delete", "queue", "and", "stops", "tracking", "changes", "for", "this", "entity", "." ]
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/session/InMemoryDocumentSessionOperations.java#L1172-L1183
109,440
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/session/InMemoryDocumentSessionOperations.java
InMemoryDocumentSessionOperations.clear
public void clear() { documentsByEntity.clear(); deletedEntities.clear(); documentsById.clear(); _knownMissingIds.clear(); if (_countersByDocId != null) { _countersByDocId.clear(); } }
java
public void clear() { documentsByEntity.clear(); deletedEntities.clear(); documentsById.clear(); _knownMissingIds.clear(); if (_countersByDocId != null) { _countersByDocId.clear(); } }
[ "public", "void", "clear", "(", ")", "{", "documentsByEntity", ".", "clear", "(", ")", ";", "deletedEntities", ".", "clear", "(", ")", ";", "documentsById", ".", "clear", "(", ")", ";", "_knownMissingIds", ".", "clear", "(", ")", ";", "if", "(", "_coun...
Clears this instance. Remove all entities from the delete queue and stops tracking changes for all entities.
[ "Clears", "this", "instance", ".", "Remove", "all", "entities", "from", "the", "delete", "queue", "and", "stops", "tracking", "changes", "for", "all", "entities", "." ]
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/session/InMemoryDocumentSessionOperations.java#L1189-L1197
109,441
wcm-io/wcm-io-wcm
ui/extjs/src/main/java/io/wcm/wcm/ui/extjs/provider/impl/servlets/TemplateFilterPageTreeProvider.java
TemplateFilterPageTreeProvider.getPagePathsForTemplate
private Set<String> getPagePathsForTemplate(String[] templates, String rootPath, SlingHttpServletRequest request) { Set<String> pagePaths = new HashSet<>(); if (templates != null && templates.length > 0) { try { NodeIterator nodes = searchNodesByTemplate(templates, rootPath, request); whi...
java
private Set<String> getPagePathsForTemplate(String[] templates, String rootPath, SlingHttpServletRequest request) { Set<String> pagePaths = new HashSet<>(); if (templates != null && templates.length > 0) { try { NodeIterator nodes = searchNodesByTemplate(templates, rootPath, request); whi...
[ "private", "Set", "<", "String", ">", "getPagePathsForTemplate", "(", "String", "[", "]", "templates", ",", "String", "rootPath", ",", "SlingHttpServletRequest", "request", ")", "{", "Set", "<", "String", ">", "pagePaths", "=", "new", "HashSet", "<>", "(", "...
Get paths for pages that use the given template @param templates @param rootPath @return a set of nodes that should be displayed in the tree
[ "Get", "paths", "for", "pages", "that", "use", "the", "given", "template" ]
8eff9434f2f4b6462fdb718f8769ad793c55b8d7
https://github.com/wcm-io/wcm-io-wcm/blob/8eff9434f2f4b6462fdb718f8769ad793c55b8d7/ui/extjs/src/main/java/io/wcm/wcm/ui/extjs/provider/impl/servlets/TemplateFilterPageTreeProvider.java#L99-L117
109,442
wcm-io/wcm-io-wcm
parsys/src/main/java/io/wcm/wcm/parsys/controller/Parsys.java
Parsys.isParagraphValid
private Optional<@NotNull Boolean> isParagraphValid(Resource resource) { // use reflection to access the method "getModelFromResource" from ModelFactory, as it is not present in earlier version // but we want still to support earlier versions of AEM as well which do not contain this method // validation is ...
java
private Optional<@NotNull Boolean> isParagraphValid(Resource resource) { // use reflection to access the method "getModelFromResource" from ModelFactory, as it is not present in earlier version // but we want still to support earlier versions of AEM as well which do not contain this method // validation is ...
[ "private", "Optional", "<", "@", "NotNull", "Boolean", ">", "isParagraphValid", "(", "Resource", "resource", ")", "{", "// use reflection to access the method \"getModelFromResource\" from ModelFactory, as it is not present in earlier version", "// but we want still to support earlier ve...
Checks if the given paragraph is valid. @param resource Resource @return if the return value is empty there is no model associated with this resource, or it does not support validation via {@link ParsysItem} interface. Otherwise it contains the valid status.
[ "Checks", "if", "the", "given", "paragraph", "is", "valid", "." ]
8eff9434f2f4b6462fdb718f8769ad793c55b8d7
https://github.com/wcm-io/wcm-io-wcm/blob/8eff9434f2f4b6462fdb718f8769ad793c55b8d7/parsys/src/main/java/io/wcm/wcm/parsys/controller/Parsys.java#L202-L237
109,443
wcm-io/wcm-io-wcm
parsys/src/main/java/io/wcm/wcm/parsys/controller/Parsys.java
Parsys.getComponentHtmlTagAttributes
private Map<String, String> getComponentHtmlTagAttributes(String resourceType) { if (StringUtils.isNotEmpty(resourceType)) { Component component = componentManager().getComponent(resourceType); if (component != null && component.getHtmlTagAttributes() != null) { return component.getHtmlTagAttrib...
java
private Map<String, String> getComponentHtmlTagAttributes(String resourceType) { if (StringUtils.isNotEmpty(resourceType)) { Component component = componentManager().getComponent(resourceType); if (component != null && component.getHtmlTagAttributes() != null) { return component.getHtmlTagAttrib...
[ "private", "Map", "<", "String", ",", "String", ">", "getComponentHtmlTagAttributes", "(", "String", "resourceType", ")", "{", "if", "(", "StringUtils", ".", "isNotEmpty", "(", "resourceType", ")", ")", "{", "Component", "component", "=", "componentManager", "("...
Get HTML tag attributes from component. @param resourceType Component path @return Map (never null)
[ "Get", "HTML", "tag", "attributes", "from", "component", "." ]
8eff9434f2f4b6462fdb718f8769ad793c55b8d7
https://github.com/wcm-io/wcm-io-wcm/blob/8eff9434f2f4b6462fdb718f8769ad793c55b8d7/parsys/src/main/java/io/wcm/wcm/parsys/controller/Parsys.java#L245-L253
109,444
wcm-io/wcm-io-wcm
parsys/src/main/java/io/wcm/wcm/parsys/controller/Parsys.java
Parsys.getNewAreaResourceType
private String getNewAreaResourceType(String componentPath) { Resource componentResource = resolver.getResource(componentPath); if (componentResource != null) { if (componentResource.getChild(NEWAREA_CHILD_NAME) != null) { return componentPath + "/" + NEWAREA_CHILD_NAME; } String resou...
java
private String getNewAreaResourceType(String componentPath) { Resource componentResource = resolver.getResource(componentPath); if (componentResource != null) { if (componentResource.getChild(NEWAREA_CHILD_NAME) != null) { return componentPath + "/" + NEWAREA_CHILD_NAME; } String resou...
[ "private", "String", "getNewAreaResourceType", "(", "String", "componentPath", ")", "{", "Resource", "componentResource", "=", "resolver", ".", "getResource", "(", "componentPath", ")", ";", "if", "(", "componentResource", "!=", "null", ")", "{", "if", "(", "com...
Get resource type for new area - from current parsys component or from a supertype component. @param componentPath Component path @return Resource type (never null)
[ "Get", "resource", "type", "for", "new", "area", "-", "from", "current", "parsys", "component", "or", "from", "a", "supertype", "component", "." ]
8eff9434f2f4b6462fdb718f8769ad793c55b8d7
https://github.com/wcm-io/wcm-io-wcm/blob/8eff9434f2f4b6462fdb718f8769ad793c55b8d7/parsys/src/main/java/io/wcm/wcm/parsys/controller/Parsys.java#L287-L299
109,445
wcm-io/wcm-io-wcm
ui/extjs/src/main/java/io/wcm/wcm/ui/extjs/provider/impl/util/PageIterator.java
PageIterator.seek
private Page seek() { Page prev = next; next = null; while (resources.hasNext() && next == null) { Resource nextResource = resources.next(); next = nextResource.adaptTo(Page.class); if (next == null) { // handle sling:Folder and sling:OrderedFolder as "virtual pages" to allow brow...
java
private Page seek() { Page prev = next; next = null; while (resources.hasNext() && next == null) { Resource nextResource = resources.next(); next = nextResource.adaptTo(Page.class); if (next == null) { // handle sling:Folder and sling:OrderedFolder as "virtual pages" to allow brow...
[ "private", "Page", "seek", "(", ")", "{", "Page", "prev", "=", "next", ";", "next", "=", "null", ";", "while", "(", "resources", ".", "hasNext", "(", ")", "&&", "next", "==", "null", ")", "{", "Resource", "nextResource", "=", "resources", ".", "next"...
Seeks the next available page @return the previous element
[ "Seeks", "the", "next", "available", "page" ]
8eff9434f2f4b6462fdb718f8769ad793c55b8d7
https://github.com/wcm-io/wcm-io-wcm/blob/8eff9434f2f4b6462fdb718f8769ad793c55b8d7/ui/extjs/src/main/java/io/wcm/wcm/ui/extjs/provider/impl/util/PageIterator.java#L69-L89
109,446
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/identity/GenerateEntityIdOnTheClient.java
GenerateEntityIdOnTheClient.tryGetIdFromInstance
public boolean tryGetIdFromInstance(Object entity, Reference<String> idHolder) { if (entity == null) { throw new IllegalArgumentException("Entity cannot be null"); } try { Field identityProperty = getIdentityProperty(entity.getClass()); if (identityProperty !=...
java
public boolean tryGetIdFromInstance(Object entity, Reference<String> idHolder) { if (entity == null) { throw new IllegalArgumentException("Entity cannot be null"); } try { Field identityProperty = getIdentityProperty(entity.getClass()); if (identityProperty !=...
[ "public", "boolean", "tryGetIdFromInstance", "(", "Object", "entity", ",", "Reference", "<", "String", ">", "idHolder", ")", "{", "if", "(", "entity", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Entity cannot be null\"", ")", ";",...
Attempts to get the document key from an instance @param entity Entity to get id from @param idHolder output parameter which holds document id @return true if id was read from entity
[ "Attempts", "to", "get", "the", "document", "key", "from", "an", "instance" ]
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/identity/GenerateEntityIdOnTheClient.java#L30-L48
109,447
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/identity/GenerateEntityIdOnTheClient.java
GenerateEntityIdOnTheClient.getOrGenerateDocumentId
public String getOrGenerateDocumentId(Object entity) { Reference<String> idHolder = new Reference<>(); tryGetIdFromInstance(entity, idHolder); String id = idHolder.value; if (id == null) { // Generate the key up front id = _generateId.apply(entity); } ...
java
public String getOrGenerateDocumentId(Object entity) { Reference<String> idHolder = new Reference<>(); tryGetIdFromInstance(entity, idHolder); String id = idHolder.value; if (id == null) { // Generate the key up front id = _generateId.apply(entity); } ...
[ "public", "String", "getOrGenerateDocumentId", "(", "Object", "entity", ")", "{", "Reference", "<", "String", ">", "idHolder", "=", "new", "Reference", "<>", "(", ")", ";", "tryGetIdFromInstance", "(", "entity", ",", "idHolder", ")", ";", "String", "id", "="...
Tries to get the identity. @param entity Entity @return Document id
[ "Tries", "to", "get", "the", "identity", "." ]
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/identity/GenerateEntityIdOnTheClient.java#L55-L68
109,448
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/identity/GenerateEntityIdOnTheClient.java
GenerateEntityIdOnTheClient.trySetIdentity
public void trySetIdentity(Object entity, String id) { Class<?> entityType = entity.getClass(); Field identityProperty = _conventions.getIdentityProperty(entityType); if (identityProperty == null) { return; } setPropertyOrField(identityProperty.getType(), entity, id...
java
public void trySetIdentity(Object entity, String id) { Class<?> entityType = entity.getClass(); Field identityProperty = _conventions.getIdentityProperty(entityType); if (identityProperty == null) { return; } setPropertyOrField(identityProperty.getType(), entity, id...
[ "public", "void", "trySetIdentity", "(", "Object", "entity", ",", "String", "id", ")", "{", "Class", "<", "?", ">", "entityType", "=", "entity", ".", "getClass", "(", ")", ";", "Field", "identityProperty", "=", "_conventions", ".", "getIdentityProperty", "("...
Tries to set the identity property @param entity Entity @param id Id to set
[ "Tries", "to", "set", "the", "identity", "property" ]
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/identity/GenerateEntityIdOnTheClient.java#L81-L90
109,449
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/conventions/DocumentConventions.java
DocumentConventions.defaultGetCollectionName
public static String defaultGetCollectionName(Class clazz) { String result = _cachedDefaultTypeCollectionNames.get(clazz); if (result != null) { return result; } // we want to reject queries and other operations on abstract types, because you usually // want to use t...
java
public static String defaultGetCollectionName(Class clazz) { String result = _cachedDefaultTypeCollectionNames.get(clazz); if (result != null) { return result; } // we want to reject queries and other operations on abstract types, because you usually // want to use t...
[ "public", "static", "String", "defaultGetCollectionName", "(", "Class", "clazz", ")", "{", "String", "result", "=", "_cachedDefaultTypeCollectionNames", ".", "get", "(", "clazz", ")", ";", "if", "(", "result", "!=", "null", ")", "{", "return", "result", ";", ...
Default method used when finding a collection name for a type @param clazz Class @return default collection name for class
[ "Default", "method", "used", "when", "finding", "a", "collection", "name", "for", "a", "type" ]
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/conventions/DocumentConventions.java#L297-L318
109,450
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/conventions/DocumentConventions.java
DocumentConventions.generateDocumentId
@SuppressWarnings("unchecked") public String generateDocumentId(String databaseName, Object entity) { Class<?> clazz = entity.getClass(); for (Tuple<Class, BiFunction<String, Object, String>> listOfRegisteredIdConvention : _listOfRegisteredIdConventions) { if (listOfRegisteredIdConventi...
java
@SuppressWarnings("unchecked") public String generateDocumentId(String databaseName, Object entity) { Class<?> clazz = entity.getClass(); for (Tuple<Class, BiFunction<String, Object, String>> listOfRegisteredIdConvention : _listOfRegisteredIdConventions) { if (listOfRegisteredIdConventi...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "String", "generateDocumentId", "(", "String", "databaseName", ",", "Object", "entity", ")", "{", "Class", "<", "?", ">", "clazz", "=", "entity", ".", "getClass", "(", ")", ";", "for", "(", "Tup...
Generates the document id. @param databaseName Database name @param entity Entity @return document id
[ "Generates", "the", "document", "id", "." ]
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/conventions/DocumentConventions.java#L354-L365
109,451
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/conventions/DocumentConventions.java
DocumentConventions.registerIdConvention
@SuppressWarnings("unchecked") public <TEntity> DocumentConventions registerIdConvention(Class<TEntity> clazz, BiFunction<String, TEntity, String> function) { assertNotFrozen(); _listOfRegisteredIdConventions.stream() .filter(x -> x.first.equals(clazz)) .findFirst() ...
java
@SuppressWarnings("unchecked") public <TEntity> DocumentConventions registerIdConvention(Class<TEntity> clazz, BiFunction<String, TEntity, String> function) { assertNotFrozen(); _listOfRegisteredIdConventions.stream() .filter(x -> x.first.equals(clazz)) .findFirst() ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "TEntity", ">", "DocumentConventions", "registerIdConvention", "(", "Class", "<", "TEntity", ">", "clazz", ",", "BiFunction", "<", "String", ",", "TEntity", ",", "String", ">", "function", ")", ...
Register an id convention for a single type (and all of its derived types. Note that you can still fall back to the DocumentIdGenerator if you want. @param <TEntity> Entity class @param clazz Class @param function Function to use @return document conventions
[ "Register", "an", "id", "convention", "for", "a", "single", "type", "(", "and", "all", "of", "its", "derived", "types", ".", "Note", "that", "you", "can", "still", "fall", "back", "to", "the", "DocumentIdGenerator", "if", "you", "want", "." ]
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/conventions/DocumentConventions.java#L375-L395
109,452
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/conventions/DocumentConventions.java
DocumentConventions.getIdentityProperty
public Field getIdentityProperty(Class clazz) { Field info = _idPropertyCache.get(clazz); if (info != null) { return info; } try { Field idField = Arrays.stream(Introspector.getBeanInfo(clazz).getPropertyDescriptors()) .filter(x -> _findIdenti...
java
public Field getIdentityProperty(Class clazz) { Field info = _idPropertyCache.get(clazz); if (info != null) { return info; } try { Field idField = Arrays.stream(Introspector.getBeanInfo(clazz).getPropertyDescriptors()) .filter(x -> _findIdenti...
[ "public", "Field", "getIdentityProperty", "(", "Class", "clazz", ")", "{", "Field", "info", "=", "_idPropertyCache", ".", "get", "(", "clazz", ")", ";", "if", "(", "info", "!=", "null", ")", "{", "return", "info", ";", "}", "try", "{", "Field", "idFiel...
Gets the identity property. @param clazz Class of entity @return Identity property (field)
[ "Gets", "the", "identity", "property", "." ]
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/conventions/DocumentConventions.java#L462-L481
109,453
wcm-io/wcm-io-wcm
ui/granite/src/main/java/io/wcm/wcm/ui/granite/components/pathfield/ColumnView.java
ColumnView.getDataSource
private DataSource getDataSource(ComponentHelper cmp, Resource resource) { try { /* * by default the path is read from request "path" parameter * here we overwrite it via a synthetic resource because the path may be overwritten by validation logic * to ensure the path is not beyond the co...
java
private DataSource getDataSource(ComponentHelper cmp, Resource resource) { try { /* * by default the path is read from request "path" parameter * here we overwrite it via a synthetic resource because the path may be overwritten by validation logic * to ensure the path is not beyond the co...
[ "private", "DataSource", "getDataSource", "(", "ComponentHelper", "cmp", ",", "Resource", "resource", ")", "{", "try", "{", "/*\n * by default the path is read from request \"path\" parameter\n * here we overwrite it via a synthetic resource because the path may be overwritten ...
Get data source to list children of given resource. @param cmp Component helper @param resource Given resource @return Data source
[ "Get", "data", "source", "to", "list", "children", "of", "given", "resource", "." ]
8eff9434f2f4b6462fdb718f8769ad793c55b8d7
https://github.com/wcm-io/wcm-io-wcm/blob/8eff9434f2f4b6462fdb718f8769ad793c55b8d7/ui/granite/src/main/java/io/wcm/wcm/ui/granite/components/pathfield/ColumnView.java#L132-L146
109,454
wcm-io/wcm-io-wcm
ui/granite/src/main/java/io/wcm/wcm/ui/granite/components/pathfield/ColumnView.java
ColumnView.getCurrentResourceColumn
private static Column getCurrentResourceColumn(DataSource dataSource, Integer size, Resource currentResource, String itemResourceType) { Iterator<Resource> items = dataSource.iterator(); boolean hasMore = false; if (size != null) { List<Resource> list = new ArrayList<Resource>(); while (...
java
private static Column getCurrentResourceColumn(DataSource dataSource, Integer size, Resource currentResource, String itemResourceType) { Iterator<Resource> items = dataSource.iterator(); boolean hasMore = false; if (size != null) { List<Resource> list = new ArrayList<Resource>(); while (...
[ "private", "static", "Column", "getCurrentResourceColumn", "(", "DataSource", "dataSource", ",", "Integer", "size", ",", "Resource", "currentResource", ",", "String", "itemResourceType", ")", "{", "Iterator", "<", "Resource", ">", "items", "=", "dataSource", ".", ...
Generate column for data source items for current resource. @param dataSource Data source @param size Size limit @param currentResource Current resource @param itemResourceType Item resource type @return Column
[ "Generate", "column", "for", "data", "source", "items", "for", "current", "resource", "." ]
8eff9434f2f4b6462fdb718f8769ad793c55b8d7
https://github.com/wcm-io/wcm-io-wcm/blob/8eff9434f2f4b6462fdb718f8769ad793c55b8d7/ui/granite/src/main/java/io/wcm/wcm/ui/granite/components/pathfield/ColumnView.java#L156-L182
109,455
wcm-io/wcm-io-wcm
ui/granite/src/main/java/io/wcm/wcm/ui/granite/components/pathfield/ColumnView.java
ColumnView.getRootColumn
private static Column getRootColumn(Resource rootResource, String itemResourceType) { /* * Put a special path for columnId to avoid having the same columnId with the next column to avoid breaking the contract of columnId. * The contract of columnId is that it should be a path of the current column, i.e. t...
java
private static Column getRootColumn(Resource rootResource, String itemResourceType) { /* * Put a special path for columnId to avoid having the same columnId with the next column to avoid breaking the contract of columnId. * The contract of columnId is that it should be a path of the current column, i.e. t...
[ "private", "static", "Column", "getRootColumn", "(", "Resource", "rootResource", ",", "String", "itemResourceType", ")", "{", "/*\n * Put a special path for columnId to avoid having the same columnId with the next column to avoid breaking the contract of columnId.\n * The contract of...
Generate extra column representing the root resource. @param rootResource Root resource @param itemResourceType Item resource type @return Column
[ "Generate", "extra", "column", "representing", "the", "root", "resource", "." ]
8eff9434f2f4b6462fdb718f8769ad793c55b8d7
https://github.com/wcm-io/wcm-io-wcm/blob/8eff9434f2f4b6462fdb718f8769ad793c55b8d7/ui/granite/src/main/java/io/wcm/wcm/ui/granite/components/pathfield/ColumnView.java#L190-L208
109,456
wcm-io/wcm-io-wcm
ui/granite/src/main/java/io/wcm/wcm/ui/granite/components/pathfield/ColumnView.java
ColumnView.getAncestorColumns
private static List<Column> getAncestorColumns(Resource currentResource, Resource rootResource) { List<Column> columns = new ArrayList<>(); List<Resource> ancestors = getAncestors(currentResource, rootResource); for (int i = 0; i < ancestors.size(); i++) { Resource r = ancestors.get(i); String ...
java
private static List<Column> getAncestorColumns(Resource currentResource, Resource rootResource) { List<Column> columns = new ArrayList<>(); List<Resource> ancestors = getAncestors(currentResource, rootResource); for (int i = 0; i < ancestors.size(); i++) { Resource r = ancestors.get(i); String ...
[ "private", "static", "List", "<", "Column", ">", "getAncestorColumns", "(", "Resource", "currentResource", ",", "Resource", "rootResource", ")", "{", "List", "<", "Column", ">", "columns", "=", "new", "ArrayList", "<>", "(", ")", ";", "List", "<", "Resource"...
Generate column for each ancestor. @param currentResource Current resource @param rootResource Root resource @return Columns
[ "Generate", "column", "for", "each", "ancestor", "." ]
8eff9434f2f4b6462fdb718f8769ad793c55b8d7
https://github.com/wcm-io/wcm-io-wcm/blob/8eff9434f2f4b6462fdb718f8769ad793c55b8d7/ui/granite/src/main/java/io/wcm/wcm/ui/granite/components/pathfield/ColumnView.java#L216-L237
109,457
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/session/AbstractDocumentQuery.java
AbstractDocumentQuery._waitForNonStaleResults
@Override public void _waitForNonStaleResults(Duration waitTimeout) { theWaitForNonStaleResults = true; timeout = ObjectUtils.firstNonNull(waitTimeout, getDefaultTimeout()); }
java
@Override public void _waitForNonStaleResults(Duration waitTimeout) { theWaitForNonStaleResults = true; timeout = ObjectUtils.firstNonNull(waitTimeout, getDefaultTimeout()); }
[ "@", "Override", "public", "void", "_waitForNonStaleResults", "(", "Duration", "waitTimeout", ")", "{", "theWaitForNonStaleResults", "=", "true", ";", "timeout", "=", "ObjectUtils", ".", "firstNonNull", "(", "waitTimeout", ",", "getDefaultTimeout", "(", ")", ")", ...
Instruct the query to wait for non stale result for the specified wait timeout. This shouldn't be used outside of unit tests unless you are well aware of the implications @param waitTimeout Wait timeout
[ "Instruct", "the", "query", "to", "wait", "for", "non", "stale", "result", "for", "the", "specified", "wait", "timeout", ".", "This", "shouldn", "t", "be", "used", "outside", "of", "unit", "tests", "unless", "you", "are", "well", "aware", "of", "the", "i...
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/session/AbstractDocumentQuery.java#L190-L194
109,458
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/session/AbstractDocumentQuery.java
AbstractDocumentQuery.getProjectionFields
@Override public List<String> getProjectionFields() { return fieldsToFetchToken != null && fieldsToFetchToken.projections != null ? Arrays.asList(fieldsToFetchToken.projections) : Collections.emptyList(); }
java
@Override public List<String> getProjectionFields() { return fieldsToFetchToken != null && fieldsToFetchToken.projections != null ? Arrays.asList(fieldsToFetchToken.projections) : Collections.emptyList(); }
[ "@", "Override", "public", "List", "<", "String", ">", "getProjectionFields", "(", ")", "{", "return", "fieldsToFetchToken", "!=", "null", "&&", "fieldsToFetchToken", ".", "projections", "!=", "null", "?", "Arrays", ".", "asList", "(", "fieldsToFetchToken", ".",...
Gets the fields for projection @return list of projected fields
[ "Gets", "the", "fields", "for", "projection" ]
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/session/AbstractDocumentQuery.java#L213-L216
109,459
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/session/AbstractDocumentQuery.java
AbstractDocumentQuery._randomOrdering
@Override public void _randomOrdering(String seed) { assertNoRawQuery(); if (StringUtils.isBlank(seed)) { _randomOrdering(); return; } _noCaching(); orderByTokens.add(OrderByToken.createRandom(seed)); }
java
@Override public void _randomOrdering(String seed) { assertNoRawQuery(); if (StringUtils.isBlank(seed)) { _randomOrdering(); return; } _noCaching(); orderByTokens.add(OrderByToken.createRandom(seed)); }
[ "@", "Override", "public", "void", "_randomOrdering", "(", "String", "seed", ")", "{", "assertNoRawQuery", "(", ")", ";", "if", "(", "StringUtils", ".", "isBlank", "(", "seed", ")", ")", "{", "_randomOrdering", "(", ")", ";", "return", ";", "}", "_noCach...
Order the search results randomly using the specified seed this is useful if you want to have repeatable random queries @param seed Seed to use
[ "Order", "the", "search", "results", "randomly", "using", "the", "specified", "seed", "this", "is", "useful", "if", "you", "want", "to", "have", "repeatable", "random", "queries" ]
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/session/AbstractDocumentQuery.java#L234-L245
109,460
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/session/AbstractDocumentQuery.java
AbstractDocumentQuery._whereLucene
@SuppressWarnings("ConstantConditions") public void _whereLucene(String fieldName, String whereClause, boolean exact) { fieldName = ensureValidFieldName(fieldName, false); List<QueryToken> tokens = getCurrentWhereTokens(); appendOperatorIfNeeded(tokens); negateIfNeeded(tokens, field...
java
@SuppressWarnings("ConstantConditions") public void _whereLucene(String fieldName, String whereClause, boolean exact) { fieldName = ensureValidFieldName(fieldName, false); List<QueryToken> tokens = getCurrentWhereTokens(); appendOperatorIfNeeded(tokens); negateIfNeeded(tokens, field...
[ "@", "SuppressWarnings", "(", "\"ConstantConditions\"", ")", "public", "void", "_whereLucene", "(", "String", "fieldName", ",", "String", "whereClause", ",", "boolean", "exact", ")", "{", "fieldName", "=", "ensureValidFieldName", "(", "fieldName", ",", "false", ")...
Filter the results from the index using the specified where clause. @param fieldName Field name @param whereClause Where clause @param exact Use exact matcher
[ "Filter", "the", "results", "from", "the", "index", "using", "the", "specified", "where", "clause", "." ]
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/session/AbstractDocumentQuery.java#L413-L424
109,461
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/session/AbstractDocumentQuery.java
AbstractDocumentQuery._openSubclause
@Override public void _openSubclause() { _currentClauseDepth++; List<QueryToken> tokens = getCurrentWhereTokens(); appendOperatorIfNeeded(tokens); negateIfNeeded(tokens, null); tokens.add(OpenSubclauseToken.INSTANCE); }
java
@Override public void _openSubclause() { _currentClauseDepth++; List<QueryToken> tokens = getCurrentWhereTokens(); appendOperatorIfNeeded(tokens); negateIfNeeded(tokens, null); tokens.add(OpenSubclauseToken.INSTANCE); }
[ "@", "Override", "public", "void", "_openSubclause", "(", ")", "{", "_currentClauseDepth", "++", ";", "List", "<", "QueryToken", ">", "tokens", "=", "getCurrentWhereTokens", "(", ")", ";", "appendOperatorIfNeeded", "(", "tokens", ")", ";", "negateIfNeeded", "(",...
Simplified method for opening a new clause within the query
[ "Simplified", "method", "for", "opening", "a", "new", "clause", "within", "the", "query" ]
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/session/AbstractDocumentQuery.java#L429-L438
109,462
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/session/AbstractDocumentQuery.java
AbstractDocumentQuery._closeSubclause
@Override public void _closeSubclause() { _currentClauseDepth--; List<QueryToken> tokens = getCurrentWhereTokens(); tokens.add(CloseSubclauseToken.INSTANCE); }
java
@Override public void _closeSubclause() { _currentClauseDepth--; List<QueryToken> tokens = getCurrentWhereTokens(); tokens.add(CloseSubclauseToken.INSTANCE); }
[ "@", "Override", "public", "void", "_closeSubclause", "(", ")", "{", "_currentClauseDepth", "--", ";", "List", "<", "QueryToken", ">", "tokens", "=", "getCurrentWhereTokens", "(", ")", ";", "tokens", ".", "add", "(", "CloseSubclauseToken", ".", "INSTANCE", ")"...
Simplified method for closing a clause within the query
[ "Simplified", "method", "for", "closing", "a", "clause", "within", "the", "query" ]
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/session/AbstractDocumentQuery.java#L443-L449
109,463
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/session/AbstractDocumentQuery.java
AbstractDocumentQuery._whereIn
@Override public void _whereIn(String fieldName, Collection<Object> values) { _whereIn(fieldName, values, false); }
java
@Override public void _whereIn(String fieldName, Collection<Object> values) { _whereIn(fieldName, values, false); }
[ "@", "Override", "public", "void", "_whereIn", "(", "String", "fieldName", ",", "Collection", "<", "Object", ">", "values", ")", "{", "_whereIn", "(", "fieldName", ",", "values", ",", "false", ")", ";", "}" ]
Check that the field has one of the specified value @param fieldName Field name to use @param values Values to find
[ "Check", "that", "the", "field", "has", "one", "of", "the", "specified", "value" ]
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/session/AbstractDocumentQuery.java#L577-L580
109,464
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/session/AbstractDocumentQuery.java
AbstractDocumentQuery._whereEndsWith
public void _whereEndsWith(String fieldName, Object value, boolean exact) { WhereParams whereParams = new WhereParams(); whereParams.setFieldName(fieldName); whereParams.setValue(value); whereParams.setAllowWildcards(true); Object transformToEqualValue = transformValue(wherePara...
java
public void _whereEndsWith(String fieldName, Object value, boolean exact) { WhereParams whereParams = new WhereParams(); whereParams.setFieldName(fieldName); whereParams.setValue(value); whereParams.setAllowWildcards(true); Object transformToEqualValue = transformValue(wherePara...
[ "public", "void", "_whereEndsWith", "(", "String", "fieldName", ",", "Object", "value", ",", "boolean", "exact", ")", "{", "WhereParams", "whereParams", "=", "new", "WhereParams", "(", ")", ";", "whereParams", ".", "setFieldName", "(", "fieldName", ")", ";", ...
Matches fields which ends with the specified value. @param fieldName Field name to use @param value Values to find
[ "Matches", "fields", "which", "ends", "with", "the", "specified", "value", "." ]
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/session/AbstractDocumentQuery.java#L631-L647
109,465
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/session/AbstractDocumentQuery.java
AbstractDocumentQuery._whereBetween
@Override public void _whereBetween(String fieldName, Object start, Object end, boolean exact) { fieldName = ensureValidFieldName(fieldName, false); List<QueryToken> tokens = getCurrentWhereTokens(); appendOperatorIfNeeded(tokens); negateIfNeeded(tokens, fieldName); WherePa...
java
@Override public void _whereBetween(String fieldName, Object start, Object end, boolean exact) { fieldName = ensureValidFieldName(fieldName, false); List<QueryToken> tokens = getCurrentWhereTokens(); appendOperatorIfNeeded(tokens); negateIfNeeded(tokens, fieldName); WherePa...
[ "@", "Override", "public", "void", "_whereBetween", "(", "String", "fieldName", ",", "Object", "start", ",", "Object", "end", ",", "boolean", "exact", ")", "{", "fieldName", "=", "ensureValidFieldName", "(", "fieldName", ",", "false", ")", ";", "List", "<", ...
Matches fields where the value is between the specified start and end, inclusive @param fieldName Field name to use @param start Range start @param end Range end @param exact Use exact matcher
[ "Matches", "fields", "where", "the", "value", "is", "between", "the", "specified", "start", "and", "end", "inclusive" ]
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/session/AbstractDocumentQuery.java#L661-L682
109,466
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/session/AbstractDocumentQuery.java
AbstractDocumentQuery._orElse
public void _orElse() { List<QueryToken> tokens = getCurrentWhereTokens(); if (tokens.isEmpty()) { return; } if (tokens.get(tokens.size() - 1) instanceof QueryOperatorToken) { throw new IllegalStateException("Cannot add OR, previous token was already an operator ...
java
public void _orElse() { List<QueryToken> tokens = getCurrentWhereTokens(); if (tokens.isEmpty()) { return; } if (tokens.get(tokens.size() - 1) instanceof QueryOperatorToken) { throw new IllegalStateException("Cannot add OR, previous token was already an operator ...
[ "public", "void", "_orElse", "(", ")", "{", "List", "<", "QueryToken", ">", "tokens", "=", "getCurrentWhereTokens", "(", ")", ";", "if", "(", "tokens", ".", "isEmpty", "(", ")", ")", "{", "return", ";", "}", "if", "(", "tokens", ".", "get", "(", "t...
Add an OR to the query
[ "Add", "an", "OR", "to", "the", "query" ]
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/session/AbstractDocumentQuery.java#L809-L820
109,467
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/session/AbstractDocumentQuery.java
AbstractDocumentQuery._orderBy
public void _orderBy(String field, OrderingType ordering) { assertNoRawQuery(); String f = ensureValidFieldName(field, false); orderByTokens.add(OrderByToken.createAscending(f, ordering)); }
java
public void _orderBy(String field, OrderingType ordering) { assertNoRawQuery(); String f = ensureValidFieldName(field, false); orderByTokens.add(OrderByToken.createAscending(f, ordering)); }
[ "public", "void", "_orderBy", "(", "String", "field", ",", "OrderingType", "ordering", ")", "{", "assertNoRawQuery", "(", ")", ";", "String", "f", "=", "ensureValidFieldName", "(", "field", ",", "false", ")", ";", "orderByTokens", ".", "add", "(", "OrderByTo...
Order the results by the specified fields The fields are the names of the fields to sort, defaulting to sorting by ascending. You can prefix a field name with '-' to indicate sorting by descending or '+' to sort by ascending @param field field to use in order @param ordering Ordering type
[ "Order", "the", "results", "by", "the", "specified", "fields", "The", "fields", "are", "the", "names", "of", "the", "fields", "to", "sort", "defaulting", "to", "sorting", "by", "ascending", ".", "You", "can", "prefix", "a", "field", "name", "with", "-", ...
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/session/AbstractDocumentQuery.java#L932-L936
109,468
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/session/AbstractDocumentQuery.java
AbstractDocumentQuery._orderByDescending
public void _orderByDescending(String field, OrderingType ordering) { assertNoRawQuery(); String f = ensureValidFieldName(field, false); orderByTokens.add(OrderByToken.createDescending(f, ordering)); }
java
public void _orderByDescending(String field, OrderingType ordering) { assertNoRawQuery(); String f = ensureValidFieldName(field, false); orderByTokens.add(OrderByToken.createDescending(f, ordering)); }
[ "public", "void", "_orderByDescending", "(", "String", "field", ",", "OrderingType", "ordering", ")", "{", "assertNoRawQuery", "(", ")", ";", "String", "f", "=", "ensureValidFieldName", "(", "field", ",", "false", ")", ";", "orderByTokens", ".", "add", "(", ...
Order the results by the specified fields The fields are the names of the fields to sort, defaulting to sorting by descending. You can prefix a field name with '-' to indicate sorting by descending or '+' to sort by ascending @param field Field to use @param ordering Ordering type
[ "Order", "the", "results", "by", "the", "specified", "fields", "The", "fields", "are", "the", "names", "of", "the", "fields", "to", "sort", "defaulting", "to", "sorting", "by", "descending", ".", "You", "can", "prefix", "a", "field", "name", "with", "-", ...
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/session/AbstractDocumentQuery.java#L955-L959
109,469
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/session/AbstractDocumentQuery.java
AbstractDocumentQuery.generateIndexQuery
protected IndexQuery generateIndexQuery(String query) { IndexQuery indexQuery = new IndexQuery(); indexQuery.setQuery(query); indexQuery.setStart(start); indexQuery.setWaitForNonStaleResults(theWaitForNonStaleResults); indexQuery.setWaitForNonStaleResultsTimeout(timeout); ...
java
protected IndexQuery generateIndexQuery(String query) { IndexQuery indexQuery = new IndexQuery(); indexQuery.setQuery(query); indexQuery.setStart(start); indexQuery.setWaitForNonStaleResults(theWaitForNonStaleResults); indexQuery.setWaitForNonStaleResultsTimeout(timeout); ...
[ "protected", "IndexQuery", "generateIndexQuery", "(", "String", "query", ")", "{", "IndexQuery", "indexQuery", "=", "new", "IndexQuery", "(", ")", ";", "indexQuery", ".", "setQuery", "(", "query", ")", ";", "indexQuery", ".", "setStart", "(", "start", ")", "...
Generates the index query. @param query Query @return Index query
[ "Generates", "the", "index", "query", "." ]
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/session/AbstractDocumentQuery.java#L1001-L1014
109,470
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/queries/QueryResult.java
QueryResult.createSnapshot
public QueryResult createSnapshot() { QueryResult queryResult = new QueryResult(); queryResult.setResults(getResults()); queryResult.setIncludes(getIncludes()); queryResult.setIndexName(getIndexName()); queryResult.setIndexTimestamp(getIndexTimestamp()); queryResult.setIn...
java
public QueryResult createSnapshot() { QueryResult queryResult = new QueryResult(); queryResult.setResults(getResults()); queryResult.setIncludes(getIncludes()); queryResult.setIndexName(getIndexName()); queryResult.setIndexTimestamp(getIndexTimestamp()); queryResult.setIn...
[ "public", "QueryResult", "createSnapshot", "(", ")", "{", "QueryResult", "queryResult", "=", "new", "QueryResult", "(", ")", ";", "queryResult", ".", "setResults", "(", "getResults", "(", ")", ")", ";", "queryResult", ".", "setIncludes", "(", "getIncludes", "(...
Creates a snapshot of the query results @return returns snapshot of query result
[ "Creates", "a", "snapshot", "of", "the", "query", "results" ]
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/queries/QueryResult.java#L14-L34
109,471
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/subscriptions/DocumentSubscriptions.java
DocumentSubscriptions.getSubscriptions
public List<SubscriptionState> getSubscriptions(int start, int take, String database) { RequestExecutor requestExecutor = _store.getRequestExecutor(ObjectUtils.firstNonNull(database, _store.getDatabase())); GetSubscriptionsCommand command = new GetSubscriptionsCommand(start, take); requestExecu...
java
public List<SubscriptionState> getSubscriptions(int start, int take, String database) { RequestExecutor requestExecutor = _store.getRequestExecutor(ObjectUtils.firstNonNull(database, _store.getDatabase())); GetSubscriptionsCommand command = new GetSubscriptionsCommand(start, take); requestExecu...
[ "public", "List", "<", "SubscriptionState", ">", "getSubscriptions", "(", "int", "start", ",", "int", "take", ",", "String", "database", ")", "{", "RequestExecutor", "requestExecutor", "=", "_store", ".", "getRequestExecutor", "(", "ObjectUtils", ".", "firstNonNul...
It downloads a list of all existing subscriptions in a database. @param start Range start @param take Maximum number of items that will be retrieved @param database Database to use @return List of subscriptions state
[ "It", "downloads", "a", "list", "of", "all", "existing", "subscriptions", "in", "a", "database", "." ]
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/subscriptions/DocumentSubscriptions.java#L355-L362
109,472
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/subscriptions/DocumentSubscriptions.java
DocumentSubscriptions.delete
public void delete(String name, String database) { RequestExecutor requestExecutor = _store.getRequestExecutor(ObjectUtils.firstNonNull(database, _store.getDatabase())); DeleteSubscriptionCommand command = new DeleteSubscriptionCommand(name); requestExecutor.execute(command); }
java
public void delete(String name, String database) { RequestExecutor requestExecutor = _store.getRequestExecutor(ObjectUtils.firstNonNull(database, _store.getDatabase())); DeleteSubscriptionCommand command = new DeleteSubscriptionCommand(name); requestExecutor.execute(command); }
[ "public", "void", "delete", "(", "String", "name", ",", "String", "database", ")", "{", "RequestExecutor", "requestExecutor", "=", "_store", ".", "getRequestExecutor", "(", "ObjectUtils", ".", "firstNonNull", "(", "database", ",", "_store", ".", "getDatabase", "...
Delete a subscription. @param name Subscription name @param database Database to use
[ "Delete", "a", "subscription", "." ]
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/subscriptions/DocumentSubscriptions.java#L378-L383
109,473
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/subscriptions/DocumentSubscriptions.java
DocumentSubscriptions.getSubscriptionState
public SubscriptionState getSubscriptionState(String subscriptionName, String database) { if (StringUtils.isEmpty(subscriptionName)) { throw new IllegalArgumentException("SubscriptionName cannot be null"); } RequestExecutor requestExecutor = _store.getRequestExecutor(ObjectUtils.fir...
java
public SubscriptionState getSubscriptionState(String subscriptionName, String database) { if (StringUtils.isEmpty(subscriptionName)) { throw new IllegalArgumentException("SubscriptionName cannot be null"); } RequestExecutor requestExecutor = _store.getRequestExecutor(ObjectUtils.fir...
[ "public", "SubscriptionState", "getSubscriptionState", "(", "String", "subscriptionName", ",", "String", "database", ")", "{", "if", "(", "StringUtils", ".", "isEmpty", "(", "subscriptionName", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Subsc...
Returns subscription definition and it's current state @param subscriptionName Subscription name as received from the server @param database Database to use @return Subscription states
[ "Returns", "subscription", "definition", "and", "it", "s", "current", "state" ]
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/subscriptions/DocumentSubscriptions.java#L400-L410
109,474
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/subscriptions/DocumentSubscriptions.java
DocumentSubscriptions.dropConnection
public void dropConnection(String name, String database) { RequestExecutor requestExecutor = _store.getRequestExecutor(ObjectUtils.firstNonNull(database, _store.getDatabase())); DropSubscriptionConnectionCommand command = new DropSubscriptionConnectionCommand(name); requestExecutor.execute(comm...
java
public void dropConnection(String name, String database) { RequestExecutor requestExecutor = _store.getRequestExecutor(ObjectUtils.firstNonNull(database, _store.getDatabase())); DropSubscriptionConnectionCommand command = new DropSubscriptionConnectionCommand(name); requestExecutor.execute(comm...
[ "public", "void", "dropConnection", "(", "String", "name", ",", "String", "database", ")", "{", "RequestExecutor", "requestExecutor", "=", "_store", ".", "getRequestExecutor", "(", "ObjectUtils", ".", "firstNonNull", "(", "database", ",", "_store", ".", "getDataba...
Force server to close current client subscription connection to the server @param name Subscription name @param database Database to use
[ "Force", "server", "to", "close", "current", "client", "subscription", "connection", "to", "the", "server" ]
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/subscriptions/DocumentSubscriptions.java#L436-L441
109,475
wcm-io/wcm-io-wcm
ui/granite/src/main/java/io/wcm/wcm/ui/granite/util/GraniteUi.java
GraniteUi.getContentPath
private static String getContentPath(HttpServletRequest request) { String contentPath = (String)request.getAttribute(Value.CONTENTPATH_ATTRIBUTE); if (contentPath == null) { // fallback to suffix if CONTENTPATH_ATTRIBUTE is not set // (e.g. in inside a /libs/granite/ui/components/foundation/form/mu...
java
private static String getContentPath(HttpServletRequest request) { String contentPath = (String)request.getAttribute(Value.CONTENTPATH_ATTRIBUTE); if (contentPath == null) { // fallback to suffix if CONTENTPATH_ATTRIBUTE is not set // (e.g. in inside a /libs/granite/ui/components/foundation/form/mu...
[ "private", "static", "String", "getContentPath", "(", "HttpServletRequest", "request", ")", "{", "String", "contentPath", "=", "(", "String", ")", "request", ".", "getAttribute", "(", "Value", ".", "CONTENTPATH_ATTRIBUTE", ")", ";", "if", "(", "contentPath", "==...
Current content path @param request Request @return Current content path or null
[ "Current", "content", "path" ]
8eff9434f2f4b6462fdb718f8769ad793c55b8d7
https://github.com/wcm-io/wcm-io-wcm/blob/8eff9434f2f4b6462fdb718f8769ad793c55b8d7/ui/granite/src/main/java/io/wcm/wcm/ui/granite/util/GraniteUi.java#L113-L123
109,476
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/primitives/EventHelper.java
EventHelper.invoke
public static <T extends EventArgs> void invoke(List<EventHandler<T>> delegates, Object sender, T event) { for (EventHandler<T> delegate : delegates) { delegate.handle(sender, event); } }
java
public static <T extends EventArgs> void invoke(List<EventHandler<T>> delegates, Object sender, T event) { for (EventHandler<T> delegate : delegates) { delegate.handle(sender, event); } }
[ "public", "static", "<", "T", "extends", "EventArgs", ">", "void", "invoke", "(", "List", "<", "EventHandler", "<", "T", ">", ">", "delegates", ",", "Object", "sender", ",", "T", "event", ")", "{", "for", "(", "EventHandler", "<", "T", ">", "delegate",...
Helper used for invoking event on list of delegates @param <T> event class @param delegates Event delegates @param sender Event sender @param event Event to send
[ "Helper", "used", "for", "invoking", "event", "on", "list", "of", "delegates" ]
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/primitives/EventHelper.java#L16-L20
109,477
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/primitives/NetISO8601Utils.java
NetISO8601Utils.checkOffset
private static void checkOffset(String value, int offset, char expected) throws IndexOutOfBoundsException { char found = value.charAt(offset); if (found != expected) { throw new IndexOutOfBoundsException("Expected '" + expected + "' character but found '" + found + "'"); } }
java
private static void checkOffset(String value, int offset, char expected) throws IndexOutOfBoundsException { char found = value.charAt(offset); if (found != expected) { throw new IndexOutOfBoundsException("Expected '" + expected + "' character but found '" + found + "'"); } }
[ "private", "static", "void", "checkOffset", "(", "String", "value", ",", "int", "offset", ",", "char", "expected", ")", "throws", "IndexOutOfBoundsException", "{", "char", "found", "=", "value", ".", "charAt", "(", "offset", ")", ";", "if", "(", "found", "...
Check if the expected character exist at the given offset of the @param value the string to check at the specified offset @param offset the offset to look for the expected character @param expected the expected character @throws IndexOutOfBoundsException if the expected character is not found
[ "Check", "if", "the", "expected", "character", "exist", "at", "the", "given", "offset", "of", "the" ]
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/primitives/NetISO8601Utils.java#L190-L195
109,478
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/session/DocumentSession.java
DocumentSession.saveChanges
@Override public void saveChanges() { BatchOperation saveChangeOperation = new BatchOperation(this); try (BatchCommand command = saveChangeOperation.createRequest()) { if (command == null) { return; } if (noTracking) { throw new I...
java
@Override public void saveChanges() { BatchOperation saveChangeOperation = new BatchOperation(this); try (BatchCommand command = saveChangeOperation.createRequest()) { if (command == null) { return; } if (noTracking) { throw new I...
[ "@", "Override", "public", "void", "saveChanges", "(", ")", "{", "BatchOperation", "saveChangeOperation", "=", "new", "BatchOperation", "(", "this", ")", ";", "try", "(", "BatchCommand", "command", "=", "saveChangeOperation", ".", "createRequest", "(", ")", ")",...
Saves all the changes to the Raven server.
[ "Saves", "all", "the", "changes", "to", "the", "Raven", "server", "." ]
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/session/DocumentSession.java#L117-L134
109,479
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/session/DocumentSession.java
DocumentSession.exists
public boolean exists(String id) { if (id == null) { throw new IllegalArgumentException("id cannot be null"); } if (_knownMissingIds.contains(id)) { return false; } if (documentsById.getValue(id) != null) { return true; } Hea...
java
public boolean exists(String id) { if (id == null) { throw new IllegalArgumentException("id cannot be null"); } if (_knownMissingIds.contains(id)) { return false; } if (documentsById.getValue(id) != null) { return true; } Hea...
[ "public", "boolean", "exists", "(", "String", "id", ")", "{", "if", "(", "id", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"id cannot be null\"", ")", ";", "}", "if", "(", "_knownMissingIds", ".", "contains", "(", "id", ")", ...
Check if document exists without loading it
[ "Check", "if", "document", "exists", "without", "loading", "it" ]
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/session/DocumentSession.java#L139-L157
109,480
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/session/DocumentSession.java
DocumentSession.refresh
public <T> void refresh(T entity) { DocumentInfo documentInfo = documentsByEntity.get(entity); if (documentInfo == null) { throw new IllegalStateException("Cannot refresh a transient instance"); } incrementRequestCount(); GetDocumentsCommand command = new GetDocumen...
java
public <T> void refresh(T entity) { DocumentInfo documentInfo = documentsByEntity.get(entity); if (documentInfo == null) { throw new IllegalStateException("Cannot refresh a transient instance"); } incrementRequestCount(); GetDocumentsCommand command = new GetDocumen...
[ "public", "<", "T", ">", "void", "refresh", "(", "T", "entity", ")", "{", "DocumentInfo", "documentInfo", "=", "documentsByEntity", ".", "get", "(", "entity", ")", ";", "if", "(", "documentInfo", "==", "null", ")", "{", "throw", "new", "IllegalStateExcepti...
Refreshes the specified entity from Raven server.
[ "Refreshes", "the", "specified", "entity", "from", "Raven", "server", "." ]
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/session/DocumentSession.java#L162-L174
109,481
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/indexes/AbstractGenericIndexCreationTask.java
AbstractGenericIndexCreationTask.spatial
protected void spatial(String field, Function<SpatialOptionsFactory, SpatialOptions> indexing) { spatialOptionsStrings.put(field, indexing.apply(new SpatialOptionsFactory())); }
java
protected void spatial(String field, Function<SpatialOptionsFactory, SpatialOptions> indexing) { spatialOptionsStrings.put(field, indexing.apply(new SpatialOptionsFactory())); }
[ "protected", "void", "spatial", "(", "String", "field", ",", "Function", "<", "SpatialOptionsFactory", ",", "SpatialOptions", ">", "indexing", ")", "{", "spatialOptionsStrings", ".", "put", "(", "field", ",", "indexing", ".", "apply", "(", "new", "SpatialOptions...
Register a field to be spatially indexed @param field Field @param indexing factory for spatial options
[ "Register", "a", "field", "to", "be", "spatially", "indexed" ]
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/indexes/AbstractGenericIndexCreationTask.java#L64-L66
109,482
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/session/EntityToJson.java
EntityToJson.convertToEntity
@SuppressWarnings("unchecked") public Object convertToEntity(Class entityType, String id, ObjectNode document) { try { if (ObjectNode.class.equals(entityType)) { return document; } Object defaultValue = InMemoryDocumentSessionOperations.getDefaultValue(en...
java
@SuppressWarnings("unchecked") public Object convertToEntity(Class entityType, String id, ObjectNode document) { try { if (ObjectNode.class.equals(entityType)) { return document; } Object defaultValue = InMemoryDocumentSessionOperations.getDefaultValue(en...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "Object", "convertToEntity", "(", "Class", "entityType", ",", "String", "id", ",", "ObjectNode", "document", ")", "{", "try", "{", "if", "(", "ObjectNode", ".", "class", ".", "equals", "(", "entit...
Converts a json object to an entity. @param entityType Class of entity @param id Id of entity @param document Raw entity @return Entity instance
[ "Converts", "a", "json", "object", "to", "an", "entity", "." ]
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/session/EntityToJson.java#L110-L140
109,483
wcm-io/wcm-io-wcm
ui/extjs/src/main/java/io/wcm/wcm/ui/extjs/provider/AbstractPageTreeProvider.java
AbstractPageTreeProvider.getPages
protected final JSONArray getPages(Iterator<Page> pages, int depth, PageFilter pageFilter) throws JSONException { JSONArray pagesArray = new JSONArray(); while (pages.hasNext()) { Page page = pages.next(); // map page attributes to JSON object JSONObject pageObject = getPage(page); if ...
java
protected final JSONArray getPages(Iterator<Page> pages, int depth, PageFilter pageFilter) throws JSONException { JSONArray pagesArray = new JSONArray(); while (pages.hasNext()) { Page page = pages.next(); // map page attributes to JSON object JSONObject pageObject = getPage(page); if ...
[ "protected", "final", "JSONArray", "getPages", "(", "Iterator", "<", "Page", ">", "pages", ",", "int", "depth", ",", "PageFilter", "pageFilter", ")", "throws", "JSONException", "{", "JSONArray", "pagesArray", "=", "new", "JSONArray", "(", ")", ";", "while", ...
Generate JSON objects for pages. @param pages Child page iterator @param depth Depth @param pageFilter Page filter @return Page array @throws JSONException JSON exception
[ "Generate", "JSON", "objects", "for", "pages", "." ]
8eff9434f2f4b6462fdb718f8769ad793c55b8d7
https://github.com/wcm-io/wcm-io-wcm/blob/8eff9434f2f4b6462fdb718f8769ad793c55b8d7/ui/extjs/src/main/java/io/wcm/wcm/ui/extjs/provider/AbstractPageTreeProvider.java#L59-L83
109,484
wcm-io/wcm-io-wcm
ui/extjs/src/main/java/io/wcm/wcm/ui/extjs/provider/AbstractPageTreeProvider.java
AbstractPageTreeProvider.listChildren
protected final Iterator<Page> listChildren(Resource parentResource, PageFilter pageFilter) { return new PageIterator(parentResource.listChildren(), pageFilter); }
java
protected final Iterator<Page> listChildren(Resource parentResource, PageFilter pageFilter) { return new PageIterator(parentResource.listChildren(), pageFilter); }
[ "protected", "final", "Iterator", "<", "Page", ">", "listChildren", "(", "Resource", "parentResource", ",", "PageFilter", "pageFilter", ")", "{", "return", "new", "PageIterator", "(", "parentResource", ".", "listChildren", "(", ")", ",", "pageFilter", ")", ";", ...
Lists children using custom page iterator. @param parentResource Parent resource @param pageFilter Page filter @return Page iterator
[ "Lists", "children", "using", "custom", "page", "iterator", "." ]
8eff9434f2f4b6462fdb718f8769ad793c55b8d7
https://github.com/wcm-io/wcm-io-wcm/blob/8eff9434f2f4b6462fdb718f8769ad793c55b8d7/ui/extjs/src/main/java/io/wcm/wcm/ui/extjs/provider/AbstractPageTreeProvider.java#L91-L93
109,485
wcm-io/wcm-io-wcm
ui/extjs/src/main/java/io/wcm/wcm/ui/extjs/provider/AbstractPageTreeProvider.java
AbstractPageTreeProvider.getPage
@SuppressWarnings("null") protected final JSONObject getPage(Page page) throws JSONException { Resource resource = page.adaptTo(Resource.class); JSONObject pageObject = new JSONObject(); // node name pageObject.put("name", page.getName()); // node title text String title = page.getTitle(); ...
java
@SuppressWarnings("null") protected final JSONObject getPage(Page page) throws JSONException { Resource resource = page.adaptTo(Resource.class); JSONObject pageObject = new JSONObject(); // node name pageObject.put("name", page.getName()); // node title text String title = page.getTitle(); ...
[ "@", "SuppressWarnings", "(", "\"null\"", ")", "protected", "final", "JSONObject", "getPage", "(", "Page", "page", ")", "throws", "JSONException", "{", "Resource", "resource", "=", "page", ".", "adaptTo", "(", "Resource", ".", "class", ")", ";", "JSONObject", ...
Generate JSON object for page @param page Page @return JSON object @throws JSONException JSON exception
[ "Generate", "JSON", "object", "for", "page" ]
8eff9434f2f4b6462fdb718f8769ad793c55b8d7
https://github.com/wcm-io/wcm-io-wcm/blob/8eff9434f2f4b6462fdb718f8769ad793c55b8d7/ui/extjs/src/main/java/io/wcm/wcm/ui/extjs/provider/AbstractPageTreeProvider.java#L101-L130
109,486
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/DocumentStore.java
DocumentStore.getIdentifier
public String getIdentifier() { if (identifier != null) { return identifier; } if (urls == null) { return null; } if (database != null) { return String.join(",", urls) + " (DB: " + database + ")"; } return String.join(",", ur...
java
public String getIdentifier() { if (identifier != null) { return identifier; } if (urls == null) { return null; } if (database != null) { return String.join(",", urls) + " (DB: " + database + ")"; } return String.join(",", ur...
[ "public", "String", "getIdentifier", "(", ")", "{", "if", "(", "identifier", "!=", "null", ")", "{", "return", "identifier", ";", "}", "if", "(", "urls", "==", "null", ")", "{", "return", "null", ";", "}", "if", "(", "database", "!=", "null", ")", ...
Gets the identifier for this store.
[ "Gets", "the", "identifier", "for", "this", "store", "." ]
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/DocumentStore.java#L69-L83
109,487
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/DocumentStore.java
DocumentStore.openSession
@Override public IDocumentSession openSession(String database) { SessionOptions sessionOptions = new SessionOptions(); sessionOptions.setDatabase(database); return openSession(sessionOptions); }
java
@Override public IDocumentSession openSession(String database) { SessionOptions sessionOptions = new SessionOptions(); sessionOptions.setDatabase(database); return openSession(sessionOptions); }
[ "@", "Override", "public", "IDocumentSession", "openSession", "(", "String", "database", ")", "{", "SessionOptions", "sessionOptions", "=", "new", "SessionOptions", "(", ")", ";", "sessionOptions", ".", "setDatabase", "(", "database", ")", ";", "return", "openSess...
Opens the session for a particular database
[ "Opens", "the", "session", "for", "a", "particular", "database" ]
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/DocumentStore.java#L144-L150
109,488
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/DocumentStore.java
DocumentStore.initialize
@Override public IDocumentStore initialize() { if (initialized) { return this; } assertValidConfiguration(); try { if (getConventions().getDocumentIdGenerator() == null) { // don't overwrite what the user is doing MultiDatabaseHiLoIdGenerator...
java
@Override public IDocumentStore initialize() { if (initialized) { return this; } assertValidConfiguration(); try { if (getConventions().getDocumentIdGenerator() == null) { // don't overwrite what the user is doing MultiDatabaseHiLoIdGenerator...
[ "@", "Override", "public", "IDocumentStore", "initialize", "(", ")", "{", "if", "(", "initialized", ")", "{", "return", "this", ";", "}", "assertValidConfiguration", "(", ")", ";", "try", "{", "if", "(", "getConventions", "(", ")", ".", "getDocumentIdGenerat...
Initializes this instance.
[ "Initializes", "this", "instance", "." ]
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/DocumentStore.java#L196-L220
109,489
wcm-io/wcm-io-wcm
commons/src/main/java/io/wcm/wcm/commons/util/EditableTemplate.java
EditableTemplate.isPageInTemplateDefinition
private static boolean isPageInTemplateDefinition(Page page) { Resource resource = page.adaptTo(Resource.class); if (resource != null) { Resource parent = resource.getParent(); if (parent != null) { return StringUtils.equals(NT_TEMPLATE, parent.getValueMap().get(JCR_PRIMARYTYPE, String.class...
java
private static boolean isPageInTemplateDefinition(Page page) { Resource resource = page.adaptTo(Resource.class); if (resource != null) { Resource parent = resource.getParent(); if (parent != null) { return StringUtils.equals(NT_TEMPLATE, parent.getValueMap().get(JCR_PRIMARYTYPE, String.class...
[ "private", "static", "boolean", "isPageInTemplateDefinition", "(", "Page", "page", ")", "{", "Resource", "resource", "=", "page", ".", "adaptTo", "(", "Resource", ".", "class", ")", ";", "if", "(", "resource", "!=", "null", ")", "{", "Resource", "parent", ...
Checks if the given page is part of the editable template definition itself. @param page Page @return true if page is part of template definition.
[ "Checks", "if", "the", "given", "page", "is", "part", "of", "the", "editable", "template", "definition", "itself", "." ]
8eff9434f2f4b6462fdb718f8769ad793c55b8d7
https://github.com/wcm-io/wcm-io-wcm/blob/8eff9434f2f4b6462fdb718f8769ad793c55b8d7/commons/src/main/java/io/wcm/wcm/commons/util/EditableTemplate.java#L113-L122
109,490
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/indexes/AbstractIndexCreationTaskBase.java
AbstractIndexCreationTaskBase.execute
public void execute(IDocumentStore store, DocumentConventions conventions, String database) { DocumentConventions oldConventions = getConventions(); try { setConventions(ObjectUtils.firstNonNull(conventions, getConventions(), store.getConventions())); IndexDefinition indexDefini...
java
public void execute(IDocumentStore store, DocumentConventions conventions, String database) { DocumentConventions oldConventions = getConventions(); try { setConventions(ObjectUtils.firstNonNull(conventions, getConventions(), store.getConventions())); IndexDefinition indexDefini...
[ "public", "void", "execute", "(", "IDocumentStore", "store", ",", "DocumentConventions", "conventions", ",", "String", "database", ")", "{", "DocumentConventions", "oldConventions", "=", "getConventions", "(", ")", ";", "try", "{", "setConventions", "(", "ObjectUtil...
Executes the index creation against the specified document database using the specified conventions @param store target document store @param conventions Document conventions to use @param database Target database
[ "Executes", "the", "index", "creation", "against", "the", "specified", "document", "database", "using", "the", "specified", "conventions" ]
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/indexes/AbstractIndexCreationTaskBase.java#L104-L124
109,491
wcm-io/wcm-io-wcm
commons/src/main/java/io/wcm/wcm/commons/util/RunMode.java
RunMode.is
@Deprecated public static boolean is(Set<String> runModes, String... expectedRunModes) { if (runModes != null && expectedRunModes != null) { for (String expectedRunMode : expectedRunModes) { if (runModes.contains(expectedRunMode)) { return true; } } } return false; ...
java
@Deprecated public static boolean is(Set<String> runModes, String... expectedRunModes) { if (runModes != null && expectedRunModes != null) { for (String expectedRunMode : expectedRunModes) { if (runModes.contains(expectedRunMode)) { return true; } } } return false; ...
[ "@", "Deprecated", "public", "static", "boolean", "is", "(", "Set", "<", "String", ">", "runModes", ",", "String", "...", "expectedRunModes", ")", "{", "if", "(", "runModes", "!=", "null", "&&", "expectedRunModes", "!=", "null", ")", "{", "for", "(", "St...
Checks if given run mode is active. @param runModes Run modes for current instance @param expectedRunModes Run mode(s) to check for @return true if any of the given run modes is active @deprecated Instead of directly using the run modes, it is better to make the component in question require a configuration (see OSGI D...
[ "Checks", "if", "given", "run", "mode", "is", "active", "." ]
8eff9434f2f4b6462fdb718f8769ad793c55b8d7
https://github.com/wcm-io/wcm-io-wcm/blob/8eff9434f2f4b6462fdb718f8769ad793c55b8d7/commons/src/main/java/io/wcm/wcm/commons/util/RunMode.java#L60-L70
109,492
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/indexes/AbstractIndexCreationTask.java
AbstractIndexCreationTask.createIndexDefinition
public IndexDefinition createIndexDefinition() { if (conventions == null) { conventions = new DocumentConventions(); } IndexDefinitionBuilder indexDefinitionBuilder = new IndexDefinitionBuilder(getIndexName()); indexDefinitionBuilder.setIndexesStrings(indexesStrings); ...
java
public IndexDefinition createIndexDefinition() { if (conventions == null) { conventions = new DocumentConventions(); } IndexDefinitionBuilder indexDefinitionBuilder = new IndexDefinitionBuilder(getIndexName()); indexDefinitionBuilder.setIndexesStrings(indexesStrings); ...
[ "public", "IndexDefinition", "createIndexDefinition", "(", ")", "{", "if", "(", "conventions", "==", "null", ")", "{", "conventions", "=", "new", "DocumentConventions", "(", ")", ";", "}", "IndexDefinitionBuilder", "indexDefinitionBuilder", "=", "new", "IndexDefinit...
Creates the index definition. @return Index definition
[ "Creates", "the", "index", "definition", "." ]
5a45727de507b541d1571e79ddd97c7d88bee787
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/indexes/AbstractIndexCreationTask.java#L15-L33
109,493
wcm-io/wcm-io-wcm
ui/extjs/src/main/java/io/wcm/wcm/ui/extjs/provider/AbstractPageProvider.java
AbstractPageProvider.getPageFilter
protected PageFilter getPageFilter(SlingHttpServletRequest request) { // check for predicate filter String predicateName = RequestParam.get(request, RP_PREDICATE); if (StringUtils.isNotEmpty(predicateName)) { PredicateProvider predicateProvider = getPredicateProvider(); if (predicateProvider ==...
java
protected PageFilter getPageFilter(SlingHttpServletRequest request) { // check for predicate filter String predicateName = RequestParam.get(request, RP_PREDICATE); if (StringUtils.isNotEmpty(predicateName)) { PredicateProvider predicateProvider = getPredicateProvider(); if (predicateProvider ==...
[ "protected", "PageFilter", "getPageFilter", "(", "SlingHttpServletRequest", "request", ")", "{", "// check for predicate filter", "String", "predicateName", "=", "RequestParam", ".", "get", "(", "request", ",", "RP_PREDICATE", ")", ";", "if", "(", "StringUtils", ".", ...
Can be overridden by subclasses to filter page list via page filter. If not overridden it supports defining a page filter via "predicate" request attribute. @param request Request @return Page filter or null if no filtering applies
[ "Can", "be", "overridden", "by", "subclasses", "to", "filter", "page", "list", "via", "page", "filter", ".", "If", "not", "overridden", "it", "supports", "defining", "a", "page", "filter", "via", "predicate", "request", "attribute", "." ]
8eff9434f2f4b6462fdb718f8769ad793c55b8d7
https://github.com/wcm-io/wcm-io-wcm/blob/8eff9434f2f4b6462fdb718f8769ad793c55b8d7/ui/extjs/src/main/java/io/wcm/wcm/ui/extjs/provider/AbstractPageProvider.java#L130-L147
109,494
buschmais/extended-objects
impl/src/main/java/com/buschmais/xo/impl/metadata/MetadataProviderImpl.java
MetadataProviderImpl.getIndexedPropertyMethodMetadata
private IndexedPropertyMethodMetadata<?> getIndexedPropertyMethodMetadata(Collection<MethodMetadata<?, ?>> methodMetadataOfType) { for (MethodMetadata methodMetadata : methodMetadataOfType) { AnnotatedMethod annotatedMethod = methodMetadata.getAnnotatedMethod(); Annotation indexedAnnotat...
java
private IndexedPropertyMethodMetadata<?> getIndexedPropertyMethodMetadata(Collection<MethodMetadata<?, ?>> methodMetadataOfType) { for (MethodMetadata methodMetadata : methodMetadataOfType) { AnnotatedMethod annotatedMethod = methodMetadata.getAnnotatedMethod(); Annotation indexedAnnotat...
[ "private", "IndexedPropertyMethodMetadata", "<", "?", ">", "getIndexedPropertyMethodMetadata", "(", "Collection", "<", "MethodMetadata", "<", "?", ",", "?", ">", ">", "methodMetadataOfType", ")", "{", "for", "(", "MethodMetadata", "methodMetadata", ":", "methodMetadat...
Determine the indexed property from a list of method metadata. @param methodMetadataOfType The list of method metadata. @return The {@link IndexedPropertyMethodMetadata}.
[ "Determine", "the", "indexed", "property", "from", "a", "list", "of", "method", "metadata", "." ]
186431e81f3d8d26c511cfe1143dee59b03c2e7a
https://github.com/buschmais/extended-objects/blob/186431e81f3d8d26c511cfe1143dee59b03c2e7a/impl/src/main/java/com/buschmais/xo/impl/metadata/MetadataProviderImpl.java#L364-L377
109,495
buschmais/extended-objects
impl/src/main/java/com/buschmais/xo/impl/metadata/MetadataProviderImpl.java
MetadataProviderImpl.getMethodMetadataOfType
private Collection<MethodMetadata<?, ?>> getMethodMetadataOfType(AnnotatedType annotatedType, Collection<AnnotatedMethod> annotatedMethods) { Collection<MethodMetadata<?, ?>> methodMetadataOfType = new ArrayList<>(); // Collect the getter methods as they provide annotations holding meta // infor...
java
private Collection<MethodMetadata<?, ?>> getMethodMetadataOfType(AnnotatedType annotatedType, Collection<AnnotatedMethod> annotatedMethods) { Collection<MethodMetadata<?, ?>> methodMetadataOfType = new ArrayList<>(); // Collect the getter methods as they provide annotations holding meta // infor...
[ "private", "Collection", "<", "MethodMetadata", "<", "?", ",", "?", ">", ">", "getMethodMetadataOfType", "(", "AnnotatedType", "annotatedType", ",", "Collection", "<", "AnnotatedMethod", ">", "annotatedMethods", ")", "{", "Collection", "<", "MethodMetadata", "<", ...
Return the collection of method metadata from the given collection of annotated methods. @param annotatedMethods The collection of annotated methods. @return The collection of method metadata.
[ "Return", "the", "collection", "of", "method", "metadata", "from", "the", "given", "collection", "of", "annotated", "methods", "." ]
186431e81f3d8d26c511cfe1143dee59b03c2e7a
https://github.com/buschmais/extended-objects/blob/186431e81f3d8d26c511cfe1143dee59b03c2e7a/impl/src/main/java/com/buschmais/xo/impl/metadata/MetadataProviderImpl.java#L387-L414
109,496
buschmais/extended-objects
spi/src/main/java/com/buschmais/xo/spi/reflection/DependencyResolver.java
DependencyResolver.newInstance
public static <T> DependencyResolver<T> newInstance(Collection<T> elements, DependencyProvider<T> dependencyProvider) { return new DependencyResolver<T>(elements, dependencyProvider); }
java
public static <T> DependencyResolver<T> newInstance(Collection<T> elements, DependencyProvider<T> dependencyProvider) { return new DependencyResolver<T>(elements, dependencyProvider); }
[ "public", "static", "<", "T", ">", "DependencyResolver", "<", "T", ">", "newInstance", "(", "Collection", "<", "T", ">", "elements", ",", "DependencyProvider", "<", "T", ">", "dependencyProvider", ")", "{", "return", "new", "DependencyResolver", "<", "T", ">...
Creates an instance of the resolver. @param elements The elements to resolve. @param dependencyProvider The dependency provider. @param <T> The element type. @return The resolver.
[ "Creates", "an", "instance", "of", "the", "resolver", "." ]
186431e81f3d8d26c511cfe1143dee59b03c2e7a
https://github.com/buschmais/extended-objects/blob/186431e81f3d8d26c511cfe1143dee59b03c2e7a/spi/src/main/java/com/buschmais/xo/spi/reflection/DependencyResolver.java#L41-L43
109,497
buschmais/extended-objects
spi/src/main/java/com/buschmais/xo/spi/reflection/DependencyResolver.java
DependencyResolver.resolve
public List<T> resolve() { blockedBy = new HashMap<>(); Set<T> queue = new LinkedHashSet<>(); Set<T> allElements = new HashSet<>(); queue.addAll(elements); while (!queue.isEmpty()) { T element = queue.iterator().next(); Set<T> dependencies = dependencyProv...
java
public List<T> resolve() { blockedBy = new HashMap<>(); Set<T> queue = new LinkedHashSet<>(); Set<T> allElements = new HashSet<>(); queue.addAll(elements); while (!queue.isEmpty()) { T element = queue.iterator().next(); Set<T> dependencies = dependencyProv...
[ "public", "List", "<", "T", ">", "resolve", "(", ")", "{", "blockedBy", "=", "new", "HashMap", "<>", "(", ")", ";", "Set", "<", "T", ">", "queue", "=", "new", "LinkedHashSet", "<>", "(", ")", ";", "Set", "<", "T", ">", "allElements", "=", "new", ...
Resolves the dependencies to a list. @return The resolved list.
[ "Resolves", "the", "dependencies", "to", "a", "list", "." ]
186431e81f3d8d26c511cfe1143dee59b03c2e7a
https://github.com/buschmais/extended-objects/blob/186431e81f3d8d26c511cfe1143dee59b03c2e7a/spi/src/main/java/com/buschmais/xo/spi/reflection/DependencyResolver.java#L50-L68
109,498
buschmais/extended-objects
spi/src/main/java/com/buschmais/xo/spi/reflection/DependencyResolver.java
DependencyResolver.resolve
private void resolve(T element, List<T> result) { Set<T> dependencies = blockedBy.get(element); if (dependencies != null) { for (T dependency : dependencies) { resolve(dependency, result); } blockedBy.remove(element); result.add(element); ...
java
private void resolve(T element, List<T> result) { Set<T> dependencies = blockedBy.get(element); if (dependencies != null) { for (T dependency : dependencies) { resolve(dependency, result); } blockedBy.remove(element); result.add(element); ...
[ "private", "void", "resolve", "(", "T", "element", ",", "List", "<", "T", ">", "result", ")", "{", "Set", "<", "T", ">", "dependencies", "=", "blockedBy", ".", "get", "(", "element", ")", ";", "if", "(", "dependencies", "!=", "null", ")", "{", "for...
Resolves an element. @param element The element. @param result The result list.
[ "Resolves", "an", "element", "." ]
186431e81f3d8d26c511cfe1143dee59b03c2e7a
https://github.com/buschmais/extended-objects/blob/186431e81f3d8d26c511cfe1143dee59b03c2e7a/spi/src/main/java/com/buschmais/xo/spi/reflection/DependencyResolver.java#L78-L87
109,499
buschmais/extended-objects
impl/src/main/java/com/buschmais/xo/impl/cache/TransactionalCache.java
TransactionalCache.put
public void put(Id id, Object value, Mode mode) { if (Mode.WRITE.equals(mode)) { writeCache.put(id, value); } readCache.put(new CacheKey(id), value); }
java
public void put(Id id, Object value, Mode mode) { if (Mode.WRITE.equals(mode)) { writeCache.put(id, value); } readCache.put(new CacheKey(id), value); }
[ "public", "void", "put", "(", "Id", "id", ",", "Object", "value", ",", "Mode", "mode", ")", "{", "if", "(", "Mode", ".", "WRITE", ".", "equals", "(", "mode", ")", ")", "{", "writeCache", ".", "put", "(", "id", ",", "value", ")", ";", "}", "read...
Put an instance into the cache. @param id The id. @param value The instance. @param mode The mode.
[ "Put", "an", "instance", "into", "the", "cache", "." ]
186431e81f3d8d26c511cfe1143dee59b03c2e7a
https://github.com/buschmais/extended-objects/blob/186431e81f3d8d26c511cfe1143dee59b03c2e7a/impl/src/main/java/com/buschmais/xo/impl/cache/TransactionalCache.java#L66-L71