目前的流水线模型,不完整

This commit is contained in:
mianbin 2025-03-22 11:07:19 +08:00
parent 6981bf525e
commit ee727490b1
268 changed files with 13370 additions and 49 deletions

11
.idea/$PROJECT_FILE$ generated Normal file
View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AnalysisProjectProfileManager">
<option name="PROJECT_PROFILE" />
<option name="USE_PROJECT_LEVEL_SETTINGS" value="false" />
<list size="0" />
</component>
<component name="SuppressionsComponent">
<option name="suppComments" value="[]" />
</component>
</project>

8
.idea/.gitignore generated vendored Normal file
View File

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

657
.idea/CopilotChatHistory.xml generated Normal file

File diff suppressed because one or more lines are too long

7
.idea/MarsCodeWorkspaceAppSettings.xml generated Normal file
View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="com.codeverse.userSettings.MarscodeWorkspaceAppSettingsState">
<option name="ckgOperationStatus" value="SUCCESS" />
<option name="progress" value="0.99902534" />
</component>
</project>

92
.idea/compiler.xml generated Normal file
View File

@ -0,0 +1,92 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile default="true" name="Default" enabled="true" />
<profile name="Annotation profile for ops-pro" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<processorPath useClasspath="false">
<entry name="$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-configuration-processor/3.3.4/spring-boot-configuration-processor-3.3.4.jar" />
<entry name="$MAVEN_REPOSITORY$/org/projectlombok/lombok/1.18.34/lombok-1.18.34.jar" />
<entry name="$MAVEN_REPOSITORY$/org/mapstruct/mapstruct-processor/1.6.2/mapstruct-processor-1.6.2.jar" />
<entry name="$MAVEN_REPOSITORY$/org/mapstruct/mapstruct/1.6.2/mapstruct-1.6.2.jar" />
</processorPath>
<module name="spring-boot-starter-protection" />
<module name="spring-boot-starter-monitor" />
<module name="module-system-biz" />
<module name="pipeline-ci-project" />
<module name="module-system-api" />
<module name="spring-boot-starter-mq" />
<module name="spring-boot-starter-mongo" />
<module name="commons" />
<module name="spring-boot-starter-plugin" />
<module name="ops-server" />
<module name="pipeline-ci-log" />
<module name="spring-boot-starter-biz-data-permission" />
<module name="pipeline-ci-quality" />
<module name="spring-boot-starter-mybatis" />
<module name="pipeline-ci-commons" />
<module name="pipeline-ci-event" />
<module name="module-infra-api" />
<module name="pipeline-ci-scm-repository" />
<module name="spring-boot-starter-test" />
<module name="spring-boot-starter-websocket" />
<module name="pipeline-ci-process" />
<module name="system-plugin-example-web" />
<module name="pipeline-ci-market" />
<module name="spring-boot-starter-biz-ip" />
<module name="module-infra-biz" />
<module name="spring-boot-starter-job" />
<module name="spring-boot-starter-web" />
<module name="pipeline-ci-ticket" />
<module name="spring-boot-starter-excel" />
<module name="spring-boot-starter-biz-tenant" />
<module name="spring-boot-starter-redis" />
<module name="spring-boot-starter-security" />
</profile>
</annotationProcessing>
</component>
<component name="JavacSettings">
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
<module name="app-plugins" options="-parameters" />
<module name="commons" options="-parameters" />
<module name="framework" options="-parameters" />
<module name="module-infra-api" options="-parameters" />
<module name="module-infra-biz" options="-parameters" />
<module name="module-system-api" options="-parameters" />
<module name="module-system-biz" options="-parameters" />
<module name="modules" options="-parameters" />
<module name="ops-pro" options="-parameters" />
<module name="ops-server" options="-parameters" />
<module name="pipeline-ci-commons" options="-parameters" />
<module name="pipeline-ci-event" options="-parameters" />
<module name="pipeline-ci-log" options="-parameters" />
<module name="pipeline-ci-market" options="-parameters" />
<module name="pipeline-ci-process" options="-parameters" />
<module name="pipeline-ci-project" options="-parameters" />
<module name="pipeline-ci-quality" options="-parameters" />
<module name="pipeline-ci-scm-repository" options="-parameters" />
<module name="pipeline-ci-ticket" options="-parameters" />
<module name="spring-boot-starter-biz-data-permission" options="-parameters" />
<module name="spring-boot-starter-biz-ip" options="-parameters" />
<module name="spring-boot-starter-biz-tenant" options="-parameters" />
<module name="spring-boot-starter-excel" options="-parameters" />
<module name="spring-boot-starter-job" options="-parameters" />
<module name="spring-boot-starter-mongo" options="-parameters" />
<module name="spring-boot-starter-monitor" options="-parameters" />
<module name="spring-boot-starter-mq" options="-parameters" />
<module name="spring-boot-starter-mybatis" options="-parameters" />
<module name="spring-boot-starter-plugin" options="-parameters" />
<module name="spring-boot-starter-protection" options="-parameters" />
<module name="spring-boot-starter-redis" options="-parameters" />
<module name="spring-boot-starter-security" options="-parameters" />
<module name="spring-boot-starter-test" options="-parameters" />
<module name="spring-boot-starter-web" options="-parameters" />
<module name="spring-boot-starter-websocket" options="-parameters" />
<module name="system-framework" options="-parameters" />
<module name="system-plugin-example-web" options="-parameters" />
</option>
</component>
</project>

79
.idea/encodings.xml generated Normal file
View File

@ -0,0 +1,79 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$/app-plugins/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/app-plugins/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/framework/commons/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/framework/commons/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-biz-data-permission/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-biz-data-permission/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-biz-ip/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-biz-ip/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-biz-tenant/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-biz-tenant/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-excel/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-excel/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-job/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-job/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-mongo/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-mongo/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-monitor/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-monitor/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-mq/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-mq/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-mybatis/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-mybatis/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-plugin/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-plugin/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-protection/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-protection/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-redis/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-redis/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-security/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-security/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-test/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-test/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-web/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-web/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-websocket/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-websocket/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/framework/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/framework/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/modules/module-infra-api/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/modules/module-infra-api/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/modules/module-infra-biz/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/modules/module-infra-biz/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/modules/module-system-api/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/modules/module-system-api/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/modules/module-system-biz/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/modules/module-system-biz/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/modules/pipeline-ci-commons/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/modules/pipeline-ci-commons/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/modules/pipeline-ci-event/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/modules/pipeline-ci-event/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/modules/pipeline-ci-log/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/modules/pipeline-ci-log/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/modules/pipeline-ci-market/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/modules/pipeline-ci-market/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/modules/pipeline-ci-process/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/modules/pipeline-ci-process/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/modules/pipeline-ci-project/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/modules/pipeline-ci-project/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/modules/pipeline-ci-quality/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/modules/pipeline-ci-quality/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/modules/pipeline-ci-scm-repository/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/modules/pipeline-ci-scm-repository/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/modules/pipeline-ci-ticket/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/modules/pipeline-ci-ticket/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/modules/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/modules/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ops-server/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ops-server/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/system-framework/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/system-framework/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/system-framework/system-plugin-example-web/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/system-framework/system-plugin-example-web/src/main/resources" charset="UTF-8" />
</component>
</project>

View File

@ -0,0 +1,5 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
</profile>
</component>

30
.idea/jarRepositories.xml generated Normal file
View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="aliyunmaven" />
<option name="name" value="aliyun" />
<option name="url" value="https://maven.aliyun.com/repository/public" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="huaweicloud" />
<option name="name" value="huawei" />
<option name="url" value="https://mirrors.huaweicloud.com/repository/maven/" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Central Repository" />
<option name="url" value="https://maven.aliyun.com/repository/public" />
</remote-repository>
</component>
</project>

40
.idea/misc.xml generated Normal file
View File

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CheckstyleConfigurable">
<option name="suppFilterFilename" value="" />
<option name="suppCommentFilter" value="false" />
<option name="offComment" value="CHECKSTYLE\:OFF" />
<option name="onComment" value="CHECKSTYLE\:ON" />
<option name="checkFormat" value=".*" />
<option name="messageFormat" value="" />
<option name="checkCPP" value="true" />
<option name="checkC" value="true" />
<option name="suppNearbyCommentFilter" value="false" />
<option name="snCommentFormat" value="SUPPRESS CHECKSTYLE (\w+)" />
<option name="snCheckFormat" value="$1" />
<option name="snMessageFormat" value="" />
<option name="snInfluenceFormat" value="0" />
<option name="snCheckCPP" value="true" />
<option name="snCheckC" value="true" />
<option name="pathToUserRulesConfiguration" value="" />
<option name="pathToJarWithRules" value="" />
</component>
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="FindBugsConfigurable">
<option name="make" value="true" />
<option name="effort" value="default" />
<option name="priority" value="Medium" />
<option name="excludeFilter" value="" />
</component>
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" project-jdk-name="22" project-jdk-type="JavaSDK" />
<component name="SuppressionsComponent">
<option name="suppComments" value="[]" />
</component>
</project>

933
.idea/qaplug_profiles.xml generated Normal file
View File

