release version 1.10.0

This commit is contained in:
2024-12-14 04:07:49 +03:00
parent a5088587f7
commit c6b3d793c4
1916 changed files with 254306 additions and 0 deletions

View 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. Если какое-либо положение настоящей Лицензии будет признано судом недействительным,
остальные положения будут продолжать своё действие, а Пользователь будет обязан продолжать
исполнять свои обязанности в соответствии с этими положениями.

View 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. Если какое-либо положение настоящей Лицензии будет признано судом недействительным,
остальные положения будут продолжать своё действие, а Пользователь будет обязан продолжать
исполнять свои обязанности в соответствии с этими положениями.

View File

@ -0,0 +1,49 @@
<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.core.objects-implementations</groupId>
<artifactId>config-implementation</artifactId>
<version>1.10.0</version>
</parent>
<groupId>ru.entaxy.esb.platform.runtime.core.objects-implementations.config-implementation</groupId>
<artifactId>config-runtime</artifactId>
<packaging>bundle</packaging>
<name>ENTAXY :: PLATFORM :: CORE :: OBJECTS IMPLEMENTATIONS :: CONFIG :: RUNTIME</name>
<description>ENTAXY :: PLATFORM :: CORE :: OBJECTS IMPLEMENTATIONS :: CONFIG :: RUNTIME</description>
<properties>
<bundle.osgi.export.pkg>ru.entaxy.platform.config.runtime</bundle.osgi.export.pkg>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.karaf.config</groupId>
<artifactId>org.apache.karaf.config.core</artifactId>
<version>${karaf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.configadmin</artifactId>
<version>${felix.configadmin.version}</version>
</dependency>
<dependency>
<groupId>
ru.entaxy.esb.platform.runtime.core.object-producing
</groupId>
<artifactId>object-producer-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.platform.runtime.core</groupId>
<artifactId>object-runtime-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commons-io.version}</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,163 @@
/*-
* ~~~~~~licensing~~~~~~
* config-runtime
* ==========
* Copyright (C) 2020 - 2024 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.config.runtime;
import java.io.IOException;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.osgi.framework.Constants;
import org.osgi.framework.ServiceReference;
import org.osgi.service.cm.Configuration;
import org.osgi.service.cm.ConfigurationAdmin;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ru.entaxy.platform.base.objects.EntaxyObject;
import ru.entaxy.platform.base.support.JSONUtils;
public class ConfigEntaxyObject implements EntaxyObject, ConfigEntaxyObjectWrapped {
private static final Logger LOG = LoggerFactory.getLogger(ConfigEntaxyObject.class);
protected EntaxyObject origin;
protected Map<String, Object> configurationMap = new HashMap<>();
public ConfigEntaxyObject(EntaxyObject entaxyObject) {
super();
this.origin = entaxyObject;
configurationMap.put(EntaxyObject.FIELDS.OBJECT_ID, origin.getId());
configurationMap.put(EntaxyObject.FIELDS.OBJECT_TYPE, origin.getType());
configurationMap.put(EntaxyObject.FIELDS.FACTORY_ID, origin.getFactoryId());
}
@Override
public EntaxyObject getOrigin() {
return this.origin;
}
@Override
public String getId() {
return origin.getId();
}
@Override
public String getType() {
return origin.getType();
}
@Override
public String getDisplayName() {
return origin.getDisplayName();
}
@Override
public String getScope() {
return origin.getScope();
}
@Override
public String getOwner() {
return origin.getOwner();
}
@Override
public String getFactoryId() {
return origin.getFactoryId();
}
@Override
public BundleInfo getBundleInfo() {
return origin.getBundleInfo();
}
@Override
public String getConfiguration() {
ServiceReference<ConfigurationAdmin> ref =
ObjectConfigHelper.getInstance().getReference(ConfigurationAdmin.class);
if (ref != null) {
ConfigurationAdmin configurationAdmin = ObjectConfigHelper.getInstance().getService(ref);
Map<String, Object> properties = new HashMap<>();
try {
Configuration config = configurationAdmin.getConfiguration(getId(), "?");
Enumeration<String> keys = config.getProperties().keys();
while (keys.hasMoreElements()) {
String key = keys.nextElement();
properties.put(key, config.getProperties().get(key));
}
properties.remove("felix.fileinstall.filename");
properties.remove(Constants.SERVICE_PID);
properties.remove(ConfigurationAdmin.SERVICE_FACTORYPID);
configurationMap.put(EntaxyObject.FIELDS.PROPERTIES, properties);
return JSONUtils.GSON.toJsonTree(configurationMap).toString();
} catch (IOException e) {
LOG.error("Error reading configuration [" + getId() + "]", e);
} finally {
ObjectConfigHelper.getInstance().ungetService(ref);
}
}
return origin.getConfiguration();
}
@Override
public boolean isProvided() {
return origin.isProvided();
}
@Override
public boolean isComplete() {
return origin.isComplete();
}
@Override
public boolean isGhost() {
return origin.isGhost();
}
@Override
public List<Relation> getRelations() {
return origin.getRelations();
}
@Override
public List<Relation> getIncomingRelations() {
return origin.getIncomingRelations();
}
}

View File

@ -0,0 +1,32 @@
/*-
* ~~~~~~licensing~~~~~~
* config-runtime
* ==========
* Copyright (C) 2020 - 2024 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.config.runtime;
import ru.entaxy.platform.base.objects.EntaxyObject;
public interface ConfigEntaxyObjectWrapped {
EntaxyObject getOrigin();
}

View File

@ -0,0 +1,588 @@
/*-
* ~~~~~~licensing~~~~~~
* object-producing-config-support
* ==========
* Copyright (C) 2020 - 2024 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.config.runtime;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Base64;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.regex.Pattern;
import org.apache.felix.utils.properties.TypedProperties;
import org.osgi.framework.ServiceReference;
import org.osgi.service.cm.Configuration;
import org.osgi.service.cm.ConfigurationAdmin;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonElement;
import ru.entaxy.platform.base.objects.EntaxyObject;
import ru.entaxy.platform.base.objects.factory.EntaxyFactory;
import ru.entaxy.platform.base.objects.factory.EntaxyFactory.FieldInfo;
import ru.entaxy.platform.base.objects.factory.EntaxyFactory.OutputInfo;
import ru.entaxy.platform.base.support.CommonUtils;
import ru.entaxy.platform.base.support.JSONUtils;
import ru.entaxy.platform.core.producer.api.EntaxyProducerService;
import ru.entaxy.platform.core.producer.api.EntaxyProducerUtils;
public class ObjectConfig {
private static final Logger log = LoggerFactory.getLogger(ObjectConfig.class);
public static final String CONFIG_OBJECT_TYPE = "entaxy.runtime.config";
public static final String TARGET_FACTORY_FIELD_NAME = "targetObjectFactoryId";
public static final String TARGET_TYPE_FIELD_NAME = "targetObjectType";
public static final String TARGET_ID_FIELD_NAME = "targetObjectId";
public static final String TARGET_OUTPUT_FIELD_NAME = "targetObjectOutput";
public static final String CONFIG_PROPERTIES_FIELD_NAME = "configuredProperties";
public static final String CONFIG_FACTORY_FIELD_NAME = "__entaxy_configuredFactoryId";
public static final String CONFIG_TYPE_FIELD_NAME = "__entaxy_configuredType";
public static final String CONFIG_ID_FIELD_NAME = "__entaxy_configuredId";
public static final String CONFIG_OUTPUT_FIELD_NAME = "__entaxy_configuredOutput";
public static final String CONFIG_HINT_FIELD_NAME = "__entaxy_config_hint";
public static final List<String> CONFIG_INTERNAL_FIELDS = Arrays.asList(new String[] {CONFIG_FACTORY_FIELD_NAME,
CONFIG_TYPE_FIELD_NAME, CONFIG_ID_FIELD_NAME, CONFIG_OUTPUT_FIELD_NAME, CONFIG_HINT_FIELD_NAME});
public static final String CONFIG_PID_FIELD_NAME = "configurationPid";
public static final String CONFIG_PLACEHOLDER_PREFIX_FIELD_NAME = "placeholderPrefix";
@Deprecated
public static final String CONFIG_FIELD_NAME = "##config";
public static final String CONFIG_DEFAULTS_FIELD_NAME = "##config";
public static final String CONFIG_LINK_FIELD_NAME = "##config-link";
public static final String CONFIGURABLE_ATTRIBUTE_NAME = "configurable";
public static final String DEFAULT_FIELDS_CONFIGURABLE_ATTRIBUTE_NAME = "fieldsConfigurableByDefault";
public static final String CONFIGURABLE_FIELDS_ATTRIBUTE_NAME = "configurableFields";
public static final String PROPERTIES_BACKUP_FIELD = EntaxyObject.FIELDS.PROPERTIES + "_backup";
public static final String DIRECT_VALUE_ONLY_ATTR_NAME = "directValueOnly";
public static final String CONFIGURABLES_FIELD_NAME = "configurables";
public static final String IMMUTABLES_FIELD_NAME = "immutables";
public static final String HEADER_OBJECT_CONFIG_PID = "Entaxy-Generated-Object-Config-Pid";
protected static Gson GSON = new GsonBuilder().create();
public static String getConfigurationPid(String objectId, String type) {
return reduceType(type) + "." + objectId.replace("-", "_");
}
public static String reduceType(String type) {
return type
// .replace(EntaxyObject.OBJECT_TYPES.ENTAXY_RUNTIME_TYPE_PREFIX, "e_r_")
.replace("-", "_");
}
public static String getConfigurationPrefix(String objectId, String type) {
return "$" + getConfigurationPid(objectId, type) + "{";
}
public static boolean isConfigurable(EntaxyFactory factory, String outputType, String fieldName,
boolean defaultFieldsConfigurable, List<ConfigurableFieldsConfiguration> configurations) {
Optional<FieldInfo> fi = factory.getOutputByType(outputType).getFields().stream()
.filter(f -> f.getName().equals(fieldName)).findFirst();
if (!fi.isPresent())
return false;
boolean fieldIsConfigurable = defaultFieldsConfigurable;
try {
fieldIsConfigurable = fi.get().getJsonOrigin().get(CONFIGURABLE_ATTRIBUTE_NAME).getAsBoolean();
} catch (Exception e) {
// usinf default value
}
if (!fieldIsConfigurable)
return false;
for (ConfigurableFieldsConfiguration cfc : configurations)
if (cfc.isConfigurable(factory, outputType, fieldName))
return true;
return false;
}
public static void backupProperties(Map<String, Object> parameters) {
backupProperties(parameters, EntaxyObject.FIELDS.PROPERTIES);
}
@SuppressWarnings("unchecked")
public static void backupProperties(Map<String, Object> parameters, String fieldName) {
if (!parameters.containsKey(fieldName))
return;
Map<String, Object> backup = new HashMap<>();
backup.putAll((Map<String, Object>) parameters.get(fieldName));
parameters.put(ObjectConfig.PROPERTIES_BACKUP_FIELD, backup);
}
public static void restoreBackupProperties(Map<String, Object> parameters) {
restoreBackupProperties(parameters, EntaxyObject.FIELDS.PROPERTIES);
}
public static void restoreBackupProperties(Map<String, Object> parameters, String fieldName) {
if (!parameters.containsKey(ObjectConfig.PROPERTIES_BACKUP_FIELD))
return;
parameters.put(fieldName, parameters.get(ObjectConfig.PROPERTIES_BACKUP_FIELD));
}
public static void removeConfigData(Map<String, Object> parameters) {
removeConfigData(parameters, EntaxyObject.FIELDS.PROPERTIES);
}
@SuppressWarnings("unchecked")
public static void removeConfigData(Map<String, Object> parameters, String fieldName) {
if (!parameters.containsKey(fieldName))
return;
((Map<String, Object>) parameters.get(fieldName)).remove(CONFIG_FIELD_NAME);
}
public static Map<String, Object> getTargetConfigMap(EntaxyFactory factory, String outputType, String fieldName,
Map<String, Object> configurables, Map<String, Object> immutables) {
/*
Optional<FieldInfo> fi = factory.getOutputByType(outputType).getFields().stream().filter(f -> f.getName().equals(fieldName)).findFirst();
if (!fi.isPresent()) {
log.debug("FIELD NOT FOUND: " + fieldName);
return null;
}
FieldInfo field = fi.get();
boolean isConfigurable = true;
log.debug("\n FIELDNAME:: " + fieldName + " -> " + field.getJsonOrigin());
if (field.getJsonOrigin().has(CONFIGURABLE_ATTRIBUTE_NAME))
try {
isConfigurable = field.getJsonOrigin().get(CONFIGURABLE_ATTRIBUTE_NAME).getAsBoolean();
} catch (Exception e) {
isConfigurable = true;
}
if (!isConfigurable) {
log.debug("FIELD NOT CONFIGURABLE: " + fieldName);
return null;
}
*/
Optional<FieldInfo> fi = factory.getOutputByType(outputType).getFields().stream()
.filter(f -> f.getName().equals(fieldName)).findFirst();
if (!fi.isPresent()) {
log.debug("FIELD NOT FOUND: " + fieldName);
return null;
}
FactoryOutputConfiguration conf = FactoryOutputConfiguration.read(factory, outputType);
if (!isConfigurable(factory, outputType, fieldName, conf.defaultFieldsConfigurable, conf.configurations))
return null;
FieldInfo field = fi.get();
if (field.isImmutable())
return immutables;
return configurables;
}
public static String getConfiguredObjectId(String pid) {
ServiceReference<ConfigurationAdmin> ref = null;
try {
ref =
ObjectConfigHelper.getInstance().getReference(ConfigurationAdmin.class);
ConfigurationAdmin configurationAdmin = ObjectConfigHelper.getInstance().getService(ref);
Configuration configuration = configurationAdmin.getConfiguration(pid, "?");
if (configuration == null)
return null;
String configuredId = configuration.getProperties().get(CONFIG_ID_FIELD_NAME).toString();
String configuredType = configuration.getProperties().get(CONFIG_TYPE_FIELD_NAME).toString();
if (!CommonUtils.isValid(configuredId) || !CommonUtils.isValid(configuredType))
return null;
return configuredId + ":" + configuredType;
} catch (Exception e) {
return null;
} finally {
ObjectConfigHelper.getInstance().ungetService(ref);
}
}
public static class FactoryOutputConfiguration {
public static FactoryOutputConfiguration read(EntaxyFactory factory, String outputType) {
FactoryOutputConfiguration result = new FactoryOutputConfiguration();
OutputInfo oi = factory.getOutputByType(outputType);
if (oi == null)
oi = factory.getDefaultOutput();
Map<String, Object> outputConfig = oi.getConfig();
result.isConfigurable = false;
try {
result.isConfigurable = (Boolean) outputConfig.get(ObjectConfig.CONFIGURABLE_ATTRIBUTE_NAME);
} catch (Exception e) {
log.trace("Parameter [{}] not found in [{}]:[{}]", ObjectConfig.CONFIGURABLE_ATTRIBUTE_NAME,
factory.getId(), outputType);
}
if (!result.isConfigurable)
return result;
result.defaultFieldsConfigurable = false;
try {
result.defaultFieldsConfigurable =
(Boolean) outputConfig.get(ObjectConfig.DEFAULT_FIELDS_CONFIGURABLE_ATTRIBUTE_NAME);
} catch (Exception e) {
log.trace("Parameter [{}] not found in [{}]:[{}]",
ObjectConfig.DEFAULT_FIELDS_CONFIGURABLE_ATTRIBUTE_NAME, factory.getId(), outputType);
}
result.configurations = new ArrayList<>();
Object configuration = outputConfig.get(ObjectConfig.CONFIGURABLE_FIELDS_ATTRIBUTE_NAME);
if (configuration != null) {
if (configuration instanceof List) {
List configList = (List) configuration;
for (Object configItem : configList) {
if (configItem instanceof Map) {
ObjectConfig.ConfigurableFieldsConfiguration cnf =
ObjectConfig.ConfigurableFieldsConfiguration.read((Map) configItem);
result.configurations.add(cnf);
}
}
} else if (configuration instanceof Map) {
ObjectConfig.ConfigurableFieldsConfiguration cnf =
ObjectConfig.ConfigurableFieldsConfiguration.read((Map) configuration);
result.configurations.add(cnf);
}
} else {
result.configurations.add(new ObjectConfig.ConfigurableFieldsConfiguration());
}
return result;
}
public boolean isConfigurable;
public boolean defaultFieldsConfigurable;
public List<ConfigurableFieldsConfiguration> configurations;
}
public static class ConfigurableFieldsConfiguration {
public static ConfigurableFieldsConfiguration read(Map parameters) {
JsonElement obj = GSON.toJsonTree(parameters);
if (obj.isJsonObject()) {
ConfigurableFieldsConfiguration result = GSON.fromJson(obj, ConfigurableFieldsConfiguration.class);
return result;
}
return null;
}
List<String> includeNames = new ArrayList<>();
List<String> includePatterns = new ArrayList<>();
List<String> excludeNames = new ArrayList<>();
List<String> excludePatterns = new ArrayList<>();
List<String> includeTypes = new ArrayList<>();
List<String> excludeTypes = new ArrayList<>();
public ConfigurableFieldsConfiguration() {
includeTypes.add("string");
includeTypes.add("boolean");
includeTypes.add("number");
includePatterns.add("*");
}
public boolean isConfigurable(EntaxyFactory factory, String outputType, String fieldName) {
Optional<FieldInfo> fi = factory.getOutputByType(outputType).getFields().stream()
.filter(f -> f.getName().equals(fieldName)).findFirst();
if (!fi.isPresent())
return false;
String fieldType = fi.get().getType().toLowerCase();
boolean fieldIsExcluded = false;
for (String name : excludeNames)
if (fieldName.equals(name)) {
fieldIsExcluded = true;
break;
}
if (!fieldIsExcluded) {
for (String pattern : excludePatterns) {
if (Pattern.matches(EntaxyProducerUtils.toRegexPattern(pattern), fieldName)) {
fieldIsExcluded = true;
break;
}
}
}
if (!fieldIsExcluded) {
for (String type : excludeTypes)
if (type.equals(fieldType)) {
fieldIsExcluded = true;
break;
}
}
if (fieldIsExcluded)
return false;
boolean fieldIsIncluded = false;
// first we check types
if (!fieldIsIncluded) {
for (String type : includeTypes)
if (type.equals(fieldType)) {
fieldIsIncluded = true;
break;
}
}
if (!fieldIsIncluded)
return false;
if (!includeNames.isEmpty() || !includePatterns.isEmpty())
fieldIsIncluded = false;
for (String name : includeNames)
if (fieldName.equals(name)) {
fieldIsIncluded = true;
break;
}
if (!fieldIsIncluded) {
for (String pattern : includePatterns) {
if (Pattern.matches(EntaxyProducerUtils.toRegexPattern(pattern), fieldName)) {
fieldIsIncluded = true;
break;
}
}
}
return fieldIsIncluded;
}
}
public static class ConfigHint {
public static final String CONFIG_HINT_SECTION_FIELDS = "fields";
protected Map<String, Object> configHint = new HashMap<>();
public Map<String, Object> getAsMap() {
return configHint;
}
public JsonElement getAsJson() {
return JSONUtils.GSON.toJsonTree(configHint);
}
public String getAsJsonString() {
return getAsJson().toString();
}
public void generate(Map<String, Object> configProperties, String factoryId, String outputType) {
Map<String, Object> fieldsHint = generateFieldsHint(configProperties, factoryId, outputType);
if (fieldsHint != null)
configHint.put(CONFIG_HINT_SECTION_FIELDS, fieldsHint);
}
public void readFrom(TypedProperties typedProperties) {
if (typedProperties.containsKey(CONFIG_HINT_FIELD_NAME)) {
String encoded = typedProperties.get(CONFIG_HINT_FIELD_NAME).toString();
String hintString = new String(Base64.getDecoder().decode(encoded));
read(hintString);
}
}
public void read(String hintString) {
this.configHint = JSONUtils.element2map(JSONUtils.getJsonRootObject(hintString));
}
protected Map<String, Object> generateFieldsHint(Map<String, Object> configProperties, String factoryId,
String outputType) {
Map<String, Object> result = new HashMap<>();
try {
ServiceReference<EntaxyProducerService> ref =
ObjectConfigHelper.getInstance().getReference(EntaxyProducerService.class);
if (ref != null) {
EntaxyProducerService entaxyProducerService = ObjectConfigHelper.getInstance().getService(ref);
EntaxyFactory factory = entaxyProducerService.findFactoryById(factoryId);
if (factory == null) {
log.error("Factory not found: [{}]", factoryId);
return null;
}
OutputInfo outputInfo = null;
if (CommonUtils.isValid(outputType)) {
outputInfo = factory.getOutputByType(outputType);
} else {
outputInfo = factory.getDefaultOutput();
}
if (outputInfo == null) {
log.error("Output [{}] not found in factory [{}]", outputType, factoryId);
return null;
}
for (FieldInfo fi : outputInfo.getFields()) {
if (configProperties.containsKey(fi.getName())) {
ConfigFieldHint fieldHint = ConfigFieldHint.create(fi);
result.put(fieldHint.getName(), (Map<String, Object>) fieldHint);
}
}
ObjectConfigHelper.getInstance().ungetService(ref);
for (String name : ObjectConfig.CONFIG_INTERNAL_FIELDS) {
ConfigFieldHint fieldHint = new ConfigFieldHint(name);
fieldHint.setInternal(true);
result.put(name, (Map<String, Object>) fieldHint);
}
}
return result;
} catch (Exception e) {
return null;
}
}
public Map<String, ConfigFieldHint> getFieldsHint() {
if (configHint.containsKey(CONFIG_HINT_SECTION_FIELDS)) {
Object obj = configHint.get(CONFIG_HINT_SECTION_FIELDS);
if (obj instanceof Map) {
Map<String, Object> fieldHints = (Map<String, Object>) obj;
Map<String, ConfigFieldHint> result = new HashMap<>();
for (String name : fieldHints.keySet()) {
ConfigFieldHint fieldHint = new ConfigFieldHint(name);
fieldHint.load((Map<String, Object>) fieldHints.get(name));
result.put(name, fieldHint);
}
return result;
}
}
return new HashMap<>();
}
}
public static class ConfigFieldHint extends HashMap<String, Object> {
private static final long serialVersionUID = 1L;
public static final String CONFIG_FIELD_IS_INTERNAL = "isInternal";
public static ConfigFieldHint create(FieldInfo fieldInfo) {
ConfigFieldHint result = new ConfigFieldHint(fieldInfo.getName());
result.setType(fieldInfo.getType());
result.setDisplayName(fieldInfo.getDisplayName());
result.setDescription(fieldInfo.getDescription());
result.setInternal(false);
return result;
}
public ConfigFieldHint(String name) {
super();
setName(name);
}
String name;
public void load(Map<String, Object> data) {
this.putAll(data);
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDisplayName() {
Object displayName = getOrDefault(EntaxyFactory.CONFIGURATION.FIELDS.ATTRIBUTES.FIELD_DISPLAY_NAME, "");
return displayName != null ? displayName.toString() : "";
}
public void setDisplayName(String displayName) {
put(EntaxyFactory.CONFIGURATION.FIELDS.ATTRIBUTES.FIELD_DISPLAY_NAME, displayName);
}
public String getType() {
return getOrDefault(EntaxyFactory.CONFIGURATION.FIELDS.ATTRIBUTES.FIELD_TYPE, "String").toString();
}
public void setType(String type) {
put(EntaxyFactory.CONFIGURATION.FIELDS.ATTRIBUTES.FIELD_TYPE, type);
}
public String getDescription() {
return getOrDefault(EntaxyFactory.CONFIGURATION.FIELDS.ATTRIBUTES.FIELD_DESCRIPTION, "").toString();
}
public void setDescription(String description) {
put(EntaxyFactory.CONFIGURATION.FIELDS.ATTRIBUTES.FIELD_DESCRIPTION, description);
}
public boolean isInternal() {
return (Boolean) getOrDefault(CONFIG_FIELD_IS_INTERNAL, false);
}
public void setInternal(boolean isInternal) {
put(CONFIG_FIELD_IS_INTERNAL, isInternal);
}
}
}

View File

