Skip to content

Commit

Permalink
add lightweight registry impl
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoshani committed May 21, 2024
1 parent 90ad04f commit 2c447db
Show file tree
Hide file tree
Showing 18 changed files with 3,576 additions and 0 deletions.
179 changes: 179 additions & 0 deletions components/registry-mgt/org.wso2.carbon.light.registry.mgt/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com) All Rights Reserved.
~
~ WSO2 LLC. licenses this file to you 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.
-->
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.wso2.carbon.identity.framework</groupId>
<artifactId>registry-mgt</artifactId>
<version>7.2.20-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.light.registry.mgt</artifactId>
<packaging>bundle</packaging>
<name>WSO2 Carbon - Registry Mgt</name>
<description>A custom wso2 products or solution</description>
<url>http://www.wso2.com</url>

<dependencies>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</dependency>
<dependency>
<groupId>org.ops4j.pax.logging</groupId>
<artifactId>pax-logging-api</artifactId>
</dependency>
<dependency>
<groupId>org.wso2.carbon.utils</groupId>
<artifactId>org.wso2.carbon.database.utils</artifactId>
</dependency>
<dependency>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.utils</artifactId>
</dependency>
<dependency>
<groupId>org.wso2.carbon.identity.framework</groupId>
<artifactId>org.wso2.carbon.identity.base</artifactId>
</dependency>
<dependency>
<groupId>org.wso2.carbon.identity.framework</groupId>
<artifactId>org.wso2.carbon.identity.core</artifactId>
</dependency>
</dependencies>

<build>
<plugins>

<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-SymbolicName>
${project.artifactId}
</Bundle-SymbolicName>
<Private-Package>
org.wso2.carbon.light.registry.mgt.internal
</Private-Package>
<Export-Package>
!org.wso2.carbon.light.registry.mgt.internal,
org.wso2.carbon.light.registry.mgt.*
</Export-Package>
<Import-Package>
org.apache.axiom.om.*; version="${axiom.osgi.version.range}",
org.apache.axis2.*; version="${axis2.osgi.version.range}",
org.apache.commons.codec.binary; version="${commons-codec.wso2.osgi.version.range}",
org.apache.commons.io; version="${commons.io.wso2.osgi.version.range}",
org.apache.commons.lang; version="${commons-lang.wso2.osgi.version.range}",
org.apache.commons.logging; version="${import.package.version.commons.logging}",
org.apache.xerces.util; resolution:=optional,

org.osgi.framework; version="${osgi.framework.imp.pkg.version.range}",
org.osgi.service.component; version="${osgi.service.component.imp.pkg.version.range}",
org.osgi.util.tracker; version="${osgi.util.tracker.imp.pkg.version.range}",
org.apache.commons.logging; version="${import.package.version.commons.logging}",
org.wso2.carbon.utils;version="${carbon.kernel.package.import.version.range}",
org.wso2.carbon.identity.core.*; version="${carbon.identity.package.import.version.range}",
</Import-Package>
</instructions>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven.surefire.plugin.version}</version>
<configuration>
<argLine>
--add-opens=java.base/java.util=ALL-UNNAMED
</argLine>
<suiteXmlFiles>
<suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.version}</version>
<executions>
<execution>
<id>default-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>default-prepare-agent-integration</id>
<goals>
<goal>prepare-agent-integration</goal>
</goals>
</execution>
<execution>
<id>default-report</id>
<goals>
<goal>report</goal>
</goals>
</execution>
<execution>
<id>default-report-integration</id>
<goals>
<goal>report-integration</goal>
</goals>
</execution>
<execution>
<id>default-check</id>
<goals>
<goal>check</goal>
</goals>
<configuration>
<rules>
<rule implementation="org.jacoco.maven.RuleConfiguration">
<element>BUNDLE</element>
<limits>
<limit implementation="org.jacoco.report.check.Limit">
<counter>COMPLEXITY</counter>
<value>COVEREDRATIO</value>
<minimum>0.17</minimum>
</limit>
</limits>
</rule>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com).
*
* WSO2 LLC. licenses this file to you 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.
*/
package org.wso2.carbon.light.registry.mgt;

public class LightRegistryException extends Exception {

/**
* Constructs a new exception with the specified detail message.
*
* @param message the detail message.
*/
public LightRegistryException(String message) {

super(message);
}

/**
* Constructs a new exception with the specified detail message and cause.
*
* @param message the detail message.
* @param cause the cause of this exception.
*/
public LightRegistryException(String message, Throwable cause) {

super(message, cause);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package org.wso2.carbon.light.registry.mgt.constants;

public class LightRegistryConstants {

public LightRegistryConstants() {

}

public static final String ROOT_PATH = "/";
public static final String PATH_SEPARATOR = "/";
public static final String PATH = "PATH";
public static final String REG_PATH_ID = "REG_PATH_ID";
public static final String PATH_PARENT_ID = "PATH_PARENT_ID";
public static final String TENANT_ID = "TENANT_ID";
public static final String REG_NAME = "REG_NAME";
public static final String REG_VALUE = "REG_VALUE";
public static final String REG_MEDIA_TYPE = "REG_MEDIA_TYPE";
public static final String REG_CREATOR = "REG_CREATOR";
public static final String REG_CREATED_TIME = "REG_CREATED_TIME";
public static final String REG_LAST_UPDATER = "REG_LAST_UPDATOR";
public static final String REG_LAST_UPDATED_TIME = "REG_LAST_UPDATED_TIME";
public static final String REG_DESCRIPTION = "REG_DESCRIPTION";
public static final String REG_PATH_VALUE = "REG_PATH_VALUE";
public static final String REG_UUID = "REG_UUID";
public static final String REG_PROPERTY_ID = "REG_PROPERTY_ID";
public static final String REG_ID = "REG_ID";
public static final String REG_CONTENT_ID = "REG_CONTENT_ID";
public static final String REG_CONTENT_DATA = "REG_CONTENT_DATA";
public static final String AUTHOR = "wso2.system.user";
public static final String TAG_MEDIA_TYPE = "tag";

}
Loading

0 comments on commit 2c447db

Please sign in to comment.