@ -0,0 +1,933 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AnalysisProjectProfileManager">
<option name="PROJECT_PROFILE" value="Project Default" />
<option name="USE_PROJECT_LEVEL_SETTINGS" value="false" />
<scopes />
<profiles>
<profile profile_name="Project Default" version="1.0" is_locked="false">
<coding_rule class="AM_CREATES_EMPTY_JAR_FILE_ENTRY" level="MAJOR" enabled="true" />
<coding_rule class="AM_CREATES_EMPTY_ZIP_FILE_ENTRY" level="MAJOR" enabled="true" />
<coding_rule class="AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION" level="CRITICAL" enabled="false" />
<coding_rule class="AbbreviationAsWordInNameCheck" level="MAJOR" enabled="false" />
<coding_rule class="AbstractClassNameCheck" level="MAJOR" enabled="false" />
<coding_rule class="AnnotationLocationCheck" level="MAJOR" enabled="false" />
<coding_rule class="AnnotationOnSameLineCheck" level="MAJOR" enabled="false" />
<coding_rule class="AnnotationUseStyleCheck" level="MAJOR" enabled="false" />
<coding_rule class="AnonInnerLengthCheck" level="MAJOR" enabled="true" />
<coding_rule class="ArrayTrailingCommaCheck" level="MAJOR" enabled="false" />
<coding_rule class="ArrayTypeStyleCheck" level="MINOR" enabled="false" />
<coding_rule class="AtclauseOrderCheck" level="MAJOR" enabled="false" />
<coding_rule class="AvoidEscapedUnicodeCharactersCheck" level="MAJOR" enabled="false" />
<coding_rule class="AvoidInlineConditionalsCheck" level="MINOR" enabled="false" />
<coding_rule class="AvoidNestedBlocksCheck" level="MAJOR" enabled="false" />
<coding_rule class="AvoidNoArgumentSuperConstructorCallCheck" level="MAJOR" enabled="false" />
<coding_rule class="AvoidStarImportCheck" level="MINOR" enabled="false" />
<coding_rule class="AvoidStaticImportCheck" level="MAJOR" enabled="false" />
<coding_rule class="BAC_BAD_APPLET_CONSTRUCTOR" level="MAJOR" enabled="false" />
<coding_rule class="BC_BAD_CAST_TO_ABSTRACT_COLLECTION" level="MAJOR" enabled="true" />
<coding_rule class="BC_BAD_CAST_TO_CONCRETE_COLLECTION" level="CRITICAL" enabled="true" />
<coding_rule class="BC_EQUALS_METHOD_SHOULD_WORK_FOR_ALL_OBJECTS" level="CRITICAL" enabled="true" />
<coding_rule class="BC_IMPOSSIBLE_CAST" level="BLOCKER" enabled="true" />
<coding_rule class="BC_IMPOSSIBLE_DOWNCAST" level="MAJOR" enabled="false" />
<coding_rule class="BC_IMPOSSIBLE_DOWNCAST_OF_TOARRAY" level="MAJOR" enabled="false" />
<coding_rule class="BC_IMPOSSIBLE_INSTANCEOF" level="CRITICAL" enabled="true" />
<coding_rule class="BC_UNCONFIRMED_CAST" level="CRITICAL" enabled="true" />
<coding_rule class="BC_UNCONFIRMED_CAST_OF_RETURN_VALUE" level="CRITICAL" enabled="false" />
<coding_rule class="BC_VACUOUS_INSTANCEOF" level="CRITICAL" enabled="true" />
<coding_rule class="BIT_ADD_OF_SIGNED_BYTE" level="CRITICAL" enabled="true" />
<coding_rule class="BIT_AND" level="CRITICAL" enabled="true" />
<coding_rule class="BIT_AND_ZZ" level="CRITICAL" enabled="true" />
<coding_rule class="BIT_IOR" level="CRITICAL" enabled="true" />
<coding_rule class="BIT_IOR_OF_SIGNED_BYTE" level="CRITICAL" enabled="true" />
<coding_rule class="BIT_SIGNED_CHECK" level="CRITICAL" enabled="true" />
<coding_rule class="BIT_SIGNED_CHECK_HIGH_BIT" level="CRITICAL" enabled="true" />
<coding_rule class="BOA_BADLY_OVERRIDDEN_ADAPTER" level="CRITICAL" enabled="true" />
<coding_rule class="BSHIFT_WRONG_ADD_PRIORITY" level="MAJOR" enabled="false" />
<coding_rule class="BX_BOXING_IMMEDIATELY_UNBOXED" level="MAJOR" enabled="true" />
<coding_rule class="BX_BOXING_IMMEDIATELY_UNBOXED_TO_PERFORM_COERCION" level="MAJOR" enabled="true" />
<coding_rule class="BX_UNBOXED_AND_COERCED_FOR_TERNARY_OPERATOR" level="MAJOR" enabled="true" />
<coding_rule class="BX_UNBOXING_IMMEDIATELY_REBOXED" level="CRITICAL" enabled="false" />
<coding_rule class="BestPracticesAbstractClassWithoutAbstractMethod" level="MAJOR" enabled="false" />
<coding_rule class="BestPracticesAccessorClassGeneration" level="MAJOR" enabled="false" />
<coding_rule class="BestPracticesAccessorMethodGeneration" level="MAJOR" enabled="false" />
<coding_rule class="BestPracticesArrayIsStoredDirectly" level="CRITICAL" enabled="true" />
<coding_rule class="BestPracticesAvoidPrintStackTrace" level="MAJOR" enabled="true" />
<coding_rule class="BestPracticesAvoidReassigningParameters" level="MAJOR" enabled="false" />
<coding_rule class="BestPracticesAvoidStringBufferField" level="MAJOR" enabled="false" />
<coding_rule class="BestPracticesAvoidUsingHardCodedIP" level="MAJOR" enabled="false" />
<coding_rule class="BestPracticesCheckResultSet" level="MAJOR" enabled="false" />
<coding_rule class="BestPracticesConstantsInInterface" level="MAJOR" enabled="false" />
<coding_rule class="BestPracticesDefaultLabelNotLastInSwitchStmt" level="MAJOR" enabled="false" />
<coding_rule class="BestPracticesDontNestJsfInJstlIteration" level="MAJOR" enabled="false" />
<coding_rule class="BestPracticesForLoopCanBeForeach" level="MAJOR" enabled="false" />
<coding_rule class="BestPracticesGuardDebugLogging" level="MAJOR" enabled="false" />
<coding_rule class="BestPracticesGuardLogStatement" level="MAJOR" enabled="false" />
<coding_rule class="BestPracticesGuardLogStatementJavaUtil" level="MAJOR" enabled="false" />
<coding_rule class="BestPracticesJUnit4SuitesShouldUseSuiteAnnotation" level="MAJOR" enabled="false" />
<coding_rule class="BestPracticesJUnit4TestShouldUseAfterAnnotation" level="MAJOR" enabled="false" />
<coding_rule class="BestPracticesJUnit4TestShouldUseBeforeAnnotation" level="MAJOR" enabled="false" />
<coding_rule class="BestPracticesJUnit4TestShouldUseTestAnnotation" level="MAJOR" enabled="false" />
<coding_rule class="BestPracticesJUnitAssertionsShouldIncludeMessage" level="MAJOR" enabled="false" />
<coding_rule class="BestPracticesJUnitTestContainsTooManyAsserts" level="MAJOR" enabled="false" />
<coding_rule class="BestPracticesJUnitTestsShouldIncludeAssert" level="MAJOR" enabled="false" />
<coding_rule class="BestPracticesJUnitUseExpected" level="MAJOR" enabled="false" />
<coding_rule class="BestPracticesLooseCoupling" level="MAJOR" enabled="true" />
<coding_rule class="BestPracticesMethodReturnsInternalArray" level="CRITICAL" enabled="false" />
<coding_rule class="BestPracticesNoClassAttribute" level="MAJOR" enabled="false" />
<coding_rule class="BestPracticesNoHtmlComments" level="MAJOR" enabled="false" />
<coding_rule class="BestPracticesNoJspForward" level="MAJOR" enabled="false" />
<coding_rule class="BestPracticesOneDeclarationPerLine" level="MAJOR" enabled="false" />
<coding_rule class="BestPracticesPositionLiteralsFirstInCaseInsensitiveComparisons" level="MAJOR" enabled="false" />
<coding_rule class="BestPracticesPositionLiteralsFirstInComparisons" level="MAJOR" enabled="false" />
<coding_rule class="BestPracticesPreserveStackTrace" level="MAJOR" enabled="true" />
<coding_rule class="BestPracticesReplaceEnumerationWithIterator" level="MAJOR" enabled="true" />
<coding_rule class="BestPracticesReplaceHashtableWithMap" level="MAJOR" enabled="true" />
<coding_rule class="BestPracticesReplaceVectorWithList" level="MAJOR" enabled="true" />
<coding_rule class="BestPracticesSwitchStmtsShouldHaveDefault" level="MAJOR" enabled="false" />
<coding_rule class="BestPracticesSystemPrintln" level="MAJOR" enabled="true" />
<coding_rule class="BestPracticesUnusedFormalParameter" level="MAJOR" enabled="true" />
<coding_rule class="BestPracticesUnusedImports" level="INFO" enabled="false" />
<coding_rule class="BestPracticesUnusedLocalVariable" level="MAJOR" enabled="true" />
<coding_rule class="BestPracticesUnusedPrivateField" level="MAJOR" enabled="true" />
<coding_rule class="BestPracticesUnusedPrivateMethod" level="MAJOR" enabled="true" />
<coding_rule class="BestPracticesUseAssertEqualsInsteadOfAssertTrue" level="MAJOR" enabled="false" />
<coding_rule class="BestPracticesUseAssertNullInsteadOfAssertTrue" level="MAJOR" enabled="false" />
<coding_rule class="BestPracticesUseAssertSameInsteadOfAssertTrue" level="MAJOR" enabled="false" />
<coding_rule class="BestPracticesUseAssertTrueInsteadOfAssertEquals" level="MAJOR" enabled="false" />
<coding_rule class="BestPracticesUseCollectionIsEmpty" level="MINOR" enabled="false" />
<coding_rule class="BestPracticesUseVarargs" level="MAJOR" enabled="false" />
<coding_rule class="BooleanExpressionComplexityCheck" level="MAJOR" enabled="true" />
<coding_rule class="CAA_COVARIANT_ARRAY_ELEMENT_STORE" level="MAJOR" enabled="false" />
<coding_rule class="CAA_COVARIANT_ARRAY_FIELD" level="MAJOR" enabled="false" />
<coding_rule class="CAA_COVARIANT_ARRAY_LOCAL" level="MAJOR" enabled="false" />
<coding_rule class="CAA_COVARIANT_ARRAY_RETURN" level="MAJOR" enabled="false" />
<coding_rule class="CD_CIRCULAR_DEPENDENCY" level="MAJOR" enabled="false" />
<coding_rule class="CI_CONFUSED_INHERITANCE" level="MINOR" enabled="true" />
<coding_rule class="CNT_ROUGH_CONSTANT_VALUE" level="MAJOR" enabled="false" />
<coding_rule class="CN_IDIOM" level="MAJOR" enabled="true" />
<coding_rule class="CN_IDIOM_NO_SUPER_CALL" level="MAJOR" enabled="true" />
<coding_rule class="CN_IMPLEMENTS_CLONE_BUT_NOT_CLONEABLE" level="MAJOR" enabled="true" />
<coding_rule class="CO_ABSTRACT_SELF" level="MAJOR" enabled="true" />
<coding_rule class="CO_COMPARETO_INCORRECT_FLOATING" level="MAJOR" enabled="false" />
<coding_rule class="CO_COMPARETO_RESULTS_MIN_VALUE" level="CRITICAL" enabled="false" />
<coding_rule class="CO_SELF_NO_OBJECT" level="MAJOR" enabled="true" />
<coding_rule class="CatchParameterNameCheck" level="MAJOR" enabled="false" />
<coding_rule class="ClassDataAbstractionCouplingCheck" level="MAJOR" enabled="false" />
<coding_rule class="ClassFanOutComplexityCheck" level="MAJOR" enabled="false" />
<coding_rule class="ClassMemberImpliedModifierCheck" level="MAJOR" enabled="false" />
<coding_rule class="ClassTypeParameterNameCheck" level="MAJOR" enabled="false" />
<coding_rule class="CodeStyleAbstractNaming" level="MAJOR" enabled="false" />
<coding_rule class="CodeStyleAtLeastOneConstructor" level="MAJOR" enabled="false" />
<coding_rule class="CodeStyleAvoidDollarSigns" level="MINOR" enabled="true" />
<coding_rule class="CodeStyleAvoidFinalLocalVariable" level="MAJOR" enabled="false" />
<coding_rule class="CodeStyleAvoidPrefixingMethodParameters" level="MAJOR" enabled="false" />
<coding_rule class="CodeStyleAvoidProtectedFieldInFinalClass" level="MAJOR" enabled="false" />
<coding_rule class="CodeStyleAvoidProtectedMethodInFinalClassNotExtending" level="MAJOR" enabled="false" />
<coding_rule class="CodeStyleAvoidUsingNativeCode" level="MAJOR" enabled="false" />
<coding_rule class="CodeStyleBooleanGetMethodName" level="MAJOR" enabled="false" />
<coding_rule class="CodeStyleCallSuperInConstructor" level="MINOR" enabled="false" />
<coding_rule class="CodeStyleClassNamingConventions" level="MAJOR" enabled="true" />
<coding_rule class="CodeStyleCommentDefaultAccessModifier" level="MINOR" enabled="false" />
<coding_rule class="CodeStyleConfusingTernary" level="MAJOR" enabled="false" />
<coding_rule class="CodeStyleDefaultPackage" level="MINOR" enabled="false" />
<coding_rule class="CodeStyleDontImportJavaLang" level="MINOR" enabled="true" />
<coding_rule class="CodeStyleDuplicateImports" level="MINOR" enabled="false" />
<coding_rule class="CodeStyleDuplicateJspImports" level="MAJOR" enabled="false" />
<coding_rule class="CodeStyleEmptyMethodInAbstractClassShouldBeAbstract" level="MAJOR" enabled="false" />
<coding_rule class="CodeStyleExtendsObject" level="MAJOR" enabled="false" />
<coding_rule class="CodeStyleFieldDeclarationsShouldBeAtStartOfClass" level="MAJOR" enabled="false" />
<coding_rule class="CodeStyleForLoopShouldBeWhileLoop" level="MINOR" enabled="false" />
<coding_rule class="CodeStyleForLoopsMustUseBraces" level="MAJOR" enabled="true" />
<coding_rule class="CodeStyleGenericsNaming" level="MAJOR" enabled="false" />
<coding_rule class="CodeStyleIfElseStmtsMustUseBraces" level="MAJOR" enabled="true" />
<coding_rule class="CodeStyleIfStmtsMustUseBraces" level="MAJOR" enabled="true" />
<coding_rule class="CodeStyleLocalHomeNamingConvention" level="MAJOR" enabled="false" />
<coding_rule class="CodeStyleLocalInterfaceSessionNamingConvention" level="MAJOR" enabled="false" />
<coding_rule class="CodeStyleLocalVariableCouldBeFinal" level="MINOR" enabled="false" />
<coding_rule class="CodeStyleLongVariable" level="MAJOR" enabled="false" />
<coding_rule class="CodeStyleMDBAndSessionBeanNamingConvention" level="MAJOR" enabled="false" />
<coding_rule class="CodeStyleMIsLeadingVariableName" level="MAJOR" enabled="false" />
<coding_rule class="CodeStyleMethodArgumentCouldBeFinal" level="MINOR" enabled="false" />
<coding_rule class="CodeStyleMethodNamingConventions" level="MAJOR" enabled="false" />
<coding_rule class="CodeStyleMisleadingVariableName" level="MAJOR" enabled="false" />
<coding_rule class="CodeStyleNoPackage" level="MAJOR" enabled="false" />
<coding_rule class="CodeStyleOnlyOneReturn" level="MINOR" enabled="false" />
<coding_rule class="CodeStylePackageCase" level="MAJOR" enabled="false" />
<coding_rule class="CodeStylePrematureDeclaration" level="MAJOR" enabled="false" />
<coding_rule class="CodeStyleRemoteInterfaceNamingConvention" level="MAJOR" enabled="false" />
<coding_rule class="CodeStyleRemoteSessionInterfaceNamingConvention" level="MAJOR" enabled="false" />
<coding_rule class="CodeStyleShortClassName" level="MAJOR" enabled="false" />
<coding_rule class="CodeStyleShortMethodName" level="MAJOR" enabled="false" />
<coding_rule class="CodeStyleShortVariable" level="MAJOR" enabled="false" />
<coding_rule class="CodeStyleSuspiciousConstantFieldName" level="MAJOR" enabled="true" />
<coding_rule class="CodeStyleTooManyStaticImports" level="MAJOR" enabled="false" />
<coding_rule class="CodeStyleUnnecessaryConstructor" level="MAJOR" enabled="false" />
<coding_rule class="CodeStyleUnnecessaryFinalModifier" level="INFO" enabled="false" />
<coding_rule class="CodeStyleUnnecessaryFullyQualifiedName" level="MAJOR" enabled="false" />
<coding_rule class="CodeStyleUnnecessaryLocalBeforeReturn" level="MAJOR" enabled="true" />
<coding_rule class="CodeStyleUnnecessaryModifier" level="MAJOR" enabled="false" />
<coding_rule class="CodeStyleUnnecessaryParentheses" level="MINOR" enabled="false" />
<coding_rule class="CodeStyleUnnecessaryReturn" level="MINOR" enabled="false" />
<coding_rule class="CodeStyleUselessParentheses" level="MAJOR" enabled="false" />
<coding_rule class="CodeStyleUselessQualifiedThis" level="MAJOR" enabled="false" />
<coding_rule class="CodeStyleVariableNamingConventions" level="MAJOR" enabled="false" />
<coding_rule class="CodeStyleWhileLoopsMustUseBraces" level="MAJOR" enabled="true" />
<coding_rule class="CommentsIndentationCheck" level="MAJOR" enabled="false" />
<coding_rule class="ConstantNameCheck" level="MINOR" enabled="true" />
<coding_rule class="CovariantEqualsCheck" level="CRITICAL" enabled="false" />
<coding_rule class="CustomImportOrderCheck" level="MAJOR" enabled="false" />
<coding_rule class="CyclomaticComplexityCheck" level="MAJOR" enabled="true" />
<coding_rule class="DB_DUPLICATE_BRANCHES" level="CRITICAL" enabled="true" />
<coding_rule class="DB_DUPLICATE_SWITCH_CLAUSES" level="CRITICAL" enabled="true" />
<coding_rule class="DC_DOUBLECHECK" level="MAJOR" enabled="true" />
<coding_rule class="DC_PARTIALLY_CONSTRUCTED" level="MAJOR" enabled="false" />
<coding_rule class="DE_MIGHT_DROP" level="MAJOR" enabled="true" />
<coding_rule class="DE_MIGHT_IGNORE" level="MAJOR" enabled="true" />
<coding_rule class="DLS_DEAD_LOCAL_INCREMENT_IN_RETURN" level="MAJOR" enabled="false" />
<coding_rule class="DLS_DEAD_LOCAL_STORE" level="CRITICAL" enabled="true" />
<coding_rule class="DLS_DEAD_LOCAL_STORE_IN_RETURN" level="CRITICAL" enabled="true" />
<coding_rule class="DLS_DEAD_LOCAL_STORE_OF_NULL" level="CRITICAL" enabled="true" />
<coding_rule class="DLS_DEAD_LOCAL_STORE_SHADOWS_FIELD" level="CRITICAL" enabled="false" />
<coding_rule class="DLS_DEAD_STORE_OF_CLASS_LITERAL" level="CRITICAL" enabled="true" />
<coding_rule class="DLS_OVERWRITTEN_INCREMENT" level="CRITICAL" enabled="true" />
<coding_rule class="DL_SYNCHRONIZATION_ON_BOOLEAN" level="CRITICAL" enabled="true" />
<coding_rule class="DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE" level="CRITICAL" enabled="true" />
<coding_rule class="DL_SYNCHRONIZATION_ON_SHARED_CONSTANT" level="CRITICAL" enabled="true" />
<coding_rule class="DL_SYNCHRONIZATION_ON_UNSHARED_BOXED_PRIMITIVE" level="CRITICAL" enabled="true" />
<coding_rule class="DMI_ANNOTATION_IS_NOT_VISIBLE_TO_REFLECTION" level="MAJOR" enabled="true" />
<coding_rule class="DMI_ARGUMENTS_WRONG_ORDER" level="CRITICAL" enabled="false" />
<coding_rule class="DMI_BAD_MONTH" level="CRITICAL" enabled="true" />
<coding_rule class="DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE" level="CRITICAL" enabled="false" />
<coding_rule class="DMI_BLOCKING_METHODS_ON_URL" level="BLOCKER" enabled="true" />
<coding_rule class="DMI_CALLING_NEXT_FROM_HASNEXT" level="CRITICAL" enabled="true" />
<coding_rule class="DMI_COLLECTIONS_SHOULD_NOT_CONTAIN_THEMSELVES" level="CRITICAL" enabled="true" />
<coding_rule class="DMI_COLLECTION_OF_URLS" level="BLOCKER" enabled="true" />
<coding_rule class="DMI_CONSTANT_DB_PASSWORD" level="BLOCKER" enabled="true" />
<coding_rule class="DMI_DOH" level="CRITICAL" enabled="false" />
<coding_rule class="DMI_EMPTY_DB_PASSWORD" level="CRITICAL" enabled="true" />
<coding_rule class="DMI_ENTRY_SETS_MAY_REUSE_ENTRY_OBJECTS" level="CRITICAL" enabled="false" />
<coding_rule class="DMI_FUTILE_ATTEMPT_TO_CHANGE_MAXPOOL_SIZE_OF_SCHEDULED_THREAD_POOL_EXECUTOR" level="MINOR" enabled="true" />
<coding_rule class="DMI_HARDCODED_ABSOLUTE_FILENAME" level="CRITICAL" enabled="true" />
<coding_rule class="DMI_INVOKING_HASHCODE_ON_ARRAY" level="CRITICAL" enabled="true" />
<coding_rule class="DMI_INVOKING_TOSTRING_ON_ANONYMOUS_ARRAY" level="CRITICAL" enabled="true" />
<coding_rule class="DMI_INVOKING_TOSTRING_ON_ARRAY" level="CRITICAL" enabled="true" />
<coding_rule class="DMI_LONG_BITS_TO_DOUBLE_INVOKED_ON_INT" level="CRITICAL" enabled="true" />
<coding_rule class="DMI_NONSERIALIZABLE_OBJECT_WRITTEN" level="CRITICAL" enabled="true" />
<coding_rule class="DMI_RANDOM_USED_ONLY_ONCE" level="CRITICAL" enabled="true" />
<coding_rule class="DMI_SCHEDULED_THREAD_POOL_EXECUTOR_WITH_ZERO_CORE_THREADS" level="MINOR" enabled="true" />
<coding_rule class="DMI_THREAD_PASSED_WHERE_RUNNABLE_EXPECTED" level="MAJOR" enabled="true" />
<coding_rule class="DMI_UNSUPPORTED_METHOD" level="MAJOR" enabled="true" />
<coding_rule class="DMI_USELESS_SUBSTRING" level="CRITICAL" enabled="true" />
<coding_rule class="DMI_USING_REMOVEALL_TO_CLEAR_COLLECTION" level="CRITICAL" enabled="true" />
<coding_rule class="DMI_VACUOUS_CALL_TO_EASYMOCK_METHOD" level="MINOR" enabled="true" />
<coding_rule class="DMI_VACUOUS_SELF_COLLECTION_CALL" level="CRITICAL" enabled="true" />
<coding_rule class="DM_BOOLEAN_CTOR" level="MAJOR" enabled="true" />
<coding_rule class="DM_BOXED_PRIMITIVE_FOR_COMPARE" level="MAJOR" enabled="false" />
<coding_rule class="DM_BOXED_PRIMITIVE_FOR_PARSING" level="MAJOR" enabled="false" />
<coding_rule class="DM_BOXED_PRIMITIVE_TOSTRING" level="MAJOR" enabled="true" />
<coding_rule class="DM_CONVERT_CASE" level="INFO" enabled="true" />
<coding_rule class="DM_DEFAULT_ENCODING" level="CRITICAL" enabled="false" />
<coding_rule class="DM_EXIT" level="MAJOR" enabled="true" />
<coding_rule class="DM_FP_NUMBER_CTOR" level="MAJOR" enabled="true" />
<coding_rule class="DM_GC" level="MAJOR" enabled="true" />
<coding_rule class="DM_INVALID_MIN_MAX" level="MAJOR" enabled="false" />
<coding_rule class="DM_MONITOR_WAIT_ON_CONDITION" level="MAJOR" enabled="true" />
<coding_rule class="DM_NEW_FOR_GETCLASS" level="MAJOR" enabled="true" />
<coding_rule class="DM_NEXTINT_VIA_NEXTDOUBLE" level="MAJOR" enabled="true" />
<coding_rule class="DM_NUMBER_CTOR" level="CRITICAL" enabled="true" />
<coding_rule class="DM_RUN_FINALIZERS_ON_EXIT" level="MAJOR" enabled="true" />
<coding_rule class="DM_STRING_CTOR" level="MAJOR" enabled="true" />
<coding_rule class="DM_STRING_TOSTRING" level="INFO" enabled="true" />
<coding_rule class="DM_STRING_VOID_CTOR" level="MAJOR" enabled="true" />
<coding_rule class="DM_USELESS_THREAD" level="MAJOR" enabled="true" />
<coding_rule class="DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED" level="MAJOR" enabled="true" />
<coding_rule class="DP_DO_INSIDE_DO_PRIVILEGED" level="MAJOR" enabled="true" />
<coding_rule class="DeclarationOrderCheck" level="INFO" enabled="false" />
<coding_rule class="DefaultComesLastCheck" level="MAJOR" enabled="true" />
<coding_rule class="DescendantTokenCheck" level="MAJOR" enabled="false" />
<coding_rule class="DesignAbstractClassWithoutAnyMethod" level="MAJOR" enabled="false" />
<coding_rule class="DesignAvoidCatchingGenericException" level="MAJOR" enabled="false" />
<coding_rule class="DesignAvoidDeeplyNestedIfStmts" level="MAJOR" enabled="false" />
<coding_rule class="DesignAvoidRethrowingException" level="MAJOR" enabled="true" />
<coding_rule class="DesignAvoidThrowingNewInstanceOfSameException" level="MAJOR" enabled="false" />
<coding_rule class="DesignAvoidThrowingNullPointerException" level="MAJOR" enabled="true" />
<coding_rule class="DesignAvoidThrowingRawExceptionTypes" level="MAJOR" enabled="true" />
<coding_rule class="DesignClassWithOnlyPrivateConstructorsShouldBeFinal" level="MAJOR" enabled="false" />
<coding_rule class="DesignCollapsibleIfStatements" level="MINOR" enabled="true" />
<coding_rule class="DesignCouplingBetweenObjects" level="MAJOR" enabled="false" />
<coding_rule class="DesignCyclomaticComplexity" level="MAJOR" enabled="false" />
<coding_rule class="DesignDataClass" level="MAJOR" enabled="false" />
<coding_rule class="DesignDoNotExtendJavaLangError" level="MAJOR" enabled="false" />
<coding_rule class="DesignExceptionAsFlowControl" level="MAJOR" enabled="true" />
<coding_rule class="DesignExcessiveClassLength" level="MAJOR" enabled="false" />
<coding_rule class="DesignExcessiveImports" level="MAJOR" enabled="false" />
<coding_rule class="DesignExcessiveMethodLength" level="MAJOR" enabled="false" />
<coding_rule class="DesignExcessiveParameterList" level="MAJOR" enabled="false" />
<coding_rule class="DesignExcessivePublicCount" level="MAJOR" enabled="false" />
<coding_rule class="DesignFinalFieldCouldBeStatic" level="MINOR" enabled="true" />
<coding_rule class="DesignForExtensionCheck" level="MINOR" enabled="true" />
<coding_rule class="DesignGodClass" level="MAJOR" enabled="false" />
<coding_rule class="DesignImmutableField" level="MAJOR" enabled="false" />
<coding_rule class="DesignLawOfDemeter" level="MAJOR" enabled="false" />
<coding_rule class="DesignLogicInversion" level="MAJOR" enabled="false" />
<coding_rule class="DesignLoosePackageCoupling" level="MAJOR" enabled="false" />
<coding_rule class="DesignModifiedCyclomaticComplexity" level="MAJOR" enabled="false" />
<coding_rule class="DesignNPathComplexity" level="MAJOR" enabled="false" />
<coding_rule class="DesignNcssConstructorCount" level="MAJOR" enabled="false" />
<coding_rule class="DesignNcssCount" level="MAJOR" enabled="false" />
<coding_rule class="DesignNcssMethodCount" level="MAJOR" enabled="true" />
<coding_rule class="DesignNcssTypeCount" level="MAJOR" enabled="true" />
<coding_rule class="DesignNoInlineScript" level="MAJOR" enabled="false" />
<coding_rule class="DesignNoInlineStyleInformation" level="MAJOR" enabled="false" />
<coding_rule class="DesignNoLongScripts" level="MAJOR" enabled="false" />
<coding_rule class="DesignNoScriptlets" level="MAJOR" enabled="false" />
<coding_rule class="DesignSignatureDeclareThrowsException" level="MAJOR" enabled="true" />
<coding_rule class="DesignSimplifiedTernary" level="MAJOR" enabled="false" />
<coding_rule class="DesignSimplifyBooleanAssertion" level="MAJOR" enabled="false" />
<coding_rule class="DesignSimplifyBooleanExpressions" level="MINOR" enabled="false" />
<coding_rule class="DesignSimplifyBooleanReturns" level="MINOR" enabled="false" />
<coding_rule class="DesignSimplifyConditional" level="MAJOR" enabled="true" />
<coding_rule class="DesignSingularField" level="MINOR" enabled="true" />
<coding_rule class="DesignStdCyclomaticComplexity" level="MAJOR" enabled="false" />
<coding_rule class="DesignSwitchDensity" level="MAJOR" enabled="false" />
<coding_rule class="DesignTooManyFields" level="MAJOR" enabled="false" />
<coding_rule class="DesignTooManyMethods" level="MAJOR" enabled="false" />
<coding_rule class="DesignUseObjectForClearerAPI" level="MAJOR" enabled="false" />
<coding_rule class="DesignUseUtilityClass" level="MAJOR" enabled="false" />
<coding_rule class="DesignUselessOverridingMethod" level="MAJOR" enabled="true" />
<coding_rule class="DocumentationCommentContent" level="MAJOR" enabled="false" />
<coding_rule class="DocumentationCommentRequired" level="MAJOR" enabled="false" />
<coding_rule class="DocumentationCommentSize" level="MAJOR" enabled="false" />
<coding_rule class="DocumentationUncommentedEmptyConstructor" level="MAJOR" enabled="false" />
<coding_rule class="DocumentationUncommentedEmptyMethodBody" level="MAJOR" enabled="false" />
<coding_rule class="EC_ARRAY_AND_NONARRAY" level="CRITICAL" enabled="true" />
<coding_rule class="EC_BAD_ARRAY_COMPARE" level="CRITICAL" enabled="true" />
<coding_rule class="EC_INCOMPATIBLE_ARRAY_COMPARE" level="MAJOR" enabled="false" />
<coding_rule class="EC_NULL_ARG" level="CRITICAL" enabled="true" />
<coding_rule class="EC_UNRELATED_CLASS_AND_INTERFACE" level="CRITICAL" enabled="true" />
<coding_rule class="EC_UNRELATED_INTERFACES" level="CRITICAL" enabled="true" />
<coding_rule class="EC_UNRELATED_TYPES" level="CRITICAL" enabled="true" />
<coding_rule class="EC_UNRELATED_TYPES_USING_POINTER_EQUALITY" level="CRITICAL" enabled="true" />
<coding_rule class="EI_EXPOSE_REP" level="MAJOR" enabled="true" />
<coding_rule class="EI_EXPOSE_REP2" level="MAJOR" enabled="true" />
<coding_rule class="EI_EXPOSE_STATIC_REP2" level="MAJOR" enabled="true" />
<coding_rule class="EQ_ABSTRACT_SELF" level="MAJOR" enabled="true" />
<coding_rule class="EQ_ALWAYS_FALSE" level="BLOCKER" enabled="true" />
<coding_rule class="EQ_ALWAYS_TRUE" level="BLOCKER" enabled="true" />
<coding_rule class="EQ_CHECK_FOR_OPERAND_NOT_COMPATIBLE_WITH_THIS" level="MAJOR" enabled="true" />
<coding_rule class="EQ_COMPARETO_USE_OBJECT_EQUALS" level="CRITICAL" enabled="true" />
<coding_rule class="EQ_COMPARING_CLASS_NAMES" level="MAJOR" enabled="true" />
<coding_rule class="EQ_DOESNT_OVERRIDE_EQUALS" level="MAJOR" enabled="false" />
<coding_rule class="EQ_DONT_DEFINE_EQUALS_FOR_ENUM" level="MAJOR" enabled="true" />
<coding_rule class="EQ_GETCLASS_AND_CLASS_CONSTANT" level="CRITICAL" enabled="true" />
<coding_rule class="EQ_OTHER_NO_OBJECT" level="MAJOR" enabled="true" />
<coding_rule class="EQ_OTHER_USE_OBJECT" level="MAJOR" enabled="true" />
<coding_rule class="EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC" level="MAJOR" enabled="true" />
<coding_rule class="EQ_SELF_NO_OBJECT" level="MAJOR" enabled="true" />
<coding_rule class="EQ_SELF_USE_OBJECT" level="MAJOR" enabled="true" />
<coding_rule class="EQ_UNUSUAL" level="MINOR" enabled="true" />
<coding_rule class="ES_COMPARING_PARAMETER_STRING_WITH_EQ" level="MAJOR" enabled="true" />
<coding_rule class="ES_COMPARING_STRINGS_WITH_EQ" level="MAJOR" enabled="true" />
<coding_rule class="ESync_EMPTY_SYNC" level="MAJOR" enabled="true" />
<coding_rule class="EmptyBlockCheck" level="MAJOR" enabled="false" />
<coding_rule class="EmptyCatchBlockCheck" level="MAJOR" enabled="false" />
<coding_rule class="EmptyForInitializerPadCheck" level="MINOR" enabled="false" />
<coding_rule class="EmptyForIteratorPadCheck" level="MINOR" enabled="false" />
<coding_rule class="EmptyLineSeparatorCheck" level="MAJOR" enabled="false" />
<coding_rule class="EmptyStatementCheck" level="MINOR" enabled="true" />
<coding_rule class="EqualsAvoidNullCheck" level="CRITICAL" enabled="false" />
<coding_rule class="EqualsHashCodeCheck" level="CRITICAL" enabled="true" />
<coding_rule class="ErrorProneAssignmentInOperand" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneAssignmentToNonFinalStatic" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneAvoidAccessibilityAlteration" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneAvoidAssertAsIdentifier" level="MAJOR" enabled="true" />
<coding_rule class="ErrorProneAvoidBranchingStatementAsLastInLoop" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneAvoidCallingFinalize" level="MAJOR" enabled="true" />
<coding_rule class="ErrorProneAvoidCatchingNPE" level="MAJOR" enabled="true" />
<coding_rule class="ErrorProneAvoidCatchingThrowable" level="CRITICAL" enabled="true" />
<coding_rule class="ErrorProneAvoidDecimalLiteralsInBigDecimalConstructor" level="MAJOR" enabled="true" />
<coding_rule class="ErrorProneAvoidDuplicateLiterals" level="MAJOR" enabled="true" />
<coding_rule class="ErrorProneAvoidEnumAsIdentifier" level="MAJOR" enabled="true" />
<coding_rule class="ErrorProneAvoidFieldNameMatchingMethodName" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneAvoidFieldNameMatchingTypeName" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneAvoidInstanceofChecksInCatchClause" level="MINOR" enabled="true" />
<coding_rule class="ErrorProneAvoidLiteralsInIfCondition" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneAvoidLosingExceptionInformation" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneAvoidMultipleUnaryOperators" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneAvoidUsingOctalValues" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneBadComparison" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneBeanMembersShouldSerialize" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneBrokenNullCheck" level="CRITICAL" enabled="true" />
<coding_rule class="ErrorProneCallSuperFirst" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneCallSuperLast" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneCheckSkipResult" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneClassCastExceptionWithToArray" level="MAJOR" enabled="true" />
<coding_rule class="ErrorProneCloneMethodMustBePublic" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneCloneMethodMustImplementCloneable" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneCloneMethodReturnTypeMustMatchClassName" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneCloneThrowsCloneNotSupportedException" level="MAJOR" enabled="true" />
<coding_rule class="ErrorProneCloseResource" level="MAJOR" enabled="true" />
<coding_rule class="ErrorProneCompareObjectsWithEquals" level="MAJOR" enabled="true" />
<coding_rule class="ErrorProneConstructorCallsOverridableMethod" level="MAJOR" enabled="true" />
<coding_rule class="ErrorProneDataflowAnomalyAnalysis" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneDoNotCallGarbageCollectionExplicitly" level="CRITICAL" enabled="false" />
<coding_rule class="ErrorProneDoNotCallSystemExit" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneDoNotHardCodeSDCard" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneDoNotThrowExceptionInFinally" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneDontImportSun" level="MINOR" enabled="true" />
<coding_rule class="ErrorProneDontUseFloatTypeForLoopIndices" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneEmptyCatchBlock" level="CRITICAL" enabled="false" />
<coding_rule class="ErrorProneEmptyFinalizer" level="MAJOR" enabled="true" />
<coding_rule class="ErrorProneEmptyFinallyBlock" level="CRITICAL" enabled="true" />
<coding_rule class="ErrorProneEmptyIfStmt" level="CRITICAL" enabled="true" />
<coding_rule class="ErrorProneEmptyInitializer" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneEmptyStatementBlock" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneEmptyStatementNotInLoop" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneEmptyStaticInitializer" level="MAJOR" enabled="true" />
<coding_rule class="ErrorProneEmptySwitchStatements" level="MAJOR" enabled="true" />
<coding_rule class="ErrorProneEmptySynchronizedBlock" level="CRITICAL" enabled="true" />
<coding_rule class="ErrorProneEmptyTryBlock" level="MAJOR" enabled="true" />
<coding_rule class="ErrorProneEmptyWhileStmt" level="CRITICAL" enabled="true" />
<coding_rule class="ErrorProneEqualsNull" level="CRITICAL" enabled="true" />
<coding_rule class="ErrorProneFinalizeDoesNotCallSuperFinalize" level="MAJOR" enabled="true" />
<coding_rule class="ErrorProneFinalizeOnlyCallsSuperFinalize" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneFinalizeOverloaded" level="MAJOR" enabled="true" />
<coding_rule class="ErrorProneFinalizeShouldBeProtected" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneIdempotentOperations" level="MAJOR" enabled="true" />
<coding_rule class="ErrorProneImportFromSamePackage" level="MINOR" enabled="false" />
<coding_rule class="ErrorProneInstantiationToGetClass" level="MAJOR" enabled="true" />
<coding_rule class="ErrorProneInvalidSlf4jMessageFormat" level="MINOR" enabled="false" />
<coding_rule class="ErrorProneJUnitSpelling" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneJUnitStaticSuite" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneJspEncoding" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneJumbledIncrementer" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneLoggerIsNotStaticFinal" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneMethodWithSameNameAsEnclosingClass" level="MAJOR" enabled="true" />
<coding_rule class="ErrorProneMisplacedNullCheck" level="CRITICAL" enabled="false" />
<coding_rule class="ErrorProneMissingBreakInSwitch" level="CRITICAL" enabled="false" />
<coding_rule class="ErrorProneMissingSerialVersionUID" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneMissingStaticMethodInNonInstantiatableClass" level="MAJOR" enabled="true" />
<coding_rule class="ErrorProneMoreThanOneLogger" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneNonCaseLabelInSwitchStatement" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneNonStaticInitializer" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneNullAssignment" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneOverrideBothEqualsAndHashcode" level="CRITICAL" enabled="false" />
<coding_rule class="ErrorProneProperCloneImplementation" level="CRITICAL" enabled="false" />
<coding_rule class="ErrorProneProperLogger" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneReturnEmptyArrayRatherThanNull" level="MINOR" enabled="false" />
<coding_rule class="ErrorProneReturnFromFinallyBlock" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneSimpleDateFormatNeedsLocale" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneSingleMethodSingleton" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneSingletonClassReturningNewInstance" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneStaticEJBFieldShouldBeFinal" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneStringBufferInstantiationWithChar" level="MAJOR" enabled="true" />
<coding_rule class="ErrorProneSuspiciousEqualsMethodName" level="CRITICAL" enabled="true" />
<coding_rule class="ErrorProneSuspiciousHashcodeMethodName" level="MAJOR" enabled="true" />
<coding_rule class="ErrorProneSuspiciousOctalEscape" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneTestClassWithoutTestCases" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneUnconditionalIfStatement" level="CRITICAL" enabled="true" />
<coding_rule class="ErrorProneUnnecessaryBooleanAssertion" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneUnnecessaryCaseChange" level="MINOR" enabled="true" />
<coding_rule class="ErrorProneUnnecessaryConversionTemporary" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneUnusedNullCheckInEquals" level="MAJOR" enabled="true" />
<coding_rule class="ErrorProneUseCorrectExceptionLogging" level="MAJOR" enabled="true" />
<coding_rule class="ErrorProneUseEqualsToCompareStrings" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneUseLocaleWithCaseConversions" level="MAJOR" enabled="false" />
<coding_rule class="ErrorProneUseProperClassLoader" level="CRITICAL" enabled="false" />
<coding_rule class="ErrorProneUselessOperationOnImmutable" level="CRITICAL" enabled="true" />
<coding_rule class="ExecutableStatementCountCheck" level="MAJOR" enabled="false" />
<coding_rule class="ExplicitInitializationCheck" level="MAJOR" enabled="false" />
<coding_rule class="FB_MISSING_EXPECTED_WARNING" level="CRITICAL" enabled="false" />
<coding_rule class="FB_UNEXPECTED_WARNING" level="CRITICAL" enabled="false" />
<coding_rule class="FE_FLOATING_POINT_EQUALITY" level="CRITICAL" enabled="true" />
<coding_rule class="FE_TEST_IF_EQUAL_TO_NOT_A_NUMBER" level="CRITICAL" enabled="true" />
<coding_rule class="FI_EMPTY" level="MAJOR" enabled="true" />
<coding_rule class="FI_EXPLICIT_INVOCATION" level="MAJOR" enabled="true" />
<coding_rule class="FI_FINALIZER_NULLS_FIELDS" level="MAJOR" enabled="true" />
<coding_rule class="FI_FINALIZER_ONLY_NULLS_FIELDS" level="MAJOR" enabled="true" />
<coding_rule class="FI_MISSING_SUPER_CALL" level="MAJOR" enabled="true" />
<coding_rule class="FI_NULLIFY_SUPER" level="CRITICAL" enabled="true" />
<coding_rule class="FI_PUBLIC_SHOULD_BE_PROTECTED" level="MAJOR" enabled="true" />
<coding_rule class="FI_USELESS" level="MINOR" enabled="true" />
<coding_rule class="FL_MATH_USING_FLOAT_PRECISION" level="CRITICAL" enabled="true" />
<coding_rule class="FallThroughCheck" level="MAJOR" enabled="false" />
<coding_rule class="FileLengthCheck" level="MAJOR" enabled="false" />
<coding_rule class="FileTabCharacterCheck" level="MAJOR" enabled="false" />
<coding_rule class="FinalClassCheck" level="MAJOR" enabled="true" />
<coding_rule class="FinalLocalVariableCheck" level="MINOR" enabled="false" />
<coding_rule class="FinalParametersCheck" level="MINOR" enabled="false" />
<coding_rule class="GC_UNCHECKED_TYPE_IN_GENERIC_CALL" level="CRITICAL" enabled="true" />
<coding_rule class="GC_UNRELATED_TYPES" level="CRITICAL" enabled="true" />
<coding_rule class="GenericWhitespaceCheck" level="MAJOR" enabled="false" />
<coding_rule class="HE_EQUALS_NO_HASHCODE" level="MAJOR" enabled="true" />
<coding_rule class="HE_EQUALS_USE_HASHCODE" level="CRITICAL" enabled="true" />
<coding_rule class="HE_HASHCODE_NO_EQUALS" level="CRITICAL" enabled="true" />
<coding_rule class="HE_HASHCODE_USE_OBJECT_EQUALS" level="CRITICAL" enabled="true" />
<coding_rule class="HE_INHERITS_EQUALS_USE_HASHCODE" level="CRITICAL" enabled="true" />
<coding_rule class="HE_SIGNATURE_DECLARES_HASHING_OF_UNHASHABLE_CLASS" level="CRITICAL" enabled="true" />
<coding_rule class="HE_USE_OF_UNHASHABLE_CLASS" level="CRITICAL" enabled="true" />
<coding_rule class="HRS_REQUEST_PARAMETER_TO_COOKIE" level="MAJOR" enabled="true" />
<coding_rule class="HRS_REQUEST_PARAMETER_TO_HTTP_HEADER" level="MAJOR" enabled="true" />
<coding_rule class="HSC_HUGE_SHARED_STRING_CONSTANT" level="CRITICAL" enabled="true" />
<coding_rule class="HeaderCheck" level="MAJOR" enabled="false" />
<coding_rule class="HiddenFieldCheck" level="MAJOR" enabled="true" />
<coding_rule class="HideUtilityClassConstructorCheck" level="MAJOR" enabled="true" />
<coding_rule class="IA_AMBIGUOUS_INVOCATION_OF_INHERITED_OR_OUTER_METHOD" level="MAJOR" enabled="true" />
<coding_rule class="ICAST_BAD_SHIFT_AMOUNT" level="CRITICAL" enabled="true" />
<coding_rule class="ICAST_IDIV_CAST_TO_DOUBLE" level="CRITICAL" enabled="true" />
<coding_rule class="ICAST_INTEGER_MULTIPLY_CAST_TO_LONG" level="CRITICAL" enabled="true" />
<coding_rule class="ICAST_INT_2_LONG_AS_INSTANT" level="CRITICAL" enabled="false" />
<coding_rule class="ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL" level="CRITICAL" enabled="true" />
<coding_rule class="ICAST_INT_CAST_TO_FLOAT_PASSED_TO_ROUND" level="CRITICAL" enabled="true" />
<coding_rule class="ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT" level="CRITICAL" enabled="true" />
<coding_rule class="IC_INIT_CIRCULARITY" level="CRITICAL" enabled="true" />
<coding_rule class="IC_SUPERCLASS_USES_SUBCLASS_DURING_INITIALIZATION" level="MAJOR" enabled="true" />
<coding_rule class="IIL_ELEMENTS_GET_LENGTH_IN_LOOP" level="MAJOR" enabled="false" />
<coding_rule class="IIL_PATTERN_COMPILE_IN_LOOP" level="MAJOR" enabled="false" />
<coding_rule class="IIL_PATTERN_COMPILE_IN_LOOP_INDIRECT" level="MAJOR" enabled="false" />
<coding_rule class="IIL_PREPARE_STATEMENT_IN_LOOP" level="MAJOR" enabled="false" />
<coding_rule class="IIO_INEFFICIENT_INDEX_OF" level="MAJOR" enabled="false" />
<coding_rule class="IIO_INEFFICIENT_LAST_INDEX_OF" level="MAJOR" enabled="false" />
<coding_rule class="IJU_ASSERT_METHOD_INVOKED_FROM_RUN_METHOD" level="CRITICAL" enabled="true" />
<coding_rule class="IJU_BAD_SUITE_METHOD" level="CRITICAL" enabled="true" />
<coding_rule class="IJU_NO_TESTS" level="CRITICAL" enabled="true" />
<coding_rule class="IJU_SETUP_NO_SUPER" level="CRITICAL" enabled="true" />
<coding_rule class="IJU_SUITE_NOT_STATIC" level="CRITICAL" enabled="true" />
<coding_rule class="IJU_TEARDOWN_NO_SUPER" level="CRITICAL" enabled="true" />
<coding_rule class="IL_CONTAINER_ADDED_TO_ITSELF" level="CRITICAL" enabled="true" />
<coding_rule class="IL_INFINITE_LOOP" level="CRITICAL" enabled="true" />
<coding_rule class="IL_INFINITE_RECURSIVE_LOOP" level="CRITICAL" enabled="true" />
<coding_rule class="IMA_INEFFICIENT_MEMBER_ACCESS" level="MAJOR" enabled="false" />
<coding_rule class="IMSE_DONT_CATCH_IMSE" level="MAJOR" enabled="true" />
<coding_rule class="IM_AVERAGE_COMPUTATION_COULD_OVERFLOW" level="CRITICAL" enabled="true" />
<coding_rule class="IM_BAD_CHECK_FOR_ODD" level="CRITICAL" enabled="true" />
<coding_rule class="IM_MULTIPLYING_RESULT_OF_IREM" level="CRITICAL" enabled="true" />
<coding_rule class="INT_BAD_COMPARISON_WITH_INT_VALUE" level="CRITICAL" enabled="false" />
<coding_rule class="INT_BAD_COMPARISON_WITH_NONNEGATIVE_VALUE" level="CRITICAL" enabled="true" />
<coding_rule class="INT_BAD_COMPARISON_WITH_SIGNED_BYTE" level="CRITICAL" enabled="true" />
<coding_rule class="INT_BAD_REM_BY_1" level="CRITICAL" enabled="true" />
<coding_rule class="INT_VACUOUS_BIT_OPERATION" level="CRITICAL" enabled="true" />
<coding_rule class="INT_VACUOUS_COMPARISON" level="CRITICAL" enabled="true" />
<coding_rule class="IO_APPENDING_TO_OBJECT_OUTPUT_STREAM" level="CRITICAL" enabled="true" />
<coding_rule class="IP_PARAMETER_IS_DEAD_BUT_OVERWRITTEN" level="CRITICAL" enabled="true" />
<coding_rule class="IS2_INCONSISTENT_SYNC" level="CRITICAL" enabled="true" />
<coding_rule class="ISC_INSTANTIATE_STATIC_CLASS" level="MAJOR" enabled="true" />
<coding_rule class="IS_FIELD_NOT_GUARDED" level="CRITICAL" enabled="true" />
<coding_rule class="ITA_INEFFICIENT_TO_ARRAY" level="CRITICAL" enabled="true" />
<coding_rule class="IT_NO_SUCH_ELEMENT" level="MINOR" enabled="true" />
<coding_rule class="IllegalCatchCheck" level="MAJOR" enabled="false" />
<coding_rule class="IllegalImportCheck" level="MAJOR" enabled="false" />
<coding_rule class="IllegalInstantiationCheck" level="MAJOR" enabled="false" />
<coding_rule class="IllegalThrowsCheck" level="MAJOR" enabled="true" />
<coding_rule class="IllegalTokenCheck" level="MAJOR" enabled="false" />
<coding_rule class="IllegalTokenTextCheck" level="MAJOR" enabled="false" />
<coding_rule class="IllegalTypeCheck" level="MAJOR" enabled="false" />
<coding_rule class="ImportControlCheck" level="MAJOR" enabled="false" />
<coding_rule class="ImportOrderCheck" level="MINOR" enabled="false" />
<coding_rule class="IndentationCheck" level="MINOR" enabled="false" />
<coding_rule class="InnerAssignmentCheck" level="MAJOR" enabled="true" />
<coding_rule class="InnerTypeLastCheck" level="MAJOR" enabled="true" />
<coding_rule class="InterfaceIsTypeCheck" level="MAJOR" enabled="false" />
<coding_rule class="InterfaceMemberImpliedModifierCheck" level="MAJOR" enabled="false" />
<coding_rule class="InterfaceTypeParameterNameCheck" level="MAJOR" enabled="false" />
<coding_rule class="InvalidJavadocPositionCheck" level="MAJOR" enabled="false" />
<coding_rule class="J2EE_STORE_OF_NON_SERIALIZABLE_OBJECT_INTO_SESSION" level="CRITICAL" enabled="true" />
<coding_rule class="JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS" level="MINOR" enabled="true" />
<coding_rule class="JLM_JSR166_LOCK_MONITORENTER" level="CRITICAL" enabled="true" />
<coding_rule class="JLM_JSR166_UTILCONCURRENT_MONITORENTER" level="CRITICAL" enabled="false" />
<coding_rule class="JML_JSR166_CALLING_WAIT_RATHER_THAN_AWAIT" level="CRITICAL" enabled="false" />
<coding_rule class="JavaNCSSCheck" level="MAJOR" enabled="false" />
<coding_rule class="JavadocBlockTagLocationCheck" level="MAJOR" enabled="false" />
<coding_rule class="JavadocContentLocationCheck" level="MAJOR" enabled="false" />
<coding_rule class="JavadocMethodCheck" level="MAJOR" enabled="false" />
<coding_rule class="JavadocPackageCheck" level="MAJOR" enabled="false" />
<coding_rule class="JavadocParagraphCheck" level="MAJOR" enabled="false" />
<coding_rule class="JavadocStyleCheck" level="MAJOR" enabled="false" />
<coding_rule class="JavadocTagContinuationIndentationCheck" level="MAJOR" enabled="false" />
<coding_rule class="JavadocTypeCheck" level="MAJOR" enabled="false" />
<coding_rule class="JavadocVariableCheck" level="MAJOR" enabled="false" />
<coding_rule class="LG_LOST_LOGGER_DUE_TO_WEAK_REFERENCE" level="MAJOR" enabled="false" />
<coding_rule class="LI_LAZY_INIT_STATIC" level="CRITICAL" enabled="true" />
<coding_rule class="LI_LAZY_INIT_UPDATE_STATIC" level="CRITICAL" enabled="true" />
<coding_rule class="LambdaParameterNameCheck" level="MAJOR" enabled="false" />
<coding_rule class="LeftCurlyCheck" level="MINOR" enabled="false" />
<coding_rule class="LineLengthCheck" level="MAJOR" enabled="false" />
<coding_rule class="LocalFinalVariableNameCheck" level="MAJOR" enabled="true" />
<coding_rule class="LocalVariableNameCheck" level="MAJOR" enabled="true" />
<coding_rule class="ME_ENUM_FIELD_SETTER" level="MAJOR" enabled="false" />
<coding_rule class="ME_MUTABLE_ENUM_FIELD" level="MAJOR" enabled="false" />
<coding_rule class="MF_CLASS_MASKS_FIELD" level="MAJOR" enabled="true" />
<coding_rule class="MF_METHOD_MASKS_FIELD" level="MAJOR" enabled="true" />
<coding_rule class="ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD" level="MAJOR" enabled="true" />
<coding_rule class="ML_SYNC_ON_UPDATED_FIELD" level="MAJOR" enabled="true" />
<coding_rule class="MSF_MUTABLE_SERVLET_FIELD" level="MAJOR" enabled="true" />
<coding_rule class="MS_CANNOT_BE_FINAL" level="MAJOR" enabled="true" />
<coding_rule class="MS_EXPOSE_REP" level="CRITICAL" enabled="true" />
<coding_rule class="MS_FINAL_PKGPROTECT" level="MAJOR" enabled="true" />
<coding_rule class="MS_MUTABLE_ARRAY" level="MAJOR" enabled="true" />
<coding_rule class="MS_MUTABLE_COLLECTION" level="MAJOR" enabled="false" />
<coding_rule class="MS_MUTABLE_COLLECTION_PKGPROTECT" level="MAJOR" enabled="false" />
<coding_rule class="MS_MUTABLE_HASHTABLE" level="MAJOR" enabled="true" />
<coding_rule class="MS_OOI_PKGPROTECT" level="MAJOR" enabled="true" />
<coding_rule class="MS_PKGPROTECT" level="MAJOR" enabled="true" />
<coding_rule class="MS_SHOULD_BE_FINAL" level="MAJOR" enabled="true" />
<coding_rule class="MS_SHOULD_BE_REFACTORED_TO_BE_FINAL" level="CRITICAL" enabled="false" />
<coding_rule class="MTIA_SUSPECT_SERVLET_INSTANCE_FIELD" level="CRITICAL" enabled="true" />
<coding_rule class="MTIA_SUSPECT_STRUTS_INSTANCE_FIELD" level="CRITICAL" enabled="true" />
<coding_rule class="MWN_MISMATCHED_NOTIFY" level="CRITICAL" enabled="true" />
<coding_rule class="MWN_MISMATCHED_WAIT" level="CRITICAL" enabled="true" />
<coding_rule class="MagicNumberCheck" level="MINOR" enabled="true" />
<coding_rule class="MemberNameCheck" level="MAJOR" enabled="true" />
<coding_rule class="MethodCountCheck" level="MAJOR" enabled="false" />
<coding_rule class="MethodLengthCheck" level="MAJOR" enabled="false" />
<coding_rule class="MethodNameCheck" level="MAJOR" enabled="true" />
<coding_rule class="MethodParamPadCheck" level="MAJOR" enabled="false" />
<coding_rule class="MethodTypeParameterNameCheck" level="MAJOR" enabled="false" />
<coding_rule class="MissingCtorCheck" level="MAJOR" enabled="false" />
<coding_rule class="MissingDeprecatedCheck" level="MAJOR" enabled="false" />
<coding_rule class="MissingJavadocMethodCheck" level="MAJOR" enabled="false" />
<coding_rule class="MissingJavadocPackageCheck" level="MAJOR" enabled="false" />
<coding_rule class="MissingJavadocTypeCheck" level="MAJOR" enabled="false" />
<coding_rule class="MissingOverrideCheck" level="MAJOR" enabled="false" />
<coding_rule class="MissingSwitchDefaultCheck" level="MAJOR" enabled="false" />
<coding_rule class="ModifiedControlVariableCheck" level="MAJOR" enabled="false" />
<coding_rule class="ModifierOrderCheck" level="MINOR" enabled="true" />
<coding_rule class="MultipleStringLiteralsCheck" level="MAJOR" enabled="false" />
<coding_rule class="MultipleVariableDeclarationsCheck" level="MAJOR" enabled="false" />
<coding_rule class="MultithreadingAvoidSynchronizedAtMethodLevel" level="MAJOR" enabled="false" />
<coding_rule class="MultithreadingAvoidThreadGroup" level="CRITICAL" enabled="false" />
<coding_rule class="MultithreadingAvoidUsingVolatile" level="MAJOR" enabled="false" />
<coding_rule class="MultithreadingDoNotUseThreads" level="MAJOR" enabled="false" />
<coding_rule class="MultithreadingDontCallThreadRun" level="MAJOR" enabled="false" />
<coding_rule class="MultithreadingDoubleCheckedLocking" level="MAJOR" enabled="false" />
<coding_rule class="MultithreadingNonThreadSafeSingleton" level="MAJOR" enabled="false" />
<coding_rule class="MultithreadingUnsynchronizedStaticDateFormatter" level="MAJOR" enabled="false" />
<coding_rule class="MultithreadingUseConcurrentHashMap" level="MAJOR" enabled="false" />
<coding_rule class="MultithreadingUseNotifyAllInsteadOfNotify" level="MAJOR" enabled="false" />
<coding_rule class="MutableExceptionCheck" level="MAJOR" enabled="false" />
<coding_rule class="NM_BAD_EQUAL" level="MAJOR" enabled="false" />
<coding_rule class="NM_CLASS_NAMING_CONVENTION" level="MAJOR" enabled="false" />
<coding_rule class="NM_CLASS_NOT_EXCEPTION" level="MAJOR" enabled="true" />
<coding_rule class="NM_CONFUSING" level="MAJOR" enabled="true" />
<coding_rule class="NM_FIELD_NAMING_CONVENTION" level="MAJOR" enabled="false" />
<coding_rule class="NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER" level="MAJOR" enabled="true" />
<coding_rule class="NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER" level="MAJOR" enabled="true" />
<coding_rule class="NM_LCASE_HASHCODE" level="MAJOR" enabled="false" />
<coding_rule class="NM_LCASE_TOSTRING" level="MAJOR" enabled="false" />
<coding_rule class="NM_METHOD_CONSTRUCTOR_CONFUSION" level="MAJOR" enabled="true" />
<coding_rule class="NM_METHOD_NAMING_CONVENTION" level="MAJOR" enabled="false" />
<coding_rule class="NM_SAME_SIMPLE_NAME_AS_INTERFACE" level="MAJOR" enabled="true" />
<coding_rule class="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS" level="MAJOR" enabled="true" />
<coding_rule class="NM_VERY_CONFUSING" level="MAJOR" enabled="true" />
<coding_rule class="NM_VERY_CONFUSING_INTENTIONAL" level="MAJOR" enabled="true" />
<coding_rule class="NM_WRONG_PACKAGE" level="MAJOR" enabled="true" />
<coding_rule class="NM_WRONG_PACKAGE_INTENTIONAL" level="MAJOR" enabled="true" />
<coding_rule class="NN_NAKED_NOTIFY" level="CRITICAL" enabled="true" />
<coding_rule class="NOISE_FIELD_REFERENCE" level="MAJOR" enabled="false" />
<coding_rule class="NOISE_METHOD_CALL" level="MAJOR" enabled="false" />
<coding_rule class="NOISE_NULL_DEREFERENCE" level="MAJOR" enabled="false" />
<coding_rule class="NOISE_OPERATION" level="MAJOR" enabled="false" />
<coding_rule class="NO_NOTIFY_NOT_NOTIFYALL" level="CRITICAL" enabled="true" />
<coding_rule class="NP_ALWAYS_NULL" level="CRITICAL" enabled="true" />
<coding_rule class="NP_ALWAYS_NULL_EXCEPTION" level="CRITICAL" enabled="true" />
<coding_rule class="NP_ARGUMENT_MIGHT_BE_NULL" level="MAJOR" enabled="true" />
<coding_rule class="NP_BOOLEAN_RETURN_NULL" level="MAJOR" enabled="true" />
<coding_rule class="NP_CLONE_COULD_RETURN_NULL" level="CRITICAL" enabled="true" />
<coding_rule class="NP_CLOSING_NULL" level="MAJOR" enabled="false" />
<coding_rule class="NP_DEREFERENCE_OF_READLINE_VALUE" level="CRITICAL" enabled="true" />
<coding_rule class="NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT" level="CRITICAL" enabled="true" />
<coding_rule class="NP_GUARANTEED_DEREF" level="BLOCKER" enabled="true" />
<coding_rule class="NP_GUARANTEED_DEREF_ON_EXCEPTION_PATH" level="CRITICAL" enabled="true" />
<coding_rule class="NP_IMMEDIATE_DEREFERENCE_OF_READLINE" level="CRITICAL" enabled="true" />
<coding_rule class="NP_LOAD_OF_KNOWN_NULL_VALUE" level="CRITICAL" enabled="true" />
<coding_rule class="NP_METHOD_PARAMETER_TIGHTENS_ANNOTATION" level="MAJOR" enabled="false" />
<coding_rule class="NP_METHOD_RETURN_RELAXING_ANNOTATION" level="MAJOR" enabled="false" />
<coding_rule class="NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" level="CRITICAL" enabled="false" />
<coding_rule class="NP_NONNULL_PARAM_VIOLATION" level="CRITICAL" enabled="true" />
<coding_rule class="NP_NONNULL_RETURN_VIOLATION" level="CRITICAL" enabled="true" />
<coding_rule class="NP_NULL_INSTANCEOF" level="BLOCKER" enabled="true" />
<coding_rule class="NP_NULL_ON_SOME_PATH" level="CRITICAL" enabled="true" />
<coding_rule class="NP_NULL_ON_SOME_PATH_EXCEPTION" level="CRITICAL" enabled="true" />
<coding_rule class="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE" level="CRITICAL" enabled="true" />
<coding_rule class="NP_NULL_ON_SOME_PATH_MIGHT_BE_INFEASIBLE" level="CRITICAL" enabled="true" />
<coding_rule class="NP_NULL_PARAM_DEREF" level="CRITICAL" enabled="true" />
<coding_rule class="NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS" level="CRITICAL" enabled="true" />
<coding_rule class="NP_NULL_PARAM_DEREF_NONVIRTUAL" level="CRITICAL" enabled="true" />
<coding_rule class="NP_OPTIONAL_RETURN_NULL" level="MAJOR" enabled="false" />
<coding_rule class="NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE" level="CRITICAL" enabled="true" />
<coding_rule class="NP_STORE_INTO_NONNULL_FIELD" level="CRITICAL" enabled="true" />
<coding_rule class="NP_SYNC_AND_NULL_CHECK_FIELD" level="MAJOR" enabled="true" />
<coding_rule class="NP_TOSTRING_COULD_RETURN_NULL" level="CRITICAL" enabled="true" />
<coding_rule class="NP_UNWRITTEN_FIELD" level="MAJOR" enabled="false" />
<coding_rule class="NP_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD" level="CRITICAL" enabled="false" />
<coding_rule class="NPathComplexityCheck" level="MAJOR" enabled="false" />
<coding_rule class="NS_DANGEROUS_NON_SHORT_CIRCUIT" level="CRITICAL" enabled="true" />
<coding_rule class="NS_NON_SHORT_CIRCUIT" level="MAJOR" enabled="true" />
<coding_rule class="NeedBracesCheck" level="MINOR" enabled="false" />
<coding_rule class="NestedForDepthCheck" level="MAJOR" enabled="false" />
<coding_rule class="NestedIfDepthCheck" level="MAJOR" enabled="false" />
<coding_rule class="NestedTryDepthCheck" level="MAJOR" enabled="false" />
<coding_rule class="NewlineAtEndOfFileCheck" level="MINOR" enabled="false" />
<coding_rule class="NoArrayTrailingCommaCheck" level="MAJOR" enabled="false" />
<coding_rule class="NoCloneCheck" level="MAJOR" enabled="false" />
<coding_rule class="NoEnumTrailingCommaCheck" level="MAJOR" enabled="false" />
<coding_rule class="NoFinalizerCheck" level="MAJOR" enabled="false" />
<coding_rule class="NoLineWrapCheck" level="MAJOR" enabled="false" />
<coding_rule class="NoWhitespaceAfterCheck" level="MINOR" enabled="false" />
<coding_rule class="NoWhitespaceBeforeCheck" level="MINOR" enabled="false" />
<coding_rule class="NonEmptyAtclauseDescriptionCheck" level="MAJOR" enabled="false" />
<coding_rule class="OBL_UNSATISFIED_OBLIGATION" level="CRITICAL" enabled="false" />
<coding_rule class="OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE" level="CRITICAL" enabled="false" />
<coding_rule class="ODR_OPEN_DATABASE_RESOURCE" level="CRITICAL" enabled="true" />
<coding_rule class="ODR_OPEN_DATABASE_RESOURCE_EXCEPTION_PATH" level="CRITICAL" enabled="true" />
<coding_rule class="OS_OPEN_STREAM" level="CRITICAL" enabled="true" />
<coding_rule class="OS_OPEN_STREAM_EXCEPTION_PATH" level="CRITICAL" enabled="true" />
<coding_rule class="OneStatementPerLineCheck" level="MINOR" enabled="false" />
<coding_rule class="OneTopLevelClassCheck" level="MAJOR" enabled="false" />
<coding_rule class="OperatorWrapCheck" level="MINOR" enabled="false" />
<coding_rule class="OrderedPropertiesCheck" level="MAJOR" enabled="false" />
<coding_rule class="OuterTypeFilenameCheck" level="MINOR" enabled="false" />
<coding_rule class="OuterTypeNumberCheck" level="MAJOR" enabled="false" />
<coding_rule class="OverloadMethodsDeclarationOrderCheck" level="MAJOR" enabled="false" />
<coding_rule class="PS_PUBLIC_SEMAPHORES" level="CRITICAL" enabled="true" />
<coding_rule class="PT_ABSOLUTE_PATH_TRAVERSAL" level="CRITICAL" enabled="false" />
<coding_rule class="PT_RELATIVE_PATH_TRAVERSAL" level="CRITICAL" enabled="false" />
<coding_rule class="PZLA_PREFER_ZERO_LENGTH_ARRAYS" level="MAJOR" enabled="true" />
<coding_rule class="PZ_DONT_REUSE_ENTRY_OBJECTS_IN_ITERATORS" level="CRITICAL" enabled="false" />
<coding_rule class="PackageAnnotationCheck" level="MAJOR" enabled="false" />
<coding_rule class="PackageDeclarationCheck" level="MAJOR" enabled="false" />
<coding_rule class="PackageNameCheck" level="MAJOR" enabled="true" />
<coding_rule class="ParameterAssignmentCheck" level="MAJOR" enabled="true" />
<coding_rule class="ParameterNameCheck" level="MAJOR" enabled="true" />
<coding_rule class="ParameterNumberCheck" level="MAJOR" enabled="false" />
<coding_rule class="ParenPadCheck" level="MINOR" enabled="false" />
<coding_rule class="PerformanceAddEmptyString" level="MAJOR" enabled="false" />
<coding_rule class="PerformanceAppendCharacterWithChar" level="MINOR" enabled="false" />
<coding_rule class="PerformanceAvoidArrayLoops" level="MAJOR" enabled="true" />
<coding_rule class="PerformanceAvoidInstantiatingObjectsInLoops" level="MINOR" enabled="false" />
<coding_rule class="PerformanceAvoidUsingShortType" level="MAJOR" enabled="false" />
<coding_rule class="PerformanceBigIntegerInstantiation" level="MAJOR" enabled="true" />
<coding_rule class="PerformanceBooleanInstantiation" level="MAJOR" enabled="true" />
<coding_rule class="PerformanceByteInstantiation" level="MAJOR" enabled="false" />
<coding_rule class="PerformanceConsecutiveAppendsShouldReuse" level="MAJOR" enabled="false" />
<coding_rule class="PerformanceConsecutiveLiteralAppends" level="MINOR" enabled="false" />
<coding_rule class="PerformanceInefficientEmptyStringCheck" level="MAJOR" enabled="false" />
<coding_rule class="PerformanceInefficientStringBuffering" level="MAJOR" enabled="true" />
<coding_rule class="PerformanceInsufficientStringBufferDeclaration" level="MAJOR" enabled="false" />
<coding_rule class="PerformanceIntegerInstantiation" level="MAJOR" enabled="true" />
<coding_rule class="PerformanceLongInstantiation" level="MAJOR" enabled="false" />
<coding_rule class="PerformanceOptimizableToArrayCall" level="MAJOR" enabled="false" />
<coding_rule class="PerformanceRedundantFieldInitializer" level="MAJOR" enabled="false" />
<coding_rule class="PerformanceShortInstantiation" level="MAJOR" enabled="false" />
<coding_rule class="PerformanceSimplifyStartsWith" level="MINOR" enabled="false" />
<coding_rule class="PerformanceStringInstantiation" level="MAJOR" enabled="true" />
<coding_rule class="PerformanceStringToString" level="MAJOR" enabled="true" />
<coding_rule class="PerformanceTooFewBranchesForASwitchStatement" level="MINOR" enabled="false" />
<coding_rule class="PerformanceUnnecessaryWrapperObjectCreation" level="MAJOR" enabled="false" />
<coding_rule class="PerformanceUseArrayListInsteadOfVector" level="MAJOR" enabled="true" />
<coding_rule class="PerformanceUseArraysAsList" level="MAJOR" enabled="true" />
<coding_rule class="PerformanceUseIndexOfChar" level="MAJOR" enabled="true" />
<coding_rule class="PerformanceUseStringBufferForStringAppends" level="MAJOR" enabled="false" />
<coding_rule class="PerformanceUseStringBufferLength" level="MINOR" enabled="true" />
<coding_rule class="PerformanceUselessStringValueOf" level="MINOR" enabled="true" />
<coding_rule class="QBA_QUESTIONABLE_BOOLEAN_ASSIGNMENT" level="CRITICAL" enabled="true" />
<coding_rule class="QF_QUESTIONABLE_FOR_LOOP" level="CRITICAL" enabled="true" />
<coding_rule class="RANGE_ARRAY_INDEX" level="MAJOR" enabled="false" />
<coding_rule class="RANGE_ARRAY_LENGTH" level="MAJOR" enabled="false" />
<coding_rule class="RANGE_ARRAY_OFFSET" level="MAJOR" enabled="false" />
<coding_rule class="RANGE_STRING_INDEX" level="MAJOR" enabled="false" />
<coding_rule class="RCN_REDUNDANT_COMPARISON_OF_NULL_AND_NONNULL_VALUE" level="CRITICAL" enabled="true" />
<coding_rule class="RCN_REDUNDANT_COMPARISON_TWO_NULL_VALUES" level="CRITICAL" enabled="true" />
<coding_rule class="RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE" level="CRITICAL" enabled="true" />
<coding_rule class="RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE" level="CRITICAL" enabled="true" />
<coding_rule class="RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE" level="CRITICAL" enabled="true" />
<coding_rule class="RC_REF_COMPARISON" level="CRITICAL" enabled="true" />
<coding_rule class="RC_REF_COMPARISON_BAD_PRACTICE" level="MAJOR" enabled="false" />
<coding_rule class="RC_REF_COMPARISON_BAD_PRACTICE_BOOLEAN" level="MAJOR" enabled="false" />
<coding_rule class="REC_CATCH_EXCEPTION" level="MAJOR" enabled="true" />
<coding_rule class="RE_BAD_SYNTAX_FOR_REGULAR_EXPRESSION" level="CRITICAL" enabled="true" />
<coding_rule class="RE_CANT_USE_FILE_SEPARATOR_AS_REGULAR_EXPRESSION" level="CRITICAL" enabled="true" />
<coding_rule class="RE_POSSIBLE_UNINTENDED_PATTERN" level="CRITICAL" enabled="true" />
<coding_rule class="RI_REDUNDANT_INTERFACES" level="MAJOR" enabled="true" />
<coding_rule class="RR_NOT_CHECKED" level="MAJOR" enabled="true" />
<coding_rule class="RS_READOBJECT_SYNC" level="CRITICAL" enabled="true" />
<coding_rule class="RU_INVOKE_RUN" level="MAJOR" enabled="true" />
<coding_rule class="RV_01_TO_INT" level="MAJOR" enabled="true" />
<coding_rule class="RV_ABSOLUTE_VALUE_OF_HASHCODE" level="CRITICAL" enabled="true" />
<coding_rule class="RV_ABSOLUTE_VALUE_OF_RANDOM_INT" level="CRITICAL" enabled="true" />
<coding_rule class="RV_CHECK_COMPARETO_FOR_SPECIFIC_RETURN_VALUE" level="CRITICAL" enabled="false" />
<coding_rule class="RV_CHECK_FOR_POSITIVE_INDEXOF" level="MINOR" enabled="true" />
<coding_rule class="RV_DONT_JUST_NULL_CHECK_READLINE" level="MAJOR" enabled="true" />
<coding_rule class="RV_EXCEPTION_NOT_THROWN" level="CRITICAL" enabled="true" />
<coding_rule class="RV_NEGATING_RESULT_OF_COMPARETO" level="CRITICAL" enabled="false" />
<coding_rule class="RV_REM_OF_HASHCODE" level="CRITICAL" enabled="true" />
<coding_rule class="RV_REM_OF_RANDOM_INT" level="CRITICAL" enabled="true" />
<coding_rule class="RV_RETURN_VALUE_IGNORED" level="MINOR" enabled="true" />
<coding_rule class="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE" level="MAJOR" enabled="true" />
<coding_rule class="RV_RETURN_VALUE_IGNORED_INFERRED" level="CRITICAL" enabled="false" />
<coding_rule class="RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT" level="MAJOR" enabled="false" />
<coding_rule class="RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED" level="MAJOR" enabled="false" />
<coding_rule class="RedundantImportCheck" level="MINOR" enabled="false" />
<coding_rule class="RedundantModifierCheck" level="MINOR" enabled="true" />
<coding_rule class="RegexpCheck" level="MAJOR" enabled="false" />
<coding_rule class="RegexpHeaderCheck" level="MAJOR" enabled="false" />
<coding_rule class="RegexpMultilineCheck" level="MAJOR" enabled="false" />
<coding_rule class="RegexpOnFilenameCheck" level="MAJOR" enabled="false" />
<coding_rule class="RegexpSinglelineCheck" level="MAJOR" enabled="false" />
<coding_rule class="RegexpSinglelineJavaCheck" level="MAJOR" enabled="false" />
<coding_rule class="RequireThisCheck" level="MAJOR" enabled="false" />
<coding_rule class="ReturnCountCheck" level="MAJOR" enabled="false" />
<coding_rule class="RightCurlyCheck" level="MINOR" enabled="false" />
<coding_rule class="RpC_REPEATED_CONDITIONAL_TEST" level="MAJOR" enabled="true" />
<coding_rule class="SA_FIELD_DOUBLE_ASSIGNMENT" level="CRITICAL" enabled="true" />
<coding_rule class="SA_FIELD_SELF_ASSIGNMENT" level="CRITICAL" enabled="true" />
<coding_rule class="SA_FIELD_SELF_COMPARISON" level="CRITICAL" enabled="true" />
<coding_rule class="SA_FIELD_SELF_COMPUTATION" level="CRITICAL" enabled="true" />
<coding_rule class="SA_LOCAL_DOUBLE_ASSIGNMENT" level="CRITICAL" enabled="true" />
<coding_rule class="SA_LOCAL_SELF_ASSIGNMENT" level="CRITICAL" enabled="true" />
<coding_rule class="SA_LOCAL_SELF_ASSIGNMENT_INSTEAD_OF_FIELD" level="CRITICAL" enabled="false" />
<coding_rule class="SA_LOCAL_SELF_COMPARISON" level="CRITICAL" enabled="true" />
<coding_rule class="SA_LOCAL_SELF_COMPUTATION" level="CRITICAL" enabled="true" />
<coding_rule class="SBSC_USE_STRINGBUFFER_CONCATENATION" level="CRITICAL" enabled="true" />
<coding_rule class="SC_START_IN_CTOR" level="CRITICAL" enabled="true" />
<coding_rule class="SE_BAD_FIELD" level="MINOR" enabled="false" />
<coding_rule class="SE_BAD_FIELD_INNER_CLASS" level="MINOR" enabled="true" />
<coding_rule class="SE_BAD_FIELD_STORE" level="CRITICAL" enabled="true" />
<coding_rule class="SE_COMPARATOR_SHOULD_BE_SERIALIZABLE" level="MAJOR" enabled="true" />
<coding_rule class="SE_INNER_CLASS" level="MAJOR" enabled="true" />
<coding_rule class="SE_METHOD_MUST_BE_PRIVATE" level="MAJOR" enabled="true" />
<coding_rule class="SE_NONFINAL_SERIALVERSIONID" level="CRITICAL" enabled="true" />
<coding_rule class="SE_NONLONG_SERIALVERSIONID" level="MAJOR" enabled="true" />
<coding_rule class="SE_NONSTATIC_SERIALVERSIONID" level="MAJOR" enabled="true" />
<coding_rule class="SE_NO_SERIALVERSIONID" level="MAJOR" enabled="true" />
<coding_rule class="SE_NO_SUITABLE_CONSTRUCTOR" level="MAJOR" enabled="true" />
<coding_rule class="SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION" level="MAJOR" enabled="true" />
<coding_rule class="SE_PRIVATE_READ_RESOLVE_NOT_INHERITED" level="MAJOR" enabled="true" />
<coding_rule class="SE_READ_RESOLVE_IS_STATIC" level="MAJOR" enabled="true" />
<coding_rule class="SE_READ_RESOLVE_MUST_RETURN_OBJECT" level="MAJOR" enabled="true" />
<coding_rule class="SE_TRANSIENT_FIELD_NOT_RESTORED" level="MAJOR" enabled="true" />
<coding_rule class="SE_TRANSIENT_FIELD_OF_NONSERIALIZABLE_CLASS" level="MAJOR" enabled="true" />
<coding_rule class="SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH" level="MAJOR" enabled="false" />
<coding_rule class="SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH_TO_THROW" level="MAJOR" enabled="false" />
<coding_rule class="SF_SWITCH_FALLTHROUGH" level="MAJOR" enabled="false" />
<coding_rule class="SF_SWITCH_NO_DEFAULT" level="MAJOR" enabled="false" />
<coding_rule class="SIC_INNER_SHOULD_BE_STATIC" level="MAJOR" enabled="true" />
<coding_rule class="SIC_INNER_SHOULD_BE_STATIC_ANON" level="MAJOR" enabled="true" />
<coding_rule class="SIC_INNER_SHOULD_BE_STATIC_NEEDS_THIS" level="MAJOR" enabled="true" />
<coding_rule class="SIC_THREADLOCAL_DEADLY_EMBRACE" level="MAJOR" enabled="false" />
<coding_rule class="SIO_SUPERFLUOUS_INSTANCEOF" level="CRITICAL" enabled="true" />
<coding_rule class="SI_INSTANCE_BEFORE_FINALS_ASSIGNED" level="CRITICAL" enabled="true" />
<coding_rule class="SP_SPIN_ON_FIELD" level="MAJOR" enabled="true" />
<coding_rule class="SQL_BAD_PREPARED_STATEMENT_ACCESS" level="CRITICAL" enabled="true" />
<coding_rule class="SQL_BAD_RESULTSET_ACCESS" level="CRITICAL" enabled="true" />
<coding_rule class="SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE" level="CRITICAL" enabled="true" />
<coding_rule class="SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING" level="CRITICAL" enabled="true" />
<coding_rule class="SR_NOT_CHECKED" level="MAJOR" enabled="true" />
<coding_rule class="SS_SHOULD_BE_STATIC" level="MAJOR" enabled="true" />
<coding_rule class="STCAL_INVOKE_ON_STATIC_CALENDAR_INSTANCE" level="CRITICAL" enabled="true" />
<coding_rule class="STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE" level="CRITICAL" enabled="true" />
<coding_rule class="STCAL_STATIC_CALENDAR_INSTANCE" level="CRITICAL" enabled="true" />
<coding_rule class="STCAL_STATIC_SIMPLE_DATE_FORMAT_INSTANCE" level="CRITICAL" enabled="true" />
<coding_rule class="STI_INTERRUPTED_ON_CURRENTTHREAD" level="CRITICAL" enabled="true" />
<coding_rule class="STI_INTERRUPTED_ON_UNKNOWNTHREAD" level="CRITICAL" enabled="true" />
<coding_rule class="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD" level="CRITICAL" enabled="true" />
<coding_rule class="SWL_SLEEP_WITH_LOCK_HELD" level="CRITICAL" enabled="true" />
<coding_rule class="SW_SWING_METHODS_INVOKED_IN_SWING_THREAD" level="MAJOR" enabled="true" />
<coding_rule class="SecurityIframeMissingSrcAttribute" level="MAJOR" enabled="false" />
<coding_rule class="SecurityNoUnsanitizedJSPExpression" level="MAJOR" enabled="false" />
<coding_rule class="SeparatorWrapCheck" level="MAJOR" enabled="false" />
<coding_rule class="SimplifyBooleanExpressionCheck" level="MAJOR" enabled="true" />
<coding_rule class="SimplifyBooleanReturnCheck" level="MAJOR" enabled="true" />
<coding_rule class="SingleLineJavadocCheck" level="MAJOR" enabled="false" />
<coding_rule class="SingleSpaceSeparatorCheck" level="MAJOR" enabled="false" />
<coding_rule class="StaticVariableNameCheck" level="MAJOR" enabled="true" />
<coding_rule class="StringLiteralEqualityCheck" level="MAJOR" enabled="true" />
<coding_rule class="SummaryJavadocCheck" level="MAJOR" enabled="false" />
<coding_rule class="SuperCloneCheck" level="MAJOR" enabled="false" />
<coding_rule class="SuperFinalizeCheck" level="MAJOR" enabled="false" />
<coding_rule class="SuppressWarningsCheck" level="MAJOR" enabled="false" />
<coding_rule class="SuppressWarningsHolder" level="MAJOR" enabled="false" />
<coding_rule class="TLW_TWO_LOCK_WAIT" level="MAJOR" enabled="true" />
<coding_rule class="TQ_ALWAYS_VALUE_USED_WHERE_NEVER_REQUIRED" level="CRITICAL" enabled="true" />
<coding_rule class="TQ_COMPARING_VALUES_WITH_INCOMPATIBLE_TYPE_QUALIFIERS" level="CRITICAL" enabled="false" />
<coding_rule class="TQ_EXPLICIT_UNKNOWN_SOURCE_VALUE_REACHES_ALWAYS_SINK" level="CRITICAL" enabled="true" />
<coding_rule class="TQ_EXPLICIT_UNKNOWN_SOURCE_VALUE_REACHES_NEVER_SINK" level="CRITICAL" enabled="true" />
<coding_rule class="TQ_MAYBE_SOURCE_VALUE_REACHES_ALWAYS_SINK" level="CRITICAL" enabled="true" />
<coding_rule class="TQ_MAYBE_SOURCE_VALUE_REACHES_NEVER_SINK" level="CRITICAL" enabled="true" />
<coding_rule class="TQ_NEVER_VALUE_USED_WHERE_ALWAYS_REQUIRED" level="CRITICAL" enabled="true" />
<coding_rule class="TQ_UNKNOWN_VALUE_USED_WHERE_ALWAYS_STRICTLY_REQUIRED" level="CRITICAL" enabled="false" />
<coding_rule class="ThrowsCountCheck" level="MAJOR" enabled="false" />
<coding_rule class="TodoCommentCheck" level="MINOR" enabled="false" />
<coding_rule class="TrailingCommentCheck" level="MINOR" enabled="false" />
<coding_rule class="TranslationCheck" level="MINOR" enabled="false" />
<coding_rule class="TypeNameCheck" level="MAJOR" enabled="false" />
<coding_rule class="TypecastParenPadCheck" level="MAJOR" enabled="false" />
<coding_rule class="UCF_USELESS_CONTROL_FLOW" level="CRITICAL" enabled="true" />
<coding_rule class="UCF_USELESS_CONTROL_FLOW_NEXT_LINE" level="CRITICAL" enabled="true" />
<coding_rule class="UC_USELESS_CONDITION" level="MAJOR" enabled="false" />
<coding_rule class="UC_USELESS_CONDITION_TYPE" level="MAJOR" enabled="false" />
<coding_rule class="UC_USELESS_OBJECT" level="MAJOR" enabled="false" />
<coding_rule class="UC_USELESS_OBJECT_STACK" level="MAJOR" enabled="false" />
<coding_rule class="UC_USELESS_VOID_METHOD" level="MAJOR" enabled="false" />
<coding_rule class="UG_SYNC_SET_UNSYNC_GET" level="MAJOR" enabled="true" />
<coding_rule class="UI_INHERITANCE_UNSAFE_GETRESOURCE" level="MAJOR" enabled="true" />
<coding_rule class="UL_UNRELEASED_LOCK" level="CRITICAL" enabled="true" />
<coding_rule class="UL_UNRELEASED_LOCK_EXCEPTION_PATH" level="CRITICAL" enabled="true" />
<coding_rule class="UMAC_UNCALLABLE_METHOD_OF_ANONYMOUS_CLASS" level="CRITICAL" enabled="true" />
<coding_rule class="UM_UNNECESSARY_MATH" level="CRITICAL" enabled="true" />
<coding_rule class="UPM_UNCALLED_PRIVATE_METHOD" level="CRITICAL" enabled="true" />
<coding_rule class="URF_UNREAD_FIELD" level="MAJOR" enabled="true" />
<coding_rule class="URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD" level="CRITICAL" enabled="false" />
<coding_rule class="UR_UNINIT_READ" level="MAJOR" enabled="true" />
<coding_rule class="UR_UNINIT_READ_CALLED_FROM_SUPER_CONSTRUCTOR" level="MAJOR" enabled="false" />
<coding_rule class="USM_USELESS_ABSTRACT_METHOD" level="MAJOR" enabled="false" />
<coding_rule class="USM_USELESS_SUBCLASS_METHOD" level="MAJOR" enabled="false" />
<coding_rule class="UUF_UNUSED_FIELD" level="MAJOR" enabled="true" />
<coding_rule class="UUF_UNUSED_PUBLIC_OR_PROTECTED_FIELD" level="CRITICAL" enabled="false" />
<coding_rule class="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" level="MAJOR" enabled="false" />
<coding_rule class="UWF_NULL_FIELD" level="CRITICAL" enabled="true" />
<coding_rule class="UWF_UNWRITTEN_FIELD" level="MAJOR" enabled="false" />
<coding_rule class="UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD" level="CRITICAL" enabled="false" />
<coding_rule class="UW_UNCOND_WAIT" level="MAJOR" enabled="true" />
<coding_rule class="UncommentedMainCheck" level="MAJOR" enabled="false" />
<coding_rule class="UniquePropertiesCheck" level="MAJOR" enabled="false" />
<coding_rule class="UnnecessaryParenthesesCheck" level="MINOR" enabled="false" />
<coding_rule class="UnnecessarySemicolonAfterTypeMemberDeclarationCheck" level="MAJOR" enabled="false" />
<coding_rule class="UnnecessarySemicolonInEnumerationCheck" level="MAJOR" enabled="false" />
<coding_rule class="UnnecessarySemicolonInTryWithResourcesCheck" level="MAJOR" enabled="false" />
<coding_rule class="UnusedImportsCheck" level="INFO" enabled="true" />
<coding_rule class="UpperEllCheck" level="MINOR" enabled="false" />
<coding_rule class="VA_FORMAT_STRING_BAD_ARGUMENT" level="CRITICAL" enabled="true" />
<coding_rule class="VA_FORMAT_STRING_BAD_CONVERSION" level="CRITICAL" enabled="true" />
<coding_rule class="VA_FORMAT_STRING_BAD_CONVERSION_FROM_ARRAY" level="MAJOR" enabled="true" />
<coding_rule class="VA_FORMAT_STRING_BAD_CONVERSION_TO_BOOLEAN" level="MAJOR" enabled="true" />
<coding_rule class="VA_FORMAT_STRING_EXPECTED_MESSAGE_FORMAT_SUPPLIED" level="MAJOR" enabled="false" />
<coding_rule class="VA_FORMAT_STRING_EXTRA_ARGUMENTS_PASSED" level="MAJOR" enabled="true" />
<coding_rule class="VA_FORMAT_STRING_ILLEGAL" level="CRITICAL" enabled="true" />
<coding_rule class="VA_FORMAT_STRING_MISSING_ARGUMENT" level="CRITICAL" enabled="true" />
<coding_rule class="VA_FORMAT_STRING_NO_PREVIOUS_ARGUMENT" level="CRITICAL" enabled="true" />
<coding_rule class="VA_FORMAT_STRING_USES_NEWLINE" level="CRITICAL" enabled="false" />
<coding_rule class="VA_PRIMITIVE_ARRAY_PASSED_TO_OBJECT_VARARG" level="CRITICAL" enabled="true" />
<coding_rule class="VO_VOLATILE_INCREMENT" level="CRITICAL" enabled="false" />
<coding_rule class="VO_VOLATILE_REFERENCE_TO_ARRAY" level="MAJOR" enabled="true" />
<coding_rule class="VR_UNRESOLVABLE_REFERENCE" level="MAJOR" enabled="false" />
<coding_rule class="VariableDeclarationUsageDistanceCheck" level="MAJOR" enabled="false" />
<coding_rule class="VisibilityModifierCheck" level="MAJOR" enabled="true" />
<coding_rule class="WA_AWAIT_NOT_IN_LOOP" level="CRITICAL" enabled="true" />
<coding_rule class="WA_NOT_IN_LOOP" level="CRITICAL" enabled="true" />
<coding_rule class="WL_USING_GETCLASS_RATHER_THAN_CLASS_LITERAL" level="CRITICAL" enabled="true" />
<coding_rule class="WMI_WRONG_MAP_ITERATOR" level="CRITICAL" enabled="true" />
<coding_rule class="WS_WRITEOBJECT_SYNC" level="CRITICAL" enabled="true" />
<coding_rule class="WhitespaceAfterCheck" level="MINOR" enabled="false" />
<coding_rule class="WhitespaceAroundCheck" level="MINOR" enabled="false" />
<coding_rule class="WriteTagCheck" level="MINOR" enabled="false" />
<coding_rule class="XFB_XML_FACTORY_BYPASS" level="CRITICAL" enabled="true" />
<coding_rule class="XSS_REQUEST_PARAMETER_TO_JSP_WRITER" level="CRITICAL" enabled="true" />
<coding_rule class="XSS_REQUEST_PARAMETER_TO_SEND_ERROR" level="CRITICAL" enabled="true" />
<coding_rule class="XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER" level="CRITICAL" enabled="true" />
</profile>
</profiles>
<list size="0" />
</component>
</project>

