release version 1.11.0
This commit is contained in:
175
platform/runtime/base/search-service/LICENSE.txt
Normal file
175
platform/runtime/base/search-service/LICENSE.txt
Normal file
@ -0,0 +1,175 @@
|
||||
ЛИЦЕНЗИЯ ОГРАНИЧЕННОГО ПРИМЕНЕНИЯ
|
||||
|
||||
Настоящий документ устанавливает для Пользователя условия применения Базовой (некоммерческой)
|
||||
версии лицензии для пробного использования программного обеспечения ENTAXY, принадлежащего
|
||||
Правообладателю – Обществу с ограниченной ответственностью "ЕМДЕВ" (ОГРН 1057810026658, ИНН
|
||||
7813313860, юридический адрес: 197022, Россия, г. Санкт-Петербург, ул. Профессора Попова,
|
||||
д. 23, литера В, помещение 3Н), расположенной в сети Интернет по адресу
|
||||
https://www.emdev.ru/about (далее - Компания).
|
||||
|
||||
Используя или получая доступ к Программному обеспечению, или нажав «Я согласен с Условиями»
|
||||
(или аналогичную кнопку или флажок) после загрузки или установки Программного обеспечения,
|
||||
Пользователь выражает свое согласие на обязательность условий и ограничений, изложенных в
|
||||
настоящем документе, в противном случае, он должен не использовать или не получать доступ
|
||||
к Программному обеспечению.
|
||||
|
||||
1. ТЕРМИНЫ И ОПРЕДЕЛЕНИЯ
|
||||
|
||||
a) ПО – Программное обеспечение, интеграционная шина «ЭНТАКСИ» (ENTAXY) в любой ее версии
|
||||
или редакции, исключительные права на которую принадлежат Правообладателю.
|
||||
b) Правообладатель (Компания) – ООО «ЕМДЕВ», ОГРН 1057810026658, ИНН 7813313860, исключительные
|
||||
права которого подтверждаются Свидетельством о государственной регистрации в Реестре программ
|
||||
для ЭВМ № 2021610848 от 19.01.2021 года.
|
||||
c) Пользователь – юридическое или физическое лицо, получившее через скачивание с сайта
|
||||
https://entaxy.ru или иным образом, дистрибутив ПО, пользующееся ПО.
|
||||
d) ИС – интеллектуальная собственность – закреплённое законом исключительное право, а также
|
||||
личные неимущественные права авторов произведений на результат интеллектуальной деятельности.
|
||||
e) Подписка – это коммерческое предложение Правообладателя, состоящее из Лицензии на использование
|
||||
ПО и доступа к технической поддержке программного обеспечения на срок Подписки. Подписка
|
||||
включает предоставление Пользователю неисключительного права использования ПО, в том числе
|
||||
получение обновлений функционала ПО и безопасности ПО, исправление ошибок ПО и получение
|
||||
патчей с обновлениями и исправлениями программного обеспечения. Подписка приобретается
|
||||
Пользователем на период времени, указанный в Сертификате. Количество подписок устанавливается
|
||||
для каждого Пользователя индивидуально в Сертификате.
|
||||
f) Сертификат – документ, выдаваемый Дистрибъютором или Авторизованным партнёром (Партнёром),
|
||||
подтверждающий факт приобретения физическим или юридическим лицом Подписки на программное
|
||||
обеспечение в ограниченном объёме и на определённый период времени.
|
||||
g) Лицензия (простая (неисключительная) – совокупность ограниченных прав использования ПО,
|
||||
предоставленных Пользователю согласно условиям Подписки.
|
||||
h) Библиотека – совокупность подпрограмм и объектов, используемых для разработки программного
|
||||
обеспечения.
|
||||
i) Исходный код – текст компьютерной программы на каком-либо языке программирования, состоящий
|
||||
из одного или нескольких файлов, который может быть прочтён человеком.
|
||||
j) Объектный код – файл (часть машинного кода) с промежуточным представлением отдельного модуля
|
||||
программы, полученный в результате обработки исходного кода, еще не связанный в полную программу.
|
||||
Это машинный код для одной конкретной библиотеки или модуля, который будет составлять готовый
|
||||
продукт.
|
||||
k) Некоммерческое использование – индивидуальное личное использование Пользователем программного
|
||||
обеспечения с целью обучения работе с Программным обеспечением, для оценки или демонстрации
|
||||
возможностей Программного обеспечения, при котором, Пользователем не извлекается коммерческая
|
||||
выгода и/или не идёт в доход денежное вознаграждение при использовании Программного обеспечения.
|
||||
|
||||
2. ДОПУСТИМЫЕ СПОСОБЫ ИСПОЛЬЗОВАНИЯ ПРОГРАММНОГО ОБЕСПЕЧЕНИЯ
|
||||
|
||||
2.1. Правообладатель предоставляет Пользователю ограниченное право использования Программного
|
||||
обеспечения на условиях простой (неисключительной) лицензии в объёме, ограниченном правом
|
||||
воспроизведения полной рабочей версии программного обеспечения, новых версий программного обеспечения
|
||||
в памяти оборудования и его запуска на оборудовании в соответствии со ст. 1280 ГК РФ.
|
||||
2.2. Право на использование Программного обеспечения, предоставляемое Пользователю, носит
|
||||
неисключительный характер.
|
||||
2.3. Пользователю предоставляется всемирная, неисключительная, не подлежащая сублицензированию,
|
||||
лицензия на ограниченное использование Программного обеспечения.
|
||||
2.4. Пользователь, имеющий Базовую (некоммерческую) версию лицензии для пробного использования
|
||||
имеет право приобрести Подписку на программное обеспечение. В этом случае Пользователь обязан
|
||||
обратиться в службу поддержки Правообладателя по адресу: https://entaxy.ru/ для изменения
|
||||
вида лицензии с Базовой бесплатной версии на Подписки.
|
||||
2.5. Срок использования скачанной Пользователем базовой (некоммерческой) версии лицензии для
|
||||
пробного использования программного обеспечения – не ограничен.
|
||||
2.6. Использование Пользователем настоящего программного обеспечения в целях разработки,
|
||||
модификации, обновления другого ПО, принадлежащего третьим лицам, а не Правообладателю,
|
||||
без разрешения Правообладателя не допускается.
|
||||
|
||||
3. АВТОРСКОЕ ПРАВО.
|
||||
|
||||
3.1. Все авторские права, все права интеллектуальной собственности на Программное обеспечение
|
||||
и любые его копии принадлежат Правообладателю.
|
||||
3.2. Все авторские права, все права интеллектуальной собственности в отношении любого контента,
|
||||
к которому можно получить доступ с помощью Программного обеспечения, является собственностью
|
||||
соответствующего владельца контента и защищается применимым законодательством об авторском
|
||||
праве или другими законами и договорами об интеллектуальной собственности.
|
||||
3.3. Условия использования Программного обеспечения.
|
||||
Лицензия, предоставленная Пользователю, действительна только в том случае, если Пользователь
|
||||
придерживается следующих условий:
|
||||
3.3.1. Принятие уведомлений об авторских правах. Пользователю запрещается удалять или изменять
|
||||
какие-либо уведомления об авторских правах или лицензиях, которые появляются при использовании
|
||||
Программного обеспечения или на нем.
|
||||
3.3.2. Модификация. Пользователю запрещается модифицировать, изменять, декомпилировать,
|
||||
расшифровывать, дизассемблировать, переводить или реверсировать, перепроектировать
|
||||
Программное обеспечение.
|
||||
3.3.3. Распространение. Пользователю запрещается сублицензировать, передавать право использования
|
||||
ПО или иным образом распространять или предоставлять Программное обеспечение любой третьей стороне.
|
||||
3.3.4. SaaS. За исключением случаев, когда это разрешено Правообладателем, Пользователю запрещено
|
||||
использовать Программное обеспечение в коммерческих целях для оказания услуг третьим лицам.
|
||||
|
||||
4. ОТВЕТСТВЕННОСТЬ ПРАВООБЛАДАТЕЛЯ ПРИ НАРУШЕНИИ ПОЛЬЗОВАТЕЛЕМ ПРАВ «ИС»
|
||||
|
||||
4.1. Правообладатель не несет никаких обязательств в отношении каких-либо претензий к Пользователю
|
||||
на предмет нарушения последним прав Интеллектуальной собственности, возникших в связи с
|
||||
использованием Пользователем:
|
||||
4.1.1. Любых компонентов программного обеспечения с открытым исходным кодом, включенных в
|
||||
Программное обеспечение;
|
||||
4.1.2. Любого нарушения правил использования Программного обеспечения, установленного условиями
|
||||
настоящего соглашения;
|
||||
4.1.3. Любого использования Программного обеспечения в сочетании с другими ПО, оборудованием,
|
||||
или данными, не предоставленными Пользователю Правообладателем;
|
||||
4.1.4. Любого изменения Программного обеспечения любым третьим лицом, а не Правообладателем.
|
||||
|
||||
|
||||
5. НАСТОЯЩИМ ПРАВООБЛАДАТЕЛЬ ЗАЯВЛЯЕТ, ЧТО ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ ПРЕДОСТАВЛЯЕТСЯ ПОЛЬЗОВАТЕЛЮ
|
||||
ПО ПРИНЦИПУ «AS IS» - «КАК ЕСТЬ». НИ ПРИ КАКИХ ОБСТОЯТЕЛЬСТВАХ ПРАВООБЛАДАТЕЛЬ НЕ ГАРАНТИРУЕТ
|
||||
И НЕ ОБЕЩАЕТ, ЧТО ПРЕДОСТАВЛЕННОЕ ИМ ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ БУДЕТ ПОДХОДИТЬ ИЛИ НЕ ПОДХОДИТЬ
|
||||
ДЛЯ КОНКРЕТНЫХ ЦЕЛЕЙ ПОЛЬЗОВАТЕЛЯ, ЧТО ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ БУДЕТ ОТВЕЧАТЬ ВСЕМ КОММЕРЧЕСКИМ
|
||||
И ЛИЧНЫМ СУБЪЕКТИВНЫМ ОЖИДАНИЯМ ПОЛЬЗОВАТЕЛЯ, ЧТО ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ БУДЕТ РАБОТАТЬ
|
||||
ИСПРАВНО, БЕЗ ТЕХНИЧЕСКИХ ОШИБОК, БЫСТРО И БЕСПЕРЕБОЙНО.
|
||||
|
||||
6. ОГРАНИЧЕНИЕ ОТВЕТСТВЕННОСТИ.
|
||||
НИ ПРИ КАКИХ ОБСТОЯТЕЛЬСТВАХ ПРАВООБЛАДАТЕЛЬ ИЛИ ЕГО АФФИЛЛИРОВАННЫЕ ЛИЦА НЕ НЕСУТ ПЕРЕД ПОЛЬЗОВАТЕЛЕМ
|
||||
ОТВЕТСТВЕННОСТИ ЗА ЛЮБЫЕ ПРЯМЫЕ ИЛИ КОСВЕННЫЕ УБЫТКИ ПОЛЬЗОВАТЕЛЯ, ЕГО РАСХОДЫ ИЛИ РЕАЛЬНЫЙ УЩЕРБ,
|
||||
ВКЛЮЧАЯ, ПОМИМО ПРОЧЕГО, ПРОСТОИ; УТРАТУ БИЗНЕСА; УПУЩЕННУЮ ВЫГОДУ; НЕДОПОЛУЧЕННУЮ ПРИБЫЛЬ;
|
||||
ПОТЕРЮ ИЛИ ПОВРЕЖДЕНИЕ ДАННЫХ, ИМУЩЕСТВА И ИНОЕ.
|
||||
ОГРАНИЧЕНИЯ ПРИМЕНЯЮТСЯ НЕЗАВИСИМО ОТ ОСНОВАНИЯ НАСТУПЛЕНИЯ ОТВЕТСТВЕННОСТИ; В ТОМ ЧИСЛЕ ВСЛЕДСТВИЕ
|
||||
ДЕЙСТВИЯ ИЛИ БЕЗДЕЙСТВИЯ, НЕБРЕЖНОСТИ, УМЫСЛА, ПРЯМОГО ИЛИ КОСВЕННОГО; НЕОСТОРОЖНОСТИ; ЗАБЛУЖДЕНИЯ;
|
||||
КЛЕВЕТЫ; НАРУШЕНИЯ КОНФИДЕНЦИАЛЬНОСТИ ИЛИ ПРАВА ИНТЕЛЛЕКТУАЛЬНОЙ СОБСТВЕННОСТИ; ИЛИ ЛЮБОЕ ДРУГОЕ
|
||||
ОСНОВАНИЕ НАСТУПЛЕНИЯ ОТВЕТСТВЕННОСТИ.
|
||||
|
||||
7. ОБЯЗАННОСТЬ ПОЛЬЗОВАТЕЛЯ:
|
||||
Не осуществлять самостоятельно и (или) с привлечением третьих лиц нижеследующие действия
|
||||
(включая, но не ограничиваясь) по:
|
||||
-дизассемблированию и (или) декомпилированию (преобразованию объектного кода в исходный код)
|
||||
Программного обеспечения;
|
||||
-модификации Программного обеспечения, в том числе вносить изменения в объектный код, исходный
|
||||
код Программного обеспечения, за исключением тех изменений, которые вносятся средствами,
|
||||
включёнными в Программное обеспечение и описанными непосредственно в документации к нему;
|
||||
-созданию условий для использования Программного обеспечения лицами, не имеющими прав на
|
||||
использование данного Программного обеспечения, включая (но не ограничиваясь) вмешательство
|
||||
третьих лиц в функционирование Программного обеспечения, предоставление третьим лицам доступа
|
||||
к исследованию и (или) замене настроек Программного обеспечения, включая его первичную установку;
|
||||
-распространению Программного обеспечения в целом или в части (включая приложенную к нему документацию).
|
||||
|
||||
8. БИБЛИОТЕКА ПО. ИСПОЛЬЗУЕМЫЕ ПРОГРАММНЫЕ СРЕДСТВА.
|
||||
|
||||
8.1. Настоящим, Правообладатель заверяет, что Библиотека программного обеспечения состоит из
|
||||
лицензионных продуктов, используемых на законных основаниях, а
|
||||
именно https://entaxy.ru/libs/licenses/root-aggregated.deps.
|
||||
8.2. Любые программные средства, применяемые Пользователем при работе с ПО, должны быть
|
||||
совместимы с библиотекой ПО, указанной в п.8.1. настоящего соглашения.
|
||||
8.3. Перечень внешних модулей ПО, указанный в п.8.1 настоящего соглашения, может изменяться
|
||||
Правообладателем в одностороннем порядке, в зависимости от выпуска релизов программного обеспечения,
|
||||
содержащих все изменения и дополнения программного обеспечения.
|
||||
|
||||
9. ВНЕСЕНИЕ ИЗМЕНЕНИЙ В ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ.
|
||||
|
||||
9.1. Программное обеспечение, интеграционная шина «ЭНТАКСИ» (ENTAXY) является свободно распространяемым
|
||||
программным обеспечением.
|
||||
9.2. Пользователь имеет право вносить изменения в исходный код программного обеспечения исключительно
|
||||
с согласия Правообладателя в порядке предложения изменений/правок/дополнений через механизм
|
||||
«Pull Requests» в открытом репозитории Правообладателя по адресу: https://git.entaxy.ru/entaxy/entaxy-public.
|
||||
9.3. Любые изменения программного обеспечения, осуществляемые Пользователем без соблюдения условий
|
||||
пункта 9.2. настоящего документа, являются нарушением авторских и смежных прав Правообладателя,
|
||||
прав интеллектуальной собственности Правообладателя и влекут применение к Пользователю мер
|
||||
ответственности в соответствии с условиями настоящей Лицензии, а также применимого законодательства
|
||||
Российской Федерации.
|
||||
|
||||
10. ЗАКЛЮЧИТЕЛЬНЫЕ ПОЛОЖЕНИЯ.
|
||||
|
||||
10.1. В случае нарушения Пользователем любого из условий настоящей Лицензии, Правообладатель имеет
|
||||
право взыскать с Пользователя любые причинённые таким нарушением убытки, реальный ущерб,
|
||||
недополученную прибыль, упущенную выгоду, а также в случае нарушения Пользователем условий
|
||||
пункта 9.2 настоящего соглашения, в том числе, взыскать с Пользователя штраф в размере
|
||||
2 000 000 (Два миллиона) рублей за каждый установленный случай несанкционированного изменения
|
||||
исходного или объектного кода Программного обеспечения «Энтакси» (Entaxy).
|
||||
10.2. В рамках исполнения Пользователем обязательств по настоящей Лицензии, применимое
|
||||
законодательство – Российской Федерации.
|
||||
10.3. Если какое-либо положение настоящей Лицензии будет признано судом недействительным,
|
||||
остальные положения будут продолжать своё действие, а Пользователь будет обязан продолжать
|
||||
исполнять свои обязанности в соответствии с этими положениями.
|
53
platform/runtime/base/search-service/pom.xml
Normal file
53
platform/runtime/base/search-service/pom.xml
Normal file
@ -0,0 +1,53 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>ru.entaxy.esb.platform.runtime</groupId>
|
||||
<artifactId>base</artifactId>
|
||||
<version>1.11.0</version>
|
||||
</parent>
|
||||
<groupId>ru.entaxy.platform</groupId>
|
||||
<artifactId>search-service</artifactId>
|
||||
<packaging>bundle</packaging>
|
||||
<name>ENTAXY :: PLATFORM :: SEARCH SERVICE</name>
|
||||
<description>ENTAXY :: PLATFORM :: SEARCH SERVICE</description>
|
||||
|
||||
<properties>
|
||||
<bundle.osgi.export.pkg>
|
||||
ru.entaxy.platform.search
|
||||
</bundle.osgi.export.pkg>
|
||||
<bundle.osgi.private.pkg>
|
||||
ru.entaxy.platform.search.*
|
||||
</bundle.osgi.private.pkg>
|
||||
<bundle.osgi.remove.headers>none</bundle.osgi.remove.headers>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>ru.entaxy.esb.platform.runtime.base</groupId>
|
||||
<artifactId>base-support</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ru.entaxy.esb.platform.runtime.base</groupId>
|
||||
<artifactId>management-core</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.karaf.shell</groupId>
|
||||
<artifactId>org.apache.karaf.shell.core</artifactId>
|
||||
<version>${karaf.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-collections4</artifactId>
|
||||
<version>4.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ru.entaxy.esb.platform.runtime.base</groupId>
|
||||
<artifactId>management-core</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
@ -0,0 +1,48 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* search-service
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
package ru.entaxy.platform.search;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public abstract class AbstractSearchProvider implements SearchProvider {
|
||||
|
||||
@Override
|
||||
public String getProviderId() {
|
||||
if (this.getClass().isAnnotationPresent(SearchProviderInfo.class))
|
||||
return this.getClass().getAnnotation(SearchProviderInfo.class).id();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getTargetTypes() {
|
||||
if (this.getClass().isAnnotationPresent(SearchProviderInfo.class))
|
||||
return Arrays.asList(this.getClass().getAnnotation(SearchProviderInfo.class).targetTypes());
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* search-service
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
package ru.entaxy.platform.search;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.osgi.framework.Filter;
|
||||
import org.osgi.framework.FrameworkUtil;
|
||||
import org.osgi.framework.InvalidSyntaxException;
|
||||
|
||||
public interface SearchProvider {
|
||||
|
||||
String getProviderId();
|
||||
|
||||
List<String> getTargetTypes();
|
||||
|
||||
Map<String, String> getStandardAttributes(String targetType) throws IllegalArgumentException;
|
||||
|
||||
default List<Map<String, Object>> search(String targetType, String filter)
|
||||
throws InvalidSyntaxException, IllegalArgumentException {
|
||||
if (!getTargetTypes().contains(targetType))
|
||||
throw new IllegalArgumentException(
|
||||
String.format("Provider [%s]: target type [%s] not supported", getProviderId(), targetType));
|
||||
return search(targetType, FrameworkUtil.createFilter(filter));
|
||||
}
|
||||
|
||||
List<Map<String, Object>> search(String targetType, Filter filter) throws IllegalArgumentException;
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* search-service
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
package ru.entaxy.platform.search;
|
||||
|
||||
import static java.lang.annotation.ElementType.TYPE;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
@Retention(RUNTIME)
|
||||
@Target(TYPE)
|
||||
public @interface SearchProviderInfo {
|
||||
|
||||
String id();
|
||||
|
||||
String[] targetTypes();
|
||||
|
||||
}
|
@ -0,0 +1,89 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* search-service
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
package ru.entaxy.platform.search;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.osgi.framework.Filter;
|
||||
import org.osgi.framework.FrameworkUtil;
|
||||
import org.osgi.framework.InvalidSyntaxException;
|
||||
|
||||
public interface SearchService {
|
||||
|
||||
List<SearchProvider> getProviders();
|
||||
|
||||
SearchProvider getProviderForType(String targetType);
|
||||
|
||||
default List<String> getProvidedTypes() {
|
||||
return getProviders().stream().map(p -> p.getTargetTypes()).flatMap(t -> t.stream()).distinct()
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
default Map<String, String> getStandardAttributes(String targetType) throws IllegalArgumentException {
|
||||
SearchProvider provider = getProviderForType(targetType);
|
||||
if (provider == null)
|
||||
throw new IllegalArgumentException(String.format("Search provider for type [%s] not found", targetType));
|
||||
return provider.getStandardAttributes(targetType);
|
||||
}
|
||||
|
||||
default List<String> getAttributes(String targetType, String filter)
|
||||
throws InvalidSyntaxException, IllegalArgumentException {
|
||||
return getAttributes(targetType, FrameworkUtil.createFilter(filter));
|
||||
}
|
||||
|
||||
default List<String> getAttributes(String targetType, Filter filter)
|
||||
throws InvalidSyntaxException, IllegalArgumentException {
|
||||
|
||||
List<String> result = new ArrayList<>();
|
||||
|
||||
List<Map<String, Object>> found = search(targetType, filter);
|
||||
|
||||
if (found != null) {
|
||||
result.addAll(found.stream().map(m -> m.keySet()).flatMap(ks -> ks.stream()).distinct()
|
||||
.collect(Collectors.toList()));
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
default List<Map<String, Object>> search(String targetType, String filter)
|
||||
throws InvalidSyntaxException, IllegalArgumentException {
|
||||
Filter osgiFilter = FrameworkUtil.createFilter(filter);
|
||||
return search(targetType, osgiFilter);
|
||||
}
|
||||
|
||||
|
||||
default List<Map<String, Object>> search(String targetType, Filter filter)
|
||||
throws InvalidSyntaxException, IllegalArgumentException {
|
||||
SearchProvider provider = getProviderForType(targetType);
|
||||
if (provider == null)
|
||||
throw new IllegalArgumentException(String.format("Search provider for type [%s] not found", targetType));
|
||||
return provider.search(targetType, filter);
|
||||
};
|
||||
}
|
@ -0,0 +1,143 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* search-service
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
package ru.entaxy.platform.search.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.osgi.framework.BundleContext;
|
||||
import org.osgi.framework.Constants;
|
||||
import org.osgi.service.component.ComponentContext;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.osgi.service.component.annotations.ReferencePolicy;
|
||||
import org.osgi.service.component.annotations.ReferencePolicyOption;
|
||||
|
||||
import ru.entaxy.platform.search.SearchProvider;
|
||||
import ru.entaxy.platform.search.SearchService;
|
||||
|
||||
@Component(service = SearchService.class, immediate = true)
|
||||
public class SearchServiceImpl implements SearchService {
|
||||
|
||||
protected final Map<String, List<SearchProviderContainer>> providers = new HashMap<>();
|
||||
|
||||
protected final Map<SearchProvider, SearchProviderContainer> containers = new HashMap<>();
|
||||
|
||||
protected Object providersLock = new Object();
|
||||
|
||||
protected BundleContext bundleContext;
|
||||
|
||||
@Activate
|
||||
public void activate(ComponentContext componentContext) {
|
||||
this.bundleContext = componentContext.getBundleContext();
|
||||
}
|
||||
|
||||
@Reference(unbind = "unbindProvider", cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC,
|
||||
policyOption = ReferencePolicyOption.GREEDY)
|
||||
public void bindProvider(SearchProvider provider, Map<String, Object> properties) {
|
||||
synchronized (providersLock) {
|
||||
SearchProviderContainer container = new SearchProviderContainer(provider, properties);
|
||||
for (String s : provider.getTargetTypes()) {
|
||||
if (!providers.containsKey(s))
|
||||
providers.put(s, new ArrayList<>());
|
||||
providers.get(s).add(container);
|
||||
}
|
||||
containers.put(provider, container);
|
||||
}
|
||||
}
|
||||
|
||||
public void unbindProvider(SearchProvider provider) {
|
||||
synchronized (providersLock) {
|
||||
SearchProviderContainer container = containers.get(provider);
|
||||
containers.remove(provider);
|
||||
if (container != null)
|
||||
for (String s : provider.getTargetTypes()) {
|
||||
List<SearchProviderContainer> list = providers.get(s);
|
||||
if (list != null)
|
||||
list.remove(container);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SearchProvider> getProviders() {
|
||||
return this.providers.keySet().stream().map(t -> getProviderForType(t)).filter(p -> p != null).distinct()
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public SearchProvider getProviderForType(String targetType) {
|
||||
if (providers.containsKey(targetType)) {
|
||||
List<SearchProviderContainer> list = providers.get(targetType);
|
||||
if (list == null || list.isEmpty())
|
||||
return null;
|
||||
|
||||
SearchProviderContainer targetContainer = list.stream().sorted(new Comparator<SearchProviderContainer>() {
|
||||
|
||||
@Override
|
||||
public int compare(SearchProviderContainer o1, SearchProviderContainer o2) {
|
||||
return Integer.compare(o1.ranking, o2.ranking);
|
||||
}
|
||||
}).findFirst().get();
|
||||
|
||||
return targetContainer.provider;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
protected class SearchProviderContainer {
|
||||
|
||||
int ranking = 0;
|
||||
SearchProvider provider;
|
||||
|
||||
protected SearchProviderContainer(SearchProvider provider, Map<String, Object> properties) {
|
||||
this.provider = provider;
|
||||
if (properties.containsKey(Constants.SERVICE_RANKING)) {
|
||||
Object rankingValue = properties.get(Constants.SERVICE_RANKING);
|
||||
if (rankingValue != null)
|
||||
try {
|
||||
if (rankingValue instanceof Number)
|
||||
ranking = ((Number) rankingValue).intValue();
|
||||
} catch (Exception e1) {
|
||||
try {
|
||||
ranking = Integer.parseInt(rankingValue.toString());
|
||||
} catch (Exception ignore) {
|
||||
// NOOP
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,81 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* search-service
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
package ru.entaxy.platform.search.jmx;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.management.MBeanOperationInfo;
|
||||
|
||||
import org.osgi.framework.InvalidSyntaxException;
|
||||
|
||||
import ru.entaxy.esb.platform.base.management.core.ManagementCore;
|
||||
import ru.entaxy.esb.platform.base.management.core.api.MBeanAnnotated;
|
||||
import ru.entaxy.esb.platform.base.management.core.api.MBeanExportPolicy;
|
||||
import ru.entaxy.esb.platform.base.management.core.api.Operation;
|
||||
import ru.entaxy.esb.platform.base.management.core.api.Parameter;
|
||||
|
||||
@MBeanAnnotated(policy = MBeanExportPolicy.ANNOTATED_ONLY)
|
||||
public interface SearchMBean {
|
||||
|
||||
String SEARCH_KEY = "util";
|
||||
String SEARCH_KEY_VALUE = "search";
|
||||
|
||||
String JMX_OBJECT_NAME = ManagementCore.Q_PLATFORM_S + ","
|
||||
+ SearchMBean.SEARCH_KEY + "=" + SearchMBean.SEARCH_KEY_VALUE;
|
||||
|
||||
@Operation(impact = MBeanOperationInfo.INFO, desc = "Lists available search providers")
|
||||
List<String> listProviders();
|
||||
|
||||
@Operation(impact = MBeanOperationInfo.INFO, desc = "Lists types available for search")
|
||||
List<String> listProvidedTypes();
|
||||
|
||||
@Operation(impact = MBeanOperationInfo.INFO, desc = "Lists standard attributes for selected type")
|
||||
Map<String, String> listStandardAttributes(@Parameter(name = "type") String type)
|
||||
throws InvalidSyntaxException, IllegalArgumentException;
|
||||
|
||||
@Operation(impact = MBeanOperationInfo.INFO, desc = "Lists attributes available for the target search")
|
||||
default List<String> listAttributes(@Parameter(name = "type") String type,
|
||||
@Parameter(name = "filter") String filter)
|
||||
throws InvalidSyntaxException, IllegalArgumentException {
|
||||
|
||||
List<String> result = new LinkedList<>();
|
||||
|
||||
for (Map<String, Object> item : search(type, filter))
|
||||
for (String attr : item.keySet())
|
||||
if (!result.contains(attr))
|
||||
result.add(attr);
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
|
||||
@Operation(impact = MBeanOperationInfo.INFO, desc = "Executes search")
|
||||
List<Map<String, Object>> search(@Parameter(name = "type") String type, @Parameter(name = "filter") String filter)
|
||||
throws InvalidSyntaxException, IllegalArgumentException;
|
||||
|
||||
}
|
@ -0,0 +1,83 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* search-service
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
package ru.entaxy.platform.search.jmx.impl;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.management.DynamicMBean;
|
||||
import javax.management.MBeanRegistration;
|
||||
import javax.management.NotCompliantMBeanException;
|
||||
|
||||
import org.osgi.framework.FrameworkUtil;
|
||||
import org.osgi.framework.InvalidSyntaxException;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ServiceScope;
|
||||
|
||||
import ru.entaxy.esb.platform.base.management.core.ManagementCore;
|
||||
import ru.entaxy.esb.platform.base.management.core.api.AnnotatedMBean;
|
||||
import ru.entaxy.platform.search.SearchService;
|
||||
import ru.entaxy.platform.search.jmx.SearchMBean;
|
||||
|
||||
@Component(
|
||||
service = {SearchMBean.class, DynamicMBean.class, MBeanRegistration.class},
|
||||
property = {ManagementCore.JMX_OBJECTNAME + "=" + SearchMBean.JMX_OBJECT_NAME},
|
||||
scope = ServiceScope.SINGLETON,
|
||||
immediate = true)
|
||||
public class SearchMBeanImpl extends AnnotatedMBean<SearchMBean> implements SearchMBean {
|
||||
|
||||
@Reference
|
||||
SearchService searchService;
|
||||
|
||||
public SearchMBeanImpl() throws NotCompliantMBeanException {
|
||||
super(SearchMBean.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> listProviders() {
|
||||
return searchService.getProviders().stream().map(p -> p.getProviderId()).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> listProvidedTypes() {
|
||||
return searchService.getProvidedTypes();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, String> listStandardAttributes(String type)
|
||||
throws InvalidSyntaxException, IllegalArgumentException {
|
||||
return searchService.getStandardAttributes(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> search(String type, String filter)
|
||||
throws InvalidSyntaxException, IllegalArgumentException {
|
||||
return searchService.search(type, FrameworkUtil.createFilter(filter));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,209 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* search-service
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
package ru.entaxy.platform.search.provider;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Dictionary;
|
||||
import java.util.Enumeration;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.collections4.MapUtils;
|
||||
import org.apache.karaf.bundle.core.BundleInfo;
|
||||
import org.apache.karaf.bundle.core.BundleService;
|
||||
import org.osgi.framework.Bundle;
|
||||
import org.osgi.framework.BundleContext;
|
||||
import org.osgi.framework.Constants;
|
||||
import org.osgi.framework.Filter;
|
||||
import org.osgi.framework.InvalidSyntaxException;
|
||||
import org.osgi.framework.ServiceReference;
|
||||
import org.osgi.service.component.ComponentContext;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
|
||||
import ru.entaxy.platform.search.AbstractSearchProvider;
|
||||
import ru.entaxy.platform.search.SearchProvider;
|
||||
import ru.entaxy.platform.search.SearchProviderInfo;
|
||||
|
||||
@Component(service = SearchProvider.class, immediate = true)
|
||||
@SearchProviderInfo(id = "osgi", targetTypes = {OsgiSearchProvider.TYPE_BUNDLE, OsgiSearchProvider.TYPE_SERVICE})
|
||||
public class OsgiSearchProvider extends AbstractSearchProvider {
|
||||
|
||||
public static final String TYPE_BUNDLE = "bundle";
|
||||
|
||||
public static final String TYPE_SERVICE = "service";
|
||||
|
||||
public interface BundleSearch {
|
||||
|
||||
String ATTR_ID = "id";
|
||||
String ATTR_LOCATION = "location";
|
||||
String ATTR_SYMBOLIC_NAME = "symbolicName";
|
||||
String ATTR_LAST_MODIFIED = "lastModified";
|
||||
|
||||
String ATTR_HEADER_PREFIX = "header.";
|
||||
String ATTR_HEADER = ATTR_HEADER_PREFIX + "*";
|
||||
|
||||
List<String> STANDARD_ATTRIBUTES_LIST = Arrays.asList(new String[] {
|
||||
ATTR_ID, ATTR_SYMBOLIC_NAME, ATTR_LOCATION, ATTR_LAST_MODIFIED
|
||||
});
|
||||
|
||||
Map<String, String> STANDARD_ATTRIBUTES = MapUtils.putAll(new LinkedHashMap<>(), new String[][] {
|
||||
{ATTR_ID, "Bundle Id"},
|
||||
{ATTR_LOCATION, "Bundle location"},
|
||||
{ATTR_SYMBOLIC_NAME, "Bundle symbolic name"},
|
||||
{ATTR_LAST_MODIFIED, "Bundle last modified timestamp"},
|
||||
{ATTR_HEADER, "Bundle header value"}
|
||||
});
|
||||
}
|
||||
|
||||
public interface ServiceSearch {
|
||||
|
||||
String ATTR_ID = "service.id";
|
||||
String ATTR_OBJECT_CLASS = "objectClass";
|
||||
String ATTR_BUNDLE_ID = "service.bundleId";
|
||||
|
||||
|
||||
List<String> STANDARD_ATTRIBUTES_LIST = Arrays.asList(new String[] {
|
||||
ATTR_ID, ATTR_OBJECT_CLASS, ATTR_BUNDLE_ID
|
||||
});
|
||||
|
||||
Map<String, String> STANDARD_ATTRIBUTES = MapUtils.putAll(new LinkedHashMap<>(), new String[][] {
|
||||
{ATTR_ID, "Service Id"},
|
||||
{ATTR_OBJECT_CLASS, "Service object class"},
|
||||
{ATTR_BUNDLE_ID, "Service bundle id"}
|
||||
});
|
||||
}
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
BundleService bundleService;
|
||||
|
||||
protected BundleContext bundleContext;
|
||||
|
||||
@Activate
|
||||
public void activate(ComponentContext componentContext) {
|
||||
this.bundleContext = componentContext.getBundleContext();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> search(String targetType, Filter filter) throws IllegalArgumentException {
|
||||
if (TYPE_BUNDLE.equalsIgnoreCase(targetType))
|
||||
return searchBundles(filter);
|
||||
if (TYPE_SERVICE.equalsIgnoreCase(targetType))
|
||||
try {
|
||||
return searchServices(filter);
|
||||
} catch (InvalidSyntaxException e) {
|
||||
throw new IllegalArgumentException(String.format("Invalid filter: [%s]", filter.toString()));
|
||||
}
|
||||
|
||||
|
||||
throw new IllegalArgumentException(
|
||||
String.format("Provider [%s]: target type [%s] not supported", getProviderId(), targetType));
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, String> getStandardAttributes(String targetType) throws IllegalArgumentException {
|
||||
if (TYPE_BUNDLE.equalsIgnoreCase(targetType))
|
||||
return BundleSearch.STANDARD_ATTRIBUTES;
|
||||
|
||||
if (TYPE_SERVICE.equalsIgnoreCase(targetType))
|
||||
return ServiceSearch.STANDARD_ATTRIBUTES;
|
||||
|
||||
throw new IllegalArgumentException(
|
||||
String.format("Provider [%s]: target type [%s] not supported", getProviderId(), targetType));
|
||||
|
||||
}
|
||||
|
||||
protected List<Map<String, Object>> searchBundles(Filter filter) {
|
||||
List<Map<String, Object>> result = new ArrayList<>();
|
||||
for (Bundle b : bundleContext.getBundles()) {
|
||||
Map<String, Object> essence = getBundleEssence(b);
|
||||
if (filter.matches(essence))
|
||||
result.add(essence);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
protected Map<String, Object> getBundleEssence(Bundle bundle) {
|
||||
Map<String, Object> result = new LinkedHashMap<>();
|
||||
|
||||
BundleInfo bi = bundleService.getInfo(bundle);
|
||||
|
||||
result.put(BundleSearch.ATTR_ID, bundle.getBundleId());
|
||||
result.put(BundleSearch.ATTR_SYMBOLIC_NAME, bundle.getSymbolicName());
|
||||
result.put(BundleSearch.ATTR_LOCATION, bi.getUpdateLocation());
|
||||
result.put(BundleSearch.ATTR_LAST_MODIFIED, bundle.getLastModified());
|
||||
|
||||
|
||||
Dictionary<String, String> headers = bundle.getHeaders();
|
||||
Enumeration<String> keys = headers.keys();
|
||||
while (keys.hasMoreElements()) {
|
||||
String key = keys.nextElement();
|
||||
result.put(BundleSearch.ATTR_HEADER_PREFIX + key, headers.get(key));
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
protected List<Map<String, Object>> searchServices(Filter filter) throws InvalidSyntaxException {
|
||||
|
||||
ServiceReference<?>[] refs = bundleContext.getAllServiceReferences(null, filter.toString());
|
||||
|
||||
List<Map<String, Object>> result = new ArrayList<>();
|
||||
for (ServiceReference<?> ref : refs) {
|
||||
result.add(getServiceEssence(ref));
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
protected Map<String, Object> getServiceEssence(ServiceReference<?> ref) {
|
||||
Map<String, Object> result = new LinkedHashMap<>();
|
||||
|
||||
result.put(ServiceSearch.ATTR_ID, ref.getProperty(Constants.SERVICE_ID));
|
||||
Object refObjectClass = ref.getProperty(Constants.OBJECTCLASS);
|
||||
if (refObjectClass == null || !(refObjectClass instanceof String[]))
|
||||
result.put(ServiceSearch.ATTR_OBJECT_CLASS, "");
|
||||
else
|
||||
result.put(ServiceSearch.ATTR_OBJECT_CLASS, Arrays.asList((String[]) refObjectClass));
|
||||
|
||||
result.put(ServiceSearch.ATTR_BUNDLE_ID, ref.getBundle().getBundleId());
|
||||
|
||||
String[] keys = ref.getPropertyKeys();
|
||||
for (String key : keys)
|
||||
if (!ServiceSearch.STANDARD_ATTRIBUTES_LIST.contains(key))
|
||||
result.put(key, ref.getProperty(key));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* search-service
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
package ru.entaxy.platform.search.shell;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.apache.karaf.shell.api.action.Command;
|
||||
import org.apache.karaf.shell.api.action.lifecycle.Service;
|
||||
|
||||
import ru.entaxy.platform.base.support.karaf.shell.ShellTableExt;
|
||||
import ru.entaxy.platform.search.SearchProvider;
|
||||
import ru.entaxy.platform.search.shell.support.AbstractSearchCommand;
|
||||
|
||||
@Service
|
||||
@Command(scope = AbstractSearchCommand.COMMAND_SCOPE, name = "search-provider-list")
|
||||
public class ProvidersList extends AbstractSearchCommand {
|
||||
|
||||
@Override
|
||||
protected void doExecute() throws Exception {
|
||||
List<SearchProvider> list = searchService.getProviders();
|
||||
|
||||
ShellTableExt table = new ShellTableExt();
|
||||
table.column("Id");
|
||||
table.column("Supported types");
|
||||
|
||||
for (SearchProvider p : list)
|
||||
table.addRow().addContent(p.getProviderId(), p.getTargetTypes().stream().collect(Collectors.joining("\n")));
|
||||
|
||||
// print output
|
||||
table.print(System.out);
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,122 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* search-service
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
package ru.entaxy.platform.search.shell;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.apache.karaf.shell.api.action.Argument;
|
||||
import org.apache.karaf.shell.api.action.Command;
|
||||
import org.apache.karaf.shell.api.action.Option;
|
||||
import org.apache.karaf.shell.api.action.lifecycle.Service;
|
||||
|
||||
import ru.entaxy.platform.base.support.karaf.shell.RowExt;
|
||||
import ru.entaxy.platform.base.support.karaf.shell.ShellTableExt;
|
||||
import ru.entaxy.platform.search.shell.support.AbstractSearchCommand;
|
||||
import ru.entaxy.platform.search.shell.support.ObjectTypeAwareCommand;
|
||||
|
||||
@Service
|
||||
@Command(scope = AbstractSearchCommand.COMMAND_SCOPE, name = "search")
|
||||
public class Search extends ObjectTypeAwareCommand {
|
||||
|
||||
@Option(name = "-d", aliases = {"--display-attributes"})
|
||||
List<String> attributes = new ArrayList<>();
|
||||
|
||||
@Option(name = "-n", aliases = {"--attribute-names-only"})
|
||||
boolean attributeNamesOnly = false;
|
||||
|
||||
@Option(name = "-s", aliases = {"--no-split-lists"})
|
||||
boolean noSplitLists = false;
|
||||
|
||||
@Argument(index = 1, required = true)
|
||||
String filter;
|
||||
|
||||
@Override
|
||||
protected void doExecute() throws Exception {
|
||||
|
||||
if (attributeNamesOnly) {
|
||||
listAttributeNames();
|
||||
return;
|
||||
}
|
||||
|
||||
List<Map<String, Object>> result = searchService.search(type, filter);
|
||||
|
||||
ShellTableExt table = new ShellTableExt();
|
||||
table.splitLists(!noSplitLists);
|
||||
|
||||
if (!attributes.isEmpty()) {
|
||||
// fixed attributes
|
||||
|
||||
List<String> attrs = attributes.stream().distinct().collect(Collectors.toList());
|
||||
|
||||
for (String s : attrs)
|
||||
table.column(s);
|
||||
|
||||
for (Map<String, Object> essence : result) {
|
||||
RowExt row = table.addRow();
|
||||
List<Object> data = new ArrayList<>();
|
||||
for (String s : attrs)
|
||||
data.add(essence.getOrDefault(s, ""));
|
||||
row.addContent(data);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
List<String> attrs = result.stream().map(s -> s.keySet()).flatMap(ks -> ks.stream()).distinct()
|
||||
.collect(Collectors.toList());
|
||||
|
||||
for (String attr : attrs)
|
||||
table.column(attr);
|
||||
|
||||
for (Map<String, Object> essence : result) {
|
||||
RowExt row = table.addRow();
|
||||
|
||||
List<Object> data = new ArrayList<>();
|
||||
for (String s : attrs)
|
||||
data.add(essence.getOrDefault(s, ""));
|
||||
row.addContent(data);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// output
|
||||
table.print(System.out);
|
||||
|
||||
}
|
||||
|
||||
protected void listAttributeNames() throws Exception {
|
||||
List<String> list = searchService.getAttributes(type, filter);
|
||||
|
||||
// output
|
||||
for (String s : list)
|
||||
System.out.println(s);
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,57 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* search-service
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
package ru.entaxy.platform.search.shell;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.karaf.shell.api.action.Command;
|
||||
import org.apache.karaf.shell.api.action.lifecycle.Service;
|
||||
|
||||
import ru.entaxy.platform.base.support.karaf.shell.ShellTableExt;
|
||||
import ru.entaxy.platform.search.shell.support.ObjectTypeAwareCommand;
|
||||
import ru.entaxy.platform.search.shell.support.AbstractSearchCommand;
|
||||
|
||||
@Service
|
||||
@Command(name = "search-standard-atributes", scope = AbstractSearchCommand.COMMAND_SCOPE)
|
||||
public class StandardAttributes extends ObjectTypeAwareCommand {
|
||||
|
||||
@Override
|
||||
protected void doExecute() throws Exception {
|
||||
|
||||
ShellTableExt table = new ShellTableExt();
|
||||
|
||||
table.column("Attribute");
|
||||
table.column("Description");
|
||||
|
||||
for (Map.Entry<String, String> entry : searchService.getStandardAttributes(type).entrySet())
|
||||
table.addRow().addContent(entry.getKey(), entry.getValue());
|
||||
|
||||
// output
|
||||
table.print(System.out);
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* search-service
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
package ru.entaxy.platform.search.shell.support;
|
||||
|
||||
import org.apache.karaf.shell.api.action.Action;
|
||||
|
||||
public abstract class AbstractSearchCommand extends SearchServiceSupport implements Action {
|
||||
|
||||
public static final String COMMAND_SCOPE = "entaxy";
|
||||
|
||||
@Override
|
||||
public Object execute() throws Exception {
|
||||
|
||||
try {
|
||||
doExecute();
|
||||
} catch (Exception e) {
|
||||
|
||||
// output error
|
||||
System.err.println(String.format("ERROR: [%s]\n --> %s", e.getClass().getName(), e.getMessage()));
|
||||
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
abstract protected void doExecute() throws Exception;
|
||||
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* search-service
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
package ru.entaxy.platform.search.shell.support;
|
||||
|
||||
import org.apache.karaf.shell.api.action.Argument;
|
||||
import org.apache.karaf.shell.api.action.Completion;
|
||||
|
||||
public abstract class ObjectTypeAwareCommand extends AbstractSearchCommand {
|
||||
|
||||
@Argument(index = 0, required = true)
|
||||
@Completion(caseSensitive = false, value = ObjectTypeCompleter.class)
|
||||
public String type;
|
||||
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* search-service
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
package ru.entaxy.platform.search.shell.support;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.karaf.shell.api.action.lifecycle.Service;
|
||||
import org.apache.karaf.shell.api.console.CommandLine;
|
||||
import org.apache.karaf.shell.api.console.Completer;
|
||||
import org.apache.karaf.shell.api.console.Session;
|
||||
|
||||
@Service
|
||||
public class ObjectTypeCompleter extends SearchServiceSupport implements Completer {
|
||||
|
||||
@Override
|
||||
public int complete(Session session, CommandLine commandLine, List<String> candidates) {
|
||||
candidates.addAll(searchService.getProvidedTypes());
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* search-service
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
package ru.entaxy.platform.search.shell.support;
|
||||
|
||||
import org.apache.karaf.shell.api.action.lifecycle.Reference;
|
||||
|
||||
import ru.entaxy.platform.search.SearchService;
|
||||
|
||||
public class SearchServiceSupport {
|
||||
|
||||
@Reference
|
||||
public SearchService searchService;
|
||||
|
||||
}
|
Reference in New Issue
Block a user