@ -0,0 +1,55 @@
/*-
* ~~~~~~licensing~~~~~~
* config-runtime
* ==========
* Copyright (C) 2020 - 2024 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.config.runtime;
import org.osgi.service.component.annotations.Component;
import ru.entaxy.platform.base.objects.EntaxyObject;
import ru.entaxy.platform.objects.runtime.EntaxyObjectCustomizer;
@Component(service = EntaxyObjectCustomizer.class, immediate = true)
public class ObjectConfigCustomizer implements EntaxyObjectCustomizer {
@Override
public boolean isAccepted(EntaxyObject entaxyObject) {
return entaxyObject.getType().equals(ObjectConfig.CONFIG_OBJECT_TYPE);
}
@Override
public EntaxyObject applyCustomization(EntaxyObject entaxyObject) {
if (entaxyObject instanceof ConfigEntaxyObjectWrapped)
return entaxyObject;
return new ConfigEntaxyObject(entaxyObject);
}
@Override
public EntaxyObject unapplyCustomization(EntaxyObject entaxyObject) {
if (entaxyObject instanceof ConfigEntaxyObjectWrapped)
return ((ConfigEntaxyObjectWrapped) entaxyObject).getOrigin();
return entaxyObject;
}
}

View File

@ -0,0 +1,209 @@
/*-
* ~~~~~~licensing~~~~~~
* config-runtime
* ==========
* Copyright (C) 2020 - 2024 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.config.runtime;
import java.io.File;
import java.io.IOException;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.math.NumberUtils;
import org.apache.felix.utils.properties.TypedProperties;
import org.osgi.framework.Constants;
import org.osgi.framework.ServiceReference;
import org.osgi.service.cm.Configuration;
import org.osgi.service.cm.ConfigurationAdmin;
import ru.entaxy.platform.base.support.CommonUtils;
import ru.entaxy.platform.config.runtime.ObjectConfig.ConfigFieldHint;
public class ObjectConfigEditor {
public static ObjectConfigEditor create(File configFile) throws IOException {
return new ObjectConfigEditor(configFile);
}
protected String pid;
protected File configFile;
protected TypedProperties loadedProperties;
protected ObjectConfig.ConfigHint configHint = new ObjectConfig.ConfigHint();
protected TypedProperties modifiedProperties = new TypedProperties();
protected Map<String, Object> currentProperties = new HashMap<>();
protected Map<String, ObjectConfig.ConfigFieldHint> fieldHints = new HashMap<>();
protected ObjectConfigEditor(File configFile) throws IOException {
super();
this.configFile = configFile;
loadedProperties = new TypedProperties();
loadedProperties.load(configFile);
configHint.readFrom(loadedProperties);
fieldHints = configHint.getFieldsHint();
}
public void loadCurrent(String pid) throws Exception {
ServiceReference<ConfigurationAdmin> ref = null;
try {
ref = ObjectConfigHelper.getInstance().getReference(ConfigurationAdmin.class);
ConfigurationAdmin configurationAdmin = ObjectConfigHelper.getInstance().getService(ref);
int pos = pid.indexOf('~');
if (pos >= 0) {
pid = pid.substring(0, pos);
}
Configuration configuration = configurationAdmin.getConfiguration(pid, "?");
currentProperties.clear();
if (configuration.getProperties() == null) {
return;
}
Enumeration<String> keys = configuration.getProperties().keys();
while (keys.hasMoreElements()) {
String key = keys.nextElement();
currentProperties.put(key, configuration.getProperties().get(key));
}
} finally {
if (ref != null)
ObjectConfigHelper.getInstance().ungetService(ref);
}
}
public boolean isDirty() {
return !modifiedProperties.isEmpty();
}
public Set<String> getPropertiesNames() {
Set<String> result = new HashSet<>();
result.addAll(loadedProperties.keySet());
result.addAll(currentProperties.keySet());
// remove hint field itself
result.remove(ObjectConfig.CONFIG_HINT_FIELD_NAME);
// remove felix property
result.remove("felix.fileinstall.filename");
// remove osgi properties
result.remove(Constants.SERVICE_PID);
return result;
}
public ConfigProperty getAsConfigProperty(String name) {
if (!getPropertiesNames().contains(name))
return null;
ConfigProperty result = new ConfigProperty(name);
if (loadedProperties.containsKey(name))
result.configValue = loadedProperties.get(name);
if (currentProperties.containsKey(name))
result.currentValue = currentProperties.get(name);
if (modifiedProperties.containsKey(name))
result.modifiedValue = modifiedProperties.get(name);
if (fieldHints.containsKey(name))
result.hint = fieldHints.get(name);
return result;
}
public void setValue(String propertyName, String propertyValue) throws Exception {
if (!loadedProperties.containsKey(propertyName) && !currentProperties.containsKey(propertyName))
throw new IllegalArgumentException("Unknown property: [" + propertyName + "]");
ConfigProperty property = getAsConfigProperty(propertyName);
String dataType = CommonUtils.getValid(property.hint.getType(), "string").toLowerCase();
Object valueToSet = propertyValue;
if ("boolean".equals(dataType)) {
try {
valueToSet = Boolean.parseBoolean(propertyValue);
} catch (Exception e) {
valueToSet = Boolean.FALSE;
}
} else if ("number".equals(valueToSet)) {
try {
valueToSet = NumberUtils.createNumber(propertyValue);
} catch (Exception e) {
valueToSet = 0;
}
}
modifiedProperties.put(propertyName, valueToSet);
}
public File getConfigFile() {
return configFile;
}
public void save() throws IOException {
if (!isDirty())
return;
loadedProperties.putAll(modifiedProperties);
loadedProperties.save(configFile);
}
public void clear() {
FileUtils.deleteQuietly(configFile);
}
public String getPid() {
return pid;
}
public void setPid(String pid) {
this.pid = pid;
}
public static class ConfigProperty {
public ConfigFieldHint hint;
public Object configValue = null;
public Object currentValue = null;
public Object modifiedValue = null;
public String name;
public ConfigProperty(String name) {
this.name = name;
this.hint = new ConfigFieldHint(name);
}
public boolean isDirty() {
return modifiedValue != null;
}
}
}

View File

@ -0,0 +1,100 @@
/*-
* ~~~~~~licensing~~~~~~
* object-producing-config-support
* ==========
* Copyright (C) 2020 - 2024 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.config.runtime;
import org.osgi.framework.BundleContext;
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.Deactivate;
import org.osgi.service.component.annotations.Reference;
import org.osgi.service.component.annotations.ReferenceCardinality;
import ru.entaxy.platform.base.objects.EntaxyObject;
import ru.entaxy.platform.base.objects.EntaxyObjectService;
import ru.entaxy.platform.core.producer.executor.objectmodel.FactoredObjectRef;
@Component(service = ObjectConfigHelper.class, immediate = true)
public class ObjectConfigHelper {
private static ObjectConfigHelper _INSTANCE = null;
public static ObjectConfigHelper getInstance() {
return _INSTANCE;
}
@Reference(cardinality = ReferenceCardinality.MANDATORY)
EntaxyObjectService entaxyObjectService;
public BundleContext bundleContext;
public ObjectConfigHelper() {
super();
_INSTANCE = this;
}
@Activate
public void activate(ComponentContext componentContext) {
this.bundleContext = componentContext.getBundleContext();
}
@Deactivate
public void deactivate() {
}
public EntaxyObject findObject(String objectId, String objectType) {
return entaxyObjectService.findObject(objectId, objectType);
}
public boolean isDirectValueOnly(FactoredObjectRef ref) {
if (!ref.origin.has(ObjectConfig.DIRECT_VALUE_ONLY_ATTR_NAME))
return false;
try {
return ref.origin.get(ObjectConfig.DIRECT_VALUE_ONLY_ATTR_NAME).getAsBoolean();
} catch (Exception e) {
return false;
}
}
public <S> ServiceReference<S> getReference(Class<S> clazz) {
if (bundleContext == null)
return null;
return bundleContext.getServiceReference(clazz);
}
public <T> T getService(ServiceReference<T> ref) {
return (T) bundleContext.getService(ref);
}
public void ungetService(ServiceReference<?> ref) {
if (bundleContext == null)
return;
bundleContext.ungetService(ref);
}
}

View File

@ -0,0 +1,16 @@
<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.core</groupId>
<artifactId>objects-implementations</artifactId>
<version>1.10.0</version>
</parent>
<groupId>ru.entaxy.esb.platform.runtime.core.objects-implementations</groupId>
<artifactId>config-implementation</artifactId>
<packaging>pom</packaging>
<name>ENTAXY :: PLATFORM :: CORE :: OBJECTS IMPLEMENTATIONS :: CONFIG</name>
<description>ENTAXY :: PLATFORM :: CORE :: OBJECTS IMPLEMENTATIONS :: CONFIG</description>
<modules>
<module>config-runtime</module>
</modules>
</project>

View File

@ -0,0 +1,130 @@
/*-
* ~~~~~~licensing~~~~~~
* file-adapter
* ==========
* Copyright (C) 2020 - 2024 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.runtime.connections.ftps;
import org.apache.camel.ExtendedCamelContext;
import org.apache.camel.component.file.GenericFileEndpoint;
import org.apache.camel.component.file.remote.FtpsComponent;
import org.apache.camel.spi.PropertyConfigurer;
import org.apache.commons.net.ftp.FTPFile;
import ru.entaxy.platform.base.support.CommonUtils;
import java.util.Map;
public class FtpsConnectionComponent extends FtpsComponent {
private static final String COMPONENT_CONFIGURER = "ftps-component-configurer";
private static final String ENDPOINT_CONFIGURER = "ftps-endpoint-configurer";
private static final String PATH_PLACEHOLDER = "PATH_PLACEHOLDER";
protected String username = "";
protected String password = "";
protected String host = "";
protected String port = "";
protected String directoryName = "";
private volatile PropertyConfigurer componentPropertyConfigurerLocal;
private volatile PropertyConfigurer endpointPropertyConfigurerLocal;
@Override
protected void doBuild() {
componentPropertyConfigurerLocal = getCamelContext().adapt(ExtendedCamelContext.class).getConfigurerResolver()
.resolvePropertyConfigurer(COMPONENT_CONFIGURER, getCamelContext());
log.debug("componentPropertyConfigurerLocal: {}", componentPropertyConfigurerLocal);
endpointPropertyConfigurerLocal = getCamelContext().adapt(ExtendedCamelContext.class).getConfigurerResolver()
.resolvePropertyConfigurer(ENDPOINT_CONFIGURER, getCamelContext());
log.debug("endpointPropertyConfigurerLocal: {}", endpointPropertyConfigurerLocal);
}
protected GenericFileEndpoint<FTPFile> createEndpoint(String uri, String remaining, Map<String, Object> parameters)
throws Exception {
// doBuild method called to force configurer initialization (doBuild not invoked in some scenario)
doBuild();
uri = uri.replace(PATH_PLACEHOLDER, buildPath());
log.debug("CREATING ENDPOINT FOR [{}]", uri);
if (CommonUtils.isValid(username)) {
parameters.put("username", username);
}
if (CommonUtils.isValid(password)) {
parameters.put("password", password);
}
return super.createEndpoint(uri, remaining, parameters);
}
private String buildPath() {
StringBuilder path = new StringBuilder();
if (CommonUtils.isValid(host)) {
path.append(host.trim());
}
if (CommonUtils.isValid(port)) {
path.append(":");
path.append(port.trim());
}
if (CommonUtils.isValid(directoryName)) {
if (!directoryName.startsWith("/")) {
path.append("/");
}
path.append(directoryName.trim());
}
return path.toString();
}
public void setUsername(String username) {
this.username = username;
}
public void setPassword(String password) {
this.password = password;
}
public void setHost(String host) {
this.host = host;
}
public void setPort(String port) {
this.port = port;
}
public void setDirectoryName(String directoryName) {
this.directoryName = directoryName;
}
@Override
public PropertyConfigurer getComponentPropertyConfigurer() {
return componentPropertyConfigurerLocal;
}
@Override
public PropertyConfigurer getEndpointPropertyConfigurer() {
return endpointPropertyConfigurerLocal;
}
}

View File

@ -0,0 +1,9 @@
[#ftl]
<bean id="[=objectId]" class="ru.entaxy.platform.runtime.connections.ftps.FtpsConnectionComponent">
[=utils.createBeanProperties(properties, "camel_", true)]
[#if properties.username??]<property name="username" value="[=properties.username]"/>[/#if]
[#if properties.password??]<property name="password" value="[=properties.password]"/>[/#if]
<property name="host" value="[=properties.host]"/>
[#if properties.port??]<property name="port" value="[=properties.port]"/>[/#if]
[#if properties.directoryName??]<property name="directoryName" value="[=properties.directoryName]"/>[/#if]
</bean>

View File

@ -0,0 +1,19 @@
[#ftl attributes={"generated.type":"blueprint"}]
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
xsi:schemaLocation="
http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd"
>
[#import "templates:object-commons/common-utils.ftl" as utils]
[#include "templates:ftps-connection/init.body.ftl"]
<service interface="org.apache.camel.Component" ref="[=objectId]">
<service-properties>
<entry key="connection.name" value="[=objectId]"/>
</service-properties>
</service>
</blueprint>

View File

@ -0,0 +1,3 @@
[#ftl attributes={"generated.type":"blueprint.fragment"}]
[#import "templates:object-commons/common-utils.ftl" as utils]
[#include "templates:ftps-connection/init.body.ftl"]

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<route>
<from uri="direct:pre-route" />
<setProperty name="NTX_connector_preRouted">
<constant>true</constant>
</setProperty>
</route>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<route>
<pre-output-start />
<setProperty name="NTX_connector_preOutput">
<constant>true</constant>
</setProperty>
</route>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<route>
<response-route-start />
<log message="Response processed" loggingLevel="INFO" />
</route>

View File

@ -0,0 +1,31 @@
[#ftl attributes={"generated.type":"blueprint.fragment"}]
<errorHandlerRef>[=properties.errorHandlerType]</errorHandlerRef>
<errorHandler id="NoErrorHandler" type="NoErrorHandler"/>
<errorHandler id="DefaultErrorHandler" type="DefaultErrorHandler" redeliveryPolicyRef="redeliveryPolicyProfileBean"/>
<errorHandler id="DeadLetterChannel" type="DeadLetterChannel" deadLetterUri="[=properties.deadLetterUri]" redeliveryPolicyRef="redeliveryPolicyProfileBean"/>
<redeliveryPolicyProfile id="redeliveryPolicyProfileBean"
[#if properties.maximumRedeliveries??]maximumRedeliveries="[=properties.maximumRedeliveries]"[/#if]
[#if properties.redeliveryDelay??]redeliveryDelay="[=properties.redeliveryDelay]"[/#if]
[#if properties.asyncDelayedRedelivery??]asyncDelayedRedelivery="[=properties.asyncDelayedRedelivery]"[/#if]
[#if properties.backOffMultiplier??]backOffMultiplier="[=properties.backOffMultiplier]"[/#if]
[#if properties.useExponentialBackOff??]useExponentialBackOff="[=properties.useExponentialBackOff]"[/#if]
[#if properties.collisionAvoidanceFactor??]collisionAvoidanceFactor="[=properties.collisionAvoidanceFactor]"[/#if]
[#if properties.useCollisionAvoidance??]useCollisionAvoidance="[=properties.useCollisionAvoidance]"[/#if]
[#if properties.maximumRedeliveryDelay??]maximumRedeliveryDelay="[=properties.maximumRedeliveryDelay]"[/#if]
[#if properties.retriesExhaustedLogLevel??]retriesExhaustedLogLevel="[=properties.retriesExhaustedLogLevel]"[/#if]
[#if properties.retryAttemptedLogLevel??]retryAttemptedLogLevel="[=properties.retryAttemptedLogLevel]"[/#if]
[#if properties.retryAttemptedLogInterval??]retryAttemptedLogInterval="[=properties.retryAttemptedLogInterval]"[/#if]
[#if properties.logRetryAttempted??]logRetryAttempted="[=properties.logRetryAttempted]"[/#if]
[#if properties.logStackTrace??]logStackTrace="[=properties.logStackTrace]"[/#if]
[#if properties.logRetryStackTrace??]logRetryStackTrace="[=properties.logRetryStackTrace]"[/#if]
[#if properties.logHandled??]logHandled="[=properties.logHandled]"[/#if]
[#if properties.logNewException??]logNewException="[=properties.logNewException]"[/#if]
[#if properties.logContinued??]logContinued="[=properties.logContinued]"[/#if]
[#if properties.logExhausted??]logExhausted="[=properties.logExhausted]"[/#if]
[#if properties.logExhaustedMessageHistory??]logExhaustedMessageHistory="[=properties.logExhaustedMessageHistory]"[/#if]
[#if properties.logExhaustedMessageBody??]logExhaustedMessageBody="[=properties.logExhaustedMessageBody]"[/#if]
[#if properties.disableRedelivery??]disableRedelivery="[=properties.disableRedelivery]"[/#if]
[#if properties.delayPattern??]delayPattern="[=properties.delayPattern]"[/#if]
[#if properties.allowRedeliveryWhileStopping??]allowRedeliveryWhileStopping="[=properties.allowRedeliveryWhileStopping]"[/#if]
[#if properties.exchangeFormatterRef??]exchangeFormatterRef="[=properties.exchangeFormatterRef]"[/#if]
/>

View File

@ -0,0 +1,2 @@
[#ftl attributes={"generated.type":"blueprint.fragment"}]
<globalOption key="CamelLogEipName" value="entaxy.runtime.connector.[=properties.systemName].[=properties.__direction].[=properties.type].[=properties.classifier]"/>

View File

@ -0,0 +1,83 @@
/* */
{
"factory": {
"id": "ftps-connector-in",
"type": "entaxy.runtime.connector",
"displayName": "FTPS :: IN",
"parent": "connection-based-connector-in",
"description": "This component provides access to remote file systems over the FTP and SFTP protocols. For more details see <a target=\"_blank\" href=\"https://camel-docs.entaxy.ru/components/${camel-docs.version}/ftps-component.html\">Camel docs</a>",
"isAbstract": false,
"requires": [
"ftps-connection"
]
},
"entaxy.runtime.connector": {
"type": "ftps",
"protocol": "ftps"
},
"fields": {
"entaxyOriginConnection": {
"type": "entaxy.runtime.connection",
"filter": "(&(type=entaxy.runtime.connection)(label=*ftps*))"
},
"connectorSubdirectory": {
"displayName": "Subdirectory",
"description": "Connector specific part of endpoint directory path. For example you can set value 'documents' in connection's field `Directory Name` and set value '2023september' in connectors's field `Subdirectory`, as a result endpoint will be configured to `/documents2023september` directory. Or you can add slash symbol (/) to one of these fields and make subdirectory for connector - `/documents/2023september`. For more details see <a target=\"_blank\" href=\"https://camel-docs.entaxy.ru/components/${camel-docs.version}/ftps-component.html\">Camel docs</a>",
"type": "String",
"group": "general"
}
},
"outputs": {
"init": {
"isDefault": true,
"fields": {
"entaxyOriginConnection": {},
"connectorSubdirectory": {},
"runExclusive": {
"type": "Boolean",
"defaultValue": true
},
"@IMPORT": [
{
"sourceFactoryId": "ftps-connection",
"location": "outputs.consumer.fields",
"prefix": "",
"filter": {
"contained": [
{
"attribute": "##origin",
"values": [
"camel"
]
},
{
"attribute": "$key",
"inverse": true,
"values": [
"camel_username",
"camel_password"
]
}
]
}
},
{
"sourceFactoryId": "ftp-client-config",
"location": "fields",
"prefix": ""
}
]
},
"config": {
"configurable": true,
"fieldsConfigurableByDefault": true,
"configurableFields": {
"includeNames": [
"connectorSubdirectory"
],
"includePatterns": []
}
}
}
}
}

View File

@ -0,0 +1,71 @@
/* */
{
"factory": {
"id": "ftps-connector-out",
"type": "entaxy.runtime.connector",
"displayName": "FTPS :: OUT",
"parent": "connection-based-connector-out",
"description": "This component provides access to remote file systems over the FTP and SFTP protocols. For more details see <a target=\"_blank\" href=\"https://camel-docs.entaxy.ru/components/${camel-docs.version}/ftps-component.html\">Camel docs</a>",
"isAbstract": false,
"requires": ["ftps-connection"]
},
"entaxy.runtime.connector": {
"type": "ftps",
"protocol": "ftps"
},
"fields": {
"entaxyOriginConnection": {
"type": "entaxy.runtime.connection",
"filter": "(&(type=entaxy.runtime.connection)(label=*ftps*))"
},
"connectorSubdirectory": {
"displayName": "Subdirectory",
"description": "Connector specific part of endpoint directory path. For example you can set value 'documents' in connection's field `Directory Name` and set value '2023september' in connectors's field `Subdirectory`, as a result endpoint will be configured to `/documents2023september` directory. Or you can add slash symbol (/) to one of these fields and make subdirectory for connector - `/documents/2023september`. For more details see <a target=\"_blank\" href=\"https://camel-docs.entaxy.ru/components/${camel-docs.version}/ftps-component.html\">Camel docs</a>",
"type": "String",
"group": "general"
}
},
"outputs": {
"init": {
"isDefault": true,
"fields": {
"entaxyOriginConnection": {},
"connectorSubdirectory": {},
"@IMPORT": [{
"sourceFactoryId": "ftps-connection",
"location": "outputs.producer.fields",
"prefix": "",
"filter": {
"contained": [{
"attribute": "##origin",
"values": ["camel"]
},
{
"attribute": "$key",
"inverse": true,
"values": [
"camel_username",
"camel_password"
]
}
]
}
},
{
"sourceFactoryId": "ftp-client-config",
"location": "fields",
"prefix": ""
}
]
},
"config": {
"configurable": true,
"fieldsConfigurableByDefault": true,
"configurableFields": {
"includeNames":["connectorSubdirectory"],
"includePatterns":[]
}
}
}
}
}

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<custom-input-route>
<!-- PLACE YOUR CAMEL/ENTAXY CODE HERE -->
<log message="Custom input route start"/>
</custom-input-route>

View File