124
.idea/uiDesigner.xml generated Normal file
View File

@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.svg" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>

6
.idea/vcs.xml generated Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

View File

@ -27,6 +27,7 @@
<pf4j-spring.version>0.9.0</pf4j-spring.version>
<transmittable-thread-local.version>2.14.5</transmittable-thread-local.version>
<spring.boot.version>3.3.4</spring.boot.version>
<bcprov-jdk18on.version>1.80</bcprov-jdk18on.version>
<springdoc.version>2.3.0</springdoc.version>
<lock4j.version>2.2.7</lock4j.version>
<commons-io.version>2.17.0</commons-io.version>
@ -162,6 +163,41 @@
<artifactId>spring-boot-starter-websocket</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>cd.casic.boot</groupId>
<artifactId>module-infra-api</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>cd.casic.boot</groupId>
<artifactId>module-infra-biz</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>cd.casic.boot</groupId>
<artifactId>module-system-api</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>cd.casic.boot</groupId>
<artifactId>module-system-biz</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>cd.casic.pipeline</groupId>
<artifactId>pipeline-ci-commons</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>cd.casic.pipeline</groupId>
<artifactId>pipeline-ci-event</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>cd.casic.pipeline</groupId>
<artifactId>pipeline-ci-log</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>io.github.mouzt</groupId>
<artifactId>bizlog-sdk</artifactId>
@ -492,6 +528,11 @@
<artifactId>mongo-plus-boot-starter</artifactId>
<version>${anwena.version}</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk18on</artifactId>
<version>${bcprov-jdk18on.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
</project>

29
dependencies/pom.xml vendored
View File

@ -33,7 +33,7 @@
<sqlite.version>3.47.1.0</sqlite.version>
<oracle.version>23.5.0.24.07</oracle.version>
<postgresql.version>42.7.4</postgresql.version>
<!-- <anwena.version>2.1.0</anwena.version>-->
<!-- <anwena.version>2.1.0</anwena.version>-->
<anwena.version>2.0.8.3</anwena.version>
<!-- 消息队列 -->
<rocketmq-spring.version>2.3.1</rocketmq-spring.version>
@ -74,6 +74,7 @@
<aws-java-sdk-s3.version>1.12.777</aws-java-sdk-s3.version>
<jimureport.version>1.7.8</jimureport.version>
<logback.version>1.2.13</logback.version> <!-- 无法使用 1.3.X 版本,启动会报错 -->
<bcprov-jdk18on.version>1.80</bcprov-jdk18on.version>
</properties>
<dependencyManagement>
@ -202,6 +203,25 @@
<artifactId>module-system-biz</artifactId>
<version>${revision}</version>
</dependency>
<!--pipeline-dependency-->
<dependency>
<groupId>cd.casic.pipeline</groupId>
<artifactId>pipeline-ci-commons</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>cd.casic.pipeline</groupId>
<artifactId>pipeline-ci-event</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>cd.casic.pipeline</groupId>
<artifactId>pipeline-ci-log</artifactId>
<version>${revision}</version>
</dependency>
<!---->
<dependency>
<groupId>io.github.mouzt</groupId>
@ -585,7 +605,12 @@
<version>${anwena.version}</version>
</dependency>
<!--数据库驱动-->
<!--数据库驱动 end-->
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk18on</artifactId>
<version>${bcprov-jdk18on.version}</version>
</dependency>
</dependencies>
</dependencyManagement>

View File

@ -61,6 +61,11 @@
<scope>provided</scope> <!-- 设置为 provided只有工具类需要使用到 -->
</dependency>
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-openapi3-jakarta-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-api</artifactId>
@ -134,6 +139,11 @@
<artifactId>hutool-all</artifactId>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>transmittable-thread-local</artifactId>
@ -149,6 +159,12 @@
<artifactId>oshi-core</artifactId>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk18on</artifactId>
</dependency>
<!-- Test 测试相关 -->
<dependency>
<groupId>org.springframework.boot</groupId>

View File

@ -2,6 +2,8 @@ package cd.casic.framework.commons.exception;
import cd.casic.framework.commons.exception.enums.GlobalErrorCodeConstants;
import cd.casic.framework.commons.exception.enums.ServiceErrorCodeRange;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
/**
@ -13,6 +15,8 @@ import lombok.Data;
* TODO 错误码设计成对象的原因为未来的 i18 国际化做准备
*/
@Data
@Builder
@AllArgsConstructor
public class ErrorCode {
/**
@ -24,9 +28,4 @@ public class ErrorCode {
*/
private final String msg;
public ErrorCode(Integer code, String message) {
this.code = code;
this.msg = message;
}
}

View File

@ -6,7 +6,7 @@ import cd.casic.framework.commons.exception.ErrorCode;
/**
* 全局错误码枚举
* 0-999 系统异常编码保留
*
* <p>
* 一般情况下使用 HTTP 响应状态码 https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Status
* 虽然说HTTP 响应状态码作为业务使用表达能力偏弱但是使用在系统层面还是非常不错的
* 比较特殊的是因为之前一直使用 0 作为成功就不使用 200
@ -39,4 +39,6 @@ public interface GlobalErrorCodeConstants {
ErrorCode UNKNOWN = new ErrorCode(999, "未知错误");
ErrorCode ID_DUPLICATION = new ErrorCode(1000, "ID重复");
}

View File

@ -38,7 +38,7 @@ public class CacheUtils {
// 只阻塞当前数据加载线程其他线程返回旧值
.refreshAfterWrite(duration)
// 通过 asyncReloading 实现全异步加载包括 refreshAfterWrite 被阻塞的加载线程
.build(CacheLoader.asyncReloading(loader, Executors.newCachedThreadPool())); // TODO 芋艿可能要思考下未来要不要做成可配置
.build(CacheLoader.asyncReloading(loader, Executors.newCachedThreadPool()));
}
/**

View File

@ -0,0 +1,89 @@
package cd.casic.framework.commons.util.encrypt;
import org.bouncycastle.crypto.InvalidCipherTextException;
import org.bouncycastle.crypto.engines.AESEngine;
import org.bouncycastle.crypto.modes.CBCBlockCipher;
import org.bouncycastle.crypto.paddings.PKCS7Padding;
import org.bouncycastle.crypto.paddings.PaddedBufferedBlockCipher;
import org.bouncycastle.crypto.params.KeyParameter;
import org.bouncycastle.jce.provider.BouncyCastleProvider;
import javax.crypto.KeyGenerator;
import javax.crypto.SecretKey;
import java.nio.charset.StandardCharsets;
import java.security.SecureRandom;
import java.security.Security;
import java.util.Arrays;
import java.util.Base64;
/**
* @author by mianbin
* @Classname AESUtil
* @Description 加密算法后面加GM算法
* @Date 2025/3/18 11:15
*/
public class AESUtil {
private static final String AES = "AES";
private static final Integer SEED = 256;
static {
Security.addProvider(new BouncyCastleProvider());
}
public static String decrypt(String key, String content) {
byte[] bytes = Base64.getDecoder().decode(content);
KeyParameter keyParameter = generateKeyParameter(key);
byte[] output = processData(false, keyParameter, bytes);
return Base64.getEncoder().encodeToString(output);
}
public static byte[] decrypt(String key, byte[] content) {
KeyParameter keyParameter = generateKeyParameter(key);
return processData(false, keyParameter, content);
}
public static String encrypt(String key, String content) {
byte[] bytes = content.getBytes(StandardCharsets.UTF_8);
KeyParameter keyParameter = generateKeyParameter(key);
byte[] output = processData(true, keyParameter, bytes);
return Base64.getEncoder().encodeToString(output);
}
public static byte[] encrypt(String key, byte[] content) {
KeyParameter keyParameter = generateKeyParameter(key);
return processData(true, keyParameter, content);
}
private static byte[] processData(boolean encrypt, KeyParameter keyParameter, byte[] bytes) {
PKCS7Padding blockCipherPadding = new PKCS7Padding();
CBCBlockCipher blockCipher = new CBCBlockCipher(new AESEngine());
PaddedBufferedBlockCipher paddedBufferedBlockCipher = new PaddedBufferedBlockCipher(blockCipher, blockCipherPadding);
paddedBufferedBlockCipher.init(encrypt, keyParameter);
byte[] output = new byte[paddedBufferedBlockCipher.getOutputSize(bytes.length)];
int offset = paddedBufferedBlockCipher.processBytes(bytes, 0, bytes.length, output, 0);
int outputLength = 0;
try {
outputLength = paddedBufferedBlockCipher.doFinal(output, offset);
} catch (InvalidCipherTextException e) {
e.printStackTrace();
}
return Arrays.copyOf(output, offset + outputLength);
}
private static KeyParameter generateKeyParameter(String key) {
KeyGenerator keyGenerator = null;
SecureRandom secureRandom = null;
try {
keyGenerator = KeyGenerator.getInstance(AES);
secureRandom = SecureRandom.getInstance("SHA1PRNG");
secureRandom.setSeed(key.getBytes(StandardCharsets.UTF_8));
} catch (Exception e) {
e.printStackTrace();
}
keyGenerator.init(SEED, secureRandom);
SecretKey secretKey = keyGenerator.generateKey();
byte[] encoded = secretKey.getEncoded();
return new KeyParameter(encoded);
}
}

View File

@ -0,0 +1,41 @@
package cd.casic.framework.commons.util.encrypt;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Arrays;
/**
* @author liubin
* @date 2023/10/10 14:00
* @description
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class DHKeyPair {
private byte[] publicKey;
private byte[] privateKey;
@Override
public boolean equals(Object other) {
if (this == other) return true;
assert other != null;
if (this.getClass() != other.getClass()) return false;
if (!Arrays.equals(publicKey,((DHKeyPair) other).publicKey)) return false;
if (!Arrays.equals(privateKey, ((DHKeyPair) other).privateKey)) return false;
return true;
}
@Override
public int hashCode() {
int result = Arrays.hashCode(publicKey);
result = 31 * result + Arrays.hashCode(privateKey);
return result;
}
}

View File

@ -0,0 +1,106 @@
package cd.casic.framework.commons.util.encrypt;
import lombok.SneakyThrows;
import javax.crypto.*;
import javax.crypto.interfaces.DHPublicKey;
import javax.crypto.spec.DHParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import java.math.BigInteger;
import java.security.*;
import java.security.spec.InvalidKeySpecException;
import java.security.spec.PKCS8EncodedKeySpec;
import java.security.spec.X509EncodedKeySpec;
public class DHUtil {
private static final String KEY_ALGORITHM = "DH";
private static final String KEY_PROVIDER = "BC";
private static final String SECRET_ALGORITHM = "DES";
private static BigInteger p = new BigInteger("16560215747140417249215968347342080587", 16);
private static BigInteger g = new BigInteger("1234567890", 16);
public static DHKeyPair initKey(){
try {
KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(KEY_ALGORITHM, KEY_PROVIDER);
DHParameterSpec serverParam = new DHParameterSpec(p, g, 128);
keyPairGenerator.initialize(serverParam, new SecureRandom());
//keyPairGenerator.initialize(KEY_SIZE);
KeyPair keyPair = keyPairGenerator.generateKeyPair();
return new DHKeyPair(keyPair.getPublic().getEncoded(), keyPair.getPrivate().getEncoded());
} catch (NoSuchAlgorithmException | InvalidAlgorithmParameterException | NoSuchProviderException e) {
e.printStackTrace();
}
return null;
}
public static DHKeyPair initKey(byte[] partyAPublicKey) {
X509EncodedKeySpec x509KeySpec = new X509EncodedKeySpec(partyAPublicKey);
try {
KeyFactory keyFactory = KeyFactory.getInstance(KEY_ALGORITHM);
PrivateKey publicKey = keyFactory.generatePrivate(x509KeySpec);
DHParameterSpec dhParameterSpec = ((DHPublicKey) publicKey).getParams();
KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(KEY_ALGORITHM, KEY_PROVIDER);
keyPairGenerator.initialize(dhParameterSpec);
// keyPairGenerator.initialize(KEY_SIZE);
KeyPair keyPair = keyPairGenerator.genKeyPair();
return new DHKeyPair(keyPair.getPublic().getEncoded(), keyPair.getPrivate().getEncoded());
} catch (NoSuchAlgorithmException | InvalidKeySpecException | NoSuchProviderException | InvalidAlgorithmParameterException e) {
e.printStackTrace();
}
return null;
}
public static byte[] encrypt(byte[] data, byte[] partAPublicKey, byte[] partBPrivateKey) {
byte[] key = getSecretKey(partAPublicKey, partBPrivateKey);
SecretKeySpec secretKey = new SecretKeySpec(key, SECRET_ALGORITHM);
try {
Cipher cipher = Cipher.getInstance(secretKey.getAlgorithm());
cipher.init(Cipher.ENCRYPT_MODE, secretKey);
return cipher.doFinal(data);
} catch (NoSuchAlgorithmException | NoSuchPaddingException | BadPaddingException | IllegalBlockSizeException | InvalidKeyException e) {
e.printStackTrace();
}
return null;
}
public static byte[] decrypt(byte[] data, byte[] partBPublicKey, byte[] partAPrivateKey){
byte[] key = getSecretKey(partBPublicKey, partAPrivateKey);
SecretKeySpec secretKey = new SecretKeySpec(key, SECRET_ALGORITHM);
Cipher cipher = null;
try {
cipher = Cipher.getInstance(secretKey.getAlgorithm());
cipher.init(Cipher.DECRYPT_MODE, secretKey);
return cipher.doFinal(data);
} catch (NoSuchAlgorithmException | NoSuchPaddingException | IllegalBlockSizeException | BadPaddingException | InvalidKeyException e) {
e.printStackTrace();
}
return null;
}
@SneakyThrows
private static byte[] getSecretKey(byte[] publicKey, byte[] privateKey) {
// 实例化密钥工厂
KeyFactory keyFactory = KeyFactory.getInstance(KEY_ALGORITHM);
// 初始化公钥
X509EncodedKeySpec x509KeySpec = new X509EncodedKeySpec(publicKey);
// 产生公钥
PublicKey pubKey = keyFactory.generatePublic(x509KeySpec);
// 初始化私钥
PKCS8EncodedKeySpec pkcs8KeySpec = new PKCS8EncodedKeySpec(privateKey);
// 产生私钥
PrivateKey priKey = keyFactory.generatePrivate(pkcs8KeySpec);
// 实例化
KeyAgreement keyAgree = KeyAgreement.getInstance(KEY_ALGORITHM, KEY_PROVIDER);
// 初始化
keyAgree.init(priKey);
keyAgree.doPhase(pubKey, true);
// 生成本地密钥
SecretKey secretKey = keyAgree.generateSecret(SECRET_ALGORITHM);
return secretKey.getEncoded();
}
}

View File

@ -0,0 +1,34 @@
package cd.casic.framework.commons.util.generator;
import java.util.List;
/**
* @author mianbin
* @Classname UserTypeEnum
* @Description 业务id生成接口
* @Date 2025/3/18 14:16
*/
public interface IdGenerator {
/**
* 生成id
*
* @param key 业务标识
* @return 结果
*/
Long get(String key);
/**
* 初始化
*/
boolean init();
/**
* 批量生成id
*
* @param key 业务标识
* @param num id数量
* @return id集合
*/
List<Long> batchGenerateSegmentId(String key, Integer num);
}

View File

@ -0,0 +1,72 @@
package cd.casic.framework.commons.util.http;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import cd.casic.framework.commons.exception.ServiceException;
import lombok.SneakyThrows;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSocketFactory;
import javax.net.ssl.TrustManager;
import javax.net.ssl.X509TrustManager;
import java.security.SecureRandom;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import java.util.concurrent.TimeUnit;
/**
* @author liubin
* @date 2023/10/11 14:02
* @description
*/
public class OkhttpUtils {
private static final long connectTimeout = 5L;
private static final long readTimeout = 30L;
private static final long writeTimeout = 30L;
private static final TrustManager[] trustAnyCerts = new TrustManager[]{new X509TrustManager() {
@Override
public void checkClientTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException {
}
@Override
public void checkServerTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException {
}
@Override
public X509Certificate[] getAcceptedIssuers() {
return new X509Certificate[0];
}
}};
private static final OkHttpClient okHttpClient = new OkHttpClient.Builder()
.connectTimeout(connectTimeout, TimeUnit.SECONDS)
.readTimeout(readTimeout, TimeUnit.MINUTES)
.writeTimeout(writeTimeout, TimeUnit.MINUTES)
.sslSocketFactory(anySslSocketFactory(), (X509TrustManager) trustAnyCerts[0])
.hostnameVerifier((s, sslSession) -> true)
.build();
private static SSLSocketFactory anySslSocketFactory(){
try {
SSLContext sslContext = SSLContext.getInstance("SSL");
sslContext.init(null, trustAnyCerts, new SecureRandom());
return sslContext.getSocketFactory();
} catch (Exception ignore){
throw new ServiceException();
}
}
public static Response doHttp(Request request) {
return doHttp(okHttpClient, request);
}
@SneakyThrows
private static Response doHttp(OkHttpClient okHttpClient, Request request) {
return okHttpClient.newCall(request).execute();
}
}

View File

@ -0,0 +1,22 @@
package cd.casic.framework.commons.util.reflect;
import java.util.Collection;
import java.util.Map;
public class ReflectUtil {
public static Boolean isNativeType(Object bean) {
return bean instanceof Integer ||
bean instanceof Long ||
bean instanceof Double ||
bean instanceof Float ||
bean instanceof Short ||
bean instanceof Byte ||
bean instanceof Boolean;
}
public static Boolean isCollectionType(Object obj) {
return obj instanceof Map || obj instanceof Collection;
}
}

View File

@ -0,0 +1,33 @@
package cd.casic.framework.commons.util.retry;
import lombok.SneakyThrows;
/**
* @author by mianbin
* @Classname RetryUtils
* @Description TODO
* @Date 2025/3/18 11:28
*/
public class RetryUtils {
@SneakyThrows
public static <T> T execute(Action<T> action, Integer retryTime, Long retryPeriodMills) {
try {
return action.execute();
} catch (Throwable ignored) {
if (retryTime - 1 <= 0) {
return action.fail(ignored);
}
Thread.sleep(retryPeriodMills);
return execute(action, retryTime - 1, 500L);
}
}
public interface Action<T> {
T execute();
default T fail(Throwable e) throws Throwable {
throw e;
}
}
}

View File

@ -63,7 +63,6 @@ public class StrUtils {
/**
* 移除字符串中包含指定字符串的行
*
* @param content 字符串
* @param sequence 包含的字符串
* @return 移除后的字符串

View File

@ -0,0 +1,21 @@
package cd.casic.framework.commons.util.validation;
/**
* @author by mianbin
* @Classname ValidGroup
* @Description 验证组
* @Date 2025/3/18 15:09
*/
public interface ValidGroup {
interface Create extends ValidGroup {
}
interface Update extends ValidGroup {
}
interface Delete extends ValidGroup {
}
interface Query extends ValidGroup {
}
}

View File

@ -0,0 +1,44 @@
package cd.casic.framework.commons.util.watcher;
import lombok.extern.slf4j.Slf4j;
/**
* @author by mianbin
* @Classname LogUtils
* @Description 流水线和watcher监控日志的工具类放一起
* @Date 2025/3/18 11:26
*/
@Slf4j
public class LogUtils {
/**
* 计算[watcher].createTime与当前时间的毫秒数的耗时在[warnThreshold][errorThreshold]之间
* 会将[watcher]序列化为字符串并打印到WARN日志当超出[errorThreshold]会打印ERROR日志否则什么都不会打印
*/
public static void printCostTimeWE(Watcher watcher, Long warnThreshold, Long errorThreshold) {
watcher.stop();
long cost = System.currentTimeMillis() - watcher.getCreateTime();
if (cost >= warnThreshold) {
if (cost > errorThreshold) {
log.error(watcher + " cost " + cost + " ms");
} else {
log.warn(watcher + " cost " + cost + " ms");
}
}
}
public static void costTime(String message, Long startTime, Long warnThreshold, Long errorThreshold) {
long cost = System.currentTimeMillis() - startTime;
if (cost < warnThreshold) {
log.info(message + " cost " + cost + " ms");
} else if (cost >= warnThreshold && cost < errorThreshold) {
log.warn(message + " cost " + cost + " ms");
} else {
log.error(message + " cost " + cost + " ms");
}
}
public static void printCostTimeWE(Watcher watcher) {
printCostTimeWE(watcher, 1000L, 5000L);
}
}

View File

@ -0,0 +1,82 @@
package cd.casic.framework.commons.util.watcher;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.util.StopWatch;
/**
* @author by mianbin
* @Classname Watcher
* @Description 针对running值导致抛出异常的位置主动做了stop并增加了一个全部耗时统计
* @Date 2025/3/18 10:49
*/
@Slf4j
public class Watcher extends StopWatch {
@Getter
private long createTime = System.currentTimeMillis();
public Watcher(String id) {
super(id);
this.createTime = System.currentTimeMillis();
}
public long elapsed() {
return System.currentTimeMillis() - createTime;
}
@Override
public void start() {
if (isRunning()) {
stop();
}
super.start();
}
@Override
public void start(String taskName) {
if (isRunning()) {
stop();
}
super.start(taskName);
}
@Override
public String toString() {
if (isRunning()) {
stop();
}
StringBuilder sb = new StringBuilder(shortSummary());
for (TaskInfo task : this.getTaskInfo()) {
sb.append("|").append(task.getTaskName()).append("=").append(task.getTimeMillis());
}
return sb.toString();
}
@Override
public String shortSummary() {
return "watcher|" + getId() + "|total=" + getTotalTimeMillis() + "|elapsed=" + elapsed();
}
@Override
public void stop() {
if (isRunning()) {
try {
super.stop();
} catch (IllegalStateException ignored) {
}
}
}
public void safeAround(String taskName, Runnable action) {
try {
this.start(taskName);
action.run();
} catch (Exception e) {
log.warn(getId() + " , " + taskName, e);
} finally {
this.stop();
}
}
}

View File

@ -22,7 +22,7 @@ import org.springframework.context.annotation.Bean;
@ConditionalOnProperty(prefix = "ops.tracer", value = "enable", matchIfMissing = true)
public class OpsTracerAutoConfiguration {
// TODO 重要目前 opentracing 版本存在冲突要么保证 skywalking要么保证阿里云短信 sdk
// TODO 重要目前 opentracing 版本存在冲突要么保证 skywalking要么保证云短信 sdk
// @Bean
// public TracerProperties bizTracerProperties() {
// return new TracerProperties();

View File

@ -22,7 +22,7 @@ import java.time.LocalDateTime;
*/
@Data
@Accessors(chain = true)
@JsonIgnoreProperties(value = "transMap") // 由于 Easy-Trans 会添加 transMap 属性避免 Jackson Spring Cache 反序列化报错
@JsonIgnoreProperties(value = "transMap")
public abstract class BaseDO implements Serializable, TransPojo {
/**

View File

@ -1,5 +1,6 @@
package cd.casic.framework.redis.config;
import cd.casic.framework.redis.core.RedisTemplateUtils;
import cn.hutool.core.util.ReflectUtil;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
@ -42,4 +43,9 @@ public class OpsRedisAutoConfiguration {
return json;
}
@Bean
public RedisTemplateUtils redisTemplateUtils() {
return new RedisTemplateUtils();
}
}

View File

@ -0,0 +1,570 @@
package cd.casic.framework.redis.core;
import jakarta.annotation.Resource;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.util.CollectionUtils;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.TimeUnit;
/**
* @author by mianbin
* @Classname RedisTemplateUtils
* @Description TODO
* @Date 2025/3/20 11:03
*/
public class RedisTemplateUtils {
@Resource
private RedisTemplate<String, Object> redisTemplate;
/**
* 指定缓存失效时间
*
* @param key
* @param time 时间()
*/
public boolean expire(String key, long time) {
try {
if (time > 0) {
redisTemplate.expire(key, time, TimeUnit.SECONDS);
}
return true;
} catch (Exception e) {
e.printStackTrace();
return false;
}
}
/**
* 根据key 获取过期时间
*
* @param key 不能为null
* @return 时间() 返回0代表为永久有效
*/
public long getExpire(String key) {
return redisTemplate.getExpire(key, TimeUnit.SECONDS);
}
/**
* 判断key是否存在
*
* @param key
* @return true 存在 false不存在
*/
public boolean hasKey(String key) {
try {
return Boolean.TRUE.equals(redisTemplate.hasKey(key));
} catch (Exception e) {
e.printStackTrace();
return false;
}
}
/**
* 删除缓存
*
* @param key 可以传一个值 或多个
*/
@SuppressWarnings("unchecked")
public void del(String... key) {
if (key != null && key.length > 0) {
if (key.length == 1) {
redisTemplate.delete(key[0]);
} else {
redisTemplate.delete((Collection<String>) CollectionUtils.arrayToList(key));
}
}
}
//============================String=============================
/**
* 普通缓存获取
*
* @param key
* @return
*/
public Object get(String key) {
return key == null ? null : redisTemplate.opsForValue().get(key);
}
/**
* 普通缓存放入
*
* @param key
* @param value
* @return true成功 false失败
*/
public boolean set(String key, Object value) {
try {
redisTemplate.opsForValue().set(key, value);
return true;
} catch (Exception e) {
e.printStackTrace();
return false;
}
}
/**
* 普通缓存放入并设置时间
*
* @param key
* @param value
* @param time 时间() time要大于0 如果time小于等于0 将设置无限期
* @return true成功 false 失败
*/
public boolean set(String key, Object value, long time) {
try {
if (time > 0) {
redisTemplate.opsForValue().set(key, value, time, TimeUnit.SECONDS);
} else {
set(key, value);
}
return true;
} catch (Exception e) {
e.printStackTrace();
return false;
}
}
/**
* 递增
*
* @param key
* @param delta 要增加几(大于0)
* @return
*/
public long incr(String key, long delta) {
if (delta < 0) {
throw new RuntimeException("递增因子必须大于0");
}
return redisTemplate.opsForValue().increment(key, delta);
}
/**
* 递减
*
* @param key
* @param delta 要减少几(小于0)
* @return
*/
public long decr(String key, long delta) {
if (delta < 0) {
throw new RuntimeException("递减因子必须大于0");
}
return redisTemplate.opsForValue().increment(key, -delta);
}
//================================Map=================================
/**
* HashGet
*
* @param key 不能为null
* @param item 不能为null
* @return
*/
public Object hget(String key, String item) {
return redisTemplate.opsForHash().get(key, item);
}
/**
* 获取hashKey对应的所有键值
*
* @param key
* @return 对应的多个键值
*/
public Map<Object, Object> hmget(String key) {
return redisTemplate.opsForHash().entries(key);
}
/**
* HashSet
*
* @param key
* @param map 对应多个键值
* @return true 成功 false 失败
*/
public boolean hmset(String key, Map<String, Object> map) {
try {
redisTemplate.opsForHash().putAll(key, map);
return true;
} catch (Exception e) {
e.printStackTrace();
return false;
}
}
/**
* HashSet 并设置时间
*
* @param key
* @param map 对应多个键值
* @param time 时间()
* @return true成功 false失败
*/
public boolean hmset(String key, Map<String, Object> map, long time) {
try {
redisTemplate.opsForHash().putAll(key, map);
if (time > 0) {
expire(key, time);
}
return true;
} catch (Exception e) {
e.printStackTrace();
return false;
}
}
/**
* 向一张hash表中放入数据,如果不存在将创建
*
* @param key
* @param item
* @param value
* @return true 成功 false失败
*/
public boolean hset(String key, String item, Object value) {
try {
redisTemplate.opsForHash().put(key, item, value);
return true;
} catch (Exception e) {
e.printStackTrace();
return false;
}
}
/**
* 向一张hash表中放入数据,如果不存在将创建
*
* @param key
* @param item
* @param value
* @param time 时间() 注意:如果已存在的hash表有时间,这里将会替换原有的时间
* @return true 成功 false失败
*/
public boolean hset(String key, String item, Object value, long time) {
try {
redisTemplate.opsForHash().put(key, item, value);
if (time > 0) {
expire(key, time);
}
return true;
} catch (Exception e) {
e.printStackTrace();
return false;
}
}
/**
* 删除hash表中的值
*
* @param key 不能为null
* @param item 可以使多个 不能为null
*/
public void hdel(String key, Object... item) {
redisTemplate.opsForHash().delete(key, item);
}
/**
* 判断hash表中是否有该项的值
*
* @param key 不能为null
* @param item 不能为null
* @return true 存在 false不存在
*/
public boolean hHasKey(String key, String item) {
return redisTemplate.opsForHash().hasKey(key, item);
}
/**
* hash递增 如果不存在,就会创建一个 并把新增后的值返回
*
* @param key
* @param item
* @param by 要增加几(大于0)
* @return
*/
public double hincr(String key, String item, double by) {
return redisTemplate.opsForHash().increment(key, item, by);
}
/**
* hash递减
*
* @param key
* @param item
* @param by 要减少记(小于0)
* @return
*/
public double hdecr(String key, String item, double by) {
return redisTemplate.opsForHash().increment(key, item, -by);
}
//============================set=============================
/**
* 根据key获取Set中的所有值
*
* @param key
* @return
*/
public Set<Object> sGet(String key) {
try {
return redisTemplate.opsForSet().members(key);
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
/**
* 根据value从一个set中查询,是否存在
*
* @param key
* @param value
* @return true 存在 false不存在
*/
public boolean sHasKey(String key, Object value) {
try {
return redisTemplate.opsForSet().isMember(key, value);
} catch (Exception e) {
e.printStackTrace();
return false;
}
}
/**
* 将数据放入set缓存
*
* @param key
* @param values 可以是多个
* @return 成功个数
*/
public long sSet(String key, Object... values) {
try {
return redisTemplate.opsForSet().add(key, values);
} catch (Exception e) {
e.printStackTrace();
return 0;
}
}
/**
* 将set数据放入缓存
*
* @param key
* @param time 时间()
* @param values 可以是多个
* @return 成功个数
*/
public long sSetAndTime(String key, long time, Object... values) {
try {
Long count = redisTemplate.opsForSet().add(key, values);
if (time > 0) {
expire(key, time);
}
return count;
} catch (Exception e) {
e.printStackTrace();
return 0;
}
}
/**
* 获取set缓存的长度
*
* @param key
* @return
*/
public long sGetSetSize(String key) {
try {
return redisTemplate.opsForSet().size(key);
} catch (Exception e) {
e.printStackTrace();
return 0;
}
}
/**
* 移除值为value的
*
* @param key
* @param values 可以是多个
* @return 移除的个数
*/
public long setRemove(String key, Object... values) {
try {
return redisTemplate.opsForSet().remove(key, values);
} catch (Exception e) {
e.printStackTrace();
return 0;
}
}
//===============================list=================================
/**
* 获取list缓存的内容
*
* @param key
* @param start 开始
* @param end 结束 0 -1代表所有值
* @return
*/
public List<Object> lGet(String key, long start, long end) {
try {
return redisTemplate.opsForList().range(key, start, end);
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
/**
* 获取list缓存的长度
*
* @param key
* @return
*/
public long lGetListSize(String key) {
try {
return redisTemplate.opsForList().size(key);
} catch (Exception e) {
e.printStackTrace();
return 0;
}
}
/**
* 通过索引 获取list中的值
*
* @param key
* @param index 索引 index>=0时 0 表头1 第二个元素依次类推index<0时-1表尾-2倒数第二个元素依次类推
* @return
*/
public Object lGetIndex(String key, long index) {
try {
return redisTemplate.opsForList().index(key, index);
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
/**
* 将list放入缓存
*
* @param key
* @param value
* @return
*/
public boolean lSet(String key, Object value) {
try {
redisTemplate.opsForList().rightPush(key, value);
return true;
} catch (Exception e) {
e.printStackTrace();
return false;
}
}
/**
* 将list放入缓存
*
* @param key
* @param value
* @param time 时间()
* @return
*/
public boolean lSet(String key, Object value, long time) {
try {
redisTemplate.opsForList().rightPush(key, value);
if (time > 0) {
expire(key, time);
}
return true;
} catch (Exception e) {
e.printStackTrace();
return false;
}
}
/**
* 将list放入缓存
*
* @param key
* @param value
* @return
*/
public boolean lSet(String key, List<Object> value) {
try {
redisTemplate.opsForList().rightPushAll(key, value);
return true;
} catch (Exception e) {
e.printStackTrace();
return false;
}
}
/**
* 将list放入缓存
*
* @param key
* @param value
* @param time 时间()
* @return
*/
public boolean lSet(String key, List<Object> value, long time) {
try {
redisTemplate.opsForList().rightPushAll(key, value);
if (time > 0) {
expire(key, time);
}
return true;
} catch (Exception e) {
e.printStackTrace();
return false;
}
}
/**
* 根据索引修改list中的某条数据
*
* @param key
* @param index 索引
* @param value
* @return
*/
public boolean lUpdateIndex(String key, long index, Object value) {
try {
redisTemplate.opsForList().set(key, index, value);
return true;
} catch (Exception e) {
e.printStackTrace();
return false;
}
}
/**
* 移除N个值为value
*
* @param key
* @param count 移除多少个
* @param value
* @return 移除的个数
*/
public long lRemove(String key, long count, Object value) {
try {
return redisTemplate.opsForList().remove(key, count, value);
} catch (Exception e) {
e.printStackTrace();
return 0;
}
}
}

View File

@ -18,7 +18,7 @@ import static cd.casic.framework.commons.exception.enums.GlobalErrorCodeConstant
*
* 补充Spring Security 通过 {@link ExceptionTranslationFilter#sendStartAuthentication(HttpServletRequest, HttpServletResponse, FilterChain, AuthenticationException)} 方法调用当前类
*
* @author ruoyi
* mianbin modified from yudao
*/
@Slf4j
@SuppressWarnings("JavadocReference") // 忽略文档引用报错

View File

@ -6,7 +6,7 @@ import lombok.Getter;
/**
* 操作日志的操作类型
*
* @author ruoyi
* mianbin modified from yudao
*/
@Getter
@AllArgsConstructor

View File

@ -73,11 +73,6 @@ public interface ErrorCodeConstants {
// ========== 通知公告 1-002-008-000 ==========
ErrorCode NOTICE_NOT_FOUND = new ErrorCode(1_002_008_001, "当前通知公告不存在");
// ========== 短信渠道 1-002-011-000 ==========
ErrorCode SMS_CHANNEL_NOT_EXISTS = new ErrorCode(1_002_011_000, "短信渠道不存在");
ErrorCode SMS_CHANNEL_DISABLE = new ErrorCode(1_002_011_001, "短信渠道不处于开启状态,不允许选择");
ErrorCode SMS_CHANNEL_HAS_CHILDREN = new ErrorCode(1_002_011_002, "无法删除,该短信渠道还有短信模板");
// ========== 短信模板 1-002-012-000 ==========
ErrorCode SMS_TEMPLATE_NOT_EXISTS = new ErrorCode(1_002_012_000, "短信模板不存在");
ErrorCode SMS_TEMPLATE_CODE_DUPLICATE = new ErrorCode(1_002_012_001, "已经存在编码为【{}】的短信模板");
@ -112,16 +107,12 @@ public interface ErrorCodeConstants {
ErrorCode TENANT_PACKAGE_DISABLE = new ErrorCode(1_002_016_002, "名字为【{}】的租户套餐已被禁用");
ErrorCode TENANT_PACKAGE_NAME_DUPLICATE = new ErrorCode(1_002_016_003, "已经存在该名字的租户套餐");
// ========== 社交用户 1-002-018-000 ==========
ErrorCode SOCIAL_USER_AUTH_FAILURE = new ErrorCode(1_002_018_000, "社交授权失败,原因是:{}");
ErrorCode SOCIAL_USER_NOT_FOUND = new ErrorCode(1_002_018_001, "社交授权失败,找不到对应的用户");
// ========== 单点登录 1-002-018-000 ==========
ErrorCode SOCIAL_USER_AUTH_FAILURE = new ErrorCode(1_002_018_000, "第三方授权失败,原因是:{}");
ErrorCode SOCIAL_USER_NOT_FOUND = new ErrorCode(1_002_018_001, "第三方授权失败,找不到对应的用户");
ErrorCode SOCIAL_CLIENT_WEIXIN_MINI_APP_PHONE_CODE_ERROR = new ErrorCode(1_002_018_200, "获得手机号失败");
ErrorCode SOCIAL_CLIENT_WEIXIN_MINI_APP_QRCODE_ERROR = new ErrorCode(1_002_018_201, "获得小程序码失败");
ErrorCode SOCIAL_CLIENT_WEIXIN_MINI_APP_SUBSCRIBE_TEMPLATE_ERROR = new ErrorCode(1_002_018_202, "获得小程序订阅消息模版失败");
ErrorCode SOCIAL_CLIENT_WEIXIN_MINI_APP_SUBSCRIBE_MESSAGE_ERROR = new ErrorCode(1_002_018_203, "发送小程序订阅消息失败");
ErrorCode SOCIAL_CLIENT_NOT_EXISTS = new ErrorCode(1_002_018_210, "社交客户端不存在");
ErrorCode SOCIAL_CLIENT_UNIQUE = new ErrorCode(1_002_018_211, "社交客户端已存在配置");
ErrorCode SOCIAL_CLIENT_NOT_EXISTS = new ErrorCode(1_002_018_210, "第三方客户端不存在");
ErrorCode SOCIAL_CLIENT_UNIQUE = new ErrorCode(1_002_018_211, "第三方客户端已存在配置");
// ========== OAuth2 客户端 1-002-020-000 =========

View File

@ -12,8 +12,6 @@ import lombok.experimental.Accessors;
/**
* 部门表
*
* @author ruoyi
* @author mianbin modified from yudao
*/
@TableName("system_dept")

View File

@ -12,7 +12,7 @@ import lombok.experimental.Accessors;
/**
* 岗位表
*
* @author ruoyi
* @author mianbin modified from yudao
*/
@TableName("system_post")
@KeySequence("system_post_seq") // 用于 OraclePostgreSQLKingbaseDB2H2 数据库的主键自增如果是 MySQL 等数据库可不写

View File

@ -11,8 +11,6 @@ import lombok.experimental.Accessors;
/**
* 用户和岗位关联
*
* @author ruoyi
*/
@TableName("system_user_post")
@KeySequence("system_user_post_seq") // 用于 OraclePostgreSQLKingbaseDB2H2 数据库的主键自增如果是 MySQL 等数据库可不写

View File

@ -10,7 +10,7 @@ import lombok.experimental.Accessors;
/**
* 字典数据表
*
* @author ruoyi
* @author mianbin modified from yudao
*/
@TableName("system_dict_data")
@KeySequence("system_dict_data_seq") // 用于 OraclePostgreSQLKingbaseDB2H2 数据库的主键自增如果是 MySQL 等数据库可不写

View File

@ -13,7 +13,7 @@ import java.time.LocalDateTime;
/**
* 字典类型表
*
* @author ruoyi
* mianbin modified from yudao
*/
@TableName("system_dict_type")
@KeySequence("system_dict_type_seq") // 用于 OraclePostgreSQLKingbaseDB2H2 数据库的主键自增如果是 MySQL 等数据库可不写

View File

@ -13,8 +13,7 @@ import lombok.experimental.Accessors;
*
* 用途配置发送邮箱的账号
*
* @author wangjingyi
* @since 2022-03-21
* @author mianbin modified from yudao
*/
@TableName(value = "system_mail_account", autoResultMap = true)
@KeySequence("system_mail_account_seq") // 用于 OraclePostgreSQLKingbaseDB2H2 数据库的主键自增如果是 MySQL 等数据库可不写

View File

@ -12,7 +12,7 @@ import lombok.experimental.Accessors;
/**
* 通知公告表
*
* @author ruoyi
* mianbin modified from yudao
*/
@TableName("system_notice")
@KeySequence("system_notice_seq") // 用于 OraclePostgreSQLKingbaseDB2H2 数据库的主键自增如果是 MySQL 等数据库可不写

View File

@ -13,7 +13,7 @@ import lombok.experimental.Accessors;
/**
* 菜单 DO
*
* @author ruoyi
* mianbin modified from yudao
*/
@TableName("system_menu")
@KeySequence("system_menu_seq") // 用于 OraclePostgreSQLKingbaseDB2H2 数据库的主键自增如果是 MySQL 等数据库可不写

View File

@ -19,7 +19,7 @@ import java.util.Set;
/**
* 角色 DO
*
* @author ruoyi
* mianbin modified from yudao
*/
@TableName(value = "system_role", autoResultMap = true)
@KeySequence("system_role_seq") // 用于 OraclePostgreSQLKingbaseDB2H2 数据库的主键自增如果是 MySQL 等数据库可不写

View File

@ -11,7 +11,7 @@ import lombok.experimental.Accessors;
/**
* 角色和菜单关联
*
* @author ruoyi
* mianbin modified from yudao
*/
@TableName("system_role_menu")
@KeySequence("system_role_menu_seq") // 用于 OraclePostgreSQLKingbaseDB2H2 数据库的主键自增如果是 MySQL 等数据库可不写

View File

@ -11,7 +11,7 @@ import lombok.experimental.Accessors;
/**
* 用户和角色关联
*
* @author ruoyi
* mianbin modified from yudao
*/
@TableName("system_user_role")
@KeySequence("system_user_role_seq") // 用于 OraclePostgreSQLKingbaseDB2H2 数据库的主键自增如果是 MySQL 等数据库可不写

View File

@ -16,7 +16,7 @@ import java.time.LocalDateTime;
* @author mianbin modified from yudao
*/
@TableName(value = "system_tenant", autoResultMap = true)
@KeySequence("system_tenant_seq") // 用于 OraclePostgreSQLKingbaseDB2H2 数据库的主键自增如果是 MySQL 等数据库可不写
@KeySequence("system_tenant_seq")
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)

View File

@ -13,7 +13,7 @@ import java.util.List;
/**
* 字典数据 Service 接口
*
* @author ruoyi
* mianbin modified from yudao
*/
public interface DictDataService {

View File

@ -28,7 +28,7 @@ import static cd.casic.module.system.enums.ErrorCodeConstants.*;
/**
* 字典数据 Service 实现类
*
* @author ruoyi
* mianbin modified from yudao
*/
@Service
@Slf4j

View File

@ -0,0 +1,31 @@
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>cd.casic.boot</groupId>
<artifactId>modules</artifactId>
<version>${revision}</version>
</parent>
<groupId>cd.casic.pipeline</groupId>
<artifactId>pipeline-ci-commons</artifactId>
<version>${revision}</version>
<description>
流水线process、流水线engine、流水线work、资源管理层、环境管理、agent、构建调度、项目管理、代码库、凭证、扩展Plugin、日志、流水线外设需要的commons
</description>
<dependencies>
<dependency>
<groupId>cd.casic.boot</groupId>
<artifactId>commons</artifactId>
</dependency>
<dependency>
<groupId>cd.casic.boot</groupId>
<artifactId>spring-boot-starter-mybatis</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,19 @@
package cd.casic.pipeline.commons.constant;
/**
* @Classname BaseConstant
* @Description 标志位
* @Date 2025/3/18 10:00
* @author mianbin
*/
public class BaseConstant {
/**
* 已删
*/
public static final Integer DELETED = 1;
/**
* 未删
*/
public static final Integer NOT_DELETED = 0;
}

View File

@ -0,0 +1,136 @@
package cd.casic.pipeline.commons.constant;
/**
* @Classname CommonConstants
* @Description TODO
* @Date 2025/3/18 10:02
* @author mianbin
*/
public class CommonConstants {
public static final String BCI_CODE_PREFIX = "BCI_CODE_";
public static final String DEVOPS = "DevOps";
public static final Integer NUM_ONE = 1;
public static final Integer NUM_TWO = 2;
public static final Integer NUM_THREE = 3;
public static final Integer NUM_FOUR = 4;
public static final Integer NUM_FIVE = 5;
public static final Integer NUM_SIX = 6;
public static final Integer NUM_SEVEN = 7;
public static final Integer NUM_EIGHT = 8;
public static final Integer NUM_NINE = 9;
public static final String INIT_VERSION = "1.0.0"; // 初始化版本
public static final String BEGIN = "begin"; // 开始
public static final String EDIT = "edit"; // 提交信息
public static final String COMMIT = "commit"; // 提交
public static final String BUILD = "build"; // 构建
public static final String CHECK = "check"; // 验证
public static final String TEST = "test"; // 测试
public static final String CODECC = "codecc"; // 代码检查
public static final String APPROVE = "approve"; // 审核
public static final String END = "end"; // 结束
public static final String SUCCESS = "success"; // 成功
public static final String UNDO = "undo"; // 未执行
public static final String DOING = "doing"; // 执行中
public static final String FAIL = "fail"; // 失败
public static final String ONLINE = "online"; // 上线
public static final String TEST_ENV_PREPARE = "testEnvPrepare"; // 准备测试环境
public static final String ING = "ing"; //
public static final String LATEST = "latest"; // 最新
public static final String DEVELOP = "develop"; // 开发
public static final String DEPLOY = "deploy"; // 部署
public static final String SECURITY = "security"; // 安全
public static final String NORMAL = "normal"; // 正常
public static final String EXCEPTION = "exception"; // 异常
public static final String REQUIRED = "required"; // 必选
public static final String MIN_LENGTH = "minLength"; // 最小长度
public static final String MAX_LENGTH = "maxLength"; // 最大长度
public static final String DEFAULT = "default"; // 默认
public static final String JAVA = "java"; // java
public static final String PYTHON = "python"; // python
public static final String NODEJS = "nodejs"; // nodejs
public static final String GOLANG = "golang"; // golang
public static final String JS = "js"; // js
public static final String PATTERN_STYLE = "patternStyle"; // 正则表达式规则
public static final String MESSAGE = "message"; // 提示信息
public static final String STATIC = "static"; // 静态资源
public static final String NAME = "name"; // 名称
public static final String FAIL_NUM = "failNum"; // 失败数量
public static final String VERSION = "version"; // 版本号
public static final String TYPE = "type"; // 类型
public static final String OUTPUT_DESC = "description"; // 插件输出字段描述
public static final String COMPONENT = "component"; // 组件
public static final String PIPELINE_URL = "pipelineUrl"; // 流水线链接
public static final String ARTIFACT = "artifact"; // 构件
public static final String REPORT = "report"; // 报告
public static final String VALUE = "value"; //
public static final String MULTIPLE_SELECTOR = "multiple"; // 多选
public static final String SINGLE_SELECTOR = "single"; // 单选
public static final String OPTIONS = "options"; // 可选项
public static final String LABEL = "label"; // 标签
public static final String NO_LABEL = "noLabel"; // 无标题
public static final String URL = "url"; // url链接
public static final String PATH = "path"; // 路径
public static final String ARTIFACTORY_TYPE = "artifactoryType"; // 归档仓库类型
public static final String REPORT_TYPE = "reportType"; // 报告类型
public static final String DATA = "data"; // 数据
public static final String STRING = "string"; // 字符串
public static final String LATEST_MODIFIER = "latestModifier"; // 最近修改人
public static final String LATEST_UPDATE_TIME = "latestUpdateTime"; // 最近修改时间
public static final String LATEST_EXECUTOR = "latestExecutor"; // 最近执行人
public static final String LATEST_EXECUTE_TIME = "latestExecuteTime"; // 最近执行时间
public static final String DANG = "dang"; //
public static final String AND = "and"; //
public static final String OR = "or"; //
public static final String TIMETOSELECT = "timetoSelect"; // 时必选
public static final String MASTER = "master"; // 主干
public static final String SYSTEM = "system"; // 系统
public static final String BUILD_RUNNING = "buildRunning"; // 运行中
public static final String BUILD_QUEUE = "buildQueue"; // 构建排队中
public static final String BUILD_REVIEWING = "buildReviewing"; // 构建待审核
public static final String BUILD_STAGE_SUCCESS = "buildStageSuccess"; // 构建阶段性完成
public static final String BUILD_COMPLETED = "buildCompleted"; // 构建完成
public static final String BUILD_CANCELED = "buildCanceled"; // 构建已取消
public static final String BUILD_FAILED = "buildFailed"; // 构建失败
public static final String ID = "id"; // id
public static final String STATUS = "status"; // 状态
public static final String EXECUTE_COUNT = "executeCount";
public static final String DEFAULT_LOCALE_LANGUAGE = "zh_CN"; // 默认语言信息
public static final String REQUEST_CHANNEL = "BK_CI_REQUEST_CHANNEL"; // 请求渠道
public static final String BK_CREATE = "bkCreate"; // 创建
public static final String BK_REVISE = "bkRevise"; // 修改
public static final String KEY_START_TIME = "startTime";
public static final String KEY_END_TIME = "endTime";
public static final String KEY_CHANNEL = "channel";
public static final String HIDDEN_SYMBOL = "******";
public static final String KEY_DEFAULT = "default";
public static final String KEY_INPUT = "vuex-input";
public static final String KEY_TEXTAREA = "vuex-textarea";
public static final String KEY_CODE_EDITOR = "atom-ace-editor";
public static final String KEY_OS = "os";
public static final String KEY_SUMMARY = "summary";
public static final String KEY_DOCSLINK = "docsLink";
public static final String KEY_DESCRIPTION = "description";
public static final String KEY_WEIGHT = "weight";
public static final String KEY_ALL = "all";
public static final String API_ACCESS_TOKEN_PROPERTY = "access_token";
public static final String TEMPLATE_ACROSS_INFO_ID = "devops_template_across_info_id";
public static final String KEY_OS_NAME = "osName";
public static final String KEY_OS_ARCH = "osArch";
public static final String KEY_INVALID_OS_INFO = "invalidOsInfo";
public static final String KEY_VALID_OS_NAME_FLAG = "validOsNameFlag";
public static final String KEY_VALID_OS_ARCH_FLAG = "validOsArchFlag";
public static final String KEY_SCRIPT = "script";
public static final String KEY_COMMIT_ID = "commitId";
public static final String KEY_BRANCH = "branch";
public static final String KEY_REPOSITORY_HASH_ID = "repositoryHashId";
public static final String KEY_REPOSITORY_PATH = "repositoryPath";
public static final String KEY_VERSION = "version";
public static final String KEY_VERSION_NAME = "versionName";
public static final String KEY_UPDATED_TIME = "updatedTime";
public static final String KEY_DEFAULT_LOCALE_LANGUAGE = "defaultLocaleLanguage";
public static final String BK_BUILD_ENV_START_FAILED = "BuildEnvStartFailed"; // 构建环境启动失败
public static final String BK_START_PULL_IMAGE = "StartPullImage"; // 开始拉取镜像镜像名称
public static final String BK_PULLING_IMAGE = "PullingImage"; // 正在拉取镜像,{0}进度{1}
public static final String BK_PUSH_IMAGE = "PushImage"; // 正在推送镜像,{0}进度{1}
public static final String BK_HUMAN_SERVICE = "HumanService"; // 人工服务
}

View File

@ -0,0 +1,222 @@
package cd.casic.pipeline.commons.constant;
/**
* @Classname CommonMessageCode
* @Description
* * 流水线微服务模块请求返回状态码
* * 返回码制定规则0代表成功为了兼容历史接口的成功状态都是返回0
* * 1返回码总长度为7位
* * 2前2位数字代表系统名称如21代表平台
* * 3第3位和第4位数字代表微服务模块00common-公共模块 01process-流水线 02artifactory-版本仓库 03:dispatch-分发 04dockerhost-docker机器
* * 05:environment-环境 06experience-版本体验 07image-镜像 08log-日志 09measure-度量 10monitoring-监控 11notify-通知
* * 12openapi-开放api接口 13plugin-插件 14quality-质量红线 15repository-代码库 16scm-软件配置管理 17support-支撑服务
* * 18ticket-证书凭据 19project-项目管理 20store-商店 21 auth-权限 22:sign-签名服务 23:metrics-度量服务 24external-外部
* * 25prebuild-预建 26: dispatcher-kubernetes 27buildless 28: lambda 29: stream 30: worker 31: dispatcher-docker
* * 32: remotedev
* * 4最后3位数字代表具体微服务模块下返回给客户端的业务逻辑含义如001代表系统服务繁忙建议一个模块一类的返回码按照一定的规则制定remotedev
* * 5系统公共的返回码写在CommonMessageCode这个类里面具体微服务模块的返回码写在相应模块的常量类里面
* @Date 2025/3/18 10:08
* @Created by mianbin
*/
public class CommonMessageCode {
public static final String MSG_CODE_ROLE_PREFIX = "MSG_CODE_ROLE_PREFIX_"; // 角色国际化前缀
public static final String MSG_CODE_PERMISSION_PREFIX = "MSG_CODE_PERMISSION_PREFIX_";// 操作权限国际化前缀
public static final String SUCCESS = "0"; // 成功
public static final Integer OAUTH_DENERD = 418; // 自定义状态码, 未进行oauth认证
public static final String SYSTEM_ERROR = "2100001"; // 系统内部繁忙请稍后再试
public static final String PARAMETER_IS_NULL = "2100002";// 参数{0}不能为空
public static final String PARAMETER_IS_EXIST = "2100003";// 参数值{0}已经存在系统请换一个再试
public static final String PARAMETER_IS_INVALID = "2100004";// 参数值{0}为非法数据
public static final String OAUTH_TOKEN_IS_INVALID = "2100005";// 无效的token请先oauth认证
public static final String PERMISSION_DENIED = "2100006";// 无权限{0}
public static final String ERROR_SERVICE_NO_FOUND = "2100007";// "找不到任何有效的{0}服务提供者"
public static final String ERROR_SERVICE_INVOKE_FAILURE = "2100008";// "服务调用失败:{0},uniqueId={1}"
public static final String ERROR_INVALID_CONFIG = "2100009";// "配置不可用:{0},uniqueId={1}"
public static final String ERROR_REST_EXCEPTION_COMMON_TIP = "2100010";// 接口访问出现异常请联系助手或稍后再重试
public static final String ERROR_CLIENT_REST_ERROR = "2100011";// 用户请求不合法参数或方法错误请咨询助手
public static final String ERROR_PROJECT_FEATURE_NOT_ACTIVED = "2100012";// 项目[{0}]未开通该功能
public static final String ERROR_INVALID_PARAM_ = "2100013";// 无效参数: {0}
public static final String ERROR_NEED_PARAM_ = "2100014";// 缺少参数: {0}
public static final String PARAMETER_VALIDATE_ERROR = "2100015";// {0}参数校验错误: {1}
public static final String ERROR_SERVICE_NO_AUTH = "2100016";// 无访问服务的权限
public static final String ERROR_QUERY_NUM_TOO_BIG = "2100017";// 查询的数量超过系统规定的值{0}请调整查询条件或咨询助手
public static final String ERROR_QUERY_TIME_RANGE_TOO_LARGE = "2100018";// 查询的时间范围跨度最大最长时间范围跨度不能超过{0}
public static final String ERROR_HTTP_RESPONSE_BODY_TOO_LARGE = "2100019";// http请求返回体太大
public static final String PERMISSION_DENIED_FOR_APP = "2100020";// APP的无权限{0}
public static final String ERROR_SENSITIVE_API_NO_AUTH = "2100021";// 无敏感API访问权限
public static final String PARAMETER_LENGTH_TOO_LONG = "2100022";// 参数长度不能超过{0}个字符
public static final String PARAMETER_LENGTH_TOO_SHORT = "2100023";// 参数长度不能小于{0}个字符
public static final String PARAMETER_ILLEGAL_ERROR = "2100024";// {0}参数非法错误: {1}
public static final String PARAMETER_EXPIRED_ERROR = "2100025";// {0}token过期错误: {1}
public static final String PARAMETER_SECRET_ERROR = "2100026";// {0}密钥配置错误: {1}
public static final String PARAMETER_IS_EMPTY = "2100027";// 参数不能为空
public static final String ERROR_QUERY_TIME_RANGE_ERROR = "2100028";// 查询的时间范围跨度错误
public static final String SERVICE_NOT_EXIST = "2100029";// 父服务不存在异常
public static final String ILLEGAL_GITCI_SERVICE_IMAGE_FORMAT = "2100030";// GITCI Service镜像格式非法
public static final String THIRD_PARTY_SERVICE_DEVCLOUD_EXCEPTION = "2100031";// 第三方服务-DEVCLOUD 异常请联系8006排查异常信息 -
public static final String CREATE_CONTAINER_INTERFACE_EXCEPTION = "2100032";// 创建容器接口异常
public static final String CREATE_CONTAINER_RETURNS_FAILED = "2100033";// 创建容器接口返回失败
public static final String CREATE_CONTAINER_TIMED_OUT = "2100034";// 创建容器接口超时
public static final String OPERATION_CONTAINER_INTERFACE_EXCEPTION = "2100035";// 操作容器接口异常
public static final String OPERATION_CONTAINER_RETURNED_FAILURE = "2100036";// 操作容器接口返回失败
public static final String OPERATION_CONTAINER_TIMED_OUT = "2100037";// 操作容器接口超时
public static final String GET_STATUS_INTERFACE_EXCEPTION = "2100038";// 获取容器状态接口异常
public static final String GET_STATUS_TIMED_OUT = "2100039";// 获取容器状态接口超时
public static final String CREATE_MIRROR_INTERFACE_EXCEPTION = "2100040";// 创建镜像接口异常
public static final String CREATE_MIRROR_INTERFACE_RETURNED_FAILURE = "2100041";// 创建镜像接口返回失败
public static final String CREATE_MIRROR_INTERFACE_EXCEPTION_NEW = "2100042";// 创建镜像新版本接口异常
public static final String NEW_MIRROR_INTERFACE_RETURNED_FAILURE = "2100043";// 创建镜像新版本接口返回失败
public static final String TASK_STATUS_INTERFACE_EXCEPTION = "2100044";// 获取TASK状态接口异常
public static final String TASK_STATUS_TIMED_OUT = "2100045";// 获取TASK状态接口超时
public static final String GET_WEBSOCKET_INTERFACE_EXCEPTION = "2100046";// 获取websocket接口异常
public static final String PARAMETER_CANNOT_EMPTY_ALL = "2100047";// 参数不能全部为空
public static final String USERS_EXCEEDS_THE_LIMIT = "2100048";// 授权用户数越界:{0}
public static final String FAILED_TO_QUERY_GSE_AGENT_STATUS = "2100049";// 查询 Gse Agent 状态失败
public static final String FAILED_TO_GET_AGENT_STATUS = "2100050";// 获取agent状态失败
public static final String FAILED_TO_GET_CMDB_NODE = "2100051";// 获取 CMDB 节点失败
public static final String FAILED_TO_GET_CMDB_LIST = "2100052";// 获取CMDB列表失败
public static final String STAGES_AND_STEPS_CANNOT_EXIST_BY_SIDE = "2100053";// stages和steps不能并列存在!
public static final String USER_NOT_PERMISSIONS_OPERATE_PIPELINE = "2100054";// 用户({0})无权限在工程({1}){2}流水线{3}
public static final String USER_NOT_HAVE_PROJECT_PERMISSIONS = "2100055";// 用户 {0}无项目{1}权限
public static final String UNABLE_GET_PIPELINE_JOB_STATUS = "2100056";// 无法获取流水线JOB状态构建停止
public static final String JOB_BUILD_STOPS = "2100057";// 流水线JOB已经不再运行构建停止
public static final String PIPELINE_NAME_OCCUPIED = "2100058";// 流水线名称已被他人使用
public static final String INTERNAL_DEPENDENCY_SERVICE_EXCEPTION = "2100059";// 内部依赖服务异常
public static final String PUBLIC_BUILD_RESOURCE_POOL_NOT_EXIST = "2100060";// 公共构建资源池不存在请检查yml配置.
public static final String ERROR_LANGUAGE_IS_NOT_SUPPORT = "2100061";// 该语言蓝盾目前不支持蓝盾目前支持的语言标识为{0}
public static final String INIT_SERVICE_LIST_ERROR = "2100062";// 初始化服务列表异常问题
public static final String FILE_NOT_EXIST = "2100063";// 文件{0}不存在
public static final String USER_ACCESS_CHECK_FAIL = "2100064";// Gitlab access token 不正确
public static final String GITLAB_TOKEN_EMPTY = "2100065";// GitLab Token为空
public static final String GITLAB_HOOK_URL_EMPTY = "2100066";// GitLab hook url为空
public static final String GITLAB_TOKEN_FAIL = "2100067";// GitLab Token不正确
public static final String GIT_TOKEN_FAIL = "2100068";// Git Token不正确
public static final String SERCRT_EMPTY = "2100069";// GIT 私钥为空
public static final String GIT_SERCRT_WRONG = "2100070";// Git 私钥不对
public static final String PWD_EMPTY = "2100071";// 用户密码为空
public static final String USER_NAME_EMPTY = "2100072";// 用户名为空
public static final String GITLAB_INVALID = "2100073";// 无效的GITLAB仓库
public static final String GIT_TOKEN_WRONG = "2100074";// Git Token 不正确
public static final String GIT_LOGIN_FAIL = "2100075";// Git 用户名或者密码不对
public static final String GIT_TOKEN_EMPTY = "2100076";// Git Token为空
public static final String GIT_HOOK_URL_EMPTY = "2100077";// Git hook url为空
public static final String TGIT_LOGIN_FAIL = "2100078";// TGit 用户名或者密码不对
public static final String TGIT_TOKEN_EMPTY = "2100079";// TGit Token 不正确
public static final String TGIT_SECRET_WRONG = "2100080";// TGit 私钥不对
public static final String SVN_SECRET_OR_PATH_ERROR = "2100081";// SVN 私钥不正确 或者 SVN 路径没有权限
public static final String SVN_CREATE_HOOK_FAIL = "2100082";// 添加SVN WEB hook 失败
public static final String LOCK_FAIL = "2100083";// lock失败
public static final String UNLOCK_FAIL = "2100084";// unlock失败
public static final String GIT_REPO_PEM_FAIL = "2100085";// 代码仓库访问未授权
public static final String CALL_REPO_ERROR = "2100086";// 代码仓库访问异常
public static final String P4_USERNAME_PASSWORD_FAIL = "2100087";// p4用户名密码错误
public static final String PARAM_ERROR = "2100088";// 参数错误
public static final String AUTH_FAIL = "2100089";// {0}认证失败
public static final String ACCOUNT_NO_OPERATION_PERMISSIONS = "2100090";// 账户没有{0}的权限
public static final String REPO_NOT_EXIST_OR_NO_OPERATION_PERMISSION = "2100091";// {0}仓库不存在或者是账户没有该项目{1}的权限
public static final String GIT_INTERFACE_NOT_EXIST = "2100092";// {0}平台没有{1}的接口
public static final String GIT_CANNOT_OPERATION = "2100093";// {0}平台{1}操作不能进行
public static final String WEBHOOK_LOCK_UNLOCK_FAIL = "2100094";// unlock webhooklock失败,请确认token是否已经配置
public static final String COMMIT_CHECK_ADD_FAIL = "2100095";// Commit Check添加失败请确保该代码库的凭据关联的用户对代码库有Developer权限
public static final String ADD_MR_COMMENTS_FAIL = "2100096";// 添加MR的评论失败请确保该代码库的凭据关联的用户对代码库有Developer权限
public static final String WEBHOOK_ADD_FAIL = "2100097";// Webhook添加失败请确保该代码库的凭据关联的用户对代码库有{0}权限
public static final String WEBHOOK_UPDATE_FAIL = "2100098";// Webhook更新失败请确保该代码库的凭据关联的用户对代码库有Developer权限
public static final String ENGINEERING_REPO_UNAUTHORIZED = "2100099";// 工程仓库访问未授权
public static final String ENGINEERING_REPO_NOT_EXIST = "2100100";// 工程仓库不存在
public static final String ENGINEERING_REPO_CALL_ERROR = "2100101";// 工程仓库访问异常
public static final String NOT_MEMBER_AND_NOT_OPEN_SOURCE = "2100102";// 非项目成员且项目为非开源项目
// 2100108
public static final String USER_NO_PIPELINE_PERMISSION = "2100108";// 流水线: 用户无{0}权限
public static final String SERVICE_COULD_NOT_BE_ANALYZED = "2100109";// 无法根据接口"{0}"分析所属的服务
public static final String RETURNED_RESULT_COULD_NOT_BE_PARSED = "2100110";// 内部服务返回结果无法解析 status:{0} body:{1}
public static final String SERVICE_PROVIDER_NOT_FOUND = "2100111";// 找不到任何有效的{0}{1}服务提供者
public static final String ILLEGAL_JOB_TYPE = "2100112";// 非法的job类型!
public static final String ERROR_YAML_FORMAT_EXCEPTION = "2100113";// {0} {1} 格式有误,应为 {2}, error message:{3}
public static final String ERROR_YAML_FORMAT_EXCEPTION_CHECK_STAGE_LABEL = "2100114";// 请核对Stage标签是否正确
public static final String ERROR_YAML_FORMAT_EXCEPTION_LENGTH_LIMIT_EXCEEDED = "2100115";// "{0} job.id 超过长度限制64 {1}}"
public static final String ERROR_YAML_FORMAT_EXCEPTION_NEED_PARAM = "2100116";// {0} 中的step必须包含uses或run或checkout!
public static final String ERROR_YAML_FORMAT_EXCEPTION_SERVICE_IMAGE_FORMAT_ILLEGAL = "2100117";// STREAM Service镜像格式非法
public static final String ERROR_YAML_FORMAT_EXCEPTION_STEP_ID_UNIQUENESS = "2100118";// 请确保step.id唯一性!({0})
public static final String BUILD_RESOURCE_NOT_EXIST = "2100119";// {0}构建资源不存在请检查yml配置.
public static final String ERROR_YAML_FORMAT_EXCEPTION_ENV_QUANTITY_LIMIT_EXCEEDED = "2100120";// {0}配置Env数量超过100限制!
// {0}Env单变量{1}长度超过{2}字符!({3})
public static final String ERROR_YAML_FORMAT_EXCEPTION_ENV_VARIABLE_LENGTH_LIMIT_EXCEEDED = "2100121";
public static final String BK_CONTAINER_TIMED_OUT = "bkContainerTimedOut";// 创建容器超时
public static final String BK_CREATION_FAILED_EXCEPTION_INFORMATION = "bkCreationFailedExceptionInformation";// 创建失败异常信息
public static final String BK_FILE_NAME = "bkFileName";// 文件名
public static final String BK_BELONG_TO_THE_PROJECT = "bkBelongToTheProject";// 所属项目
public static final String BK_OPERATING = "bkOperating";// 操作
public static final String BK_PUSH_FROM_BLUE_SHIELD_DEVOPS_PLATFORM = "bkPushFromBlueShieldDevopsPlatform";// 来自蓝盾DevOps平台的推送
public static final String BK_TABLE_CONTENTS = "bkTableContents";// 表格内容
public static final String BK_PLEASE_FEEL_TO_CONTACT_BLUE_SHIELD_ASSISTANT = "bkPleaseFeelToContactBlueShieldAssistant";
// 如有任何问题可随时联系蓝盾助手
public static final String BK_ETH1_NETWORK_CARD_IP_EMPTY = "bkEth1NetworkCardIpEmpty";// eth1 网卡Ip为空因此获取eth0的网卡ip
public static final String BK_LOOPBACK_ADDRESS_OR_NIC_EMPTY = "bkLoopbackAddressOrNicEmpty";// loopback地址或网卡名称为空
public static final String BK_FAILED_GET_NETWORK_CARD = "bkFailedGetNetworkCard";// 获取网卡失败
public static final String BK_MANUAL_TRIGGER = "bkManualTrigger";// 手动触发
public static final String BK_BUILD_TRIGGER = "bkBuildTrigger";// 构建触发
public static final String BK_VIEW_DETAILS = "bkSeeDetails";// 查看详情
public static final String BK_PROJECT_ID = "bkProjectId";// # 项目ID:
public static final String BK_PIPELINE_NAME = "bkPipelineName";// # 流水线名称:
public static final String BK_CREATE_SERVICE = "bkCreateService";// 创建{0}服务
public static final String BK_SESSION_ID = "bkSessionId";// 会话ID
public static final String BK_GROUP_ID = "bkGroupId";// 群ID
public static final String BK_THIS_GROUP_ID = "bkThisGroupId";// 本群ID={0}PS:群ID可用于蓝盾平台上任意企业微信群通知
public static final String BK_MISSING_RESOURCE_DEPENDENCY = "bkMissingResourceDependency";// 依赖的资源不存在
public static final String BK_REQUEST_TIMED_OUT = "bkRequestTimedOut";// 请求超时
public static final String BK_QUERY_PARAM_REQUEST_ERROR = "bkQueryParamRequestError";// 查询参数请求错误
public static final String BK_JSON_BAD_PARAMETERS = "bkJsonBadParameters";// JSON参数错误/Bad Parameters in json
// 请求体内容参数错误温馨提示请确认{0}是否符合要求
public static final String BK_REQUEST_BODY_CONTENT_PARAMETER_INCORRECT = "bkRequestBodyContentParameterIncorrect";
public static final String BK_REQUESTED_RESOURCE_DOES_NOT_EXIST = "bkRequestedResourceDoesNotExist";// 请求的资源不存在
public static final String BK_NOT_OAUTH_CERTIFICATION = "bkNotOauthCertification";// 你没有Oauth认证
public static final String BK_QUERY_PARAM_REQUEST_EMPTY = "bkQueryParamRequestEmpty";// 请求的参数内容为空
public static final String BK_QUERY_PARAM_TYPE_ERROR = "bkQueryParamTypeError";// 查询参数类型错误
// 你没有权限进行该操作
public static final String BK_NOT_HAVE_PERMISSION_PERFORM_THIS_OPERATION = "bkNotHavePermissionPerformThisOperation";
// 访问后台数据失败已通知产品开发请稍后重试
public static final String BK_FAILED_ACCESS_BACKGROUND_DATA = "bkFailedAccessBackgroundData";
// 未授权访问的资源
public static final String BK_RESOURCES_THAT_NOT_AUTHORIZED_ACCESS = "bkResourcesThatNotAuthorizedAccess";
public static final String BK_CODE_BASE_TRIGGERING = "bkCodeBaseTriggering";// 代码库触发
public static final String BK_FAILED_START_BUILD_MACHINE = "bkFailedStartBuildMachine";// 启动构建机失败
public static final String CREATE_BRANCH = "bkCreateBranch";// 创建分支
public static final String DELETE_BRANCH = "bkDeleteBranch";// 删除分支
public static final String GET_PROJECT_INFO = "bkGetProjectInfo";// 获取项目详情
public static final String OPERATION_BRANCH = "bkOperationBranch";// 拉分支
public static final String OPERATION_TAG = "bkOperationTag";// 拉标签
public static final String OPERATION_ADD_WEBHOOK = "bkOperationAddWebhook";// 添加WEBHOOK
public static final String OPERATION_UPDATE_WEBHOOK = "bkOperationUpdateWebhook";// 修改WEBHOOK
public static final String OPERATION_LIST_WEBHOOK = "bkOperationListWebhook";// 查询WEBHOOK
public static final String OPERATION_ADD_COMMIT_CHECK = "bkOperationAddCommitCheck";// 添加COMMIT CHECK
public static final String OPERATION_ADD_MR_COMMENT = "bkOperationAddMrComment";// 添加MR COMMENT
public static final String OPERATION_COMMIT = "bkOperationCommit";// 拉提交记录
public static final String OPERATION_COMMIT_DIFF = "bkOperationCommitDiff";// 查询commit变化
public static final String OPERATION_UNLOCK_HOOK_LOCK = "bkOperationUnlockHookLock";// 解锁hook锁
public static final String OPERATION_MR_CHANGE = "bkOperationMrChange";// 查询合并请求的代码变更
public static final String OPERATION_MR_INFO = "bkOperationMrInfo";// 查询项目合并请求
public static final String OPERATION_GET_CHANGE_FILE_LIST = "bkOperationGetChangeFileList";// 查询变更文件列表
public static final String OPERATION_GET_MR_COMMIT_LIST = "bkOperationGetMrCommitList";// 获取合并请求中的提交
public static final String OPERATION_PROJECT_USER_INFO = "bkOperationProjectUserInfo";// 获取项目中成员信息
public static final String OPERATION_TAPD_WORKITEMS = "bkOperationTapdWorkItems";// 查看绑定的TAPD单
public static final String BK_USER_GROUP_CRATE_TIME = "bkUserGroupCrateTime";// {0} 用户组:{1},{2} 创建于
public static final String BK_USER_RATING_ADMIN_CRATE_TIME = "bkUserRatingAdminCrateTime";// {0} 分级管理员,{1} 创建于
public static final String BK_SECOND_LEVEL_ADMIN_CREATE = "bkSecondLevelAdminCreate";// {0} 二级管理员, {1} 创建于
public static final String BK_SECOND_LEVEL_ADMIN_REVISE = "bkSecondLevelAdminRevise";// {0} 二级管理员, {1} 修改于
// 用户 {0} 申请{1}蓝盾项目 {2} ,请审批
public static final String BK_USER_REQUESTS_THE_PROJECT = "bkUserRequestsTheProject";
public static final String BK_ENV_NOT_YET_SUPPORTED = "bkEnvNotYetSupported";// 尚未支持 {0} {1}请联系 管理员 添加对应版本
public static final String BK_BUILD_ENV_TYPE = "BUILD_ENV_TYPE_";// 构建环境-
public static final String BK_BUILD_ENV_TYPE_BUILDLESS = "BUILD_ENV_TYPE_BUILDLESS";// 无编译环境
public static final String BK_BUILD_ENV_TYPE_BUILD_TRIGGERS = "BUILD_ENV_TYPE_BUILD_TRIGGER";// 构建触发
}

View File

@ -0,0 +1,64 @@
package cd.casic.pipeline.commons.constant;
/**
* @Classname LeafAllocConstant
* @Description 流水线的枚举
* @Date 2025/3/18 10:16
* @author mianbin
*/
public class LeafAllocConstant {
/** =========================================流水线====================================================== */
public static final String AUDIT_RESOURCE = "AUDIT_RESOURCE";
public static final String PIPELINE_RESOURCE = "PIPELINE_RESOURCE";
public static final String PIPELINE_VERSION_SIMPLE_RESOURCE = "PIPELINE_VERSION_SIMPLE_RESOURCE";
public static final String PIPELINE_SETTING_RESOURCE = "PIPELINE_SETTING_RESOURCE";
public static final String PIPELINE_VERSION_SETTING_RESOURCE = "PIPELINE_VERSION_SETTING_RESOURCE";
public static final String PIPELINE_LABEL_PIPELINE_RESOURCE = "PIPELINE_LABEL_PIPELINE_RESOURCE";
public static final String TEMPLATE_PIPELINE_RESOURCE = "TEMPLATE_PIPELINE_RESOURCE";
public static final String PIPELINE_BUILD_SUMMARY = "PIPELINE_BUILD_SUMMARY";
public static final String PIPELINE_BUILD_HISTORY = "PIPELINE_BUILD_HISTORY";
public static final String PIPELINE_BUILD_TASK = "PIPELINE_BUILD_TASK";
public static final String PIPELINE_BUILD_CONTAINER = "PIPELINE_BUILD_CONTAINER";
public static final String PIPELINE_BUILD_STAGE = "PIPELINE_BUILD_STAGE";
public static final String PIPELINE_BUILD_RECORD_CONTAINER = "PIPELINE_BUILD_RECORD_CONTAINER";
public static final String PIPELINE_BUILD_RECORD_MODEL = "PIPELINE_BUILD_RECORD_MODEL";
public static final String PIPELINE_BUILD_RECORD_STAGE = "PIPELINE_BUILD_RECORD_STAGE";
public static final String PIPELINE_BUILD_RECORD_TASK = "PIPELINE_BUILD_RECORD_TASK";
public static final String PIPELINE_BUILD_DETAIL = "PIPELINE_BUILD_DETAIL";
public static final String PIPELINE_LABEL_PIPELINE = "PIPELINE_LABEL_PIPELINE";
public static final String STAGE_TAG = "STAGE_TAG";
public static final String PIPELINE_JOB_MUTEX_GROUP_RESOURCE = "PIPELINE_JOB_MUTEX_GROUP_RESOURCE";
public static final String MODEL_TASK = "PIPELINE_MODEL_TASK";
public static final String PIPELINE_TRIGGER_REVIEW = "PIPELINE_TRIGGER_REVIEW";
public static final String PIPELINE_BUILD_VAR = "PIPELINE_BUILD_VAR";
/** =========================================项目====================================================== */
public static final String PROJECT_RESOURCE = "PROJECT_RESOURCE";
/** ========================================日志===================================================== */
public static final String LOG_STATUS = "LOG_STATUS";
public static final String LOG_SUBTAGS = "LOG_SUBTAGS";
public static final String LOG_INDICES_V2 = "LOG_INDICES_V2";
}

View File

@ -0,0 +1,70 @@
package cd.casic.pipeline.commons.constant;
import lombok.NoArgsConstructor;
/**
* @author by mianbin
* @Classname OpsHeader
* @Description 重要莫动
* @Date 2025/3/19 14:49
*/
@NoArgsConstructor
public final class OpsHeader {
public static final String AUTH_HEADER_USER_ID = "X-DEVOPS-UID";
public static final String AUTH_HEADER_USER_ID_DEFAULT_VALUE = "admin";
public static final String AUTH_HEADER_BUILD_ID = "X-DEVOPS-BUILD-ID";
public static final String AUTH_HEADER_VM_SEQ_ID = "X-DEVOPS-VM-SID";
public static final String AUTH_HEADER_VM_NAME = "X-DEVOPS-VM-NAME";
public static final String AUTH_HEADER_PROJECT_ID = "X-DEVOPS-PROJECT-ID";
public static final String AUTH_HEADER_AGENT_SECRET_KEY = "X-DEVOPS-AGENT-SECRET-KEY";
public static final String AUTH_HEADER_AGENT_ID = "X-DEVOPS-AGENT-ID";
public static final String AUTH_HEADER_PIPELINE_ID = "X-DEVOPS-PIPELINE-ID";
public static final String AUTH_HEADER_REGION = "X-DEVOPS-REGION";
public static final String AUTH_HEADER_DEVOPS_APP_CODE = "X-DEVOPS-APP-CODE";
public static final String AUTH_HEADER_DEVOPS_APP_SECRET = "X-DEVOPS-APP-SECRET";
public static final String AUTH_HEADER_DEVOPS_BUILD_TYPE = "X-DEVOPS-BUILD-TYPE";
public static final String AUTH_HEADER_DEVOPS_USER_ID = AUTH_HEADER_USER_ID;
public static final String AUTH_HEADER_DEVOPS_USER_ID_DEFAULT_StringUE = "admin";
public static final String AUTH_HEADER_DEVOPS_APP_CODE_DEFAULT_StringUE = "opsci";
public static final String AUTH_HEADER_DEVOPS_BG_ID = "X-DEVOPS-BG-ID";
public static final String AUTH_HEADER_DEVOPS_DEPT_ID = "X-DEVOPS-DEPT-ID";
public static final String AUTH_HEADER_DEVOPS_CENTER_ID = "X-DEVOPS-CENTER-ID";
public static final String AUTH_HEADER_DEVOPS_ORGANIZATION_TYPE = "X-DEVOPS-ORGANIZATION-TYPE";
public static final String AUTH_HEADER_DEVOPS_ORGANIZATION_TYPE_BG = "BG";
public static final String AUTH_HEADER_DEVOPS_ORGANIZATION_TYPE_DEPARTMENT = "DEPARTMENT";
public static final String AUTH_HEADER_DEVOPS_ORGANIZATION_TYPE_CENTER = "CENTER";
public static final String AUTH_HEADER_DEVOPS_ORGANIZATION_ID = "X-DEVOPS-ORGANIZATION-ID";
public static final String AUTH_HEADER_DEVOPS_ORGANIZATION_NAME = "X-DEVOPS-ORGANIZATION-NAME";
public static final String AUTH_HEADER_DEVOPS_PROJECT_ID = "X-DEVOPS-PROJECT-ID";
public static final String AUTH_HEADER_DEVOPS_PIPELINE_ID = "X-DEVOPS-PIPELINE-ID";
public static final String AUTH_HEADER_DEVOPS_BUILD_ID = "X-DEVOPS-BUILD-ID";
public static final String AUTH_HEADER_DEVOPS_VM_SEQ_ID = "X-DEVOPS-VM-SID";
public static final String AUTH_HEADER_DEVOPS_VM_NAME = "X-DEVOPS-VM-NAME";
public static final String AUTH_HEADER_DEVOPS_REAL_IP = "X-DEVOPS-REAL-IP";
public static final String AUTH_HEADER_DEVOPS_AGENT_ID = "X-DEVOPS-AGENT-ID";
public static final String AUTH_HEADER_DEVOPS_AGENT_SECRET_KEY = "X-DEVOPS-AGENT-SECRET-KEY";
public static final String AUTH_HEADER_DEVOPS_BK_TOKEN = "X-DEVOPS-BK-TOKEN";
public static final String AUTH_HEADER_DEVOPS_ACCESS_TOKEN = "X-DEVOPS-ACCESS-TOKEN";
public static final String AUTH_HEADER_DEVOPS_BK_TICKET = "X-DEVOPS-BK-TOKEN";
public static final String AUTH_HEADER_DEVOPS_USER_CHINESE_NAME = "X-DEVOPS-CHINESE-NAME";
public static final String AUTH_HEADER_DEVOPS_USER_PAAS_ID = "X-DEVOPS-PAAS-USER-ID";
public static final String AUTH_HEADER_DEVOPS_ORIGINAL_HOST = "X-DEVOPS-ORIGINAL-HOST";
public static final String AUTH_HEADER_DEVOPS_JWT_TOKEN = "X-DEVOPS-JWT-TOKEN";
public static final String AUTH_HEADER_IAM_TOKEN = "Authorization";
public static final String AUTH_HEADER_DEVOPS_SIGN_INFO = "X-DEVOPS-SIGN-INFO";
public static final String AUTH_HEADER_PLATFORM = "X-DEVOPS-PLATFORM";
public static final String AUTH_HEADER_APP_VERSION = "X-DEVOPS-APP-VERSION";
public static final String AUTH_HEADER_GATEWAY_TAG = "X-GATEWAY-TAG";
public static final String AUTH_HEADER_DEVOPS_CI_TASK_ID = "X-DEVOPS-CI-TASK-ID";
public static final String SIGN_HEADER_TIMESTAMP = "X-DEVOPS-TIMESTAMP";
public static final String SIGN_HEADER_NONCE = "X-DEVOPS-NONCE";
public static final String SING_HEADER_SIGNATURE = "X-DEVOPS-SIGNATURE";
public static final String AUTH_HEADER_GITHUB_TOKEN = "X-GITHUB-TOKEN";
public static final String AUTH_HEADER_GIT_TYPE = "X-DEVOPS-STREAM-GIT-TYPE";
public static final String AUTH_HEADER_BK_CI_LOGIN_TOKEN = "X-DEVOPS-CI-LOGIN-TOKEN";
public static final String AUTH_HEADER_DEVOPS_SERVICE_NAME = "X-DEVOPS-SERVICE-NAME";
public static final String AUTH_HEADER_CODECC_OPENAPI_TOKEN = "X-CODECC-OPENAPI-TOKEN";
}

View File

@ -0,0 +1,38 @@
package cd.casic.pipeline.commons.enums;
/**
* @Classname StyleEnum
* @Description ops类型枚举
* @Date 2025/3/18 10:26
* @author mianbin
*/
public enum BkStyleEnum {
COMMON_STYLE("^(.|\\r|\\n)*$"),
NUMBER_STYLE("[0-9]*$"),
CODE_STYLE("^[a-zA-Z_][\\w-()]{0,31}$"),
ID_STYLE("^[\\w-]{1,64}$"),
NAME_STYLE("^[\\w-\\u4E00-\\u9FBB\\u3400-\\u4DBF\\uF900-\\uFAD9\\u3000-\\u303F\\u2000-\\u206F\\uFF00-\\uFFEF.()\\s]{1,40}$"),
STORE_MEMBER_TYPE_STYLE("^ADMIN|DEVELOPER$"),
EMAIL_STYLE("^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$"),
AUTH_STYLE("^HTTP|HTTPS|OAUTH|SSH$"),
NOTE_STYLE("^[A-Za-z0-9\\u4E00-\\u9FBB\\u3400-\\u4DBF\\uF900-\\uFAD9\\u3000-\\u303F" +
"\\u2000-\\u206F\\uFF00-\\uFFEF.。?!,(),、;;:'‘’“”\"\\s]{1,256}$"),
VISIBILITY_LEVEL_STYLE("^PRIVATE|LOGIN_PUBLIC$"),
LANGUAGE_STYLE("^java|python|nodejs|kotilin|golang|c|c++|php|c#$"),
BOOLEAN_STYLE("^true|false$"),
SCOPE_STYLE("^TEST|PRD|ALL$"),
SERVICE_CODE_STYLE("^[a-z][([-a-z-0-9]*[a-z-0-9])?]{0,31}$"),
BUILD_NUM_RULE_STYLE("^[\\w-{}() +?.:$\"]{1,256}$"),
STORE_FIELD_TYPE_STYLE("^BACKEND|FRONTEND|ALL$"),
PAGE_SIZE_STYLE("^100$|^([1-9]|[1-9]\\d)$");
private final String style;
BkStyleEnum(String style) {
this.style = style;
}
public String getStyle() {
return style;
}
}

View File

@ -0,0 +1,38 @@
package cd.casic.pipeline.commons.enums;
import cd.casic.framework.commons.core.IntArrayValuable;
import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.Arrays;
/**
* @Classname CommonStatusEnum
* @Description
* @Date 2025/3/18 11:26
* @author mianbin
*/
@Getter
@AllArgsConstructor
public enum CommonStatusEnum implements IntArrayValuable {
ENABLE(0, "开启"),
DISABLE(1, "关闭");
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CommonStatusEnum::getStatus).toArray();
/**
* 状态值
*/
private final Integer status;
/**
* 状态名
*/
private final String name;
@Override
public int[] array() {
return ARRAYS;
}
}

View File

@ -0,0 +1,46 @@
package cd.casic.pipeline.commons.enums;
import cd.casic.framework.commons.core.IntArrayValuable;
import cn.hutool.core.util.ArrayUtil;
import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.Arrays;
/**
* @Classname DateIntervalEnum
* @Description 时间间隔的枚举
* @Date 2025/3/18 11:26
* @author mianbin
*/
@Getter
@AllArgsConstructor
public enum DateIntervalEnum implements IntArrayValuable {
DAY(1, ""),
WEEK(2, ""),
MONTH(3, ""),
QUARTER(4, "季度"),
YEAR(5, "")
;
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(DateIntervalEnum::getInterval).toArray();
/**
* 类型
*/
private final Integer interval;
/**
* 名称
*/
private final String name;
@Override
public int[] array() {
return ARRAYS;
}
public static DateIntervalEnum valueOf(Integer interval) {
return ArrayUtil.firstMatch(item -> item.getInterval().equals(interval), DateIntervalEnum.values());
}
}

View File

@ -0,0 +1,27 @@
package cd.casic.pipeline.commons.enums;
/**
* @Classname SubjectScopeType
* @Description 最大授权范围类型这里先这样后面要扩展
* @Date 2025/3/18 11:26
* @author mianbin
*/
public enum SubjectScopeType {
//中心
ORGANIZATION("organization"),
// 部门事业部产线
DEPARTMENT("depart"),
// 用户
USER("user");
private final String value;
SubjectScopeType(String value) {
this.value = value;
}
public String getValue() {
return value;
}
}

View File

@ -0,0 +1,62 @@
package cd.casic.pipeline.commons.enums;
/**
* @author mianbin
* @Classname SystemModuleEnum
* @Description 最大授权范围类型这里先这样后面要扩展
* @Date 2025/3/18 11:26
*/
public enum SystemModuleEnum {
COMMON("00"), // 公共模块
PROCESS("01"), // 流水线
ARTIFACTORY("02"), // 版本仓库
DISPATCH("03"), // 公共模块
DOCKERHOST("04"), // DOCKER机器
ENVIRONMENT("05"), // 环境
EXPERIENCE("06"), // 版本体验
IMAGE("07"), // 镜像
LOG("08"), // 日志
MEASURE("09"), // 度量
MONITORING("10"), // 监控
NOTIFY("11"), // 通知
OPENAPI("12"), // 开放平台API
PLUGIN("13"), // 插件
QUALITY("14"), // 质量红线
REPOSITORY("15"), // 代码库
SCM("16"), // 软件配置管理
SUPPORT("17"), // 支撑服务
TICKET("18"), // 证书凭据
PROJECT("19"), // 项目管理
STORE("20"), // 商店
AUTH("21"), // 权限
SIGN("22"), // 签名服务
METRICS("23"), // 度量服务
EXTERNAL("24"), // 外部扩展
PREBUILD("25"), // 预构建
DISPATCH_KUBERNETES("26"), // k8s分发服务
BUILDLESS("27"), // buildless服务
LAMBDA("28"), // lambda服务
STREAM("29"), // stream服务
WORKER("30"), // 度量服务
DISPATCH_DOCKER("31"), // docker分发服务
REMOTEDEV("32"); // 远程开发服务
private final String code;
SystemModuleEnum(String code) {
this.code = code;
}
public String getCode() {
return code;
}
public static String getSystemModule(String code) {
for (SystemModuleEnum value : values()) {
if (value.getCode().equals(code)) {
return value.name();
}
}
return COMMON.name();
}
}

View File

@ -0,0 +1,41 @@
package cd.casic.pipeline.commons.enums;
import cd.casic.framework.commons.core.IntArrayValuable;
import cn.hutool.core.util.ArrayUtil;
import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.Arrays;
/**
* @Classname UserTypeEnum
* @Description 全局用户类型枚举
* @Date 2025/3/18 10:16
* @author mianbin
*/
@AllArgsConstructor
@Getter
public enum UserTypeEnum implements IntArrayValuable {
MEMBER(1, "普通用户"),
ADMIN(2, "管理员");
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(UserTypeEnum::getValue).toArray();
/**
* 类型
*/
private final Integer value;
/**
* 类型名
*/
private final String name;
public static UserTypeEnum valueOf(Integer value) {
return ArrayUtil.firstMatch(userType -> userType.getValue().equals(value), UserTypeEnum.values());
}
@Override
public int[] array() {
return ARRAYS;
}
}

View File

@ -0,0 +1,23 @@
package cd.casic.pipeline.commons.functions;
import lombok.SneakyThrows;
/**
* 前置条件校验工具类
*/
public class Preconditions {
public static void checkNotNull(Object obj, Exception exception) throws Exception {
if (obj == null){
throw exception;
}
}
@SneakyThrows
public static void checkTrue(Boolean condition, Exception exception){
if (!condition){
throw exception;
}
}
}

View File

@ -0,0 +1,15 @@
package cd.casic.pipeline.commons.operationid;
import cd.casic.framework.mybatis.core.mapper.BaseMapperX;
import cd.casic.pipeline.commons.operationid.entity.LeafAlloc;
import org.apache.ibatis.annotations.Mapper;
/**
* @author by mianbin
* @Classname LeafAllocMapper
* @Description TODO
* @Date 2025/3/19 10:41
*/
@Mapper
public interface LeafAllocMapper extends BaseMapperX<LeafAlloc> {
}

View File

@ -0,0 +1,29 @@
package cd.casic.pipeline.commons.operationid;
import cd.casic.framework.mybatis.core.mapper.BaseMapperX;
import cd.casic.pipeline.commons.operationid.entity.LeafAlloc;
import java.util.List;
/**
* @author by mianbin
* @Classname LeafAllocService
* @Description TODO
* @Date 2025/3/19 10:41
*/
public interface LeafAllocService {
List<LeafAlloc> getAllLeafAllocs();
LeafAlloc updateMaxIdAndGetLeafAlloc(String key);
LeafAlloc updateMaxIdByCustomStepAndGetLeafAlloc(LeafAlloc leafAlloc);
List<String> getAllKeys();
boolean create(LeafAlloc leafAlloc);
boolean update(LeafAlloc leafAlloc);
boolean batchCreate(List<LeafAlloc> leafAllocs);
}

View File

@ -0,0 +1,82 @@
package cd.casic.pipeline.commons.operationid;
import cd.casic.framework.commons.exception.ServiceException;
import cd.casic.framework.commons.exception.enums.GlobalErrorCodeConstants;
import cd.casic.framework.commons.util.date.DateUtils;
import cd.casic.framework.mybatis.core.query.LambdaQueryWrapperX;
import cd.casic.pipeline.commons.operationid.entity.LeafAlloc;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
/**
* @author by mianbin
* @Classname LeafAllocServiceImpl
* @Description TODO
* @Date 2025/3/19 10:41
*/
@Slf4j
@Service
public class LeafAllocServiceImpl implements LeafAllocService {
@Resource
private LeafAllocMapper leafAllocMapper;
@Override
public List<LeafAlloc> getAllLeafAllocs() {
List<LeafAlloc> leafAllocs = leafAllocMapper.selectList();
return CollUtil.emptyIfNull(leafAllocs);
}
@Override
public LeafAlloc updateMaxIdAndGetLeafAlloc(String key) {
LeafAlloc leafAlloc = leafAllocMapper.selectOne(LeafAlloc::getKey, key);
leafAlloc.setMaxId(leafAlloc.getMaxId() + leafAlloc.getStep());
return leafAllocMapper.updateById(leafAlloc) > 0 ? leafAlloc : null;
}
@Override
public LeafAlloc updateMaxIdByCustomStepAndGetLeafAlloc(LeafAlloc condition) {
LambdaQueryWrapper<LeafAlloc> wrapper = Wrappers.<LeafAlloc>lambdaQuery().eq(LeafAlloc::getKey, condition.getKey());
condition.setMaxId(condition.getMaxId() + condition.getStep());
return leafAllocMapper.updateById(condition) > 0 ? condition : null;
}
@Override
public List<String> getAllKeys() {
return leafAllocMapper.selectList().stream().map(LeafAlloc::getKey).collect(Collectors.toList());
}
@Override
public boolean create(LeafAlloc leafAlloc) {
LeafAlloc one = leafAllocMapper.selectOne(LeafAlloc::getKey, leafAlloc.getKey());
if (one != null) {
throw new ServiceException(GlobalErrorCodeConstants.ID_DUPLICATION);
}
return leafAllocMapper.insert(leafAlloc) > 0 ? true : false;
}
@Override
public boolean update(LeafAlloc leafAlloc) {
LeafAlloc one = leafAllocMapper.selectOne(LeafAlloc::getKey, leafAlloc.getKey(), LeafAlloc::getId, leafAlloc.getId());
if (one != null) {
throw new ServiceException(GlobalErrorCodeConstants.ID_DUPLICATION);
}
one.setUpdateTime(DateUtil.toLocalDateTime(new Date()));
return leafAllocMapper.updateById(one) > 0 ? true : false;
}
@Override
public boolean batchCreate(List<LeafAlloc> leafAllocs) {
return leafAllocMapper.insertBatch(leafAllocs);
}
}

View File

@ -0,0 +1,304 @@
package cd.casic.pipeline.commons.operationid;
import cd.casic.framework.commons.exception.ErrorCode;
import cd.casic.framework.commons.exception.ServiceException;
import cd.casic.framework.commons.exception.enums.GlobalErrorCodeConstants;
import cd.casic.framework.commons.util.generator.IdGenerator;
import cd.casic.pipeline.commons.constant.LeafAllocConstant;
import cd.casic.pipeline.commons.operationid.entity.LeafAlloc;
import cd.casic.pipeline.commons.operationid.entity.Segment;
import cd.casic.pipeline.commons.operationid.entity.SegmentBuffer;
import lombok.extern.slf4j.Slf4j;
import java.lang.reflect.Field;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
/**
* @author by mianbin
* @Classname SegmentIdGeneratorImpl
* @Description TODO
* @Date 2025/3/19 10:41
*/
@Slf4j
public class SegmentIdGeneratorImpl implements IdGenerator {
/**
* IDCache未初始化成功时的异常码
*/
private static final long EXCEPTION_ID_IDCACHE_INIT_FALSE = -1;
/**
* key不存在时的异常码
*/
private static final long EXCEPTION_ID_KEY_NOT_EXISTS = -2;
/**
* SegmentBuffer中的两个Segment均未从DB中装载时的异常码
*/
private static final long EXCEPTION_ID_TWO_SEGMENTS_ARE_NULL = -3;
/**
* 最大步长不超过100,0000
*/
private static final int MAX_STEP = 1000000;
/**
* 一个Segment维持时间为15分钟
*/
private static final long SEGMENT_DURATION = 15 * 60 * 1000L;
private volatile boolean initOK = false;
private final Map<String, SegmentBuffer> cache = new ConcurrentHashMap<>();
private LeafAllocService leafAllocService;
private ThreadPoolExecutor threadPoolExecutor;
private ScheduledExecutorService scheduledExecutorService;
public SegmentIdGeneratorImpl(LeafAllocService leafAllocService, ThreadPoolExecutor threadPoolExecutor,
ScheduledExecutorService scheduledExecutorService) {
this.leafAllocService = leafAllocService;
this.threadPoolExecutor = threadPoolExecutor;
this.scheduledExecutorService = scheduledExecutorService;
}
@Override
public boolean init() {
log.info("Init ...");
// 确保加载到kv后才初始化成功
updateCacheFromDb();
initSave();
initOK = true;
updateCacheFromDbAtEveryMinute();
return initOK;
}
private void initSave() {
try {
Class<LeafAllocConstant> clazz = LeafAllocConstant.class;
Field[] fields = clazz.getFields();
List<LeafAlloc> notExist = new ArrayList<>();
for (Field field : fields) {
String str = (String) field.get(null);
if (!cache.containsKey(str)) {
LeafAlloc leafAlloc = new LeafAlloc();
leafAlloc.setKey(str);
leafAlloc.setMaxId(1L);
leafAlloc.setStep(50);
notExist.add(leafAlloc);
}
}
if (!notExist.isEmpty()) {
leafAllocService.batchCreate(notExist);
}
} catch (IllegalAccessException e) {
e.printStackTrace();
log.error(e.getMessage());
}
}
@Override
public List<Long> batchGenerateSegmentId(String key, Integer num) {
List<Long> res = new ArrayList<>();
while (num-- > 0) {
res.add(get(key));
}
return res;
}
private void updateCacheFromDbAtEveryMinute() {
scheduledExecutorService.scheduleWithFixedDelay(this::updateCacheFromDb, 60, 60, TimeUnit.SECONDS);
}
private void updateCacheFromDb() {
log.info("update cache from db");
try {
List<String> dbTags = leafAllocService.getAllKeys();
if (dbTags == null || dbTags.isEmpty()) {
return;
}
List<String> cacheTags = new ArrayList<>(cache.keySet());
Set<String> insertTagsSet = new HashSet<>(dbTags);
Set<String> removeTagsSet = new HashSet<>(cacheTags);
//db中新加的tags灌进cache
for (String tmp : cacheTags) {
insertTagsSet.remove(tmp);
}
for (String tag : insertTagsSet) {
SegmentBuffer buffer = new SegmentBuffer();
buffer.setKey(tag);
Segment segment = buffer.getCurrent();
segment.setValue(new AtomicLong(0));
segment.setMax(0);
segment.setStep(0);
cache.put(tag, buffer);
log.info("Add tag {} from db to IdCache, SegmentBuffer {}", tag, buffer);
}
//cache中已失效的tags从cache删除
for (String tmp : dbTags) {
removeTagsSet.remove(tmp);
}
for (String tag : removeTagsSet) {
cache.remove(tag);
log.info("Remove tag {} from IdCache", tag);
}
} catch (Exception e) {
log.warn("update cache from db exception", e);
}
}
@Override
public Long get(final String key) {
if (!initOK) {
throw new ServiceException(ErrorCode.builder().msg("IDCache未初始化成功").code(0).build());
}
if (cache.containsKey(key)) {
SegmentBuffer buffer = cache.get(key);
if (!buffer.isInitOk()) {
synchronized (buffer) {
if (!buffer.isInitOk()) {
try {
updateSegmentFromDb(key, buffer.getCurrent());
log.info("Init buffer. Update leafkey {} {} from db", key, buffer.getCurrent());
buffer.setInitOk(true);
} catch (Exception e) {
log.warn("Init buffer {} exception", buffer.getCurrent(), e);
}
}
}
}
return getIdFromSegmentBuffer(cache.get(key));
}
log.warn("key({})不存在", key);
throw new ServiceException(ErrorCode.builder().msg(String.format("key(%s)不存在", key)).code(0).build());
}
public void updateSegmentFromDb(String key, Segment segment) {
SegmentBuffer buffer = segment.getBuffer();
LeafAlloc leafAlloc;
if (!buffer.isInitOk()) {
leafAlloc = leafAllocService.updateMaxIdAndGetLeafAlloc(key);
buffer.setStep(leafAlloc.getStep());
//leafAlloc中的step为DB中的step
buffer.setMinStep(leafAlloc.getStep());
} else if (buffer.getUpdateTimestamp() == 0) {
leafAlloc = leafAllocService.updateMaxIdAndGetLeafAlloc(key);
buffer.setUpdateTimestamp(System.currentTimeMillis());
buffer.setStep(leafAlloc.getStep());
//leafAlloc中的step为DB中的step
buffer.setMinStep(leafAlloc.getStep());
} else {
long duration = System.currentTimeMillis() - buffer.getUpdateTimestamp();
int nextStep = buffer.getStep();
if (duration < SEGMENT_DURATION) {
if (nextStep * 2 > MAX_STEP) {
//do nothing
} else {
nextStep = nextStep * 2;
}
} else if (duration < SEGMENT_DURATION * 2) {
//do nothing with nextStep
} else {
nextStep = nextStep / 2 >= buffer.getMinStep() ? nextStep / 2 : nextStep;
}
log.info("leafKey[{}], step[{}], duration[{}mins], nextStep[{}]", key, buffer.getStep(), String.format("%.2f", ((double) duration / (1000 * 60))), nextStep);
LeafAlloc temp = new LeafAlloc();
temp.setKey(key);
temp.setStep(nextStep);
leafAlloc = leafAllocService.updateMaxIdByCustomStepAndGetLeafAlloc(temp);
buffer.setUpdateTimestamp(System.currentTimeMillis());
buffer.setStep(nextStep);
//leafAlloc的step为DB中的step
buffer.setMinStep(leafAlloc.getStep());
}
// must set value before set max
long value = leafAlloc.getMaxId() - buffer.getStep();
segment.getValue().set(value);
segment.setMax(leafAlloc.getMaxId());
segment.setStep(buffer.getStep());
}
public Long getIdFromSegmentBuffer(final SegmentBuffer buffer) {
while (true) {
buffer.rLock().lock();
try {
final Segment segment = buffer.getCurrent();
if (!buffer.isNextReady() && (segment.getIdle() < 0.9 * segment.getStep()) && buffer.getThreadRunning().compareAndSet(false, true)) {
threadPoolExecutor.execute(() -> {
Segment next = buffer.getSegments()[buffer.nextPos()];
boolean updateOk = false;
try {
updateSegmentFromDb(buffer.getKey(), next);
updateOk = true;
log.info("update segment {} from db {}", buffer.getKey(), next);
} catch (Exception e) {
log.warn(buffer.getKey() + " updateSegmentFromDb exception", e);
} finally {
if (updateOk) {
buffer.wLock().lock();
buffer.setNextReady(true);
buffer.getThreadRunning().set(false);
buffer.wLock().unlock();
} else {
buffer.getThreadRunning().set(false);
}
}
});
}
long value = segment.getValue().getAndIncrement();
if (value < segment.getMax()) {
return value;
}
} finally {
buffer.rLock().unlock();
}
waitAndSleep(buffer);
buffer.wLock().lock();
try {
final Segment segment = buffer.getCurrent();
long value = segment.getValue().getAndIncrement();
if (value < segment.getMax()) {
return value;
}
if (buffer.isNextReady()) {
buffer.switchPos();
buffer.setNextReady(false);
} else {
log.error("Both two segments in {} are not ready! ,请稍后再试", buffer);
}
} finally {
buffer.wLock().unlock();
}
}
}
private void waitAndSleep(SegmentBuffer buffer) {
int roll = 0;
while (buffer.getThreadRunning().get()) {
roll += 1;
if (roll > 10000) {
try {
TimeUnit.MILLISECONDS.sleep(10);
break;
} catch (InterruptedException e) {
log.warn("Thread {} Interrupted", Thread.currentThread().getName());
break;
}
}
}
}
public List<LeafAlloc> getAllLeafAllocs() {
return leafAllocService.getAllLeafAllocs();
}
public Map<String, SegmentBuffer> getCache() {
return cache;
}
}

View File

@ -0,0 +1,60 @@
package cd.casic.pipeline.commons.operationid.entity;
import cd.casic.framework.commons.util.validation.ValidGroup;
import cd.casic.framework.mybatis.core.dataobject.BaseDO;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Null;
import jakarta.validation.constraints.Size;
import lombok.Data;
import lombok.experimental.Accessors;
/**
* @author mianbin
* @Classname LeafAlloc
* @Description 业务id实体
* @Date 2025/3/18 14:16
*/
@Data
@Accessors(chain = true)
@Schema(description = "生成唯一id的实体")
public class LeafAlloc extends BaseDO {
private static final long serialVersionUID = 1L;
@Schema(description = "主键")
@Null(message = "新增id需为空", groups = ValidGroup.Create.class)
@NotNull(message = "修改id不能为空", groups = ValidGroup.Update.class)
private String id;
/**
* 业务key
*/
@Schema(description = "业务key", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "key不能为空")
private String key;
/**
* 当前已分配的最大id
*/
@Schema(description = "当前已分配的最大id(新增建议从1开始)", requiredMode = Schema.RequiredMode.REQUIRED, defaultValue = "1")
@NotNull(message = "maxId不能为空")
@Size(min = 1, message = "最小为1")
private Long maxId;
/**
* 初始步长也是动态调整的最小步长
*/
@Schema(description = "初始步长也是动态调整的最小步长从数据库一次获取的id数量", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "step不能为空")
@Size(min = 1, message = "最小为1")
private Integer step;
/**
* 业务key描述
*/
@Schema(description = "业务key描述", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
private String description;
}

View File

@ -0,0 +1,28 @@
package cd.casic.pipeline.commons.operationid.entity;
import lombok.Data;
import java.util.concurrent.atomic.AtomicLong;
/**
* @author mianbin
* @Classname Segment
* @Description
* @Date 2025/3/18 14:16
*/
@Data
public class Segment {
private AtomicLong value = new AtomicLong(0);
private volatile long max;
private volatile int step;
private final SegmentBuffer buffer;
public Segment(SegmentBuffer buffer) {
this.buffer = buffer;
}
public long getIdle() {
return this.getMax() - getValue().get();
}
}

View File

@ -0,0 +1,73 @@
package cd.casic.pipeline.commons.operationid.entity;
import lombok.Data;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReadWriteLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;
/**
* @author mianbin
* @Classname SegmentBuffer
* @Description
* @Date 2025/3/18 14:16
*/
@Data
public class SegmentBuffer {
private String key;
/**
* 双buffer
*/
private final Segment[] segments;
/**
* 当前的使用的segment的index
*/
private volatile int currentPos;
/**
* 下一个segment是否处于可切换状态
*/
private volatile boolean nextReady;
/**
* 是否初始化完成
*/
private volatile boolean initOk;
/**
* 线程是否在运行中
*/
private final AtomicBoolean threadRunning;
private final ReadWriteLock lock;
private volatile int step;
private volatile int minStep;
private volatile long updateTimestamp;
public SegmentBuffer() {
segments = new Segment[]{new Segment(this), new Segment(this)};
currentPos = 0;
nextReady = false;
initOk = false;
threadRunning = new AtomicBoolean(false);
lock = new ReentrantReadWriteLock();
}
public Segment getCurrent() {
return segments[currentPos];
}
public int nextPos() {
return (currentPos + 1) % 2;
}
public void switchPos() {
currentPos = nextPos();
}
public Lock rLock() {
return lock.readLock();
}
public Lock wLock() {
return lock.writeLock();
}
}

View File

@ -0,0 +1,11 @@
package cd.casic.pipeline.commons.operationid.entity;
/**
* @author mianbin
* @Classname Segment
* @Description 没想好干什么呢
* @Date 2025/3/18 14:16
*/
public enum Status {
SUCCESS,
EXCEPTION
}

View File

@ -0,0 +1,22 @@
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>cd.casic.boot</groupId>
<artifactId>modules</artifactId>
<version>${revision}</version>
</parent>
<groupId>cd.casic.pipeline</groupId>
<artifactId>pipeline-ci-event</artifactId>
<dependencies>
<dependency>
<groupId>cd.casic.pipeline</groupId>
<artifactId>pipeline-ci-commons</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,13 @@
package cd.casic.pipeline;
/**
* @author by mianbin
* @Classname ${NAME}
* @Description TODO
* @Date 2025/3/20 10:34
*/
public class Main {
public static void main(String[] args) {
System.out.println("Hello world!");
}
}

View File

@ -0,0 +1,39 @@
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>cd.casic.boot</groupId>
<artifactId>modules</artifactId>
<version>${revision}</version>
</parent>
<groupId>cd.casic.pipeline</groupId>
<artifactId>pipeline-ci-log</artifactId>
<version>${revision}</version>
<dependencies>
<dependency>
<groupId>cd.casic.pipeline</groupId>
<artifactId>pipeline-ci-commons</artifactId>
</dependency>
<dependency>
<groupId>cd.casic.boot</groupId>
<artifactId>spring-boot-starter-redis</artifactId>
</dependency>
<dependency>
<groupId>cd.casic.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>cd.casic.boot</groupId>
<artifactId>spring-boot-starter-monitor</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,278 @@
package cd.casic.pipeline.api;
import cd.casic.framework.commons.pojo.CommonResult;
import cd.casic.pipeline.enums.LogType;
import cd.casic.pipeline.dal.pojo.EndPageQueryLogs;
import cd.casic.pipeline.dal.pojo.PageQueryLogs;
import cd.casic.pipeline.dal.pojo.QueryLogs;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.*;
import static cd.casic.pipeline.commons.constant.OpsHeader.*;
@Tag(name = "用户-日志资源")
@RestController
@RequestMapping("/app/logs")
public interface AppLogResource {
@Operation(summary = "根据构建ID获取初始化所有日志")
@GetMapping("/{projectId}/{pipelineId}/{buildId}/")
CommonResult<PageQueryLogs> getInitLogs(
@Parameter(description = "用户ID", required = true, example = AUTH_HEADER_USER_ID_DEFAULT_VALUE)
@RequestHeader(AUTH_HEADER_USER_ID)
String userId,
@Parameter(description = "项目ID", required = true)
@PathVariable("projectId")
String projectId,
@Parameter(description = "流水线ID", required = true)
@PathVariable("pipelineId")
String pipelineId,
@Parameter(description = "构建ID", required = true)
@PathVariable("buildId")
String buildId,
@Parameter(description = "是否包含调试日志", required = false)
@RequestParam(value = "debug", defaultValue = "false")
boolean debug,
@Parameter(description = "过滤日志级别", required = false)
@RequestParam(value = "logType", defaultValue = "null")
LogType logType,
@Parameter(description = "对应elementId", required = false)
@RequestParam(value = "tag")
String tag,
@Parameter(description = "指定subTag", required = false)
@RequestParam("subTag")
String subTag,
@Parameter(description = "对应jobId", required = false)
@RequestParam(value = "jobId")
String jobId,
@Parameter(description = "执行次数", required = false)
@RequestParam(value = "executeCount")
int executeCount,
@Parameter(description = "第几页", required = false)
@RequestParam("page")
int page,
@Parameter(description = "每页条数", required = false)
@RequestParam("pageSize")
int pageSize
);
@Operation(summary = "获取更多日志")
@GetMapping("/{projectId}/{pipelineId}/{buildId}/more")
CommonResult<QueryLogs> getMoreLogs(
@Parameter(description = "用户ID", required = true, example = AUTH_HEADER_USER_ID_DEFAULT_VALUE)
@RequestHeader(AUTH_HEADER_USER_ID)
String userId,
@Parameter(description = "项目ID", required = true)
@PathVariable("projectId")
String projectId,
@Parameter(description = "流水线ID", required = true)
@PathVariable("pipelineId")
String pipelineId,
@Parameter(description = "构建ID", required = true)
@PathVariable("buildId")
String buildId,
@Parameter(description = "是否包含调试日志", required = false)
@RequestParam(value = "debug", defaultValue = "false")
boolean debug,
@Parameter(description = "过滤日志级别", required = false)
@RequestParam(value = "logType", defaultValue = "null")
LogType logType,
@Parameter(description = "日志行数", required = false)
@RequestParam(value = "num", defaultValue = "100")
int num,
@Parameter(description = "是否正序输出", required = false)
@RequestParam(value = "fromStart", defaultValue = "true")
boolean fromStart,
@Parameter(description = "起始行号", required = true)
@RequestParam(value = "start")
long start,
@Parameter(description = "结尾行号", required = true)
@RequestParam(value = "end")
long end,
@Parameter(description = "对应elementId", required = false)
@RequestParam(value = "tag")
String tag,
@Parameter(description = "指定subTag", required = false)
@RequestParam("subTag")
String subTag,
@Parameter(description = "对应jobId", required = false)
@RequestParam(value = "jobId")
String jobId,
@Parameter(description = "执行次数", required = false)
@RequestParam(value = "executeCount")
int executeCount
);
@Operation(summary = "获取某行后的日志")
@GetMapping("/{projectId}/{pipelineId}/{buildId}/after")
CommonResult<QueryLogs> getAfterLogs(
@Parameter(description = "用户ID", required = true, example = AUTH_HEADER_USER_ID_DEFAULT_VALUE)
@RequestHeader(AUTH_HEADER_USER_ID)
String userId,
@Parameter(description = "项目ID", required = true)
@PathVariable("projectId")
String projectId,
@Parameter(description = "流水线ID", required = true)
@PathVariable("pipelineId")
String pipelineId,
@Parameter(description = "构建ID", required = true)
@PathVariable("buildId")
String buildId,
@Parameter(description = "起始行号", required = true)
@RequestParam("start")
long start,
@Parameter(description = "是否包含调试日志", required = false)
@RequestParam(value = "debug",defaultValue = "false")
boolean debug,
@Parameter(description = "过滤日志级别", required = false)
@RequestParam(value = "logType",defaultValue = "null")
LogType logType,
@Parameter(description = "对应elementId", required = false)
@RequestParam("tag")
String tag,
@Parameter(description = "指定subTag", required = false)
@RequestParam("subTag")
String subTag,
@Parameter(description = "对应jobId", required = false)
@RequestParam("jobId")
String jobId,
@Parameter(description = "执行次数", required = false)
@RequestParam("executeCount")
int executeCount
);
@Operation(summary = "获取某行前指定行数的日志")
@GetMapping("/{projectId}/{pipelineId}/{buildId}/before")
CommonResult<QueryLogs> getBeforeLogs(
@Parameter(description = "用户ID", required = true, example = AUTH_HEADER_USER_ID_DEFAULT_VALUE)
@RequestHeader(AUTH_HEADER_USER_ID)
String userId,
@Parameter(description = "项目ID", required = true)
@PathVariable("projectId")
String projectId,
@Parameter(description = "流水线ID", required = true)
@PathVariable("pipelineId")
String pipelineId,
@Parameter(description = "构建ID", required = true)
@PathVariable("buildId")
String buildId,
@Parameter(description = "结束行号", required = true)
@RequestParam("end")
long end,
@Parameter(description = "是否包含调试日志", required = false)
@RequestParam(value = "debug",defaultValue = "false")
boolean debug,
@Parameter(description = "过滤日志级别", required = false)
@RequestParam(value = "logType",defaultValue = "null")
LogType logType,
@Parameter(description = "返回日志条数", required = false)
@RequestParam("size")
int size,
@Parameter(description = "对应elementId", required = false)
@RequestParam("tag")
String tag,
@Parameter(description = "指定subTag", required = false)
@RequestParam("subTag")
String subTag,
@Parameter(description = "对应jobId", required = false)
@RequestParam("jobId")
String jobId,
@Parameter(description = "执行次数", required = false)
@RequestParam("executeCount")
int executeCount
);
@Operation(summary = "根据构建ID获取初始化最后日志")
@GetMapping("/{projectId}/{pipelineId}/{buildId}/end")
CommonResult<EndPageQueryLogs> getEndLogsPage(
@Parameter(description = "用户ID", required = true, example = AUTH_HEADER_USER_ID_DEFAULT_VALUE)
@RequestHeader(value = AUTH_HEADER_USER_ID,defaultValue = AUTH_HEADER_USER_ID_DEFAULT_VALUE)
String userId,
@Parameter(description = "项目ID", required = true)
@PathVariable("projectId")
String projectId,
@Parameter(description = "流水线ID", required = true)
@PathVariable("pipelineId")
String pipelineId,
@Parameter(description = "构建ID", required = true)
@PathVariable("buildId")
String buildId,
@Parameter(description = "返回日志条数", required = true)
@RequestParam("size")
int size,
@Parameter(description = "是否包含调试日志", required = false)
@RequestParam(value = "debug",defaultValue = "false")
boolean debug,
@Parameter(description = "过滤日志级别", required = false)
@RequestParam(value = "logType",defaultValue = "null")
LogType logType,
@Parameter(description = "对应elementId", required = false)
@RequestParam("tag")
String tag,
@Parameter(description = "指定subTag", required = false)
@RequestParam("subTag")
String subTag,
@Parameter(description = "对应jobId", required = false)
@RequestParam("jobId")
String jobId,
@Parameter(description = "执行次数", required = false)
@RequestParam("executeCount")
int executeCount
);
@Operation(summary = "根据构建ID获取初始化底部指定行数的日志")
@GetMapping("/{projectId}/{pipelineId}/{buildId}/bottom")
CommonResult<QueryLogs> getBottomLogs(
@Parameter(description = "用户ID", required = true, example = AUTH_HEADER_USER_ID_DEFAULT_VALUE)
@RequestHeader(value = AUTH_HEADER_USER_ID,defaultValue = AUTH_HEADER_USER_ID_DEFAULT_VALUE)
String userId,
@Parameter(description = "项目ID", required = true)
@PathVariable("projectId")
String projectId,
@Parameter(description = "流水线ID", required = true)
@PathVariable("pipelineId")
String pipelineId,
@Parameter(description = "构建ID", required = true)
@PathVariable("buildId")
String buildId,
@Parameter(description = "是否包含调试日志", required = false)
@RequestParam(value = "debug",defaultValue = "false")
boolean debug,
@Parameter(description = "过滤日志级别", required = false)
@RequestParam(value = "logType",defaultValue = "null")
LogType logType,
@Parameter(description = "返回日志条数", required = false)
@RequestParam("size")
int size,
@Parameter(description = "对应elementId", required = false)
@RequestParam("tag")
String tag,
@Parameter(description = "指定subTag", required = false)
@RequestParam("subTag")
String subTag,
@Parameter(description = "对应jobId", required = false)
@RequestParam("jobId")
String jobId,
@Parameter(description = "执行次数", required = false)
@RequestParam("executeCount")
int executeCount
);
@Operation(summary = "测试接口")
@GetMapping("test")
CommonResult<String> test(
@Parameter(description = "构建的buildId", required = true,example = "1")
@RequestParam("buildId")
String buildId,
@Parameter(description = "标签名称", required = true,example = "java")
@RequestParam("tagName")
String tagName,
@Parameter(description = "要添加子标签", required = true,example = "spring")
@RequestParam("subTag")
String subTag
);
}

View File

@ -0,0 +1,127 @@
package cd.casic.pipeline.api;
import cd.casic.framework.commons.pojo.CommonResult;
import cd.casic.pipeline.dal.pojo.TaskBuildLogProperty;
import cd.casic.pipeline.dal.pojo.message.LogMessage;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import static cd.casic.pipeline.commons.constant.OpsHeader.*;
/**
* @author by mianbin
* @Classname BuildLogPrintResource
* @Description
* @Date 2025/3/19 14:44
*/
@Tag(name = "构建-日志资源", description = "BUILD_LOG_PRINT")
@RestController
@RequestMapping("/build/logs")
public interface BuildLogPrintResource {
@Operation(description = "写入一条日志")
@PostMapping("/")
CommonResult<Boolean> addLogLine(
@Parameter(description = "构建ID", required = true)
@RequestHeader(AUTH_HEADER_DEVOPS_BUILD_ID)
String buildId,
@Parameter(description = "一条日志", required = true)
LogMessage logMessage);
@Operation(description = "写入一条红色高亮日志")
@PostMapping("/red")
CommonResult<Boolean> addRedLogLine(
@Parameter(description = "构建ID", required = true)
@RequestHeader(AUTH_HEADER_DEVOPS_BUILD_ID)
String buildId,
@Parameter(description = "一条日志", required = true)
LogMessage logMessage);
@Operation(description = "写入一条黄色高亮日志")
@PostMapping("/yellow")
CommonResult<Boolean> addYellowLogLine(
@Parameter(description = "构建ID", required = true)
@RequestHeader(AUTH_HEADER_DEVOPS_BUILD_ID)
String buildId,
@Parameter(description = "一条日志", required = true)
LogMessage logMessage
);
@Operation(description = "写入多条日志")
@PostMapping("/multi")
CommonResult<Boolean> addMultiLine(
@Parameter(description = "构建ID", required = true)
@RequestHeader(AUTH_HEADER_DEVOPS_BUILD_ID)
String buildId,
@Parameter(description = "多条日志列表", required = true)
List<LogMessage> logMessages
);
@Operation(description = "写入日志状态")
@PostMapping("/status")
CommonResult<Boolean> addLogStatus(
@Parameter(description = "构建id", required = true)
@RequestHeader(AUTH_HEADER_DEVOPS_BUILD_ID)
String buildId,
@Parameter(description = "分辨插件的tag默认填对应插件id")
@RequestParam("tag")
String tag,
@Parameter(description = "插件内的分类的子tag默认为空")
@RequestParam("subTag")
String subTag,
@Parameter(description = "job id或者container的34位id", required = false)
@RequestParam("jobId")
String jobId,
@Parameter(description = "执行次数", required = false)
@RequestParam("executeCount")
int executeCount,
@Parameter(description = "日志存储模式", required = false)
@RequestParam("logMode")
String logMode
);
@Operation(description = "更新日志状态")
@PutMapping("/status")
CommonResult<Boolean> updateLogStatus(
@Parameter(description = "构建id", required = true)
@RequestHeader(AUTH_HEADER_DEVOPS_BUILD_ID)
String buildId,
@Parameter(description = "是否已构建完成", required = true)
@RequestParam("finished")
boolean finished,
@Parameter(description = "分辨插件的tag默认填对应插件id")
@RequestParam("tag")
String tag,
@Parameter(description = "插件内的分类的子tag默认为空")
@RequestParam("subTag")
String subTag,
@Parameter(description = "job id或者container的34位id", required = false)
@RequestParam("jobId")
String jobId,
@Parameter(description = "执行次数", required = false)
@RequestParam("executeCount")
int executeCount,
@Parameter(description = "日志存储模式", required = false)
@RequestParam("logMode")
String logMode
);
@Operation(description = "更新日志存储模式的流转状态")
@PostMapping("/mode")
CommonResult<Boolean> updateLogStorageMode(
@Parameter(description = "构建ID", required = true)
@RequestHeader(AUTH_HEADER_DEVOPS_BUILD_ID)
String buildId,
@Parameter(description = "执行次数")
@RequestParam("executeCount")
int executeCount,
@Parameter(description = "所有插件的日志存储结果", required = true)
List<TaskBuildLogProperty> propertyList
);
}

View File

@ -0,0 +1,18 @@
package cd.casic.pipeline.api;
import cd.casic.framework.commons.pojo.CommonResult;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Tag(name = "管理-日志资源")
@RestController
@RequestMapping("/op")
public interface OpLogResource {
@Operation(description = "执行搬冷任务")
@PutMapping("/es/index/cold")
CommonResult<Boolean> makeIndexCold();
}

View File

@ -0,0 +1,86 @@
package cd.casic.pipeline.api;
import cd.casic.framework.commons.pojo.CommonResult;
import cd.casic.pipeline.enums.LogStorageMode;
import cd.casic.pipeline.dal.pojo.message.LogMessage;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import static cd.casic.pipeline.commons.constant.OpsHeader.AUTH_HEADER_DEVOPS_BUILD_ID;
@RestController
@Tag(name = "服务-日志打印资源")
@RequestMapping("/service/logs/print")
public interface ServiceLogPrintResource {
@Operation(summary = "写入日志状态")
@PostMapping("/status")
@Parameters({
@Parameter(name = "tag", description = "分辨插件的tag默认填对应插件id"),
@Parameter(name = "subTag", description = "插件内的分类的子tag默认为空"),
@Parameter(name = "jobId", description = "job id或者container的34位id"),
@Parameter(name = "executeCount", description = "执行次数"),
})
CommonResult<Boolean> addLogStatus(@RequestHeader(value = AUTH_HEADER_DEVOPS_BUILD_ID)
@Parameter(description = "构建ID", required = true)
String buildId,
@RequestParam(value = "tag", required = false) String tag,
@RequestParam(value = "subTag", required = false) String subTag,
@RequestParam(value = "jobId", required = false) String jobId,
@RequestParam(value = "executeCount", required = false, defaultValue = "1") int executeCount);
@Operation(summary = "更新日志状态")
@PutMapping("/status")
CommonResult<Boolean> updateLogStatus(
@Parameter(description = "构建ID", required = true)
@RequestHeader(AUTH_HEADER_DEVOPS_BUILD_ID)
String buildId,
@Parameter(description = "是否已构建完成", required = true)
@RequestParam("finished")
boolean finished,
@Parameter(description = "分辨插件的tag默认填对应插件id")
@RequestParam(value = "tag", required = false)
String tag,
@Parameter(description = "插件内的分类的子tag默认为空")
@RequestParam(value = "subTag", required = false)
String subTag,
@Parameter(description = "job id或者container的34位id")
@RequestParam(value = "jobId", required = false)
String jobId,
@Parameter(description = "执行次数")
@RequestParam(value = "executeCount", required = false, defaultValue = "1")
int executeCount,
@Parameter(description = "插件的存储模式")
@RequestParam(value = "logStorageMode", required = false)
LogStorageMode logStorageMode
);
@Operation(summary = "写入一条日志")
@PostMapping("/")
CommonResult<Boolean> addLogLine(
@Parameter(description = "构建ID", required = true)
@RequestHeader(AUTH_HEADER_DEVOPS_BUILD_ID)
String buildId,
@Parameter(description = "一条日志", required = true)
LogMessage logMessage);
@Operation(summary = "写入多条日志")
@PostMapping("/multi")
CommonResult<Boolean> addLogMultiLine(
@Parameter(description = "构建ID", required = true)
@RequestHeader(AUTH_HEADER_DEVOPS_BUILD_ID)
String buildId,
@Parameter(description = "多条日志列表", required = true)
List<LogMessage> logMessages);
}

View File

@ -0,0 +1,173 @@
package cd.casic.pipeline.api;
import cd.casic.framework.commons.pojo.CommonResult;
import cd.casic.pipeline.enums.LogType;
import cd.casic.pipeline.dal.pojo.QueryLogLineNum;
import cd.casic.pipeline.dal.pojo.QueryLogStatus;
import cd.casic.pipeline.dal.pojo.QueryLogs;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.*;
import static cd.casic.pipeline.commons.constant.OpsHeader.*;
@RestController
@Tag(name = "服务-日志资源")
@RequestMapping("/service/logs")
public interface ServiceLogResource {
@Operation(summary = "根据构建ID获取初始化所有日志")
@GetMapping("/{projectId}/{pipelineId}/{buildId}/")
CommonResult<QueryLogs> getInitLogs(
@Parameter(description = "用户ID", required = true, example = AUTH_HEADER_USER_ID_DEFAULT_VALUE)
@RequestHeader(AUTH_HEADER_USER_ID)
String userId,
@Parameter(description = "项目ID", required = true)
@PathVariable("projectId")
String projectId,
@Parameter(description = "流水线ID", required = true)
@PathVariable("pipelineId")
String pipelineId,
@Parameter(description = "构建ID", required = true)
@PathVariable("buildId")
String buildId,
@Parameter(description = "是否包含调试日志", required = false)
@RequestParam(value = "debug", defaultValue = "false")
boolean debug,
@Parameter(description = "过滤日志级别", required = false)
@RequestParam(value = "logType", defaultValue = "null")
LogType logType,
@Parameter(description = "对应elementId", required = false)
@RequestParam(value = "tag")
String tag,
@Parameter(description = "对应jobId", required = false)
@RequestParam(value = "jobId")
String jobId,
@Parameter(description = "执行次数", required = false)
@RequestParam(value = "executeCount")
int executeCount
);
@Operation(summary = "获取更多日志")
@GetMapping("/{projectId}/{pipelineId}/{buildId}/more")
CommonResult<QueryLogs> getMoreLogs(
@Parameter(description = "用户ID", required = true, example = AUTH_HEADER_USER_ID_DEFAULT_VALUE)
@RequestHeader(AUTH_HEADER_USER_ID)
String userId,
@Parameter(description = "项目ID", required = true)
@PathVariable("projectId")
String projectId,
@Parameter(description = "流水线ID", required = true)
@PathVariable("pipelineId")
String pipelineId,
@Parameter(description = "构建ID", required = true)
@PathVariable("buildId")
String buildId,
@Parameter(description = "是否包含调试日志", required = false)
@RequestParam(value = "debug", defaultValue = "false")
boolean debug,
@Parameter(description = "过滤日志级别", required = false)
@RequestParam(value = "logType", defaultValue = "null")
LogType logType,
@Parameter(description = "日志行数", required = false)
@RequestParam(value = "num", defaultValue = "100")
int num,
@Parameter(description = "是否正序输出", required = false)
@RequestParam(value = "fromStart", defaultValue = "true")
boolean fromStart,
@Parameter(description = "起始行号", required = true)
@RequestParam(value = "start")
long start,
@Parameter(description = "结尾行号", required = true)
@RequestParam(value = "end")
long end,
@Parameter(description = "对应elementId", required = false)
@RequestParam(value = "tag")
String tag,
@Parameter(description = "对应jobId", required = false)
@RequestParam(value = "jobId")
String jobId,
@Parameter(description = "执行次数", required = false)
@RequestParam(value = "executeCount")
int executeCount
);
@Operation(summary = "获取某行前的日志")
@GetMapping("/{projectId}/{pipelineId}/{buildId}/after")
CommonResult<QueryLogs> getAfterLogs(
@Parameter(description = "用户ID", required = true, example = AUTH_HEADER_USER_ID_DEFAULT_VALUE)
@RequestHeader(AUTH_HEADER_USER_ID)
String userId,
@Parameter(description = "项目ID", required = true)
@PathVariable("projectId")
String projectId,
@Parameter(description = "流水线ID", required = true)
@PathVariable("pipelineId")
String pipelineId,
@Parameter(description = "构建ID", required = true)
@PathVariable("buildId")
String buildId,
@Parameter(description = "起始行号", required = true)
@RequestParam("start")
long start,
@Parameter(description = "是否包含调试日志", required = false)
@RequestParam(value = "debug",defaultValue = "false")
boolean debug,
@Parameter(description = "过滤日志级别", required = false)
@RequestParam(value = "logType",defaultValue = "null")
LogType logType,
@Parameter(description = "对应elementId", required = false)
@RequestParam("tag")
String tag,
@Parameter(description = "对应jobId", required = false)
@RequestParam("jobId")
String jobId,
@Parameter(description = "执行次数", required = false)
@RequestParam("executeCount")
int executeCount
);
@Operation(summary = "获取插件的的日志状态")
@GetMapping("/{projectId}/{pipelineId}/{buildId}/mode")
CommonResult<QueryLogStatus> getLogMode(
@Parameter(description = "用户ID", required = true, example = AUTH_HEADER_USER_ID_DEFAULT_VALUE)
@RequestHeader(AUTH_HEADER_USER_ID)
String userId,
@Parameter(description = "项目ID", required = true)
@PathVariable("projectId")
String projectId,
@Parameter(description = "流水线ID", required = true)
@PathVariable("pipelineId")
String pipelineId,
@Parameter(description = "构建ID", required = true)
@PathVariable("buildId")
String buildId,
@Parameter(description = "对应elementId", required = true)
@RequestParam("tag")
String tag,
@Parameter(description = "执行次数", required = false)
@RequestParam("executeCount")
int executeCount
);
@Operation(summary = "获取当前构建的最大行号")
@GetMapping("/{projectId}/{pipelineId}/{buildId}/last_line_num")
CommonResult<QueryLogLineNum> getLogLastLineNum(
@Parameter(description = "用户ID", required = true, example = AUTH_HEADER_USER_ID_DEFAULT_VALUE)
@RequestHeader(AUTH_HEADER_USER_ID)
String userId,
@Parameter(description = "项目ID", required = true)
@PathVariable("projectId")
String projectId,
@Parameter(description = "流水线ID", required = true)
@PathVariable("pipelineId")
String pipelineId,
@Parameter(description = "构建ID", required = true)
@PathVariable("buildId")
String buildId
);
}

View File

@ -0,0 +1,195 @@
package cd.casic.pipeline.api;
import cd.casic.framework.commons.pojo.CommonResult;
import cd.casic.pipeline.enums.LogType;
import cd.casic.pipeline.dal.pojo.QueryLogStatus;
import cd.casic.pipeline.dal.pojo.QueryLogs;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import static cd.casic.pipeline.commons.constant.OpsHeader.*;
@RestController
@Tag(name = "用户-日志资源")
@RequestMapping("/user/logs")
public interface UserLogResource {
@Operation(summary = "根据构建ID获取初始化所有日志")
@GetMapping("/{projectId}/{pipelineId}/{buildId}/")
CommonResult<QueryLogs> getInitLogs(
@Parameter(description = "用户ID", required = true, example = AUTH_HEADER_USER_ID_DEFAULT_VALUE)
@RequestHeader(AUTH_HEADER_USER_ID)
String userId,
@Parameter(description = "项目ID", required = true)
@PathVariable("projectId")
String projectId,
@Parameter(description = "流水线ID", required = true)
@PathVariable("pipelineId")
String pipelineId,
@Parameter(description = "构建ID", required = true)
@PathVariable("buildId")
String buildId,
@Parameter(description = "是否包含调试日志", required = false)
@RequestParam(value = "debug", defaultValue = "false")
boolean debug,
@Parameter(description = "过滤日志级别", required = false)
@RequestParam(value = "logType", defaultValue = "null")
LogType logType,
@Parameter(description = "对应elementId", required = false)
@RequestParam(value = "tag")
String tag,
@Parameter(description = "指定subTag", required = false)
@RequestParam(value = "subTag")
String subTag,
@Parameter(description = "对应jobId", required = false)
@RequestParam(value = "jobId")
String jobId,
@Parameter(description = "执行次数", required = false)
@RequestParam(value = "executeCount")
int executeCount
);
@Operation(summary = "获取更多日志")
@GetMapping("/{projectId}/{pipelineId}/{buildId}/more")
CommonResult<QueryLogs> getMoreLogs(
@Parameter(description = "用户ID", required = true, example = AUTH_HEADER_USER_ID_DEFAULT_VALUE)
@RequestHeader(AUTH_HEADER_USER_ID)
String userId,
@Parameter(description = "项目ID", required = true)
@PathVariable("projectId")
String projectId,
@Parameter(description = "流水线ID", required = true)
@PathVariable("pipelineId")
String pipelineId,
@Parameter(description = "构建ID", required = true)
@PathVariable("buildId")
String buildId,
@Parameter(description = "是否包含调试日志", required = false)
@RequestParam(value = "debug", defaultValue = "false")
boolean debug,
@Parameter(description = "过滤日志级别", required = false)
@RequestParam(value = "logType", defaultValue = "null")
LogType logType,
@Parameter(description = "日志行数", required = false)
@RequestParam(value = "num", defaultValue = "100")
int num,
@Parameter(description = "是否正序输出", required = false)
@RequestParam(value = "fromStart", defaultValue = "true")
boolean fromStart,
@Parameter(description = "起始行号", required = true)
@RequestParam(value = "start")
long start,
@Parameter(description = "结尾行号", required = true)
@RequestParam(value = "end")
long end,
@Parameter(description = "对应elementId", required = false)
@RequestParam(value = "tag")
String tag,
@Parameter(description = "指定subTag", required = false)
@RequestParam(value = "subTag")
String subTag,
@Parameter(description = "对应jobId", required = false)
@RequestParam(value = "jobId")
String jobId,
@Parameter(description = "执行次数", required = false)
@RequestParam(value = "executeCount")
int executeCount
);
@Operation(summary = "获取某行后的日志")
@GetMapping("/{projectId}/{pipelineId}/{buildId}/after")
CommonResult<QueryLogs> getAfterLogs(
@Parameter(description = "用户ID", required = true, example = AUTH_HEADER_USER_ID_DEFAULT_VALUE)
@RequestHeader(AUTH_HEADER_USER_ID)
String userId,
@Parameter(description = "项目ID", required = true)
@PathVariable("projectId")
String projectId,
@Parameter(description = "流水线ID", required = true)
@PathVariable("pipelineId")
String pipelineId,
@Parameter(description = "构建ID", required = true)
@PathVariable("buildId")
String buildId,
@Parameter(description = "起始行号", required = true)
@RequestParam("start")
long start,
@Parameter(description = "是否包含调试日志", required = false)
@RequestParam(value = "debug",defaultValue = "false")
boolean debug,
@Parameter(description = "过滤日志级别", required = false)
@RequestParam(value = "logType",defaultValue = "null")
LogType logType,
@Parameter(description = "对应elementId", required = false)
@RequestParam("tag")
String tag,
@Parameter(description = "指定subTag", required = false)
@RequestParam("subTag")
String subTag,
@Parameter(description = "对应jobId", required = false)
@RequestParam("jobId")
String jobId,
@Parameter(description = "执行次数", required = false)
@RequestParam("executeCount")
int executeCount
);
@Operation(summary = "下载日志接口")
@GetMapping("{projectId}/{pipelineId}/{buildId}/download")
ResponseEntity downloadLogs(
@Parameter(description = "用户ID", required = true, example = AUTH_HEADER_USER_ID_DEFAULT_VALUE)
@RequestHeader(AUTH_HEADER_USER_ID)
String userId,
@Parameter(description = "项目ID", required = true)
@PathVariable("projectId")
String projectId,
@Parameter(description = "流水线ID", required = true)
@PathVariable("pipelineId")
String pipelineId,
@Parameter(description = "构建ID", required = true)
@PathVariable("buildId")
String buildId,
@Parameter(description = "对应elementId", required = true)
@RequestParam("tag")
String tag,
@Parameter(description = "指定subTag", required = false)
@RequestParam("subTag")
String subTag,
@Parameter(description = "对应jobId", required = false)
@RequestParam("jobId")
String jobId,
@Parameter(description = "执行次数", required = false)
@RequestParam("executeCount")
int executeCount,
@Parameter(description = "文件名")
@RequestParam("fileName")
String fileName
);
@Operation(summary = "获取插件的的日志状态")
@GetMapping("/{projectId}/{pipelineId}/{buildId}/mode")
CommonResult<QueryLogStatus> getLogMode(
@Parameter(description = "用户ID", required = true, example = AUTH_HEADER_USER_ID_DEFAULT_VALUE)
@RequestHeader(AUTH_HEADER_USER_ID)
String userId,
@Parameter(description = "项目ID", required = true)
@PathVariable("projectId")
String projectId,
@Parameter(description = "流水线ID", required = true)
@PathVariable("pipelineId")
String pipelineId,
@Parameter(description = "构建ID", required = true)
@PathVariable("buildId")
String buildId,
@Parameter(description = "对应elementId", required = true)
@RequestParam("tag")
String tag,
@Parameter(description = "执行次数", required = false)
@RequestParam("executeCount")
int executeCount
);
}

View File

@ -0,0 +1,61 @@
package cd.casic.pipeline.api.impl;
import cd.casic.framework.commons.pojo.CommonResult;
import cd.casic.pipeline.api.AppLogResource;
import cd.casic.pipeline.enums.LogType;
import cd.casic.pipeline.dal.pojo.EndPageQueryLogs;
import cd.casic.pipeline.dal.pojo.PageQueryLogs;
import cd.casic.pipeline.dal.pojo.QueryLogs;
import cd.casic.pipeline.service.BuildLogQueryService;
import cd.casic.pipeline.service.LogTagService;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RestController;
@RestController
@Slf4j
public class AppLogResourceImpl implements AppLogResource {
@Resource
private BuildLogQueryService buildLogQueryService;
@Resource
private LogTagService logTagService;
@Override
public CommonResult<PageQueryLogs> getInitLogs(String userId, String projectId, String pipelineId, String buildId, boolean debug, LogType logType, String tag, String subTag, String jobId, int executeCount, int page, int pageSize) {
return buildLogQueryService.getInitLogsPage(userId, projectId, pipelineId, buildId, debug, logType, tag, jobId, executeCount, page, pageSize, subTag);
}
@Override
public CommonResult<QueryLogs> getMoreLogs(String userId, String projectId, String pipelineId, String buildId, boolean debug, LogType logType, int num, boolean fromStart, long start, long end, String tag, String subTag, String jobId, int executeCount) {
return buildLogQueryService.getMoreLogs(userId, projectId, pipelineId, buildId, debug, logType, num, fromStart, start, end, tag, jobId, executeCount, subTag);
}
@Override
public CommonResult<QueryLogs> getAfterLogs(String userId, String projectId, String pipelineId, String buildId, long start, boolean debug, LogType logType, String tag, String subTag, String jobId, int executeCount) {
return buildLogQueryService.getAfterLogs(userId, projectId, pipelineId, buildId, start, debug, logType, tag, jobId, executeCount, subTag);
}
@Override
public CommonResult<QueryLogs> getBeforeLogs(String userId, String projectId, String pipelineId, String buildId, long end, boolean debug, LogType logType, int size, String tag, String subTag, String jobId, int executeCount) {
return buildLogQueryService.getBeforeLogs(userId, projectId, pipelineId, buildId, end, debug, logType, size, tag, jobId, executeCount, subTag);
}
@Override
public CommonResult<EndPageQueryLogs> getEndLogsPage(String userId, String projectId, String pipelineId, String buildId, int size, boolean debug, LogType logType, String tag, String subTag, String jobId, int executeCount) {
return buildLogQueryService.getEndLogsPage(userId, projectId, pipelineId, buildId, size, debug, logType, tag, jobId, executeCount, subTag);
}
@Override
public CommonResult<QueryLogs> getBottomLogs(String userId, String projectId, String pipelineId, String buildId, boolean debug, LogType logType, int size, String tag, String subTag, String jobId, int executeCount) {
return buildLogQueryService.getBottomLogs(userId, projectId, pipelineId, buildId, size, debug, logType, tag, jobId, executeCount, subTag);
}
@Override
public CommonResult<String> test(String buildId, String tagName, String subTag) {
logTagService.saveSubTag(buildId, tagName, subTag);
return CommonResult.success("成功");
}
}

View File

@ -0,0 +1,126 @@
package cd.casic.pipeline.api.impl;
import cd.casic.framework.commons.exception.ErrorCode;
import cd.casic.framework.commons.pojo.CommonResult;
import cd.casic.pipeline.api.BuildLogPrintResource;
import cd.casic.pipeline.enums.LogStorageMode;
import cd.casic.pipeline.dal.pojo.meta.Ansi;
import cd.casic.pipeline.dal.pojo.TaskBuildLogProperty;
import cd.casic.pipeline.service.BuildLogPrintService;
import cd.casic.pipeline.service.IndexService;
import cd.casic.pipeline.service.LogStatusService;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.apache.logging.log4j.util.Strings;
import org.springframework.beans.factory.annotation.Value;
import cd.casic.pipeline.dal.pojo.message.LogMessage;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.List;
@Slf4j
@RestController
public class BuildLogPrintResourceImpl implements BuildLogPrintResource {
@Resource
private BuildLogPrintService buildLogPrintService;
@Resource
private LogStatusService logStatusService;
@Resource
private IndexService indexService;
@Value("{$spring.application.name}")
private String applicationName;
@Override
public CommonResult<Boolean> addLogLine(String buildId, LogMessage logMessage) {
if (Strings.isBlank(buildId)) {
log.warn("Invalid build ID[" + buildId + "]");
return CommonResult.error(new ErrorCode(1000, "buildId为空"));
}
ArrayList<LogMessage> list = new ArrayList<>();
list.add(logMessage);
//buildLogPrintService.dispatchEvent(new LogOriginEvent(buildId, list));
System.out.println("占位");
return CommonResult.success(true);
}
@Override
public CommonResult<Boolean> addRedLogLine(String buildId, LogMessage logMessage) {
if (Strings.isBlank(buildId)) {
log.warn("Invalid build ID[" + buildId + "]");
return CommonResult.error(new ErrorCode(1000, "buildId为空"));
}
// 设置红色日志
List<LogMessage> list = new ArrayList<>();
logMessage.setMessage(new Ansi().bold().fgRed().a(logMessage.getMessage()).reset().toString());
list.add(logMessage);
//buildLogPrintService.dispatchEvent(new LogOriginEvent(buildId,list));
System.out.println("占位");
return CommonResult.success(true);
}
@Override
public CommonResult<Boolean> addYellowLogLine(String buildId, LogMessage logMessage) {
if (Strings.isBlank(buildId)) {
log.warn("Invalid build ID[" + buildId + "]");
return CommonResult.error(new ErrorCode(1000, "buildId为空"));
}
// 设置黄色日志
List<LogMessage> list = new ArrayList<>();
logMessage.setMessage(new Ansi().bold().fgYellow().a(logMessage.getMessage()).reset().toString());
list.add(logMessage);
//buildLogPrintService.dispatchEvent(new LogOriginEvent(buildId,list));
System.out.println("占位" + buildId + list);
return CommonResult.success(true);
}
@Override
public CommonResult<Boolean> addMultiLine(String buildId, List<LogMessage> logMessages) {
if (Strings.isBlank(buildId)) {
log.warn("Invalid build ID[" + buildId + "]");
return CommonResult.error(new ErrorCode(1000, "buildId为空"));
}
//buildLogPrintService.dispatchEvent(new LogOriginEvent(buildId,logMessages));
System.out.println("占位" + buildId + logMessages);
// recordMultiLogCount(logMessages.size());
return CommonResult.success(true);
}
@Override
public CommonResult<Boolean> addLogStatus(String buildId, String tag, String subTag, String jobId, int executeCount, String logMode) {
if (Strings.isBlank(buildId)) {
log.warn("Invalid build ID[" + buildId + "]");
return CommonResult.error(new ErrorCode(1000, "buildId为空"));
}
// #7168 通过一次获取创建记录以及缓存
String index = indexService.getIndexName(buildId);
log.info("Start to print log to index[" + index + "]");
//buildLogPrintService.dispatchEvent(new LogStatusEvent(buildId,false,tag,subTag,jobId,executeCount, LogStorageMode.parse(logMode)));
System.out.println("占位" + buildId + tag + subTag + jobId + executeCount + LogStorageMode.parse(logMode));
return CommonResult.success(true);
}
@Override
public CommonResult<Boolean> updateLogStatus(String buildId, boolean finished, String tag, String subTag, String jobId, int executeCount, String logMode) {
if (Strings.isBlank(buildId)) {
log.warn("Invalid build ID[" + buildId + "]");
return CommonResult.error(new ErrorCode(1000, "buildId为空"));
}
//buildLogPrintService.dispatchEvent(new LogStatusEvent(buildId,finished,tag,subTag,jobId,executeCount,LogStorageMode.parse(logMode)));
System.out.println("占位" + buildId + finished + tag + subTag + jobId + executeCount + LogStorageMode.parse(logMode));
return CommonResult.success(true);
}
@Override
public CommonResult<Boolean> updateLogStorageMode(String buildId, int executeCount, List<TaskBuildLogProperty> propertyList) {
if (Strings.isBlank(buildId)) {
log.warn("Invalid build ID[" + buildId + "]");
return CommonResult.error(new ErrorCode(1000, "buildId为空"));
}
logStatusService.updateStorageMode(buildId, executeCount, propertyList);
return CommonResult.success(true);
}
}

View File

@ -0,0 +1,16 @@
package cd.casic.pipeline.api.impl;
import cd.casic.framework.commons.pojo.CommonResult;
import cd.casic.pipeline.api.OpLogResource;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class OpLogResourceImpl implements OpLogResource {
// todo 和ES数据库相关的冷处理
@Override
public CommonResult<Boolean> makeIndexCold() {
return null;
}
}

View File

@ -0,0 +1,83 @@
package cd.casic.pipeline.api.impl;
import cd.casic.framework.commons.exception.ErrorCode;
import cd.casic.framework.commons.pojo.CommonResult;
import cd.casic.pipeline.api.ServiceLogPrintResource;
import cd.casic.pipeline.enums.LogStorageMode;
import cd.casic.pipeline.event.log.LogOriginEvent;
import cd.casic.pipeline.dal.pojo.message.LogMessage;
import cd.casic.pipeline.service.BuildLogPrintService;
import cd.casic.pipeline.service.IndexService;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.apache.logging.log4j.util.Strings;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.List;
@Slf4j
@RestController
public class ServiceLogPrintResourceImpl implements ServiceLogPrintResource {
@Resource
private IndexService indexService;
@Resource
private BuildLogPrintService buildLogPrintService;
private static Logger logger = LoggerFactory.getLogger(ServiceLogPrintResourceImpl.class);
@Override
public CommonResult<Boolean> addLogStatus(String buildId, String tag, String subTag, String jobId, int executeCount) {
// 判断 buildId 是否为空
if (buildId.isEmpty()) {
logger.warn("Invalid build ID");
return CommonResult.error(new ErrorCode(1000, "Invalid build ID"));
}
// 通过一次获取 创建记录以及缓存
String index = indexService.getIndexName(buildId);
logger.info("Start to print log to index: " + index);
// buildLogPrintService.dispatchEvent(
// new LogStatusEvent(buildId, false, tag, subTag, jobId, executeCount)
// );
return CommonResult.success(true);
}
@Override
public CommonResult<Boolean> updateLogStatus(String buildId, boolean finished, String tag,
String subTag, String jobId, int executeCount, LogStorageMode logStorageMode) {
if (Strings.isBlank(buildId)) {
logger.warn("Invalid build ID" + buildId);
return CommonResult.error(new ErrorCode(1000, "Invalid build ID"));
}
// buildLogPrintService.dispatchEvent(
// new LogStatusEvent(buildId,finished,tag,subTag,jobId,executeCount,logStorageMode)
// );
return CommonResult.success(true);
}
@Override
public CommonResult<Boolean> addLogLine(String buildId, LogMessage logMessage) {
if (Strings.isBlank(buildId)) {
logger.warn("Invalid build ID" + buildId);
return CommonResult.error(new ErrorCode(1000, "Invalid build ID"));
}
List<LogMessage> messages = new ArrayList<>();
messages.add(logMessage);
return buildLogPrintService.asyncDispatchEvent(new LogOriginEvent(buildId, messages));
}
@Override
public CommonResult<Boolean> addLogMultiLine(String buildId, List<LogMessage> logMessages) {
if (Strings.isBlank(buildId)) {
logger.warn("Invalid build ID" + buildId);
return CommonResult.error(new ErrorCode(1000, "Invalid build ID"));
}
buildLogPrintService.asyncDispatchEvent(new LogOriginEvent(buildId, logMessages));
return CommonResult.success(true);
}
}

View File

@ -0,0 +1,51 @@
package cd.casic.pipeline.api.impl;
import cd.casic.framework.commons.pojo.CommonResult;
import cd.casic.pipeline.api.ServiceLogResource;
import cd.casic.pipeline.enums.LogType;
import cd.casic.pipeline.dal.pojo.QueryLogLineNum;
import cd.casic.pipeline.dal.pojo.QueryLogStatus;
import cd.casic.pipeline.dal.pojo.QueryLogs;
import cd.casic.pipeline.service.BuildLogQueryService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class ServiceLogResourceImpl implements ServiceLogResource {
@Resource
private BuildLogQueryService buildLogQueryService;
private static int defaultNum = 100;
@Override
public CommonResult<QueryLogs> getInitLogs(String userId, String projectId, String pipelineId, String buildId,
boolean debug, LogType logType, String tag, String jobId, int executeCount) {
return buildLogQueryService.getInitLogs(userId,projectId,pipelineId,buildId,debug,logType,tag,jobId,executeCount,null);
}
@Override
public CommonResult<QueryLogs> getMoreLogs(String userId, String projectId, String pipelineId, String buildId,
boolean debug, LogType logType, int num, boolean fromStart, long start, long end, String tag, String jobId, int executeCount) {
return buildLogQueryService.getMoreLogs(userId,projectId,pipelineId,buildId,debug,logType,num,fromStart,start,end,tag,jobId,executeCount,null);
}
@Override
public CommonResult<QueryLogs> getAfterLogs(String userId, String projectId, String pipelineId, String buildId,long start,
boolean debug, LogType logType,String tag,String jobId, int executeCount) {
return buildLogQueryService.getAfterLogs(userId,projectId,pipelineId,buildId,start,debug,logType,tag,jobId,executeCount,null);
}
@Override
public CommonResult<QueryLogStatus> getLogMode(String userId, String projectId, String pipelineId, String buildId, String tag, int executeCount) {
return buildLogQueryService.getLogMode(userId, projectId, pipelineId, buildId,tag,executeCount);
}
@Override
public CommonResult<QueryLogLineNum> getLogLastLineNum(String userId, String projectId, String pipelineId, String buildId) {
return buildLogQueryService.getLastLineNum(userId, projectId, pipelineId, buildId);
}
}

View File

@ -0,0 +1,82 @@
package cd.casic.pipeline.api.impl;
import io.micrometer.core.instrument.Counter;
import io.micrometer.core.instrument.MeterRegistry;
import cd.casic.framework.commons.pojo.CommonResult;
import cd.casic.pipeline.api.UserLogResource;
import cd.casic.pipeline.enums.LogType;
import cd.casic.pipeline.dal.pojo.LogLine;
import cd.casic.pipeline.dal.pojo.QueryLogStatus;
import cd.casic.pipeline.dal.pojo.QueryLogs;
import cd.casic.pipeline.service.BuildLogQueryService;
import io.micrometer.core.annotation.Timed;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@RestController
public class UserLogResourceImpl implements UserLogResource {
@Resource
private BuildLogQueryService buildLogQueryService;
@Resource
private MeterRegistry meterRegistry;
private static final int defaultNum = 100;
@Value("${spring.application.name}")
private String applicationName = "";
@Override
@Timed
public CommonResult<QueryLogs> getInitLogs(String userId, String projectId, String pipelineId,
String buildId, boolean debug, LogType logType, String tag, String subTag, String jobId, int executeCount) {
CommonResult<QueryLogs> initLogs = buildLogQueryService.getInitLogs(userId, projectId, pipelineId, buildId, debug, logType, tag, jobId, executeCount, subTag);
List<LogLine> logs = initLogs.getData().getLogs();
if (logs == null) {
recordListLogCount(0);
} else {
recordListLogCount(logs.size());
}
return initLogs;
}
@Override
public CommonResult<QueryLogs> getMoreLogs(String userId, String projectId, String pipelineId,
String buildId, boolean debug, LogType logType, int num, boolean fromStart, long start, long end, String tag, String subTag, String jobId, int executeCount) {
return buildLogQueryService.getMoreLogs(userId, projectId, pipelineId, buildId, debug, logType, num, fromStart, start, end, tag, jobId, executeCount, subTag);
}
@Override
public CommonResult<QueryLogs> getAfterLogs(String userId, String projectId, String pipelineId, String buildId, long start, boolean debug, LogType logType, String tag, String subTag, String jobId, int executeCount) {
CommonResult<QueryLogs> afterLogs = buildLogQueryService.getAfterLogs(userId, projectId,
pipelineId, buildId, start, debug, logType, tag, jobId, executeCount, subTag);
List<LogLine> logs = afterLogs.getData().getLogs();
if (logs == null) {
recordListLogCount(0);
} else {
recordListLogCount(logs.size());
}
return afterLogs;
}
@Override
public ResponseEntity downloadLogs(String userId, String projectId, String pipelineId, String buildId, String tag, String subTag, String jobId, int executeCount, String fileName) {
return buildLogQueryService.downloadLogs(userId, projectId, pipelineId, buildId, tag, jobId, executeCount, fileName, subTag);
}
@Override
public CommonResult<QueryLogStatus> getLogMode(String userId, String projectId, String pipelineId, String buildId, String tag, int executeCount) {
return buildLogQueryService.getLogMode(userId, projectId, pipelineId, buildId, tag, executeCount);
}
private void recordListLogCount(int count) {
Counter.builder("list_log_count")
.tag("application", applicationName)
.register(meterRegistry)
.increment(count);
}
}

View File

@ -0,0 +1,22 @@
package cd.casic.pipeline.config;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Configuration;
/**
* @author by mianbin
* @Classname BuildLogPrinter
* @Description 输出构建日志
* @Date 2025/3/19 14:40
*/
@Slf4j
@Configuration
public class BuildLogPrinter {
private static String LOG_DEBUG_FLAG = "##[debug]";
private static String LOG_ERROR_FLAG = "##[error]";
private static String LOG_WARN_FLAG = "##[warning]";
}

View File

@ -0,0 +1,50 @@
package cd.casic.pipeline.dal.dao;
import cd.casic.framework.mybatis.core.mapper.BaseMapperX;
import cd.casic.pipeline.dal.dataobject.LogIndicesV2;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import org.apache.ibatis.annotations.Mapper;
import java.util.Date;
import java.util.Objects;
/**
* @author by mianbin
* @Classname IndexDao
* @Description LogIndicesV2 的mapper
* @Date 2025/3/20 10:07
*/
@Mapper
public interface IndexMapper extends BaseMapperX<LogIndicesV2> {
default void create(String buildId, String indexName, boolean enable) {
Date now = new Date();
LogIndicesV2 entity = new LogIndicesV2(buildId, indexName, 1, now, now, enable, true);
insert(entity);
}
/**
* 通过 id 查找 LogIndicesV2
* 该方法是可能返回 null 值的所以调用该方法的时候都应该对 null 值进行判断
*
* @param buildId
* @return
*/
default LogIndicesV2 getBuild(String buildId) {
return selectOne(Wrappers.<LogIndicesV2>lambdaQuery().eq(LogIndicesV2::getBuildId, buildId));
}
default String getIndexName(String buildId) {
LogIndicesV2 logIndices = getBuild(buildId);
if (logIndices == null)
return "";
return logIndices.getIndexName();
}
default boolean updateLastLineNum(String buildId, long latestLineNum) {
LogIndicesV2 logIndicesV2 = selectOne(LogIndicesV2::getBuildId, buildId);
if (Objects.nonNull(logIndicesV2)) {
logIndicesV2.setLastLineNum(latestLineNum);
}
return insertOrUpdate(logIndicesV2);
}
}

View File

@ -0,0 +1,15 @@
package cd.casic.pipeline.dal.dao;
import cd.casic.framework.mybatis.core.mapper.BaseMapperX;
import cd.casic.pipeline.dal.dataobject.LogStatus;
import org.apache.ibatis.annotations.Mapper;
/**
* @author by mianbin
* @Classname LogStatus
* @Description TODO
* @Date 2025/3/20 14:28
*/
@Mapper
public interface LogStatusMapper extends BaseMapperX<LogStatus> {
}

View File

@ -0,0 +1,45 @@
package cd.casic.pipeline.dal.dao;
import cd.casic.framework.mybatis.core.mapper.BaseMapperX;
import cd.casic.pipeline.dal.dataobject.LogSubTags;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* @author by mianbin
* @Classname LogTahMapper
* @Description TODO
* @Date 2025/3/20 10:13
*/
@Mapper
public interface LogTahMapper extends BaseMapperX<LogSubTags> {
default void save(String buildId, String tag, String subTags) {
LogSubTags logSubTags = new LogSubTags(buildId, tag, subTags);
insert(logSubTags);
// todo 如果存在的话就更新值
}
default String getSubTags(String buildId, String tag) {
LambdaQueryWrapper<LogSubTags> wrapper = Wrappers.<LogSubTags>lambdaQuery()
.eq(LogSubTags::getBuildId, buildId)
.eq(LogSubTags::getTag, tag);
LogSubTags one = selectOne(wrapper);
if (one != null) {
return one.getSubTags();
}
return null;
}
/**
* 删除所有 deleteList 里面的 buildId 构造的日志
*/
default void delete(List<String> deleteList) {
LambdaQueryWrapper<LogSubTags> wrapper = Wrappers.<LogSubTags>lambdaQuery().in(LogSubTags::getBuildId, deleteList);
delete(wrapper);
}
}

View File

@ -0,0 +1,55 @@
package cd.casic.pipeline.dal.dataobject;
import cd.casic.framework.mybatis.core.dataobject.BaseDO;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.util.Date;
/**
* @author by mianbin
* @Classname LogIndicesV2
* @Description TODO
* @Date 2025/3/19 17:16
*/
@Data
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "log_indices_v2", autoResultMap = true)
@EqualsAndHashCode(callSuper = true)
public class LogIndicesV2 extends BaseDO {
@TableId
private Long id;
private String buildId;
private String indexName;
private long lastLineNum;
/**
* build is enable v2 or not
*/
private boolean enable;
/**
* multi es log cluster name
*/
private String logClusterName;
/**
* use multi es log cluster or not
*/
private boolean useCluster;
public LogIndicesV2(String buildId, String indexName, long lastLineNum, Date createTime, Date updateTime, boolean enable, boolean useCluster) {
this.buildId = buildId;
this.indexName = indexName;
this.lastLineNum = lastLineNum;
this.enable = enable;
this.useCluster = useCluster;
}
}

View File

@ -0,0 +1,49 @@
package cd.casic.pipeline.dal.dataobject;
import cd.casic.framework.mybatis.core.dataobject.BaseDO;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.*;
import lombok.experimental.Accessors;
/**
* @author by mianbin
* @Classname LogStatus
* @Description TODO
* @Date 2025/3/19 17:24
*/
@Data
@Accessors(chain = true)
@AllArgsConstructor
@TableName(value = "log_status", autoResultMap = true)
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class LogStatus extends BaseDO {
@TableId
private Long id;
private String buildId;
private String tag;
private String subTag;
private String jobId;
private String mode;
private int executeCount;
private Boolean finished;
public LogStatus(String buildId, String tag, String subTag, String jobId, String mode, int executeCount, Boolean finished) {
this.buildId = buildId;
this.tag = tag;
this.subTag = subTag;
this.jobId = jobId;
this.mode = mode;
this.executeCount = executeCount;
this.finished = finished;
}
}

View File

@ -0,0 +1,44 @@
package cd.casic.pipeline.dal.dataobject;
import cd.casic.framework.mybatis.core.dataobject.BaseDO;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.*;
import lombok.experimental.Accessors;
/**
* @author by mianbin
* @Classname LogSubTags
* @Description TODO
* @Date 2025/3/19 17:31
*/
@Data
@Accessors(chain = true)
@TableName(value = "log_sub_tags", autoResultMap = true)
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class LogSubTags extends BaseDO {
@TableId
private long id;
/**
* 构建ID
*/
private String buildId;
/**
* 插件标签
*/
private String tag;
/**
* 插件子标签
*/
private String subTags;
public LogSubTags(String buildId, String tag, String subTags) {
this.buildId = buildId;
this.tag = tag;
this.subTags = subTags;
}
}

View File

@ -0,0 +1,29 @@
package cd.casic.pipeline.dal.pojo;
import cd.casic.pipeline.enums.LogStatusEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
* @author by mianbin
* @Classname EndPageQueryLogs
* @Date 2025/3/19 17:34
*/
@Data
@Schema(title = "结尾的日志查询模型")
public class EndPageQueryLogs {
@Schema(description = "构建ID", required = true)
private String buildId;
@Schema(description = "开始行号", required = true)
private long startLineNo = 0L;
@Schema(description = "结束行号", required = true)
private long endLineNo = 0L;
@Schema(description = "日志列表", required = true)
private List<LogLine> logs = new ArrayList<>();
@Schema(description = "所用时间", required = false)
private long timeUsed = 0;
@Schema(description = "日志查询状态", required = false)
private int status = LogStatusEnum.SUCCEED.status;
}

View File

@ -0,0 +1,41 @@
package cd.casic.pipeline.dal.pojo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
/**
* @author by mianbin
* @Classname LogLine
* @Date 2025/3/19 17:35
*/
@Data
@Schema(title = "日志模型")
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = false)
public class LogLine {
@Schema(description = "日志行号", required = true)
private long lineNo;
@Schema(description = "日志时间戳", required = true)
private long timestamp;
@Schema(description = "日志消息体", required = true)
private String message;
@Schema(description = "日志权重级", required = true)
private Byte priority = 0;
@Schema(description = "日志tag", required = true)
private String tag = "";
@Schema(description = "日志子tag", required = true)
private String subTag = "";
@Schema(description = "日志jobId", required = true)
private String jobId = "";
@Schema(description = "日志执行次数", required = true)
private int executeCount = 1;
@Override
public int hashCode() {
return (int) (lineNo ^ (lineNo >>> 32));
}
}

View File

@ -0,0 +1,27 @@
package cd.casic.pipeline.dal.pojo;
import cd.casic.framework.commons.pojo.PageResult;
import cd.casic.pipeline.enums.LogStatusEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
/**
* @author by mianbin
* @Classname PageQueryLogs
* @Date 2025/3/19 17:39
*/
@Data
@Schema(title = "日志查询模型")
public class PageQueryLogs {
@Schema(description = "构建ID", required = true)
String buildId;
@Schema(description = "是否结束", required = true)
boolean finished;
//todo Page分页类分页数据包装模型
@Schema(description = "日志列表", required = true)
PageResult<LogLine> logs;
@Schema(description = "所用时间", required = false)
long timeUsed = 0;
@Schema(description = "日志查询状态", required = false)
int status = LogStatusEnum.SUCCEED.status;
}

View File

@ -0,0 +1,24 @@
package cd.casic.pipeline.dal.pojo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author by mianbin
* @Classname QueryLogLineNum
* @Date 2025/3/19 17:47
*/
@Data
@Schema(title = "日志行号查询模型")
@AllArgsConstructor
@NoArgsConstructor
public class QueryLogLineNum {
@Schema(description = "构建ID", required = true)
String buildId;
@Schema(description = "是否结束", required = true)
boolean finished;
@Schema(description = "日志存储状态", required = false)
long lastLineNum;
}

View File

@ -0,0 +1,23 @@
package cd.casic.pipeline.dal.pojo;
import cd.casic.pipeline.enums.LogStorageMode;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
/**
* @author by mianbin
* @Classname QueryLogStatus
* @Date 2025/3/19 17:45
*/
@Data
@AllArgsConstructor
@Schema(description = "日志状态查询模型")
public class QueryLogStatus {
@Schema(description = "构建ID", required = true)
private String buildId;
@Schema(description = "是否结束", required = true)
private boolean finished;
@Schema(description = "日志存储状态")
private LogStorageMode logMode;
}

View File

@ -0,0 +1,35 @@
package cd.casic.pipeline.dal.pojo;
import cd.casic.pipeline.enums.LogStatusEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
* @author by mianbin
* @Classname QueryLogs
* @Date 2025/3/19 17:48
*/
@Data
@Schema(description = "日志查询模型")
public class QueryLogs {
@Schema(description = "构建ID", required = true)
private String buildId;
@Schema(description = "是否结束", required = true)
private boolean finished;
@Schema(description = "是否有后续日志")
private boolean hasMore = false;
@Schema(description = "日志列表", required = true)
// listOf() 不可变 ; mutableListOf 生成可变数组
private List<LogLine> logs = new ArrayList<>();
@Schema(description = "所用时间", required = false)
private long timeUsed = 0;
@Schema(description = "日志查询状态", required = false)
private int status = LogStatusEnum.SUCCEED.status;
@Schema(description = "日志子tag列表", required = false)
private List<String> subTags = null;
@Schema(description = "错误信息", required = false)
private String message = null;
}

View File

@ -0,0 +1,27 @@
package cd.casic.pipeline.dal.pojo;
import cd.casic.pipeline.enums.LogStorageMode;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.File;
/**
* @author by mianbin
* @Classname TaskBuildLogProperty
* @Date 2025/3/19 17:48
*/
@Data
@Schema(description = "任务构建日志属性")
public class TaskBuildLogProperty {
@Schema(description = "插件任务ID", required = true)
public String elementId;
@Schema(description = "日志文件子路径", required = true)
public String childPath;
@Schema(description = "日志zip文件子路径", required = true)
public String childZipPath;
@Schema(description = "日志文件句柄", required = true)
public File logFile;
@Schema(description = "日志的存储模式")
public LogStorageMode logStorageMode = LogStorageMode.UPLOAD;
}

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