@ -0,0 +1,17 @@
[#ftl attributes={"generated.type":"blueprint"}]
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
[#import "templates:object-commons/common-utils.ftl" as utils]
<camelContext id="[=objectId]" xmlns="http://camel.apache.org/schema/blueprint">
<route id="[=objectId].input-route">
<from uri="[=properties.exclusivePrefix!][=properties.entaxyOriginConnection]:PATH_PLACEHOLDER[=utils.convertConfigValue(properties.connectorSubdirectory!)][=utils.createQueryString(properties, "camel_", true, ["camel_username","camel_password"])]" />
[#include "templates:abstract-connector/generate-logging-key.ftl"]
<to uri="direct:exit-cascade-start" />
</route>
</camelContext>
</blueprint>

View File

@ -0,0 +1,16 @@
[#ftl attributes={"generated.type":"blueprint"}]
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
[#import "templates:object-commons/common-utils.ftl" as utils]
<camelContext id="[=objectId]" xmlns="http://camel.apache.org/schema/blueprint">
<route id="[=objectId].output-route">
<from uri="direct:entry-cascade-finish" />
<to uri="[=properties.entaxyOriginConnection]:PATH_PLACEHOLDER[=utils.convertConfigValue(properties.connectorSubdirectory!)][=utils.createQueryString(properties, "camel_", true, ["camel_username","camel_password"])]" />
</route>
</camelContext>
</blueprint>

View File

@ -0,0 +1,53 @@
[#if properties.camel_headerFilterStrategy??]
[#if properties.camel_headerFilterStrategy == "custom"]
[#assign headerFilterStrategyReference = properties.headerFilterStrategyReference]
[#else]
[#assign headerFilterStrategyReference = "headerFilterStrategy"]
[/#if]
[#global properties = properties + {"camel_headerFilterStrategy": "#[=headerFilterStrategyReference]"} ]
[/#if]
[#if properties.camel_cookieStore??]
[#if properties.camel_cookieStore == "custom"]
[#assign cookieStoreReference = properties.cookieStoreReference]
[#else]
[#assign cookieStoreReference = "cookieStore"]
[/#if]
[#global properties = properties + {"camel_cookieStore": "#[=cookieStoreReference]"} ]
[/#if]
[#if properties.camel_clientConnectionManager?? && properties.camel_clientConnectionManager == "custom"]
[#global properties = properties + {"camel_clientConnectionManager": "#[=properties.clientConnectionManagerReference]"} ]
[/#if]
[#if properties.camel_x509HostnameVerifier??]
[#if properties.camel_x509HostnameVerifier == "custom"]
[#assign x509HostnameVerifierReference = properties.x509HostnameVerifierReference]
[#else]
[#assign x509HostnameVerifierReference = "x509HostnameVerifier"]
[/#if]
[#global properties = properties + {"camel_x509HostnameVerifier": "#[=x509HostnameVerifierReference]"} ]
[/#if]
[#if properties.camel_sslContextParameters??]
[#if properties.camel_sslContextParameters == "custom"]
[#assign sslContextParametersReference = properties.sslContextParametersReference]
[#else]
[#assign sslContextParametersReference = "sslContextParameters"]
[/#if]
[#global properties = properties + {"camel_sslContextParameters": "#[=sslContextParametersReference]"} ]
[/#if]
[#if properties.camel_cookieStore?? && properties.camel_cookieStore == "custom"]
[#global properties = properties + {"camel_cookieStore": "#[=properties.cookieStoreReference]"} ]
[/#if]
[#if properties.camel_clientConnectionManager?? && properties.camel_clientConnectionManager == "custom"]
[#global properties = properties + {"camel_clientConnectionManager": "#[=properties.clientConnectionManagerReference]"} ]
[/#if]
[#if properties.camel_httpBinding?? && properties.camel_httpBinding == "custom"]
[#global properties = properties + {"camel_httpBinding": "#[=properties.httpBindingReference]"} ]
[/#if]
[#if properties.camel_httpClientConfigurer?? && properties.camel_httpClientConfigurer == "custom"]
[#global properties = properties + {"camel_httpClientConfigurer": "#[=properties.httpClientConfigurerReference]"} ]
[/#if]
[#if properties.camel_httpConfiguration?? && properties.camel_httpConfiguration == "custom"]
[#global properties = properties + {"camel_httpConfiguration": "#[=properties.httpConfigurationReference]"} ]
[/#if]
[#if properties.camel_httpContext?? && properties.camel_httpContext == "custom"]
[#global properties = properties + {"camel_httpContext": "#[=properties.httpContextReference]"} ]
[/#if]

View File

@ -0,0 +1,10 @@
[#ftl attributes={"generated.type":"blueprint.fragment"}]
[#if properties.headerFilterStrategy?? && properties.headerFilterStrategy != "custom"]
<bean id="headerFilterStrategy" class="[=properties.headerFilterStrategy]" />
[/#if]
[#if properties.x509HostnameVerifier?? && properties.x509HostnameVerifier != "custom"]
<bean id="x509HostnameVerifier" class="[=properties.x509HostnameVerifier]" />
[/#if]
[#if properties.cookieStore?? && properties.cookieStore != "custom"]
<bean id="cookieStore" class="[=properties.cookieStore]" />
[/#if]

View File

@ -0,0 +1,21 @@
[#ftl attributes={"generated.type":"blueprint"}]
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
[#import "templates:object-commons/common-utils.ftl" as utils]
[#include "customObjectReferences.ftl" ]
<camelContext id="[=objectId]" xmlns="http://camel.apache.org/schema/blueprint">
<route id="[=objectId].output-route">
<from uri="direct:entry-cascade-finish" />
[#if properties.removeServiceHeadersBeforeSending]
<removeHeaders pattern="Camel.+|operationName"/>
[/#if]
<to uri="[=utils.convertConfigValue(properties.httpUri)][=utils.createQueryString(properties, "camel_", true, ["fieldToExclude1","fieldToExclude2"])]" />
</route>
</camelContext>
</blueprint>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<route>
<in-flow-pre-route-start />
<setProperty name="NTX_profile_in_preRouted">
<constant>true</constant>
</setProperty>
</route>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<route>
<in-flow-response-start />
<setProperty name="NTX_profile_in_response">
<constant>true</constant>
</setProperty>
</route>

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<route>
<!-- you can use camel -->
<connector-selector>
<properties-to-use>
<property>connector.type</property>
<property>connector.protocol</property>
<property>connector.classifier</property>
</properties-to-use>
<patterns>
<pattern>*:*:=</pattern>
</patterns>
<options>
<fail-back-to-legacy-router/>
<use-the-only-connector>false</use-the-only-connector>
<use-default-connector/>
<connector-preferred-as-mandatory>false</connector-preferred-as-mandatory>
<allow-all-stars-pattern>false</allow-all-stars-pattern>
<treat-no-property-as-any>false</treat-no-property-as-any>
</options>
</connector-selector>
</route>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<route>
<out-flow-pre-route-start />
<setProperty name="NTX_profile_out_preRouted">
<constant>true</constant>
</setProperty>
</route>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<route>
<out-flow-response-start />
<setProperty name="NTX_profile_out_response">
<constant>true</constant>
</setProperty>
</route>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<route>
<default-route-start />
<standard-router />
</route>

View 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. Если какое-либо положение настоящей Лицензии будет признано судом недействительным,
остальные положения будут продолжать своё действие, а Пользователь будет обязан продолжать
исполнять свои обязанности в соответствии с этими положениями.

View File

@ -0,0 +1,41 @@
<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.core.objects-implementations</groupId>
<artifactId>profile-implementation</artifactId>
<version>1.10.0</version>
</parent>
<groupId>ru.entaxy.esb.platform.runtime.core.objects-implementations.profile-implementation</groupId>
<artifactId>profile-runtime-camel-components</artifactId>
<packaging>bundle</packaging>
<name>ENTAXY :: PLATFORM :: CORE :: OBJECTS IMPLEMENTATIONS :: PROFILE :: RUNTIME CAMEL</name>
<description>ENTAXY :: PLATFORM :: CORE :: OBJECTS IMPLEMENTATIONS :: PROFILE :: RUNTIME CAMEL</description>
<properties>
<bundle.osgi.export.pkg>
ru.entaxy.esb.system.component,
ru.entaxy.esb.system.component.util,
ru.entaxy.esb.system.groups.component,
ru.entaxy.esb.system.groups.component.util
</bundle.osgi.export.pkg>
</properties>
<dependencies>
<dependency>
<groupId>ru.entaxy.esb.platform.runtime.core</groupId>
<artifactId>core-support-runtime-legacy</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.platform.runtime.core.objects-implementations.profile-implementation</groupId>
<artifactId>profile-runtime-legacy-support</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,44 @@
/*-
* ~~~~~~licensing~~~~~~
* system-component
* ==========
* Copyright (C) 2020 - 2024 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.esb.system.component;
import org.apache.camel.Endpoint;
import org.apache.camel.support.DefaultComponent;
import java.util.Map;
public class SystemComponent extends DefaultComponent {
@Override
protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
SystemEndpoint endpoint = new SystemEndpoint(uri, this);
endpoint.setSystemName(remaining);
setProperties(endpoint, parameters);
return endpoint;
}
}

View File

@ -0,0 +1,71 @@
/*-
* ~~~~~~licensing~~~~~~
* system-component
* ==========
* Copyright (C) 2020 - 2024 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.esb.system.component;
import org.apache.camel.Exchange;
import org.apache.camel.Processor;
import org.apache.camel.support.ScheduledPollConsumer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class SystemConsumer extends ScheduledPollConsumer {
private static final Logger LOG = LoggerFactory.getLogger(SystemConsumer.class);
private final SystemEndpoint endpoint;
public SystemConsumer(SystemEndpoint endpoint, Processor processor) {
super(endpoint, processor);
this.endpoint = endpoint;
}
@Override
protected int poll() throws Exception {
Exchange exchange = endpoint.createExchange();
// create a message body
exchange.getIn().setBody(readOptions());
LOG.info("In SystemConsumer " + exchange.getIn().getBody());
try {
// send message to next processor in the route
getProcessor().process(exchange);
return 1; // number of messages polled
} finally {
// log exception if an exception occurred and was not handled
if (exchange.getException() != null) {
getExceptionHandler().handleException(
"Error processing exchange", exchange,
exchange.getException());
}
}
}
private String readOptions() {
return "Operation name " + endpoint.getSystemName();
}
}

View File

@ -0,0 +1,115 @@
/*-
* ~~~~~~licensing~~~~~~
* system-component
* ==========
* Copyright (C) 2020 - 2024 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.esb.system.component;
import org.apache.camel.Consumer;
import org.apache.camel.Processor;
import org.apache.camel.Producer;
import org.apache.camel.spi.Metadata;
import org.apache.camel.spi.UriEndpoint;
import org.apache.camel.spi.UriParam;
import org.apache.camel.spi.UriPath;
import org.apache.camel.support.DefaultEndpoint;
@UriEndpoint(
scheme = "system",
title = "System",
syntax = "system:systemName",
label = "custom",
producerOnly = true)
public class SystemEndpoint extends DefaultEndpoint {
@UriPath
@Metadata(required = true)
private String systemName;
@UriParam(label = "producer")
private String connectorProtocol = null;
@UriParam(label = "producer")
private String connectorClassifier = null;
@UriParam(label = "producer")
private String connectorType = null;
@UriParam(label = "producer")
private Boolean connectorMandatory = null;
public SystemEndpoint() {
}
public SystemEndpoint(String uri, SystemComponent component) {
super(uri, component);
}
public Producer createProducer() throws Exception {
return new SystemProducer(this);
}
public Consumer createConsumer(Processor processor) throws Exception {
return null;
}
public boolean isSingleton() {
return true;
}
public String getSystemName() {
return systemName;
}
public void setSystemName(String systemName) {
this.systemName = systemName;
}
public String getConnectorProtocol() {
return connectorProtocol;
}
public void setConnectorProtocol(String connectorProtocol) {
this.connectorProtocol = connectorProtocol;
}
public String getConnectorClassifier() {
return connectorClassifier;
}
public void setConnectorClassifier(String connectorClassifier) {
this.connectorClassifier = connectorClassifier;
}
public String getConnectorType() {
return connectorType;
}
public void setConnectorType(String connectorType) {
this.connectorType = connectorType;
}
public Boolean isConnectorMandatory() {
return connectorMandatory;
}
public void setConnectorMandatory(Boolean connectorMandatory) {
this.connectorMandatory = connectorMandatory;
}
}

View File

@ -0,0 +1,130 @@
/*-
* ~~~~~~licensing~~~~~~
* system-component
* ==========
* Copyright (C) 2020 - 2024 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.esb.system.component;
import java.util.ArrayList;
import java.util.List;
import org.apache.camel.Exchange;
import org.apache.camel.support.DefaultProducer;
import org.apache.commons.lang3.StringUtils;
import org.osgi.framework.FrameworkUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ru.entaxy.esb.system.common.exception.ProfileNotFound;
import ru.entaxy.esb.system.registry.systems.profile.SystemCollectorListener;
import ru.entaxy.esb.system.registry.systems.profile.SystemProfile;
import ru.entaxy.platform.base.support.osgi.OSGIUtils;
public class SystemProducer extends DefaultProducer {
private static final Logger LOG = LoggerFactory.getLogger(SystemProducer.class);
private final SystemEndpoint endpoint;
private SystemCollectorListener systemCollectorListener;
public SystemProducer(SystemEndpoint endpoint) {
super(endpoint);
this.endpoint = endpoint;
}
public void process(Exchange exchange) throws Exception {
LOG.debug("In SystemProducer " + exchange.getIn().getBody());
// get System Profile from systemRegistry endpoint.getSystemName()
SystemProfile systemProfile = null;
systemProfile = getSystemProfile(endpoint.getSystemName());
setPreferredConnector(exchange);
setConnectorMandatory(exchange);
LOG.debug("Called system profile " + (systemProfile != null ? systemProfile.getSystemName() : "NULL"));
systemProfile.send(exchange);
}
public SystemProfile getSystemProfile(String nameSystem) throws ProfileNotFound {
systemCollectorListener = getSystemProfileNamedListener();
LOG.debug("Registry SystemProfile {}; systems count {}", nameSystem,
systemCollectorListener.getReferenceNames().size());
SystemProfile systemProfile = null;
if (systemCollectorListener.isRegistered(nameSystem)) {
systemProfile = (SystemProfile) systemCollectorListener.getReference(nameSystem);
} else {
throw new ProfileNotFound("Profile for system " + nameSystem + " not found");
}
return systemProfile;
}
public SystemCollectorListener getSystemProfileNamedListener() {
if (systemCollectorListener == null) {
systemCollectorListener = (SystemCollectorListener) OSGIUtils.getService(
FrameworkUtil.getBundle(SystemProducer.class).getBundleContext(),
SystemCollectorListener.class);
}
return systemCollectorListener;
}
public void setPreferredConnector(Exchange exchange) {
if (!StringUtils.isEmpty(endpoint.getConnectorProtocol())
|| !StringUtils.isEmpty(endpoint.getConnectorClassifier()) ||
!StringUtils.isEmpty(endpoint.getConnectorType())) {
List<String> preferredConnectorList = new ArrayList<>();
if (!StringUtils.isEmpty(endpoint.getConnectorProtocol())) {
preferredConnectorList.add("\"protocol\":\"" + endpoint.getConnectorProtocol() + "\"");
}
if (!StringUtils.isEmpty(endpoint.getConnectorClassifier())) {
preferredConnectorList.add("\"classifier\":\"" + endpoint.getConnectorClassifier() + "\"");
}
if (!StringUtils.isEmpty(endpoint.getConnectorType())) {
preferredConnectorList.add("\"type\":\"" + endpoint.getConnectorType() + "\"");
}
String jsonPreferredConnector = "{" + joinByComma(preferredConnectorList) + "}";
exchange.getMessage().getHeaders().put("NTX_preferred_connector", jsonPreferredConnector);
}
}
public void setConnectorMandatory(Exchange exchange) {
if (endpoint.isConnectorMandatory() != null)
exchange.getMessage().getHeaders().put("NTX_connector_preferred_as_mandatory",
endpoint.isConnectorMandatory());
}
private String joinByComma(List<String> preferredConnectorList) {
StringBuilder summary = new StringBuilder();
for (int i = 0; i < preferredConnectorList.size(); i++) {
summary.append(preferredConnectorList.get(i));
if (i < preferredConnectorList.size() - 1) {
summary.append(",");
}
}
return summary.toString();
}
}

View File

@ -0,0 +1,34 @@
/*-
* ~~~~~~licensing~~~~~~
* system-component
* ==========
* Copyright (C) 2020 - 2024 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.esb.system.component.util;
public class SystemConstants {
public static final String PARAMETER_PREFERRED_CONNECTOR = "preferredConnector";
private SystemConstants() {
}
}

View File

@ -0,0 +1,44 @@
/*-
* ~~~~~~licensing~~~~~~
* system-group-component
* ==========
* Copyright (C) 2020 - 2024 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.esb.system.groups.component;
import org.apache.camel.Endpoint;
import org.apache.camel.support.DefaultComponent;
import java.util.Map;
public class SystemGroupComponent extends DefaultComponent {
@Override
protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
SystemGroupEndpoint endpoint = new SystemGroupEndpoint(uri, this);
endpoint.setSystemName(remaining);
setProperties(endpoint, parameters);
return endpoint;
}
}

View File

@ -0,0 +1,71 @@
/*-
* ~~~~~~licensing~~~~~~
* system-group-component
* ==========
* Copyright (C) 2020 - 2024 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.esb.system.groups.component;
import org.apache.camel.Exchange;
import org.apache.camel.Processor;
import org.apache.camel.support.ScheduledPollConsumer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class SystemGroupConsumer extends ScheduledPollConsumer {
private static final Logger LOG = LoggerFactory.getLogger(SystemGroupConsumer.class);
private final SystemGroupEndpoint endpoint;
public SystemGroupConsumer(SystemGroupEndpoint endpoint, Processor processor) {
super(endpoint, processor);
this.endpoint = endpoint;
}
@Override
protected int poll() throws Exception {
Exchange exchange = endpoint.createExchange();
// create a message body
exchange.getIn().setBody(readOptions());
LOG.info("In SystemGroupConsumer ++++ " + exchange.getIn().getBody());
try {
// send message to next processor in the route
getProcessor().process(exchange);
return 1; // number of messages polled
} finally {
// log exception if an exception occurred and was not handled
if (exchange.getException() != null) {
getExceptionHandler().handleException(
"Error processing exchange", exchange,
exchange.getException());
}
}
}
private String readOptions() {
return "Operation name " + endpoint.getSystemName();
}
}

View File

@ -0,0 +1,86 @@
/*-
* ~~~~~~licensing~~~~~~
* system-group-component
* ==========
* Copyright (C) 2020 - 2024 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.esb.system.groups.component;
import org.apache.camel.Consumer;
import org.apache.camel.Processor;
import org.apache.camel.Producer;
import org.apache.camel.spi.Metadata;
import org.apache.camel.spi.UriEndpoint;
import org.apache.camel.spi.UriParam;
import org.apache.camel.spi.UriPath;
import org.apache.camel.support.DefaultEndpoint;
@UriEndpoint(
scheme = "system-group",
title = "System",
syntax = "system-group:systemName",
label = "custom",
producerOnly = true)
public class SystemGroupEndpoint extends DefaultEndpoint {
@UriPath
@Metadata(required = true)
private String systemName;
@UriParam
private String preferredConnector = null;
public SystemGroupEndpoint() {
}
public SystemGroupEndpoint(String uri, SystemGroupComponent component) {
super(uri, component);
}
public Producer createProducer() throws Exception {
return new SystemGroupProducer(this);
}
public Consumer createConsumer(Processor processor) throws Exception {
return null;
}
public boolean isSingleton() {
return true;
}
public String getSystemName() {
return systemName;
}
public void setSystemName(String systemName) {
this.systemName = systemName;
}
public String getPreferredConnector() {
return preferredConnector;
}
public void setPreferredConnector(String preferredConnector) {
this.preferredConnector = preferredConnector;
}
}

View File

@ -0,0 +1,88 @@
/*-
* ~~~~~~licensing~~~~~~
* system-group-component
* ==========
* Copyright (C) 2020 - 2024 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.esb.system.groups.component;
import org.apache.camel.Exchange;
import org.apache.camel.support.DefaultProducer;
import org.osgi.framework.BundleContext;
import org.osgi.framework.FrameworkUtil;
import org.osgi.framework.ServiceReference;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ru.entaxy.esb.system.common.exception.ProfileNotFound;
import ru.entaxy.esb.system.groups.registry.system.groups.profile.SystemGroupCollectorListener;
import ru.entaxy.esb.system.groups.registry.system.groups.profile.SystemGroupProfile;
public class SystemGroupProducer extends DefaultProducer {
private static final Logger LOG = LoggerFactory.getLogger(SystemGroupProducer.class);
private final SystemGroupEndpoint endpoint;
private SystemGroupCollectorListener systemGroupCollectorListener;
public SystemGroupProducer(SystemGroupEndpoint endpoint) {
super(endpoint);
this.endpoint = endpoint;
}
public void process(Exchange exchange) throws Exception {
LOG.debug("In SystemGroupProducer " + exchange.getIn().getBody());
//get System Group Profile from systemRegistry endpoint.getSystemName()
SystemGroupProfile systemGroupProfile = null;
systemGroupProfile = getSystemGroupProfile(endpoint.getSystemName());
LOG.debug("Called system group profile " + (systemGroupProfile != null ? systemGroupProfile.getProfileName() : "NULL"));
systemGroupProfile.send(exchange);
}
public SystemGroupProfile getSystemGroupProfile(String nameSystem) throws ProfileNotFound {
systemGroupCollectorListener = getSystemGroupCollectorListener();
LOG.info("Registry SystemGroupProfile {}; services count {}", nameSystem, systemGroupCollectorListener.getReferenceNames().size());
SystemGroupProfile systemGroupProfile = null;
if (systemGroupCollectorListener.isRegistered(nameSystem)) {
systemGroupProfile = (SystemGroupProfile) systemGroupCollectorListener.getReference(nameSystem);
} else {
throw new ProfileNotFound("Profile for group system " + nameSystem + " not found");
}
return systemGroupProfile;
}
public SystemGroupCollectorListener getSystemGroupCollectorListener() {
if (systemGroupCollectorListener == null) {
BundleContext bundleContext = FrameworkUtil.getBundle(SystemGroupProducer.class).getBundleContext();
ServiceReference<SystemGroupCollectorListener> systemGroupCollectorListenerServiceReference =
bundleContext.getServiceReference(SystemGroupCollectorListener.class);
systemGroupCollectorListener = bundleContext.getService(systemGroupCollectorListenerServiceReference);
}
return systemGroupCollectorListener;
}
}

View File

@ -0,0 +1,34 @@
/*-
* ~~~~~~licensing~~~~~~
* system-group-component
* ==========
* Copyright (C) 2020 - 2024 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.esb.system.groups.component.util;
public class SystemGroupConstants {
public static final String PARAMETER_PREFERRED_CONNECTOR = "preferredConnector";
private SystemGroupConstants() {
}
}

View 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. Если какое-либо положение настоящей Лицензии будет признано судом недействительным,
остальные положения будут продолжать своё действие, а Пользователь будет обязан продолжать
исполнять свои обязанности в соответствии с этими положениями.

View File

@ -0,0 +1,43 @@
<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.core.objects-implementations</groupId>
<artifactId>profile-implementation</artifactId>
<version>1.10.0</version>
</parent>
<groupId>ru.entaxy.esb.platform.runtime.core.objects-implementations.profile-implementation</groupId>
<artifactId>profile-runtime-legacy-support</artifactId>
<packaging>bundle</packaging>
<name>ENTAXY :: PLATFORM :: CORE :: OBJECTS IMPLEMENTATIONS :: PROFILE :: RUNTIME LEGACY</name>
<description>ENTAXY :: PLATFORM :: CORE :: OBJECTS IMPLEMENTATIONS :: PROFILE :: RUNTIME LEGACY</description>
<properties>
<bundle.osgi.export.pkg>
ru.entaxy.esb.system.profile.commons,
ru.entaxy.esb.system.profile.commons.connectors,
ru.entaxy.esb.system.profile.commons.connectors.in,
ru.entaxy.esb.system.profile.commons.connectors.out,
ru.entaxy.esb.system.profile.commons.profile_output,
ru.entaxy.esb.system.registry.systems.profile,
ru.entaxy.esb.system.registry.systems.profile.collector,
ru.entaxy.esb.system.registry.systems.profile.impl.defaults,
ru.entaxy.esb.system.groups.registry.system.groups.profile,
ru.entaxy.esb.system.groups.registry.system.groups.profile.collector,
ru.entaxy.esb.system.groups.registry.system.groups.profile.impl.defaults
</bundle.osgi.export.pkg>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-api</artifactId>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.platform.runtime.core</groupId>
<artifactId>core-support-runtime-legacy</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,31 @@
/*-
* ~~~~~~licensing~~~~~~
* system-group-profile-api
* ==========
* Copyright (C) 2020 - 2024 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.esb.system.groups.registry.system.groups.profile;
import ru.entaxy.platform.base.support.osgi.service.NamedReferenceListener;
public interface SystemGroupCollectorListener<T> extends NamedReferenceListener<T> {
}

View File

@ -0,0 +1,36 @@
/*-
* ~~~~~~licensing~~~~~~
* system-group-profile-api
* ==========
* Copyright (C) 2020 - 2024 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.esb.system.groups.registry.system.groups.profile;
import ru.entaxy.esb.system.profile.commons.Profile;
public interface SystemGroupProfile extends Profile {
String getProfileName();
void send(Object request);
}

View File

@ -0,0 +1,39 @@
/*-
* ~~~~~~licensing~~~~~~
* system-group-profile-collector
* ==========
* Copyright (C) 2020 - 2024 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.esb.system.groups.registry.system.groups.profile.collector;
import ru.entaxy.esb.system.groups.registry.system.groups.profile.SystemGroupCollectorListener;
import ru.entaxy.esb.system.groups.registry.system.groups.profile.SystemGroupProfile;
import ru.entaxy.platform.base.support.osgi.service.CommonNamedReferenceListener;
public class SystemGroupProfileNamedListener extends CommonNamedReferenceListener<SystemGroupProfile>
implements SystemGroupCollectorListener<SystemGroupProfile> {
@Override
protected String getObjectName(SystemGroupProfile systemGroupProfile) {
return systemGroupProfile.getProfileName();
}
}

View File

@ -0,0 +1,104 @@
/*-
* ~~~~~~licensing~~~~~~
* system-group-profile-impl-default
* ==========
* Copyright (C) 2020 - 2024 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.esb.system.groups.registry.system.groups.profile.impl.defaults;
import org.apache.camel.CamelContext;
import org.apache.camel.Exchange;
import org.apache.camel.Message;
import org.apache.camel.ProducerTemplate;
import org.apache.camel.component.jms.JmsComponent;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import ru.entaxy.esb.system.groups.registry.system.groups.profile.SystemGroupProfile;
import ru.entaxy.esb.system.profile.commons.CommonProfile;
import ru.entaxy.esb.system.registry.systems.profile.SystemCollectorListener;
import javax.jms.ConnectionFactory;
public class DefaultSystemGroupProfile extends CommonProfile implements SystemGroupProfile {
private static final Log LOG = LogFactory.getLog(DefaultSystemGroupProfile.class);
private static final String NAME_JMS_COMPONENT = "jms";
private String systemGroupName = "system";
private String profileName = "default";
private String destination = "default";
private final String dlq = "DLQ";
private ConnectionFactory jmsConnectionFactory;
private SystemCollectorListener systemCollectorListener;
public DefaultSystemGroupProfile() {
}
@Override
public String getProfileName() {
return profileName;
}
@Override
protected void doSend(Object request) {
LOG.info("Send request " + request + "in " + destination);
Exchange exchange = (Exchange) request;
ProducerTemplate template = exchange.getContext().createProducerTemplate();
addJmsComponent(exchange.getContext());
Message message = exchange.getMessage();
message.setHeader("NTX_SystemId", systemGroupName);
message.setHeader("ExchangePattern", "InOnly");
template.send(destination, exchange);
}
private void addJmsComponent(CamelContext context) {
if (!context.getComponentNames().contains(NAME_JMS_COMPONENT))
addJmsComponent(context, NAME_JMS_COMPONENT);
}
private void addJmsComponent(CamelContext context, String componentName) {
JmsComponent component = new JmsComponent(context);
component.setConnectionFactory(jmsConnectionFactory);
context.addComponent(componentName, component);
}
public void setSystemGroupName(String systemGroupName) {
this.systemGroupName = systemGroupName;
}
public void setProfileName(String profileName) {
this.profileName = profileName;
}
public void setDestination(String destination) {
this.destination = destination;
}
public void setJmsConnectionFactory(ConnectionFactory jmsConnectionFactory) {
this.jmsConnectionFactory = jmsConnectionFactory;
}
}

View File

@ -0,0 +1,90 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-commons
* ==========
* Copyright (C) 2020 - 2024 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.esb.system.profile.commons;
import ru.entaxy.esb.system.profile.commons.profile_output.ProfileOutput;
import java.util.Objects;
public abstract class CommonProfile implements Profile {
protected String systemName = "system";
protected ProfileOutput profileOutput;
protected InConnectorCollector inConnectorCollector;
@Override
public void send(Object request) {
doSend(request);
}
protected abstract void doSend(Object request);
@Override
public String getSystemName() {
return systemName;
}
public void setSystemName(String systemName) {
this.systemName = systemName;
}
@Override
public ProfileOutput getProfileOutput() {
return profileOutput;
}
public void setProfileOutput(ProfileOutput profileOutput) {
this.profileOutput = profileOutput;
}
public InConnectorCollector getInConnectorCollector() {
return inConnectorCollector;
}
public void setInConnectorCollector(InConnectorCollector inConnectorCollector) {
this.inConnectorCollector = inConnectorCollector;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
CommonProfile that = (CommonProfile) o;
return Objects.equals(systemName, that.systemName);
}
@Override
public int hashCode() {
return Objects.hash(systemName);
}
@Override
public String toString() {
return "CommonProfile{" +
"systemName='" + systemName + '\'' +
'}';
}
}

View File

@ -0,0 +1,60 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-commons
* ==========
* Copyright (C) 2020 - 2024 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.esb.system.profile.commons;
import org.apache.camel.Exchange;
import org.apache.camel.Header;
import ru.entaxy.esb.system.common.exception.ConnectorNotFound;
import ru.entaxy.esb.system.profile.commons.connectors.Connector;
import ru.entaxy.platform.base.support.osgi.service.CommonNamedReferenceListener;
public class ConnectorRegistry extends CommonNamedReferenceListener<Connector> {
public String getParam(String systemName, String paramName) {
Connector connector = getReference(systemName);
if (connector != null) {
return connector.getParam(paramName);
} else {
throw new ConnectorNotFound("Connector for " + systemName + " not found");
}
}
public void send(@Header("X-SystemName") String systemName, Exchange exchange) {
Connector connector = getReference(systemName);
if (connector != null) {
connector.send(exchange);
} else {
throw new ConnectorNotFound("Connector for " + systemName + " not found");
}
}
@Override
protected String getObjectName(Connector Connector) {
return Connector.getSystemName();
}
}

View File

@ -0,0 +1,37 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-commons
* ==========
* Copyright (C) 2020 - 2024 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.esb.system.profile.commons;
import ru.entaxy.esb.system.profile.commons.connectors.in.InConnector;
import ru.entaxy.platform.base.support.osgi.service.CommonNamedReferenceListener;
public class InConnectorCollector extends CommonNamedReferenceListener<InConnector> {
@Override
protected String getObjectName(InConnector inConnector) {
return inConnector == null ? null : inConnector.getEndpointName();
}
}

View File

@ -0,0 +1,39 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-commons
* ==========
* Copyright (C) 2020 - 2024 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.esb.system.profile.commons;
import ru.entaxy.esb.system.profile.commons.profile_output.ProfileOutput;
public interface Profile {
ProfileOutput getProfileOutput();
String getSystemName();
InConnectorCollector getInConnectorCollector();
void send(Object request);
}

View File

@ -0,0 +1,79 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-commons
* ==========
* Copyright (C) 2020 - 2024 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.esb.system.profile.commons.connectors;
import ru.entaxy.esb.system.profile.commons.Profile;
import java.util.Map;
public abstract class CommonConnector implements Connector {
protected String endpointName;
protected Profile profile;
protected String systemName;
protected Map<String, String> params;
public void setEndpointName(String endpointName) {
this.endpointName = endpointName;
}
public void setProfile(Profile profile) {
this.profile = profile;
}
public void setSystemName(String systemName) {
this.systemName = systemName;
}
public void setParams(Map<String, String> params) {
this.params = params;
}
@Override
public String getEndpointName() {
return endpointName;
}
@Override
public Profile getProfile() {
return profile;
}
@Override
public String getSystemName() {
return systemName;
}
@Override
public Map<String, String> getParams() {
return params;
}
@Override
public String getParam(String paramName) {
return params.get(paramName);
}
}

View File

@ -0,0 +1,53 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-commons
* ==========
* Copyright (C) 2020 - 2024 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.esb.system.profile.commons.connectors;
import org.apache.camel.Exchange;
import ru.entaxy.esb.system.profile.commons.Profile;
import java.util.Map;
public interface Connector {
public static final String HEADERS_START = "NTX_Connector_";
public static final String ROLE = "role";
public static final String TYPE = "type";
public static final String SUBTYPE = "subtype";
String getEndpointName();
String getEndpointType();
Profile getProfile();
String getSystemName();
Map<String, String> getParams();
String getParam(String paramName);
void send(Exchange exchange);
}

View File

@ -0,0 +1,48 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-commons
* ==========
* Copyright (C) 2020 - 2024 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.esb.system.profile.commons.connectors.in;
import org.apache.camel.Exchange;
import org.apache.camel.ProducerTemplate;
import ru.entaxy.esb.system.profile.commons.connectors.CommonConnector;
public class DirectVMInConnectorImpl extends CommonConnector implements InConnector {
@Override
public String getEndpointType() {
return endpointType;
}
@Override
public void send(Exchange exchange) {
ProducerTemplate template = exchange.getContext().createProducerTemplate();
exchange.getIn().setHeader(HEADERS_START + ROLE, getParam(ROLE));
exchange.getIn().setHeader(HEADERS_START + TYPE, getParam(TYPE));
exchange.getIn().setHeader(HEADERS_START + SUBTYPE, getParam(SUBTYPE));
template.send("direct-vm:" + endpointName + "-" + endpointType + "-connector-" + systemName +
"?block=true&timeout=60000", exchange);
}
}

View File

@ -0,0 +1,33 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-commons
* ==========
* Copyright (C) 2020 - 2024 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.esb.system.profile.commons.connectors.in;
import ru.entaxy.esb.system.profile.commons.connectors.Connector;
public interface InConnector extends Connector {
String endpointType = "in";
}

View File

@ -0,0 +1,45 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-commons
* ==========
* Copyright (C) 2020 - 2024 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.esb.system.profile.commons.connectors.out;
import org.apache.camel.Exchange;
import org.apache.camel.ProducerTemplate;
import ru.entaxy.esb.system.profile.commons.connectors.CommonConnector;
public class DirectVMOutConnectorImpl extends CommonConnector implements OutConnector {
@Override
public String getEndpointType() {
return endpointType;
}
@Override
public void send(Exchange exchange) {
ProducerTemplate template = exchange.getContext().createProducerTemplate();
template.send("direct-vm:" + endpointName + "-" +
endpointType + "-connector-" + systemName + "?block=true&timeout=60000", exchange);
}
}

View File

@ -0,0 +1,33 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-commons
* ==========
* Copyright (C) 2020 - 2024 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.esb.system.profile.commons.connectors.out;
import ru.entaxy.esb.system.profile.commons.connectors.Connector;
public interface OutConnector extends Connector {
String endpointType = "out";
}

View File

@ -0,0 +1,48 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-commons
* ==========
* Copyright (C) 2020 - 2024 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.esb.system.profile.commons.profile_output;
import org.apache.camel.Exchange;
import org.apache.camel.Header;
import ru.entaxy.esb.system.profile.commons.connectors.out.OutConnector;
import java.util.List;
import static ru.entaxy.esb.system.profile.commons.connectors.Connector.*;
public interface ProfileOutput {
OutConnector getOutConnector(String endpointName, String role, String type, String subtype);
void send(Exchange exchange);
void sendTo(@Header("EndpointName") String endpointName,
@Header(HEADERS_START + ROLE) String role,
@Header(HEADERS_START + TYPE) String type,
@Header(HEADERS_START + SUBTYPE) String subtype,
Exchange exchange);
public List<String> getReferenceNames();
}

View File

@ -0,0 +1,148 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-commons
* ==========
* Copyright (C) 2020 - 2024 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.esb.system.profile.commons.profile_output;
import static ru.entaxy.esb.system.profile.commons.connectors.Connector.HEADERS_START;
import static ru.entaxy.esb.system.profile.commons.connectors.Connector.ROLE;
import static ru.entaxy.esb.system.profile.commons.connectors.Connector.SUBTYPE;
import static ru.entaxy.esb.system.profile.commons.connectors.Connector.TYPE;
import java.util.concurrent.CountDownLatch;
import org.apache.camel.Exchange;
import org.apache.camel.Header;
import org.apache.camel.ProducerTemplate;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ru.entaxy.esb.system.common.exception.ConnectorNotFound;
import ru.entaxy.esb.system.profile.commons.connectors.out.OutConnector;
import ru.entaxy.platform.base.support.osgi.service.CommonNamedReferenceListener;
public class ProfileOutputImpl extends CommonNamedReferenceListener<OutConnector> implements ProfileOutput {
private static final Logger log = LoggerFactory.getLogger(ProfileOutputImpl.class);
protected String systemName;
public void setSystemName(String systemName) {
this.systemName = systemName;
}
@Override
public OutConnector getOutConnector(String endpointName, String role, String type, String subtype) {
for (OutConnector outConnector : registeredReferences.values()) {
if ((role == null || role.equals(outConnector.getParam(ROLE))) &&
type != null && type.equals(outConnector.getParam(TYPE)) &&
subtype != null && subtype.equals(outConnector.getParam(SUBTYPE))) {
return outConnector;
} else if ((role == null || role.equals(outConnector.getParam(ROLE))) &&
type != null && type.equals(outConnector.getParam(TYPE))) {
return outConnector;
} else if (role != null && role.equals(outConnector.getParam(ROLE))) {
return outConnector;
}
}
if (endpointName == null || registeredReferences.get(endpointName) == null) {
for (OutConnector outConnector : registeredReferences.values()) {
return outConnector;
}
}
return registeredReferences.get(endpointName);
}
@Override
public void send(Exchange exchange) {
/*
* !!! WE ARE NOT SURE THE SENDING FROM PROCESSOR (COMPONENT) IS ALLOWED IN CAMEL !!!
* but we managed to do this
*
* we need another Thread to execute because when sending
* from system to itself the execution stops in waiting forever
* due to existing running ReactiveExecutor will be found for this thread
* and the task will be placed in it's queue while being in
* execution of the previous task from another Workers's queue
* of the same ReactiveExecutor
*
* Example (without separate thread):
*
* profile_s1 (ExtendedCamelContext_1 -> ReactiveExecutor_1)
* -> task (we're in it now!) -> [switch to ExtendedCamelContext_2] producer (vmdirect)
* -> ExtendedCamelContext_2 (with ReactiveExecutor_2) (route_s1)
* -> consumer (profile_s1)
* -> task {
* Who will execute? Let's check if there's already a ReactiveExecutor !!for current Thread!!
* in target context. If no, our executor will be used.
* Oh! We've found ReactiveExecutor_1, it will execute.
* } -> enqueue (ReactiveExecutor_1)
* -> (execution is still in ExtendedCamelContext_2 - route_s1)
* -> wait for task to be executed.
*
* Result: being in previous (current) task we're waiting for the next task
* in the same ReactiveExecutor's queue to be executed.
* This will never happen.
*
*/
CountDownLatch latch = new CountDownLatch(1);
Thread exec = new Thread(new Runnable() {
@Override
public void run() {
ProducerTemplate template = exchange.getContext().createProducerTemplate();
template.send("direct-vm:profile-" + systemName + "-enter-point?block=true&timeout=60000", exchange);
latch.countDown();
}
});
exec.setContextClassLoader(Thread.currentThread().getContextClassLoader());
exec.start();
try {
// we have to wait the thread to be executed
// because we're calling synchronously
latch.await();
} catch (InterruptedException e) {
// e.printStackTrace();
log.error("Error awaiting latch", e);
}
}
@Override
public void sendTo(@Header("ENTAXY_EndpointName") String endpointName,
@Header(HEADERS_START + ROLE) String role,
@Header(HEADERS_START + TYPE) String type,
@Header(HEADERS_START + SUBTYPE) String subtype,
Exchange exchange) {
try {
getOutConnector(endpointName, role, type, subtype).send(exchange);
} catch (NullPointerException ex) {
throw new ConnectorNotFound("Out connector for " + systemName + " not found");
}
}
@Override
protected String getObjectName(OutConnector outConnector) {
return outConnector == null ? null : outConnector.getEndpointName();
}
}

View File

@ -0,0 +1,32 @@
/*-
* ~~~~~~licensing~~~~~~
* system-profile-api
* ==========
* Copyright (C) 2020 - 2024 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.esb.system.registry.systems.profile;
import ru.entaxy.platform.base.support.osgi.service.NamedReferenceListener;
public interface SystemCollectorListener<T> extends NamedReferenceListener<T> {
}

View File

@ -0,0 +1,32 @@
/*-
* ~~~~~~licensing~~~~~~
* system-profile-api
* ==========
* Copyright (C) 2020 - 2024 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.esb.system.registry.systems.profile;
import ru.entaxy.esb.system.profile.commons.Profile;
public interface SystemProfile extends Profile {
}

View File

@ -0,0 +1,49 @@
/*-
* ~~~~~~licensing~~~~~~
* system-profile-collector
* ==========
* Copyright (C) 2020 - 2024 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.esb.system.registry.systems.profile.collector;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.sun.istack.NotNull;
import ru.entaxy.esb.system.registry.systems.profile.SystemCollectorListener;
import ru.entaxy.esb.system.registry.systems.profile.SystemProfile;
import ru.entaxy.platform.base.support.osgi.service.CommonNamedReferenceListener;
public class SystemProfileNamedListener extends CommonNamedReferenceListener<SystemProfile>
implements SystemCollectorListener<SystemProfile> {
protected static final Logger log = LoggerFactory.getLogger(SystemProfileNamedListener.class);
@Override
protected String getObjectName(@NotNull SystemProfile systemProfile) {
return systemProfile.getSystemName();
}
private SystemProfile getSystemProfile(String id) {
return registeredReferences.get(id);
}
}

View File

@ -0,0 +1,45 @@
/*-
* ~~~~~~licensing~~~~~~
* system-profile-impl-default
* ==========
* Copyright (C) 2020 - 2024 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.esb.system.registry.systems.profile.impl.defaults;
import org.apache.camel.Exchange;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import ru.entaxy.esb.system.profile.commons.CommonProfile;
import ru.entaxy.esb.system.registry.systems.profile.SystemProfile;
public class DefaultSystemProfile extends CommonProfile implements SystemProfile {
private static final Log LOG = LogFactory.getLog(DefaultSystemProfile.class);
public DefaultSystemProfile() {
}
@Override
protected void doSend(Object request) {
profileOutput.send((Exchange) request);
}
}

View File

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~~~~~~licensing~~~~~~
system-profile-collector
==========
Copyright (C) 2020 - 2024 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~~~~~~
-->
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
<!-- system profiles -->
<bean id="profileCollector"
class="ru.entaxy.esb.system.registry.systems.profile.collector.SystemProfileNamedListener"
activation="eager"/>
<reference-list
interface="ru.entaxy.esb.system.registry.systems.profile.SystemProfile"
availability="optional">
<reference-listener ref="profileCollector"
bind-method="register" unbind-method="unregister"/>
</reference-list>
<service activation="eager"
interface="ru.entaxy.esb.system.registry.systems.profile.SystemCollectorListener"
ref="profileCollector"/>
<!-- system group profiles -->
<bean id="profileGroupCollector"
class="ru.entaxy.esb.system.groups.registry.system.groups.profile.collector.SystemGroupProfileNamedListener"
activation="eager">
</bean>
<reference-list
interface="ru.entaxy.esb.system.groups.registry.system.groups.profile.SystemGroupProfile"
availability="optional">
<reference-listener ref="profileGroupCollector"
bind-method="register" unbind-method="unregister"/>
</reference-list>
<service activation="eager"
interface="ru.entaxy.esb.system.groups.registry.system.groups.profile.SystemGroupCollectorListener"
ref="profileGroupCollector"/>
</blueprint>

View 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. Если какое-либо положение настоящей Лицензии будет признано судом недействительным,
остальные положения будут продолжать своё действие, а Пользователь будет обязан продолжать
исполнять свои обязанности в соответствии с этими положениями.

View File

@ -0,0 +1,16 @@
<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.core</groupId>
<artifactId>objects-implementations</artifactId>
<version>1.10.0</version>
</parent>
<groupId>ru.entaxy.esb.platform.runtime.core.objects-implementations</groupId>
<artifactId>repository-implementation</artifactId>
<packaging>pom</packaging>
<name>ENTAXY :: PLATFORM :: CORE :: OBJECTS IMPLEMENTATION :: REPOSITORY</name>
<description>ENTAXY :: PLATFORM :: CORE :: OBJECTS IMPLEMENTATION :: REPOSITORY</description>
<modules>
<module>repository-producing</module>
</modules>
</project>

View 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. Если какое-либо положение настоящей Лицензии будет признано судом недействительным,
остальные положения будут продолжать своё действие, а Пользователь будет обязан продолжать
исполнять свои обязанности в соответствии с этими положениями.

View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<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.core.objects-implementations</groupId>
<artifactId>repository-implementation</artifactId>
<version>1.10.0</version>
</parent>
<artifactId>repository-producing</artifactId>
<groupId>ru.entaxy.esb.platform.runtime.core.objects-implementations.repository-implementation</groupId>
<packaging>bundle</packaging>
<name>ENTAXY :: PLATFORM :: CORE :: OBJECTS IMPLEMENTATION :: REPOSITORY :: PRODUCING</name>
<description>ENTAXY :: PLATFORM :: CORE :: OBJECTS IMPLEMENTATION :: REPOSITORY :: PRODUCING</description>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Entaxy-Factory-Provider>true</Entaxy-Factory-Provider>
<Entaxy-Template-Provider>true</Entaxy-Template-Provider>
<Entaxy-Extensions-Provider>true</Entaxy-Extensions-Provider>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,135 @@
{
"factory": {
"id": "artifact-repository",
"type": "entaxy.runtime.repository",
"description": "Factory artifact-repository of entaxy.runtime.repository. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/deployer/karaf-repository.html#_кастомные_репозитории\">Entaxy docs</a>",
"isAbstract": false
},
"entaxy.runtime.repository": {
},
"fields": {
"repo_name": {
"displayName": "Name",
"type": "String",
"required": true,
"isHidden": true,
"defaultValue": {
"@CALCULATED": {
"expression": "${objectId}",
"lazy": false
}
}
},
"repo_location": {
"displayName": "Location",
"description": "Path to repository directory. If empty repository created at {Entaxy Home}/data/cave/repository/{Object Id}. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/deployer/karaf-repository.html#_кастомные_репозитории\">Entaxy docs</a>",
"type": "String"
},
"repo_proxy": {
"displayName": "Proxy",
"description": "Enable to use remote repositories. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/deployer/karaf-repository.html#_кастомные_репозитории\">Entaxy docs</a>",
"type": "Boolean",
"group": "remotes",
"required": true,
"defaultValue": false
},
"repo_mirror": {
"displayName": "Mirror",
"description": "Enable storing a copy of the artifact in the local repository when using a proxy. Required when downloading artifacts from remote repositories. Not required for uploading artifacts to a remote repository. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/deployer/karaf-repository.html#_кастомные_репозитории\">Entaxy docs</a>",
"type": "Boolean",
"group": "remotes"
},
"repo_remotes": {
"displayName": "Remotes",
"description": "Remote repository address. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/deployer/karaf-repository.html#_кастомные_репозитории\">Entaxy docs</a>",
"type": "String",
"group": "remotes"
},
"repo_readOnly": {
"displayName": "Read Only",
"description": "Activates read-only mode. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/deployer/karaf-repository.html#_кастомные_репозитории\">Entaxy docs</a>",
"type": "Boolean",
"required": true,
"defaultValue": false
},
"repo_copyOnChange": {
"displayName": "Copy On Change",
"isHidden": true,
"type": "Boolean"
},
"repo_username": {
"description": "Specifies the username used to authenticate when accessing to remote repository. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/deployer/karaf-repository.html#_кастомные_репозитории\">Entaxy docs</a>",
"displayName": "Username",
"type": "String",
"group": "remotes"
},
"repo_password": {
"description": "Specifies the password associated with username for authentication when accessing to remote repository. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/deployer/karaf-repository.html#_кастомные_репозитории\">Entaxy docs</a>",
"displayName": "Password",
"type": "password",
"group": "remotes"
},
"repo_snapshots": {
"description": "Determines whether this repository should be used for downloading snapshot artifacts. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/deployer/karaf-repository.html#_кастомные_репозитории\">Entaxy docs</a>",
"displayName": "Snapshots",
"type": "Boolean"
},
"repo_enabled": {
"displayName": "Enabled",
"type": "Boolean",
"required": true,
"isHidden": true,
"defaultValue": true
},
"repo_remoteHostSuffix": {
"description": "Specifies the suffix appended to the base URL of the remote repository, forming the full access URL (e.g., if the base URL is https://nexus.entaxy.ru, and the the suffix is /nexus/, the full URL will become https://nexus.entaxy.ru/nexus/). For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/deployer/karaf-repository.html#_кастомные_репозитории\">Entaxy docs</a>",
"displayName": "Remote Host Suffix",
"type": "String",
"group": "remotes"
},
"repo_system": {
"displayName": "System",
"type": "Boolean",
"required": true,
"isHidden": true,
"defaultValue": false
},
"repo_lookupEnabled": {
"displayName": "Lookup Enabled",
"description": "Add the repository to the list of repositories to search for artifacts (org.ops4j.pax.url.mvn.repositories). For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/deployer/karaf-repository.html#_кастомные_репозитории\">Entaxy docs</a>",
"type": "Boolean",
"required": true,
"defaultValue": true
}
},
"outputs": {
"init": {
"isDefault": true,
"fields": {
"repo_name": {},
"repo_location": {},
"repo_proxy": {},
"repo_mirror": {},
"repo_remotes": {},
"repo_readOnly": {},
"repo_copyOnChange": {},
"repo_username": {},
"repo_password": {},
"repo_snapshots": {},
"repo_enabled": {},
"repo_remoteHostSuffix": {},
"repo_system": {},
"repo_lookupEnabled": {}
},
"config": {
"configurable": true,
"fieldsConfigurableByDefault": true,
"configurableFields": {
"includePatterns": ["repo_*"],
"excludeNames": ["##publish"]
}
}
}
}
}

View File

@ -0,0 +1,24 @@
[#ftl attributes={"generated.type":"blueprint"}]
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
[#import "templates:object-commons/common-utils.ftl" as utils]
<!--
factoryId: artifact-repository
factoryType: entaxy.runtime.repository
outputType: init
-->
<bean id="repository-[=objectId]" class="ru.entaxy.platform.core.artifact.repository.impl.RepositoryConfigurableHelper" activation="eager">
[=utils.createBeanProperties(properties, "repo_", true, ["##publish"])]
</bean>
<service id="repository-[=objectId]-service" ref="repository-[=objectId]" interface="ru.entaxy.platform.core.artifact.repository.RepositoryDescriptor" activation="eager">
<service-properties>
<entry key="repository.id" value="[=objectId]" />
</service-properties>
</service>
</blueprint>

View File

@ -0,0 +1,41 @@
{
"component": {
"kind": "model",
"name": "redeliveryPolicy",
"title": "Redelivery Policy",
"description": "To configure re-delivery for error handling",
"deprecated": false,
"label": "configuration",
"javaType": "org.apache.camel.model.RedeliveryPolicyDefinition",
"artifactId": "camel-core-engine",
"input": false,
"output": false
},
"componentProperties": {},
"properties": {
"maximumRedeliveries": { "kind": "attribute", "displayName": "Maximum Redeliveries", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "secret": false, "description": "Sets the maximum redeliveries x = redeliver at most x times 0 = no redeliveries -1 = redeliver forever" },
"redeliveryDelay": { "kind": "attribute", "displayName": "Redelivery Delay", "required": false, "type": "duration", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "Sets the initial redelivery delay" },
"asyncDelayedRedelivery": { "kind": "attribute", "displayName": "Async Delayed Redelivery", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Allow synchronous delayed redelivery. The route, in particular the consumer's component, must support the Asynchronous Routing Engine (e.g. seda)." },
"backOffMultiplier": { "kind": "attribute", "displayName": "Back Off Multiplier", "required": false, "type": "number", "javaType": "java.lang.Double", "deprecated": false, "secret": false, "description": "Sets the back off multiplier" },
"useExponentialBackOff": { "kind": "attribute", "displayName": "Use Exponential Back Off", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Turn on exponential backk off" },
"collisionAvoidanceFactor": { "kind": "attribute", "displayName": "Collision Avoidance Factor", "required": false, "type": "number", "javaType": "java.lang.Double", "deprecated": false, "secret": false, "description": "Sets the collision avoidance factor" },
"useCollisionAvoidance": { "kind": "attribute", "displayName": "Use Collision Avoidance", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Turn on collision avoidance." },
"maximumRedeliveryDelay": { "kind": "attribute", "displayName": "Maximum Redelivery Delay", "required": false, "type": "duration", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "Sets the maximum delay between redelivery" },
"retriesExhaustedLogLevel": { "kind": "attribute", "displayName": "Retries Exhausted Log Level", "required": false, "type": "object", "javaType": "org.apache.camel.LoggingLevel", "deprecated": false, "secret": false, "description": "Sets the logging level to use when retries has exhausted" },
"retryAttemptedLogLevel": { "kind": "attribute", "displayName": "Retry Attempted Log Level", "required": false, "type": "object", "javaType": "org.apache.camel.LoggingLevel", "deprecated": false, "secret": false, "description": "Sets the logging level to use for logging retry attempts" },
"retryAttemptedLogInterval": { "kind": "attribute", "displayName": "Retry Attempted Log Interval", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "secret": false, "description": "Sets the interval to use for logging retry attempts" },
"logRetryAttempted": { "kind": "attribute", "displayName": "Log Retry Attempted", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Sets whether retry attempts should be logged or not. Can be used to include or reduce verbose." },
"logStackTrace": { "kind": "attribute", "displayName": "Log Stack Trace", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Sets whether stack traces should be logged. Can be used to include or reduce verbose." },
"logRetryStackTrace": { "kind": "attribute", "displayName": "Log Retry Stack Trace", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Sets whether stack traces should be logged when an retry attempt failed. Can be used to include or reduce verbose." },
"logHandled": { "kind": "attribute", "displayName": "Log Handled", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Sets whether handled exceptions should be logged or not. Can be used to include or reduce verbose." },
"logNewException": { "kind": "attribute", "displayName": "Log New Exception", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Sets whether new exceptions should be logged or not. Can be used to include or reduce verbose. A new exception is an exception that was thrown while handling a previous exception." },
"logContinued": { "kind": "attribute", "displayName": "Log Continued", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Sets whether continued exceptions should be logged or not. Can be used to include or reduce verbose." },
"logExhausted": { "kind": "attribute", "displayName": "Log Exhausted", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Sets whether exhausted exceptions should be logged or not. Can be used to include or reduce verbose." },
"logExhaustedMessageHistory": { "kind": "attribute", "displayName": "Log Exhausted Message History", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Sets whether exhausted exceptions should be logged including message history or not (supports property placeholders). Can be used to include or reduce verbose." },
"logExhaustedMessageBody": { "kind": "attribute", "displayName": "Log Exhausted Message Body", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Sets whether exhausted message body should be logged including message history or not (supports property placeholders). Can be used to include or reduce verbose. Requires logExhaustedMessageHistory to be enabled." },
"disableRedelivery": { "kind": "attribute", "displayName": "Disable Redelivery", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Disables redelivery (same as setting maximum redeliveries to 0)" },
"delayPattern": { "kind": "attribute", "displayName": "Delay Pattern", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "Sets the delay pattern with delay intervals." },
"allowRedeliveryWhileStopping": { "kind": "attribute", "displayName": "Allow Redelivery While Stopping", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Controls whether to allow redelivery while stopping\/shutting down a route that uses error handling." },
"exchangeFormatterRef": { "kind": "attribute", "displayName": "Exchange Formatter Ref", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "Sets the reference of the instance of org.apache.camel.spi.ExchangeFormatter to generate the log message from exchange." }
}
}

View File

@ -0,0 +1,95 @@
/*-
* ~~~~~~licensing~~~~~~
* route-producing
* ==========
* Copyright (C) 2020 - 2024 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.routes.design.library;
import java.util.List;
import org.osgi.framework.Filter;
public interface ComponentLibrary {
String COMPONENT_LIBRARY_PROVIDER_HEADER = "Entaxy-Component-Library-Provider";
String COMPONENT_LIBRARY_RESOURCE_PROTOCOL = "component-library";
String getName();
String getUrl();
List<Schema> getSchemas();
default Filter getObjectFilter() {
return null;
};
public interface Schema {
String getRoot();
default String getRootUrl() {
return getRoot();
}
String getNamespace();
String getPrefix();
boolean isPublic();
default ComponentLibrary getLibrary() {
return null;
};
default Filter getObjectFilter() {
return null;
};
List<Transformation> getTransformations();
String getUiDescriptor();
}
public interface Transformation {
String getProcessor();
String getSource();
default String getSourceUrl() {
return getSource();
}
default Filter getObjectFilter() {
return null;
};
default ComponentLibrary.Schema getSchema() {
return null;
}
}
}

View File

@ -0,0 +1,49 @@
/*-
* ~~~~~~licensing~~~~~~
* route-producing
* ==========
* Copyright (C) 2020 - 2024 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.routes.design.library;
import java.util.List;
import java.util.Map;
public interface ComponentLibraryManager {
List<ComponentLibrary> getLibraries();
List<ComponentLibrary> getLibrariesForContext(Map<String, Object> context);
List<ComponentLibrary.Schema> getSchemasForNamespace(String namespace);
List<ComponentLibrary.Schema> getSchemasForPrefix(String prefix);
List<ComponentLibrary.Schema> getSchemasForContext(Map<String, Object> context);
List<ComponentLibrary.Schema> getAllSchemas();
List<ComponentLibrary.Schema> getAllSchemasWithUiDescriptor();
List<ComponentLibrary.Transformation> getTransformationsForContext(Map<String, Object> context);
}

View File

@ -0,0 +1,108 @@
/*-
* ~~~~~~licensing~~~~~~
* route-producing
* ==========
* Copyright (C) 2020 - 2024 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.routes.design.library;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;
import org.osgi.service.component.annotations.ReferenceCardinality;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ru.entaxy.platform.core.producer.resources.EntaxyResourceProducingProcessor;
import ru.entaxy.platform.core.producer.resources.EntaxyResourceProducingProcessorService;
@Component(service = EntaxyResourceProducingProcessor.class, immediate = true)
public class ComponentLibraryResourceProcessor implements EntaxyResourceProducingProcessor {
private static final Logger LOG = LoggerFactory.getLogger(ComponentLibraryResourceProcessor.class);
@Reference(cardinality = ReferenceCardinality.MANDATORY)
EntaxyResourceProducingProcessorService producingProcessorService;
@Reference(cardinality = ReferenceCardinality.MANDATORY)
ComponentLibraryManager componentLibraryManager;
@Override
public String getName() {
return "component-library";
}
@SuppressWarnings("unchecked")
@Override
public Object process(Object value, Map<String, Object> properties) throws Exception {
LOG.debug("\n\t ComponentLibraryResourceProcessor:");
LOG.debug("\n\t" + properties.toString());
Map<String, Object> parameters;
if (properties.containsKey("resourceContext") && (properties.get("resourceContext") instanceof Map))
parameters = new HashMap<>((Map<String, Object>) properties.get("resourceContext"));
else
parameters = new HashMap<>(properties);
if (properties.containsKey("parameters") && (properties.get("parameters") instanceof Map))
parameters.putAll((Map<String, Object>) properties.get("parameters"));
// List<ComponentLibrary> libraries =
// componentLibraryManager.getLibrariesForContext(parameters);
// List<ComponentLibrary.Schema> schemas =
// componentLibraryManager.getSchemasForContext(parameters);
List<ComponentLibrary.Transformation> transformations =
componentLibraryManager.getTransformationsForContext(parameters);
LOG.info("\n\t TO APPLY:"
+ "\n\tTRANSFORMATIONS:\n\t"
+ transformations.stream().map(t -> "[" + t.getProcessor() + "] " + t.getSource())
.collect(Collectors.joining("\n\t")));
Object result = value;
for (ComponentLibrary.Transformation transformation : transformations) {
Map<String, Object> processorProperties = new HashMap<>();
processorProperties.put(PROP_PROCESSOR, transformation.getProcessor());
processorProperties.put("source", transformation.getSourceUrl());
processorProperties.put("parameters", parameters);
LOG.info("\n EXEC TRANSFORM: [{}]/[{}]/[{}]/[{}]\nWITH PROPERTIES:\n{}", transformation.getSourceUrl(),
transformation.getProcessor(), transformation.getSchema().getRoot(),
transformation.getSchema().getLibrary().getName(),
processorProperties);
result = producingProcessorService.process(result, processorProperties);
}
return result;
}
}

View File

@ -0,0 +1,326 @@
/*-
* ~~~~~~licensing~~~~~~
* route-producing
* ==========
* Copyright (C) 2020 - 2024 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.routes.design.library.impl;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
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.service.component.ComponentContext;
import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Deactivate;
import org.osgi.service.component.annotations.Reference;
import org.osgi.service.component.annotations.ReferenceCardinality;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ru.entaxy.esb.resources.EntaxyResourceURLFactory;
import ru.entaxy.platform.base.support.CommonUtils;
import ru.entaxy.platform.routes.design.library.ComponentLibrary;
import ru.entaxy.platform.routes.design.library.ComponentLibrary.Schema;
import ru.entaxy.platform.routes.design.library.ComponentLibrary.Transformation;
import ru.entaxy.platform.routes.design.library.ComponentLibraryManager;
import ru.entaxy.platform.routes.design.library.storage.ComponentLibraryStorage;
@Component(service = ComponentLibraryManager.class, immediate = true)
public class ComponentLibraryManagerImpl implements ComponentLibraryManager, ComponentLibraryStorage.StorageListener {
private static final Logger LOG = LoggerFactory.getLogger(ComponentLibraryManagerImpl.class);
@Reference(cardinality = ReferenceCardinality.MANDATORY)
ComponentLibraryStorage libraryStorage;
protected List<ComponentLibrary> libraries = new ArrayList<>();
protected List<ComponentLibrary.Schema> schemas = new ArrayList<>();
protected List<ComponentLibrary.Transformation> transformations = new ArrayList<>();
protected Object librariesLock = new Object();
@Activate
public void activate(ComponentContext componentContext) {
initialize();
this.libraryStorage.registerListener(this);
}
@Deactivate
public void deactivate(ComponentContext componentContext) {
this.libraryStorage.unregisterListener(this);
}
protected void initialize() {
synchronized (librariesLock) {
this.libraries = wrap(libraryStorage.getLibraries());
for (ComponentLibrary lib : libraries)
for (ComponentLibrary.Schema schema : lib.getSchemas()) {
schemas.add(schema);
for (ComponentLibrary.Transformation transformation : schema.getTransformations()) {
transformations.add(transformation);
}
}
}
}
protected void reload() {
synchronized (librariesLock) {
libraries.clear();
schemas.clear();
transformations.clear();
}
initialize();
}
@Override
public List<ComponentLibrary> getLibraries() {
return this.libraries;
}
@Override
public List<ComponentLibrary> getLibrariesForContext(Map<String, Object> context) {
return this.libraries.stream().filter(l -> l.getObjectFilter() == null || l.getObjectFilter().matches(context))
.collect(Collectors.toList());
}
@Override
public List<Schema> getSchemasForNamespace(String namespace) {
return this.schemas.stream().filter(s -> s.getNamespace().equals(namespace))
.collect(Collectors.toList());
}
@Override
public List<Schema> getSchemasForPrefix(String prefix) {
return this.schemas.stream().filter(s -> s.getPrefix().equals(prefix))
.collect(Collectors.toList());
}
@Override
public List<Schema> getSchemasForContext(Map<String, Object> context) {
return this.schemas.stream().filter(s -> s.getObjectFilter() == null || s.getObjectFilter().matches(context))
.collect(Collectors.toList());
}
@Override
public List<Schema> getAllSchemas() {
return this.schemas;
}
@Override
public List<Schema> getAllSchemasWithUiDescriptor() {
return this.schemas.stream().filter(s -> CommonUtils.isValid(s.getUiDescriptor())).collect(Collectors.toList());
}
@Override
public List<Transformation> getTransformationsForContext(Map<String, Object> context) {
return this.transformations.stream()
.filter(t -> t.getObjectFilter() == null || t.getObjectFilter().matches(context))
.collect(Collectors.toList());
}
/* ComponentLibraryStorage.StorageListener */
@Override
public void storageUpdated() {
reload();
}
protected URL resolve(ComponentLibrary library, String relative) {
try {
URL libraryUrl = new URL(library.getUrl() + "/");
URI uri = libraryUrl.toURI().resolve(relative);
return uri.toURL();
} catch (URISyntaxException | MalformedURLException e) {
LOG.error(String.format("Error resolving url [%s] for library [%s]", relative, library.getName()), e);
return null;
}
}
/* wrappers */
protected List<ComponentLibrary> wrap(List<ComponentLibrary> originList) {
return originList.stream().map(l -> new LibraryWrapper(l)).collect(Collectors.toList());
}
protected class LibraryWrapper implements ComponentLibrary {
ComponentLibrary origin;
List<ComponentLibrary.Schema> wrappedSchemas = null;
public LibraryWrapper(ComponentLibrary origin) {
this.origin = origin;
}
@Override
public String getName() {
return origin.getName();
}
@Override
public String getUrl() {
try {
return EntaxyResourceURLFactory.getGlobalUrl(origin.getUrl()).toString();
} catch (MalformedURLException e) {
LOG.error("Error getting global URL for [{}]", origin.getUrl());
return origin.getUrl();
}
}
@Override
public List<Schema> getSchemas() {
if (wrappedSchemas == null) {
wrappedSchemas = new ArrayList<>();
for (ComponentLibrary.Schema schema : origin.getSchemas())
wrappedSchemas.add(new SchemaWrapper(schema, this));
}
return wrappedSchemas;
}
@Override
public Filter getObjectFilter() {
return origin.getObjectFilter();
}
}
protected class SchemaWrapper implements ComponentLibrary.Schema {
ComponentLibrary library;
ComponentLibrary.Schema origin;
List<ComponentLibrary.Transformation> wrappedTransformations = null;
public SchemaWrapper(ComponentLibrary.Schema origin, ComponentLibrary library) {
this.library = library;
this.origin = origin;
}
@Override
public String getRoot() {
return origin.getRoot();
}
@Override
public String getRootUrl() {
URL resolved = resolve(library, getRoot());
if (resolved != null)
return resolved.toString();
return getRoot();
}
@Override
public String getNamespace() {
return origin.getNamespace();
}
@Override
public String getPrefix() {
return origin.getPrefix();
}
@Override
public boolean isPublic() {
return origin.isPublic();
}
@Override
public List<Transformation> getTransformations() {
if (wrappedTransformations == null) {
wrappedTransformations = new ArrayList<>();
for (ComponentLibrary.Transformation transformation : origin.getTransformations())
wrappedTransformations.add(new TransformationWrapper(transformation, this));
}
return wrappedTransformations;
}
@Override
public ComponentLibrary getLibrary() {
return this.library;
}
@Override
public Filter getObjectFilter() {
Filter originFilter = origin.getObjectFilter();
return originFilter == null ? library.getObjectFilter() : originFilter;
}
@Override
public String getUiDescriptor() {
return origin.getUiDescriptor();
}
}
protected class TransformationWrapper implements ComponentLibrary.Transformation {
ComponentLibrary.Transformation origin;
ComponentLibrary.Schema schema;
public TransformationWrapper(ComponentLibrary.Transformation origin, ComponentLibrary.Schema schema) {
this.origin = origin;
this.schema = schema;
}
@Override
public String getProcessor() {
return origin.getProcessor();
}
@Override
public String getSource() {
return origin.getSource();
}
@Override
public String getSourceUrl() {
if (!CommonUtils.isValid(getSource()))
return null;
URL resolved = resolve(schema.getLibrary(), getSource());
if (resolved != null)
return resolved.toString();
return getSource();
}
@Override
public Schema getSchema() {
return this.schema;
}
@Override
public Filter getObjectFilter() {
Filter originFilter = origin.getObjectFilter();
return originFilter == null ? schema.getObjectFilter() : originFilter;
}
}
}

View File

@ -0,0 +1,65 @@
/*-
* ~~~~~~licensing~~~~~~
* route-producing
* ==========
* Copyright (C) 2020 - 2024 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.routes.design.library.shell;
import java.util.stream.Collectors;
import org.apache.karaf.shell.api.action.Action;
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.routes.design.library.ComponentLibrary;
@Service
@Command(scope = ComponentLibraryCommandSupport.COMMAND_SCOPE, name = "component-library-list")
public class CommandLibraryList extends ComponentLibraryCommandSupport implements Action {
@Override
public Object execute() throws Exception {
ShellTableExt tableExt = new ShellTableExt();
tableExt.column("Name");
tableExt.column("Url");
tableExt.column("Filter");
tableExt.column("Schemas");
for (ComponentLibrary library : componentLibraryManager.getLibraries()) {
tableExt.addRow().addContent(
library.getName(),
library.getUrl(),
library.getObjectFilter() == null ? "" : library.getObjectFilter().toString(),
library.getSchemas().stream().map(s -> s.getRoot() + " [" + s.getRootUrl() + "]")
.collect(Collectors.joining("\n")));
}
// output to console
tableExt.print(System.out);
return null;
}
}

View File

@ -0,0 +1,39 @@
/*-
* ~~~~~~licensing~~~~~~
* route-producing
* ==========
* Copyright (C) 2020 - 2024 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.routes.design.library.shell;
import org.apache.karaf.shell.api.action.lifecycle.Reference;
import ru.entaxy.platform.routes.design.library.ComponentLibraryManager;
public class ComponentLibraryCommandSupport {
public static final String COMMAND_SCOPE = "entaxy";
@Reference
ComponentLibraryManager componentLibraryManager;
}

View File

@ -0,0 +1,55 @@
/*-
* ~~~~~~licensing~~~~~~
* route-producing
* ==========
* Copyright (C) 2020 - 2024 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.routes.design.library.storage;
import java.util.ArrayList;
import java.util.List;
import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.Component;
import ru.entaxy.esb.resources.EntaxyResourceProcessor;
import ru.entaxy.esb.resources.EntaxyResourceProviderProxy;
import ru.entaxy.esb.resources.impl.AbstractResourceProviderProxy;
import ru.entaxy.platform.routes.design.library.ComponentLibrary;
@Component(service = EntaxyResourceProviderProxy.class, immediate = true)
public class ComponentLibraryResourceProvider extends AbstractResourceProviderProxy {
@Activate
public void activate() {
setProtocol(ComponentLibrary.COMPONENT_LIBRARY_RESOURCE_PROTOCOL);
setTargetProtocol("entaxy-file-internal");
setTargetPath(".component-library");
List<EntaxyResourceProcessor> processors = new ArrayList<>();
setProcessors(processors);
}
}

View File

@ -0,0 +1,392 @@
/*-
* ~~~~~~licensing~~~~~~
* route-producing
* ==========
* Copyright (C) 2020 - 2024 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.routes.design.library.storage;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.Type;
import java.util.ArrayList;
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.Filter;
import org.osgi.framework.FrameworkUtil;
import org.osgi.framework.InvalidSyntaxException;
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.Deactivate;
import org.osgi.service.component.annotations.Reference;
import org.osgi.service.component.annotations.ReferenceCardinality;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.reflect.TypeToken;
import ru.entaxy.esb.resources.EntaxyResource;
import ru.entaxy.esb.resources.EntaxyResourceProvider;
import ru.entaxy.platform.base.support.CommonUtils;
import ru.entaxy.platform.base.support.JSONUtils;
import ru.entaxy.platform.routes.design.library.ComponentLibrary;
import ru.entaxy.platform.routes.design.library.storage.ProvidedLibraryDescriptor.ProvidedLibraryResource;
@Component(service = ComponentLibraryStorage.class, immediate = true)
public class ComponentLibraryStorage {
private static final Logger LOG = LoggerFactory.getLogger(ComponentLibraryStorage.class);
protected static final String PROVIDER_FILTER =
"(protocol=" + ComponentLibrary.COMPONENT_LIBRARY_RESOURCE_PROTOCOL + ")";
public static final String LIBRARY_DESCRIPTOR_NAME = "library.json";
protected static final String LIBRARIES_RESOURCE = "libraries.json";
@Reference(cardinality = ReferenceCardinality.MANDATORY, target = PROVIDER_FILTER)
EntaxyResourceProvider resourceProvider;
protected BundleContext bundleContext;
// protected ComponentLibraryTracker libraryTracker;
protected EntaxyResource librariesResource;
protected Libraries libraries;
protected Object librariesLock = new Object();
@Activate
public void activate(ComponentContext componentContext) {
this.bundleContext = componentContext.getBundleContext();
reload();
/*
if (libraryTracker != null)
libraryTracker.close();
libraryTracker = ComponentLibraryTracker.create(this, this.bundleContext);
libraryTracker.open();
*/
}
@Deactivate
public void deactivate() {
/*
if (libraryTracker != null)
libraryTracker.close();
*/
}
protected void load() {
librariesResource = resourceProvider.getResource(LIBRARIES_RESOURCE);
if (!librariesResource.exists()) {
libraries = new Libraries();
try {
updateLibrariesResource();
} catch (IOException e) {
LOG.error("Error saving [" + LIBRARIES_RESOURCE + "]", e);
}
} else {
libraries = new Libraries(librariesResource.getAsString());
}
}
protected void updateLibrariesResource() throws IOException {
try (InputStream is = new ByteArrayInputStream(libraries.toJson().toString().getBytes())) {
librariesResource.save(is);
}
}
public void reload() {
load();
}
synchronized public void addLibrary(ProvidedLibraryDescriptor descriptor, Library library) {
Library existing = libraries.get(library.getName());
long bundleLastModified = descriptor.bundle.getLastModified();
if (existing != null) {
if (existing.lastModified != bundleLastModified) {
LOG.info("Library [{}] must be updated", library.getName());
synchronized (librariesLock) {
try {
uploadLibraryResources(descriptor);
} catch (Exception e) {
LOG.error(String.format("Error uploading resources for library [%s]", library.getName()), e);
}
libraries.update(library, bundleLastModified);
try {
updateLibrariesResource();
LOG.info("Updated library [{}]", library.getName());
notifyListeners();
} catch (IOException e) {
LOG.error("Error updating libraries", e);
}
}
} else {
LOG.info("Library [{}] not changed", library.getName());
}
} else {
LOG.info("Adding new library [{}]", library.getName());
library.lastModified = descriptor.bundle.getLastModified();
synchronized (librariesLock) {
try {
uploadLibraryResources(descriptor);
} catch (Exception e) {
LOG.error(String.format("Error uploading resources for library [%s]", library.getName()), e);
}
libraries.add(library);
try {
updateLibrariesResource();
LOG.info("Added new library [{}]", library.getName());
notifyListeners();
} catch (IOException e) {
LOG.error("Error updating libraries", e);
}
}
}
}
protected void uploadLibraryResources(ProvidedLibraryDescriptor descriptor) throws Exception {
for (ProvidedLibraryResource provided : descriptor.getLibraryResources()) {
String targetPath = descriptor.libraryName + "/" + provided.path;
EntaxyResource resource = resourceProvider.getResource(targetPath);
try (InputStream is = provided.url.openStream()) {
resource.save(is);
} catch (IOException e) {
LOG.error(String.format("Error uploading resource [%s]", targetPath), e);
throw e;
}
}
}
public List<ComponentLibrary> getLibraries() {
return libraries.librariesMap.values().stream().map(l -> (ComponentLibrary) l).collect(Collectors.toList());
}
protected class Libraries {
Map<String, Library> librariesMap;
Object librariesMapLock = new Object();
public Libraries() {
librariesMap = new HashMap<>();
}
public Libraries(String jsonOrigin) {
JsonObject jo = JSONUtils.getJsonRootObject(jsonOrigin);
Type type = new TypeToken<HashMap<String, Library>>() {}.getType();
librariesMap = JSONUtils.GSON.fromJson(jo, type);
for (Library lib : librariesMap.values())
lib.libraryUrl = resourceProvider.getResource(lib.getName()).getURL();
}
public JsonElement toJson() {
return JSONUtils.GSON.toJsonTree(librariesMap);
}
public Library get(String libraryName) {
return librariesMap.get(libraryName);
}
public void add(Library library) {
synchronized (librariesMapLock) {
library.libraryUrl = resourceProvider.getResource(library.getName()).getURL();
this.librariesMap.put(library.getName(), library);
}
}
public void update(Library library, long lastModified) {
this.librariesMap.get(library.getName()).update(library);
this.librariesMap.get(library.getName()).lastModified = lastModified;
}
}
public static abstract class ObjectFilterAware {
public String objectFilter;
transient Filter targetFilter = null;
public Filter getObjectFilter() {
if (!CommonUtils.isValid(objectFilter))
return null;
if (targetFilter == null) {
try {
return FrameworkUtil.createFilter(objectFilter);
} catch (InvalidSyntaxException e) {
LOG.error(String.format("Error creating filter for [%s]", objectFilter), e);
}
}
return targetFilter;
}
}
public static class Library extends ObjectFilterAware implements ComponentLibrary {
public String library;
public long lastModified = -1;
public List<IncludedSchema> schemas;
transient public String libraryUrl;
@Override
public String getName() {
return library;
}
@Override
public String getUrl() {
return libraryUrl;
}
public void update(Library library) {
this.lastModified = library.lastModified;
if (this.schemas == null) {
this.schemas = new ArrayList<>();
} else {
this.schemas.clear();
}
if (library.schemas != null)
this.schemas.addAll(library.schemas);
}
@Override
public List<ComponentLibrary.Schema> getSchemas() {
return this.schemas.stream().map(s -> (ComponentLibrary.Schema) s).collect(Collectors.toList());
}
public static class IncludedSchema extends ObjectFilterAware implements ComponentLibrary.Schema {
public String root;
public String namespace;
public String prefix;
public boolean isPublic;
public List<Map<String, Object>> transform;
public String uiDescriptor;
transient List<IncludedTransformation> transformations = null;
@Override
public String getRoot() {
return root;
}
@Override
public String getNamespace() {
return namespace;
}
@Override
public String getPrefix() {
return prefix;
}
@Override
public boolean isPublic() {
return isPublic;
}
@Override
public List<Transformation> getTransformations() {
if (this.transformations == null) {
this.transformations = new ArrayList<>();
for (Map<String, Object> transformationData : transform) {
transformations.add(new IncludedTransformation(transformationData));
}
}
return this.transformations.stream().map(t -> (ComponentLibrary.Transformation) t)
.collect(Collectors.toList());
}
@Override
public String getUiDescriptor() {
return uiDescriptor;
}
}
public static class IncludedTransformation extends ObjectFilterAware
implements ComponentLibrary.Transformation {
protected Map<String, Object> data;
public IncludedTransformation(Map<String, Object> data) {
this.data = new HashMap<>(data);
this.objectFilter = data.getOrDefault("objectFilter", "").toString();
}
@Override
public String getProcessor() {
return data.getOrDefault("processor", "unknown").toString();
}
@Override
public String getSource() {
return data.getOrDefault("source", "unknown").toString();
}
}
}
protected List<StorageListener> listeners = new ArrayList<>();
protected Object listenersLock = new Object();
public void registerListener(StorageListener listener) {
synchronized (listenersLock) {
if (!listeners.contains(listener))
listeners.add(listener);
}
}
public void unregisterListener(StorageListener listener) {
synchronized (listenersLock) {
listeners.remove(listener);
}
}
protected void notifyListeners() {
synchronized (listenersLock) {
for (StorageListener listener : listeners)
listener.storageUpdated();
}
}
public interface StorageListener {
void storageUpdated();
}
}

View File

@ -0,0 +1,107 @@
/*-
* ~~~~~~licensing~~~~~~
* route-producing
* ==========
* Copyright (C) 2020 - 2024 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.routes.design.library.storage;
import java.net.URL;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.List;
import org.osgi.framework.Bundle;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ru.entaxy.platform.routes.design.library.ComponentLibrary;
public class ProvidedLibraryDescriptor {
private static final Logger LOG = LoggerFactory.getLogger(ProvidedLibraryDescriptor.class);
public static final String LIBRARY_PATH = "/ru/entaxy/" + ComponentLibrary.COMPONENT_LIBRARY_RESOURCE_PROTOCOL;
public Bundle bundle;
public String libraryPath;
public String libraryName;
protected List<ProvidedLibraryResource> libraryResources = null;
public ProvidedLibraryDescriptor(Bundle bundle, String path, String name) {
this.bundle = bundle;
this.libraryPath = path;
this.libraryName = name;
}
public List<ProvidedLibraryResource> getLibraryResources() {
if (libraryResources == null) {
libraryResources = new ArrayList<>();
Enumeration<URL> entries = bundle.findEntries(libraryPath, "*.*", true);
if (entries != null) {
while (entries.hasMoreElements()) {
URL entry = entries.nextElement();
String entryUrl = entry.toString();
if (entryUrl.endsWith("/"))
continue;
String resourcePath = entryUrl.substring(entryUrl.indexOf(libraryPath) + libraryPath.length());
/*
if (resourcePath.equals(ComponentLibraryStorage.LIBRARY_DESCRIPTOR_NAME))
continue;
*/
String resourceName = null;
int index = resourcePath.lastIndexOf('/');
if (index < 0)
resourceName = resourcePath;
else
resourceName = resourcePath.substring(index + 1);
ProvidedLibraryResource resource = new ProvidedLibraryResource();
resource.url = entry;
resource.path = resourcePath;
resource.name = resourceName;
libraryResources.add(resource);
}
}
}
return libraryResources;
}
public static class ProvidedLibraryResource {
URL url;
String name;
String path;
}
}

View File

@ -0,0 +1,223 @@
/*-
* ~~~~~~licensing~~~~~~
* route-producing
* ==========
* Copyright (C) 2020 - 2024 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.routes.design.library.tracker;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.List;
import java.util.Map;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.BundleEvent;
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.Deactivate;
import org.osgi.service.component.annotations.Reference;
import org.osgi.service.component.annotations.ReferenceCardinality;
import org.osgi.util.tracker.BundleTracker;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.gson.JsonObject;
import ru.entaxy.platform.base.support.CommonUtils;
import ru.entaxy.platform.base.support.JSONUtils;
import ru.entaxy.platform.base.support.osgi.tracker.BundleTrackerCustomizerListener;
import ru.entaxy.platform.base.support.osgi.tracker.BundleTrackerUtils;
import ru.entaxy.platform.base.support.osgi.tracker.UniformBundleTrackerCustomizer;
import ru.entaxy.platform.base.support.osgi.tracker.filter.BundleHeaderFilter;
import ru.entaxy.platform.routes.design.library.ComponentLibrary;
import ru.entaxy.platform.routes.design.library.storage.ComponentLibraryStorage;
import ru.entaxy.platform.routes.design.library.storage.ComponentLibraryStorage.Library;
import ru.entaxy.platform.routes.design.library.storage.ProvidedLibraryDescriptor;
@Component(service = ComponentLibraryTracker.class, immediate = true)
public class ComponentLibraryTracker {
private static final Logger LOG = LoggerFactory.getLogger(ComponentLibraryTracker.class);
public static ComponentLibraryTracker create(ComponentLibraryStorage storage, BundleContext bundleContext) {
return new ComponentLibraryTracker(storage, bundleContext);
}
@Reference(cardinality = ReferenceCardinality.MANDATORY)
protected ComponentLibraryStorage storage;
protected BundleContext bundleContext;
protected BundleTracker<List<ProvidedLibraryDescriptor>> tracker;
public ComponentLibraryTracker() {
super();
}
@Activate
public void activate(ComponentContext componentContext) {
this.bundleContext = componentContext.getBundleContext();
tracker = BundleTrackerUtils.<List<ProvidedLibraryDescriptor>>createBuilder()
.addFilter(
(new BundleHeaderFilter()).header(ComponentLibrary.COMPONENT_LIBRARY_PROVIDER_HEADER))
.customizer(
(new LibraryTrackerCusomizer())
.listener(new LibraryTrackerCusomizerListener()))
.bundleState(Bundle.ACTIVE | Bundle.INSTALLED | Bundle.RESOLVED)
.get();
tracker.open();
}
@Deactivate
public void deactivate() {
if (tracker != null)
tracker.close();
}
protected ComponentLibraryTracker(ComponentLibraryStorage storage, BundleContext bundleContext) {
this.storage = storage;
this.bundleContext = bundleContext;
}
public void open() {
if (tracker != null)
tracker.open();
}
public void close() {
if (tracker != null)
tracker.close();
}
protected class LibraryTrackerCusomizer extends UniformBundleTrackerCustomizer<List<ProvidedLibraryDescriptor>> {
@Override
protected List<ProvidedLibraryDescriptor> createManagedObject(Bundle bundle, BundleEvent event,
Map<String, List<?>> filterResults) {
Enumeration<URL> foundEntries = bundle.findEntries(ProvidedLibraryDescriptor.LIBRARY_PATH, "*", false);
if (foundEntries == null) {
LOG.warn("Bundle [{}] marked as library provider but contains no libraries", bundle.getSymbolicName());
return null;
}
List<ProvidedLibraryDescriptor> result = new ArrayList<>();
while (foundEntries.hasMoreElements()) {
URL entry = foundEntries.nextElement();
String entryUrl = entry.toString();
if (!entryUrl.endsWith("/"))
continue;
int index = entryUrl.indexOf(ProvidedLibraryDescriptor.LIBRARY_PATH);
String libraryPath = entryUrl.substring(index);
String libraryName = libraryPath.substring(ProvidedLibraryDescriptor.LIBRARY_PATH.length() + 1,
libraryPath.length() - 1);
LOG.info("Found library [{}] in bundle [{}]", libraryName, bundle.getSymbolicName());
result.add(new ProvidedLibraryDescriptor(bundle, libraryPath, libraryName));
}
return result;
}
}
protected class LibraryTrackerCusomizerListener
implements BundleTrackerCustomizerListener<List<ProvidedLibraryDescriptor>> {
@Override
public void added(List<ProvidedLibraryDescriptor> managedObject) {
for (ProvidedLibraryDescriptor descriptor : managedObject) {
URL entry = descriptor.bundle
.getEntry(descriptor.libraryPath + ComponentLibraryStorage.LIBRARY_DESCRIPTOR_NAME);
if (entry == null) {
LOG.warn("Descrptor not found for library [{}] in bundle [{}]", descriptor.libraryName,
descriptor.bundle.getSymbolicName());
continue;
}
String content = null;
try (InputStream is = entry.openStream()) {
content = new String(is.readAllBytes());
} catch (IOException e) {
LOG.error(String.format("Error reading library descriptor [%s] in bundle [%s]",
descriptor.libraryPath + ComponentLibraryStorage.LIBRARY_DESCRIPTOR_NAME,
descriptor.bundle.getSymbolicName()), e);
continue;
}
if (!CommonUtils.isValid(content)) {
LOG.error(String.format("Library descriptor is empty: [%s] in bundle [%s]",
descriptor.libraryPath + ComponentLibraryStorage.LIBRARY_DESCRIPTOR_NAME,
descriptor.bundle.getSymbolicName()));
continue;
}
JsonObject jo = JSONUtils.getJsonRootObject(content);
if ((jo == null) || jo.keySet().isEmpty()) {
LOG.error(String.format("Invalid library descriptor: [%s] in bundle [%s]",
descriptor.libraryPath + ComponentLibraryStorage.LIBRARY_DESCRIPTOR_NAME,
descriptor.bundle.getSymbolicName()));
continue;
}
Library library = JSONUtils.GSON.fromJson(jo, Library.class);
if ((library == null) || !CommonUtils.isValid(library.library)) {
LOG.error(String.format("Invalid library descriptor content: [%s] in bundle [%s]",
descriptor.libraryPath + ComponentLibraryStorage.LIBRARY_DESCRIPTOR_NAME,
descriptor.bundle.getSymbolicName()));
continue;
}
LOG.info("Recognized library [{}] having [{}] schemas", library.library,
library.schemas == null ? -1 : library.schemas.size());
storage.addLibrary(descriptor, library);
}
}
@Override
public void modified(List<ProvidedLibraryDescriptor> managedObject) {
// ignore
}
@Override
public void removed(List<ProvidedLibraryDescriptor> managedObject) {
// ignore
}
}
}

View File

@ -0,0 +1,993 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
/*
* $Id: 2b09558a5a4a6cf1633def5e13fb5737c30a1a8f $
*
* Copyright (c) OSGi Alliance (2008, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<xsd:schema xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.osgi.org/xmlns/blueprint/v1.0.0" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0.1">
<xsd:annotation>
<xsd:documentation><![CDATA[
This is the XML Schema for the OSGi Blueprint service 1.0.0
development descriptor. Blueprint configuration files
using this schema must indicate the schema using the
blueprint/v1.0.0 namespace. For example,
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
if used as a qualified namespace, "bp" is the recommended
namespace prefix.
]]></xsd:documentation>
</xsd:annotation>
<!-- Schema elements for core component declarations -->
<xsd:complexType name="Tcomponent" abstract="true">
<xsd:annotation>
<xsd:documentation><![CDATA[
The Tcomponent type is the base type for top-level
Blueprint components. The <bean> <reference>, <service>,
and <reference-list> elements are all derived from
the Tcomponent type. This type defines an id attribute
that is used create references between different components.
Component elements can also be inlined within other component
definitions. The id attribute is not valid when inlined.
]]></xsd:documentation>
</xsd:annotation>
<xsd:attribute name="id" type="xsd:ID"/>
<xsd:attribute name="activation" type="Tactivation">
<xsd:annotation>
<xsd:documentation><![CDATA[
The activation attribute for this component. This can either
be "eager" or "lazy". If not specified, it
defaults to default-activation attribute of the enclosing
<blueprint> element.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="depends-on" type="TdependsOn">
<xsd:annotation>
<xsd:documentation><![CDATA[
depends-on identifies (by id) other components that this component
depends on. The component only be activated after the
depends-on components are successfully activated. Also, if there
are <reference> or <reference-list> elements with unstatisfied
manadatory references, then the depends-on relationship will also
be used to determine whether this service is enabled or not.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
</xsd:complexType>
<xsd:element name="blueprint" type="Tblueprint">
<xsd:annotation>
<xsd:documentation><![CDATA[
The <blueprint> element is the root element for a blueprint
configuration file. A blueprint configuration has two sections.
The first section (contained within the <type-converters> element)
identifies components that are used for converting values into
different target types. The type converters are optional, so
the file does not need to specify a type converter section.
Following the type converters are the component definitions.
Components are <bean>, <service>, <reference>, and
<reference-list> elements that identify the bundle components that will
be managed by the blueprint service.
]]></xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:complexType name="Tblueprint">
<xsd:sequence>
<xsd:element name="description" type="Tdescription" minOccurs="0"/>
<xsd:element name="type-converters" type="Ttype-converters" minOccurs="0" maxOccurs="1"/>
<!-- top-level components -->
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="service" type="Tservice"/>
<xsd:element name="reference-list" type="Treference-list"/>
<xsd:element ref="bean"/>
<xsd:element ref="reference"/>
<xsd:any namespace="##other" processContents="lax"/>
</xsd:choice>
</xsd:sequence>
<xsd:attribute name="default-activation" type="Tactivation" default="eager">
<xsd:annotation>
<xsd:documentation><![CDATA[
Specifies the default activation setting that will be defined
for components. If not specified, the global default is "eager".
Individual components may override the default value.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="default-timeout" type="Ttimeout" default="300000">
<xsd:annotation>
<xsd:documentation><![CDATA[
Specifies the default timeout value to be used when operations
are invoked on unstatisfied service references. If the
reference does not change to a satisfied state within the timeout
window, an error is raised on the method invocation. The
default timeout value is 300000 milliseconds and individual
<reference> element can override the specified configuration
default.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="default-availability" type="Tavailability" default="mandatory">
<xsd:annotation>
<xsd:documentation><![CDATA[
Specifies the default availability value to be used for
<reference>, and <reference-list> components. The
normal default is "mandatory", and can be changed by individual
service reference components.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:anyAttribute namespace="##other" processContents="lax"/>
<!-- Defaults-->
</xsd:complexType>
<xsd:complexType name="Ttype-converters">
<xsd:annotation>
<xsd:documentation><![CDATA[
The type used for the <type-converters> element. The
<type-converters> section is a set of <bean>, <ref>, or
<reference> elements that identify the type converter components.
]]></xsd:documentation>
</xsd:annotation>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="bean" type="Tbean"/>
<xsd:element name="reference" type="Treference"/>
<xsd:element name="ref" type="Tref"/>
<xsd:any namespace="##other" processContents="lax"/>
</xsd:choice>
</xsd:complexType>
<!--
Components that provide a reasonable target for injection used for
listeners, etc.
-->
<xsd:group name="GtargetComponent">
<xsd:annotation>
<xsd:documentation><![CDATA[
A target component is one that can be a target for a
listener, registration-listener or service elements.
This is used in contexts where the requirement is a single
provided object that will implement a particular interface.
The provided object is obtained either from a <ref> element
or an inlined <bean> or <reference>.
]]></xsd:documentation>
</xsd:annotation>
<xsd:choice>
<xsd:element name="bean" type="Tinlined-bean"/>
<xsd:element name="reference" type="Tinlined-reference"/>
<xsd:element name="ref" type="Tref"/>
<xsd:any namespace="##other" processContents="lax"/>
</xsd:choice>
</xsd:group>
<xsd:group name="GallComponents">
<xsd:annotation>
<xsd:documentation><![CDATA[
An all components is used in contexts where all component element
types are values. The set of component elements contains
<bean>, <service>, <reference>, <reference-list> and <ref>.
]]></xsd:documentation>
</xsd:annotation>
<xsd:choice>
<xsd:element name="service" type="Tinlined-service"/>
<xsd:element name="reference-list" type="Tinlined-reference-list"/>
<xsd:group ref="GtargetComponent"/>
</xsd:choice>
</xsd:group>
<xsd:group name="GbeanElements">
<xsd:annotation>
<xsd:documentation><![CDATA[
A bean elements is a reusable definition of the elements allowed on
a <bean> element.
]]></xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="description" type="Tdescription" minOccurs="0"/>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="argument" type="Targument"/>
<xsd:element name="property" type="Tproperty"/>
<xsd:any namespace="##other" processContents="lax"/>
</xsd:choice>
</xsd:sequence>
</xsd:group>
<xsd:complexType name="Tbean">
<xsd:annotation>
<xsd:documentation><![CDATA[
The type definition for a <bean> component. The <bean>
attributes provide the characteristics for how to create a
bean instance. Constructor arguments and injected properties
are specified via child <argument> and <property> elements.
]]></xsd:documentation>
</xsd:annotation>
<xsd:complexContent>
<xsd:extension base="Tcomponent">
<xsd:group ref="GbeanElements"/>
<xsd:attribute name="class" type="Tclass"/>
<xsd:attribute name="init-method" type="Tmethod"/>
<xsd:attribute name="destroy-method" type="Tmethod"/>
<xsd:attribute name="factory-method" type="Tmethod"/>
<xsd:attribute name="factory-ref" type="Tidref"/>
<xsd:attribute name="scope" type="Tscope"/>
<xsd:anyAttribute namespace="##other" processContents="lax"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="Tinlined-bean">
<xsd:annotation>
<xsd:documentation><![CDATA[
The Tinlined-bean type is used for inlined (i.e. non top level)
<bean> elements. Those elements have some restrictions on
the attributes that can be used to define them.
]]></xsd:documentation>
</xsd:annotation>
<xsd:complexContent>
<xsd:restriction base="Tbean">
<xsd:group ref="GbeanElements"/>
<xsd:attribute name="id" use="prohibited"/>
<xsd:attribute name="depends-on" type="TdependsOn"/>
<xsd:attribute name="activation" use="prohibited" fixed="lazy"/>
<xsd:attribute name="class" type="Tclass"/>
<xsd:attribute name="init-method" type="Tmethod"/>
<xsd:attribute name="destroy-method" use="prohibited"/>
<xsd:attribute name="factory-method" type="Tmethod"/>
<xsd:attribute name="factory-ref" type="Tidref"/>
<xsd:attribute name="scope" use="prohibited"/>
<xsd:anyAttribute namespace="##other" processContents="lax"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="Targument">
<xsd:annotation>
<xsd:documentation><![CDATA[
An argument used to create an object defined by a <bean>
component. The <argument> elements are the arguments for the
bean class constructor or passed to the bean factory method.
The type, if specified, is used to disambiguate the constructor
or method signature. Arguments may also be matched up with
arguments by explicitly specifying the index position. If the
index is used, then all <argument> elements for the bean must
also specify the index.
The value and ref attributes are convenience shortcuts to make
the <argument> tag easier to code. A fuller set of injected
values and types can be specified using one of the "value"
type elements.
]]></xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="description" type="Tdescription" minOccurs="0"/>
<xsd:group ref="Gvalue" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="index" type="xsd:nonNegativeInteger"/>
<xsd:attribute name="type" type="Ttype"/>
<xsd:attribute name="ref" type="Tidref"/>
<xsd:attribute name="value" type="TstringValue"/>
</xsd:complexType>
<xsd:complexType name="Tproperty">
<xsd:annotation>
<xsd:documentation><![CDATA[
A property that will be injected into a created <bean>
component. The <property> elements correspond to named
JavaBean setting methods for a created bean object.
The value and ref attributes are convenience shortcuts to make
the <argument> tag easier to code. A fuller set of injected
values and types can be specified using one of the "value"
type elements.
]]></xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="description" type="Tdescription" minOccurs="0"/>
<xsd:group ref="Gvalue" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="name" type="Tmethod" use="required"/>
<xsd:attribute name="ref" type="Tidref"/>
<xsd:attribute name="value" type="TstringValue"/>
</xsd:complexType>
<xsd:complexType name="Tkey">
<xsd:annotation>
<xsd:documentation><![CDATA[
The Tkey type defines the element types that are permitted
for Map key situations. These can be any of the "value"
types other than the <null> element.
]]></xsd:documentation>
</xsd:annotation>
<xsd:group ref="GnonNullValue"/>
</xsd:complexType>
<!-- reference -->
<xsd:complexType name="Treference">
<xsd:annotation>
<xsd:documentation><![CDATA[
The Treference type defines the <reference> element. These
are instances of the TserviceReference type, with the addition
of a timeout attribute. If the timeout is not specified,
the default-timeout value is inherited from the encapsulating
<blueprint> definition.
]]></xsd:documentation>
</xsd:annotation>
<xsd:complexContent>
<xsd:extension base="TserviceReference">
<xsd:sequence>
<xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="timeout" type="Ttimeout"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="Tinlined-reference">
<xsd:annotation>
<xsd:documentation><![CDATA[
The Tinlined-reference type is used for inlined (i.e. non top level)
<reference> elements.
]]></xsd:documentation>
</xsd:annotation>
<xsd:complexContent>
<xsd:restriction base="Treference">
<xsd:sequence>
<xsd:group ref="GserviceReferenceElements"/>
<xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="id" use="prohibited"/>
<xsd:attribute name="depends-on" type="TdependsOn"/>
<xsd:attribute name="activation" use="prohibited" fixed="lazy"/>
<xsd:attribute name="interface" type="Tclass"/>
<xsd:attribute name="filter" type="xsd:normalizedString"/>
<xsd:attribute name="component-name" type="Tidref"/>
<xsd:attribute name="availability" type="Tavailability"/>
<xsd:attribute name="timeout" type="Ttimeout"/>
<xsd:anyAttribute namespace="##other" processContents="lax"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<!-- reference-list -->
<xsd:complexType name="Treference-list">
<xsd:annotation>
<xsd:documentation><![CDATA[
The Treference-list builds in the characteristics of the
TserviceReference type to define characteristics of the
<reference-list>. This adds in the characteristics that
only apply to collections of references (e.g., member-type).
]]></xsd:documentation>
</xsd:annotation>
<xsd:complexContent>
<xsd:extension base="TserviceReference">
<xsd:sequence>
<xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="member-type" type="Tservice-use" default="service-object"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="Tinlined-reference-list">
<xsd:annotation>
<xsd:documentation><![CDATA[
The Tinlined-reference-list type is used for inlined (i.e. non top level)
<reference-list> elements.
]]></xsd:documentation>
</xsd:annotation>
<xsd:complexContent>
<xsd:restriction base="Treference-list">
<xsd:sequence>
<xsd:group ref="GserviceReferenceElements"/>
<xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="id" use="prohibited"/>
<xsd:attribute name="depends-on" type="TdependsOn"/>
<xsd:attribute name="activation" use="prohibited" fixed="lazy"/>
<xsd:attribute name="interface" type="Tclass"/>
<xsd:attribute name="filter" type="xsd:normalizedString"/>
<xsd:attribute name="component-name" type="Tidref"/>
<xsd:attribute name="availability" type="Tavailability"/>
<xsd:attribute name="member-type" type="Tservice-use" default="service-object"/>
<xsd:anyAttribute namespace="##other" processContents="lax"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<!-- Reference base class -->
<xsd:complexType name="TserviceReference">
<xsd:annotation>
<xsd:documentation><![CDATA[
TserviceReference is the base element type used for <reference>
and <reference-list> elements. This type defines all of the
characteristics common to both sorts of references.
]]></xsd:documentation>
</xsd:annotation>
<xsd:complexContent>
<xsd:extension base="Tcomponent">
<xsd:sequence>
<xsd:group ref="GserviceReferenceElements"/>
</xsd:sequence>
<xsd:attribute name="interface" type="Tclass">
<xsd:annotation>
<xsd:documentation><![CDATA[
The interface that the OSGi service must implement and that will be
implemented by the proxy object.
This attribute is optional.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="filter" type="xsd:normalizedString">
<xsd:annotation>
<xsd:documentation><![CDATA[
A filter string used to narrow the search for a matching service
reference.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="component-name" type="Tidref">
<xsd:annotation>
<xsd:documentation><![CDATA[
An optional specifier that can be used to match a service definition
to one created by a specific blueprint component.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="availability" type="Tavailability">
<xsd:annotation>
<xsd:documentation><![CDATA[
Use to control the initial processing of service references at
blueprint context startup. "mandatory" indicates the context
should not start unless the service is available within the
specified context startup period. "optional" indicates availability
of this service is not a requirement at bundle startup.
NOTE: No default is specified because this can be overridden
by the default-availability attribute of the <blueprint> element.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:anyAttribute namespace="##other" processContents="lax"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:group name="GserviceReferenceElements">
<xsd:sequence>
<xsd:element name="description" type="Tdescription" minOccurs="0"/>
<!-- listener -->
<xsd:element name="reference-listener" type="TreferenceListener" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation><![CDATA[
A definition of a listener that will watch for bind/unbind events
associated with the service reference. The targetted listener can
be a <ref> to a <bean> or <reference> element, or an inline
<bean> or <reference>.
]]></xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:group>
<xsd:complexType name="TreferenceListener">
<xsd:annotation>
<xsd:documentation><![CDATA[
TReferenceListener defines a reference listener that is attached
to a <reference> or <reference-list> element. The listener
object can be specified as a <ref> or as an inline <bean> or
<reference> component. Listener events are mapped to the indicated
bind or unbind methods.
]]></xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:group ref="GtargetComponent" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="ref" type="Tidref"/>
<xsd:attribute name="bind-method" type="Tmethod"/>
<xsd:attribute name="unbind-method" type="Tmethod"/>
</xsd:complexType>
<xsd:simpleType name="Tactivation">
<xsd:annotation>
<xsd:documentation><![CDATA[
Tactivation defines the activation type for components. This is used in this
schema by the <blueprint> default-activation attribute and the
activation attribute.
]]></xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:NMTOKEN">
<xsd:enumeration value="eager"/>
<xsd:enumeration value="lazy"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="Tavailability">
<xsd:annotation>
<xsd:documentation><![CDATA[
Tavailability defines an availability attribute type. This is used in this
schema by the <blueprint> default-availability attribute and the
<reference> and <reference-list> availability attribute.
]]></xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:NMTOKEN">
<xsd:enumeration value="mandatory"/>
<xsd:enumeration value="optional"/>
</xsd:restriction>
</xsd:simpleType>
<!-- service -->
<xsd:complexType name="Tservice">
<xsd:annotation>
<xsd:documentation><![CDATA[
Tservice is the type for services exported by this blueprint bundle.
Services are sourced by either a <ref> to a <bean> component or an
<inline> bean component.
]]></xsd:documentation>
</xsd:annotation>
<xsd:complexContent>
<xsd:extension base="Tcomponent">
<xsd:sequence>
<xsd:group ref="GserviceElements"/>
</xsd:sequence>
<xsd:attribute name="interface" type="Tclass">
<xsd:annotation>
<xsd:documentation><![CDATA[
The interface that this OSGi service will provide.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="ref" type="Tidref">
<xsd:annotation>
<xsd:documentation><![CDATA[
The ref attribute can be used to specify the component that provides
the object exported as an OSGi service.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="auto-export" type="TautoExportModes" default="disabled">
<xsd:annotation>
<xsd:documentation><![CDATA[
If set to a value different from "disabled", the Blueprint Container
will introspect the target to discover the set of interfaces or classes
that the service will be registered under.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="ranking" type="xsd:int" default="0">
<xsd:annotation>
<xsd:documentation><![CDATA[
A service ranking value that is added to the service properties
the service will be published with.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:anyAttribute namespace="##other" processContents="lax"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="Tinlined-service">
<xsd:annotation>
<xsd:documentation><![CDATA[
The Tinlined-service type is used for inlined (i.e. non top level)
<service> elements.
]]></xsd:documentation>
</xsd:annotation>
<xsd:complexContent>
<xsd:restriction base="Tservice">
<xsd:sequence>
<xsd:group ref="GserviceElements"/>
</xsd:sequence>
<xsd:attribute name="id" use="prohibited"/>
<xsd:attribute name="depends-on" type="TdependsOn"/>
<xsd:attribute name="activation" use="prohibited" fixed="lazy"/>
<xsd:attribute name="interface" type="Tclass"/>
<xsd:attribute name="ref" type="Tidref"/>
<xsd:attribute name="auto-export" type="TautoExportModes" default="disabled"/>
<xsd:attribute name="ranking" type="xsd:int" default="0"/>
<xsd:anyAttribute namespace="##other" processContents="lax"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<xsd:group name="GbaseServiceElements">
<xsd:sequence>
<xsd:element name="description" type="Tdescription" minOccurs="0"/>
<xsd:element name="interfaces" type="Tinterfaces" minOccurs="0">
<xsd:annotation>
<xsd:documentation><![CDATA[
A collection of one or more interface class names this service
will be registered under. The <service> element also has
a shortcut interface attribute for the usual case of just
a single interface being used. This also cannot be used if
the auto-export attribute is used.
]]></xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="service-properties" type="TserviceProperties" minOccurs="0">
<xsd:annotation>
<xsd:documentation><![CDATA[
The service provided when the service is registered. The service
properties are similar to map elements, but the keys must always
be strings, and the values are required to be in a narrower range.
]]></xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="registration-listener" type="TregistrationListener" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation><![CDATA[
A set of 0 or more registration listeners attached to this service
component. The registration listeners will be notified whenever the
service is registered or unregistered from the framework service
registry.
]]></xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:group>
<xsd:group name="GserviceElements">
<xsd:annotation>
<xsd:documentation><![CDATA[
A set of service elements.
]]></xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:group ref="GbaseServiceElements"/>
<xsd:group ref="GtargetComponent" minOccurs="0">
<xsd:annotation>
<xsd:documentation><![CDATA[
A service definition can use any of the target types as an inline element
as well.
]]></xsd:documentation>
</xsd:annotation>
</xsd:group>
</xsd:sequence>
</xsd:group>
<xsd:complexType name="TregistrationListener">
<xsd:annotation>
<xsd:documentation><![CDATA[
A registration listener definition. The target registration listener
can be either a <ref> to a <bean> or <service> component, or an inline
<bean> or <service> component definition. The registration-method and
unregistration-method attributes define the methods that will be called
for the respective events.
For the very common case of using a <ref> to a listener component, the
ref attribute may also be used as a shortcut.
]]></xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:group ref="GtargetComponent" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="ref" type="Tidref"/>
<xsd:attribute name="registration-method" type="Tmethod"/>
<xsd:attribute name="unregistration-method" type="Tmethod"/>
</xsd:complexType>
<!-- Values -->
<xsd:group name="Gvalue">
<xsd:annotation>
<xsd:documentation><![CDATA[
The set of "value" types that can be used in any place a value
can be specified. This set includes the <ref> and <idref> elements, any of the
component types (<bean>, <service>, etc.) as inline components, the
generic <value> element for types sourced from string values, any of the
collection types (<set>, <list>, <array>, <map>, <props>), and the
<null> type to inject a null value.
]]></xsd:documentation>
</xsd:annotation>
<xsd:choice>
<xsd:group ref="GnonNullValue"/>
<xsd:element name="null" type="Tnull"/>
</xsd:choice>
</xsd:group>
<xsd:complexType name="Tnull">
<xsd:annotation>
<xsd:documentation><![CDATA[
The definition for a <null> value type.
]]></xsd:documentation>
</xsd:annotation>
</xsd:complexType>
<xsd:group name="GnonNullValue">
<xsd:annotation>
<xsd:documentation><![CDATA[
The set of "value" types that can be used in any place a non-null value
can be specified. This set includes the <ref> and <idref> elements, any of the
component types (<bean>, <service>, etc.) as inline components, the
generic <value> element for types sourced from string values, and any of the
collection types (<set>, <list>, <array>, <map>, <props>).
The <null> type is NOT a member of this group.
]]></xsd:documentation>
</xsd:annotation>
<xsd:choice>
<xsd:group ref="GallComponents"/>
<xsd:element name="idref" type="Tref"/>
<xsd:element name="value" type="Tvalue"/>
<xsd:element name="list" type="Tcollection"/>
<xsd:element name="set" type="Tcollection"/>
<xsd:element name="map" type="Tmap"/>
<xsd:element name="array" type="Tcollection"/>
<xsd:element name="props" type="Tprops"/>
</xsd:choice>
</xsd:group>
<xsd:complexType name="Tref">
<xsd:annotation>
<xsd:documentation><![CDATA[
Tref is the type used for <ref> elements. This specifies a required
component id for the reference component.
]]></xsd:documentation>
</xsd:annotation>
<xsd:attribute name="component-id" type="Tidref" use="required"/>
</xsd:complexType>
<xsd:complexType name="Tvalue" mixed="true">
<xsd:annotation>
<xsd:documentation><![CDATA[
Tvalue is the type used for <value> elements. The <value> element
is used for types that can be created from a single string value.
The string value is the data value for the element. The optional
type attribute allows a target conversion value to be explicitly
specified.
]]></xsd:documentation>
</xsd:annotation>
<xsd:attribute name="type" type="Ttype"/>
</xsd:complexType>
<!-- Collection Values -->
<xsd:complexType name="TtypedCollection">
<xsd:annotation>
<xsd:documentation><![CDATA[
TtypeCollection defines comment attributes shared among different
collection types that allow a default value type to be specified.
]]></xsd:documentation>
</xsd:annotation>
<xsd:attribute name="value-type" type="Ttype"/>
</xsd:complexType>
<xsd:complexType name="Tcollection">
<xsd:annotation>
<xsd:documentation><![CDATA[
Tcollection is the base schema type for different ordered collection
types. This is shared between the <array>, <list>, and <set> elements.
]]></xsd:documentation>
</xsd:annotation>
<xsd:complexContent>
<xsd:extension base="TtypedCollection">
<xsd:group ref="Gvalue" minOccurs="0" maxOccurs="unbounded"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="Tprops">
<xsd:annotation>
<xsd:documentation><![CDATA[
Tprops is the type used by the <props> value element. The prop elements
are pairs of string-valued keys and values.
]]></xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="prop" type="Tprop" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Tprop" mixed="true">
<xsd:annotation>
<xsd:documentation><![CDATA[
Tprop is a single property element for a <props> value type. The property
value can be specified using either the attribute, or as value data for
the property element.
]]></xsd:documentation>
</xsd:annotation>
<xsd:attribute name="key" type="TstringValue" use="required"/>
<xsd:attribute name="value" type="TstringValue"/>
</xsd:complexType>
<!-- 'map' element type -->
<xsd:complexType name="Tmap">
<xsd:annotation>
<xsd:documentation><![CDATA[
Tmap is the base type used for <map> elements. A map may have a
default value type specified, so it inherits from the TtypeCollection
type. A key type can also be specified, and the map members are
created from the entry elements, which require a key/value pair.
]]></xsd:documentation>
</xsd:annotation>
<xsd:complexContent>
<xsd:extension base="TtypedCollection">
<xsd:sequence>
<xsd:element name="entry" type="TmapEntry" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="key-type" type="Ttype"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<!-- 'entry' element type -->
<xsd:complexType name="TmapEntry">
<xsd:annotation>
<xsd:documentation><![CDATA[
TmapEntry is used for <entry> elements nested inside of a <map> element.
Each <entry> instance defines a key/value pair that will be added to the
Map. Both the keys and values may be arbitrary types. Keys must not
be <null> but <null> is permitted for entry values. A default type
can be specified for both the keys and the values, but individual keys
or values can override the default.
]]></xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="key" type="Tkey" minOccurs="0"/>
<xsd:group ref="Gvalue" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="key" type="TstringValue"/>
<xsd:attribute name="key-ref" type="Tidref"/>
<xsd:attribute name="value" type="TstringValue"/>
<xsd:attribute name="value-ref" type="Tidref"/>
</xsd:complexType>
<!-- 'service property' element type -->
<xsd:complexType name="TserviceProperties">
<xsd:annotation>
<xsd:documentation><![CDATA[
TserviceProperty is used for <service-properties> elements.
The syntax is similar to what is defined for <map>, but keys must be
string values and there are no type defaults that can be specified.
created from the entry elements, which require a key/value pair.
]]></xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="entry" type="TservicePropertyEntry" minOccurs="0" maxOccurs="unbounded"/>
<xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<!-- 'entry' element type -->
<xsd:complexType name="TservicePropertyEntry">
<xsd:annotation>
<xsd:documentation><![CDATA[
TservicePropertyEntry is an entry value used for the <service-properties>
element. This does not allow a child <key> element and there are no
key-ref or value-ref attributes.
]]></xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:group ref="Gvalue" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="key" type="TstringValue" use="required"/>
<xsd:attribute name="value" type="TstringValue"/>
</xsd:complexType>
<!-- General types -->
<xsd:complexType name="Tdescription" mixed="true">
<xsd:annotation>
<xsd:documentation><![CDATA[
A generic <description> element type to allow documentation to added to the
blueprint configuration.
]]></xsd:documentation>
</xsd:annotation>
<xsd:choice minOccurs="0" maxOccurs="unbounded"/>
</xsd:complexType>
<xsd:complexType name="Tinterfaces">
<xsd:annotation>
<xsd:documentation><![CDATA[
The type definition for the <interfaces> element used for <service>
]]></xsd:documentation>
</xsd:annotation>
<xsd:choice minOccurs="1" maxOccurs="unbounded">
<xsd:element name="value" type="TinterfaceValue"/>
</xsd:choice>
</xsd:complexType>
<xsd:simpleType name="TinterfaceValue">
<xsd:annotation>
<xsd:documentation><![CDATA[
TinterfaceValue is used for subelements of the <interfaces> element.
This is just a <value>xxxxx</value> element where the contained
value is the name of an interface class.
]]></xsd:documentation>
</xsd:annotation>
<xsd:restriction base="Tclass"/>
</xsd:simpleType>
<xsd:simpleType name="Tclass">
<xsd:annotation>
<xsd:documentation><![CDATA[
Tclass is a base type that should be used for all attributes that
refer to java class names.
]]></xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:NCName"/>
</xsd:simpleType>
<xsd:simpleType name="Ttype">
<xsd:annotation>
<xsd:documentation><![CDATA[
Ttype is a base type that refer to java types such as classes or
arrays.
]]></xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:token">
<xsd:pattern value="[\i-[:]][\c-[:]]*(\[\])*"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="Tmethod">
<xsd:annotation>
<xsd:documentation><![CDATA[
Tmethod is a base type that should be used for all attributes that
refer to java method names.
]]></xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:NCName"/>
</xsd:simpleType>
<!--
Should be used for all attributes and elements that refer to method
names
-->
<xsd:simpleType name="Tidref">
<xsd:annotation>
<xsd:documentation><![CDATA[
Tidref is a base type that should be used for all attributes that
refer to component ids.
]]></xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:NCName"/>
</xsd:simpleType>
<xsd:simpleType name="TstringValue">
<xsd:annotation>
<xsd:documentation><![CDATA[
TstringValue is a base type that should be used for all attributes that
refer to raw string values
]]></xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:normalizedString"/>
</xsd:simpleType>
<xsd:simpleType name="TautoExportModes">
<xsd:annotation>
<xsd:documentation><![CDATA[
TautoExportModes is a base type that should be used for export-mode
attributes.
]]></xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:NMTOKEN">
<xsd:enumeration value="disabled"/>
<xsd:enumeration value="interfaces"/>
<xsd:enumeration value="class-hierarchy"/>
<xsd:enumeration value="all-classes"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="Ttimeout">
<xsd:annotation>
<xsd:documentation><![CDATA[
Ttimeout is a base type that should be used for all attributes that
specify timeout values
]]></xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:unsignedLong"/>
</xsd:simpleType>
<xsd:simpleType name="TdependsOn">
<xsd:annotation>
<xsd:documentation><![CDATA[
TdependsOn is a base type that should be used for all attributes that
specify depends-on relationships
]]></xsd:documentation>
</xsd:annotation>
<xsd:restriction>
<xsd:simpleType>
<xsd:list itemType="Tidref"/>
</xsd:simpleType>
<xsd:minLength value="1"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="Tscope">
<xsd:union>
<xsd:simpleType>
<xsd:restriction base="xsd:NMTOKEN">
<xsd:enumeration value="singleton"/>
<xsd:enumeration value="prototype"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType>
<xsd:restriction base="xsd:QName">
<xsd:pattern value=".+:.+"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:union>
</xsd:simpleType>
<xsd:simpleType name="Tservice-use">
<xsd:annotation>
<xsd:documentation><![CDATA[
Indicates the type of object that will be placed within the
reference collection. "service-object" indicates the
collection contains blueprint proxies for imported services.
"service-reference" indicates the collection contains
ServiceReference objects matching the target service type.
]]></xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:NMTOKEN">
<xsd:enumeration value="service-object"/>
<xsd:enumeration value="service-reference"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:element name="bean" type="Tbean"/>
<xsd:element name="reference" type="Treference"/>
</xsd:schema>

View File

@ -0,0 +1,991 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
/*
* $Id: 2b09558a5a4a6cf1633def5e13fb5737c30a1a8f $
*
* Copyright (c) OSGi Alliance (2008, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<xsd:schema xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.osgi.org/xmlns/blueprint/v1.0.0" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0.1">
<xsd:annotation>
<xsd:documentation><![CDATA[
This is the XML Schema for the OSGi Blueprint service 1.0.0
development descriptor. Blueprint configuration files
using this schema must indicate the schema using the
blueprint/v1.0.0 namespace. For example,
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
if used as a qualified namespace, "bp" is the recommended
namespace prefix.
]]></xsd:documentation>
</xsd:annotation>
<!-- Schema elements for core component declarations -->
<xsd:complexType name="Tcomponent" abstract="true">
<xsd:annotation>
<xsd:documentation><![CDATA[
The Tcomponent type is the base type for top-level
Blueprint components. The <bean> <reference>, <service>,
and <reference-list> elements are all derived from
the Tcomponent type. This type defines an id attribute
that is used create references between different components.
Component elements can also be inlined within other component
definitions. The id attribute is not valid when inlined.
]]></xsd:documentation>
</xsd:annotation>
<xsd:attribute name="id" type="xsd:ID"/>
<xsd:attribute name="activation" type="Tactivation">
<xsd:annotation>
<xsd:documentation><![CDATA[
The activation attribute for this component. This can either
be "eager" or "lazy". If not specified, it
defaults to default-activation attribute of the enclosing
<blueprint> element.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="depends-on" type="TdependsOn">
<xsd:annotation>
<xsd:documentation><![CDATA[
depends-on identifies (by id) other components that this component
depends on. The component only be activated after the
depends-on components are successfully activated. Also, if there
are <reference> or <reference-list> elements with unstatisfied
manadatory references, then the depends-on relationship will also
be used to determine whether this service is enabled or not.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
</xsd:complexType>
<xsd:element name="blueprint" type="Tblueprint">
<xsd:annotation>
<xsd:documentation><![CDATA[
The <blueprint> element is the root element for a blueprint
configuration file. A blueprint configuration has two sections.
The first section (contained within the <type-converters> element)
identifies components that are used for converting values into
different target types. The type converters are optional, so
the file does not need to specify a type converter section.
Following the type converters are the component definitions.
Components are <bean>, <service>, <reference>, and
<reference-list> elements that identify the bundle components that will
be managed by the blueprint service.
]]></xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:complexType name="Tblueprint">
<xsd:sequence>
<xsd:element name="description" type="Tdescription" minOccurs="0"/>
<xsd:element name="type-converters" type="Ttype-converters" minOccurs="0" maxOccurs="1"/>
<!-- top-level components -->
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="service" type="Tservice"/>
<xsd:element name="reference-list" type="Treference-list"/>
<xsd:element name="bean" type="Tbean"/>
<xsd:element name="reference" type="Treference"/>
<xsd:any namespace="##other" processContents="lax"/>
</xsd:choice>
</xsd:sequence>
<xsd:attribute name="default-activation" type="Tactivation" default="eager">
<xsd:annotation>
<xsd:documentation><![CDATA[
Specifies the default activation setting that will be defined
for components. If not specified, the global default is "eager".
Individual components may override the default value.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="default-timeout" type="Ttimeout" default="300000">
<xsd:annotation>
<xsd:documentation><![CDATA[
Specifies the default timeout value to be used when operations
are invoked on unstatisfied service references. If the
reference does not change to a satisfied state within the timeout
window, an error is raised on the method invocation. The
default timeout value is 300000 milliseconds and individual
<reference> element can override the specified configuration
default.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="default-availability" type="Tavailability" default="mandatory">
<xsd:annotation>
<xsd:documentation><![CDATA[
Specifies the default availability value to be used for
<reference>, and <reference-list> components. The
normal default is "mandatory", and can be changed by individual
service reference components.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:anyAttribute namespace="##other" processContents="lax"/>
<!-- Defaults-->
</xsd:complexType>
<xsd:complexType name="Ttype-converters">
<xsd:annotation>
<xsd:documentation><![CDATA[
The type used for the <type-converters> element. The
<type-converters> section is a set of <bean>, <ref>, or
<reference> elements that identify the type converter components.
]]></xsd:documentation>
</xsd:annotation>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="bean" type="Tbean"/>
<xsd:element name="reference" type="Treference"/>
<xsd:element name="ref" type="Tref"/>
<xsd:any namespace="##other" processContents="lax"/>
</xsd:choice>
</xsd:complexType>
<!--
Components that provide a reasonable target for injection used for
listeners, etc.
-->
<xsd:group name="GtargetComponent">
<xsd:annotation>
<xsd:documentation><![CDATA[
A target component is one that can be a target for a
listener, registration-listener or service elements.
This is used in contexts where the requirement is a single
provided object that will implement a particular interface.
The provided object is obtained either from a <ref> element
or an inlined <bean> or <reference>.
]]></xsd:documentation>
</xsd:annotation>
<xsd:choice>
<xsd:element name="bean" type="Tinlined-bean"/>
<xsd:element name="reference" type="Tinlined-reference"/>
<xsd:element name="ref" type="Tref"/>
<xsd:any namespace="##other" processContents="lax"/>
</xsd:choice>
</xsd:group>
<xsd:group name="GallComponents">
<xsd:annotation>
<xsd:documentation><![CDATA[
An all components is used in contexts where all component element
types are values. The set of component elements contains
<bean>, <service>, <reference>, <reference-list> and <ref>.
]]></xsd:documentation>
</xsd:annotation>
<xsd:choice>
<xsd:element name="service" type="Tinlined-service"/>
<xsd:element name="reference-list" type="Tinlined-reference-list"/>
<xsd:group ref="GtargetComponent"/>
</xsd:choice>
</xsd:group>
<xsd:group name="GbeanElements">
<xsd:annotation>
<xsd:documentation><![CDATA[
A bean elements is a reusable definition of the elements allowed on
a <bean> element.
]]></xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="description" type="Tdescription" minOccurs="0"/>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="argument" type="Targument"/>
<xsd:element name="property" type="Tproperty"/>
<xsd:any namespace="##other" processContents="lax"/>
</xsd:choice>
</xsd:sequence>
</xsd:group>
<xsd:complexType name="Tbean">
<xsd:annotation>
<xsd:documentation><![CDATA[
The type definition for a <bean> component. The <bean>
attributes provide the characteristics for how to create a
bean instance. Constructor arguments and injected properties
are specified via child <argument> and <property> elements.
]]></xsd:documentation>
</xsd:annotation>
<xsd:complexContent>
<xsd:extension base="Tcomponent">
<xsd:group ref="GbeanElements"/>
<xsd:attribute name="class" type="Tclass"/>
<xsd:attribute name="init-method" type="Tmethod"/>
<xsd:attribute name="destroy-method" type="Tmethod"/>
<xsd:attribute name="factory-method" type="Tmethod"/>
<xsd:attribute name="factory-ref" type="Tidref"/>
<xsd:attribute name="scope" type="Tscope"/>
<xsd:anyAttribute namespace="##other" processContents="lax"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="Tinlined-bean">
<xsd:annotation>
<xsd:documentation><![CDATA[
The Tinlined-bean type is used for inlined (i.e. non top level)
<bean> elements. Those elements have some restrictions on
the attributes that can be used to define them.
]]></xsd:documentation>
</xsd:annotation>
<xsd:complexContent>
<xsd:restriction base="Tbean">
<xsd:group ref="GbeanElements"/>
<xsd:attribute name="id" use="prohibited"/>
<xsd:attribute name="depends-on" type="TdependsOn"/>
<xsd:attribute name="activation" use="prohibited" fixed="lazy"/>
<xsd:attribute name="class" type="Tclass"/>
<xsd:attribute name="init-method" type="Tmethod"/>
<xsd:attribute name="destroy-method" use="prohibited"/>
<xsd:attribute name="factory-method" type="Tmethod"/>
<xsd:attribute name="factory-ref" type="Tidref"/>
<xsd:attribute name="scope" use="prohibited"/>
<xsd:anyAttribute namespace="##other" processContents="lax"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="Targument">
<xsd:annotation>
<xsd:documentation><![CDATA[
An argument used to create an object defined by a <bean>
component. The <argument> elements are the arguments for the
bean class constructor or passed to the bean factory method.
The type, if specified, is used to disambiguate the constructor
or method signature. Arguments may also be matched up with
arguments by explicitly specifying the index position. If the
index is used, then all <argument> elements for the bean must
also specify the index.
The value and ref attributes are convenience shortcuts to make
the <argument> tag easier to code. A fuller set of injected
values and types can be specified using one of the "value"
type elements.
]]></xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="description" type="Tdescription" minOccurs="0"/>
<xsd:group ref="Gvalue" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="index" type="xsd:nonNegativeInteger"/>
<xsd:attribute name="type" type="Ttype"/>
<xsd:attribute name="ref" type="Tidref"/>
<xsd:attribute name="value" type="TstringValue"/>
</xsd:complexType>
<xsd:complexType name="Tproperty">
<xsd:annotation>
<xsd:documentation><![CDATA[
A property that will be injected into a created <bean>
component. The <property> elements correspond to named
JavaBean setting methods for a created bean object.
The value and ref attributes are convenience shortcuts to make
the <argument> tag easier to code. A fuller set of injected
values and types can be specified using one of the "value"
type elements.
]]></xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="description" type="Tdescription" minOccurs="0"/>
<xsd:group ref="Gvalue" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="name" type="Tmethod" use="required"/>
<xsd:attribute name="ref" type="Tidref"/>
<xsd:attribute name="value" type="TstringValue"/>
</xsd:complexType>
<xsd:complexType name="Tkey">
<xsd:annotation>
<xsd:documentation><![CDATA[
The Tkey type defines the element types that are permitted
for Map key situations. These can be any of the "value"
types other than the <null> element.
]]></xsd:documentation>
</xsd:annotation>
<xsd:group ref="GnonNullValue"/>
</xsd:complexType>
<!-- reference -->
<xsd:complexType name="Treference">
<xsd:annotation>
<xsd:documentation><![CDATA[
The Treference type defines the <reference> element. These
are instances of the TserviceReference type, with the addition
of a timeout attribute. If the timeout is not specified,
the default-timeout value is inherited from the encapsulating
<blueprint> definition.
]]></xsd:documentation>
</xsd:annotation>
<xsd:complexContent>
<xsd:extension base="TserviceReference">
<xsd:sequence>
<xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="timeout" type="Ttimeout"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="Tinlined-reference">
<xsd:annotation>
<xsd:documentation><![CDATA[
The Tinlined-reference type is used for inlined (i.e. non top level)
<reference> elements.
]]></xsd:documentation>
</xsd:annotation>
<xsd:complexContent>
<xsd:restriction base="Treference">
<xsd:sequence>
<xsd:group ref="GserviceReferenceElements"/>
<xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="id" use="prohibited"/>
<xsd:attribute name="depends-on" type="TdependsOn"/>
<xsd:attribute name="activation" use="prohibited" fixed="lazy"/>
<xsd:attribute name="interface" type="Tclass"/>
<xsd:attribute name="filter" type="xsd:normalizedString"/>
<xsd:attribute name="component-name" type="Tidref"/>
<xsd:attribute name="availability" type="Tavailability"/>
<xsd:attribute name="timeout" type="Ttimeout"/>
<xsd:anyAttribute namespace="##other" processContents="lax"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<!-- reference-list -->
<xsd:complexType name="Treference-list">
<xsd:annotation>
<xsd:documentation><![CDATA[
The Treference-list builds in the characteristics of the
TserviceReference type to define characteristics of the
<reference-list>. This adds in the characteristics that
only apply to collections of references (e.g., member-type).
]]></xsd:documentation>
</xsd:annotation>
<xsd:complexContent>
<xsd:extension base="TserviceReference">
<xsd:sequence>
<xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="member-type" type="Tservice-use" default="service-object"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="Tinlined-reference-list">
<xsd:annotation>
<xsd:documentation><![CDATA[
The Tinlined-reference-list type is used for inlined (i.e. non top level)
<reference-list> elements.
]]></xsd:documentation>
</xsd:annotation>
<xsd:complexContent>
<xsd:restriction base="Treference-list">
<xsd:sequence>
<xsd:group ref="GserviceReferenceElements"/>
<xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="id" use="prohibited"/>
<xsd:attribute name="depends-on" type="TdependsOn"/>
<xsd:attribute name="activation" use="prohibited" fixed="lazy"/>
<xsd:attribute name="interface" type="Tclass"/>
<xsd:attribute name="filter" type="xsd:normalizedString"/>
<xsd:attribute name="component-name" type="Tidref"/>
<xsd:attribute name="availability" type="Tavailability"/>
<xsd:attribute name="member-type" type="Tservice-use" default="service-object"/>
<xsd:anyAttribute namespace="##other" processContents="lax"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<!-- Reference base class -->
<xsd:complexType name="TserviceReference">
<xsd:annotation>
<xsd:documentation><![CDATA[
TserviceReference is the base element type used for <reference>
and <reference-list> elements. This type defines all of the
characteristics common to both sorts of references.
]]></xsd:documentation>
</xsd:annotation>
<xsd:complexContent>
<xsd:extension base="Tcomponent">
<xsd:sequence>
<xsd:group ref="GserviceReferenceElements"/>
</xsd:sequence>
<xsd:attribute name="interface" type="Tclass">
<xsd:annotation>
<xsd:documentation><![CDATA[
The interface that the OSGi service must implement and that will be
implemented by the proxy object.
This attribute is optional.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="filter" type="xsd:normalizedString">
<xsd:annotation>
<xsd:documentation><![CDATA[
A filter string used to narrow the search for a matching service
reference.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="component-name" type="Tidref">
<xsd:annotation>
<xsd:documentation><![CDATA[
An optional specifier that can be used to match a service definition
to one created by a specific blueprint component.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="availability" type="Tavailability">
<xsd:annotation>
<xsd:documentation><![CDATA[
Use to control the initial processing of service references at
blueprint context startup. "mandatory" indicates the context
should not start unless the service is available within the
specified context startup period. "optional" indicates availability
of this service is not a requirement at bundle startup.
NOTE: No default is specified because this can be overridden
by the default-availability attribute of the <blueprint> element.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:anyAttribute namespace="##other" processContents="lax"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:group name="GserviceReferenceElements">
<xsd:sequence>
<xsd:element name="description" type="Tdescription" minOccurs="0"/>
<!-- listener -->
<xsd:element name="reference-listener" type="TreferenceListener" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation><![CDATA[
A definition of a listener that will watch for bind/unbind events
associated with the service reference. The targetted listener can
be a <ref> to a <bean> or <reference> element, or an inline
<bean> or <reference>.
]]></xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:group>
<xsd:complexType name="TreferenceListener">
<xsd:annotation>
<xsd:documentation><![CDATA[
TReferenceListener defines a reference listener that is attached
to a <reference> or <reference-list> element. The listener
object can be specified as a <ref> or as an inline <bean> or
<reference> component. Listener events are mapped to the indicated
bind or unbind methods.
]]></xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:group ref="GtargetComponent" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="ref" type="Tidref"/>
<xsd:attribute name="bind-method" type="Tmethod"/>
<xsd:attribute name="unbind-method" type="Tmethod"/>
</xsd:complexType>
<xsd:simpleType name="Tactivation">
<xsd:annotation>
<xsd:documentation><![CDATA[
Tactivation defines the activation type for components. This is used in this
schema by the <blueprint> default-activation attribute and the
activation attribute.
]]></xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:NMTOKEN">
<xsd:enumeration value="eager"/>
<xsd:enumeration value="lazy"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="Tavailability">
<xsd:annotation>
<xsd:documentation><![CDATA[
Tavailability defines an availability attribute type. This is used in this
schema by the <blueprint> default-availability attribute and the
<reference> and <reference-list> availability attribute.
]]></xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:NMTOKEN">
<xsd:enumeration value="mandatory"/>
<xsd:enumeration value="optional"/>
</xsd:restriction>
</xsd:simpleType>
<!-- service -->
<xsd:complexType name="Tservice">
<xsd:annotation>
<xsd:documentation><![CDATA[
Tservice is the type for services exported by this blueprint bundle.
Services are sourced by either a <ref> to a <bean> component or an
<inline> bean component.
]]></xsd:documentation>
</xsd:annotation>
<xsd:complexContent>
<xsd:extension base="Tcomponent">
<xsd:sequence>
<xsd:group ref="GserviceElements"/>
</xsd:sequence>
<xsd:attribute name="interface" type="Tclass">
<xsd:annotation>
<xsd:documentation><![CDATA[
The interface that this OSGi service will provide.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="ref" type="Tidref">
<xsd:annotation>
<xsd:documentation><![CDATA[
The ref attribute can be used to specify the component that provides
the object exported as an OSGi service.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="auto-export" type="TautoExportModes" default="disabled">
<xsd:annotation>
<xsd:documentation><![CDATA[
If set to a value different from "disabled", the Blueprint Container
will introspect the target to discover the set of interfaces or classes
that the service will be registered under.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="ranking" type="xsd:int" default="0">
<xsd:annotation>
<xsd:documentation><![CDATA[
A service ranking value that is added to the service properties
the service will be published with.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:anyAttribute namespace="##other" processContents="lax"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="Tinlined-service">
<xsd:annotation>
<xsd:documentation><![CDATA[
The Tinlined-service type is used for inlined (i.e. non top level)
<service> elements.
]]></xsd:documentation>
</xsd:annotation>
<xsd:complexContent>
<xsd:restriction base="Tservice">
<xsd:sequence>
<xsd:group ref="GserviceElements"/>
</xsd:sequence>
<xsd:attribute name="id" use="prohibited"/>
<xsd:attribute name="depends-on" type="TdependsOn"/>
<xsd:attribute name="activation" use="prohibited" fixed="lazy"/>
<xsd:attribute name="interface" type="Tclass"/>
<xsd:attribute name="ref" type="Tidref"/>
<xsd:attribute name="auto-export" type="TautoExportModes" default="disabled"/>
<xsd:attribute name="ranking" type="xsd:int" default="0"/>
<xsd:anyAttribute namespace="##other" processContents="lax"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<xsd:group name="GbaseServiceElements">
<xsd:sequence>
<xsd:element name="description" type="Tdescription" minOccurs="0"/>
<xsd:element name="interfaces" type="Tinterfaces" minOccurs="0">
<xsd:annotation>
<xsd:documentation><![CDATA[
A collection of one or more interface class names this service
will be registered under. The <service> element also has
a shortcut interface attribute for the usual case of just
a single interface being used. This also cannot be used if
the auto-export attribute is used.
]]></xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="service-properties" type="TserviceProperties" minOccurs="0">
<xsd:annotation>
<xsd:documentation><![CDATA[
The service provided when the service is registered. The service
properties are similar to map elements, but the keys must always
be strings, and the values are required to be in a narrower range.
]]></xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="registration-listener" type="TregistrationListener" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation><![CDATA[
A set of 0 or more registration listeners attached to this service
component. The registration listeners will be notified whenever the
service is registered or unregistered from the framework service
registry.
]]></xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:group>
<xsd:group name="GserviceElements">
<xsd:annotation>
<xsd:documentation><![CDATA[
A set of service elements.
]]></xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:group ref="GbaseServiceElements"/>
<xsd:group ref="GtargetComponent" minOccurs="0">
<xsd:annotation>
<xsd:documentation><![CDATA[
A service definition can use any of the target types as an inline element
as well.
]]></xsd:documentation>
</xsd:annotation>
</xsd:group>
</xsd:sequence>
</xsd:group>
<xsd:complexType name="TregistrationListener">
<xsd:annotation>
<xsd:documentation><![CDATA[
A registration listener definition. The target registration listener
can be either a <ref> to a <bean> or <service> component, or an inline
<bean> or <service> component definition. The registration-method and
unregistration-method attributes define the methods that will be called
for the respective events.
For the very common case of using a <ref> to a listener component, the
ref attribute may also be used as a shortcut.
]]></xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:group ref="GtargetComponent" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="ref" type="Tidref"/>
<xsd:attribute name="registration-method" type="Tmethod"/>
<xsd:attribute name="unregistration-method" type="Tmethod"/>
</xsd:complexType>
<!-- Values -->
<xsd:group name="Gvalue">
<xsd:annotation>
<xsd:documentation><![CDATA[
The set of "value" types that can be used in any place a value
can be specified. This set includes the <ref> and <idref> elements, any of the
component types (<bean>, <service>, etc.) as inline components, the
generic <value> element for types sourced from string values, any of the
collection types (<set>, <list>, <array>, <map>, <props>), and the
<null> type to inject a null value.
]]></xsd:documentation>
</xsd:annotation>
<xsd:choice>
<xsd:group ref="GnonNullValue"/>
<xsd:element name="null" type="Tnull"/>
</xsd:choice>
</xsd:group>
<xsd:complexType name="Tnull">
<xsd:annotation>
<xsd:documentation><![CDATA[
The definition for a <null> value type.
]]></xsd:documentation>
</xsd:annotation>
</xsd:complexType>
<xsd:group name="GnonNullValue">
<xsd:annotation>
<xsd:documentation><![CDATA[
The set of "value" types that can be used in any place a non-null value
can be specified. This set includes the <ref> and <idref> elements, any of the
component types (<bean>, <service>, etc.) as inline components, the
generic <value> element for types sourced from string values, and any of the
collection types (<set>, <list>, <array>, <map>, <props>).
The <null> type is NOT a member of this group.
]]></xsd:documentation>
</xsd:annotation>
<xsd:choice>
<xsd:group ref="GallComponents"/>
<xsd:element name="idref" type="Tref"/>
<xsd:element name="value" type="Tvalue"/>
<xsd:element name="list" type="Tcollection"/>
<xsd:element name="set" type="Tcollection"/>
<xsd:element name="map" type="Tmap"/>
<xsd:element name="array" type="Tcollection"/>
<xsd:element name="props" type="Tprops"/>
</xsd:choice>
</xsd:group>
<xsd:complexType name="Tref">
<xsd:annotation>
<xsd:documentation><![CDATA[
Tref is the type used for <ref> elements. This specifies a required
component id for the reference component.
]]></xsd:documentation>
</xsd:annotation>
<xsd:attribute name="component-id" type="Tidref" use="required"/>
</xsd:complexType>
<xsd:complexType name="Tvalue" mixed="true">
<xsd:annotation>
<xsd:documentation><![CDATA[
Tvalue is the type used for <value> elements. The <value> element
is used for types that can be created from a single string value.
The string value is the data value for the element. The optional
type attribute allows a target conversion value to be explicitly
specified.
]]></xsd:documentation>
</xsd:annotation>
<xsd:attribute name="type" type="Ttype"/>
</xsd:complexType>
<!-- Collection Values -->
<xsd:complexType name="TtypedCollection">
<xsd:annotation>
<xsd:documentation><![CDATA[
TtypeCollection defines comment attributes shared among different
collection types that allow a default value type to be specified.
]]></xsd:documentation>
</xsd:annotation>
<xsd:attribute name="value-type" type="Ttype"/>
</xsd:complexType>
<xsd:complexType name="Tcollection">
<xsd:annotation>
<xsd:documentation><![CDATA[
Tcollection is the base schema type for different ordered collection
types. This is shared between the <array>, <list>, and <set> elements.
]]></xsd:documentation>
</xsd:annotation>
<xsd:complexContent>
<xsd:extension base="TtypedCollection">
<xsd:group ref="Gvalue" minOccurs="0" maxOccurs="unbounded"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="Tprops">
<xsd:annotation>
<xsd:documentation><![CDATA[
Tprops is the type used by the <props> value element. The prop elements
are pairs of string-valued keys and values.
]]></xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="prop" type="Tprop" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Tprop" mixed="true">
<xsd:annotation>
<xsd:documentation><![CDATA[
Tprop is a single property element for a <props> value type. The property
value can be specified using either the attribute, or as value data for
the property element.
]]></xsd:documentation>
</xsd:annotation>
<xsd:attribute name="key" type="TstringValue" use="required"/>
<xsd:attribute name="value" type="TstringValue"/>
</xsd:complexType>
<!-- 'map' element type -->
<xsd:complexType name="Tmap">
<xsd:annotation>
<xsd:documentation><![CDATA[
Tmap is the base type used for <map> elements. A map may have a
default value type specified, so it inherits from the TtypeCollection
type. A key type can also be specified, and the map members are
created from the entry elements, which require a key/value pair.
]]></xsd:documentation>
</xsd:annotation>
<xsd:complexContent>
<xsd:extension base="TtypedCollection">
<xsd:sequence>
<xsd:element name="entry" type="TmapEntry" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="key-type" type="Ttype"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<!-- 'entry' element type -->
<xsd:complexType name="TmapEntry">
<xsd:annotation>
<xsd:documentation><![CDATA[
TmapEntry is used for <entry> elements nested inside of a <map> element.
Each <entry> instance defines a key/value pair that will be added to the
Map. Both the keys and values may be arbitrary types. Keys must not
be <null> but <null> is permitted for entry values. A default type
can be specified for both the keys and the values, but individual keys
or values can override the default.
]]></xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="key" type="Tkey" minOccurs="0"/>
<xsd:group ref="Gvalue" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="key" type="TstringValue"/>
<xsd:attribute name="key-ref" type="Tidref"/>
<xsd:attribute name="value" type="TstringValue"/>
<xsd:attribute name="value-ref" type="Tidref"/>
</xsd:complexType>
<!-- 'service property' element type -->
<xsd:complexType name="TserviceProperties">
<xsd:annotation>
<xsd:documentation><![CDATA[
TserviceProperty is used for <service-properties> elements.
The syntax is similar to what is defined for <map>, but keys must be
string values and there are no type defaults that can be specified.
created from the entry elements, which require a key/value pair.
]]></xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="entry" type="TservicePropertyEntry" minOccurs="0" maxOccurs="unbounded"/>
<xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<!-- 'entry' element type -->
<xsd:complexType name="TservicePropertyEntry">
<xsd:annotation>
<xsd:documentation><![CDATA[
TservicePropertyEntry is an entry value used for the <service-properties>
element. This does not allow a child <key> element and there are no
key-ref or value-ref attributes.
]]></xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:group ref="Gvalue" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="key" type="TstringValue" use="required"/>
<xsd:attribute name="value" type="TstringValue"/>
</xsd:complexType>
<!-- General types -->
<xsd:complexType name="Tdescription" mixed="true">
<xsd:annotation>
<xsd:documentation><![CDATA[
A generic <description> element type to allow documentation to added to the
blueprint configuration.
]]></xsd:documentation>
</xsd:annotation>
<xsd:choice minOccurs="0" maxOccurs="unbounded"/>
</xsd:complexType>
<xsd:complexType name="Tinterfaces">
<xsd:annotation>
<xsd:documentation><![CDATA[
The type definition for the <interfaces> element used for <service>
]]></xsd:documentation>
</xsd:annotation>
<xsd:choice minOccurs="1" maxOccurs="unbounded">
<xsd:element name="value" type="TinterfaceValue"/>
</xsd:choice>
</xsd:complexType>
<xsd:simpleType name="TinterfaceValue">
<xsd:annotation>
<xsd:documentation><![CDATA[
TinterfaceValue is used for subelements of the <interfaces> element.
This is just a <value>xxxxx</value> element where the contained
value is the name of an interface class.
]]></xsd:documentation>
</xsd:annotation>
<xsd:restriction base="Tclass"/>
</xsd:simpleType>
<xsd:simpleType name="Tclass">
<xsd:annotation>
<xsd:documentation><![CDATA[
Tclass is a base type that should be used for all attributes that
refer to java class names.
]]></xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:NCName"/>
</xsd:simpleType>
<xsd:simpleType name="Ttype">
<xsd:annotation>
<xsd:documentation><![CDATA[
Ttype is a base type that refer to java types such as classes or
arrays.
]]></xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:token">
<xsd:pattern value="[\i-[:]][\c-[:]]*(\[\])*"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="Tmethod">
<xsd:annotation>
<xsd:documentation><![CDATA[
Tmethod is a base type that should be used for all attributes that
refer to java method names.
]]></xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:NCName"/>
</xsd:simpleType>
<!--
Should be used for all attributes and elements that refer to method
names
-->
<xsd:simpleType name="Tidref">
<xsd:annotation>
<xsd:documentation><![CDATA[
Tidref is a base type that should be used for all attributes that
refer to component ids.
]]></xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:NCName"/>
</xsd:simpleType>
<xsd:simpleType name="TstringValue">
<xsd:annotation>
<xsd:documentation><![CDATA[
TstringValue is a base type that should be used for all attributes that
refer to raw string values
]]></xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:normalizedString"/>
</xsd:simpleType>
<xsd:simpleType name="TautoExportModes">
<xsd:annotation>
<xsd:documentation><![CDATA[
TautoExportModes is a base type that should be used for export-mode
attributes.
]]></xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:NMTOKEN">
<xsd:enumeration value="disabled"/>
<xsd:enumeration value="interfaces"/>
<xsd:enumeration value="class-hierarchy"/>
<xsd:enumeration value="all-classes"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="Ttimeout">
<xsd:annotation>
<xsd:documentation><![CDATA[
Ttimeout is a base type that should be used for all attributes that
specify timeout values
]]></xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:unsignedLong"/>
</xsd:simpleType>
<xsd:simpleType name="TdependsOn">
<xsd:annotation>
<xsd:documentation><![CDATA[
TdependsOn is a base type that should be used for all attributes that
specify depends-on relationships
]]></xsd:documentation>
</xsd:annotation>
<xsd:restriction>
<xsd:simpleType>
<xsd:list itemType="Tidref"/>
</xsd:simpleType>
<xsd:minLength value="1"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="Tscope">
<xsd:union>
<xsd:simpleType>
<xsd:restriction base="xsd:NMTOKEN">
<xsd:enumeration value="singleton"/>
<xsd:enumeration value="prototype"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType>
<xsd:restriction base="xsd:QName">
<xsd:pattern value=".+:.+"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:union>
</xsd:simpleType>
<xsd:simpleType name="Tservice-use">
<xsd:annotation>
<xsd:documentation><![CDATA[
Indicates the type of object that will be placed within the
reference collection. "service-object" indicates the
collection contains blueprint proxies for imported services.
"service-reference" indicates the collection contains
ServiceReference objects matching the target service type.
]]></xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:NMTOKEN">
<xsd:enumeration value="service-object"/>
<xsd:enumeration value="service-reference"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>

View File

@ -0,0 +1,38 @@
{
"m:connector-selector": {
"topChild": true,
"children": [
"m:properties-to-use",
"m:patterns",
"m:options"
]
},
"m:properties-to-use": {
"children": [
"m:property"
]
},
"m:property": {"children": []},
"m:patterns": {
"children": [
"m:pattern"
]
},
"m:pattern": {"children": []},
"m:options": {
"children": [
"m:fail-back-to-legacy-router",
"m:use-the-only-connector",
"m:use-default-connector",
"m:connector-preferred-as-mandatory",
"m:allow-all-stars-pattern",
"m:treat-no-property-as-any"
]
},
"m:fail-back-to-legacy-router": {"children": []},
"m:use-the-only-connector": {"children": []},
"m:use-default-connector": {"children": []},
"m:connector-preferred-as-mandatory": {"children": []},
"m:allow-all-stars-pattern": {"children": []},
"m:treat-no-property-as-any": {"children": []}
}

View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:m="http://www.entaxy.ru/schemas/entaxy-mediators/1.0" targetNamespace="http://www.entaxy.ru/schemas/entaxy-mediators/1.0" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="connector-selector" type="m:Tconnector-selector">
<xs:annotation>
<xs:documentation>Comment describing your root element</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="Tconnector-selector">
<xs:sequence>
<xs:element name="properties-to-use" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="property" type="xs:string" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="patterns" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="pattern" type="xs:string" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="options" minOccurs="0">
<xs:complexType>
<xs:all>
<xs:element name="fail-back-to-legacy-router" type="xs:boolean" minOccurs="0"/>
<xs:element name="use-the-only-connector" type="xs:boolean" minOccurs="0"/>
<xs:element name="use-default-connector" type="xs:boolean" minOccurs="0"/>
<xs:element name="connector-preferred-as-mandatory" type="xs:boolean" minOccurs="0"/>
<xs:element name="allow-all-stars-pattern" type="xs:boolean" minOccurs="0"/>
<xs:element name="treat-no-property-as-any" type="xs:boolean" minOccurs="0"/>
</xs:all>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:schema>

View File

@ -0,0 +1,148 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~~~~~~licensing~~~~~~
route-producing
==========
Copyright (C) 2020 - 2024 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~~~~~~
-->
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions"
xmlns:entaxy="http://www.entaxy.ru/schemas/1.0"
xmlns:m="http://www.entaxy.ru/schemas/entaxy-mediators/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:blueprint="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:local="http://www.entaxy.ru/schemas/entaxy-mediators/connector-selector/1.0">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:param name="context.type" select="'entaxy.runtime.profile'"/>
<xsl:param name="context.fieldName" select="'in-flow-pre-route'"/>
<xsl:param name="context.objectId" select="'sys-13'"/>
<xsl:template match="/">
<xsl:variable name="processed">
<xsl:sequence select="local:add-ids(./element()[1])"/>
</xsl:variable>
<fragment>
<xsl:for-each select="$processed//m:connector-selector">
<xsl:call-template name="create-selector-bean"/>
</xsl:for-each>
<xsl:apply-templates select="$processed/element()[1]"/>
</fragment>
</xsl:template>
<xsl:function name="local:add-ids" as="element()*">
<xsl:param name="root"/>
<xsl:apply-templates select="$root"/>
</xsl:function>
<xsl:template match="//m:connector-selector[not(@*)]" exclude-result-prefixes="xsl fn xs local">
<m:connector-selector>
<xsl:attribute name="id" select="replace(generate-id(), ':', '') "/>
<xsl:apply-templates select="child::node()"/>
</m:connector-selector>
</xsl:template>
<xsl:template match="//m:connector-selector[@id]" exclude-result-prefixes="xsl fn xs local">
<xsl:comment>generated from 'connector-selector'</xsl:comment>
<to xmlns="http://camel.apache.org/schema/blueprint">
<xsl:attribute name="uri">
<xsl:text>bean:selector-</xsl:text><xsl:value-of select="./@id"/>
</xsl:attribute> <!-- select="concat('bean',':','selector-', ./@id)" /-->
</to>
</xsl:template>
<xsl:template name="create-selector-bean">
<blueprint:bean class="ru.entaxy.platform.profiles.runtime.support.ConnectorSelector" activation="eager">
<xsl:attribute name="id">
<xsl:text>selector-</xsl:text><xsl:value-of select="./@id"/>
</xsl:attribute>
<!-- select="concat('selector-', ./@id)" / -->
<blueprint:property name="config">
<xsl:attribute name="value" select="local:generate-config(.)"/>
</blueprint:property>
<blueprint:property name="profile">
<xsl:attribute name="ref" select="concat('profile-', $context.objectId)"/>
</blueprint:property>
</blueprint:bean>
</xsl:template>
<xsl:function name="local:generate-config">
<xsl:param name="selector-node"/>
<xsl:text>{</xsl:text>
<xsl:apply-templates select="$selector-node/node()"/>
<xsl:text>"_end":true}</xsl:text>
</xsl:function>
<xsl:template match="//m:connector-selector[@id]/m:properties-to-use">
<xsl:text>"properties":[</xsl:text>
<xsl:for-each select="./m:property">
<xsl:text>"</xsl:text><xsl:value-of select="./text()"/><xsl:text>"</xsl:text>
<xsl:if test="./following-sibling::m:property">
<xsl:text>,</xsl:text>
</xsl:if>
</xsl:for-each>
<xsl:text>],</xsl:text>
</xsl:template>
<xsl:template match="//m:connector-selector[@id]/m:patterns">
<xsl:text>"patterns":[</xsl:text>
<xsl:for-each select="./m:pattern">
<xsl:text>"</xsl:text><xsl:value-of select="./text()"/><xsl:text>"</xsl:text>
<xsl:if test="./following-sibling::m:pattern">
<xsl:text>,</xsl:text>
</xsl:if>
</xsl:for-each>
<xsl:text>],</xsl:text>
</xsl:template>
<xsl:template match="//m:connector-selector[@id]/m:options">
<xsl:text>"options":{</xsl:text>
<xsl:for-each select="./element()">
<xsl:text>"</xsl:text><xsl:value-of select="./local-name()"/><xsl:text>":</xsl:text>
<xsl:choose>
<xsl:when test="string-length(./text()) > 0">
<xsl:variable name="value" select="./text()"/>
<xsl:choose>
<xsl:when test="($value = 'true') or ($value = 'false')">
<xsl:value-of select="./text()"/><xsl:text>,</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>"</xsl:text><xsl:value-of select="./text()"/><xsl:text>",</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:text>true,</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
<xsl:text>"_end":true},</xsl:text>
</xsl:template>
<xsl:template name="default-copy" match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>

View File

@ -0,0 +1,194 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~~~~~~licensing~~~~~~
route-producing
==========
Copyright (C) 2020 - 2024 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~~~~~~
-->
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions"
xmlns:entaxy="http://www.entaxy.ru/schemas/1.0"
xmlns:m="http://www.entaxy.ru/schemas/entaxy-mediators/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:blueprint="http://www.osgi.org/xmlns/blueprint/v1.0.0">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:param name="context.type" select="'entaxy.runtime.profile'"/>
<xsl:param name="context.fieldName" select="'in-flow-pre-route'"/>
<xsl:param name="context.objectId" select="'sys-13'"/>
<xsl:param name="profileName" select="'sys-00'"/>
<xsl:variable name="dot">
<xsl:text>.</xsl:text>
</xsl:variable>
<xsl:template match="//entaxy:object-route" exclude-result-prefixes="fn xs">
<xsl:choose>
<xsl:when test="$context.type = 'entaxy.runtime.connector'">
<!-- connector route fields processing -->
<xsl:choose>
<xsl:when test="$context.fieldName = 'responseRoute'">
<route id="custom.response-route" xmlns="http://camel.apache.org/schema/blueprint">
<xsl:variable name="uri">
<xsl:text>direct:connector-</xsl:text><xsl:value-of select="$context.objectId"/><xsl:text>-response-route</xsl:text>
</xsl:variable>
<xsl:text>&#10;</xsl:text>
<xsl:comment>generated from 'entaxy:object-route' for <xsl:value-of
select="$context.objectId"/>:<xsl:value-of select="$context.type"/>/<xsl:value-of
select="$context.fieldName"/>
</xsl:comment>
<from>
<xsl:attribute name="uri" select="$uri"/>
</from>
<xsl:apply-templates select="node()"/>
</route>
</xsl:when>
<xsl:when test="$context.fieldName = 'pre-route'">
<route id="custom.pre-route" xmlns="http://camel.apache.org/schema/blueprint">
<xsl:variable name="uri">
<xsl:text>direct:connector-</xsl:text><xsl:value-of select="$context.objectId"/><xsl:text>-pre-route</xsl:text>
</xsl:variable>
<xsl:text>&#10;</xsl:text>
<xsl:comment>generated from 'entaxy:object-route' for <xsl:value-of
select="$context.objectId"/>:<xsl:value-of select="$context.type"/>/<xsl:value-of
select="$context.fieldName"/>
</xsl:comment>
<from>
<xsl:attribute name="uri" select="$uri"/>
</from>
<xsl:apply-templates select="node()"/>
</route>
</xsl:when>
<xsl:when test="$context.fieldName = 'pre-output'">
<route id="custom.pre-output" xmlns="http://camel.apache.org/schema/blueprint">
<xsl:variable name="uri">
<xsl:text>direct:connector-</xsl:text><xsl:value-of select="$context.objectId"/><xsl:text>-pre-output</xsl:text>
</xsl:variable>
<xsl:text>&#10;</xsl:text>
<xsl:comment>generated from 'entaxy:object-route' for <xsl:value-of
select="$context.objectId"/>:<xsl:value-of select="$context.type"/>/<xsl:value-of
select="$context.fieldName"/>
</xsl:comment>
<from>
<xsl:attribute name="uri" select="$uri"/>
</from>
<xsl:apply-templates select="node()"/>
</route>
</xsl:when>
<!-- custom-connector-out/customOutputRoute -->
<xsl:when test="$context.fieldName = 'customOutputRoute'">
<route xmlns="http://camel.apache.org/schema/blueprint">
<xsl:attribute name="id">
<xsl:value-of select="concat($context.objectId,$dot,'output-route')"/>
</xsl:attribute>
<xsl:text>&#10;</xsl:text>
<xsl:comment>generated from 'entaxy:object-route' for <xsl:value-of
select="$context.objectId"/>:<xsl:value-of select="$context.type"/>/<xsl:value-of
select="$context.fieldName"/>
</xsl:comment>
<from>
<xsl:attribute name="uri">
<xsl:value-of select="'direct:entry-cascade-finish'"/>
</xsl:attribute>
</from>
<xsl:apply-templates select="node()"/>
</route>
</xsl:when>
<xsl:otherwise>
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="//entaxy:object-input-route" exclude-result-prefixes="fn xs">
<xsl:choose>
<xsl:when test="$context.type = 'entaxy.runtime.connector'">
<!-- connector route fields processing -->
<xsl:choose>
<!-- custom-connector-in/customInputRoute -->
<xsl:when test="$context.fieldName = 'customInputRoute'">
<route xmlns="http://camel.apache.org/schema/blueprint">
<xsl:attribute name="id">
<xsl:value-of select="concat($context.objectId,$dot,'input-route')"/>
</xsl:attribute>
<xsl:text>&#10;</xsl:text>
<xsl:comment>generated from 'entaxy:object-route' for <xsl:value-of
select="$context.objectId"/>:<xsl:value-of select="$context.type"/>/<xsl:value-of
select="$context.fieldName"/>
</xsl:comment>
<xsl:apply-templates select="node()"/>
<to>
<xsl:attribute name="uri">
<xsl:value-of select="'direct:exit-cascade-start'"/>
</xsl:attribute>
</to>
</route>
</xsl:when>
<xsl:otherwise>
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="/">
<xsl:apply-templates select="child::node()"/>
</xsl:template>
<xsl:template name="default-copy" match="node()|@*" exclude-result-prefixes="fn xs xsi">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>

View File

@ -0,0 +1,325 @@
{
"m:standard-router": {
"topChild": true,
"children": []
},
"m:set-destination": {
"topChild": true,
"children": []
},
"m:default-destination": {
"topChild": true,
"children": []
},
"m:prefer-connector": {
"topChild": true,
"children": ["protocol", "classifier", "type"]
},
"protocol": {
"children": []
},
"classifier": {
"children": []
},
"type": {
"children": []
},
"m:next-route": {
"topChild": true,
"attrs": {
"local": null,
"async": null
},
"children": []
},
"m:respond": {
"topChild": true,
"attrs": {
"now": null,
"continue": null,
"continueAsync": null
},
"children": []
},
"m:xslt": {
"topChild": true,
"attrs": {
"resource": null,
"params": null
},
"children": []
},
"m:xslt-xalan": {
"topChild": true,
"attrs": {
"resource": null,
"params": null
},
"children": []
},
"m:atlasmap": {
"topChild": true,
"attrs": {
"resource": null,
"params": null
},
"children": []
},
"m:read-secret": {
"topChild": true,
"attrs": {
"vault": null,
"property": null,
"alias": null
},
"children": []
},
"m:to-connection": {
"topChild": true,
"attrs": {
"name": null,
"path": null,
"dynamic": null
},
"children": []
},
"m:entaxy-trace": {
"topChild": true,
"attrs": {
"reset": null
},
"children": [
"expressionDefinition",
"constant",
"exchangeProperty",
"groovy",
"header",
"hl7terser",
"jsonpath",
"language",
"method",
"mvel",
"ognl",
"ref",
"simple",
"spel",
"tokenize",
"xtokenize",
"xpath",
"xquery"
]
},
"m:call-route": {
"topChild": true,
"attrs": {
"name": null,
"library": null,
"async": null
},
"children": []
},
"m:set-log-key": {
"topChild": true,
"children": [
"m:service",
"m:operation",
"m:objectId",
"m:parameter",
"m:sender",
"m:receiver",
"m:custom"
]
},
"m:service": {
"attrs": {
"reset": null
},
"children": [
"expressionDefinition",
"constant",
"exchangeProperty",
"groovy",
"header",
"hl7terser",
"jsonpath",
"language",
"method",
"mvel",
"ognl",
"ref",
"simple",
"spel",
"tokenize",
"xtokenize",
"xpath",
"xquery"
]
},
"m:operation": {
"attrs": {
"reset": null
},
"children": [
"expressionDefinition",
"constant",
"exchangeProperty",
"groovy",
"header",
"hl7terser",
"jsonpath",
"language",
"method",
"mvel",
"ognl",
"ref",
"simple",
"spel",
"tokenize",
"xtokenize",
"xpath",
"xquery"
]
},
"m:objectId": {
"attrs": {
"reset": null
},
"children": [
"expressionDefinition",
"constant",
"exchangeProperty",
"groovy",
"header",
"hl7terser",
"jsonpath",
"language",
"method",
"mvel",
"ognl",
"ref",
"simple",
"spel",
"tokenize",
"xtokenize",
"xpath",
"xquery"
]
},
"m:parameter": {
"attrs": {
"reset": null
},
"children": [
"expressionDefinition",
"constant",
"exchangeProperty",
"groovy",
"header",
"hl7terser",
"jsonpath",
"language",
"method",
"mvel",
"ognl",
"ref",
"simple",
"spel",
"tokenize",
"xtokenize",
"xpath",
"xquery"
]
},
"m:sender": {
"attrs": {
"reset": null
},
"children": [
"expressionDefinition",
"constant",
"exchangeProperty",
"groovy",
"header",
"hl7terser",
"jsonpath",
"language",
"method",
"mvel",
"ognl",
"ref",
"simple",
"spel",
"tokenize",
"xtokenize",
"xpath",
"xquery"
]
},
"m:receiver": {
"attrs": {
"reset": null
},
"children": [
"expressionDefinition",
"constant",
"exchangeProperty",
"groovy",
"header",
"hl7terser",
"jsonpath",
"language",
"method",
"mvel",
"ognl",
"ref",
"simple",
"spel",
"tokenize",
"xtokenize",
"xpath",
"xquery"
]
},
"m:custom": {
"attrs": {
"name": null,
"reset": null
},
"children": [
"expressionDefinition",
"constant",
"exchangeProperty",
"groovy",
"header",
"hl7terser",
"jsonpath",
"language",
"method",
"mvel",
"ognl",
"ref",
"simple",
"spel",
"tokenize",
"xtokenize",
"xpath",
"xquery"
]
},
"m:log": {
"topChild": true,
"attrs": {
"message": null,
"loggingLevel": null,
"logName": null,
"marker": null,
"loggerRef": null,
"inheritErrorHandler": null,
"customId": null,
"id": null
},
"children": [
"description"
]
}
}

View File

@ -0,0 +1,163 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:mediators="http://www.entaxy.ru/schemas/entaxy-mediators/1.0" xmlns:camel="http://camel.apache.org/schema/blueprint" targetNamespace="http://www.entaxy.ru/schemas/entaxy-mediators/1.0" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:import namespace="http://camel.apache.org/schema/blueprint" schemaLocation="camel-entaxy.xsd"/>
<xs:element name="standard-router"/>
<xs:element name="set-destination" type="mediators:Tdestination"/>
<xs:element name="default-destination" type="mediators:Tdestination"/>
<xs:element name="prefer-connector">
<xs:complexType>
<xs:sequence maxOccurs="unbounded">
<xs:any namespace="##any"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="next-route">
<xs:complexType>
<xs:attribute name="local" type="xs:boolean"/>
<xs:attribute name="async" type="xs:boolean"/>
</xs:complexType>
</xs:element>
<xs:element name="respond">
<xs:complexType>
<xs:attribute name="now" type="xs:boolean" default="true"/>
<xs:attribute name="continue" type="xs:boolean" default="true"/>
<xs:attribute name="continueAsync" type="xs:boolean" default="true"/>
</xs:complexType>
</xs:element>
<xs:element name="xslt">
<xs:complexType>
<xs:attribute name="resource" use="required"/>
<xs:attribute name="params"/>
</xs:complexType>
</xs:element>
<xs:element name="xslt-xalan">
<xs:complexType>
<xs:attribute name="resource" use="required"/>
<xs:attribute name="params"/>
</xs:complexType>
</xs:element>
<xs:element name="atlasmap">
<xs:complexType>
<xs:attribute name="resource" use="required"/>
<xs:attribute name="params"/>
</xs:complexType>
</xs:element>
<xs:element name="read-secret">
<xs:complexType>
<xs:attribute name="vault" type="xs:string" use="required"/>
<xs:attribute name="property" type="xs:string" default="__SECRET__"/>
<xs:attribute name="alias" type="xs:string" default="secret"/>
</xs:complexType>
</xs:element>
<xs:element name="to-connection">
<xs:complexType>
<xs:sequence>
<xs:any namespace="##any" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="name" type="xs:string" use="required"/>
<xs:attribute name="path" type="xs:string"/>
<xs:attribute name="dynamic" type="xs:boolean" default="true"/>
</xs:complexType>
</xs:element>
<xs:element name="entaxy-trace" type="mediators:TEntaxyTrace"/>
<xs:element name="call-route">
<xs:complexType>
<xs:attribute name="name" type="xs:string" use="required"/>
<xs:attribute name="library" type="xs:string"/>
<xs:attribute name="async" type="xs:boolean" default="false"/>
</xs:complexType>
</xs:element>
<xs:element name="set-log-key">
<xs:complexType>
<xs:sequence>
<xs:element name="service" type="mediators:TEntaxyTrace" minOccurs="0"/>
<xs:element name="operation" type="mediators:TEntaxyTrace" minOccurs="0"/>
<xs:element name="objectId" type="mediators:TEntaxyTrace" minOccurs="0"/>
<xs:element name="parameter" type="mediators:TEntaxyTrace" minOccurs="0"/>
<xs:element name="sender" type="mediators:TEntaxyTrace" minOccurs="0"/>
<xs:element name="receiver" type="mediators:TEntaxyTrace" minOccurs="0"/>
<xs:element name="custom" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:complexContent>
<xs:extension base="mediators:TEntaxyTrace">
<xs:attribute name="name" type="xs:string" use="required"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="log">
<xs:complexType>
<xs:complexContent>
<xs:extension base="camel:noOutputDefinition">
<xs:sequence/>
<xs:attribute name="message" type="xs:string" use="required">
<xs:annotation>
<xs:documentation xml:lang="en"><![CDATA[
Sets the log message (uses simple language).
]]></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="loggingLevel" type="xs:string">
<xs:annotation>
<xs:documentation xml:lang="en"><![CDATA[
Sets the logging level. The default value is INFO. Default value: INFO
]]></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="logName" type="xs:string">
<xs:annotation>
<xs:documentation xml:lang="en"><![CDATA[
Sets the name of the logger.
]]></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="marker" type="xs:string">
<xs:annotation>
<xs:documentation xml:lang="en"><![CDATA[
To use slf4j marker.
]]></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="loggerRef" type="xs:string">
<xs:annotation>
<xs:documentation xml:lang="en"><![CDATA[
To refer to a custom logger instance to lookup from the registry.
]]></xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:simpleType name="Tdestination">
<xs:restriction base="xs:string">
<xs:pattern value="[0-9a-zA-Z\-_.]+(:(system.name|system-group.name|queue.name|topic.name)){0,1}"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="TEntaxyTrace">
<xs:choice>
<xs:element ref="camel:expressionDefinition"/>
<xs:element ref="camel:constant"/>
<xs:element ref="camel:exchangeProperty"/>
<xs:element ref="camel:groovy"/>
<xs:element ref="camel:header"/>
<xs:element ref="camel:hl7terser"/>
<xs:element ref="camel:jsonpath"/>
<xs:element ref="camel:language"/>
<xs:element ref="camel:method"/>
<xs:element ref="camel:mvel"/>
<xs:element ref="camel:ognl"/>
<xs:element ref="camel:ref"/>
<xs:element ref="camel:simple"/>
<xs:element ref="camel:spel"/>
<xs:element ref="camel:tokenize"/>
<xs:element ref="camel:xtokenize"/>
<xs:element ref="camel:xpath"/>
<xs:element ref="camel:xquery"/>
</xs:choice>
<xs:attribute name="reset" type="xs:boolean"/>
</xs:complexType>
</xs:schema>

Some files were not shown because too many files have changed in this diff Show More