From c0790d6a491985e70814d1b82c8031158aee5c1a Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Tue, 23 Jan 2018 13:43:58 -0500 Subject: [PATCH] Move x-pack-core to core package (elastic/x-pack-elasticsearch#3678) This commit moves the source file in x-pack-core to a org.elasticsearch.xpack.core package. This is to prevent issues where we have compile-time success reaching through packages that will cross module boundaries at runtime (due to being in different classloaders). By moving these to a separate package, we have compile-time safety. Follow-ups can consider build time checking that only this package is defined in x-pack-core, or sealing x-pack-core until modules arrive for us. Original commit: elastic/x-pack-elasticsearch@232e156e0e7318c0c8f8070ac3a7c3638d2e5a5a --- .../custom-roles-provider.asciidoc | 2 +- .../tribe-clients-integrations/java.asciidoc | 2 +- docs/en/watcher/java.asciidoc | 6 +- .../smoketest/XDocsClientYamlTestSuiteIT.java | 2 +- plugin/core/build.gradle | 2 +- .../license/ExpirationCallback.java | 2 +- .../elasticsearch/license/LicenseService.java | 6 +- .../org/elasticsearch/license/Licensing.java | 5 +- .../license/RestDeleteLicenseAction.java | 4 +- .../license/RestGetLicenseAction.java | 4 +- .../license/RestGetTrialStatus.java | 4 +- .../license/RestPostStartTrialLicense.java | 5 +- .../license/RestPutLicenseAction.java | 5 +- .../license/XPackInfoResponse.java | 2 +- .../license/XPackLicenseState.java | 4 +- .../xpack/{ => core}/ClientHelper.java | 2 +- .../{ => core}/EmptyXPackFeatureSet.java | 2 +- .../xpack/{ => core}/XPackBuild.java | 2 +- .../xpack/{ => core}/XPackClient.java | 20 +- .../{ => core}/XPackClientActionPlugin.java | 2 +- .../xpack/{ => core}/XPackClientPlugin.java | 213 +++++++++--------- .../xpack/{ => core}/XPackFeatureSet.java | 2 +- .../xpack/{ => core}/XPackField.java | 2 +- .../xpack/{ => core}/XPackPlugin.java | 27 +-- .../xpack/{ => core}/XPackSettings.java | 18 +- .../action/TransportXPackInfoAction.java | 7 +- .../action/TransportXPackUsageAction.java | 8 +- .../{ => core}/action/XPackInfoAction.java | 2 +- .../{ => core}/action/XPackInfoRequest.java | 2 +- .../action/XPackInfoRequestBuilder.java | 2 +- .../{ => core}/action/XPackUsageAction.java | 2 +- .../{ => core}/action/XPackUsageRequest.java | 2 +- .../action/XPackUsageRequestBuilder.java | 2 +- .../{ => core}/action/XPackUsageResponse.java | 4 +- .../common/IteratingActionListener.java | 2 +- .../common/socket/SocketAccess.java | 2 +- .../deprecation/DeprecationInfoAction.java | 4 +- .../deprecation/DeprecationIssue.java | 2 +- .../InstallXPackExtensionCommand.java | 4 +- .../extensions/ListXPackExtensionCommand.java | 7 +- .../RemoveXPackExtensionCommand.java | 5 +- .../xpack/core/extensions/XPackExtension.java | 98 ++++++++ .../extensions/XPackExtensionCli.java | 2 +- .../extensions/XPackExtensionInfo.java | 2 +- .../extensions/XPackExtensionPolicy.java | 2 +- .../extensions/XPackExtensionSecurity.java | 3 +- .../extensions/XPackExtensionsService.java | 2 +- .../graph/GraphFeatureSetUsage.java | 6 +- .../{ => core}/graph/action/Connection.java | 6 +- .../graph/action/GraphExploreAction.java | 2 +- .../graph/action/GraphExploreRequest.java | 2 +- .../action/GraphExploreRequestBuilder.java | 2 +- .../graph/action/GraphExploreResponse.java | 8 +- .../xpack/{ => core}/graph/action/Hop.java | 2 +- .../xpack/{ => core}/graph/action/Vertex.java | 26 ++- .../graph/action/VertexRequest.java | 4 +- .../xpack/{ => core}/ml/MLMetadataField.java | 2 +- .../ml/MachineLearningClientActionPlugin.java | 2 +- .../ml/MachineLearningFeatureSetUsage.java | 18 +- .../{ => core}/ml/MachineLearningField.java | 2 +- .../xpack/{ => core}/ml/MlClientHelper.java | 10 +- .../xpack/{ => core}/ml/MlMetaIndex.java | 8 +- .../xpack/{ => core}/ml/MlMetadata.java | 30 +-- .../xpack/{ => core}/ml/MlParserType.java | 2 +- .../{ => core}/ml/action/CloseJobAction.java | 6 +- .../ml/action/DeleteCalendarAction.java | 6 +- .../ml/action/DeleteCalendarEventAction.java | 8 +- .../ml/action/DeleteDatafeedAction.java | 6 +- .../ml/action/DeleteExpiredDataAction.java | 2 +- .../ml/action/DeleteFilterAction.java | 4 +- .../{ => core}/ml/action/DeleteJobAction.java | 8 +- .../ml/action/DeleteModelSnapshotAction.java | 8 +- .../ml/action/FinalizeJobExecutionAction.java | 2 +- .../{ => core}/ml/action/FlushJobAction.java | 6 +- .../ml/action/ForecastJobAction.java | 6 +- .../ml/action/GetBucketsAction.java | 14 +- .../ml/action/GetCalendarEventsAction.java | 14 +- .../ml/action/GetCalendarsAction.java | 8 +- .../ml/action/GetCategoriesAction.java | 12 +- .../ml/action/GetDatafeedsAction.java | 8 +- .../ml/action/GetDatafeedsStatsAction.java | 10 +- .../ml/action/GetFiltersAction.java | 8 +- .../ml/action/GetInfluencersAction.java | 12 +- .../{ => core}/ml/action/GetJobsAction.java | 8 +- .../ml/action/GetJobsStatsAction.java | 14 +- .../ml/action/GetModelSnapshotsAction.java | 12 +- .../ml/action/GetOverallBucketsAction.java | 12 +- .../ml/action/GetRecordsAction.java | 14 +- .../ml/action/IsolateDatafeedAction.java | 8 +- .../{ => core}/ml/action/JobTaskRequest.java | 6 +- .../ml/action/KillProcessAction.java | 2 +- .../{ => core}/ml/action/OpenJobAction.java | 10 +- .../ml/action/PostCalendarEventsAction.java | 10 +- .../{ => core}/ml/action/PostDataAction.java | 6 +- .../ml/action/PreviewDatafeedAction.java | 6 +- .../ml/action/PutCalendarAction.java | 10 +- .../ml/action/PutDatafeedAction.java | 4 +- .../{ => core}/ml/action/PutFilterAction.java | 8 +- .../{ => core}/ml/action/PutJobAction.java | 6 +- .../ml/action/RevertModelSnapshotAction.java | 8 +- .../ml/action/StartDatafeedAction.java | 10 +- .../ml/action/StopDatafeedAction.java | 8 +- .../ml/action/UpdateCalendarJobAction.java | 18 +- .../ml/action/UpdateDatafeedAction.java | 4 +- .../{ => core}/ml/action/UpdateJobAction.java | 4 +- .../ml/action/UpdateModelSnapshotAction.java | 10 +- .../ml/action/UpdateProcessAction.java | 8 +- .../ml/action/ValidateDetectorAction.java | 4 +- .../ml/action/ValidateJobConfigAction.java | 6 +- .../{ => core}/ml/action/util/PageParams.java | 2 +- .../{ => core}/ml/action/util/QueryPage.java | 4 +- .../{ => core}/ml/calendars/Calendar.java | 4 +- .../ml/calendars/ScheduledEvent.java | 22 +- .../ml/client/MachineLearningClient.java | 60 ++--- .../ml/datafeed/ChunkingConfig.java | 6 +- .../ml/datafeed/DatafeedConfig.java | 18 +- .../ml/datafeed/DatafeedJobValidator.java | 10 +- .../{ => core}/ml/datafeed/DatafeedState.java | 4 +- .../ml/datafeed/DatafeedUpdate.java | 10 +- .../ml/datafeed/extractor/DataExtractor.java | 2 +- .../ml/datafeed/extractor/ExtractorUtils.java | 6 +- .../ml/job/config/AnalysisConfig.java | 11 +- .../ml/job/config/AnalysisLimits.java | 8 +- .../config/CategorizationAnalyzerConfig.java | 6 +- .../{ => core}/ml/job/config/Condition.java | 6 +- .../{ => core}/ml/job/config/Connective.java | 2 +- .../ml/job/config/DataDescription.java | 10 +- .../config/DefaultDetectorDescription.java | 4 +- .../ml/job/config/DetectionRule.java | 8 +- .../{ => core}/ml/job/config/Detector.java | 12 +- .../xpack/{ => core}/ml/job/config/Job.java | 16 +- .../{ => core}/ml/job/config/JobState.java | 2 +- .../ml/job/config/JobTaskStatus.java | 6 +- .../{ => core}/ml/job/config/JobUpdate.java | 6 +- .../{ => core}/ml/job/config/MlFilter.java | 4 +- .../ml/job/config/ModelPlotConfig.java | 4 +- .../{ => core}/ml/job/config/Operator.java | 2 +- .../{ => core}/ml/job/config/RuleAction.java | 2 +- .../ml/job/config/RuleCondition.java | 8 +- .../ml/job/config/RuleConditionType.java | 2 +- .../{ => core}/ml/job/groups/GroupOrJob.java | 4 +- .../ml/job/groups/GroupOrJobLookup.java | 10 +- .../{ => core}/ml/job/messages/Messages.java | 4 +- .../persistence/AnomalyDetectorsIndex.java | 6 +- .../AnomalyDetectorsIndexFields.java | 2 +- .../persistence/BatchedBucketsIterator.java | 6 +- .../persistence/BatchedDocumentsIterator.java | 2 +- .../BatchedInfluencersIterator.java | 6 +- .../persistence/BatchedRecordsIterator.java | 6 +- .../persistence/BatchedResultsIterator.java | 4 +- .../job/persistence/BucketsQueryBuilder.java | 6 +- .../job/persistence/CalendarQueryBuilder.java | 6 +- .../persistence/ElasticsearchMappings.java | 40 ++-- .../persistence/InfluencersQueryBuilder.java | 4 +- .../ml/job/persistence/JobDataDeleter.java | 14 +- .../ml/job/persistence/JobProvider.java | 77 +++---- .../persistence/JobStorageDeletionTask.java | 14 +- .../job/persistence/RecordsQueryBuilder.java | 6 +- .../job/persistence/ResultsFilterBuilder.java | 4 +- .../ScheduledEventsQueryBuilder.java | 6 +- .../output/FlushAcknowledgement.java | 4 +- .../autodetect/params/AutodetectParams.java | 14 +- .../autodetect/state/CategorizerState.java | 2 +- .../process/autodetect/state/DataCounts.java | 6 +- .../autodetect/state/ModelSizeStats.java | 8 +- .../autodetect/state/ModelSnapshot.java | 6 +- .../autodetect/state/ModelSnapshotField.java | 2 +- .../process/autodetect/state/ModelState.java | 2 +- .../process/autodetect/state/Quantiles.java | 4 +- .../autodetect/writer/RecordWriter.java | 2 +- .../ml/job/results/AnomalyCause.java | 2 +- .../ml/job/results/AnomalyRecord.java | 10 +- .../{ => core}/ml/job/results/Bucket.java | 8 +- .../ml/job/results/BucketInfluencer.java | 8 +- .../ml/job/results/CategoryDefinition.java | 4 +- .../{ => core}/ml/job/results/Forecast.java | 6 +- .../ml/job/results/ForecastRequestStats.java | 4 +- .../{ => core}/ml/job/results/Influence.java | 2 +- .../{ => core}/ml/job/results/Influencer.java | 8 +- .../{ => core}/ml/job/results/ModelPlot.java | 6 +- .../ml/job/results/OverallBucket.java | 6 +- .../ml/job/results/PartitionScore.java | 2 +- .../ml/job/results/ReservedFieldNames.java | 16 +- .../{ => core}/ml/job/results/Result.java | 2 +- .../ml/notifications/AuditMessage.java | 6 +- .../ml/notifications/AuditorField.java | 2 +- .../{ => core}/ml/notifications/Level.java | 2 +- .../{ => core}/ml/utils/ExceptionsHelper.java | 4 +- .../xpack/{ => core}/ml/utils/Intervals.java | 2 +- .../xpack/{ => core}/ml/utils/MlStrings.java | 2 +- .../{ => core}/ml/utils/NameResolver.java | 3 +- .../{ => core}/ml/utils/ToXContentParams.java | 2 +- .../DateTimeFormatterTimestampConverter.java | 2 +- .../{ => core}/ml/utils/time/TimeUtils.java | 2 +- .../ml/utils/time/TimestampConverter.java | 2 +- .../monitoring/MonitoredSystem.java | 2 +- .../monitoring/MonitoringFeatureSetUsage.java | 6 +- .../monitoring/MonitoringField.java | 2 +- .../action/MonitoringBulkAction.java | 2 +- .../monitoring/action/MonitoringBulkDoc.java | 8 +- .../action/MonitoringBulkRequest.java | 4 +- .../action/MonitoringBulkRequestBuilder.java | 4 +- .../action/MonitoringBulkResponse.java | 2 +- .../monitoring/action/MonitoringIndex.java | 2 +- .../monitoring/client/MonitoringClient.java | 10 +- .../monitoring/exporter/MonitoringDoc.java | 6 +- .../exporter/MonitoringTemplateUtils.java | 6 +- .../persistent/AllocatedPersistentTask.java | 3 +- .../CompletionPersistentTaskAction.java | 4 +- .../NodePersistentTasksExecutor.java | 2 +- .../persistent/PersistentTaskParams.java | 2 +- .../persistent/PersistentTaskResponse.java | 4 +- .../PersistentTasksClusterService.java | 6 +- .../PersistentTasksCustomMetaData.java | 2 +- .../persistent/PersistentTasksExecutor.java | 6 +- .../PersistentTasksExecutorRegistry.java | 2 +- .../PersistentTasksNodeService.java | 4 +- .../persistent/PersistentTasksService.java | 8 +- .../RemovePersistentTaskAction.java | 4 +- .../persistent/StartPersistentTaskAction.java | 4 +- .../UpdatePersistentTaskStatusAction.java | 4 +- .../{ => core}/persistent/package-info.java | 25 +- .../{ => core}/rest/XPackRestHandler.java | 4 +- .../rest/action/RestXPackInfoAction.java | 8 +- .../rest/action/RestXPackUsageAction.java | 12 +- .../{ => core}/scheduler/SchedulerEngine.java | 2 +- .../{ => core}/security/ScrollHelper.java | 2 +- .../{ => core}/security/SecurityContext.java | 8 +- .../security/SecurityFeatureSetUsage.java | 6 +- .../{ => core}/security/SecurityField.java | 4 +- .../SecurityLifecycleServiceField.java | 2 +- .../{ => core}/security/SecuritySettings.java | 4 +- .../{ => core}/security/UserSettings.java | 6 +- .../action/realm/ClearRealmCacheAction.java | 2 +- .../action/realm/ClearRealmCacheRequest.java | 2 +- .../realm/ClearRealmCacheRequestBuilder.java | 2 +- .../action/realm/ClearRealmCacheResponse.java | 2 +- .../action/role/ClearRolesCacheAction.java | 2 +- .../action/role/ClearRolesCacheRequest.java | 2 +- .../role/ClearRolesCacheRequestBuilder.java | 2 +- .../action/role/ClearRolesCacheResponse.java | 2 +- .../action/role/DeleteRoleAction.java | 2 +- .../action/role/DeleteRoleRequest.java | 2 +- .../action/role/DeleteRoleRequestBuilder.java | 2 +- .../action/role/DeleteRoleResponse.java | 2 +- .../security/action/role/GetRolesAction.java | 2 +- .../security/action/role/GetRolesRequest.java | 2 +- .../action/role/GetRolesRequestBuilder.java | 2 +- .../action/role/GetRolesResponse.java | 4 +- .../security/action/role/PutRoleAction.java | 2 +- .../security/action/role/PutRoleRequest.java | 6 +- .../action/role/PutRoleRequestBuilder.java | 4 +- .../security/action/role/PutRoleResponse.java | 2 +- .../rolemapping/DeleteRoleMappingAction.java | 2 +- .../rolemapping/DeleteRoleMappingRequest.java | 2 +- .../DeleteRoleMappingRequestBuilder.java | 2 +- .../DeleteRoleMappingResponse.java | 2 +- .../rolemapping/GetRoleMappingsAction.java | 2 +- .../rolemapping/GetRoleMappingsRequest.java | 5 +- .../GetRoleMappingsRequestBuilder.java | 2 +- .../rolemapping/GetRoleMappingsResponse.java | 4 +- .../rolemapping/PutRoleMappingAction.java | 2 +- .../rolemapping/PutRoleMappingRequest.java | 22 +- .../PutRoleMappingRequestBuilder.java | 6 +- .../rolemapping/PutRoleMappingResponse.java | 2 +- .../action/saml/SamlAuthenticateAction.java | 2 +- .../action/saml/SamlAuthenticateRequest.java | 2 +- .../saml/SamlAuthenticateRequestBuilder.java | 2 +- .../action/saml/SamlAuthenticateResponse.java | 2 +- .../saml/SamlInvalidateSessionAction.java | 2 +- .../saml/SamlInvalidateSessionRequest.java | 2 +- .../SamlInvalidateSessionRequestBuilder.java | 2 +- .../saml/SamlInvalidateSessionResponse.java | 2 +- .../action/saml/SamlLogoutAction.java | 2 +- .../action/saml/SamlLogoutRequest.java | 2 +- .../action/saml/SamlLogoutRequestBuilder.java | 2 +- .../action/saml/SamlLogoutResponse.java | 2 +- .../saml/SamlPrepareAuthenticationAction.java | 2 +- .../SamlPrepareAuthenticationRequest.java | 2 +- ...mlPrepareAuthenticationRequestBuilder.java | 2 +- .../SamlPrepareAuthenticationResponse.java | 2 +- .../action/token/CreateTokenAction.java | 2 +- .../action/token/CreateTokenRequest.java | 4 +- .../token/CreateTokenRequestBuilder.java | 2 +- .../action/token/CreateTokenResponse.java | 2 +- .../action/token/InvalidateTokenAction.java | 2 +- .../action/token/InvalidateTokenRequest.java | 2 +- .../token/InvalidateTokenRequestBuilder.java | 2 +- .../action/token/InvalidateTokenResponse.java | 2 +- .../action/token/RefreshTokenAction.java | 2 +- .../action/user/AuthenticateAction.java | 2 +- .../action/user/AuthenticateRequest.java | 2 +- .../user/AuthenticateRequestBuilder.java | 2 +- .../action/user/AuthenticateResponse.java | 4 +- .../action/user/ChangePasswordAction.java | 2 +- .../action/user/ChangePasswordRequest.java | 5 +- .../user/ChangePasswordRequestBuilder.java | 10 +- .../action/user/ChangePasswordResponse.java | 2 +- .../action/user/DeleteUserAction.java | 2 +- .../action/user/DeleteUserRequest.java | 2 +- .../action/user/DeleteUserRequestBuilder.java | 2 +- .../action/user/DeleteUserResponse.java | 2 +- .../security/action/user/GetUsersAction.java | 2 +- .../security/action/user/GetUsersRequest.java | 2 +- .../action/user/GetUsersRequestBuilder.java | 2 +- .../action/user/GetUsersResponse.java | 4 +- .../action/user/HasPrivilegesAction.java | 5 +- .../action/user/HasPrivilegesRequest.java | 8 +- .../user/HasPrivilegesRequestBuilder.java | 9 +- .../action/user/HasPrivilegesResponse.java | 2 +- .../security/action/user/PutUserAction.java | 2 +- .../security/action/user/PutUserRequest.java | 8 +- .../action/user/PutUserRequestBuilder.java | 10 +- .../security/action/user/PutUserResponse.java | 2 +- .../action/user/SetEnabledAction.java | 2 +- .../action/user/SetEnabledRequest.java | 6 +- .../action/user/SetEnabledRequestBuilder.java | 2 +- .../action/user/SetEnabledResponse.java | 2 +- .../security/action/user/UserRequest.java | 2 +- .../security/authc/Authentication.java | 6 +- .../authc/AuthenticationFailureHandler.java | 2 +- .../security/authc/AuthenticationField.java | 2 +- .../security/authc/AuthenticationResult.java | 8 +- .../authc/AuthenticationServiceField.java | 4 +- .../security/authc/AuthenticationToken.java | 2 +- .../DefaultAuthenticationFailureHandler.java | 4 +- .../authc/InternalRealmsSettings.java | 12 +- .../security/authc/KeyAndTimestamp.java | 2 +- .../{ => core}/security/authc/Realm.java | 15 +- .../security/authc/RealmConfig.java | 2 +- .../security/authc/RealmSettings.java | 18 +- .../security/authc/TokenMetaData.java | 2 +- .../authc/esnative/ClientReservedRealm.java | 8 +- .../authc/esnative/NativeRealmSettings.java | 4 +- .../authc/file/FileRealmSettings.java | 4 +- ...ActiveDirectorySessionFactorySettings.java | 22 +- .../authc/ldap/LdapRealmSettings.java | 10 +- .../ldap/LdapSessionFactorySettings.java | 4 +- .../LdapUserSearchSessionFactorySettings.java | 16 +- .../ldap/PoolingSessionFactorySettings.java | 39 ++++ .../ldap/SearchGroupsResolverSettings.java | 12 +- .../UserAttributeGroupsResolverSettings.java | 4 +- .../support/LdapLoadBalancingSettings.java | 2 +- .../support/LdapMetaDataResolverSettings.java | 2 +- .../authc/ldap/support/LdapSearchScope.java | 2 +- .../ldap/support/SessionFactorySettings.java | 4 +- .../security/authc/pki/PkiRealmSettings.java | 12 +- .../authc/saml/SamlRealmSettings.java | 12 +- .../security/authc/support/BCrypt.java | 2 +- .../CachingUsernamePasswordRealmSettings.java | 2 +- .../security/authc/support/CharArrays.java | 2 +- .../authc/support/DnRoleMapperSettings.java | 2 +- .../security/authc/support/Hasher.java | 16 +- .../authc/support/UsernamePasswordToken.java | 6 +- .../mapper/CompositeRoleMapperSettings.java | 4 +- .../support/mapper/ExpressionRoleMapping.java | 21 +- .../mapper/NativeRoleMappingStoreField.java | 2 +- .../mapper/expressiondsl/AllExpression.java | 2 +- .../mapper/expressiondsl/AnyExpression.java | 2 +- .../expressiondsl/ExceptExpression.java | 2 +- .../expressiondsl/ExpressionParser.java | 21 +- .../mapper/expressiondsl/FieldExpression.java | 4 +- .../expressiondsl/RoleMapperExpression.java | 2 +- .../authz/AuthorizationServiceField.java | 2 +- .../authz/IndicesAndAliasesResolverField.java | 2 +- .../security/authz/RoleDescriptor.java | 8 +- .../accesscontrol/DocumentSubsetReader.java | 2 +- .../accesscontrol/FieldSubsetReader.java | 2 +- .../accesscontrol/IndicesAccessControl.java | 6 +- .../SecurityIndexSearcherWrapper.java | 13 +- .../SetSecurityUserProcessor.java | 12 +- .../authz/permission/ClusterPermission.java | 4 +- .../authz/permission/FieldPermissions.java | 11 +- .../permission/FieldPermissionsCache.java | 8 +- .../FieldPermissionsDefinition.java | 2 +- .../authz/permission/IndicesPermission.java | 8 +- .../security/authz/permission/Role.java | 15 +- .../authz/permission/RunAsPermission.java | 4 +- .../authz/privilege/ClusterPrivilege.java | 20 +- .../privilege/HealthAndStatsPrivilege.java | 2 +- .../authz/privilege/IndexPrivilege.java | 8 +- .../security/authz/privilege/Privilege.java | 6 +- .../authz/privilege/SystemPrivilege.java | 4 +- .../authz/store/ReservedRolesStore.java | 25 +- .../security/client/SecurityClient.java | 134 +++++------ .../security}/index/IndexAuditTrailField.java | 2 +- .../security/rest/RestRequestFilter.java | 2 +- .../security/support/Automatons.java | 2 +- .../security/support/Exceptions.java | 4 +- .../security/support/MetadataUtils.java | 2 +- .../security/support/NoOpLogger.java | 2 +- .../security/support/Validation.java | 6 +- .../transport/SSLExceptionHelper.java | 2 +- .../netty4/SecurityNetty4Transport.java | 14 +- .../security/user/AnonymousUser.java | 6 +- .../security/user/BuiltinUserInfo.java | 2 +- .../{ => core}/security/user/ElasticUser.java | 4 +- .../user/InternalUserSerializationHelper.java | 2 +- .../{ => core}/security/user/KibanaUser.java | 4 +- .../security/user/LogstashSystemUser.java | 4 +- .../{ => core}/security/user/SystemUser.java | 4 +- .../xpack/{ => core}/security/user/User.java | 4 +- .../security/user/UsernamesField.java | 2 +- .../security/user/XPackSecurityUser.java | 2 +- .../{ => core}/security/user/XPackUser.java | 10 +- .../security}/xcontent/XContentUtils.java | 2 +- .../xpack/{ => core}/ssl/CertUtils.java | 103 ++++----- .../ssl/CertificateGenerateTool.java | 63 +++--- .../xpack/{ => core}/ssl/CertificateTool.java | 70 +++--- .../ssl/CertificateTrustRestrictions.java | 6 +- .../{ => core}/ssl/DefaultJDKTrustConfig.java | 6 +- .../xpack/{ => core}/ssl/KeyConfig.java | 5 +- .../xpack/{ => core}/ssl/PEMKeyConfig.java | 15 +- .../xpack/{ => core}/ssl/PEMTrustConfig.java | 15 +- .../{ => core}/ssl/RestrictedTrustConfig.java | 15 +- .../ssl/RestrictedTrustManager.java | 25 +- .../xpack/{ => core}/ssl/SSLClientAuth.java | 3 +- .../{ => core}/ssl/SSLConfiguration.java | 16 +- .../ssl/SSLConfigurationReloader.java | 4 +- .../ssl/SSLConfigurationSettings.java | 17 +- .../xpack/{ => core}/ssl/SSLService.java | 33 +-- .../xpack/{ => core}/ssl/StoreKeyConfig.java | 15 +- .../{ => core}/ssl/StoreTrustConfig.java | 15 +- .../ssl/TLSLicenseBootstrapCheck.java | 4 +- .../xpack/{ => core}/ssl/TrustAllConfig.java | 5 +- .../xpack/{ => core}/ssl/TrustConfig.java | 13 +- .../{ => core}/ssl/VerificationMode.java | 2 +- .../{ => core}/ssl/X509KeyPairSettings.java | 20 +- .../ssl/action/GetCertificateInfoAction.java | 4 +- .../TransportGetCertificateInfoAction.java | 6 +- .../{ => core}/ssl/cert/CertificateInfo.java | 2 +- .../rest/RestGetCertificateInfoAction.java | 11 +- .../{ => core}/template/TemplateUtils.java | 2 +- .../upgrade/IndexUpgradeCheckVersion.java | 2 +- .../upgrade/IndexUpgradeServiceFields.java | 2 +- .../upgrade/UpgradeActionRequired.java | 2 +- .../{ => core}/upgrade/UpgradeField.java | 2 +- .../upgrade/actions/IndexUpgradeAction.java | 4 +- .../actions/IndexUpgradeInfoAction.java | 4 +- .../watcher/WatcherFeatureSetUsage.java | 6 +- .../{ => core}/watcher/WatcherField.java | 2 +- .../{ => core}/watcher/WatcherMetaData.java | 2 +- .../{ => core}/watcher/WatcherState.java | 2 +- .../{ => core}/watcher/actions/Action.java | 2 +- .../watcher/actions/ActionFactory.java | 2 +- .../watcher/actions/ActionRegistry.java | 8 +- .../watcher/actions/ActionStatus.java | 6 +- .../watcher/actions/ActionWrapper.java | 25 +- .../watcher/actions/ActionWrapperField.java | 2 +- .../watcher/actions/ActionWrapperResult.java | 8 +- .../watcher/actions/ExecutableAction.java | 6 +- .../actions/throttler/AckThrottler.java | 12 +- .../actions/throttler/ActionThrottler.java | 6 +- .../actions/throttler/PeriodThrottler.java | 8 +- .../watcher/actions/throttler/Throttler.java | 7 +- .../actions/throttler/ThrottlerField.java | 2 +- .../watcher/client/WatchSourceBuilder.java | 24 +- .../watcher/client/WatcherClient.java | 66 +++--- .../watcher/common/secret/Secret.java | 4 +- .../common/xcontent/XContentUtils.java | 2 +- .../watcher/condition/AlwaysCondition.java | 2 +- .../watcher/condition/Condition.java | 2 +- .../watcher/condition/ConditionFactory.java | 2 +- .../watcher/condition/ConditionRegistry.java | 2 +- .../condition/ExecutableCondition.java | 4 +- .../watcher/crypto/CryptoService.java | 9 +- .../execution/ActionExecutionMode.java | 4 +- .../watcher/execution/ExecutionPhase.java | 2 +- .../watcher/execution/ExecutionState.java | 2 +- .../watcher/execution/QueuedWatch.java | 3 +- .../execution/TriggeredWatchStoreField.java | 2 +- .../execution/WatchExecutionContext.java | 18 +- .../execution/WatchExecutionResult.java | 12 +- .../execution/WatchExecutionSnapshot.java | 6 +- .../{ => core}/watcher/execution/Wid.java | 4 +- .../watcher/history/HistoryStoreField.java | 4 +- .../watcher/history/WatchRecord.java | 28 +-- .../watcher/input/ExecutableInput.java | 6 +- .../xpack/{ => core}/watcher/input/Input.java | 4 +- .../watcher/input/none/NoneInput.java | 6 +- .../watcher/support/Exceptions.java | 2 +- .../watcher/support/WatcherDateTimeUtils.java | 2 +- .../WatcherIndexTemplateRegistryField.java | 2 +- .../watcher/support/WatcherUtils.java | 4 +- .../watcher/support/xcontent/ObjectPath.java | 2 +- .../support/xcontent/WatcherParams.java | 2 +- .../xcontent/WatcherXContentParser.java | 6 +- .../support/xcontent/XContentSource.java | 4 +- .../transform/ExecutableTransform.java | 6 +- .../watcher/transform/Transform.java | 4 +- .../watcher/transform/TransformFactory.java | 2 +- .../watcher/transform/TransformRegistry.java | 6 +- .../transform/chain/ChainTransform.java | 8 +- .../chain/ChainTransformFactory.java | 10 +- .../chain/ExecutableChainTransform.java | 12 +- .../transport/actions/ack/AckWatchAction.java | 2 +- .../actions/ack/AckWatchRequest.java | 4 +- .../actions/ack/AckWatchRequestBuilder.java | 2 +- .../actions/ack/AckWatchResponse.java | 4 +- .../actions/activate/ActivateWatchAction.java | 2 +- .../activate/ActivateWatchRequest.java | 4 +- .../activate/ActivateWatchRequestBuilder.java | 2 +- .../activate/ActivateWatchResponse.java | 4 +- .../actions/delete/DeleteWatchAction.java | 2 +- .../actions/delete/DeleteWatchRequest.java | 4 +- .../delete/DeleteWatchRequestBuilder.java | 2 +- .../actions/delete/DeleteWatchResponse.java | 2 +- .../actions/execute/ExecuteWatchAction.java | 2 +- .../actions/execute/ExecuteWatchRequest.java | 10 +- .../execute/ExecuteWatchRequestBuilder.java | 8 +- .../actions/execute/ExecuteWatchResponse.java | 4 +- .../transport/actions/get/GetWatchAction.java | 2 +- .../actions/get/GetWatchRequest.java | 4 +- .../actions/get/GetWatchRequestBuilder.java | 2 +- .../actions/get/GetWatchResponse.java | 6 +- .../transport/actions/put/PutWatchAction.java | 2 +- .../actions/put/PutWatchRequest.java | 6 +- .../actions/put/PutWatchRequestBuilder.java | 4 +- .../actions/put/PutWatchResponse.java | 2 +- .../actions/service/WatcherServiceAction.java | 2 +- .../service/WatcherServiceRequest.java | 2 +- .../service/WatcherServiceRequestBuilder.java | 2 +- .../service/WatcherServiceResponse.java | 2 +- .../actions/stats/WatcherStatsAction.java | 2 +- .../actions/stats/WatcherStatsRequest.java | 2 +- .../stats/WatcherStatsRequestBuilder.java | 2 +- .../actions/stats/WatcherStatsResponse.java | 10 +- .../{ => core}/watcher/trigger/Trigger.java | 2 +- .../watcher/trigger/TriggerEvent.java | 4 +- .../{ => core}/watcher/watch/Payload.java | 4 +- .../xpack/{ => core}/watcher/watch/Watch.java | 14 +- .../{ => core}/watcher/watch/WatchField.java | 2 +- .../{ => core}/watcher/watch/WatchStatus.java | 28 +-- .../xpack/extensions/XPackExtension.java | 55 ----- .../xpack/security/SecurityExtension.java | 8 +- .../ldap/PoolingSessionFactorySettings.java | 39 ---- .../AbstractLicenseServiceTestCase.java | 2 +- .../AbstractLicensesIntegrationTestCase.java | 6 +- .../license/LicenseScheduleTests.java | 2 +- ...icenseServiceClusterNotRecoveredTests.java | 2 +- .../license/LicenseServiceClusterTests.java | 4 +- .../license/LicensesManagerServiceTests.java | 4 +- .../license/LicensesTransportTests.java | 4 +- .../license/UpgradeToTrialTests.java | 4 +- .../xpack/{ => core}/ClientHelperTests.java | 3 +- .../LocalStateCompositeXPackPlugin.java | 5 +- .../{ => core}/TestXPackTransportClient.java | 2 +- .../xpack/{ => core}/XPackSettingsTests.java | 3 +- .../action/TransportXPackInfoActionTests.java | 4 +- .../common/IteratingActionListenerTests.java | 2 +- .../deprecation/DeprecationChecksTests.java | 2 +- .../DeprecationInfoActionRequestTests.java | 2 +- .../DeprecationInfoActionResponseTests.java | 2 +- .../deprecation/DeprecationIssueTests.java | 4 +- .../InstallXPackExtensionCommandTests.java | 2 +- .../ListXPackExtensionCommandTests.java | 6 +- .../RemoveXPackExtensionCommandTests.java | 2 +- .../extensions/XPackExtensionInfoTests.java | 2 +- .../XPackExtensionSecurityTests.java | 2 +- .../extensions/XPackExtensionTestUtil.java | 2 +- .../XPackExtensionsServiceTests.java | 2 +- .../StartDatafeedActionRequestTests.java | 6 +- .../ml/calendars/ScheduledEventTests.java | 14 +- .../ml/datafeed/ChunkingConfigTests.java | 2 +- .../ml/datafeed/DatafeedConfigTests.java | 6 +- .../ml/datafeed/DatafeedUpdateTests.java | 4 +- .../extractor/ExtractorUtilsTests.java | 2 +- .../integration/MlRestTestStateCleaner.java | 2 +- .../ml/job/config/AnalysisConfigTests.java | 6 +- .../ml/job/config/AnalysisLimitsTests.java | 4 +- .../ml/job/config/DataDescriptionTests.java | 9 +- .../ml/job/config/DetectionRuleTests.java | 2 +- .../core}/ml/job/config/DetectorTests.java | 6 +- .../xpack/core}/ml/job/config/JobTests.java | 10 +- .../core}/ml/job/config/JobUpdateTests.java | 2 +- .../ml/job/config/RuleConditionTests.java | 4 +- .../ml/job/groups/GroupOrJobLookupTests.java | 5 +- .../core}/ml/job/groups/GroupOrJobTests.java | 5 +- .../ElasticsearchMappingsTests.java | 18 +- .../ml/job/results/AnomalyCauseTests.java | 4 +- .../ml/job/results/AnomalyRecordTests.java | 6 +- .../ml/job/results/BucketInfluencerTests.java | 2 +- .../core}/ml/job/results/InfluencerTests.java | 3 +- .../ml/notifications/AuditMessageTests.java | 2 +- .../test/MockPainlessScriptEngine.java | 2 +- .../CancelPersistentTaskRequestTests.java | 4 +- .../PersistentTasksClusterServiceTests.java | 12 +- .../PersistentTasksCustomMetaDataTests.java | 16 +- .../PersistentTasksExecutorFullRestartIT.java | 10 +- .../persistent/PersistentTasksExecutorIT.java | 14 +- .../PersistentTasksExecutorResponseTests.java | 8 +- ...PersistentTasksNodeServiceStatusTests.java | 4 +- .../PersistentTasksNodeServiceTests.java | 11 +- .../RestartPersistentTaskRequestTests.java | 4 +- .../StartPersistentActionRequestTests.java | 8 +- .../persistent/TestPersistentTasksPlugin.java | 6 +- .../UpdatePersistentTaskRequestTests.java | 8 +- .../audit/logfile/CapturingLogger.java | 2 +- .../expressiondsl/ExpressionParserTests.java | 21 +- .../DocumentSubsetReaderTests.java | 5 +- .../accesscontrol/FieldSubsetReaderTests.java | 10 +- ...yIndexSearcherWrapperIntegrationTests.java | 4 +- ...SecurityIndexSearcherWrapperUnitTests.java | 16 +- .../SetSecurityUserProcessorFactoryTests.java | 4 +- .../FieldPermissionsCacheTests.java | 2 +- .../authz/privilege/PrivilegeTests.java | 4 +- .../authz/store/ReservedRolesStoreTests.java | 128 +++++------ .../security/support/AutomatonsTests.java | 10 +- .../security/support/ValidationTests.java | 14 +- .../security/test/SecurityAssertions.java | 4 +- .../xpack/{ => core}/ssl/CertUtilsTests.java | 18 +- .../ssl/RestrictedTrustConfigTests.java | 17 +- .../ssl/RestrictedTrustManagerTests.java | 24 +- .../ssl/SSLConfigurationReloaderTests.java | 3 +- .../ssl/SSLConfigurationSettingsTests.java | 11 +- .../{ => core}/ssl/SSLConfigurationTests.java | 17 +- .../xpack/{ => core}/ssl/SSLServiceTests.java | 47 ++-- .../{ => core}/ssl/StoreKeyConfigTests.java | 13 +- .../ssl/TLSLicenseBootstrapCheckTests.java | 2 +- .../xpack/{ => core}/ssl/TestsSSLService.java | 3 +- .../ssl/cert/CertificateInfoTests.java | 19 +- .../template/TemplateUtilsTests.java | 3 +- .../throttler/WatchThrottlerTests.java | 4 +- .../watcher/crypto/CryptoServiceTests.java | 5 +- .../watcher/watch}/ClockMock.java | 2 +- .../xpack/test/rest/XPackRestTestHelper.java | 6 +- .../complex-x-pack-extension-security.policy | 0 .../simple-x-pack-extension-security.policy | 0 ...nresolved-x-pack-extension-security.policy | 0 .../xpack/deprecation/Deprecation.java | 2 +- .../xpack/deprecation/DeprecationChecks.java | 10 +- .../deprecation/IndexDeprecationChecks.java | 2 +- .../RestDeprecationInfoAction.java | 3 +- .../TransportDeprecationInfoAction.java | 5 +- .../IndexDeprecationChecksTests.java | 2 + .../org/elasticsearch/xpack/graph/Graph.java | 6 +- .../xpack/graph/GraphFeatureSet.java | 7 +- .../action/TransportGraphExploreAction.java | 58 +++-- .../graph/rest/action/RestGraphAction.java | 14 +- .../xpack/graph/GraphFeatureSetTests.java | 3 +- .../xpack/graph/test/GraphTests.java | 16 +- .../xpack/logstash/Logstash.java | 8 +- .../xpack/logstash/LogstashFeatureSet.java | 4 +- .../logstash/LogstashFeatureSetTests.java | 2 +- .../xpack/ml/MachineLearning.java | 125 +++++----- .../xpack/ml/MachineLearningFeatureSet.java | 25 +- .../xpack/ml/MlAssignmentNotifier.java | 14 +- .../xpack/ml/MlDailyMaintenanceService.java | 6 +- .../xpack/ml/MlInitializationService.java | 2 + .../ml/action/TransportCloseJobAction.java | 28 +-- .../action/TransportDeleteCalendarAction.java | 11 +- .../TransportDeleteCalendarEventAction.java | 13 +- .../action/TransportDeleteDatafeedAction.java | 14 +- .../TransportDeleteExpiredDataAction.java | 1 + .../action/TransportDeleteFilterAction.java | 19 +- .../ml/action/TransportDeleteJobAction.java | 18 +- .../TransportDeleteModelSnapshotAction.java | 11 +- .../TransportFinalizeJobExecutionAction.java | 7 +- .../ml/action/TransportFlushJobAction.java | 1 + .../ml/action/TransportForecastJobAction.java | 11 +- .../ml/action/TransportGetBucketsAction.java | 5 +- .../TransportGetCalendarEventsAction.java | 18 +- .../action/TransportGetCalendarsAction.java | 31 +-- .../action/TransportGetCategoriesAction.java | 3 +- .../action/TransportGetDatafeedsAction.java | 9 +- .../TransportGetDatafeedsStatsAction.java | 13 +- .../ml/action/TransportGetFiltersAction.java | 15 +- .../action/TransportGetInfluencersAction.java | 5 +- .../ml/action/TransportGetJobsAction.java | 5 +- .../action/TransportGetJobsStatsAction.java | 19 +- .../TransportGetModelSnapshotsAction.java | 7 +- .../TransportGetOverallBucketsAction.java | 25 +- .../ml/action/TransportGetRecordsAction.java | 5 +- .../TransportIsolateDatafeedAction.java | 5 +- .../ml/action/TransportJobTaskAction.java | 7 +- .../ml/action/TransportKillProcessAction.java | 9 +- .../ml/action/TransportOpenJobAction.java | 39 ++-- .../TransportPostCalendarEventsAction.java | 15 +- .../ml/action/TransportPostDataAction.java | 2 +- .../TransportPreviewDatafeedAction.java | 17 +- .../ml/action/TransportPutCalendarAction.java | 15 +- .../ml/action/TransportPutDatafeedAction.java | 21 +- .../ml/action/TransportPutFilterAction.java | 11 +- .../ml/action/TransportPutJobAction.java | 3 +- .../TransportRevertModelSnapshotAction.java | 15 +- .../action/TransportStartDatafeedAction.java | 27 +-- .../action/TransportStopDatafeedAction.java | 17 +- .../TransportUpdateCalendarJobAction.java | 4 +- .../action/TransportUpdateDatafeedAction.java | 12 +- .../ml/action/TransportUpdateJobAction.java | 2 + .../TransportUpdateModelSnapshotAction.java | 15 +- .../action/TransportUpdateProcessAction.java | 1 + .../TransportValidateDetectorAction.java | 1 + .../TransportValidateJobConfigAction.java | 1 + .../xpack/ml/datafeed/DatafeedJob.java | 16 +- .../xpack/ml/datafeed/DatafeedJobBuilder.java | 17 +- .../xpack/ml/datafeed/DatafeedManager.java | 29 ++- .../ml/datafeed/DatafeedNodeSelector.java | 13 +- .../xpack/ml/datafeed/ProblemTracker.java | 2 +- .../extractor/DataExtractorFactory.java | 5 +- .../aggregation/AggregationDataExtractor.java | 6 +- .../AggregationDataExtractorFactory.java | 8 +- .../AggregationToJsonProcessor.java | 4 +- .../chunked/ChunkedDataExtractor.java | 6 +- .../chunked/ChunkedDataExtractorFactory.java | 8 +- .../extractor/scroll/ExtractedFields.java | 8 +- .../extractor/scroll/ScrollDataExtractor.java | 6 +- .../scroll/ScrollDataExtractorFactory.java | 10 +- .../xpack/ml/job/JobManager.java | 38 ++-- .../ml/job/UpdateJobProcessNotifier.java | 10 +- .../CategorizationAnalyzer.java | 2 +- .../persistence/JobDataCountsPersister.java | 8 +- .../JobRenormalizedResultsPersister.java | 10 +- .../job/persistence/JobResultsPersister.java | 35 +-- .../ml/job/persistence/StateStreamer.java | 10 +- .../OverallBucketsAggregator.java | 4 +- .../OverallBucketsCollector.java | 2 +- .../OverallBucketsProcessor.java | 2 +- .../OverallBucketsProvider.java | 6 +- .../ml/job/process/DataCountsReporter.java | 4 +- .../ml/job/process/DataStreamDiagnostics.java | 2 +- .../job/process/NativeControllerHolder.java | 2 +- .../xpack/ml/job/process/ProcessCtrl.java | 8 +- .../process/autodetect/AutodetectBuilder.java | 12 +- .../autodetect/AutodetectCommunicator.java | 22 +- .../process/autodetect/AutodetectProcess.java | 10 +- .../autodetect/AutodetectProcessFactory.java | 8 +- .../autodetect/AutodetectProcessManager.java | 28 +-- .../BlackHoleAutodetectProcess.java | 16 +- .../autodetect/NativeAutodetectProcess.java | 14 +- .../NativeAutodetectProcessFactory.java | 6 +- .../process/autodetect/ProcessContext.java | 4 +- .../job/process/autodetect/UpdateParams.java | 6 +- .../output/AutoDetectResultProcessor.java | 35 +-- .../autodetect/output/FlushListener.java | 1 + .../autodetect/output/StateProcessor.java | 8 +- .../autodetect/params/DataLoadParams.java | 2 +- .../autodetect/params/FlushJobParams.java | 6 +- .../process/autodetect/params/TimeRange.java | 6 +- .../writer/AbstractDataToProcessWriter.java | 4 +- .../writer/AnalysisLimitsWriter.java | 2 +- .../writer/ControlMsgToProcessWriter.java | 8 +- .../writer/CsvDataToProcessWriter.java | 6 +- .../autodetect/writer/CsvRecordWriter.java | 1 + .../writer/DataToProcessWriter.java | 2 +- .../writer/DataToProcessWriterFactory.java | 4 +- .../writer/DateFormatDateTransformer.java | 4 +- .../autodetect/writer/FieldConfigWriter.java | 14 +- .../writer/JsonDataToProcessWriter.java | 6 +- .../writer/LengthEncodedWriter.java | 2 + .../autodetect/writer/MlFilterWriter.java | 2 +- .../writer/ModelPlotConfigWriter.java | 2 +- .../writer/ScheduledEventsWriter.java | 2 +- .../BucketInfluencerNormalizable.java | 2 +- .../normalizer/BucketNormalizable.java | 2 +- .../normalizer/InfluencerNormalizable.java | 2 +- .../normalizer/NativeNormalizerProcess.java | 2 +- .../NativeNormalizerProcessFactory.java | 2 +- .../PartitionScoreNormalizable.java | 2 +- .../normalizer/RecordNormalizable.java | 2 +- .../job/process/normalizer/Renormalizer.java | 2 +- .../job/process/normalizer/ScoresUpdater.java | 14 +- .../ShortCircuitingRenormalizer.java | 2 +- .../ml/job/results/AutodetectResult.java | 15 +- .../AbstractExpiredJobDataRemover.java | 8 +- .../retention/ExpiredForecastsRemover.java | 10 +- .../ExpiredModelSnapshotsRemover.java | 10 +- .../job/retention/ExpiredResultsRemover.java | 18 +- .../xpack/ml/notifications/Auditor.java | 6 +- .../ml/rest/RestDeleteExpiredDataAction.java | 2 +- .../calendar/RestDeleteCalendarAction.java | 4 +- .../RestDeleteCalendarEventAction.java | 6 +- .../calendar/RestDeleteCalendarJobAction.java | 6 +- .../calendar/RestGetCalendarEventsAction.java | 8 +- .../rest/calendar/RestGetCalendarsAction.java | 6 +- .../calendar/RestPostCalendarEventAction.java | 4 +- .../rest/calendar/RestPutCalendarAction.java | 4 +- .../calendar/RestPutCalendarJobAction.java | 6 +- .../datafeeds/RestDeleteDatafeedAction.java | 6 +- .../datafeeds/RestGetDatafeedStatsAction.java | 4 +- .../datafeeds/RestGetDatafeedsAction.java | 4 +- .../datafeeds/RestPreviewDatafeedAction.java | 4 +- .../rest/datafeeds/RestPutDatafeedAction.java | 4 +- .../datafeeds/RestStartDatafeedAction.java | 4 +- .../datafeeds/RestStopDatafeedAction.java | 6 +- .../datafeeds/RestUpdateDatafeedAction.java | 4 +- .../rest/filter/RestDeleteFilterAction.java | 4 +- .../ml/rest/filter/RestGetFiltersAction.java | 6 +- .../ml/rest/filter/RestPutFilterAction.java | 4 +- .../xpack/ml/rest/job/RestCloseJobAction.java | 6 +- .../ml/rest/job/RestDeleteJobAction.java | 6 +- .../xpack/ml/rest/job/RestFlushJobAction.java | 4 +- .../ml/rest/job/RestForecastJobAction.java | 4 +- .../ml/rest/job/RestGetJobStatsAction.java | 4 +- .../xpack/ml/rest/job/RestGetJobsAction.java | 4 +- .../xpack/ml/rest/job/RestOpenJobAction.java | 4 +- .../xpack/ml/rest/job/RestPostDataAction.java | 4 +- .../ml/rest/job/RestPostJobUpdateAction.java | 4 +- .../xpack/ml/rest/job/RestPutJobAction.java | 4 +- .../RestDeleteModelSnapshotAction.java | 6 +- .../RestGetModelSnapshotsAction.java | 8 +- .../RestRevertModelSnapshotAction.java | 4 +- .../RestUpdateModelSnapshotAction.java | 6 +- .../ml/rest/results/RestGetBucketsAction.java | 8 +- .../rest/results/RestGetCategoriesAction.java | 8 +- .../results/RestGetInfluencersAction.java | 6 +- .../results/RestGetOverallBucketsAction.java | 6 +- .../ml/rest/results/RestGetRecordsAction.java | 8 +- .../validate/RestValidateDetectorAction.java | 2 +- .../validate/RestValidateJobConfigAction.java | 2 +- .../MachineLearningLicensingTests.java | 32 +-- .../xpack/ml/LocalStateMachineLearning.java | 4 +- .../ml/MachineLearningFeatureSetTests.java | 34 +-- .../xpack/ml/MlAssignmentNotifierTests.java | 2 +- .../xpack/ml/MlClientHelperTests.java | 11 +- .../ml/MlDailyManagementServiceTests.java | 2 +- .../ml/MlInitializationServiceTests.java | 2 + .../xpack/ml/MlMetadataTests.java | 28 +-- .../xpack/ml/MlSingleNodeTestCase.java | 1 + .../ml/action/CloseJobActionRequestTests.java | 18 +- .../action/CloseJobActionResponseTests.java | 2 +- ...DeleteCalendarEventActionRequestTests.java | 3 +- .../ml/action/DeleteDatafeedRequestTests.java | 2 +- .../DeleteExpiredDataActionResponseTests.java | 2 +- .../xpack/ml/action/DeleteJobActionTests.java | 4 +- .../ml/action/DeleteJobRequestTests.java | 1 + .../action/ForecastJobActionRequestTests.java | 11 +- .../ForecastJobActionResponseTests.java | 2 +- .../action/GetBucketActionRequestTests.java | 5 +- .../action/GetBucketActionResponseTests.java | 13 +- .../GetCalendarEventsActionRequestTests.java | 3 +- .../GetCalendarsActionRequestTests.java | 3 +- .../ml/action/GetCategoriesRequestTests.java | 3 +- .../ml/action/GetCategoriesResponseTests.java | 5 +- .../GetDatafeedStatsActionRequestTests.java | 2 +- .../GetDatafeedStatsActionResponseTests.java | 8 +- .../GetDatafeedsActionRequestTests.java | 2 +- .../GetDatafeedsActionResponseTests.java | 8 +- .../action/GetFiltersActionRequestTests.java | 5 +- .../action/GetFiltersActionResponseTests.java | 7 +- .../GetInfluencersActionRequestTests.java | 5 +- .../GetInfluencersActionResponseTests.java | 7 +- .../action/GetJobStatsActionRequestTests.java | 2 +- .../GetJobStatsActionResponseTests.java | 12 +- .../ml/action/GetJobsActionRequestTests.java | 2 +- .../ml/action/GetJobsActionResponseTests.java | 9 +- .../ml/action/GetJobsStatsActionTests.java | 7 +- .../GetModelSnapshotsActionRequestTests.java | 5 +- .../GetModelSnapshotsActionResponseTests.java | 7 +- .../GetOverallBucketsActionRequestTests.java | 2 +- .../GetOverallBucketsActionResponseTests.java | 6 +- .../action/GetRecordsActionRequestTests.java | 5 +- .../action/GetRecordsActionResponseTests.java | 7 +- .../ml/action/OpenJobActionRequestTests.java | 3 +- .../xpack/ml/action/OpenJobActionTests.java | 27 +-- .../PostCalendarEventActionRequestTests.java | 5 +- .../ml/action/PostDataActionRequestTests.java | 5 +- .../action/PostDataActionResponseTests.java | 3 +- .../ml/action/PostDataFlushRequestTests.java | 2 +- .../ml/action/PostDataFlushResponseTests.java | 2 +- .../PreviewDatafeedActionRequestTests.java | 2 +- .../ml/action/PreviewDatafeedActionTests.java | 3 +- .../action/PutCalendarActionRequestTests.java | 3 +- .../PutCalendarActionResponseTests.java | 1 + .../action/PutDatafeedActionRequestTests.java | 6 +- .../PutDatafeedActionResponseTests.java | 6 +- .../action/PutFilterActionRequestTests.java | 5 +- .../ml/action/PutJobActionRequestTests.java | 8 +- .../ml/action/PutJobActionResponseTests.java | 8 +- ...RevertModelSnapshotActionRequestTests.java | 3 +- ...evertModelSnapshotActionResponseTests.java | 3 +- .../ml/action/StartDatafeedActionTests.java | 13 +- .../StopDatafeedActionRequestTests.java | 20 +- .../UpdateCalendarJobActionResquestTests.java | 1 + .../UpdateDatafeedActionRequestTests.java | 6 +- .../action/UpdateJobActionRequestTests.java | 5 +- ...UpdateModelSnapshotActionRequestTests.java | 3 +- ...pdateModelSnapshotActionResponseTests.java | 3 +- .../UpdateProcessActionRequestTests.java | 7 +- .../ValidateDetectorActionRequestTests.java | 4 +- .../ValidateJobConfigActionRequestTests.java | 8 +- .../xpack/ml/action/util/PageParamsTests.java | 1 + .../xpack/ml/action/util/QueryPageTests.java | 3 +- .../xpack/ml/calendars/CalendarTests.java | 3 +- .../ml/datafeed/DatafeedJobBuilderTests.java | 13 +- .../xpack/ml/datafeed/DatafeedJobTests.java | 12 +- .../datafeed/DatafeedJobValidatorTests.java | 12 +- .../ml/datafeed/DatafeedManagerTests.java | 29 +-- .../datafeed/DatafeedNodeSelectorTests.java | 12 +- .../xpack/ml/datafeed/DatafeedStateTests.java | 1 + .../extractor/DataExtractorFactoryTests.java | 8 +- .../AggregationDataExtractorFactoryTests.java | 10 +- .../ChunkedDataExtractorFactoryTests.java | 10 +- .../chunked/ChunkedDataExtractorTests.java | 2 +- .../scroll/ExtractedFieldsTests.java | 10 +- .../integration/AutodetectMemoryLimitIT.java | 14 +- .../AutodetectResultProcessorIT.java | 46 ++-- .../integration/BasicDistributedJobsIT.java | 38 ++-- .../integration/BasicRenormalizationIT.java | 15 +- .../ml/integration/CategorizationIT.java | 12 +- .../xpack/ml/integration/DatafeedJobsIT.java | 26 +-- .../ml/integration/DatafeedJobsRestIT.java | 5 +- .../ml/integration/DeleteExpiredDataIT.java | 20 +- .../xpack/ml/integration/DeleteJobIT.java | 12 +- .../ml/integration/DetectionRulesIT.java | 24 +- .../ml/integration/EstablishedMemUsageIT.java | 12 +- .../xpack/ml/integration/ForecastIT.java | 16 +- ...erimResultsDeletedAfterReopeningJobIT.java | 12 +- .../xpack/ml/integration/JobProviderIT.java | 52 ++--- .../integration/JobStorageDeletionTaskIT.java | 8 +- .../integration/MlDistributedFailureIT.java | 34 +-- .../xpack/ml/integration/MlJobIT.java | 7 +- .../MlNativeAutodetectIntegTestCase.java | 84 +++---- .../ml/integration/NetworkDisruptionIT.java | 12 +- .../ml/integration/OverallBucketsIT.java | 18 +- .../integration/RestoreModelSnapshotIT.java | 14 +- .../ml/integration/RevertModelSnapshotIT.java | 16 +- .../xpack/ml/integration/TooManyJobsIT.java | 18 +- .../integration/UpdateInterimResultsIT.java | 14 +- .../xpack/ml/job/JobManagerTests.java | 32 +-- .../CategorizationAnalyzerTests.java | 3 +- .../CategorizationAnalyzerConfigTests.java | 3 +- .../xpack/ml/job/config/ConditionTests.java | 4 +- .../xpack/ml/job/config/ConnectiveTests.java | 1 + .../xpack/ml/job/config/DataFormatTests.java | 2 +- .../DefaultDetectorDescriptionTests.java | 2 + .../xpack/ml/job/config/JobBuilderTests.java | 7 +- .../xpack/ml/job/config/JobStateTests.java | 1 + .../ml/job/config/JobTaskStatusTests.java | 2 + .../xpack/ml/job/config/MlFilterTests.java | 1 + .../ml/job/config/ModelPlotConfigTests.java | 1 + .../xpack/ml/job/config/OperatorTests.java | 1 + .../xpack/ml/job/config/RuleActionTests.java | 1 + .../ml/job/config/RuleConditionTypeTests.java | 1 + .../xpack/ml/job/messages/MessagesTests.java | 1 + .../BatchedDocumentsIteratorTests.java | 1 + .../InfluencersQueryBuilderTests.java | 3 +- .../ml/job/persistence/JobProviderTests.java | 30 ++- .../JobRenormalizedResultsPersisterTests.java | 6 +- .../persistence/JobResultsPersisterTests.java | 10 +- .../MockBatchedDocumentsIterator.java | 3 +- .../ml/job/persistence/MockClientBuilder.java | 2 +- .../ResultsFilterBuilderTests.java | 3 +- .../job/persistence/StateStreamerTests.java | 8 +- .../OverallBucketsAggregatorTests.java | 4 +- .../OverallBucketsCollectorTests.java | 2 +- .../job/process/DataCountsReporterTests.java | 10 +- .../process/DataStreamDiagnosticsTests.java | 8 +- .../job/process/DummyDataCountsReporter.java | 10 +- .../ml/job/process/ProcessCtrlTests.java | 10 +- .../AutodetectCommunicatorTests.java | 20 +- .../AutodetectProcessManagerTests.java | 32 +-- .../BlackHoleAutodetectProcessTests.java | 2 +- .../NativeAutodetectProcessTests.java | 2 +- .../AutoDetectResultProcessorTests.java | 23 +- .../output/AutodetectResultsParserTests.java | 6 +- .../output/FlushAcknowledgementTests.java | 1 + .../autodetect/output/FlushListenerTests.java | 1 + .../autodetect/params/TimeRangeTests.java | 2 +- .../autodetect/state/DataCountsTests.java | 1 + .../autodetect/state/MemoryStatusTests.java | 2 +- .../autodetect/state/ModelSizeStatsTests.java | 3 +- .../autodetect/state/ModelSnapshotTests.java | 3 + .../autodetect/state/QuantilesTests.java | 1 + .../AbstractDataToProcessWriterTests.java | 8 +- .../writer/AnalysisLimitsWriterTests.java | 2 +- .../ControlMsgToProcessWriterTests.java | 18 +- .../writer/CsvDataToProcessWriterTests.java | 12 +- .../autodetect/writer/CsvParserTests.java | 2 +- .../DataToProcessWriterFactoryTests.java | 6 +- .../writer/FieldConfigWriterTests.java | 18 +- .../writer/JsonDataToProcessWriterTests.java | 10 +- .../writer/MlFilterWriterTests.java | 2 +- .../writer/ModelPlotConfigWriterTests.java | 2 +- .../writer/ScheduledEventsWriterTests.java | 2 +- .../BucketInfluencerNormalizableTests.java | 2 +- .../normalizer/BucketNormalizableTests.java | 8 +- .../InfluencerNormalizableTests.java | 2 +- .../process/normalizer/NormalizerTests.java | 4 +- .../normalizer/ScoresUpdaterTests.java | 20 +- .../ShortCircuitingRenormalizerTests.java | 2 +- .../ml/job/results/AutodetectResultTests.java | 15 +- .../xpack/ml/job/results/BucketTests.java | 5 + .../job/results/CategoryDefinitionTests.java | 1 + .../results/ForecastRequestStatsTests.java | 3 +- .../xpack/ml/job/results/ForecastTests.java | 1 + .../xpack/ml/job/results/InfluenceTests.java | 1 + .../xpack/ml/job/results/ModelPlotTests.java | 1 + .../ml/job/results/OverallBucketTests.java | 3 +- .../ml/job/results/PartitionScoreTests.java | 1 + .../job/results/ReservedFieldNamesTests.java | 2 + .../ExpiredModelSnapshotsRemoverTests.java | 14 +- .../retention/ExpiredResultsRemoverTests.java | 10 +- .../GetModelSnapshotsTests.java | 10 +- .../UpdateModelSnapshotActionTests.java | 2 +- .../xpack/ml/notifications/AuditorTests.java | 2 + .../xpack/ml/notifications/LevelTests.java | 1 + .../xpack/ml/support/BaseMlIntegTestCase.java | 40 ++-- .../xpack/ml/utils/IntervalsTests.java | 1 + .../xpack/ml/utils/MlStringsTests.java | 1 + .../xpack/ml/utils/NameResolverTests.java | 1 + ...eTimeFormatterTimestampConverterTests.java | 2 + .../xpack/ml/utils/time/TimeUtilsTests.java | 1 + .../xpack/monitoring/Monitoring.java | 11 +- .../monitoring/MonitoringFeatureSet.java | 13 +- .../xpack/monitoring/MonitoringService.java | 3 +- .../action/TransportMonitoringBulkAction.java | 8 +- .../monitoring/cleaner/CleanerService.java | 2 +- .../xpack/monitoring/collector/Collector.java | 4 +- .../cluster/ClusterStatsCollector.java | 10 +- .../cluster/ClusterStatsMonitoringDoc.java | 6 +- .../indices/IndexRecoveryCollector.java | 2 +- .../indices/IndexRecoveryMonitoringDoc.java | 4 +- .../indices/IndexStatsCollector.java | 2 +- .../indices/IndexStatsMonitoringDoc.java | 4 +- .../indices/IndicesStatsMonitoringDoc.java | 4 +- .../collector/ml/JobStatsCollector.java | 14 +- .../collector/ml/JobStatsMonitoringDoc.java | 6 +- .../collector/node/NodeStatsCollector.java | 2 +- .../node/NodeStatsMonitoringDoc.java | 4 +- .../collector/shards/ShardMonitoringDoc.java | 4 +- .../collector/shards/ShardsCollector.java | 2 +- .../exporter/BytesReferenceMonitoringDoc.java | 3 +- .../xpack/monitoring/exporter/ExportBulk.java | 3 +- .../xpack/monitoring/exporter/Exporters.java | 1 + .../exporter/FilteredMonitoringDoc.java | 3 +- .../exporter/http/HttpExportBulk.java | 4 +- .../exporter/http/HttpExporter.java | 9 +- .../exporter/http/PipelineHttpResource.java | 2 +- .../exporter/http/TemplateHttpResource.java | 2 +- .../monitoring/exporter/local/LocalBulk.java | 8 +- .../exporter/local/LocalExporter.java | 38 ++-- .../rest/MonitoringRestHandler.java | 2 +- .../rest/action/RestMonitoringBulkAction.java | 10 +- .../monitoring/BaseCollectorTestCase.java | 3 - .../monitoring/LocalStateMonitoring.java | 4 +- .../monitoring/MonitoredSystemTests.java | 1 + .../monitoring/MonitoringFeatureSetTests.java | 5 +- ...onitoringHistoryDurationSettingsTests.java | 1 + .../monitoring/MonitoringServiceTests.java | 2 +- .../xpack/monitoring/MonitoringTestUtils.java | 5 +- .../monitoring/MultiNodesStatsTests.java | 1 - .../action/MonitoringBulkDocTests.java | 3 +- .../action/MonitoringBulkRequestTests.java | 4 +- .../action/MonitoringBulkResponseTests.java | 1 + .../action/MonitoringIndexTests.java | 1 + .../TransportMonitoringBulkActionTests.java | 8 +- .../AbstractIndicesCleanerTestCase.java | 4 +- .../cleaner/CleanerServiceTests.java | 2 +- .../monitoring/collector/CollectorTests.java | 2 +- .../cluster/ClusterStatsCollectorTests.java | 16 +- .../ClusterStatsMonitoringDocTests.java | 8 +- .../indices/IndexRecoveryCollectorTests.java | 4 +- .../IndexRecoveryMonitoringDocTests.java | 4 +- .../indices/IndexStatsCollectorTests.java | 4 +- .../indices/IndexStatsMonitoringDocTests.java | 6 +- .../IndicesStatsMonitoringDocTests.java | 4 +- .../collector/ml/JobStatsCollectorTests.java | 18 +- .../ml/JobStatsMonitoringDocTests.java | 12 +- .../node/NodeStatsCollectorTests.java | 4 +- .../node/NodeStatsMonitoringDocTests.java | 4 +- .../shards/ShardsCollectorTests.java | 4 +- .../shards/ShardsMonitoringDocTests.java | 4 +- .../BaseFilteredMonitoringDocTestCase.java | 3 +- .../exporter/BaseMonitoringDocTestCase.java | 3 +- .../BytesReferenceMonitoringDocTests.java | 5 +- .../monitoring/exporter/ExportersTests.java | 3 +- .../MonitoringTemplateUtilsTests.java | 21 +- .../exporter/http/HttpExporterIT.java | 12 +- .../http/HttpExporterResourceTests.java | 8 +- .../exporter/http/HttpExporterTests.java | 10 +- .../http/PipelineHttpResourceTests.java | 2 +- .../http/TemplateHttpResourceTests.java | 2 +- .../local/LocalExporterIntegTestCase.java | 2 +- .../local/LocalExporterIntegTests.java | 18 +- .../LocalExporterResourceIntegTests.java | 4 +- .../monitoring/integration/MonitoringIT.java | 8 +- .../test/MonitoringIntegTestCase.java | 11 +- plugin/security/src/main/bin/certgen | 2 +- plugin/security/src/main/bin/certgen.bat | 2 +- plugin/security/src/main/bin/certutil | 2 +- plugin/security/src/main/bin/certutil.bat | 2 +- plugin/security/src/main/bin/extension | 2 +- plugin/security/src/main/bin/extension.bat | 2 +- .../security/PkiRealmBootstrapCheck.java | 14 +- .../xpack/security/Security.java | 118 +++++----- .../xpack/security/SecurityFeatureSet.java | 23 +- .../security/TokenSSLBootstrapCheck.java | 3 +- .../action/filter/SecurityActionFilter.java | 14 +- .../BulkShardRequestInterceptor.java | 8 +- ...cumentLevelSecurityRequestInterceptor.java | 8 +- .../IndicesAliasesRequestInterceptor.java | 10 +- .../interceptor/RequestInterceptor.java | 4 +- .../interceptor/ResizeRequestInterceptor.java | 10 +- .../realm/TransportClearRealmCacheAction.java | 5 +- .../role/TransportClearRolesCacheAction.java | 3 + .../role/TransportDeleteRoleAction.java | 5 +- .../action/role/TransportGetRolesAction.java | 7 +- .../action/role/TransportPutRoleAction.java | 7 +- .../TransportDeleteRoleMappingAction.java | 3 + .../TransportGetRoleMappingsAction.java | 5 +- .../TransportPutRoleMappingAction.java | 3 + .../saml/TransportSamlAuthenticateAction.java | 5 +- .../TransportSamlInvalidateSessionAction.java | 3 + .../saml/TransportSamlLogoutAction.java | 15 +- ...nsportSamlPrepareAuthenticationAction.java | 3 + .../token/TransportCreateTokenAction.java | 8 +- .../token/TransportInvalidateTokenAction.java | 3 + .../token/TransportRefreshTokenAction.java | 3 + .../user/TransportAuthenticateAction.java | 11 +- .../user/TransportChangePasswordAction.java | 11 +- .../user/TransportDeleteUserAction.java | 13 +- .../action/user/TransportGetUsersAction.java | 11 +- .../user/TransportHasPrivilegesAction.java | 37 +-- .../action/user/TransportPutUserAction.java | 11 +- .../user/TransportSetEnabledAction.java | 11 +- .../xpack/security/audit/AuditTrail.java | 6 +- .../security/audit/AuditTrailService.java | 12 +- .../security/audit/index/IndexAuditTrail.java | 19 +- .../audit/logfile/LoggingAuditTrail.java | 16 +- .../security/authc/AuthenticationService.java | 34 +-- .../security/authc/ExpiredTokenRemover.java | 4 +- .../xpack/security/authc/InternalRealms.java | 50 ++-- .../xpack/security/authc/Realms.java | 7 +- .../xpack/security/authc/TokenService.java | 11 +- .../xpack/security/authc/UserToken.java | 1 + .../esnative/ESNativeRealmMigrateTool.java | 18 +- .../security/authc/esnative/NativeRealm.java | 9 +- .../authc/esnative/NativeUsersStore.java | 35 +-- .../authc/esnative/ReservedRealm.java | 37 +-- .../authc/esnative/UserAndPassword.java | 2 +- .../esnative/tool/CommandLineHttpClient.java | 11 +- .../esnative/tool/SetupPasswordTool.java | 34 +-- .../xpack/security/authc/file/FileRealm.java | 9 +- .../authc/file/FileUserPasswdStore.java | 18 +- .../authc/file/FileUserRolesStore.java | 8 +- .../security/authc/file/tool/UsersTool.java | 16 +- .../ldap/ActiveDirectoryGroupsResolver.java | 6 +- .../ldap/ActiveDirectorySessionFactory.java | 12 +- .../xpack/security/authc/ldap/LdapRealm.java | 28 +-- .../authc/ldap/LdapSessionFactory.java | 11 +- .../ldap/LdapUserSearchSessionFactory.java | 13 +- .../authc/ldap/PoolingSessionFactory.java | 7 +- .../authc/ldap/SearchGroupsResolver.java | 5 +- .../ldap/UserAttributeGroupsResolver.java | 3 +- .../authc/ldap/support/LdapLoadBalancing.java | 1 + .../ldap/support/LdapMetaDataResolver.java | 1 + .../authc/ldap/support/LdapSession.java | 2 +- .../authc/ldap/support/LdapUtils.java | 3 +- .../authc/ldap/support/SessionFactory.java | 12 +- .../xpack/security/authc/pki/PkiRealm.java | 18 +- .../authc/pki/X509AuthenticationToken.java | 2 +- .../authc/saml/SamlAuthenticator.java | 2 +- .../authc/saml/SamlLogoutRequestHandler.java | 2 +- .../authc/saml/SamlMetadataCommand.java | 7 +- .../xpack/security/authc/saml/SamlRealm.java | 68 +++--- .../authc/saml/SamlRequestHandler.java | 2 +- .../xpack/security/authc/saml/SamlToken.java | 2 +- .../security/authc/support/CachingRealm.java | 4 +- .../support/CachingUsernamePasswordRealm.java | 19 +- .../security/authc/support/DnRoleMapper.java | 5 +- .../RoleMappingFileBootstrapCheck.java | 3 +- .../authc/support/UserRoleMapper.java | 11 +- .../authc/support/UsernamePasswordRealm.java | 8 +- .../support/mapper/CompositeRoleMapper.java | 4 +- .../mapper/NativeRoleMappingStore.java | 22 +- .../security/authz/AuthorizationService.java | 63 +++--- .../security/authz/AuthorizationUtils.java | 30 +-- .../security/authz/AuthorizedIndices.java | 4 +- .../authz/IndicesAndAliasesResolver.java | 27 +-- .../SecuritySearchOperationListener.java | 4 +- .../authz/accesscontrol/FieldExtractor.java | 0 .../authz/accesscontrol/OptOutQueryCache.java | 3 +- .../authz/store/CompositeRolesStore.java | 57 ++--- .../security/authz/store/FileRolesStore.java | 13 +- .../authz/store/NativeRolesStore.java | 28 +-- .../security/crypto/tool/SystemKeyTool.java | 2 +- .../security/rest/SecurityRestFilter.java | 1 + .../rest/action/RestAuthenticateAction.java | 10 +- .../rest/action/SecurityBaseRestHandler.java | 2 +- .../action/oauth2/RestGetTokenAction.java | 10 +- .../oauth2/RestInvalidateTokenAction.java | 6 +- .../realm/RestClearRealmCacheAction.java | 4 +- .../role/RestClearRolesCacheAction.java | 4 +- .../action/role/RestDeleteRoleAction.java | 4 +- .../rest/action/role/RestGetRolesAction.java | 6 +- .../rest/action/role/RestPutRoleAction.java | 6 +- .../RestDeleteRoleMappingAction.java | 4 +- .../RestGetRoleMappingsAction.java | 6 +- .../rolemapping/RestPutRoleMappingAction.java | 6 +- .../saml/RestSamlAuthenticateAction.java | 14 +- .../saml/RestSamlInvalidateSessionAction.java | 6 +- .../action/saml/RestSamlLogoutAction.java | 6 +- .../RestSamlPrepareAuthenticationAction.java | 6 +- .../action/user/RestChangePasswordAction.java | 10 +- .../action/user/RestDeleteUserAction.java | 4 +- .../rest/action/user/RestGetUsersAction.java | 6 +- .../action/user/RestHasPrivilegesAction.java | 11 +- .../rest/action/user/RestPutUserAction.java | 8 +- .../action/user/RestSetEnabledAction.java | 4 +- .../support/AbstractSecurityModule.java | 2 +- .../support/IndexLifecycleManager.java | 10 +- .../SecurityServerTransportInterceptor.java | 12 +- .../transport/ServerTransportFilter.java | 13 +- .../security/transport/filter/IPFilter.java | 2 +- .../SecurityNetty4HttpServerTransport.java | 12 +- .../netty4/SecurityNetty4ServerTransport.java | 5 +- .../transport/nio/SecurityNioTransport.java | 13 +- .../AbstractPrivilegeTestCase.java | 4 +- .../integration/BulkUpdateTests.java | 4 +- .../integration/ClearRealmsCacheTests.java | 16 +- .../integration/ClearRolesCacheTests.java | 10 +- .../DateMathExpressionIntegTests.java | 4 +- .../DocumentAndFieldLevelSecurityTests.java | 8 +- .../DocumentLevelSecurityRandomTests.java | 8 +- .../DocumentLevelSecurityTests.java | 9 +- .../FieldLevelSecurityRandomTests.java | 8 +- .../integration/FieldLevelSecurityTests.java | 9 +- .../integration/IndexPrivilegeTests.java | 2 +- ...onsWithAliasesWildcardsAndRegexsTests.java | 8 +- .../integration/KibanaUserRoleIntegTests.java | 4 +- .../MultipleIndicesPermissionsTests.java | 6 +- .../PermissionPrecedenceTests.java | 6 +- .../SecurityCachePermissionTests.java | 2 +- .../integration/SecurityClearScrollTests.java | 9 +- .../ldap/AbstractAdLdapRealmTestCase.java | 18 +- .../ldap/ActiveDirectoryRunAsTests.java | 20 +- .../elasticsearch/license/LicensingTests.java | 12 +- .../license/XPackLicenseStateTests.java | 2 +- .../test/NativeRealmIntegTestCase.java | 12 +- .../test/SecurityIntegTestCase.java | 23 +- .../test/SecuritySettingsSource.java | 16 +- .../test/SecurityTestsUtils.java | 2 +- .../test/SettingsFilterTests.java | 4 +- .../SecurityServerTransportServiceTests.java | 5 +- .../xpack/security/LocalStateSecurity.java | 4 +- .../security/PkiRealmBootstrapCheckTests.java | 4 +- .../security/ScrollHelperIntegTests.java | 1 + .../xpack/security/SecurityContextTests.java | 9 +- .../security/SecurityFeatureSetTests.java | 11 +- .../SecurityLifecycleServiceTests.java | 5 +- .../xpack/security/SecurityPluginTests.java | 4 +- .../xpack/security/SecuritySettingsTests.java | 7 +- .../xpack/security/SecurityTests.java | 19 +- .../security/TokenSSLBootsrapCheckTests.java | 2 +- .../filter/SecurityActionFilterTests.java | 14 +- ...IndicesAliasesRequestInterceptorTests.java | 15 +- .../ResizeRequestInterceptorTests.java | 15 +- .../action/role/PutRoleBuilderTests.java | 1 + .../role/TransportDeleteRoleActionTests.java | 6 +- .../role/TransportGetRolesActionTests.java | 8 +- .../role/TransportPutRoleActionTests.java | 8 +- .../PutRoleMappingRequestTests.java | 5 +- .../TransportGetRoleMappingsActionTests.java | 4 +- .../TransportPutRoleMappingActionTests.java | 6 +- ...SamlPrepareAuthenticationRequestTests.java | 2 +- ...sportSamlInvalidateSessionActionTests.java | 16 +- .../saml/TransportSamlLogoutActionTests.java | 14 +- .../action/token/CreateTokenRequestTests.java | 1 + .../HasPrivilegesRequestBuilderTests.java | 8 +- .../user/PutUserRequestBuilderTests.java | 2 + .../action/user/PutUserRequestTests.java | 1 + .../TransportAuthenticateActionTests.java | 14 +- .../TransportChangePasswordActionTests.java | 20 +- .../user/TransportDeleteUserActionTests.java | 16 +- .../user/TransportGetUsersActionTests.java | 17 +- .../TransportHasPrivilegesActionTests.java | 24 +- .../user/TransportPutUserActionTests.java | 18 +- .../user/TransportSetEnabledActionTests.java | 18 +- .../audit/AuditTrailServiceTests.java | 10 +- .../security/audit/index/AuditTrailTests.java | 21 +- .../index/IndexAuditTrailMutedTests.java | 16 +- .../audit/index/IndexAuditTrailTests.java | 11 +- .../RemoteIndexAuditTrailStartingTests.java | 2 +- .../logfile/LoggingAuditTrailFilterTests.java | 7 +- .../audit/logfile/LoggingAuditTrailTests.java | 7 +- .../authc/AuthenticationServiceTests.java | 25 +- .../security/authc/InternalRealmsTests.java | 7 +- .../security/authc/RealmSettingsTests.java | 19 +- .../xpack/security/authc/RealmsTests.java | 18 +- .../xpack/security/authc/RunAsIntegTests.java | 8 +- .../security/authc/TokenAuthIntegTests.java | 19 +- .../security/authc/TokenServiceTests.java | 11 +- .../xpack/security/authc/UserTokenTests.java | 5 +- .../esnative/ESNativeMigrateToolTests.java | 4 +- .../ESNativeRealmMigrateToolTests.java | 2 +- .../authc/esnative/NativeRealmIntegTests.java | 43 ++-- .../authc/esnative/NativeRealmTests.java | 2 +- .../authc/esnative/NativeUsersStoreTests.java | 28 +-- .../esnative/ReservedRealmIntegTests.java | 12 +- .../authc/esnative/ReservedRealmTests.java | 35 +-- .../esnative/tool/SetupPasswordToolTests.java | 12 +- .../security/authc/file/FileRealmTests.java | 18 +- .../authc/file/FileUserPasswdStoreTests.java | 38 ++-- .../authc/file/FileUserRolesStoreTests.java | 8 +- .../AbstractActiveDirectoryIntegTests.java | 10 +- .../ActiveDirectoryGroupsResolverTests.java | 4 +- .../authc/ldap/ActiveDirectoryRealmTests.java | 23 +- .../ActiveDirectorySessionFactoryTests.java | 17 +- .../ldap/CancellableLdapRunnableTests.java | 10 +- .../security/authc/ldap/LdapRealmTests.java | 25 +- .../authc/ldap/LdapSessionFactoryTests.java | 14 +- .../security/authc/ldap/LdapTestUtils.java | 11 +- .../LdapUserSearchSessionFactoryTests.java | 16 +- .../SearchGroupsResolverInMemoryTests.java | 2 +- .../UserAttributeGroupsResolverTests.java | 4 +- .../ldap/support/LdapLoadBalancingTests.java | 1 + .../authc/ldap/support/LdapTestCase.java | 15 +- .../SessionFactoryLoadBalancingTests.java | 5 +- .../ldap/support/SessionFactoryTests.java | 7 +- .../authc/pki/PkiAuthenticationTests.java | 14 +- .../authc/pki/PkiOptionalClientAuthTests.java | 5 +- .../security/authc/pki/PkiRealmTests.java | 42 ++-- .../authc/saml/SamlAuthenticatorTests.java | 77 +++---- .../saml/SamlLogoutRequestHandlerTests.java | 2 +- .../authc/saml/SamlMetadataCommandTests.java | 12 +- .../authc/saml/SamlRealmTestHelper.java | 2 +- .../security/authc/saml/SamlRealmTests.java | 66 +++--- .../saml/SamlSpMetadataBuilderTests.java | 17 +- .../security/authc/saml/SamlTestCase.java | 19 +- .../security/authc/support/BCryptTests.java | 1 + .../CachingUsernamePasswordRealmTests.java | 13 +- .../authc/support/DnRoleMapperTests.java | 36 +-- .../security/authc/support/HasherTests.java | 1 + .../RoleMappingFileBootstrapCheckTests.java | 3 +- .../support/UsernamePasswordTokenTests.java | 1 + .../mapper/ExpressionRoleMappingTests.java | 5 +- .../mapper/NativeUserRoleMapperTests.java | 7 +- .../expressiondsl/FieldPredicateTests.java | 2 +- .../xpack/security/authz/AnalyzeTests.java | 6 +- .../authz/AuthorizationServiceTests.java | 74 +++--- .../authz/AuthorizationUtilsTests.java | 18 +- .../authz/AuthorizedIndicesTests.java | 13 +- .../security/authz/IndexAliasesTests.java | 6 +- .../authz/IndicesAndAliasesResolverTests.java | 38 ++-- .../security/authz/RoleDescriptorTests.java | 3 +- .../security/authz/SecurityScrollTests.java | 2 +- .../SecuritySearchOperationListenerTests.java | 8 +- ...ldDataCacheWithFieldSubsetReaderTests.java | 1 + .../IndicesAccessControlTests.java | 1 + .../accesscontrol/IndicesPermissionTests.java | 19 +- .../accesscontrol/OptOutQueryCacheTests.java | 5 +- .../SetSecurityUserProcessorTests.java | 9 +- .../permission/FieldPermissionsTests.java | 4 +- .../authz/permission/PermissionTests.java | 7 +- .../authz/store/CompositeRolesStoreTests.java | 13 +- .../authz/store/FileRolesStoreTests.java | 20 +- .../authz/store/NativeRolesStoreTests.java | 10 +- .../security/rest/RestRequestFilterTests.java | 1 + .../rest/SecurityRestFilterTests.java | 9 +- .../action/RestAuthenticateActionTests.java | 4 +- .../oauth2/RestGetTokenActionTests.java | 6 +- .../user/HasPrivilegesRestResponseTests.java | 2 +- .../IndexLifecycleManagerIntegTests.java | 4 +- .../support/IndexLifecycleManagerTests.java | 2 +- ...curityServerTransportInterceptorTests.java | 16 +- ...ServerTransportFilterIntegrationTests.java | 10 +- .../transport/ServerTransportFilterTests.java | 22 +- .../transport/filter/IPFilterTests.java | 2 - .../filter/IpFilteringIntegrationTests.java | 2 +- .../DNSOnlyHostnameVerificationTests.java | 3 +- .../netty4/IPHostnameVerificationTests.java | 2 +- ...ecurityNetty4HttpServerTransportTests.java | 6 +- .../SecurityNetty4ServerTransportTests.java | 6 +- .../netty4/SslHostnameVerificationTests.java | 5 +- .../nio/SimpleSecurityNioTransportTests.java | 20 +- .../transport/ssl/EllipticCurveSSLTests.java | 5 +- .../transport/ssl/SslIntegrationTests.java | 8 +- .../transport/ssl/SslMultiPortTests.java | 9 +- .../user/AnonymousUserIntegTests.java | 1 + .../security/user/AnonymousUserTests.java | 2 + .../xpack/security/user/SystemUserTests.java | 1 + .../xpack/security/user/UserTests.java | 13 +- .../xpack/security/user/XPackUserTests.java | 7 +- .../xpack/ssl/SSLClientAuthTests.java | 9 +- .../xpack/ssl/SSLReloadIntegTests.java | 3 + .../xpack/ssl/SSLTrustRestrictionsTests.java | 36 +-- .../xpack/test/rest/XPackRestIT.java | 13 +- .../xpack/upgrade/IndexUpgradeCheck.java | 2 + .../xpack/upgrade/IndexUpgradeService.java | 1 + .../elasticsearch/xpack/upgrade/Upgrade.java | 6 +- .../actions/TransportIndexUpgradeAction.java | 1 + .../TransportIndexUpgradeInfoAction.java | 5 +- .../upgrade/rest/RestIndexUpgradeAction.java | 4 +- .../rest/RestIndexUpgradeInfoAction.java | 4 +- .../xpack/upgrade/IndexUpgradeIT.java | 7 +- .../upgrade/IndexUpgradeIntegTestCase.java | 8 +- .../upgrade/IndexUpgradeServiceTests.java | 1 + .../xpack/upgrade/IndexUpgradeTasksIT.java | 6 +- .../upgrade/InternalIndexReindexerIT.java | 2 +- .../IndexUpgradeActionRequestTests.java | 2 +- .../IndexUpgradeInfoActionRequestTests.java | 2 +- .../IndexUpgradeInfoActionResponseTests.java | 4 +- .../EncryptSensitiveDataBootstrapCheck.java | 3 +- .../elasticsearch/xpack/watcher/Watcher.java | 48 ++-- .../xpack/watcher/WatcherClientHelper.java | 6 +- .../xpack/watcher/WatcherFeatureSet.java | 15 +- .../watcher/WatcherIndexingListener.java | 2 +- .../watcher/WatcherLifeCycleService.java | 8 +- .../xpack/watcher/WatcherService.java | 11 +- .../watcher/actions/email/EmailAction.java | 8 +- .../actions/email/EmailActionFactory.java | 2 +- .../actions/email/ExecutableEmailAction.java | 8 +- .../hipchat/ExecutableHipChatAction.java | 8 +- .../actions/hipchat/HipChatAction.java | 2 +- .../actions/hipchat/HipChatActionFactory.java | 2 +- .../actions/index/ExecutableIndexAction.java | 16 +- .../watcher/actions/index/IndexAction.java | 7 +- .../actions/index/IndexActionFactory.java | 2 +- .../actions/jira/ExecutableJiraAction.java | 8 +- .../watcher/actions/jira/JiraAction.java | 2 +- .../actions/jira/JiraActionFactory.java | 2 +- .../logging/ExecutableLoggingAction.java | 8 +- .../actions/logging/LoggingAction.java | 2 +- .../actions/logging/LoggingActionFactory.java | 2 +- .../pagerduty/ExecutablePagerDutyAction.java | 8 +- .../actions/pagerduty/PagerDutyAction.java | 2 +- .../pagerduty/PagerDutyActionFactory.java | 2 +- .../actions/slack/ExecutableSlackAction.java | 8 +- .../watcher/actions/slack/SlackAction.java | 2 +- .../actions/slack/SlackActionFactory.java | 2 +- .../webhook/ExecutableWebhookAction.java | 8 +- .../actions/webhook/WebhookAction.java | 2 +- .../actions/webhook/WebhookActionFactory.java | 4 +- .../watcher/client/WatchSourceBuilders.java | 2 + .../xpack/watcher/common/http/HttpClient.java | 5 +- .../watcher/common/http/HttpContentType.java | 2 +- .../watcher/common/http/HttpRequest.java | 4 +- .../common/http/HttpRequestTemplate.java | 3 +- .../watcher/common/http/HttpSettings.java | 2 +- .../common/http/auth/HttpAuthRegistry.java | 2 +- .../http/auth/basic/ApplicableBasicAuth.java | 2 +- .../common/http/auth/basic/BasicAuth.java | 6 +- .../http/auth/basic/BasicAuthFactory.java | 2 +- .../condition/AbstractCompareCondition.java | 7 +- .../condition/ArrayCompareCondition.java | 4 +- .../watcher/condition/CompareCondition.java | 4 +- .../condition/InternalAlwaysCondition.java | 4 +- .../watcher/condition/LenientCompare.java | 2 +- .../watcher/condition/NeverCondition.java | 4 +- .../watcher/condition/ScriptCondition.java | 5 +- .../execution/AsyncTriggerEventConsumer.java | 2 +- .../watcher/execution/CurrentExecutions.java | 2 +- .../watcher/execution/ExecutionService.java | 30 +-- .../execution/InternalWatchExecutor.java | 2 +- .../execution/ManualExecutionContext.java | 14 +- .../execution/SyncTriggerEventConsumer.java | 2 +- .../execution/TriggeredExecutionContext.java | 3 +- .../watcher/execution/TriggeredWatch.java | 3 +- .../execution/TriggeredWatchStore.java | 12 +- .../xpack/watcher/history/HistoryStore.java | 12 +- .../xpack/watcher/input/InputBuilders.java | 4 +- .../xpack/watcher/input/InputFactory.java | 2 + .../xpack/watcher/input/InputRegistry.java | 1 + .../xpack/watcher/input/chain/ChainInput.java | 4 +- .../input/chain/ChainInputFactory.java | 4 +- .../input/chain/ExecutableChainInput.java | 8 +- .../input/http/ExecutableHttpInput.java | 6 +- .../xpack/watcher/input/http/HttpInput.java | 4 +- .../input/none/ExecutableNoneInput.java | 7 +- .../watcher/input/none/NoneInputFactory.java | 1 + .../input/search/ExecutableSearchInput.java | 6 +- .../watcher/input/search/SearchInput.java | 6 +- .../input/simple/ExecutableSimpleInput.java | 6 +- .../watcher/input/simple/SimpleInput.java | 4 +- .../transform/ExecutableTransformInput.java | 10 +- .../input/transform/TransformInput.java | 6 +- .../transform/TransformInputFactory.java | 8 +- .../watcher/notification/email/Account.java | 3 +- .../notification/email/Authentication.java | 2 +- .../notification/email/DataAttachment.java | 4 +- .../notification/email/EmailService.java | 2 +- .../attachment/DataAttachmentParser.java | 4 +- .../attachment/EmailAttachmentParser.java | 4 +- .../HttpEmailAttachementParser.java | 4 +- .../attachment/ReportingAttachmentParser.java | 4 +- .../notification/pagerduty/IncidentEvent.java | 2 +- .../pagerduty/PagerDutyAccount.java | 2 +- .../slack/message/DynamicAttachments.java | 2 +- .../watcher/rest/WatcherRestHandler.java | 2 +- .../rest/action/RestAckWatchAction.java | 10 +- .../rest/action/RestActivateWatchAction.java | 10 +- .../rest/action/RestDeleteWatchAction.java | 6 +- .../rest/action/RestExecuteWatchAction.java | 14 +- .../rest/action/RestGetWatchAction.java | 6 +- .../rest/action/RestPutWatchAction.java | 8 +- .../rest/action/RestWatchServiceAction.java | 4 +- .../rest/action/RestWatcherStatsAction.java | 4 +- .../xpack/watcher/support/Variables.java | 4 +- .../support/WatcherIndexTemplateRegistry.java | 7 +- .../search/WatcherSearchTemplateService.java | 4 +- .../watcher/transform/TransformBuilders.java | 3 +- .../script/ExecutableScriptTransform.java | 6 +- .../transform/script/ScriptTransform.java | 4 +- .../script/ScriptTransformFactory.java | 2 +- .../search/ExecutableSearchTransform.java | 6 +- .../transform/search/SearchTransform.java | 6 +- .../search/SearchTransformFactory.java | 2 +- .../actions/WatcherTransportAction.java | 2 +- .../actions/ack/TransportAckWatchAction.java | 13 +- .../TransportActivateWatchAction.java | 15 +- .../delete/TransportDeleteWatchAction.java | 9 +- .../execute/TransportExecuteWatchAction.java | 21 +- .../actions/get/TransportGetWatchAction.java | 11 +- .../actions/put/TransportPutWatchAction.java | 13 +- .../TransportWatcherServiceAction.java | 5 +- .../stats/TransportWatcherStatsAction.java | 3 + .../xpack/watcher/trigger/TriggerEngine.java | 4 +- .../xpack/watcher/trigger/TriggerService.java | 6 +- .../watcher/trigger/manual/ManualTrigger.java | 2 +- .../trigger/manual/ManualTriggerEngine.java | 6 +- .../trigger/manual/ManualTriggerEvent.java | 2 +- .../xpack/watcher/trigger/schedule/Cron.java | 2 +- .../trigger/schedule/HourlySchedule.java | 2 +- .../trigger/schedule/IntervalSchedule.java | 2 +- .../watcher/trigger/schedule/Schedule.java | 2 +- .../trigger/schedule/ScheduleTrigger.java | 2 +- .../schedule/ScheduleTriggerEngine.java | 6 +- .../schedule/ScheduleTriggerEvent.java | 4 +- .../engine/TickerScheduleTriggerEngine.java | 4 +- .../trigger/schedule/support/DayTimes.java | 2 +- .../trigger/schedule/support/MonthTimes.java | 2 +- .../trigger/schedule/support/YearTimes.java | 2 +- .../xpack/watcher/watch/WatchParser.java | 27 ++- ...cryptSensitiveDataBootstrapCheckTests.java | 3 +- .../watcher/WatcherClientHelperTests.java | 6 +- .../xpack/watcher/WatcherFeatureSetTests.java | 13 +- .../watcher/WatcherIndexingListenerTests.java | 6 +- .../watcher/WatcherLifeCycleServiceTests.java | 12 +- .../WatcherMetaDataSerializationTests.java | 3 +- .../xpack/watcher/WatcherPluginTests.java | 2 +- .../xpack/watcher/WatcherServiceTests.java | 6 +- .../actions/ActionErrorIntegrationTests.java | 6 +- .../watcher/actions/ActionWrapperTests.java | 13 +- .../actions/TimeThrottleIntegrationTests.java | 6 +- .../actions/email/EmailActionTests.java | 12 +- .../actions/email/EmailAttachmentTests.java | 7 +- .../actions/hipchat/HipChatActionTests.java | 8 +- .../actions/index/IndexActionTests.java | 12 +- .../jira/ExecutableJiraActionTests.java | 8 +- .../watcher/actions/jira/JiraActionTests.java | 8 +- .../actions/logging/LoggingActionTests.java | 6 +- .../pagerduty/PagerDutyActionTests.java | 8 +- .../slack/ExecutableSlackActionTests.java | 6 +- .../actions/slack/SlackActionTests.java | 8 +- .../actions/throttler/AckThrottlerTests.java | 14 +- .../throttler/ActionThrottleTests.java | 18 +- .../throttler/PeriodThrottlerTests.java | 10 +- .../actions/webhook/WebhookActionTests.java | 15 +- .../webhook/WebhookHttpsIntegrationTests.java | 6 +- .../webhook/WebhookIntegrationTests.java | 4 +- .../watcher/common/http/HttpClientTests.java | 7 +- .../http/HttpConnectionTimeoutTests.java | 2 +- .../common/http/HttpReadTimeoutTests.java | 2 +- .../condition/AlwaysConditionTests.java | 1 + .../ArrayCompareConditionSearchTests.java | 5 +- .../condition/ArrayCompareConditionTests.java | 6 +- .../CompareConditionSearchTests.java | 8 +- .../condition/CompareConditionTests.java | 6 +- .../condition/NeverConditionTests.java | 1 + .../condition/ScriptConditionTests.java | 7 +- .../execution/ExecutionServiceTests.java | 50 ++-- .../execution/TriggeredWatchStoreTests.java | 6 +- .../history/HistoryActionConditionTests.java | 14 +- .../watcher/history/HistoryStoreTests.java | 21 +- .../HistoryTemplateEmailMappingsTests.java | 5 +- .../HistoryTemplateHttpMappingsTests.java | 7 +- ...storyTemplateIndexActionMappingsTests.java | 5 +- ...storyTemplateSearchInputMappingsTests.java | 5 +- .../HistoryTemplateTimeMappingsTests.java | 5 +- .../watcher/input/chain/ChainInputTests.java | 4 +- .../chain/ExecutableChainInputTests.java | 12 +- .../watcher/input/http/HttpInputTests.java | 6 +- .../input/simple/SimpleInputTests.java | 6 +- .../input/transform/TransformInputTests.java | 14 +- .../notification/email/AccountTests.java | 3 +- .../email/EmailSecretsIntegrationTests.java | 20 +- .../notification/email/EmailServiceTests.java | 2 +- .../EmailAttachmentParsersTests.java | 4 +- .../HttpEmailAttachementParserTests.java | 6 +- .../ReportingAttachmentParserTests.java | 7 +- .../pagerduty/PagerDutyAccountsTests.java | 2 +- .../action/RestExecuteWatchActionTests.java | 4 +- .../watcher/support/FilterXContentTests.java | 2 +- .../xpack/watcher/support/VariablesTests.java | 10 +- .../support/WatcherDateTimeUtilsTests.java | 3 +- .../WatcherIndexTemplateRegistryTests.java | 1 + .../watcher/support/WatcherUtilsTests.java | 5 +- .../support/xcontent/MapPathTests.java | 1 + .../support/xcontent/XContentSourceTests.java | 1 + .../AbstractWatcherIntegrationTestCase.java | 36 ++- .../xpack/watcher/test/LocalStateWatcher.java | 4 +- .../xpack/watcher/test/TimeWarpedWatcher.java | 17 +- .../WatchExecutionContextMockBuilder.java | 12 +- .../xpack/watcher/test/WatcherTestUtils.java | 21 +- .../bench/ScheduleEngineTriggerBenchmark.java | 4 +- .../WatcherExecutorServiceBenchmark.java | 15 +- .../bench/WatcherScheduleEngineBenchmark.java | 11 +- .../test/integration/BasicWatcherTests.java | 16 +- .../test/integration/BootStrapTests.java | 20 +- .../ExecutionVarsIntegrationTests.java | 10 +- .../test/integration/HipChatServiceTests.java | 10 +- .../integration/HistoryIntegrationTests.java | 12 +- .../HttpSecretsIntegrationTests.java | 20 +- .../integration/PagerDutyServiceTests.java | 4 +- .../test/integration/SearchInputTests.java | 6 +- .../test/integration/SlackServiceTests.java | 4 +- .../test/integration/WatchAckTests.java | 20 +- .../test/integration/WatchMetadataTests.java | 12 +- .../transform/TransformIntegrationTests.java | 2 +- .../transform/chain/ChainTransformTests.java | 19 +- .../script/ScriptTransformTests.java | 8 +- .../action/WatchRequestValidationTests.java | 14 +- .../action/activate/ActivateWatchTests.java | 14 +- .../action/delete/DeleteWatchTests.java | 13 +- .../execute/ExecuteWatchRequestTests.java | 2 +- .../action/execute/ExecuteWatchTests.java | 20 +- .../transport/action/get/GetWatchTests.java | 10 +- .../put/PutWatchSerializationTests.java | 3 +- .../put/TransportPutWatchActionTests.java | 5 +- .../trigger/ScheduleTriggerEngineMock.java | 4 +- .../engine/TickerScheduleEngineTests.java | 6 +- .../watch/WatchStatusIntegrationTests.java | 6 +- .../xpack/watcher/watch/WatchStatusTests.java | 7 +- .../xpack/watcher/watch/WatchTests.java | 39 ++-- .../xpack/watcher/watch/clock/ClockTests.java | 1 + .../xpack/security/audit/IndexAuditIT.java | 6 +- ...CoreWithSecurityClientYamlTestSuiteIT.java | 2 +- .../xpack/restart/FullClusterRestartIT.java | 8 +- ...sterSearchWithSecurityYamlTestSuiteIT.java | 2 +- .../GlobalCheckpointSyncActionIT.java | 2 +- .../org/elasticsearch/test/OpenLdapTests.java | 20 +- ...OpenLdapUserSearchSessionFactoryTests.java | 6 +- .../authc/ldap/SearchGroupsResolverTests.java | 4 +- ...ndexWithSecurityClientYamlTestSuiteIT.java | 2 +- .../xpack/security/ReindexWithSecurityIT.java | 6 +- .../TokenBackwardsCompatibilityIT.java | 6 +- .../saml/SamlAuthenticationIntegTests.java | 66 +++--- .../qa/SecurityTransportClientIT.java | 7 +- .../example/ExampleExtension.java | 8 +- .../CustomAuthenticationFailureHandler.java | 4 +- .../example/realm/CustomRealm.java | 14 +- .../role/CustomInMemoryRolesProvider.java | 2 +- .../example/realm/CustomRealmIT.java | 3 +- .../example/realm/CustomRealmTests.java | 8 +- .../example/role/CustomRolesProviderIT.java | 8 +- .../example/ExampleSecurityExtension.java | 7 +- .../CustomAuthenticationFailureHandler.java | 4 +- .../example/realm/CustomRealm.java | 14 +- .../role/CustomInMemoryRolesProvider.java | 2 +- .../example/realm/CustomRealmIT.java | 2 +- .../example/realm/CustomRealmTests.java | 8 +- .../example/role/CustomRolesProviderIT.java | 8 +- .../xpack/security/MigrateToolIT.java | 18 +- .../xpack/security/MigrateToolTestCase.java | 1 + .../esnative/tool/SetupPasswordToolIT.java | 2 +- .../ssl/CertificateGenerateToolTests.java | 10 +- .../{ => core}/ssl/CertificateToolTests.java | 18 +- .../authc/file/tool/UsersToolTests.java | 12 +- .../crypto/tool/SystemKeyToolTests.java | 2 +- .../smoketest/GraphWithSecurityIT.java | 2 +- .../smoketest/MlWithSecurityIT.java | 2 +- .../SmokeTestMonitoringWithSecurityIT.java | 4 +- ...keTestPluginsSslClientYamlTestSuiteIT.java | 2 +- ...SmokeTestPluginsClientYamlTestSuiteIT.java | 2 +- ...rityWithMustacheClientYamlTestSuiteIT.java | 2 +- .../smoketest/WatcherWithMustacheIT.java | 2 +- .../smoketest/WatcherWithPainlessIT.java | 2 +- ...cherWithSecurityClientYamlTestSuiteIT.java | 4 +- ...SmokeTestWatcherClientYamlTestSuiteIT.java | 2 +- .../xpack/ml/client/MLTransportClientIT.java | 45 ++-- .../license/TribeTransportTestCase.java | 10 +- .../elasticsearch/test/LicensingTribeIT.java | 7 +- .../xpack/CompositeTestingXPackPlugin.java | 4 +- .../monitoring/MonitoringPluginTests.java | 4 +- .../monitoring/MonitoringTribeTests.java | 6 +- .../test/TribeWithSecurityIT.java | 10 +- .../xpack/security/SecurityTribeTests.java | 12 +- .../client/PreBuiltXPackTransportClient.java | 7 +- .../PreBuiltXPackTransportClientTests.java | 2 +- 1680 files changed, 7289 insertions(+), 6736 deletions(-) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ClientHelper.java (99%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/EmptyXPackFeatureSet.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/XPackBuild.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/XPackClient.java (78%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/XPackClientActionPlugin.java (93%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/XPackClientPlugin.java (65%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/XPackFeatureSet.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/XPackField.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/XPackPlugin.java (92%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/XPackSettings.java (92%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/action/TransportXPackInfoAction.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/action/TransportXPackUsageAction.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/action/XPackInfoAction.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/action/XPackInfoRequest.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/action/XPackInfoRequestBuilder.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/action/XPackUsageAction.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/action/XPackUsageRequest.java (92%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/action/XPackUsageRequestBuilder.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/action/XPackUsageResponse.java (93%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/common/IteratingActionListener.java (99%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/common/socket/SocketAccess.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/deprecation/DeprecationInfoAction.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/deprecation/DeprecationIssue.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/extensions/InstallXPackExtensionCommand.java (99%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/extensions/ListXPackExtensionCommand.java (88%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/extensions/RemoveXPackExtensionCommand.java (94%) create mode 100644 plugin/core/src/main/java/org/elasticsearch/xpack/core/extensions/XPackExtension.java rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/extensions/XPackExtensionCli.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/extensions/XPackExtensionInfo.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/extensions/XPackExtensionPolicy.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/extensions/XPackExtensionSecurity.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/extensions/XPackExtensionsService.java (99%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/graph/GraphFeatureSetUsage.java (81%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/graph/action/Connection.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/graph/action/GraphExploreAction.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/graph/action/GraphExploreRequest.java (99%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/graph/action/GraphExploreRequestBuilder.java (99%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/graph/action/GraphExploreResponse.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/graph/action/Hop.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/graph/action/Vertex.java (93%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/graph/action/VertexRequest.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/MLMetadataField.java (93%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/MachineLearningClientActionPlugin.java (91%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/MachineLearningFeatureSetUsage.java (79%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/MachineLearningField.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/MlClientHelper.java (90%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/MlMetaIndex.java (90%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/MlMetadata.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/MlParserType.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/action/CloseJobAction.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/action/DeleteCalendarAction.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/action/DeleteCalendarEventAction.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/action/DeleteDatafeedAction.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/action/DeleteExpiredDataAction.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/action/DeleteFilterAction.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/action/DeleteJobAction.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/action/DeleteModelSnapshotAction.java (92%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/action/FinalizeJobExecutionAction.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/action/FlushJobAction.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/action/ForecastJobAction.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/action/GetBucketsAction.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/action/GetCalendarEventsAction.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/action/GetCalendarsAction.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/action/GetCategoriesAction.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/action/GetDatafeedsAction.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/action/GetDatafeedsStatsAction.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/action/GetFiltersAction.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/action/GetInfluencersAction.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/action/GetJobsAction.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/action/GetJobsStatsAction.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/action/GetModelSnapshotsAction.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/action/GetOverallBucketsAction.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/action/GetRecordsAction.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/action/IsolateDatafeedAction.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/action/JobTaskRequest.java (88%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/action/KillProcessAction.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/action/OpenJobAction.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/action/PostCalendarEventsAction.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/action/PostDataAction.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/action/PreviewDatafeedAction.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/action/PutCalendarAction.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/action/PutDatafeedAction.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/action/PutFilterAction.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/action/PutJobAction.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/action/RevertModelSnapshotAction.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/action/StartDatafeedAction.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/action/StopDatafeedAction.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/action/UpdateCalendarJobAction.java (82%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/action/UpdateDatafeedAction.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/action/UpdateJobAction.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/action/UpdateModelSnapshotAction.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/action/UpdateProcessAction.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/action/ValidateDetectorAction.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/action/ValidateJobConfigAction.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/action/util/PageParams.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/action/util/QueryPage.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/calendars/Calendar.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/calendars/ScheduledEvent.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/client/MachineLearningClient.java (89%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/datafeed/ChunkingConfig.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/datafeed/DatafeedConfig.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/datafeed/DatafeedJobValidator.java (91%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/datafeed/DatafeedState.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/datafeed/DatafeedUpdate.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/datafeed/extractor/DataExtractor.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/datafeed/extractor/ExtractorUtils.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/config/AnalysisConfig.java (99%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/config/AnalysisLimits.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/config/CategorizationAnalyzerConfig.java (99%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/config/Condition.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/config/Connective.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/config/DataDescription.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/config/DefaultDetectorDescription.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/config/DetectionRule.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/config/Detector.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/config/Job.java (99%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/config/JobState.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/config/JobTaskStatus.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/config/JobUpdate.java (99%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/config/MlFilter.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/config/ModelPlotConfig.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/config/Operator.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/config/RuleAction.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/config/RuleCondition.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/config/RuleConditionType.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/groups/GroupOrJob.java (91%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/groups/GroupOrJobLookup.java (91%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/messages/Messages.java (99%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/persistence/AnomalyDetectorsIndex.java (92%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/persistence/AnomalyDetectorsIndexFields.java (90%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/persistence/BatchedBucketsIterator.java (88%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/persistence/BatchedDocumentsIterator.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/persistence/BatchedInfluencersIterator.java (88%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/persistence/BatchedRecordsIterator.java (88%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/persistence/BatchedResultsIterator.java (93%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/persistence/BucketsQueryBuilder.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/persistence/CalendarQueryBuilder.java (93%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/persistence/ElasticsearchMappings.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/persistence/InfluencersQueryBuilder.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/persistence/JobDataDeleter.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/persistence/JobProvider.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/persistence/JobStorageDeletionTask.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/persistence/RecordsQueryBuilder.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/persistence/ResultsFilterBuilder.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/persistence/ScheduledEventsQueryBuilder.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/process/autodetect/output/FlushAcknowledgement.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/process/autodetect/params/AutodetectParams.java (89%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/process/autodetect/state/CategorizerState.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/process/autodetect/state/DataCounts.java (99%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/process/autodetect/state/ModelSizeStats.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/process/autodetect/state/ModelSnapshot.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/process/autodetect/state/ModelSnapshotField.java (86%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/process/autodetect/state/ModelState.java (93%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/process/autodetect/state/Quantiles.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/process/autodetect/writer/RecordWriter.java (93%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/results/AnomalyCause.java (99%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/results/AnomalyRecord.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/results/Bucket.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/results/BucketInfluencer.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/results/CategoryDefinition.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/results/Forecast.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/results/ForecastRequestStats.java (99%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/results/Influence.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/results/Influencer.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/results/ModelPlot.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/results/OverallBucket.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/results/PartitionScore.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/results/ReservedFieldNames.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/job/results/Result.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/notifications/AuditMessage.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/notifications/AuditorField.java (87%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/notifications/Level.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/utils/ExceptionsHelper.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/utils/Intervals.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/utils/MlStrings.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/utils/NameResolver.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/utils/ToXContentParams.java (92%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/utils/time/DateTimeFormatterTimestampConverter.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/utils/time/TimeUtils.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ml/utils/time/TimestampConverter.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/monitoring/MonitoredSystem.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/monitoring/MonitoringFeatureSetUsage.java (90%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/monitoring/MonitoringField.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/monitoring/action/MonitoringBulkAction.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/monitoring/action/MonitoringBulkDoc.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/monitoring/action/MonitoringBulkRequest.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/monitoring/action/MonitoringBulkRequestBuilder.java (92%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/monitoring/action/MonitoringBulkResponse.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/monitoring/action/MonitoringIndex.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/monitoring/client/MonitoringClient.java (82%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/monitoring/exporter/MonitoringDoc.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/monitoring/exporter/MonitoringTemplateUtils.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/persistent/AllocatedPersistentTask.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/persistent/CompletionPersistentTaskAction.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/persistent/NodePersistentTasksExecutor.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/persistent/PersistentTaskParams.java (91%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/persistent/PersistentTaskResponse.java (91%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/persistent/PersistentTasksClusterService.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/persistent/PersistentTasksCustomMetaData.java (99%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/persistent/PersistentTasksExecutor.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/persistent/PersistentTasksExecutorRegistry.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/persistent/PersistentTasksNodeService.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/persistent/PersistentTasksService.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/persistent/RemovePersistentTaskAction.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/persistent/StartPersistentTaskAction.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/persistent/UpdatePersistentTaskStatusAction.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/persistent/package-info.java (50%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/rest/XPackRestHandler.java (91%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/rest/action/RestXPackInfoAction.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/rest/action/RestXPackUsageAction.java (86%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/scheduler/SchedulerEngine.java (99%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/ScrollHelper.java (99%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/SecurityContext.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/SecurityFeatureSetUsage.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/SecurityField.java (90%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/SecurityLifecycleServiceField.java (90%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/SecuritySettings.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/UserSettings.java (90%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/realm/ClearRealmCacheAction.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/realm/ClearRealmCacheRequest.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/realm/ClearRealmCacheRequestBuilder.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/realm/ClearRealmCacheResponse.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/role/ClearRolesCacheAction.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/role/ClearRolesCacheRequest.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/role/ClearRolesCacheRequestBuilder.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/role/ClearRolesCacheResponse.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/role/DeleteRoleAction.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/role/DeleteRoleRequest.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/role/DeleteRoleRequestBuilder.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/role/DeleteRoleResponse.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/role/GetRolesAction.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/role/GetRolesRequest.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/role/GetRolesRequestBuilder.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/role/GetRolesResponse.java (91%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/role/PutRoleAction.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/role/PutRoleRequest.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/role/PutRoleRequestBuilder.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/role/PutRoleResponse.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/rolemapping/DeleteRoleMappingAction.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/rolemapping/DeleteRoleMappingRequest.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/rolemapping/DeleteRoleMappingRequestBuilder.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/rolemapping/DeleteRoleMappingResponse.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/rolemapping/GetRoleMappingsAction.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/rolemapping/GetRoleMappingsRequest.java (90%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/rolemapping/GetRoleMappingsRequestBuilder.java (93%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/rolemapping/GetRoleMappingsResponse.java (90%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/rolemapping/PutRoleMappingAction.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/rolemapping/PutRoleMappingRequest.java (91%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/rolemapping/PutRoleMappingRequestBuilder.java (90%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/rolemapping/PutRoleMappingResponse.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/saml/SamlAuthenticateAction.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/saml/SamlAuthenticateRequest.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/saml/SamlAuthenticateRequestBuilder.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/saml/SamlAuthenticateResponse.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/saml/SamlInvalidateSessionAction.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/saml/SamlInvalidateSessionRequest.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/saml/SamlInvalidateSessionRequestBuilder.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/saml/SamlInvalidateSessionResponse.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/saml/SamlLogoutAction.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/saml/SamlLogoutRequest.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/saml/SamlLogoutRequestBuilder.java (93%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/saml/SamlLogoutResponse.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/saml/SamlPrepareAuthenticationAction.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/saml/SamlPrepareAuthenticationRequest.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/saml/SamlPrepareAuthenticationRequestBuilder.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/saml/SamlPrepareAuthenticationResponse.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/token/CreateTokenAction.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/token/CreateTokenRequest.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/token/CreateTokenRequestBuilder.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/token/CreateTokenResponse.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/token/InvalidateTokenAction.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/token/InvalidateTokenRequest.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/token/InvalidateTokenRequestBuilder.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/token/InvalidateTokenResponse.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/token/RefreshTokenAction.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/user/AuthenticateAction.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/user/AuthenticateRequest.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/user/AuthenticateRequestBuilder.java (93%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/user/AuthenticateResponse.java (89%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/user/ChangePasswordAction.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/user/ChangePasswordRequest.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/user/ChangePasswordRequestBuilder.java (92%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/user/ChangePasswordResponse.java (87%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/user/DeleteUserAction.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/user/DeleteUserRequest.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/user/DeleteUserRequestBuilder.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/user/DeleteUserResponse.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/user/GetUsersAction.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/user/GetUsersRequest.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/user/GetUsersRequestBuilder.java (93%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/user/GetUsersResponse.java (93%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/user/HasPrivilegesAction.java (85%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/user/HasPrivilegesRequest.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/user/HasPrivilegesRequestBuilder.java (89%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/user/HasPrivilegesResponse.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/user/PutUserAction.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/user/PutUserRequest.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/user/PutUserRequestBuilder.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/user/PutUserResponse.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/user/SetEnabledAction.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/user/SetEnabledRequest.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/user/SetEnabledRequestBuilder.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/user/SetEnabledResponse.java (87%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/action/user/UserRequest.java (89%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authc/Authentication.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authc/AuthenticationFailureHandler.java (99%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authc/AuthenticationField.java (88%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authc/AuthenticationResult.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authc/AuthenticationServiceField.java (83%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authc/AuthenticationToken.java (92%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authc/DefaultAuthenticationFailureHandler.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authc/InternalRealmsSettings.java (77%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authc/KeyAndTimestamp.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authc/Realm.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authc/RealmConfig.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authc/RealmSettings.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authc/TokenMetaData.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authc/esnative/ClientReservedRealm.java (76%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authc/esnative/NativeRealmSettings.java (80%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authc/file/FileRealmSettings.java (81%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authc/ldap/ActiveDirectorySessionFactorySettings.java (64%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authc/ldap/LdapRealmSettings.java (80%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authc/ldap/LdapSessionFactorySettings.java (86%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authc/ldap/LdapUserSearchSessionFactorySettings.java (63%) create mode 100644 plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/ldap/PoolingSessionFactorySettings.java rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authc/ldap/SearchGroupsResolverSettings.java (72%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authc/ldap/UserAttributeGroupsResolverSettings.java (80%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authc/ldap/support/LdapLoadBalancingSettings.java (93%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authc/ldap/support/LdapMetaDataResolverSettings.java (92%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authc/ldap/support/LdapSearchScope.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authc/ldap/support/SessionFactorySettings.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authc/pki/PkiRealmSettings.java (69%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authc/saml/SamlRealmSettings.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authc/support/BCrypt.java (99%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authc/support/CachingUsernamePasswordRealmSettings.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authc/support/CharArrays.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authc/support/DnRoleMapperSettings.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authc/support/Hasher.java (93%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authc/support/UsernamePasswordToken.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authc/support/mapper/CompositeRoleMapperSettings.java (78%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authc/support/mapper/ExpressionRoleMapping.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authc/support/mapper/NativeRoleMappingStoreField.java (89%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authc/support/mapper/expressiondsl/AllExpression.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authc/support/mapper/expressiondsl/AnyExpression.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authc/support/mapper/expressiondsl/ExceptExpression.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authc/support/mapper/expressiondsl/ExpressionParser.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authc/support/mapper/expressiondsl/FieldExpression.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authc/support/mapper/expressiondsl/RoleMapperExpression.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authz/AuthorizationServiceField.java (88%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authz/IndicesAndAliasesResolverField.java (91%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authz/RoleDescriptor.java (99%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authz/accesscontrol/DocumentSubsetReader.java (99%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authz/accesscontrol/FieldSubsetReader.java (99%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authz/accesscontrol/IndicesAccessControl.java (93%) rename plugin/{security/src/main/java/org/elasticsearch/xpack => core/src/main/java/org/elasticsearch/xpack/core}/security/authz/accesscontrol/SecurityIndexSearcherWrapper.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authz/accesscontrol/SetSecurityUserProcessor.java (91%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authz/permission/ClusterPermission.java (86%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authz/permission/FieldPermissions.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authz/permission/FieldPermissionsCache.java (93%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authz/permission/FieldPermissionsDefinition.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authz/permission/IndicesPermission.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authz/permission/Role.java (91%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authz/permission/RunAsPermission.java (86%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authz/privilege/ClusterPrivilege.java (93%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authz/privilege/HealthAndStatsPrivilege.java (91%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authz/privilege/IndexPrivilege.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authz/privilege/Privilege.java (90%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authz/privilege/SystemPrivilege.java (91%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/authz/store/ReservedRolesStore.java (91%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/client/SecurityClient.java (67%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{security/audit => core/security}/index/IndexAuditTrailField.java (88%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/rest/RestRequestFilter.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/support/Automatons.java (99%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/support/Exceptions.java (92%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/support/MetadataUtils.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/support/NoOpLogger.java (99%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/support/Validation.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/transport/SSLExceptionHelper.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/transport/netty4/SecurityNetty4Transport.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/user/AnonymousUser.java (90%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/user/BuiltinUserInfo.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/user/ElasticUser.java (86%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/user/InternalUserSerializationHelper.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/user/KibanaUser.java (83%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/user/LogstashSystemUser.java (88%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/user/SystemUser.java (90%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/user/User.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/user/UsernamesField.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/user/XPackSecurityUser.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/security/user/XPackUser.java (83%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{security/common => core/security}/xcontent/XContentUtils.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ssl/CertUtils.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ssl/CertificateGenerateTool.java (99%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ssl/CertificateTool.java (99%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ssl/CertificateTrustRestrictions.java (91%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ssl/DefaultJDKTrustConfig.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ssl/KeyConfig.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ssl/PEMKeyConfig.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ssl/PEMTrustConfig.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ssl/RestrictedTrustConfig.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ssl/RestrictedTrustManager.java (99%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ssl/SSLClientAuth.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ssl/SSLConfiguration.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ssl/SSLConfigurationReloader.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ssl/SSLConfigurationSettings.java (99%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ssl/SSLService.java (99%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ssl/StoreKeyConfig.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ssl/StoreTrustConfig.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ssl/TLSLicenseBootstrapCheck.java (93%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ssl/TrustAllConfig.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ssl/TrustConfig.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ssl/VerificationMode.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ssl/X509KeyPairSettings.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ssl/action/GetCertificateInfoAction.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ssl/action/TransportGetCertificateInfoAction.java (92%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ssl/cert/CertificateInfo.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/ssl/rest/RestGetCertificateInfoAction.java (88%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/template/TemplateUtils.java (99%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/upgrade/IndexUpgradeCheckVersion.java (89%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/upgrade/IndexUpgradeServiceFields.java (91%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/upgrade/UpgradeActionRequired.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/upgrade/UpgradeField.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/upgrade/actions/IndexUpgradeAction.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/upgrade/actions/IndexUpgradeInfoAction.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/WatcherFeatureSetUsage.java (90%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/WatcherField.java (92%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/WatcherMetaData.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/WatcherState.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/actions/Action.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/actions/ActionFactory.java (93%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/actions/ActionRegistry.java (91%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/actions/ActionStatus.java (98%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/actions/ActionWrapper.java (92%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/actions/ActionWrapperField.java (91%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/actions/ActionWrapperResult.java (91%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/actions/ExecutableAction.java (89%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/actions/throttler/AckThrottler.java (61%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/actions/throttler/ActionThrottler.java (88%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/actions/throttler/PeriodThrottler.java (88%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/actions/throttler/Throttler.java (87%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/actions/throttler/ThrottlerField.java (89%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/client/WatchSourceBuilder.java (91%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/client/WatcherClient.java (76%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/common/secret/Secret.java (88%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/common/xcontent/XContentUtils.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/condition/AlwaysCondition.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/condition/Condition.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/condition/ConditionFactory.java (93%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/condition/ConditionRegistry.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/condition/ExecutableCondition.java (74%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/crypto/CryptoService.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/execution/ActionExecutionMode.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/execution/ExecutionPhase.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/execution/ExecutionState.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/execution/QueuedWatch.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/execution/TriggeredWatchStoreField.java (87%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/execution/WatchExecutionContext.java (93%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/execution/WatchExecutionResult.java (90%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/execution/WatchExecutionSnapshot.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/execution/Wid.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/history/HistoryStoreField.java (86%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/history/WatchRecord.java (92%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/input/ExecutableInput.java (89%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/input/Input.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/input/none/NoneInput.java (93%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/support/Exceptions.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/support/WatcherDateTimeUtils.java (99%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/support/WatcherIndexTemplateRegistryField.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/support/WatcherUtils.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/support/xcontent/ObjectPath.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/support/xcontent/WatcherParams.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/support/xcontent/WatcherXContentParser.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/support/xcontent/XContentSource.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/transform/ExecutableTransform.java (88%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/transform/Transform.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/transform/TransformFactory.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/transform/TransformRegistry.java (91%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/transform/chain/ChainTransform.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/transform/chain/ChainTransformFactory.java (82%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/transform/chain/ExecutableChainTransform.java (85%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/transport/actions/ack/AckWatchAction.java (93%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/transport/actions/ack/AckWatchRequest.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/transport/actions/ack/AckWatchRequestBuilder.java (93%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/transport/actions/ack/AckWatchResponse.java (91%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/transport/actions/activate/ActivateWatchAction.java (93%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/transport/actions/activate/ActivateWatchRequest.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/transport/actions/activate/ActivateWatchRequestBuilder.java (92%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/transport/actions/activate/ActivateWatchResponse.java (91%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/transport/actions/delete/DeleteWatchAction.java (93%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/transport/actions/delete/DeleteWatchRequest.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/transport/actions/delete/DeleteWatchRequestBuilder.java (93%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/transport/actions/delete/DeleteWatchResponse.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/transport/actions/execute/ExecuteWatchAction.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/transport/actions/execute/ExecuteWatchRequest.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/transport/actions/execute/ExecuteWatchRequestBuilder.java (93%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/transport/actions/execute/ExecuteWatchResponse.java (91%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/transport/actions/get/GetWatchAction.java (93%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/transport/actions/get/GetWatchRequest.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/transport/actions/get/GetWatchRequestBuilder.java (93%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/transport/actions/get/GetWatchResponse.java (90%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/transport/actions/put/PutWatchAction.java (93%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/transport/actions/put/PutWatchRequest.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/transport/actions/put/PutWatchRequestBuilder.java (92%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/transport/actions/put/PutWatchResponse.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/transport/actions/service/WatcherServiceAction.java (93%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/transport/actions/service/WatcherServiceRequest.java (96%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/transport/actions/service/WatcherServiceRequestBuilder.java (93%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/transport/actions/service/WatcherServiceResponse.java (92%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/transport/actions/stats/WatcherStatsAction.java (93%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/transport/actions/stats/WatcherStatsRequest.java (97%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/transport/actions/stats/WatcherStatsRequestBuilder.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/transport/actions/stats/WatcherStatsResponse.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/trigger/Trigger.java (92%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/trigger/TriggerEvent.java (94%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/watch/Payload.java (93%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/watch/Watch.java (91%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/watch/WatchField.java (95%) rename plugin/core/src/main/java/org/elasticsearch/xpack/{ => core}/watcher/watch/WatchStatus.java (93%) delete mode 100644 plugin/core/src/main/java/org/elasticsearch/xpack/extensions/XPackExtension.java delete mode 100644 plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/PoolingSessionFactorySettings.java rename plugin/core/src/test/java/org/elasticsearch/xpack/{ => core}/ClientHelperTests.java (98%) rename plugin/core/src/test/java/org/elasticsearch/xpack/{ => core}/LocalStateCompositeXPackPlugin.java (99%) rename plugin/core/src/test/java/org/elasticsearch/xpack/{ => core}/TestXPackTransportClient.java (96%) rename plugin/core/src/test/java/org/elasticsearch/xpack/{ => core}/XPackSettingsTests.java (92%) rename plugin/core/src/test/java/org/elasticsearch/xpack/{ => core}/action/TransportXPackInfoActionTests.java (98%) rename plugin/core/src/test/java/org/elasticsearch/xpack/{ => core}/common/IteratingActionListenerTests.java (99%) rename plugin/core/src/test/java/org/elasticsearch/xpack/{ => core}/deprecation/DeprecationChecksTests.java (95%) rename plugin/core/src/test/java/org/elasticsearch/xpack/{ => core}/deprecation/DeprecationInfoActionRequestTests.java (94%) rename plugin/core/src/test/java/org/elasticsearch/xpack/{ => core}/deprecation/DeprecationInfoActionResponseTests.java (99%) rename plugin/core/src/test/java/org/elasticsearch/xpack/{ => core}/deprecation/DeprecationIssueTests.java (95%) rename plugin/core/src/test/java/org/elasticsearch/xpack/{ => core}/extensions/InstallXPackExtensionCommandTests.java (99%) rename plugin/core/src/test/java/org/elasticsearch/xpack/{ => core}/extensions/ListXPackExtensionCommandTests.java (96%) rename plugin/core/src/test/java/org/elasticsearch/xpack/{ => core}/extensions/RemoveXPackExtensionCommandTests.java (98%) rename plugin/core/src/test/java/org/elasticsearch/xpack/{ => core}/extensions/XPackExtensionInfoTests.java (99%) rename plugin/core/src/test/java/org/elasticsearch/xpack/{ => core}/extensions/XPackExtensionSecurityTests.java (98%) rename plugin/core/src/test/java/org/elasticsearch/xpack/{ => core}/extensions/XPackExtensionTestUtil.java (95%) rename plugin/core/src/test/java/org/elasticsearch/xpack/{ => core}/extensions/XPackExtensionsServiceTests.java (94%) rename plugin/{ml/src/test/java/org/elasticsearch/xpack => core/src/test/java/org/elasticsearch/xpack/core}/ml/action/StartDatafeedActionRequestTests.java (91%) rename plugin/{ml/src/test/java/org/elasticsearch/xpack => core/src/test/java/org/elasticsearch/xpack/core}/ml/calendars/ScheduledEventTests.java (91%) rename plugin/{ml/src/test/java/org/elasticsearch/xpack => core/src/test/java/org/elasticsearch/xpack/core}/ml/datafeed/ChunkingConfigTests.java (98%) rename plugin/{ml/src/test/java/org/elasticsearch/xpack => core/src/test/java/org/elasticsearch/xpack/core}/ml/datafeed/DatafeedConfigTests.java (99%) rename plugin/{ml/src/test/java/org/elasticsearch/xpack => core/src/test/java/org/elasticsearch/xpack/core}/ml/datafeed/DatafeedUpdateTests.java (99%) rename plugin/{ml/src/test/java/org/elasticsearch/xpack => core/src/test/java/org/elasticsearch/xpack/core}/ml/datafeed/extractor/ExtractorUtilsTests.java (98%) rename plugin/core/src/test/java/org/elasticsearch/xpack/{ => core}/ml/integration/MlRestTestStateCleaner.java (99%) rename plugin/{ml/src/test/java/org/elasticsearch/xpack => core/src/test/java/org/elasticsearch/xpack/core}/ml/job/config/AnalysisConfigTests.java (99%) rename plugin/{ml/src/test/java/org/elasticsearch/xpack => core/src/test/java/org/elasticsearch/xpack/core}/ml/job/config/AnalysisLimitsTests.java (98%) rename plugin/{ml/src/test/java/org/elasticsearch/xpack => core/src/test/java/org/elasticsearch/xpack/core}/ml/job/config/DataDescriptionTests.java (97%) rename plugin/{ml/src/test/java/org/elasticsearch/xpack => core/src/test/java/org/elasticsearch/xpack/core}/ml/job/config/DetectionRuleTests.java (99%) rename plugin/{ml/src/test/java/org/elasticsearch/xpack => core/src/test/java/org/elasticsearch/xpack/core}/ml/job/config/DetectorTests.java (99%) rename plugin/{ml/src/test/java/org/elasticsearch/xpack => core/src/test/java/org/elasticsearch/xpack/core}/ml/job/config/JobTests.java (98%) rename plugin/{ml/src/test/java/org/elasticsearch/xpack => core/src/test/java/org/elasticsearch/xpack/core}/ml/job/config/JobUpdateTests.java (99%) rename plugin/{ml/src/test/java/org/elasticsearch/xpack => core/src/test/java/org/elasticsearch/xpack/core}/ml/job/config/RuleConditionTests.java (99%) rename plugin/{ml/src/test/java/org/elasticsearch/xpack => core/src/test/java/org/elasticsearch/xpack/core}/ml/job/groups/GroupOrJobLookupTests.java (97%) rename plugin/{ml/src/test/java/org/elasticsearch/xpack => core/src/test/java/org/elasticsearch/xpack/core}/ml/job/groups/GroupOrJobTests.java (88%) rename plugin/{ml/src/test/java/org/elasticsearch/xpack => core/src/test/java/org/elasticsearch/xpack/core}/ml/job/persistence/ElasticsearchMappingsTests.java (89%) rename plugin/{ml/src/test/java/org/elasticsearch/xpack => core/src/test/java/org/elasticsearch/xpack/core}/ml/job/results/AnomalyCauseTests.java (95%) rename plugin/{ml/src/test/java/org/elasticsearch/xpack => core/src/test/java/org/elasticsearch/xpack/core}/ml/job/results/AnomalyRecordTests.java (96%) rename plugin/{ml/src/test/java/org/elasticsearch/xpack => core/src/test/java/org/elasticsearch/xpack/core}/ml/job/results/BucketInfluencerTests.java (99%) rename plugin/{ml/src/test/java/org/elasticsearch/xpack => core/src/test/java/org/elasticsearch/xpack/core}/ml/job/results/InfluencerTests.java (97%) rename plugin/{ml/src/test/java/org/elasticsearch/xpack => core/src/test/java/org/elasticsearch/xpack/core}/ml/notifications/AuditMessageTests.java (98%) rename plugin/core/src/test/java/org/elasticsearch/xpack/{ => core}/monitoring/test/MockPainlessScriptEngine.java (97%) rename plugin/core/src/test/java/org/elasticsearch/xpack/{ => core}/persistent/CancelPersistentTaskRequestTests.java (84%) rename plugin/core/src/test/java/org/elasticsearch/xpack/{ => core}/persistent/PersistentTasksClusterServiceTests.java (97%) rename plugin/core/src/test/java/org/elasticsearch/xpack/{ => core}/persistent/PersistentTasksCustomMetaDataTests.java (94%) rename plugin/core/src/test/java/org/elasticsearch/xpack/{ => core}/persistent/PersistentTasksExecutorFullRestartIT.java (91%) rename plugin/core/src/test/java/org/elasticsearch/xpack/{ => core}/persistent/PersistentTasksExecutorIT.java (96%) rename plugin/core/src/test/java/org/elasticsearch/xpack/{ => core}/persistent/PersistentTasksExecutorResponseTests.java (83%) rename plugin/core/src/test/java/org/elasticsearch/xpack/{ => core}/persistent/PersistentTasksNodeServiceStatusTests.java (87%) rename plugin/core/src/test/java/org/elasticsearch/xpack/{ => core}/persistent/PersistentTasksNodeServiceTests.java (97%) rename plugin/core/src/test/java/org/elasticsearch/xpack/{ => core}/persistent/RestartPersistentTaskRequestTests.java (82%) rename plugin/core/src/test/java/org/elasticsearch/xpack/{ => core}/persistent/StartPersistentActionRequestTests.java (83%) rename plugin/core/src/test/java/org/elasticsearch/xpack/{ => core}/persistent/TestPersistentTasksPlugin.java (98%) rename plugin/core/src/test/java/org/elasticsearch/xpack/{ => core}/persistent/UpdatePersistentTaskRequestTests.java (77%) rename plugin/{security/src/test/java/org/elasticsearch/xpack => core/src/test/java/org/elasticsearch/xpack/core}/security/audit/logfile/CapturingLogger.java (98%) rename plugin/{security/src/test/java/org/elasticsearch/xpack => core/src/test/java/org/elasticsearch/xpack/core}/security/authc/support/mapper/expressiondsl/ExpressionParserTests.java (97%) rename plugin/{security/src/test/java/org/elasticsearch/xpack => core/src/test/java/org/elasticsearch/xpack/core}/security/authz/accesscontrol/DocumentSubsetReaderTests.java (97%) rename plugin/{security/src/test/java/org/elasticsearch/xpack => core/src/test/java/org/elasticsearch/xpack/core}/security/authz/accesscontrol/FieldSubsetReaderTests.java (99%) rename plugin/{security/src/test/java/org/elasticsearch/xpack => core/src/test/java/org/elasticsearch/xpack/core}/security/authz/accesscontrol/SecurityIndexSearcherWrapperIntegrationTests.java (98%) rename plugin/{security/src/test/java/org/elasticsearch/xpack => core/src/test/java/org/elasticsearch/xpack/core}/security/authz/accesscontrol/SecurityIndexSearcherWrapperUnitTests.java (98%) rename plugin/{security/src/test/java/org/elasticsearch/xpack => core/src/test/java/org/elasticsearch/xpack/core}/security/authz/accesscontrol/SetSecurityUserProcessorFactoryTests.java (94%) rename plugin/{security/src/test/java/org/elasticsearch/xpack => core/src/test/java/org/elasticsearch/xpack/core}/security/authz/permission/FieldPermissionsCacheTests.java (99%) rename plugin/{security/src/test/java/org/elasticsearch/xpack => core/src/test/java/org/elasticsearch/xpack/core}/security/authz/privilege/PrivilegeTests.java (98%) rename plugin/core/src/test/java/org/elasticsearch/xpack/{ => core}/security/authz/store/ReservedRolesStoreTests.java (90%) rename plugin/{security/src/test/java/org/elasticsearch/xpack => core/src/test/java/org/elasticsearch/xpack/core}/security/support/AutomatonsTests.java (89%) rename plugin/{security/src/test/java/org/elasticsearch/xpack => core/src/test/java/org/elasticsearch/xpack/core}/security/support/ValidationTests.java (92%) rename plugin/core/src/test/java/org/elasticsearch/xpack/{ => core}/security/test/SecurityAssertions.java (91%) rename plugin/core/src/test/java/org/elasticsearch/xpack/{ => core}/ssl/CertUtilsTests.java (99%) rename plugin/core/src/test/java/org/elasticsearch/xpack/{ => core}/ssl/RestrictedTrustConfigTests.java (96%) rename plugin/core/src/test/java/org/elasticsearch/xpack/{ => core}/ssl/RestrictedTrustManagerTests.java (98%) rename plugin/core/src/test/java/org/elasticsearch/xpack/{ => core}/ssl/SSLConfigurationReloaderTests.java (99%) rename plugin/core/src/test/java/org/elasticsearch/xpack/{ => core}/ssl/SSLConfigurationSettingsTests.java (99%) rename plugin/core/src/test/java/org/elasticsearch/xpack/{ => core}/ssl/SSLConfigurationTests.java (99%) rename plugin/core/src/test/java/org/elasticsearch/xpack/{ => core}/ssl/SSLServiceTests.java (99%) rename plugin/core/src/test/java/org/elasticsearch/xpack/{ => core}/ssl/StoreKeyConfigTests.java (97%) rename plugin/core/src/test/java/org/elasticsearch/xpack/{ => core}/ssl/TLSLicenseBootstrapCheckTests.java (98%) rename plugin/core/src/test/java/org/elasticsearch/xpack/{ => core}/ssl/TestsSSLService.java (97%) rename plugin/core/src/test/java/org/elasticsearch/xpack/{ => core}/ssl/cert/CertificateInfoTests.java (95%) rename plugin/core/src/test/java/org/elasticsearch/xpack/{ => core}/template/TemplateUtilsTests.java (97%) rename plugin/{watcher/src/test/java/org/elasticsearch/xpack => core/src/test/java/org/elasticsearch/xpack/core}/watcher/actions/throttler/WatchThrottlerTests.java (97%) rename plugin/{watcher/src/test/java/org/elasticsearch/xpack => core/src/test/java/org/elasticsearch/xpack/core}/watcher/crypto/CryptoServiceTests.java (95%) rename plugin/core/src/test/java/org/elasticsearch/xpack/{watcher/watch/clock => core/watcher/watch}/ClockMock.java (98%) rename plugin/core/src/test/resources/org/elasticsearch/xpack/{ => core}/extensions/security/complex-x-pack-extension-security.policy (100%) rename plugin/core/src/test/resources/org/elasticsearch/xpack/{ => core}/extensions/security/simple-x-pack-extension-security.policy (100%) rename plugin/core/src/test/resources/org/elasticsearch/xpack/{ => core}/extensions/security/unresolved-x-pack-extension-security.policy (100%) rename plugin/{core => security}/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/FieldExtractor.java (100%) rename plugin/{core => security}/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/OptOutQueryCache.java (96%) rename plugin/{core => security}/src/main/java/org/elasticsearch/xpack/security/authz/store/FileRolesStore.java (96%) rename qa/security-tools-tests/src/test/java/org/elasticsearch/xpack/{ => core}/ssl/CertificateGenerateToolTests.java (98%) rename qa/security-tools-tests/src/test/java/org/elasticsearch/xpack/{ => core}/ssl/CertificateToolTests.java (98%) diff --git a/docs/en/security/authorization/custom-roles-provider.asciidoc b/docs/en/security/authorization/custom-roles-provider.asciidoc index 8756df7d00b..b18d181aa37 100644 --- a/docs/en/security/authorization/custom-roles-provider.asciidoc +++ b/docs/en/security/authorization/custom-roles-provider.asciidoc @@ -23,7 +23,7 @@ To create a custom roles provider: To package your custom roles provider as a plugin: . Implement an extension class for your roles provider that extends - `org.elasticsearch.xpack.extensions.XPackExtension`. There you need to + `org.elasticsearch.xpack.core.extensions.XPackExtension`. There you need to override one or more of the following methods: + [source,java] diff --git a/docs/en/security/tribe-clients-integrations/java.asciidoc b/docs/en/security/tribe-clients-integrations/java.asciidoc index f3acd757124..6377c680ef7 100644 --- a/docs/en/security/tribe-clients-integrations/java.asciidoc +++ b/docs/en/security/tribe-clients-integrations/java.asciidoc @@ -67,7 +67,7 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.transport.InetSocketTransportAddress; import org.elasticsearch.xpack.client.PreBuiltXPackTransportClient; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; +import static UsernamePasswordToken.basicAuthHeaderValue; ... TransportClient client = new PreBuiltXPackTransportClient(Settings.builder() diff --git a/docs/en/watcher/java.asciidoc b/docs/en/watcher/java.asciidoc index b16df8e19b7..f54e8554e8e 100644 --- a/docs/en/watcher/java.asciidoc +++ b/docs/en/watcher/java.asciidoc @@ -86,9 +86,9 @@ Elasticsearch `Client`: -------------------------------------------------- import org.elasticsearch.client.transport.TransportClient; import org.elasticsearch.xpack.client.PreBuiltXPackTransportClient; -import org.elasticsearch.xpack.XPackClient; -import org.elasticsearch.xpack.XPackPlugin; -import org.elasticsearch.watcher.client.WatcherClient; +import org.elasticsearch.xpack.core.XPackClient; +import org.elasticsearch.xpack.core.XPackPlugin; +import org.elasticsearch.core.watcher.client.WatcherClient; ... TransportClient client = new PreBuiltXPackTransportClient(Settings.builder() diff --git a/docs/src/test/java/org/elasticsearch/smoketest/XDocsClientYamlTestSuiteIT.java b/docs/src/test/java/org/elasticsearch/smoketest/XDocsClientYamlTestSuiteIT.java index bda68dd83f3..e948edd15ce 100644 --- a/docs/src/test/java/org/elasticsearch/smoketest/XDocsClientYamlTestSuiteIT.java +++ b/docs/src/test/java/org/elasticsearch/smoketest/XDocsClientYamlTestSuiteIT.java @@ -27,7 +27,7 @@ import java.util.Map; import static java.util.Collections.emptyList; import static java.util.Collections.emptyMap; import static java.util.Collections.singletonMap; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; import static org.hamcrest.Matchers.is; public class XDocsClientYamlTestSuiteIT extends XPackRestIT { diff --git a/plugin/core/build.gradle b/plugin/core/build.gradle index 6419bc3c965..188fc437ef2 100644 --- a/plugin/core/build.gradle +++ b/plugin/core/build.gradle @@ -11,7 +11,7 @@ archivesBaseName = 'x-pack-core' esplugin { name 'x-pack-core' description 'Elasticsearch Expanded Pack Plugin - Core' - classname 'org.elasticsearch.xpack.XPackPlugin' + classname 'org.elasticsearch.xpack.core.XPackPlugin' hasNativeController false requiresKeystore true licenseFile project(':x-pack-elasticsearch').file('LICENSE.txt') diff --git a/plugin/core/src/main/java/org/elasticsearch/license/ExpirationCallback.java b/plugin/core/src/main/java/org/elasticsearch/license/ExpirationCallback.java index f9a3306528e..ba74ddf3003 100644 --- a/plugin/core/src/main/java/org/elasticsearch/license/ExpirationCallback.java +++ b/plugin/core/src/main/java/org/elasticsearch/license/ExpirationCallback.java @@ -7,7 +7,7 @@ package org.elasticsearch.license; import org.elasticsearch.common.logging.LoggerMessageFormat; import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.xpack.scheduler.SchedulerEngine; +import org.elasticsearch.xpack.core.scheduler.SchedulerEngine; import java.util.UUID; diff --git a/plugin/core/src/main/java/org/elasticsearch/license/LicenseService.java b/plugin/core/src/main/java/org/elasticsearch/license/LicenseService.java index 901752fadb5..adbe0c6df10 100644 --- a/plugin/core/src/main/java/org/elasticsearch/license/LicenseService.java +++ b/plugin/core/src/main/java/org/elasticsearch/license/LicenseService.java @@ -31,9 +31,9 @@ import org.elasticsearch.discovery.DiscoveryModule; import org.elasticsearch.env.Environment; import org.elasticsearch.gateway.GatewayService; import org.elasticsearch.watcher.ResourceWatcherService; -import org.elasticsearch.xpack.XPackPlugin; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.scheduler.SchedulerEngine; +import org.elasticsearch.xpack.core.XPackPlugin; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.scheduler.SchedulerEngine; import java.time.Clock; import java.util.ArrayList; diff --git a/plugin/core/src/main/java/org/elasticsearch/license/Licensing.java b/plugin/core/src/main/java/org/elasticsearch/license/Licensing.java index 7df8a264d2e..b1b3bb63e0d 100644 --- a/plugin/core/src/main/java/org/elasticsearch/license/Licensing.java +++ b/plugin/core/src/main/java/org/elasticsearch/license/Licensing.java @@ -7,7 +7,6 @@ package org.elasticsearch.license; import org.elasticsearch.action.ActionRequest; import org.elasticsearch.action.ActionResponse; -import org.elasticsearch.action.GenericAction; import org.elasticsearch.cluster.NamedDiff; import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver; import org.elasticsearch.cluster.metadata.MetaData; @@ -30,8 +29,8 @@ import java.util.Collections; import java.util.List; import java.util.function.Supplier; -import static org.elasticsearch.xpack.XPackClientActionPlugin.isTribeNode; -import static org.elasticsearch.xpack.XPackPlugin.transportClientMode; +import static org.elasticsearch.xpack.core.XPackClientActionPlugin.isTribeNode; +import static org.elasticsearch.xpack.core.XPackPlugin.transportClientMode; public class Licensing implements ActionPlugin { diff --git a/plugin/core/src/main/java/org/elasticsearch/license/RestDeleteLicenseAction.java b/plugin/core/src/main/java/org/elasticsearch/license/RestDeleteLicenseAction.java index 9b3757adc16..08c44bbe15d 100644 --- a/plugin/core/src/main/java/org/elasticsearch/license/RestDeleteLicenseAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/license/RestDeleteLicenseAction.java @@ -9,8 +9,8 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.AcknowledgedRestListener; -import org.elasticsearch.xpack.XPackClient; -import org.elasticsearch.xpack.rest.XPackRestHandler; +import org.elasticsearch.xpack.core.XPackClient; +import org.elasticsearch.xpack.core.rest.XPackRestHandler; import java.io.IOException; diff --git a/plugin/core/src/main/java/org/elasticsearch/license/RestGetLicenseAction.java b/plugin/core/src/main/java/org/elasticsearch/license/RestGetLicenseAction.java index 8df29c2f938..31004823e49 100644 --- a/plugin/core/src/main/java/org/elasticsearch/license/RestGetLicenseAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/license/RestGetLicenseAction.java @@ -14,8 +14,8 @@ import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.RestResponse; import org.elasticsearch.rest.action.RestBuilderListener; -import org.elasticsearch.xpack.XPackClient; -import org.elasticsearch.xpack.rest.XPackRestHandler; +import org.elasticsearch.xpack.core.XPackClient; +import org.elasticsearch.xpack.core.rest.XPackRestHandler; import java.io.IOException; import java.util.HashMap; diff --git a/plugin/core/src/main/java/org/elasticsearch/license/RestGetTrialStatus.java b/plugin/core/src/main/java/org/elasticsearch/license/RestGetTrialStatus.java index d4f90bbb037..ebd43318ff9 100644 --- a/plugin/core/src/main/java/org/elasticsearch/license/RestGetTrialStatus.java +++ b/plugin/core/src/main/java/org/elasticsearch/license/RestGetTrialStatus.java @@ -13,8 +13,8 @@ import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.RestResponse; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.rest.action.RestBuilderListener; -import org.elasticsearch.xpack.XPackClient; -import org.elasticsearch.xpack.rest.XPackRestHandler; +import org.elasticsearch.xpack.core.XPackClient; +import org.elasticsearch.xpack.core.rest.XPackRestHandler; import java.io.IOException; diff --git a/plugin/core/src/main/java/org/elasticsearch/license/RestPostStartTrialLicense.java b/plugin/core/src/main/java/org/elasticsearch/license/RestPostStartTrialLicense.java index 6131d4f9a16..f9e53c80805 100644 --- a/plugin/core/src/main/java/org/elasticsearch/license/RestPostStartTrialLicense.java +++ b/plugin/core/src/main/java/org/elasticsearch/license/RestPostStartTrialLicense.java @@ -13,13 +13,12 @@ import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.RestResponse; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.rest.action.RestBuilderListener; -import org.elasticsearch.xpack.XPackClient; -import org.elasticsearch.xpack.rest.XPackRestHandler; +import org.elasticsearch.xpack.core.XPackClient; +import org.elasticsearch.xpack.core.rest.XPackRestHandler; import java.io.IOException; import static org.elasticsearch.rest.RestRequest.Method.POST; -import static org.elasticsearch.rest.RestRequest.Method.PUT; public class RestPostStartTrialLicense extends XPackRestHandler { diff --git a/plugin/core/src/main/java/org/elasticsearch/license/RestPutLicenseAction.java b/plugin/core/src/main/java/org/elasticsearch/license/RestPutLicenseAction.java index 2abed32bfa8..512f6c37692 100644 --- a/plugin/core/src/main/java/org/elasticsearch/license/RestPutLicenseAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/license/RestPutLicenseAction.java @@ -7,7 +7,6 @@ package org.elasticsearch.license; import java.io.IOException; -import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentBuilder; @@ -17,8 +16,8 @@ import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.RestResponse; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.rest.action.RestBuilderListener; -import org.elasticsearch.xpack.XPackClient; -import org.elasticsearch.xpack.rest.XPackRestHandler; +import org.elasticsearch.xpack.core.XPackClient; +import org.elasticsearch.xpack.core.rest.XPackRestHandler; import static org.elasticsearch.rest.RestRequest.Method.POST; import static org.elasticsearch.rest.RestRequest.Method.PUT; diff --git a/plugin/core/src/main/java/org/elasticsearch/license/XPackInfoResponse.java b/plugin/core/src/main/java/org/elasticsearch/license/XPackInfoResponse.java index 7196d13bf13..0ad69728f46 100644 --- a/plugin/core/src/main/java/org/elasticsearch/license/XPackInfoResponse.java +++ b/plugin/core/src/main/java/org/elasticsearch/license/XPackInfoResponse.java @@ -13,7 +13,7 @@ import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.io.stream.Writeable; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.XPackBuild; +import org.elasticsearch.xpack.core.XPackBuild; import java.io.IOException; import java.util.ArrayList; diff --git a/plugin/core/src/main/java/org/elasticsearch/license/XPackLicenseState.java b/plugin/core/src/main/java/org/elasticsearch/license/XPackLicenseState.java index 756688660a6..87a7fd68ffc 100644 --- a/plugin/core/src/main/java/org/elasticsearch/license/XPackLicenseState.java +++ b/plugin/core/src/main/java/org/elasticsearch/license/XPackLicenseState.java @@ -9,8 +9,8 @@ import org.elasticsearch.common.Strings; import org.elasticsearch.common.logging.LoggerMessageFormat; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.license.License.OperationMode; -import org.elasticsearch.xpack.XPackField; -import org.elasticsearch.xpack.monitoring.MonitoringField; +import org.elasticsearch.xpack.core.XPackField; +import org.elasticsearch.xpack.core.monitoring.MonitoringField; import java.util.Collections; import java.util.LinkedHashMap; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ClientHelper.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ClientHelper.java similarity index 99% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ClientHelper.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ClientHelper.java index 8878f44817f..625db305fbc 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ClientHelper.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ClientHelper.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack; +package org.elasticsearch.xpack.core; import org.elasticsearch.action.Action; import org.elasticsearch.action.ActionListener; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/EmptyXPackFeatureSet.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/EmptyXPackFeatureSet.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/EmptyXPackFeatureSet.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/EmptyXPackFeatureSet.java index 20c5642cb43..3a6cc899d62 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/EmptyXPackFeatureSet.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/EmptyXPackFeatureSet.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack; +package org.elasticsearch.xpack.core; import org.elasticsearch.action.ActionListener; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/XPackBuild.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackBuild.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/XPackBuild.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackBuild.java index d35301fbaca..2c1d455e6aa 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/XPackBuild.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackBuild.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack; +package org.elasticsearch.xpack.core; import org.elasticsearch.common.SuppressForbidden; import org.elasticsearch.common.io.PathUtils; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/XPackClient.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackClient.java similarity index 78% rename from plugin/core/src/main/java/org/elasticsearch/xpack/XPackClient.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackClient.java index 6f3681e94ae..588a9c05433 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/XPackClient.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackClient.java @@ -3,26 +3,26 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack; +package org.elasticsearch.xpack.core; import org.elasticsearch.action.ActionListener; import org.elasticsearch.client.Client; import org.elasticsearch.common.settings.SecureString; import org.elasticsearch.license.LicensingClient; import org.elasticsearch.license.XPackInfoResponse; -import org.elasticsearch.xpack.action.XPackInfoAction; -import org.elasticsearch.xpack.action.XPackInfoRequest; -import org.elasticsearch.xpack.action.XPackInfoRequestBuilder; -import org.elasticsearch.xpack.ml.client.MachineLearningClient; -import org.elasticsearch.xpack.monitoring.client.MonitoringClient; -import org.elasticsearch.xpack.security.client.SecurityClient; -import org.elasticsearch.xpack.watcher.client.WatcherClient; +import org.elasticsearch.xpack.core.action.XPackInfoAction; +import org.elasticsearch.xpack.core.action.XPackInfoRequest; +import org.elasticsearch.xpack.core.action.XPackInfoRequestBuilder; +import org.elasticsearch.xpack.core.ml.client.MachineLearningClient; +import org.elasticsearch.xpack.core.monitoring.client.MonitoringClient; +import org.elasticsearch.xpack.core.security.client.SecurityClient; +import org.elasticsearch.xpack.core.watcher.client.WatcherClient; import java.util.Collections; import java.util.Map; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.BASIC_AUTH_HEADER; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.BASIC_AUTH_HEADER; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; public class XPackClient { diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/XPackClientActionPlugin.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackClientActionPlugin.java similarity index 93% rename from plugin/core/src/main/java/org/elasticsearch/xpack/XPackClientActionPlugin.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackClientActionPlugin.java index c2fb63920ac..e4fcc185eec 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/XPackClientActionPlugin.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackClientActionPlugin.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack; +package org.elasticsearch.xpack.core; import org.elasticsearch.common.settings.Settings; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/XPackClientPlugin.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackClientPlugin.java similarity index 65% rename from plugin/core/src/main/java/org/elasticsearch/xpack/XPackClientPlugin.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackClientPlugin.java index 055ff176c02..5ea1f53c046 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/XPackClientPlugin.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackClientPlugin.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack; +package org.elasticsearch.xpack.core; import org.elasticsearch.action.GenericAction; import org.elasticsearch.cluster.ClusterState; @@ -11,14 +11,11 @@ import org.elasticsearch.cluster.NamedDiff; import org.elasticsearch.cluster.metadata.MetaData; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.io.stream.NamedWriteableRegistry; -import org.elasticsearch.common.network.NetworkModule; import org.elasticsearch.common.network.NetworkService; -import org.elasticsearch.common.settings.SecureString; import org.elasticsearch.common.settings.Setting; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.BigArrays; import org.elasticsearch.common.util.PageCacheRecycler; -import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.common.xcontent.NamedXContentRegistry; import org.elasticsearch.indices.breaker.CircuitBreakerService; import org.elasticsearch.license.DeleteLicenseAction; @@ -34,117 +31,115 @@ import org.elasticsearch.plugins.Plugin; import org.elasticsearch.tasks.Task; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.Transport; -import org.elasticsearch.xpack.action.XPackInfoAction; -import org.elasticsearch.xpack.action.XPackUsageAction; -import org.elasticsearch.xpack.deprecation.DeprecationInfoAction; -import org.elasticsearch.xpack.graph.GraphFeatureSetUsage; -import org.elasticsearch.xpack.graph.action.GraphExploreAction; -import org.elasticsearch.xpack.ml.MachineLearningFeatureSetUsage; -import org.elasticsearch.xpack.ml.MlMetadata; -import org.elasticsearch.xpack.ml.action.CloseJobAction; -import org.elasticsearch.xpack.ml.action.DeleteCalendarAction; -import org.elasticsearch.xpack.ml.action.DeleteCalendarEventAction; -import org.elasticsearch.xpack.ml.action.DeleteDatafeedAction; -import org.elasticsearch.xpack.ml.action.DeleteExpiredDataAction; -import org.elasticsearch.xpack.ml.action.DeleteFilterAction; -import org.elasticsearch.xpack.ml.action.DeleteJobAction; -import org.elasticsearch.xpack.ml.action.DeleteModelSnapshotAction; -import org.elasticsearch.xpack.ml.action.FinalizeJobExecutionAction; -import org.elasticsearch.xpack.ml.action.FlushJobAction; -import org.elasticsearch.xpack.ml.action.ForecastJobAction; -import org.elasticsearch.xpack.ml.action.GetBucketsAction; -import org.elasticsearch.xpack.ml.action.GetCalendarEventsAction; -import org.elasticsearch.xpack.ml.action.GetCalendarsAction; -import org.elasticsearch.xpack.ml.action.GetCategoriesAction; -import org.elasticsearch.xpack.ml.action.GetDatafeedsAction; -import org.elasticsearch.xpack.ml.action.GetDatafeedsStatsAction; -import org.elasticsearch.xpack.ml.action.GetFiltersAction; -import org.elasticsearch.xpack.ml.action.GetInfluencersAction; -import org.elasticsearch.xpack.ml.action.GetJobsAction; -import org.elasticsearch.xpack.ml.action.GetJobsStatsAction; -import org.elasticsearch.xpack.ml.action.GetModelSnapshotsAction; -import org.elasticsearch.xpack.ml.action.GetOverallBucketsAction; -import org.elasticsearch.xpack.ml.action.GetRecordsAction; -import org.elasticsearch.xpack.ml.action.IsolateDatafeedAction; -import org.elasticsearch.xpack.ml.action.KillProcessAction; -import org.elasticsearch.xpack.ml.action.OpenJobAction; -import org.elasticsearch.xpack.ml.action.PostCalendarEventsAction; -import org.elasticsearch.xpack.ml.action.PostDataAction; -import org.elasticsearch.xpack.ml.action.PreviewDatafeedAction; -import org.elasticsearch.xpack.ml.action.PutCalendarAction; -import org.elasticsearch.xpack.ml.action.PutDatafeedAction; -import org.elasticsearch.xpack.ml.action.PutFilterAction; -import org.elasticsearch.xpack.ml.action.PutJobAction; -import org.elasticsearch.xpack.ml.action.RevertModelSnapshotAction; -import org.elasticsearch.xpack.ml.action.StartDatafeedAction; -import org.elasticsearch.xpack.ml.action.StopDatafeedAction; -import org.elasticsearch.xpack.ml.action.UpdateCalendarJobAction; -import org.elasticsearch.xpack.ml.action.UpdateDatafeedAction; -import org.elasticsearch.xpack.ml.action.UpdateJobAction; -import org.elasticsearch.xpack.ml.action.UpdateModelSnapshotAction; -import org.elasticsearch.xpack.ml.action.UpdateProcessAction; -import org.elasticsearch.xpack.ml.action.ValidateDetectorAction; -import org.elasticsearch.xpack.ml.action.ValidateJobConfigAction; -import org.elasticsearch.xpack.ml.datafeed.DatafeedState; -import org.elasticsearch.xpack.ml.job.config.JobTaskStatus; -import org.elasticsearch.xpack.monitoring.MonitoringFeatureSetUsage; -import org.elasticsearch.xpack.persistent.CompletionPersistentTaskAction; -import org.elasticsearch.xpack.persistent.PersistentTaskParams; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData; -import org.elasticsearch.xpack.persistent.PersistentTasksNodeService; -import org.elasticsearch.xpack.persistent.RemovePersistentTaskAction; -import org.elasticsearch.xpack.persistent.StartPersistentTaskAction; -import org.elasticsearch.xpack.persistent.UpdatePersistentTaskStatusAction; -import org.elasticsearch.xpack.security.SecurityFeatureSetUsage; -import org.elasticsearch.xpack.security.SecurityField; -import org.elasticsearch.xpack.security.SecuritySettings; -import org.elasticsearch.xpack.security.action.realm.ClearRealmCacheAction; -import org.elasticsearch.xpack.security.action.role.ClearRolesCacheAction; -import org.elasticsearch.xpack.security.action.role.DeleteRoleAction; -import org.elasticsearch.xpack.security.action.role.GetRolesAction; -import org.elasticsearch.xpack.security.action.role.PutRoleAction; -import org.elasticsearch.xpack.security.action.rolemapping.DeleteRoleMappingAction; -import org.elasticsearch.xpack.security.action.rolemapping.GetRoleMappingsAction; -import org.elasticsearch.xpack.security.action.rolemapping.PutRoleMappingAction; -import org.elasticsearch.xpack.security.action.token.CreateTokenAction; -import org.elasticsearch.xpack.security.action.token.InvalidateTokenAction; -import org.elasticsearch.xpack.security.action.token.RefreshTokenAction; -import org.elasticsearch.xpack.security.action.user.AuthenticateAction; -import org.elasticsearch.xpack.security.action.user.ChangePasswordAction; -import org.elasticsearch.xpack.security.action.user.DeleteUserAction; -import org.elasticsearch.xpack.security.action.user.GetUsersAction; -import org.elasticsearch.xpack.security.action.user.HasPrivilegesAction; -import org.elasticsearch.xpack.security.action.user.PutUserAction; -import org.elasticsearch.xpack.security.action.user.SetEnabledAction; -import org.elasticsearch.xpack.security.authc.TokenMetaData; -import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken; -import org.elasticsearch.xpack.security.authc.support.mapper.expressiondsl.AllExpression; -import org.elasticsearch.xpack.security.authc.support.mapper.expressiondsl.AnyExpression; -import org.elasticsearch.xpack.security.authc.support.mapper.expressiondsl.ExceptExpression; -import org.elasticsearch.xpack.security.authc.support.mapper.expressiondsl.FieldExpression; -import org.elasticsearch.xpack.security.authc.support.mapper.expressiondsl.RoleMapperExpression; -import org.elasticsearch.xpack.security.transport.netty4.SecurityNetty4Transport; -import org.elasticsearch.xpack.ssl.SSLService; -import org.elasticsearch.xpack.ssl.action.GetCertificateInfoAction; -import org.elasticsearch.xpack.upgrade.actions.IndexUpgradeAction; -import org.elasticsearch.xpack.upgrade.actions.IndexUpgradeInfoAction; -import org.elasticsearch.xpack.watcher.WatcherFeatureSetUsage; -import org.elasticsearch.xpack.watcher.WatcherMetaData; -import org.elasticsearch.xpack.watcher.transport.actions.ack.AckWatchAction; -import org.elasticsearch.xpack.watcher.transport.actions.activate.ActivateWatchAction; -import org.elasticsearch.xpack.watcher.transport.actions.delete.DeleteWatchAction; -import org.elasticsearch.xpack.watcher.transport.actions.execute.ExecuteWatchAction; -import org.elasticsearch.xpack.watcher.transport.actions.get.GetWatchAction; -import org.elasticsearch.xpack.watcher.transport.actions.put.PutWatchAction; -import org.elasticsearch.xpack.watcher.transport.actions.service.WatcherServiceAction; -import org.elasticsearch.xpack.watcher.transport.actions.stats.WatcherStatsAction; +import org.elasticsearch.xpack.core.action.XPackInfoAction; +import org.elasticsearch.xpack.core.action.XPackUsageAction; +import org.elasticsearch.xpack.core.deprecation.DeprecationInfoAction; +import org.elasticsearch.xpack.core.graph.GraphFeatureSetUsage; +import org.elasticsearch.xpack.core.graph.action.GraphExploreAction; +import org.elasticsearch.xpack.core.ml.MachineLearningFeatureSetUsage; +import org.elasticsearch.xpack.core.ml.MlMetadata; +import org.elasticsearch.xpack.core.ml.action.CloseJobAction; +import org.elasticsearch.xpack.core.ml.action.DeleteCalendarAction; +import org.elasticsearch.xpack.core.ml.action.DeleteCalendarEventAction; +import org.elasticsearch.xpack.core.ml.action.DeleteDatafeedAction; +import org.elasticsearch.xpack.core.ml.action.DeleteExpiredDataAction; +import org.elasticsearch.xpack.core.ml.action.DeleteFilterAction; +import org.elasticsearch.xpack.core.ml.action.DeleteJobAction; +import org.elasticsearch.xpack.core.ml.action.DeleteModelSnapshotAction; +import org.elasticsearch.xpack.core.ml.action.FinalizeJobExecutionAction; +import org.elasticsearch.xpack.core.ml.action.FlushJobAction; +import org.elasticsearch.xpack.core.ml.action.ForecastJobAction; +import org.elasticsearch.xpack.core.ml.action.GetBucketsAction; +import org.elasticsearch.xpack.core.ml.action.GetCalendarEventsAction; +import org.elasticsearch.xpack.core.ml.action.GetCalendarsAction; +import org.elasticsearch.xpack.core.ml.action.GetCategoriesAction; +import org.elasticsearch.xpack.core.ml.action.GetDatafeedsAction; +import org.elasticsearch.xpack.core.ml.action.GetDatafeedsStatsAction; +import org.elasticsearch.xpack.core.ml.action.GetFiltersAction; +import org.elasticsearch.xpack.core.ml.action.GetInfluencersAction; +import org.elasticsearch.xpack.core.ml.action.GetJobsAction; +import org.elasticsearch.xpack.core.ml.action.GetJobsStatsAction; +import org.elasticsearch.xpack.core.ml.action.GetModelSnapshotsAction; +import org.elasticsearch.xpack.core.ml.action.GetOverallBucketsAction; +import org.elasticsearch.xpack.core.ml.action.GetRecordsAction; +import org.elasticsearch.xpack.core.ml.action.IsolateDatafeedAction; +import org.elasticsearch.xpack.core.ml.action.KillProcessAction; +import org.elasticsearch.xpack.core.ml.action.OpenJobAction; +import org.elasticsearch.xpack.core.ml.action.PostCalendarEventsAction; +import org.elasticsearch.xpack.core.ml.action.PostDataAction; +import org.elasticsearch.xpack.core.ml.action.PreviewDatafeedAction; +import org.elasticsearch.xpack.core.ml.action.PutCalendarAction; +import org.elasticsearch.xpack.core.ml.action.PutDatafeedAction; +import org.elasticsearch.xpack.core.ml.action.PutFilterAction; +import org.elasticsearch.xpack.core.ml.action.PutJobAction; +import org.elasticsearch.xpack.core.ml.action.RevertModelSnapshotAction; +import org.elasticsearch.xpack.core.ml.action.StartDatafeedAction; +import org.elasticsearch.xpack.core.ml.action.StopDatafeedAction; +import org.elasticsearch.xpack.core.ml.action.UpdateCalendarJobAction; +import org.elasticsearch.xpack.core.ml.action.UpdateDatafeedAction; +import org.elasticsearch.xpack.core.ml.action.UpdateJobAction; +import org.elasticsearch.xpack.core.ml.action.UpdateModelSnapshotAction; +import org.elasticsearch.xpack.core.ml.action.UpdateProcessAction; +import org.elasticsearch.xpack.core.ml.action.ValidateDetectorAction; +import org.elasticsearch.xpack.core.ml.action.ValidateJobConfigAction; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedState; +import org.elasticsearch.xpack.core.ml.job.config.JobTaskStatus; +import org.elasticsearch.xpack.core.monitoring.MonitoringFeatureSetUsage; +import org.elasticsearch.xpack.core.persistent.CompletionPersistentTaskAction; +import org.elasticsearch.xpack.core.persistent.PersistentTaskParams; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData; +import org.elasticsearch.xpack.core.persistent.PersistentTasksNodeService; +import org.elasticsearch.xpack.core.persistent.RemovePersistentTaskAction; +import org.elasticsearch.xpack.core.persistent.StartPersistentTaskAction; +import org.elasticsearch.xpack.core.persistent.UpdatePersistentTaskStatusAction; +import org.elasticsearch.xpack.core.security.SecurityFeatureSetUsage; +import org.elasticsearch.xpack.core.security.SecurityField; +import org.elasticsearch.xpack.core.security.SecuritySettings; +import org.elasticsearch.xpack.core.security.action.realm.ClearRealmCacheAction; +import org.elasticsearch.xpack.core.security.action.role.ClearRolesCacheAction; +import org.elasticsearch.xpack.core.security.action.role.DeleteRoleAction; +import org.elasticsearch.xpack.core.security.action.role.GetRolesAction; +import org.elasticsearch.xpack.core.security.action.role.PutRoleAction; +import org.elasticsearch.xpack.core.security.action.rolemapping.DeleteRoleMappingAction; +import org.elasticsearch.xpack.core.security.action.rolemapping.GetRoleMappingsAction; +import org.elasticsearch.xpack.core.security.action.rolemapping.PutRoleMappingAction; +import org.elasticsearch.xpack.core.security.action.token.CreateTokenAction; +import org.elasticsearch.xpack.core.security.action.token.InvalidateTokenAction; +import org.elasticsearch.xpack.core.security.action.token.RefreshTokenAction; +import org.elasticsearch.xpack.core.security.action.user.AuthenticateAction; +import org.elasticsearch.xpack.core.security.action.user.ChangePasswordAction; +import org.elasticsearch.xpack.core.security.action.user.DeleteUserAction; +import org.elasticsearch.xpack.core.security.action.user.GetUsersAction; +import org.elasticsearch.xpack.core.security.action.user.HasPrivilegesAction; +import org.elasticsearch.xpack.core.security.action.user.PutUserAction; +import org.elasticsearch.xpack.core.security.action.user.SetEnabledAction; +import org.elasticsearch.xpack.core.security.authc.TokenMetaData; +import org.elasticsearch.xpack.core.security.authc.support.mapper.expressiondsl.AllExpression; +import org.elasticsearch.xpack.core.security.authc.support.mapper.expressiondsl.AnyExpression; +import org.elasticsearch.xpack.core.security.authc.support.mapper.expressiondsl.ExceptExpression; +import org.elasticsearch.xpack.core.security.authc.support.mapper.expressiondsl.FieldExpression; +import org.elasticsearch.xpack.core.security.authc.support.mapper.expressiondsl.RoleMapperExpression; +import org.elasticsearch.xpack.core.security.transport.netty4.SecurityNetty4Transport; +import org.elasticsearch.xpack.core.ssl.SSLService; +import org.elasticsearch.xpack.core.ssl.action.GetCertificateInfoAction; +import org.elasticsearch.xpack.core.watcher.WatcherFeatureSetUsage; +import org.elasticsearch.xpack.core.watcher.WatcherMetaData; +import org.elasticsearch.xpack.core.watcher.transport.actions.ack.AckWatchAction; +import org.elasticsearch.xpack.core.watcher.transport.actions.activate.ActivateWatchAction; +import org.elasticsearch.xpack.core.watcher.transport.actions.delete.DeleteWatchAction; +import org.elasticsearch.xpack.core.watcher.transport.actions.execute.ExecuteWatchAction; +import org.elasticsearch.xpack.core.watcher.transport.actions.get.GetWatchAction; +import org.elasticsearch.xpack.core.watcher.transport.actions.put.PutWatchAction; +import org.elasticsearch.xpack.core.watcher.transport.actions.service.WatcherServiceAction; +import org.elasticsearch.xpack.core.watcher.transport.actions.stats.WatcherStatsAction; +import org.elasticsearch.xpack.core.upgrade.actions.IndexUpgradeAction; +import org.elasticsearch.xpack.core.upgrade.actions.IndexUpgradeInfoAction; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Map; -import java.util.Optional; import java.util.function.Supplier; public class XPackClientPlugin extends Plugin implements ActionPlugin, NetworkPlugin { diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/XPackFeatureSet.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackFeatureSet.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/XPackFeatureSet.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackFeatureSet.java index 6fdce28433d..075625704d1 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/XPackFeatureSet.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackFeatureSet.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack; +package org.elasticsearch.xpack.core; import org.elasticsearch.action.ActionListener; import org.elasticsearch.common.io.stream.NamedWriteable; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/XPackField.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackField.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/XPackField.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackField.java index 520b38380ec..a3ea952729e 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/XPackField.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackField.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack; +package org.elasticsearch.xpack.core; public final class XPackField { // These should be moved back to XPackPlugin once its moved to common diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/XPackPlugin.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackPlugin.java similarity index 92% rename from plugin/core/src/main/java/org/elasticsearch/xpack/XPackPlugin.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackPlugin.java index 354f4f76d4c..38ad93ef4bb 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/XPackPlugin.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackPlugin.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack; +package org.elasticsearch.xpack.core; import org.apache.lucene.util.SetOnce; import org.bouncycastle.operator.OperatorCreationException; @@ -39,20 +39,18 @@ import org.elasticsearch.rest.RestHandler; import org.elasticsearch.script.ScriptService; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.watcher.ResourceWatcherService; -import org.elasticsearch.xpack.action.TransportXPackInfoAction; -import org.elasticsearch.xpack.action.TransportXPackUsageAction; -import org.elasticsearch.xpack.action.XPackInfoAction; -import org.elasticsearch.xpack.action.XPackUsageAction; -import org.elasticsearch.xpack.extensions.XPackExtension; -import org.elasticsearch.xpack.extensions.XPackExtensionsService; -import org.elasticsearch.xpack.rest.action.RestXPackInfoAction; -import org.elasticsearch.xpack.rest.action.RestXPackUsageAction; -import org.elasticsearch.xpack.security.authc.AuthenticationServiceField; -import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken; -import org.elasticsearch.xpack.ssl.SSLConfigurationReloader; -import org.elasticsearch.xpack.ssl.SSLService; +import org.elasticsearch.xpack.core.action.TransportXPackInfoAction; +import org.elasticsearch.xpack.core.action.TransportXPackUsageAction; +import org.elasticsearch.xpack.core.action.XPackInfoAction; +import org.elasticsearch.xpack.core.action.XPackUsageAction; +import org.elasticsearch.xpack.core.extensions.XPackExtension; +import org.elasticsearch.xpack.core.rest.action.RestXPackInfoAction; +import org.elasticsearch.xpack.core.rest.action.RestXPackUsageAction; +import org.elasticsearch.xpack.core.ssl.SSLConfigurationReloader; +import org.elasticsearch.xpack.core.ssl.SSLService; import javax.security.auth.DestroyFailedException; + import java.io.IOException; import java.nio.file.Path; import java.security.AccessController; @@ -62,11 +60,8 @@ import java.time.Clock; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; -import java.util.HashSet; import java.util.List; -import java.util.Set; import java.util.function.Supplier; -import java.util.stream.Collectors; public class XPackPlugin extends XPackClientPlugin implements ScriptPlugin, ExtensiblePlugin { diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/XPackSettings.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackSettings.java similarity index 92% rename from plugin/core/src/main/java/org/elasticsearch/xpack/XPackSettings.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackSettings.java index 643580c2d7a..aaa0718e9ed 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/XPackSettings.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackSettings.java @@ -3,29 +3,25 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack; +package org.elasticsearch.xpack.core; import org.elasticsearch.common.network.NetworkModule; -import org.elasticsearch.common.settings.SecureString; import org.elasticsearch.common.settings.Setting; import org.elasticsearch.common.settings.Setting.Property; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.util.concurrent.ThreadContext; -import org.elasticsearch.xpack.security.SecurityField; -import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken; -import org.elasticsearch.xpack.ssl.SSLClientAuth; -import org.elasticsearch.xpack.ssl.SSLConfigurationSettings; -import org.elasticsearch.xpack.ssl.VerificationMode; +import org.elasticsearch.xpack.core.security.SecurityField; +import org.elasticsearch.xpack.core.ssl.SSLClientAuth; +import org.elasticsearch.xpack.core.ssl.SSLConfigurationSettings; +import org.elasticsearch.xpack.core.ssl.VerificationMode; import javax.crypto.Cipher; + import java.security.NoSuchAlgorithmException; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; -import java.util.Optional; -import static org.elasticsearch.xpack.security.SecurityField.USER_SETTING; +import static org.elasticsearch.xpack.core.security.SecurityField.USER_SETTING; /** * A container for xpack setting constants. diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/action/TransportXPackInfoAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/action/TransportXPackInfoAction.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/action/TransportXPackInfoAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/action/TransportXPackInfoAction.java index d4084c195c1..415e601a40a 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/action/TransportXPackInfoAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/action/TransportXPackInfoAction.java @@ -3,22 +3,21 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.action; +package org.elasticsearch.xpack.core.action; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.support.ActionFilters; import org.elasticsearch.action.support.HandledTransportAction; import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver; import org.elasticsearch.common.inject.Inject; -import org.elasticsearch.common.inject.internal.Nullable; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.license.XPackInfoResponse; import org.elasticsearch.license.License; import org.elasticsearch.license.LicenseService; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.XPackBuild; -import org.elasticsearch.xpack.XPackFeatureSet; +import org.elasticsearch.xpack.core.XPackBuild; +import org.elasticsearch.xpack.core.XPackFeatureSet; import org.elasticsearch.license.XPackInfoResponse.FeatureSetsInfo.FeatureSet; import org.elasticsearch.license.XPackInfoResponse.LicenseInfo; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/action/TransportXPackUsageAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/action/TransportXPackUsageAction.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/action/TransportXPackUsageAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/action/TransportXPackUsageAction.java index 49723cc0ffc..f3abad5e68b 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/action/TransportXPackUsageAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/action/TransportXPackUsageAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.action; +package org.elasticsearch.xpack.core.action; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.support.ActionFilters; @@ -16,9 +16,9 @@ import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.XPackFeatureSet; -import org.elasticsearch.xpack.XPackFeatureSet.Usage; -import org.elasticsearch.xpack.common.IteratingActionListener; +import org.elasticsearch.xpack.core.XPackFeatureSet; +import org.elasticsearch.xpack.core.XPackFeatureSet.Usage; +import org.elasticsearch.xpack.core.common.IteratingActionListener; import java.util.ArrayList; import java.util.Collections; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/action/XPackInfoAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/action/XPackInfoAction.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/action/XPackInfoAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/action/XPackInfoAction.java index 634a29214b5..bdca705baff 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/action/XPackInfoAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/action/XPackInfoAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.action; +package org.elasticsearch.xpack.core.action; import org.elasticsearch.action.Action; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/action/XPackInfoRequest.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/action/XPackInfoRequest.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/action/XPackInfoRequest.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/action/XPackInfoRequest.java index 74b8cfb60ad..b3c88be93aa 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/action/XPackInfoRequest.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/action/XPackInfoRequest.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.action; +package org.elasticsearch.xpack.core.action; import org.elasticsearch.action.ActionRequest; import org.elasticsearch.action.ActionRequestValidationException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/action/XPackInfoRequestBuilder.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/action/XPackInfoRequestBuilder.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/action/XPackInfoRequestBuilder.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/action/XPackInfoRequestBuilder.java index 16452e5c39e..6ee4fb925bd 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/action/XPackInfoRequestBuilder.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/action/XPackInfoRequestBuilder.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.action; +package org.elasticsearch.xpack.core.action; import org.elasticsearch.action.ActionRequestBuilder; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/action/XPackUsageAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/action/XPackUsageAction.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/action/XPackUsageAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/action/XPackUsageAction.java index 059fc84524b..252283a1dfc 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/action/XPackUsageAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/action/XPackUsageAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.action; +package org.elasticsearch.xpack.core.action; import org.elasticsearch.action.Action; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/action/XPackUsageRequest.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/action/XPackUsageRequest.java similarity index 92% rename from plugin/core/src/main/java/org/elasticsearch/xpack/action/XPackUsageRequest.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/action/XPackUsageRequest.java index 29984692a09..d578249c147 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/action/XPackUsageRequest.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/action/XPackUsageRequest.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.action; +package org.elasticsearch.xpack.core.action; import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.action.support.master.MasterNodeRequest; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/action/XPackUsageRequestBuilder.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/action/XPackUsageRequestBuilder.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/action/XPackUsageRequestBuilder.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/action/XPackUsageRequestBuilder.java index d7d984f306e..789460f1339 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/action/XPackUsageRequestBuilder.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/action/XPackUsageRequestBuilder.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.action; +package org.elasticsearch.xpack.core.action; import org.elasticsearch.action.support.master.MasterNodeOperationRequestBuilder; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/action/XPackUsageResponse.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/action/XPackUsageResponse.java similarity index 93% rename from plugin/core/src/main/java/org/elasticsearch/xpack/action/XPackUsageResponse.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/action/XPackUsageResponse.java index 1a8ec1e75ca..afca0e000fc 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/action/XPackUsageResponse.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/action/XPackUsageResponse.java @@ -3,12 +3,12 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.action; +package org.elasticsearch.xpack.core.action; import org.elasticsearch.action.ActionResponse; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.xpack.XPackFeatureSet; +import org.elasticsearch.xpack.core.XPackFeatureSet; import java.io.IOException; import java.util.ArrayList; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/common/IteratingActionListener.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/common/IteratingActionListener.java similarity index 99% rename from plugin/core/src/main/java/org/elasticsearch/xpack/common/IteratingActionListener.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/common/IteratingActionListener.java index 8c25f4e2604..98cdd3c2a7d 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/common/IteratingActionListener.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/common/IteratingActionListener.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.common; +package org.elasticsearch.xpack.core.common; import org.elasticsearch.action.ActionListener; import org.elasticsearch.common.inject.internal.Nullable; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/common/socket/SocketAccess.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/common/socket/SocketAccess.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/common/socket/SocketAccess.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/common/socket/SocketAccess.java index b637b862cca..660b0421b3d 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/common/socket/SocketAccess.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/common/socket/SocketAccess.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.common.socket; +package org.elasticsearch.xpack.core.common.socket; import org.elasticsearch.SpecialPermission; import org.elasticsearch.common.CheckedRunnable; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/deprecation/DeprecationInfoAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/deprecation/DeprecationInfoAction.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/deprecation/DeprecationInfoAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/deprecation/DeprecationInfoAction.java index b1ab2bc2a00..a5eddbd37f8 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/deprecation/DeprecationInfoAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/deprecation/DeprecationInfoAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.deprecation; +package org.elasticsearch.xpack.core.deprecation; import org.elasticsearch.action.Action; import org.elasticsearch.action.ActionRequestValidationException; @@ -55,7 +55,7 @@ public class DeprecationInfoAction extends Action The signature of the check (BiFunction, Function, including the appropriate arguments) * @return The list of {@link DeprecationIssue} that were found in the cluster */ - static List filterChecks(List checks, Function mapper) { + public static List filterChecks(List checks, Function mapper) { return checks.stream().map(mapper).filter(Objects::nonNull).collect(Collectors.toList()); } diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/deprecation/DeprecationIssue.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/deprecation/DeprecationIssue.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/deprecation/DeprecationIssue.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/deprecation/DeprecationIssue.java index 9d55401249a..ff1b0d303d0 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/deprecation/DeprecationIssue.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/deprecation/DeprecationIssue.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.deprecation; +package org.elasticsearch.xpack.core.deprecation; import org.elasticsearch.common.Nullable; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/extensions/InstallXPackExtensionCommand.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/extensions/InstallXPackExtensionCommand.java similarity index 99% rename from plugin/core/src/main/java/org/elasticsearch/xpack/extensions/InstallXPackExtensionCommand.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/extensions/InstallXPackExtensionCommand.java index 0582052a671..9be519f2d4e 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/extensions/InstallXPackExtensionCommand.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/extensions/InstallXPackExtensionCommand.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.extensions; +package org.elasticsearch.xpack.core.extensions; import joptsimple.OptionSet; import joptsimple.OptionSpec; @@ -48,7 +48,7 @@ import java.security.UnresolvedPermission; import java.security.URIParameter; import static org.elasticsearch.cli.Terminal.Verbosity.VERBOSE; -import static org.elasticsearch.xpack.XPackPlugin.resolveXPackExtensionsFile; +import static org.elasticsearch.xpack.core.XPackPlugin.resolveXPackExtensionsFile; /** * A command for the extension cli to install an extension into x-pack. diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/extensions/ListXPackExtensionCommand.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/extensions/ListXPackExtensionCommand.java similarity index 88% rename from plugin/core/src/main/java/org/elasticsearch/xpack/extensions/ListXPackExtensionCommand.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/extensions/ListXPackExtensionCommand.java index 405fde6c40c..0faae15ab1f 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/extensions/ListXPackExtensionCommand.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/extensions/ListXPackExtensionCommand.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.extensions; +package org.elasticsearch.xpack.core.extensions; import joptsimple.OptionSet; import org.elasticsearch.cli.EnvironmentAwareCommand; @@ -19,7 +19,7 @@ import java.util.Collections; import java.util.List; import static org.elasticsearch.cli.Terminal.Verbosity.VERBOSE; -import static org.elasticsearch.xpack.XPackPlugin.resolveXPackExtensionsFile; +import static org.elasticsearch.xpack.core.XPackPlugin.resolveXPackExtensionsFile; /** * A command for the extension cli to list extensions installed in x-pack. @@ -45,8 +45,7 @@ class ListXPackExtensionCommand extends EnvironmentAwareCommand { Collections.sort(extensions); for (final Path extension : extensions) { terminal.println(extension.getFileName().toString()); - XPackExtensionInfo info = - XPackExtensionInfo.readFromProperties(extension); + XPackExtensionInfo info = XPackExtensionInfo.readFromProperties(extension); terminal.println(VERBOSE, info.toString()); } } diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/extensions/RemoveXPackExtensionCommand.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/extensions/RemoveXPackExtensionCommand.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/extensions/RemoveXPackExtensionCommand.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/extensions/RemoveXPackExtensionCommand.java index 7442d294338..4f0f19bcee3 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/extensions/RemoveXPackExtensionCommand.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/extensions/RemoveXPackExtensionCommand.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.extensions; +package org.elasticsearch.xpack.core.extensions; import joptsimple.OptionSet; import joptsimple.OptionSpec; @@ -14,7 +14,7 @@ import org.elasticsearch.cli.Terminal; import org.elasticsearch.cli.UserException; import org.elasticsearch.common.Strings; import org.elasticsearch.env.Environment; -import org.elasticsearch.xpack.XPackPlugin; +import org.elasticsearch.xpack.core.XPackPlugin; import java.nio.file.Files; import java.nio.file.Path; @@ -23,7 +23,6 @@ import java.util.ArrayList; import java.util.List; import static org.elasticsearch.cli.Terminal.Verbosity.VERBOSE; -import static org.elasticsearch.xpack.XPackPlugin.resolveXPackExtensionsFile; /** * A command for the extension cli to remove an extension from x-pack. diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/core/extensions/XPackExtension.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/extensions/XPackExtension.java new file mode 100644 index 00000000000..05ce18cf1ba --- /dev/null +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/extensions/XPackExtension.java @@ -0,0 +1,98 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ +package org.elasticsearch.xpack.core.extensions; + +import org.elasticsearch.common.settings.Setting; +import org.elasticsearch.plugins.Plugin; +import org.elasticsearch.watcher.ResourceWatcherService; +import org.elasticsearch.xpack.core.security.authc.AuthenticationFailureHandler; +import org.elasticsearch.xpack.core.security.authc.Realm; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.security.SecurityExtension; + +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.Set; + +/** + * An extension point allowing to plug in custom functionality in x-pack authentication module. + * @deprecated use {@link SecurityExtension} via SPI instead + */ +@Deprecated +public abstract class XPackExtension implements SecurityExtension { + /** + * The name of the plugin. + */ + public abstract String name(); + + /** + * The description of the plugin. + */ + public abstract String description(); + + /** + * Returns headers which should be copied from REST requests to internal cluster requests. + */ + public Collection getRestHeaders() { + return Collections.emptyList(); + } + + /** +<<<<<<< HEAD:plugin/core/src/main/java/org/elasticsearch/xpack/core/extensions/XPackExtension.java + * Returns authentication realm implementations added by this extension. + * + * The key of the returned {@link Map} is the type name of the realm, and the value + * is a {@link Realm.Factory} which will construct + * that realm for use in authentication when that realm type is configured. + * + * @param resourceWatcherService Use to watch configuration files for changes + */ + public Map getRealms(ResourceWatcherService resourceWatcherService) { + return Collections.emptyMap(); + } + + /** + * Returns the set of {@link Setting settings} that may be configured for the each type of realm. + * + * Each setting key must be unqualified and is in the same format as will be provided via {@link RealmConfig#settings()}. + * If a given realm-type is not present in the returned map, then it will be treated as if it supported all possible settings. + * + * The life-cycle of an extension dictates that this method will be called before {@link #getRealms(ResourceWatcherService)} + */ + public Map>> getRealmSettings() { return Collections.emptyMap(); } + + /** + * Returns a handler for authentication failures, or null to use the default handler. + * + * Only one installed extension may have an authentication failure handler. If more than + * one extension returns a non-null handler, an error is raised. + */ + public AuthenticationFailureHandler getAuthenticationFailureHandler() { + return null; + } + + /** +======= +>>>>>>> master:plugin/core/src/main/java/org/elasticsearch/xpack/extensions/XPackExtension.java + * Returns a list of settings that should be filtered from API calls. In most cases, + * these settings are sensitive such as passwords. + * + * The value should be the full name of the setting or a wildcard that matches the + * desired setting. + * @deprecated use {@link Plugin#getSettingsFilter()} ()} via SPI extension instead + */ + @Deprecated + public List getSettingsFilter() { + return Collections.emptyList(); + } + + @Override + public String toString() { + return name(); + } +} diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/extensions/XPackExtensionCli.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/extensions/XPackExtensionCli.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/extensions/XPackExtensionCli.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/extensions/XPackExtensionCli.java index b67b2a31962..c533b25f680 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/extensions/XPackExtensionCli.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/extensions/XPackExtensionCli.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.extensions; +package org.elasticsearch.xpack.core.extensions; import org.elasticsearch.cli.LoggingAwareMultiCommand; import org.elasticsearch.cli.MultiCommand; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/extensions/XPackExtensionInfo.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/extensions/XPackExtensionInfo.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/extensions/XPackExtensionInfo.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/extensions/XPackExtensionInfo.java index c2ea2a95316..43219461b8c 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/extensions/XPackExtensionInfo.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/extensions/XPackExtensionInfo.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.extensions; +package org.elasticsearch.xpack.core.extensions; import org.elasticsearch.Version; import org.elasticsearch.bootstrap.JarHell; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/extensions/XPackExtensionPolicy.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/extensions/XPackExtensionPolicy.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/extensions/XPackExtensionPolicy.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/extensions/XPackExtensionPolicy.java index 79bf24b40a4..27ae8caa459 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/extensions/XPackExtensionPolicy.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/extensions/XPackExtensionPolicy.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.extensions; +package org.elasticsearch.xpack.core.extensions; import org.elasticsearch.common.SuppressForbidden; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/extensions/XPackExtensionSecurity.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/extensions/XPackExtensionSecurity.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/extensions/XPackExtensionSecurity.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/extensions/XPackExtensionSecurity.java index 54f744b8551..cc9d052e192 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/extensions/XPackExtensionSecurity.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/extensions/XPackExtensionSecurity.java @@ -3,11 +3,12 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.extensions; +package org.elasticsearch.xpack.core.extensions; import org.elasticsearch.SpecialPermission; import org.elasticsearch.common.SuppressForbidden; import org.elasticsearch.common.io.PathUtils; +import org.elasticsearch.xpack.core.extensions.XPackExtensionInfo; import java.io.IOException; import java.net.URISyntaxException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/extensions/XPackExtensionsService.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/extensions/XPackExtensionsService.java similarity index 99% rename from plugin/core/src/main/java/org/elasticsearch/xpack/extensions/XPackExtensionsService.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/extensions/XPackExtensionsService.java index 361d20bbd3e..ebc336f38be 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/extensions/XPackExtensionsService.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/extensions/XPackExtensionsService.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.extensions; +package org.elasticsearch.xpack.core.extensions; import java.io.IOException; import java.net.URL; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/graph/GraphFeatureSetUsage.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/graph/GraphFeatureSetUsage.java similarity index 81% rename from plugin/core/src/main/java/org/elasticsearch/xpack/graph/GraphFeatureSetUsage.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/graph/GraphFeatureSetUsage.java index af2fdebe23c..1fd35f20f04 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/graph/GraphFeatureSetUsage.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/graph/GraphFeatureSetUsage.java @@ -3,11 +3,11 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.graph; +package org.elasticsearch.xpack.core.graph; import org.elasticsearch.common.io.stream.StreamInput; -import org.elasticsearch.xpack.XPackFeatureSet; -import org.elasticsearch.xpack.XPackField; +import org.elasticsearch.xpack.core.XPackFeatureSet; +import org.elasticsearch.xpack.core.XPackField; import java.io.IOException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/graph/action/Connection.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/graph/action/Connection.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/graph/action/Connection.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/graph/action/Connection.java index 02d07f882e5..f3d92896449 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/graph/action/Connection.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/graph/action/Connection.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.graph.action; +package org.elasticsearch.xpack.core.graph.action; import com.carrotsearch.hppc.ObjectIntHashMap; @@ -11,7 +11,7 @@ import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.ToXContent.Params; -import org.elasticsearch.xpack.graph.action.Vertex.VertexId; +import org.elasticsearch.xpack.core.graph.action.Vertex.VertexId; import java.io.IOException; import java.util.Map; @@ -28,7 +28,7 @@ public class Connection { double weight; long docCount; - Connection(Vertex from, Vertex to, double weight, long docCount) { + public Connection(Vertex from, Vertex to, double weight, long docCount) { this.from = from; this.to = to; this.weight = weight; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/graph/action/GraphExploreAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/graph/action/GraphExploreAction.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/graph/action/GraphExploreAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/graph/action/GraphExploreAction.java index 9375a95d92f..2442beb2e25 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/graph/action/GraphExploreAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/graph/action/GraphExploreAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.graph.action; +package org.elasticsearch.xpack.core.graph.action; import org.elasticsearch.action.Action; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/graph/action/GraphExploreRequest.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/graph/action/GraphExploreRequest.java similarity index 99% rename from plugin/core/src/main/java/org/elasticsearch/xpack/graph/action/GraphExploreRequest.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/graph/action/GraphExploreRequest.java index ec436182537..85abc81ba07 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/graph/action/GraphExploreRequest.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/graph/action/GraphExploreRequest.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.graph.action; +package org.elasticsearch.xpack.core.graph.action; import org.elasticsearch.action.ActionRequest; import org.elasticsearch.action.ActionRequestValidationException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/graph/action/GraphExploreRequestBuilder.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/graph/action/GraphExploreRequestBuilder.java similarity index 99% rename from plugin/core/src/main/java/org/elasticsearch/xpack/graph/action/GraphExploreRequestBuilder.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/graph/action/GraphExploreRequestBuilder.java index 55e4942d1c7..c6044d1aabf 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/graph/action/GraphExploreRequestBuilder.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/graph/action/GraphExploreRequestBuilder.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.graph.action; +package org.elasticsearch.xpack.core.graph.action; import org.elasticsearch.action.ActionRequestBuilder; import org.elasticsearch.action.support.IndicesOptions; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/graph/action/GraphExploreResponse.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/graph/action/GraphExploreResponse.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/graph/action/GraphExploreResponse.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/graph/action/GraphExploreResponse.java index 83a370aaf06..3d6c5f5aaca 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/graph/action/GraphExploreResponse.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/graph/action/GraphExploreResponse.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.graph.action; +package org.elasticsearch.xpack.core.graph.action; import com.carrotsearch.hppc.ObjectIntHashMap; import org.elasticsearch.action.ActionResponse; @@ -14,8 +14,8 @@ import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.graph.action.Connection.ConnectionId; -import org.elasticsearch.xpack.graph.action.Vertex.VertexId; +import org.elasticsearch.xpack.core.graph.action.Connection.ConnectionId; +import org.elasticsearch.xpack.core.graph.action.Vertex.VertexId; import java.io.IOException; import java.util.Collection; @@ -25,7 +25,7 @@ import java.util.Map; import static org.elasticsearch.action.search.ShardSearchFailure.readShardSearchFailure; /** - * Graph explore response holds a graph of {@link Vertex} and {@link Connection} objects + * Graph explore response holds a graph of {@link Vertex} and {@link Connection} objects * (nodes and edges in common graph parlance). * * @see GraphExploreRequest diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/graph/action/Hop.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/graph/action/Hop.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/graph/action/Hop.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/graph/action/Hop.java index 5e1169bf18e..8ba7005f15f 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/graph/action/Hop.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/graph/action/Hop.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.graph.action; +package org.elasticsearch.xpack.core.graph.action; import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.action.ValidateActions; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/graph/action/Vertex.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/graph/action/Vertex.java similarity index 93% rename from plugin/core/src/main/java/org/elasticsearch/xpack/graph/action/Vertex.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/graph/action/Vertex.java index 44126ca49d4..c85d6d7dfd6 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/graph/action/Vertex.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/graph/action/Vertex.java @@ -3,11 +3,10 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.graph.action; +package org.elasticsearch.xpack.core.graph.action; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.common.xcontent.ToXContent.Params; import org.elasticsearch.common.xcontent.ToXContentFragment; import org.elasticsearch.common.xcontent.XContentBuilder; @@ -21,12 +20,13 @@ import java.io.IOException; * other term that appears in documents and is interesting to represent in a network. */ public class Vertex implements ToXContentFragment { - final String field; - final String term; - double weight; - final int depth; - final long bg; - long fg; + + private final String field; + private final String term; + private double weight; + private final int depth; + private final long bg; + private long fg; public Vertex(String field, String term, double weight, int depth, long bg, long fg) { super(); @@ -105,8 +105,12 @@ public class Vertex implements ToXContentFragment { return weight; } + public void setWeight(final double weight) { + this.weight = weight; + } + /** - * If the {@link GraphExploreRequest#useSignificance(boolean)} is true (the default) + * If the {@link GraphExploreRequest#useSignificance(boolean)} is true (the default) * this statistic is available. * @return the number of documents in the index that contain this term (see bg_count in * @@ -128,6 +132,10 @@ public class Vertex implements ToXContentFragment { return fg; } + public void setFg(final long fg) { + this.fg = fg; + } + /** * @return the sequence number in the series of hops where this Vertex term was first encountered */ diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/graph/action/VertexRequest.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/graph/action/VertexRequest.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/graph/action/VertexRequest.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/graph/action/VertexRequest.java index fa816a13b2f..f7f7dec4b17 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/graph/action/VertexRequest.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/graph/action/VertexRequest.java @@ -3,11 +3,11 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.graph.action; +package org.elasticsearch.xpack.core.graph.action; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.xpack.graph.action.GraphExploreRequest.TermBoost; +import org.elasticsearch.xpack.core.graph.action.GraphExploreRequest.TermBoost; import java.io.IOException; import java.util.HashMap; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/MLMetadataField.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/MLMetadataField.java similarity index 93% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/MLMetadataField.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/MLMetadataField.java index 670350059e8..bef1b57902d 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/MLMetadataField.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/MLMetadataField.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml; +package org.elasticsearch.xpack.core.ml; public final class MLMetadataField { diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/MachineLearningClientActionPlugin.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/MachineLearningClientActionPlugin.java similarity index 91% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/MachineLearningClientActionPlugin.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/MachineLearningClientActionPlugin.java index c1bf5b2f079..59ee70ebad2 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/MachineLearningClientActionPlugin.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/MachineLearningClientActionPlugin.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml; +package org.elasticsearch.xpack.core.ml; import org.elasticsearch.common.settings.Setting; import org.elasticsearch.common.unit.ByteSizeValue; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/MachineLearningFeatureSetUsage.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/MachineLearningFeatureSetUsage.java similarity index 79% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/MachineLearningFeatureSetUsage.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/MachineLearningFeatureSetUsage.java index d57ed5a49f3..1779ca703a5 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/MachineLearningFeatureSetUsage.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/MachineLearningFeatureSetUsage.java @@ -3,13 +3,13 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml; +package org.elasticsearch.xpack.core.ml; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.XPackFeatureSet; -import org.elasticsearch.xpack.XPackField; +import org.elasticsearch.xpack.core.XPackFeatureSet; +import org.elasticsearch.xpack.core.XPackField; import java.io.IOException; import java.util.Map; @@ -17,12 +17,12 @@ import java.util.Objects; public class MachineLearningFeatureSetUsage extends XPackFeatureSet.Usage { - protected static final String ALL = "_all"; - protected static final String JOBS_FIELD = "jobs"; - protected static final String DATAFEEDS_FIELD = "datafeeds"; - protected static final String COUNT = "count"; - protected static final String DETECTORS = "detectors"; - protected static final String MODEL_SIZE = "model_size"; + public static final String ALL = "_all"; + public static final String JOBS_FIELD = "jobs"; + public static final String DATAFEEDS_FIELD = "datafeeds"; + public static final String COUNT = "count"; + public static final String DETECTORS = "detectors"; + public static final String MODEL_SIZE = "model_size"; private final Map jobsUsage; private final Map datafeedsUsage; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/MachineLearningField.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/MachineLearningField.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/MachineLearningField.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/MachineLearningField.java index 18613854f98..6b5ba086c6f 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/MachineLearningField.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/MachineLearningField.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml; +package org.elasticsearch.xpack.core.ml; import org.elasticsearch.common.settings.Setting; import org.elasticsearch.common.unit.ByteSizeValue; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/MlClientHelper.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/MlClientHelper.java similarity index 90% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/MlClientHelper.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/MlClientHelper.java index 186c768ecbb..a76c5c51e8d 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/MlClientHelper.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/MlClientHelper.java @@ -3,16 +3,16 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml; +package org.elasticsearch.xpack.core.ml; import org.elasticsearch.action.ActionResponse; import org.elasticsearch.client.Client; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.common.util.set.Sets; -import org.elasticsearch.xpack.ClientHelper; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; -import org.elasticsearch.xpack.security.authc.AuthenticationField; -import org.elasticsearch.xpack.security.authc.AuthenticationServiceField; +import org.elasticsearch.xpack.core.ClientHelper; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.security.authc.AuthenticationField; +import org.elasticsearch.xpack.core.security.authc.AuthenticationServiceField; import java.util.Map; import java.util.Set; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/MlMetaIndex.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/MlMetaIndex.java similarity index 90% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/MlMetaIndex.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/MlMetaIndex.java index 9be732a9ca6..d625e6e311a 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/MlMetaIndex.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/MlMetaIndex.java @@ -3,12 +3,12 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml; +package org.elasticsearch.xpack.core.ml; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.ml.calendars.Calendar; -import org.elasticsearch.xpack.ml.calendars.ScheduledEvent; -import org.elasticsearch.xpack.ml.job.persistence.ElasticsearchMappings; +import org.elasticsearch.xpack.core.ml.calendars.Calendar; +import org.elasticsearch.xpack.core.ml.calendars.ScheduledEvent; +import org.elasticsearch.xpack.core.ml.job.persistence.ElasticsearchMappings; import java.io.IOException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/MlMetadata.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/MlMetadata.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/MlMetadata.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/MlMetadata.java index 7dc81a32102..44a5db8a63b 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/MlMetadata.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/MlMetadata.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml; +package org.elasticsearch.xpack.core.ml; import org.elasticsearch.ResourceAlreadyExistsException; import org.elasticsearch.ResourceNotFoundException; @@ -23,20 +23,20 @@ import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.common.xcontent.ObjectParser; import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; -import org.elasticsearch.xpack.ml.datafeed.DatafeedJobValidator; -import org.elasticsearch.xpack.ml.datafeed.DatafeedState; -import org.elasticsearch.xpack.ml.datafeed.DatafeedUpdate; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.config.JobState; -import org.elasticsearch.xpack.ml.job.config.JobTaskStatus; -import org.elasticsearch.xpack.ml.job.groups.GroupOrJobLookup; -import org.elasticsearch.xpack.ml.job.messages.Messages; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; -import org.elasticsearch.xpack.ml.utils.NameResolver; -import org.elasticsearch.xpack.ml.utils.ToXContentParams; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData.PersistentTask; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedJobValidator; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedState; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedUpdate; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.JobState; +import org.elasticsearch.xpack.core.ml.job.config.JobTaskStatus; +import org.elasticsearch.xpack.core.ml.job.groups.GroupOrJobLookup; +import org.elasticsearch.xpack.core.ml.job.messages.Messages; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.utils.NameResolver; +import org.elasticsearch.xpack.core.ml.utils.ToXContentParams; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData.PersistentTask; import java.io.IOException; import java.util.Collection; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/MlParserType.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/MlParserType.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/MlParserType.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/MlParserType.java index 8f33486a0b3..64f52ab2d2c 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/MlParserType.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/MlParserType.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml; +package org.elasticsearch.xpack.core.ml; /** * In order to allow enhancements that require additions to the ML custom cluster state to be made in minor versions, diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/CloseJobAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/CloseJobAction.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/CloseJobAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/CloseJobAction.java index 910290b168d..4be867c3052 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/CloseJobAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/CloseJobAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.action; +package org.elasticsearch.xpack.core.ml.action; import org.elasticsearch.Version; import org.elasticsearch.action.Action; @@ -21,8 +21,8 @@ import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.tasks.Task; -import org.elasticsearch.xpack.ml.MachineLearningField; -import org.elasticsearch.xpack.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.MachineLearningField; +import org.elasticsearch.xpack.core.ml.job.config.Job; import java.io.IOException; import java.util.Objects; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/DeleteCalendarAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/DeleteCalendarAction.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/DeleteCalendarAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/DeleteCalendarAction.java index da2f71b6cb7..2a01282d411 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/DeleteCalendarAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/DeleteCalendarAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.action; +package org.elasticsearch.xpack.core.ml.action; import org.elasticsearch.action.Action; import org.elasticsearch.action.ActionRequestBuilder; @@ -13,8 +13,8 @@ import org.elasticsearch.action.support.master.AcknowledgedResponse; import org.elasticsearch.client.ElasticsearchClient; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.xpack.ml.calendars.Calendar; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.calendars.Calendar; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import java.io.IOException; import java.util.Objects; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/DeleteCalendarEventAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/DeleteCalendarEventAction.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/DeleteCalendarEventAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/DeleteCalendarEventAction.java index a116197cc9a..01d5e3e3721 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/DeleteCalendarEventAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/DeleteCalendarEventAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.action; +package org.elasticsearch.xpack.core.ml.action; import org.elasticsearch.action.Action; import org.elasticsearch.action.ActionRequestBuilder; @@ -13,9 +13,9 @@ import org.elasticsearch.action.support.master.AcknowledgedResponse; import org.elasticsearch.client.ElasticsearchClient; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.xpack.ml.calendars.Calendar; -import org.elasticsearch.xpack.ml.calendars.ScheduledEvent; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.calendars.Calendar; +import org.elasticsearch.xpack.core.ml.calendars.ScheduledEvent; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import java.io.IOException; import java.util.Objects; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/DeleteDatafeedAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/DeleteDatafeedAction.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/DeleteDatafeedAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/DeleteDatafeedAction.java index 08ad5e953a7..6876294bdf3 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/DeleteDatafeedAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/DeleteDatafeedAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.action; +package org.elasticsearch.xpack.core.ml.action; import org.elasticsearch.Version; import org.elasticsearch.action.Action; @@ -17,8 +17,8 @@ import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.xcontent.ToXContentFragment; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import java.io.IOException; import java.util.Objects; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/DeleteExpiredDataAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/DeleteExpiredDataAction.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/DeleteExpiredDataAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/DeleteExpiredDataAction.java index cad66f5736e..aeacf68fe18 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/DeleteExpiredDataAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/DeleteExpiredDataAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.action; +package org.elasticsearch.xpack.core.ml.action; import org.elasticsearch.action.Action; import org.elasticsearch.action.ActionRequest; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/DeleteFilterAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/DeleteFilterAction.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/DeleteFilterAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/DeleteFilterAction.java index 7143643d7b4..86e343fda22 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/DeleteFilterAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/DeleteFilterAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.action; +package org.elasticsearch.xpack.core.ml.action; import org.elasticsearch.action.Action; import org.elasticsearch.action.ActionRequestValidationException; @@ -14,7 +14,7 @@ import org.elasticsearch.client.ElasticsearchClient; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import java.io.IOException; import java.util.Objects; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/DeleteJobAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/DeleteJobAction.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/DeleteJobAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/DeleteJobAction.java index 88e82d7edfe..4fa264862db 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/DeleteJobAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/DeleteJobAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.action; +package org.elasticsearch.xpack.core.ml.action; import org.elasticsearch.Version; import org.elasticsearch.action.Action; @@ -16,9 +16,9 @@ import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.tasks.Task; import org.elasticsearch.tasks.TaskId; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.persistence.JobStorageDeletionTask; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.persistence.JobStorageDeletionTask; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import java.io.IOException; import java.util.Map; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/DeleteModelSnapshotAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/DeleteModelSnapshotAction.java similarity index 92% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/DeleteModelSnapshotAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/DeleteModelSnapshotAction.java index 243aa17a250..39c497ab51e 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/DeleteModelSnapshotAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/DeleteModelSnapshotAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.action; +package org.elasticsearch.xpack.core.ml.action; import org.elasticsearch.action.Action; import org.elasticsearch.action.ActionRequest; @@ -13,9 +13,9 @@ import org.elasticsearch.action.support.master.AcknowledgedResponse; import org.elasticsearch.client.ElasticsearchClient; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshotField; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshotField; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import java.io.IOException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/FinalizeJobExecutionAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/FinalizeJobExecutionAction.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/FinalizeJobExecutionAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/FinalizeJobExecutionAction.java index e1231135d3e..9259aa0c604 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/FinalizeJobExecutionAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/FinalizeJobExecutionAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.action; +package org.elasticsearch.xpack.core.ml.action; import org.elasticsearch.action.Action; import org.elasticsearch.action.ActionRequestValidationException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/FlushJobAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/FlushJobAction.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/FlushJobAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/FlushJobAction.java index 144c2983986..ab02a258be1 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/FlushJobAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/FlushJobAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.action; +package org.elasticsearch.xpack.core.ml.action; import org.elasticsearch.Version; import org.elasticsearch.action.Action; @@ -19,8 +19,8 @@ import org.elasticsearch.common.xcontent.ObjectParser; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.process.autodetect.output.FlushAcknowledgement; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.output.FlushAcknowledgement; import java.io.IOException; import java.util.Date; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/ForecastJobAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/ForecastJobAction.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/ForecastJobAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/ForecastJobAction.java index fc79df76b8d..58d481d794d 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/ForecastJobAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/ForecastJobAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.action; +package org.elasticsearch.xpack.core.ml.action; import org.elasticsearch.action.Action; import org.elasticsearch.action.ActionRequestBuilder; @@ -18,8 +18,8 @@ import org.elasticsearch.common.xcontent.ObjectParser; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.results.Forecast; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.results.Forecast; import java.io.IOException; import java.util.Objects; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/GetBucketsAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/GetBucketsAction.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/GetBucketsAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/GetBucketsAction.java index fc050ea01bb..dec819613cb 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/GetBucketsAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/GetBucketsAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.action; +package org.elasticsearch.xpack.core.ml.action; import org.elasticsearch.Version; import org.elasticsearch.action.Action; @@ -20,12 +20,12 @@ import org.elasticsearch.common.xcontent.ObjectParser; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.ml.action.util.PageParams; -import org.elasticsearch.xpack.ml.action.util.QueryPage; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.results.Bucket; -import org.elasticsearch.xpack.ml.job.results.Result; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.action.util.PageParams; +import org.elasticsearch.xpack.core.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.results.Bucket; +import org.elasticsearch.xpack.core.ml.job.results.Result; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import java.io.IOException; import java.util.Objects; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/GetCalendarEventsAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/GetCalendarEventsAction.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/GetCalendarEventsAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/GetCalendarEventsAction.java index 11ea9669e5c..2fe993b5138 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/GetCalendarEventsAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/GetCalendarEventsAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.action; +package org.elasticsearch.xpack.core.ml.action; import org.elasticsearch.action.Action; import org.elasticsearch.action.ActionRequest; @@ -19,12 +19,12 @@ import org.elasticsearch.common.xcontent.ObjectParser; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.ml.action.util.PageParams; -import org.elasticsearch.xpack.ml.action.util.QueryPage; -import org.elasticsearch.xpack.ml.calendars.Calendar; -import org.elasticsearch.xpack.ml.calendars.ScheduledEvent; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.action.util.PageParams; +import org.elasticsearch.xpack.core.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.calendars.Calendar; +import org.elasticsearch.xpack.core.ml.calendars.ScheduledEvent; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import java.io.IOException; import java.util.Objects; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/GetCalendarsAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/GetCalendarsAction.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/GetCalendarsAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/GetCalendarsAction.java index 82f00f86ed6..f11d9ccbf86 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/GetCalendarsAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/GetCalendarsAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.action; +package org.elasticsearch.xpack.core.ml.action; import org.elasticsearch.action.Action; import org.elasticsearch.action.ActionRequest; @@ -20,9 +20,9 @@ import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.rest.RestStatus; -import org.elasticsearch.xpack.ml.action.util.PageParams; -import org.elasticsearch.xpack.ml.action.util.QueryPage; -import org.elasticsearch.xpack.ml.calendars.Calendar; +import org.elasticsearch.xpack.core.ml.action.util.PageParams; +import org.elasticsearch.xpack.core.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.calendars.Calendar; import java.io.IOException; import java.util.Objects; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/GetCategoriesAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/GetCategoriesAction.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/GetCategoriesAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/GetCategoriesAction.java index 26622abccfb..84976c61e45 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/GetCategoriesAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/GetCategoriesAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.action; +package org.elasticsearch.xpack.core.ml.action; import org.elasticsearch.action.Action; import org.elasticsearch.action.ActionRequest; @@ -18,11 +18,11 @@ import org.elasticsearch.common.xcontent.ObjectParser; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.ml.action.util.PageParams; -import org.elasticsearch.xpack.ml.action.util.QueryPage; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.results.CategoryDefinition; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.action.util.PageParams; +import org.elasticsearch.xpack.core.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.results.CategoryDefinition; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import java.io.IOException; import java.util.Objects; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/GetDatafeedsAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/GetDatafeedsAction.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/GetDatafeedsAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/GetDatafeedsAction.java index d42c1b67ce0..3f71ac2dc02 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/GetDatafeedsAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/GetDatafeedsAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.action; +package org.elasticsearch.xpack.core.ml.action; import org.elasticsearch.Version; import org.elasticsearch.action.Action; @@ -18,9 +18,9 @@ import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.ml.action.util.QueryPage; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import java.io.IOException; import java.util.Objects; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/GetDatafeedsStatsAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/GetDatafeedsStatsAction.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/GetDatafeedsStatsAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/GetDatafeedsStatsAction.java index f2a06276000..b193ae28438 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/GetDatafeedsStatsAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/GetDatafeedsStatsAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.action; +package org.elasticsearch.xpack.core.ml.action; import org.elasticsearch.Version; import org.elasticsearch.action.Action; @@ -21,10 +21,10 @@ import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.io.stream.Writeable; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.ml.action.util.QueryPage; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; -import org.elasticsearch.xpack.ml.datafeed.DatafeedState; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedState; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import java.io.IOException; import java.util.Map; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/GetFiltersAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/GetFiltersAction.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/GetFiltersAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/GetFiltersAction.java index bd1488c65dc..9d375ec0dfc 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/GetFiltersAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/GetFiltersAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.action; +package org.elasticsearch.xpack.core.ml.action; import org.elasticsearch.action.Action; import org.elasticsearch.action.ActionRequest; @@ -17,9 +17,9 @@ import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.xcontent.StatusToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.rest.RestStatus; -import org.elasticsearch.xpack.ml.action.util.PageParams; -import org.elasticsearch.xpack.ml.action.util.QueryPage; -import org.elasticsearch.xpack.ml.job.config.MlFilter; +import org.elasticsearch.xpack.core.ml.action.util.PageParams; +import org.elasticsearch.xpack.core.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.job.config.MlFilter; import java.io.IOException; import java.util.Objects; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/GetInfluencersAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/GetInfluencersAction.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/GetInfluencersAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/GetInfluencersAction.java index e009b4ba847..39721b0c728 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/GetInfluencersAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/GetInfluencersAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.action; +package org.elasticsearch.xpack.core.ml.action; import org.elasticsearch.action.Action; import org.elasticsearch.action.ActionRequest; @@ -19,11 +19,11 @@ import org.elasticsearch.common.xcontent.ObjectParser; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.ml.action.util.PageParams; -import org.elasticsearch.xpack.ml.action.util.QueryPage; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.results.Influencer; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.action.util.PageParams; +import org.elasticsearch.xpack.core.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.results.Influencer; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import java.io.IOException; import java.util.Objects; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/GetJobsAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/GetJobsAction.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/GetJobsAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/GetJobsAction.java index 2c61e92e094..f315783330e 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/GetJobsAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/GetJobsAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.action; +package org.elasticsearch.xpack.core.ml.action; import org.elasticsearch.Version; import org.elasticsearch.action.Action; @@ -18,9 +18,9 @@ import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.ml.action.util.QueryPage; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import java.io.IOException; import java.util.Objects; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/GetJobsStatsAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/GetJobsStatsAction.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/GetJobsStatsAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/GetJobsStatsAction.java index c8f69c4817d..0f62ec09f0d 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/GetJobsStatsAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/GetJobsStatsAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.action; +package org.elasticsearch.xpack.core.ml.action; import org.elasticsearch.Version; import org.elasticsearch.action.Action; @@ -26,12 +26,12 @@ import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.tasks.Task; -import org.elasticsearch.xpack.ml.action.util.QueryPage; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.config.JobState; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.DataCounts; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSizeStats; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.JobState; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.DataCounts; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSizeStats; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import java.io.IOException; import java.util.Collections; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/GetModelSnapshotsAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/GetModelSnapshotsAction.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/GetModelSnapshotsAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/GetModelSnapshotsAction.java index 5cc7695d466..382b60a07d5 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/GetModelSnapshotsAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/GetModelSnapshotsAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.action; +package org.elasticsearch.xpack.core.ml.action; import org.elasticsearch.action.Action; import org.elasticsearch.action.ActionRequest; @@ -20,11 +20,11 @@ import org.elasticsearch.common.xcontent.ObjectParser; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.ml.action.util.PageParams; -import org.elasticsearch.xpack.ml.action.util.QueryPage; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshot; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.action.util.PageParams; +import org.elasticsearch.xpack.core.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshot; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import java.io.IOException; import java.util.Objects; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/GetOverallBucketsAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/GetOverallBucketsAction.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/GetOverallBucketsAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/GetOverallBucketsAction.java index f980c40a386..62a82212c35 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/GetOverallBucketsAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/GetOverallBucketsAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.action; +package org.elasticsearch.xpack.core.ml.action; import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.action.Action; @@ -23,11 +23,11 @@ import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.index.mapper.DateFieldMapper; -import org.elasticsearch.xpack.ml.action.util.QueryPage; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.messages.Messages; -import org.elasticsearch.xpack.ml.job.results.OverallBucket; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.messages.Messages; +import org.elasticsearch.xpack.core.ml.job.results.OverallBucket; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import java.io.IOException; import java.util.Collections; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/GetRecordsAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/GetRecordsAction.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/GetRecordsAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/GetRecordsAction.java index 4b919b74a3c..586a40af81a 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/GetRecordsAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/GetRecordsAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.action; +package org.elasticsearch.xpack.core.ml.action; import org.elasticsearch.action.Action; import org.elasticsearch.action.ActionRequest; @@ -19,12 +19,12 @@ import org.elasticsearch.common.xcontent.ObjectParser; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.ml.action.util.PageParams; -import org.elasticsearch.xpack.ml.action.util.QueryPage; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.results.AnomalyRecord; -import org.elasticsearch.xpack.ml.job.results.Influencer; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.action.util.PageParams; +import org.elasticsearch.xpack.core.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.results.AnomalyRecord; +import org.elasticsearch.xpack.core.ml.job.results.Influencer; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import java.io.IOException; import java.util.Objects; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/IsolateDatafeedAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/IsolateDatafeedAction.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/IsolateDatafeedAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/IsolateDatafeedAction.java index d1d5f99d32e..98ca6c29f4b 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/IsolateDatafeedAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/IsolateDatafeedAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.action; +package org.elasticsearch.xpack.core.ml.action; import org.elasticsearch.action.Action; import org.elasticsearch.action.ActionRequestBuilder; @@ -19,9 +19,9 @@ import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.tasks.Task; -import org.elasticsearch.xpack.ml.MLMetadataField; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.MLMetadataField; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import java.io.IOException; import java.util.Objects; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/JobTaskRequest.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/JobTaskRequest.java similarity index 88% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/JobTaskRequest.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/JobTaskRequest.java index cb7bbf59e50..adc84b2cf46 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/JobTaskRequest.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/JobTaskRequest.java @@ -3,14 +3,14 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.action; +package org.elasticsearch.xpack.core.ml.action; import org.elasticsearch.action.support.tasks.BaseTasksRequest; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.tasks.Task; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import java.io.IOException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/KillProcessAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/KillProcessAction.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/KillProcessAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/KillProcessAction.java index 2ca6546eca2..48ee4432ff0 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/KillProcessAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/KillProcessAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.action; +package org.elasticsearch.xpack.core.ml.action; import org.elasticsearch.action.Action; import org.elasticsearch.action.ActionRequestBuilder; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/OpenJobAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/OpenJobAction.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/OpenJobAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/OpenJobAction.java index 2aa4088bf1b..51aae686152 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/OpenJobAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/OpenJobAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.action; +package org.elasticsearch.xpack.core.ml.action; import org.elasticsearch.Version; import org.elasticsearch.action.Action; @@ -23,10 +23,10 @@ import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.tasks.Task; -import org.elasticsearch.xpack.ml.MachineLearningField; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; -import org.elasticsearch.xpack.persistent.PersistentTaskParams; +import org.elasticsearch.xpack.core.ml.MachineLearningField; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.persistent.PersistentTaskParams; import java.io.IOException; import java.util.Objects; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/PostCalendarEventsAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/PostCalendarEventsAction.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/PostCalendarEventsAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/PostCalendarEventsAction.java index d8d442be7e5..32bb6b0cc27 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/PostCalendarEventsAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/PostCalendarEventsAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.action; +package org.elasticsearch.xpack.core.ml.action; import org.elasticsearch.action.Action; import org.elasticsearch.action.ActionRequest; @@ -18,10 +18,10 @@ import org.elasticsearch.common.xcontent.ObjectParser; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.ml.calendars.Calendar; -import org.elasticsearch.xpack.ml.calendars.ScheduledEvent; -import org.elasticsearch.xpack.ml.job.messages.Messages; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.calendars.Calendar; +import org.elasticsearch.xpack.core.ml.calendars.ScheduledEvent; +import org.elasticsearch.xpack.core.ml.job.messages.Messages; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import java.io.IOException; import java.util.ArrayList; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/PostDataAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/PostDataAction.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/PostDataAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/PostDataAction.java index 60c34b55f4c..9253467b1a7 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/PostDataAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/PostDataAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.action; +package org.elasticsearch.xpack.core.ml.action; import org.elasticsearch.action.Action; import org.elasticsearch.action.ActionRequestBuilder; @@ -18,8 +18,8 @@ import org.elasticsearch.common.xcontent.StatusToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.rest.RestStatus; -import org.elasticsearch.xpack.ml.job.config.DataDescription; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.DataCounts; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.DataCounts; import java.io.IOException; import java.util.Objects; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/PreviewDatafeedAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/PreviewDatafeedAction.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/PreviewDatafeedAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/PreviewDatafeedAction.java index a2cc3dc3389..e3e82d5b3fd 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/PreviewDatafeedAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/PreviewDatafeedAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.action; +package org.elasticsearch.xpack.core.ml.action; import org.elasticsearch.action.Action; import org.elasticsearch.action.ActionRequest; @@ -18,8 +18,8 @@ import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import java.io.IOException; import java.util.Objects; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/PutCalendarAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/PutCalendarAction.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/PutCalendarAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/PutCalendarAction.java index 7d4f77c43ed..5d085fc7285 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/PutCalendarAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/PutCalendarAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.action; +package org.elasticsearch.xpack.core.ml.action; import org.elasticsearch.action.Action; import org.elasticsearch.action.ActionRequest; @@ -17,10 +17,10 @@ import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.ml.calendars.Calendar; -import org.elasticsearch.xpack.ml.job.messages.Messages; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; -import org.elasticsearch.xpack.ml.utils.MlStrings; +import org.elasticsearch.xpack.core.ml.calendars.Calendar; +import org.elasticsearch.xpack.core.ml.job.messages.Messages; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.utils.MlStrings; import java.io.IOException; import java.util.Objects; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/PutDatafeedAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/PutDatafeedAction.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/PutDatafeedAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/PutDatafeedAction.java index 37fbce82246..49661f25537 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/PutDatafeedAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/PutDatafeedAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.action; +package org.elasticsearch.xpack.core.ml.action; import org.elasticsearch.action.Action; import org.elasticsearch.action.ActionRequestValidationException; @@ -16,7 +16,7 @@ import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; import java.io.IOException; import java.util.Objects; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/PutFilterAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/PutFilterAction.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/PutFilterAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/PutFilterAction.java index e14bbd48f5f..ca678cf86fd 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/PutFilterAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/PutFilterAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.action; +package org.elasticsearch.xpack.core.ml.action; import org.elasticsearch.action.Action; import org.elasticsearch.action.ActionRequest; @@ -17,9 +17,9 @@ import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.ml.job.config.MlFilter; -import org.elasticsearch.xpack.ml.job.messages.Messages; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.job.config.MlFilter; +import org.elasticsearch.xpack.core.ml.job.messages.Messages; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import java.io.IOException; import java.util.Objects; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/PutJobAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/PutJobAction.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/PutJobAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/PutJobAction.java index 4b55581128b..421defb922b 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/PutJobAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/PutJobAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.action; +package org.elasticsearch.xpack.core.ml.action; import org.elasticsearch.action.Action; import org.elasticsearch.action.ActionRequestValidationException; @@ -17,8 +17,8 @@ import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.messages.Messages; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.messages.Messages; import java.io.IOException; import java.util.List; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/RevertModelSnapshotAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/RevertModelSnapshotAction.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/RevertModelSnapshotAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/RevertModelSnapshotAction.java index 6e289a2e9f8..f11221b6ed9 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/RevertModelSnapshotAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/RevertModelSnapshotAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.action; +package org.elasticsearch.xpack.core.ml.action; import org.elasticsearch.action.Action; import org.elasticsearch.action.ActionRequestValidationException; @@ -21,9 +21,9 @@ import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.rest.RestStatus; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshot; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshot; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import java.io.IOException; import java.util.Objects; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/StartDatafeedAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/StartDatafeedAction.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/StartDatafeedAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/StartDatafeedAction.java index e706d6dcb7e..5208ca67997 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/StartDatafeedAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/StartDatafeedAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.action; +package org.elasticsearch.xpack.core.ml.action; import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.action.Action; @@ -24,10 +24,10 @@ import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.index.mapper.DateFieldMapper; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; -import org.elasticsearch.xpack.ml.job.messages.Messages; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; -import org.elasticsearch.xpack.persistent.PersistentTaskParams; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.job.messages.Messages; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.persistent.PersistentTaskParams; import java.io.IOException; import java.util.Objects; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/StopDatafeedAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/StopDatafeedAction.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/StopDatafeedAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/StopDatafeedAction.java index e1637891b7e..593314927a8 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/StopDatafeedAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/StopDatafeedAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.action; +package org.elasticsearch.xpack.core.ml.action; import org.elasticsearch.Version; import org.elasticsearch.action.Action; @@ -22,9 +22,9 @@ import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.tasks.Task; -import org.elasticsearch.xpack.ml.MLMetadataField; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.MLMetadataField; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import java.io.IOException; import java.util.Objects; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/UpdateCalendarJobAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/UpdateCalendarJobAction.java similarity index 82% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/UpdateCalendarJobAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/UpdateCalendarJobAction.java index eeffa6e2979..9dc68c76b10 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/UpdateCalendarJobAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/UpdateCalendarJobAction.java @@ -3,29 +3,17 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.action; +package org.elasticsearch.xpack.core.ml.action; import org.elasticsearch.action.Action; -import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.ActionRequest; import org.elasticsearch.action.ActionRequestBuilder; import org.elasticsearch.action.ActionRequestValidationException; -import org.elasticsearch.action.support.ActionFilters; -import org.elasticsearch.action.support.HandledTransportAction; import org.elasticsearch.client.ElasticsearchClient; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.ml.MlMetadata; -import org.elasticsearch.xpack.ml.calendars.Calendar; -import org.elasticsearch.xpack.ml.job.persistence.JobProvider; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.calendars.Calendar; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import java.io.IOException; import java.util.ArrayList; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/UpdateDatafeedAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/UpdateDatafeedAction.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/UpdateDatafeedAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/UpdateDatafeedAction.java index 4144b39984a..588fb264190 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/UpdateDatafeedAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/UpdateDatafeedAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.action; +package org.elasticsearch.xpack.core.ml.action; import org.elasticsearch.action.Action; import org.elasticsearch.action.ActionRequestValidationException; @@ -15,7 +15,7 @@ import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.ml.datafeed.DatafeedUpdate; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedUpdate; import java.io.IOException; import java.util.Objects; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/UpdateJobAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/UpdateJobAction.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/UpdateJobAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/UpdateJobAction.java index e914e34deaf..78e018ce69c 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/UpdateJobAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/UpdateJobAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.action; +package org.elasticsearch.xpack.core.ml.action; import org.elasticsearch.action.Action; import org.elasticsearch.action.ActionRequestValidationException; @@ -16,7 +16,7 @@ import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.ml.job.config.JobUpdate; +import org.elasticsearch.xpack.core.ml.job.config.JobUpdate; import java.io.IOException; import java.util.Objects; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/UpdateModelSnapshotAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/UpdateModelSnapshotAction.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/UpdateModelSnapshotAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/UpdateModelSnapshotAction.java index b93ed5c5a1b..6b62d148c94 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/UpdateModelSnapshotAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/UpdateModelSnapshotAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.action; +package org.elasticsearch.xpack.core.ml.action; import org.elasticsearch.action.Action; import org.elasticsearch.action.ActionRequest; @@ -21,10 +21,10 @@ import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.rest.RestStatus; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshot; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshotField; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshot; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshotField; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import java.io.IOException; import java.util.Objects; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/UpdateProcessAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/UpdateProcessAction.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/UpdateProcessAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/UpdateProcessAction.java index 191f1a05298..31ba85232d5 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/UpdateProcessAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/UpdateProcessAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.action; +package org.elasticsearch.xpack.core.ml.action; import org.elasticsearch.Version; import org.elasticsearch.action.Action; @@ -16,9 +16,9 @@ import org.elasticsearch.common.io.stream.Writeable; import org.elasticsearch.common.xcontent.StatusToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.rest.RestStatus; -import org.elasticsearch.xpack.ml.job.config.JobUpdate; -import org.elasticsearch.xpack.ml.job.config.MlFilter; -import org.elasticsearch.xpack.ml.job.config.ModelPlotConfig; +import org.elasticsearch.xpack.core.ml.job.config.JobUpdate; +import org.elasticsearch.xpack.core.ml.job.config.MlFilter; +import org.elasticsearch.xpack.core.ml.job.config.ModelPlotConfig; import java.io.IOException; import java.util.List; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/ValidateDetectorAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/ValidateDetectorAction.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/ValidateDetectorAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/ValidateDetectorAction.java index cfa6ef163fe..13948fc5fdc 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/ValidateDetectorAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/ValidateDetectorAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.action; +package org.elasticsearch.xpack.core.ml.action; import org.elasticsearch.action.Action; import org.elasticsearch.action.ActionRequest; @@ -16,7 +16,7 @@ import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.ml.job.config.Detector; +import org.elasticsearch.xpack.core.ml.job.config.Detector; import java.io.IOException; import java.util.Objects; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/ValidateJobConfigAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/ValidateJobConfigAction.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/ValidateJobConfigAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/ValidateJobConfigAction.java index 7da5b33b90d..e0cde4f9358 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/ValidateJobConfigAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/ValidateJobConfigAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.action; +package org.elasticsearch.xpack.core.ml.action; import org.elasticsearch.action.Action; import org.elasticsearch.action.ActionRequest; @@ -14,8 +14,8 @@ import org.elasticsearch.client.ElasticsearchClient; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.messages.Messages; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.messages.Messages; import java.io.IOException; import java.util.Date; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/util/PageParams.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/util/PageParams.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/util/PageParams.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/util/PageParams.java index a96c7d2eb56..47b713b8ced 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/util/PageParams.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/util/PageParams.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.action.util; +package org.elasticsearch.xpack.core.ml.action.util; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.io.stream.StreamInput; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/util/QueryPage.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/util/QueryPage.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/util/QueryPage.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/util/QueryPage.java index 680177b9267..706f113aa34 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/action/util/QueryPage.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/util/QueryPage.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.action.util; +package org.elasticsearch.xpack.core.ml.action.util; import org.elasticsearch.ResourceNotFoundException; import org.elasticsearch.common.ParseField; @@ -13,7 +13,7 @@ import org.elasticsearch.common.io.stream.Writeable; import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import java.io.IOException; import java.util.List; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/calendars/Calendar.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/calendars/Calendar.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/calendars/Calendar.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/calendars/Calendar.java index 258f661746b..c9d778bf791 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/calendars/Calendar.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/calendars/Calendar.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.calendars; +package org.elasticsearch.xpack.core.ml.calendars; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.ParseField; @@ -13,7 +13,7 @@ import org.elasticsearch.common.io.stream.Writeable; import org.elasticsearch.common.xcontent.ObjectParser; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.ml.MlMetaIndex; +import org.elasticsearch.xpack.core.ml.MlMetaIndex; import java.io.IOException; import java.util.Arrays; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/calendars/ScheduledEvent.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/calendars/ScheduledEvent.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/calendars/ScheduledEvent.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/calendars/ScheduledEvent.java index 21211ebb774..dbfc02e171b 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/calendars/ScheduledEvent.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/calendars/ScheduledEvent.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.calendars; +package org.elasticsearch.xpack.core.ml.calendars; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.inject.internal.Nullable; @@ -15,16 +15,16 @@ import org.elasticsearch.common.xcontent.ObjectParser; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.ml.MlMetaIndex; -import org.elasticsearch.xpack.ml.job.config.Connective; -import org.elasticsearch.xpack.ml.job.config.DetectionRule; -import org.elasticsearch.xpack.ml.job.config.Operator; -import org.elasticsearch.xpack.ml.job.config.RuleAction; -import org.elasticsearch.xpack.ml.job.config.RuleCondition; -import org.elasticsearch.xpack.ml.job.messages.Messages; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; -import org.elasticsearch.xpack.ml.utils.Intervals; -import org.elasticsearch.xpack.ml.utils.time.TimeUtils; +import org.elasticsearch.xpack.core.ml.MlMetaIndex; +import org.elasticsearch.xpack.core.ml.job.config.Connective; +import org.elasticsearch.xpack.core.ml.job.config.DetectionRule; +import org.elasticsearch.xpack.core.ml.job.config.Operator; +import org.elasticsearch.xpack.core.ml.job.config.RuleAction; +import org.elasticsearch.xpack.core.ml.job.config.RuleCondition; +import org.elasticsearch.xpack.core.ml.job.messages.Messages; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.utils.Intervals; +import org.elasticsearch.xpack.core.ml.utils.time.TimeUtils; import java.io.IOException; import java.time.Instant; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/client/MachineLearningClient.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/client/MachineLearningClient.java similarity index 89% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/client/MachineLearningClient.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/client/MachineLearningClient.java index 67edfabb11a..3308d6891e2 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/client/MachineLearningClient.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/client/MachineLearningClient.java @@ -3,41 +3,41 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.client; +package org.elasticsearch.xpack.core.ml.client; import org.elasticsearch.action.ActionFuture; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.support.PlainActionFuture; import org.elasticsearch.client.ElasticsearchClient; -import org.elasticsearch.xpack.ml.action.CloseJobAction; -import org.elasticsearch.xpack.ml.action.DeleteDatafeedAction; -import org.elasticsearch.xpack.ml.action.DeleteFilterAction; -import org.elasticsearch.xpack.ml.action.DeleteJobAction; -import org.elasticsearch.xpack.ml.action.DeleteModelSnapshotAction; -import org.elasticsearch.xpack.ml.action.FlushJobAction; -import org.elasticsearch.xpack.ml.action.GetBucketsAction; -import org.elasticsearch.xpack.ml.action.GetCategoriesAction; -import org.elasticsearch.xpack.ml.action.GetDatafeedsAction; -import org.elasticsearch.xpack.ml.action.GetDatafeedsStatsAction; -import org.elasticsearch.xpack.ml.action.GetFiltersAction; -import org.elasticsearch.xpack.ml.action.GetInfluencersAction; -import org.elasticsearch.xpack.ml.action.GetJobsAction; -import org.elasticsearch.xpack.ml.action.GetJobsStatsAction; -import org.elasticsearch.xpack.ml.action.GetModelSnapshotsAction; -import org.elasticsearch.xpack.ml.action.GetRecordsAction; -import org.elasticsearch.xpack.ml.action.OpenJobAction; -import org.elasticsearch.xpack.ml.action.PostDataAction; -import org.elasticsearch.xpack.ml.action.PutDatafeedAction; -import org.elasticsearch.xpack.ml.action.PutFilterAction; -import org.elasticsearch.xpack.ml.action.PutJobAction; -import org.elasticsearch.xpack.ml.action.RevertModelSnapshotAction; -import org.elasticsearch.xpack.ml.action.StartDatafeedAction; -import org.elasticsearch.xpack.ml.action.StopDatafeedAction; -import org.elasticsearch.xpack.ml.action.UpdateDatafeedAction; -import org.elasticsearch.xpack.ml.action.UpdateJobAction; -import org.elasticsearch.xpack.ml.action.UpdateModelSnapshotAction; -import org.elasticsearch.xpack.ml.action.ValidateDetectorAction; -import org.elasticsearch.xpack.ml.action.ValidateJobConfigAction; +import org.elasticsearch.xpack.core.ml.action.CloseJobAction; +import org.elasticsearch.xpack.core.ml.action.DeleteDatafeedAction; +import org.elasticsearch.xpack.core.ml.action.DeleteFilterAction; +import org.elasticsearch.xpack.core.ml.action.DeleteJobAction; +import org.elasticsearch.xpack.core.ml.action.DeleteModelSnapshotAction; +import org.elasticsearch.xpack.core.ml.action.FlushJobAction; +import org.elasticsearch.xpack.core.ml.action.GetBucketsAction; +import org.elasticsearch.xpack.core.ml.action.GetCategoriesAction; +import org.elasticsearch.xpack.core.ml.action.GetDatafeedsAction; +import org.elasticsearch.xpack.core.ml.action.GetDatafeedsStatsAction; +import org.elasticsearch.xpack.core.ml.action.GetFiltersAction; +import org.elasticsearch.xpack.core.ml.action.GetInfluencersAction; +import org.elasticsearch.xpack.core.ml.action.GetJobsAction; +import org.elasticsearch.xpack.core.ml.action.GetJobsStatsAction; +import org.elasticsearch.xpack.core.ml.action.GetModelSnapshotsAction; +import org.elasticsearch.xpack.core.ml.action.GetRecordsAction; +import org.elasticsearch.xpack.core.ml.action.OpenJobAction; +import org.elasticsearch.xpack.core.ml.action.PostDataAction; +import org.elasticsearch.xpack.core.ml.action.PutDatafeedAction; +import org.elasticsearch.xpack.core.ml.action.PutFilterAction; +import org.elasticsearch.xpack.core.ml.action.PutJobAction; +import org.elasticsearch.xpack.core.ml.action.RevertModelSnapshotAction; +import org.elasticsearch.xpack.core.ml.action.StartDatafeedAction; +import org.elasticsearch.xpack.core.ml.action.StopDatafeedAction; +import org.elasticsearch.xpack.core.ml.action.UpdateDatafeedAction; +import org.elasticsearch.xpack.core.ml.action.UpdateJobAction; +import org.elasticsearch.xpack.core.ml.action.UpdateModelSnapshotAction; +import org.elasticsearch.xpack.core.ml.action.ValidateDetectorAction; +import org.elasticsearch.xpack.core.ml.action.ValidateJobConfigAction; public class MachineLearningClient { diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/datafeed/ChunkingConfig.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/datafeed/ChunkingConfig.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/datafeed/ChunkingConfig.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/datafeed/ChunkingConfig.java index 252378fa75b..cbd25dffadc 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/datafeed/ChunkingConfig.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/datafeed/ChunkingConfig.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.datafeed; +package org.elasticsearch.xpack.core.ml.datafeed; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.ParseField; @@ -16,8 +16,8 @@ import org.elasticsearch.common.xcontent.ObjectParser.ValueType; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.ml.MlParserType; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.MlParserType; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import java.io.IOException; import java.util.EnumMap; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedConfig.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/datafeed/DatafeedConfig.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedConfig.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/datafeed/DatafeedConfig.java index d27e26c60d3..97806ac4c3f 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedConfig.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/datafeed/DatafeedConfig.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.datafeed; +package org.elasticsearch.xpack.core.ml.datafeed; import org.elasticsearch.ElasticsearchException; import org.elasticsearch.Version; @@ -25,14 +25,14 @@ import org.elasticsearch.search.aggregations.AggregatorFactories; import org.elasticsearch.search.aggregations.metrics.max.MaxAggregationBuilder; import org.elasticsearch.search.aggregations.support.ValuesSourceAggregationBuilder; import org.elasticsearch.search.builder.SearchSourceBuilder; -import org.elasticsearch.xpack.ml.MlParserType; -import org.elasticsearch.xpack.ml.datafeed.extractor.ExtractorUtils; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.messages.Messages; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; -import org.elasticsearch.xpack.ml.utils.MlStrings; -import org.elasticsearch.xpack.ml.utils.ToXContentParams; -import org.elasticsearch.xpack.ml.utils.time.TimeUtils; +import org.elasticsearch.xpack.core.ml.MlParserType; +import org.elasticsearch.xpack.core.ml.datafeed.extractor.ExtractorUtils; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.messages.Messages; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.utils.MlStrings; +import org.elasticsearch.xpack.core.ml.utils.ToXContentParams; +import org.elasticsearch.xpack.core.ml.utils.time.TimeUtils; import java.io.IOException; import java.util.ArrayList; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobValidator.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/datafeed/DatafeedJobValidator.java similarity index 91% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobValidator.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/datafeed/DatafeedJobValidator.java index e4e23764b0c..b829b3fa443 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobValidator.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/datafeed/DatafeedJobValidator.java @@ -3,14 +3,14 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.datafeed; +package org.elasticsearch.xpack.core.ml.datafeed; import org.elasticsearch.common.Strings; import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.xpack.ml.job.config.AnalysisConfig; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.messages.Messages; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.messages.Messages; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; public final class DatafeedJobValidator { diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedState.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/datafeed/DatafeedState.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedState.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/datafeed/DatafeedState.java index 45b6d372a0e..7343600a6ee 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedState.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/datafeed/DatafeedState.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.datafeed; +package org.elasticsearch.xpack.core.ml.datafeed; import org.elasticsearch.Version; import org.elasticsearch.common.ParseField; @@ -13,7 +13,7 @@ import org.elasticsearch.common.xcontent.ConstructingObjectParser; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.tasks.Task; -import org.elasticsearch.xpack.ml.action.StartDatafeedAction; +import org.elasticsearch.xpack.core.ml.action.StartDatafeedAction; import java.io.IOException; import java.util.Locale; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedUpdate.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/datafeed/DatafeedUpdate.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedUpdate.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/datafeed/DatafeedUpdate.java index a3b856967f2..0bc50a5bdfe 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedUpdate.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/datafeed/DatafeedUpdate.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.datafeed; +package org.elasticsearch.xpack.core.ml.datafeed; import org.elasticsearch.Version; import org.elasticsearch.common.ParseField; @@ -21,10 +21,10 @@ import org.elasticsearch.index.query.AbstractQueryBuilder; import org.elasticsearch.index.query.QueryBuilder; import org.elasticsearch.search.aggregations.AggregatorFactories; import org.elasticsearch.search.builder.SearchSourceBuilder; -import org.elasticsearch.xpack.ml.MlClientHelper; -import org.elasticsearch.xpack.ml.datafeed.extractor.ExtractorUtils; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.MlClientHelper; +import org.elasticsearch.xpack.core.ml.datafeed.extractor.ExtractorUtils; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import java.io.IOException; import java.util.ArrayList; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/DataExtractor.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/datafeed/extractor/DataExtractor.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/DataExtractor.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/datafeed/extractor/DataExtractor.java index 31cd7fbd500..20968b22425 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/DataExtractor.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/datafeed/extractor/DataExtractor.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.datafeed.extractor; +package org.elasticsearch.xpack.core.ml.datafeed.extractor; import java.io.IOException; import java.io.InputStream; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/ExtractorUtils.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/datafeed/extractor/ExtractorUtils.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/ExtractorUtils.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/datafeed/extractor/ExtractorUtils.java index 4539ada492c..b0794adae4a 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/ExtractorUtils.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/datafeed/extractor/ExtractorUtils.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.datafeed.extractor; +package org.elasticsearch.xpack.core.ml.datafeed.extractor; import org.apache.logging.log4j.Logger; import org.elasticsearch.ElasticsearchException; @@ -20,8 +20,8 @@ import org.elasticsearch.search.aggregations.AggregationBuilder; import org.elasticsearch.search.aggregations.AggregatorFactories; import org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramAggregationBuilder; import org.elasticsearch.search.aggregations.bucket.histogram.HistogramAggregationBuilder; -import org.elasticsearch.xpack.ml.job.messages.Messages; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.job.messages.Messages; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import org.joda.time.DateTimeZone; import java.io.IOException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/AnalysisConfig.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/AnalysisConfig.java similarity index 99% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/AnalysisConfig.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/AnalysisConfig.java index 826a77c94ec..c8f61e7a39e 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/AnalysisConfig.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/AnalysisConfig.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.config; +package org.elasticsearch.xpack.core.ml.job.config; import org.elasticsearch.Version; import org.elasticsearch.common.ParseField; @@ -16,10 +16,10 @@ import org.elasticsearch.common.xcontent.ConstructingObjectParser; import org.elasticsearch.common.xcontent.ObjectParser; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.ml.MlParserType; -import org.elasticsearch.xpack.ml.job.messages.Messages; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; -import org.elasticsearch.xpack.ml.utils.time.TimeUtils; +import org.elasticsearch.xpack.core.ml.MlParserType; +import org.elasticsearch.xpack.core.ml.job.messages.Messages; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.utils.time.TimeUtils; import java.io.IOException; import java.util.ArrayList; @@ -38,7 +38,6 @@ import java.util.regex.Pattern; import java.util.regex.PatternSyntaxException; import java.util.stream.Collectors; - /** * Autodetect analysis configuration options describes which fields are * analysed and the functions to use. diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/AnalysisLimits.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/AnalysisLimits.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/AnalysisLimits.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/AnalysisLimits.java index 89b2f59e551..7ecb6cbdb5c 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/AnalysisLimits.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/AnalysisLimits.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.config; +package org.elasticsearch.xpack.core.ml.job.config; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.ParseField; @@ -16,9 +16,9 @@ import org.elasticsearch.common.xcontent.ObjectParser; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.ml.MlParserType; -import org.elasticsearch.xpack.ml.job.messages.Messages; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.MlParserType; +import org.elasticsearch.xpack.core.ml.job.messages.Messages; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import java.io.IOException; import java.util.EnumMap; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/CategorizationAnalyzerConfig.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/CategorizationAnalyzerConfig.java similarity index 99% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/CategorizationAnalyzerConfig.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/CategorizationAnalyzerConfig.java index d744fdd5360..617de5f225d 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/CategorizationAnalyzerConfig.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/CategorizationAnalyzerConfig.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.config; +package org.elasticsearch.xpack.core.ml.job.config; import org.apache.lucene.analysis.Analyzer; import org.elasticsearch.Version; @@ -31,7 +31,7 @@ import org.elasticsearch.index.analysis.TokenFilterFactory; import org.elasticsearch.index.analysis.TokenizerFactory; import org.elasticsearch.indices.analysis.AnalysisModule; import org.elasticsearch.rest.action.admin.indices.RestAnalyzeAction; -import org.elasticsearch.xpack.ml.MlParserType; +import org.elasticsearch.xpack.core.ml.MlParserType; import java.io.IOException; import java.util.ArrayList; @@ -81,7 +81,7 @@ public class CategorizationAnalyzerConfig implements ToXContentFragment, Writeab /** * This method is only used in the unit tests - in production code this config is always parsed as a fragment. */ - static CategorizationAnalyzerConfig buildFromXContentObject(XContentParser parser, MlParserType parserType) throws IOException { + public static CategorizationAnalyzerConfig buildFromXContentObject(XContentParser parser, MlParserType parserType) throws IOException { if (parser.nextToken() != XContentParser.Token.START_OBJECT) { throw new IllegalArgumentException("Expected start object but got [" + parser.currentToken() + "]"); diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/Condition.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/Condition.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/Condition.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/Condition.java index 6fc175ff8cb..7d3074df0ae 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/Condition.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/Condition.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.config; +package org.elasticsearch.xpack.core.ml.job.config; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.io.stream.StreamInput; @@ -14,8 +14,8 @@ import org.elasticsearch.common.xcontent.ObjectParser.ValueType; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.ml.job.messages.Messages; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.job.messages.Messages; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import java.io.IOException; import java.util.Objects; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/Connective.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/Connective.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/Connective.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/Connective.java index b0bdf0b8c89..0b4ad010fdd 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/Connective.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/Connective.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.config; +package org.elasticsearch.xpack.core.ml.job.config; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/DataDescription.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/DataDescription.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/DataDescription.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/DataDescription.java index 3093a874987..9ff578be50b 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/DataDescription.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/DataDescription.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.config; +package org.elasticsearch.xpack.core.ml.job.config; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.io.stream.StreamInput; @@ -14,10 +14,10 @@ import org.elasticsearch.common.xcontent.ObjectParser.ValueType; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.ml.MlParserType; -import org.elasticsearch.xpack.ml.job.messages.Messages; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; -import org.elasticsearch.xpack.ml.utils.time.DateTimeFormatterTimestampConverter; +import org.elasticsearch.xpack.core.ml.MlParserType; +import org.elasticsearch.xpack.core.ml.job.messages.Messages; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.utils.time.DateTimeFormatterTimestampConverter; import java.io.IOException; import java.time.ZoneOffset; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/DefaultDetectorDescription.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/DefaultDetectorDescription.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/DefaultDetectorDescription.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/DefaultDetectorDescription.java index 89179e0df88..f964897eec5 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/DefaultDetectorDescription.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/DefaultDetectorDescription.java @@ -3,10 +3,10 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.config; +package org.elasticsearch.xpack.core.ml.job.config; import org.elasticsearch.common.Strings; -import org.elasticsearch.xpack.ml.utils.MlStrings; +import org.elasticsearch.xpack.core.ml.utils.MlStrings; public final class DefaultDetectorDescription { diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/DetectionRule.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/DetectionRule.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/DetectionRule.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/DetectionRule.java index 537593bd8cb..a69e4eb7571 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/DetectionRule.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/DetectionRule.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.config; +package org.elasticsearch.xpack.core.ml.job.config; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.ParseField; @@ -15,9 +15,9 @@ import org.elasticsearch.common.xcontent.ObjectParser.ValueType; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.ml.MlParserType; -import org.elasticsearch.xpack.ml.job.messages.Messages; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.MlParserType; +import org.elasticsearch.xpack.core.ml.job.messages.Messages; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import java.io.IOException; import java.util.ArrayList; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/Detector.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/Detector.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/Detector.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/Detector.java index 214f55fa584..6cc7da421aa 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/Detector.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/Detector.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.config; +package org.elasticsearch.xpack.core.ml.job.config; import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.Version; @@ -16,11 +16,11 @@ import org.elasticsearch.common.xcontent.ObjectParser; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.ml.MlParserType; -import org.elasticsearch.xpack.ml.job.messages.Messages; -import org.elasticsearch.xpack.ml.job.process.autodetect.writer.RecordWriter; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; -import org.elasticsearch.xpack.ml.utils.ToXContentParams; +import org.elasticsearch.xpack.core.ml.MlParserType; +import org.elasticsearch.xpack.core.ml.job.messages.Messages; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.writer.RecordWriter; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.utils.ToXContentParams; import java.io.IOException; import java.util.ArrayList; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/Job.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/Job.java similarity index 99% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/Job.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/Job.java index 0bdb20edd0a..73eaaed47d5 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/Job.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/Job.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.config; +package org.elasticsearch.xpack.core.ml.job.config; import org.elasticsearch.Version; import org.elasticsearch.cluster.AbstractDiffable; @@ -23,13 +23,13 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser.Token; import org.elasticsearch.env.Environment; import org.elasticsearch.index.analysis.AnalysisRegistry; -import org.elasticsearch.xpack.ml.MlParserType; -import org.elasticsearch.xpack.ml.job.messages.Messages; -import org.elasticsearch.xpack.ml.job.persistence.AnomalyDetectorsIndexFields; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.DataCounts; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; -import org.elasticsearch.xpack.ml.utils.MlStrings; -import org.elasticsearch.xpack.ml.utils.time.TimeUtils; +import org.elasticsearch.xpack.core.ml.MlParserType; +import org.elasticsearch.xpack.core.ml.job.messages.Messages; +import org.elasticsearch.xpack.core.ml.job.persistence.AnomalyDetectorsIndexFields; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.DataCounts; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.utils.MlStrings; +import org.elasticsearch.xpack.core.ml.utils.time.TimeUtils; import java.io.IOException; import java.util.ArrayList; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/JobState.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/JobState.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/JobState.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/JobState.java index 7b0aba05aca..e89149a062b 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/JobState.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/JobState.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.config; +package org.elasticsearch.xpack.core.ml.job.config; import org.elasticsearch.Version; import org.elasticsearch.common.io.stream.StreamInput; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/JobTaskStatus.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/JobTaskStatus.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/JobTaskStatus.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/JobTaskStatus.java index 6eb40486152..ef2148e493c 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/JobTaskStatus.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/JobTaskStatus.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.config; +package org.elasticsearch.xpack.core.ml.job.config; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.io.stream.StreamInput; @@ -13,8 +13,8 @@ import org.elasticsearch.common.xcontent.ObjectParser; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.tasks.Task; -import org.elasticsearch.xpack.ml.action.OpenJobAction; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData.PersistentTask; +import org.elasticsearch.xpack.core.ml.action.OpenJobAction; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData.PersistentTask; import java.io.IOException; import java.util.Objects; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/JobUpdate.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/JobUpdate.java similarity index 99% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/JobUpdate.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/JobUpdate.java index 9140d20f7e3..add40cf1e76 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/JobUpdate.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/JobUpdate.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.config; +package org.elasticsearch.xpack.core.ml.job.config; import org.elasticsearch.Version; import org.elasticsearch.common.Nullable; @@ -18,8 +18,8 @@ import org.elasticsearch.common.xcontent.ConstructingObjectParser; import org.elasticsearch.common.xcontent.ObjectParser; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.ml.job.messages.Messages; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.job.messages.Messages; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import java.io.IOException; import java.util.Arrays; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/MlFilter.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/MlFilter.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/MlFilter.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/MlFilter.java index 874405f9bf5..780b9437455 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/MlFilter.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/MlFilter.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.config; +package org.elasticsearch.xpack.core.ml.job.config; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.ParseField; @@ -13,7 +13,7 @@ import org.elasticsearch.common.io.stream.Writeable; import org.elasticsearch.common.xcontent.ObjectParser; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.ml.MlMetaIndex; +import org.elasticsearch.xpack.core.ml.MlMetaIndex; import java.io.IOException; import java.util.ArrayList; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/ModelPlotConfig.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/ModelPlotConfig.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/ModelPlotConfig.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/ModelPlotConfig.java index 39b50d30767..bde19aa2786 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/ModelPlotConfig.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/ModelPlotConfig.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.config; +package org.elasticsearch.xpack.core.ml.job.config; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.io.stream.StreamInput; @@ -12,7 +12,7 @@ import org.elasticsearch.common.io.stream.Writeable; import org.elasticsearch.common.xcontent.ConstructingObjectParser; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.ml.MlParserType; +import org.elasticsearch.xpack.core.ml.MlParserType; import java.io.IOException; import java.util.EnumMap; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/Operator.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/Operator.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/Operator.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/Operator.java index d85bc21bc07..5813a10c93b 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/Operator.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/Operator.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.config; +package org.elasticsearch.xpack.core.ml.job.config; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.io.stream.StreamInput; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/RuleAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/RuleAction.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/RuleAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/RuleAction.java index 2a96cc45c4a..607961140be 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/RuleAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/RuleAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.config; +package org.elasticsearch.xpack.core.ml.job.config; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/RuleCondition.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/RuleCondition.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/RuleCondition.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/RuleCondition.java index d050373a6b7..7b56409ede0 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/RuleCondition.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/RuleCondition.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.config; +package org.elasticsearch.xpack.core.ml.job.config; import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.common.ParseField; @@ -15,9 +15,9 @@ import org.elasticsearch.common.xcontent.ObjectParser.ValueType; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.ml.MlParserType; -import org.elasticsearch.xpack.ml.job.messages.Messages; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.MlParserType; +import org.elasticsearch.xpack.core.ml.job.messages.Messages; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import java.io.IOException; import java.util.EnumMap; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/RuleConditionType.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/RuleConditionType.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/RuleConditionType.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/RuleConditionType.java index 9991dde7e74..2ddd0dac2cd 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/config/RuleConditionType.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/RuleConditionType.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.config; +package org.elasticsearch.xpack.core.ml.job.config; import org.elasticsearch.common.io.stream.StreamInput; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/groups/GroupOrJob.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/groups/GroupOrJob.java similarity index 91% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/groups/GroupOrJob.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/groups/GroupOrJob.java index c73fddf713e..d5be3ffd088 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/groups/GroupOrJob.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/groups/GroupOrJob.java @@ -3,9 +3,9 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.groups; +package org.elasticsearch.xpack.core.ml.job.groups; -import org.elasticsearch.xpack.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.Job; import java.util.Collections; import java.util.List; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/groups/GroupOrJobLookup.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/groups/GroupOrJobLookup.java similarity index 91% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/groups/GroupOrJobLookup.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/groups/GroupOrJobLookup.java index 65aeec387cf..fde28a84f8d 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/groups/GroupOrJobLookup.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/groups/GroupOrJobLookup.java @@ -3,13 +3,13 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.groups; +package org.elasticsearch.xpack.core.ml.job.groups; import org.elasticsearch.ResourceAlreadyExistsException; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.messages.Messages; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; -import org.elasticsearch.xpack.ml.utils.NameResolver; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.messages.Messages; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.utils.NameResolver; import java.util.ArrayList; import java.util.Collection; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/messages/Messages.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/messages/Messages.java similarity index 99% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/messages/Messages.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/messages/Messages.java index 258e9b380a5..a9b122dd734 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/messages/Messages.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/messages/Messages.java @@ -3,9 +3,9 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.messages; +package org.elasticsearch.xpack.core.ml.job.messages; -import org.elasticsearch.xpack.ml.MachineLearningField; +import org.elasticsearch.xpack.core.ml.MachineLearningField; import java.text.MessageFormat; import java.util.Locale; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/AnomalyDetectorsIndex.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/AnomalyDetectorsIndex.java similarity index 92% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/AnomalyDetectorsIndex.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/AnomalyDetectorsIndex.java index a68d33a452f..1ac842e8898 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/AnomalyDetectorsIndex.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/AnomalyDetectorsIndex.java @@ -3,11 +3,11 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.persistence; +package org.elasticsearch.xpack.core.ml.job.persistence; import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.xpack.ml.MLMetadataField; -import org.elasticsearch.xpack.ml.MlMetadata; +import org.elasticsearch.xpack.core.ml.MLMetadataField; +import org.elasticsearch.xpack.core.ml.MlMetadata; /** * Methods for handling index naming related functions diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/AnomalyDetectorsIndexFields.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/AnomalyDetectorsIndexFields.java similarity index 90% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/AnomalyDetectorsIndexFields.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/AnomalyDetectorsIndexFields.java index e2db2428527..9cdaf10326d 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/AnomalyDetectorsIndexFields.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/AnomalyDetectorsIndexFields.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.persistence; +package org.elasticsearch.xpack.core.ml.job.persistence; public final class AnomalyDetectorsIndexFields { diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/BatchedBucketsIterator.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/BatchedBucketsIterator.java similarity index 88% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/BatchedBucketsIterator.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/BatchedBucketsIterator.java index cfc79cbb7fc..bb28cd911f8 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/BatchedBucketsIterator.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/BatchedBucketsIterator.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.persistence; +package org.elasticsearch.xpack.core.ml.job.persistence; import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.client.Client; @@ -12,8 +12,8 @@ import org.elasticsearch.common.xcontent.NamedXContentRegistry; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.search.SearchHit; -import org.elasticsearch.xpack.ml.job.results.Bucket; -import org.elasticsearch.xpack.ml.job.results.Result; +import org.elasticsearch.xpack.core.ml.job.results.Bucket; +import org.elasticsearch.xpack.core.ml.job.results.Result; import java.io.IOException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/BatchedDocumentsIterator.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/BatchedDocumentsIterator.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/BatchedDocumentsIterator.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/BatchedDocumentsIterator.java index 3afa92b4cac..d59fcaa5828 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/BatchedDocumentsIterator.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/BatchedDocumentsIterator.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.persistence; +package org.elasticsearch.xpack.core.ml.job.persistence; import org.apache.logging.log4j.Logger; import org.elasticsearch.action.search.SearchRequest; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/BatchedInfluencersIterator.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/BatchedInfluencersIterator.java similarity index 88% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/BatchedInfluencersIterator.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/BatchedInfluencersIterator.java index 035476e82c2..605b0284f29 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/BatchedInfluencersIterator.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/BatchedInfluencersIterator.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.persistence; +package org.elasticsearch.xpack.core.ml.job.persistence; import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.client.Client; @@ -12,8 +12,8 @@ import org.elasticsearch.common.xcontent.NamedXContentRegistry; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.search.SearchHit; -import org.elasticsearch.xpack.ml.job.results.Influencer; -import org.elasticsearch.xpack.ml.job.results.Result; +import org.elasticsearch.xpack.core.ml.job.results.Influencer; +import org.elasticsearch.xpack.core.ml.job.results.Result; import java.io.IOException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/BatchedRecordsIterator.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/BatchedRecordsIterator.java similarity index 88% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/BatchedRecordsIterator.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/BatchedRecordsIterator.java index ba246fb641e..ca7da5a3cba 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/BatchedRecordsIterator.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/BatchedRecordsIterator.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.persistence; +package org.elasticsearch.xpack.core.ml.job.persistence; import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.client.Client; @@ -12,8 +12,8 @@ import org.elasticsearch.common.xcontent.NamedXContentRegistry; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.search.SearchHit; -import org.elasticsearch.xpack.ml.job.results.AnomalyRecord; -import org.elasticsearch.xpack.ml.job.results.Result; +import org.elasticsearch.xpack.core.ml.job.results.AnomalyRecord; +import org.elasticsearch.xpack.core.ml.job.results.Result; import java.io.IOException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/BatchedResultsIterator.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/BatchedResultsIterator.java similarity index 93% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/BatchedResultsIterator.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/BatchedResultsIterator.java index d9c1b8f3762..daf92342771 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/BatchedResultsIterator.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/BatchedResultsIterator.java @@ -3,12 +3,12 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.persistence; +package org.elasticsearch.xpack.core.ml.job.persistence; import org.elasticsearch.client.Client; import org.elasticsearch.index.query.QueryBuilder; import org.elasticsearch.index.query.TermsQueryBuilder; -import org.elasticsearch.xpack.ml.job.results.Result; +import org.elasticsearch.xpack.core.ml.job.results.Result; public abstract class BatchedResultsIterator extends BatchedDocumentsIterator> { diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/BucketsQueryBuilder.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/BucketsQueryBuilder.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/BucketsQueryBuilder.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/BucketsQueryBuilder.java index e5a8c60033c..2f5ee451ee6 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/BucketsQueryBuilder.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/BucketsQueryBuilder.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.persistence; +package org.elasticsearch.xpack.core.ml.job.persistence; import org.elasticsearch.index.query.BoolQueryBuilder; import org.elasticsearch.index.query.QueryBuilder; @@ -12,8 +12,8 @@ import org.elasticsearch.search.builder.SearchSourceBuilder; import org.elasticsearch.search.sort.FieldSortBuilder; import org.elasticsearch.search.sort.SortBuilder; import org.elasticsearch.search.sort.SortOrder; -import org.elasticsearch.xpack.ml.job.results.Bucket; -import org.elasticsearch.xpack.ml.job.results.Result; +import org.elasticsearch.xpack.core.ml.job.results.Bucket; +import org.elasticsearch.xpack.core.ml.job.results.Result; /** * One time query builder for buckets. diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/CalendarQueryBuilder.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/CalendarQueryBuilder.java similarity index 93% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/CalendarQueryBuilder.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/CalendarQueryBuilder.java index ef37b7c6df7..d53a0f71eeb 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/CalendarQueryBuilder.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/CalendarQueryBuilder.java @@ -3,14 +3,14 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.persistence; +package org.elasticsearch.xpack.core.ml.job.persistence; import org.elasticsearch.index.query.BoolQueryBuilder; import org.elasticsearch.index.query.QueryBuilder; import org.elasticsearch.index.query.TermsQueryBuilder; import org.elasticsearch.search.builder.SearchSourceBuilder; -import org.elasticsearch.xpack.ml.action.util.PageParams; -import org.elasticsearch.xpack.ml.calendars.Calendar; +import org.elasticsearch.xpack.core.ml.action.util.PageParams; +import org.elasticsearch.xpack.core.ml.calendars.Calendar; import java.util.ArrayList; import java.util.Collections; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/ElasticsearchMappings.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/ElasticsearchMappings.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/ElasticsearchMappings.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/ElasticsearchMappings.java index 1313286107e..1c82af8fc1b 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/ElasticsearchMappings.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/ElasticsearchMappings.java @@ -3,29 +3,29 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.persistence; +package org.elasticsearch.xpack.core.ml.job.persistence; import org.elasticsearch.Version; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.ml.job.config.Detector; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.DataCounts; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSizeStats; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshot; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshotField; -import org.elasticsearch.xpack.ml.job.results.AnomalyCause; -import org.elasticsearch.xpack.ml.job.results.AnomalyRecord; -import org.elasticsearch.xpack.ml.job.results.Bucket; -import org.elasticsearch.xpack.ml.job.results.BucketInfluencer; -import org.elasticsearch.xpack.ml.job.results.CategoryDefinition; -import org.elasticsearch.xpack.ml.job.results.Forecast; -import org.elasticsearch.xpack.ml.job.results.ForecastRequestStats; -import org.elasticsearch.xpack.ml.job.results.Influence; -import org.elasticsearch.xpack.ml.job.results.Influencer; -import org.elasticsearch.xpack.ml.job.results.ModelPlot; -import org.elasticsearch.xpack.ml.job.results.ReservedFieldNames; -import org.elasticsearch.xpack.ml.job.results.Result; -import org.elasticsearch.xpack.ml.notifications.AuditMessage; +import org.elasticsearch.xpack.core.ml.job.config.Detector; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.DataCounts; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSizeStats; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshot; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshotField; +import org.elasticsearch.xpack.core.ml.job.results.AnomalyCause; +import org.elasticsearch.xpack.core.ml.job.results.AnomalyRecord; +import org.elasticsearch.xpack.core.ml.job.results.Bucket; +import org.elasticsearch.xpack.core.ml.job.results.BucketInfluencer; +import org.elasticsearch.xpack.core.ml.job.results.CategoryDefinition; +import org.elasticsearch.xpack.core.ml.job.results.Forecast; +import org.elasticsearch.xpack.core.ml.job.results.ForecastRequestStats; +import org.elasticsearch.xpack.core.ml.job.results.Influence; +import org.elasticsearch.xpack.core.ml.job.results.Influencer; +import org.elasticsearch.xpack.core.ml.job.results.ModelPlot; +import org.elasticsearch.xpack.core.ml.job.results.ReservedFieldNames; +import org.elasticsearch.xpack.core.ml.job.results.Result; +import org.elasticsearch.xpack.core.ml.notifications.AuditMessage; import java.io.IOException; import java.util.Collection; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/InfluencersQueryBuilder.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/InfluencersQueryBuilder.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/InfluencersQueryBuilder.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/InfluencersQueryBuilder.java index 0e866e1e00c..984c1a6eb18 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/InfluencersQueryBuilder.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/InfluencersQueryBuilder.java @@ -3,9 +3,9 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.persistence; +package org.elasticsearch.xpack.core.ml.job.persistence; -import org.elasticsearch.xpack.ml.job.results.Influencer; +import org.elasticsearch.xpack.core.ml.job.results.Influencer; import java.util.Objects; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobDataDeleter.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/JobDataDeleter.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobDataDeleter.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/JobDataDeleter.java index 94eba695592..0a7d27f7a0e 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobDataDeleter.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/JobDataDeleter.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.persistence; +package org.elasticsearch.xpack.core.ml.job.persistence; import org.apache.logging.log4j.Logger; import org.elasticsearch.action.ActionListener; @@ -23,16 +23,16 @@ import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.index.reindex.DeleteByQueryAction; import org.elasticsearch.index.reindex.DeleteByQueryRequest; import org.elasticsearch.search.builder.SearchSourceBuilder; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshot; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelState; -import org.elasticsearch.xpack.ml.job.results.Result; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshot; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelState; +import org.elasticsearch.xpack.core.ml.job.results.Result; import java.util.List; import java.util.Objects; -import static org.elasticsearch.xpack.ClientHelper.ML_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.executeAsyncWithOrigin; -import static org.elasticsearch.xpack.ClientHelper.stashWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.ML_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.stashWithOrigin; public class JobDataDeleter { diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobProvider.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/JobProvider.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobProvider.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/JobProvider.java index 7614184a00d..15d15054883 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobProvider.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/JobProvider.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.persistence; +package org.elasticsearch.xpack.core.ml.job.persistence; import org.apache.logging.log4j.Logger; import org.elasticsearch.ElasticsearchException; @@ -67,35 +67,35 @@ import org.elasticsearch.search.builder.SearchSourceBuilder; import org.elasticsearch.search.sort.FieldSortBuilder; import org.elasticsearch.search.sort.SortBuilders; import org.elasticsearch.search.sort.SortOrder; -import org.elasticsearch.xpack.ml.MLMetadataField; -import org.elasticsearch.xpack.ml.MlMetaIndex; -import org.elasticsearch.xpack.ml.MlMetadata; -import org.elasticsearch.xpack.ml.action.GetBucketsAction; -import org.elasticsearch.xpack.ml.action.GetCategoriesAction; -import org.elasticsearch.xpack.ml.action.GetInfluencersAction; -import org.elasticsearch.xpack.ml.action.GetRecordsAction; -import org.elasticsearch.xpack.ml.action.util.QueryPage; -import org.elasticsearch.xpack.ml.calendars.Calendar; -import org.elasticsearch.xpack.ml.calendars.ScheduledEvent; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.config.MlFilter; -import org.elasticsearch.xpack.ml.job.persistence.InfluencersQueryBuilder.InfluencersQuery; -import org.elasticsearch.xpack.ml.job.process.autodetect.params.AutodetectParams; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.CategorizerState; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.DataCounts; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSizeStats; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshot; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshotField; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.Quantiles; -import org.elasticsearch.xpack.ml.job.results.AnomalyRecord; -import org.elasticsearch.xpack.ml.job.results.Bucket; -import org.elasticsearch.xpack.ml.job.results.CategoryDefinition; -import org.elasticsearch.xpack.ml.job.results.ForecastRequestStats; -import org.elasticsearch.xpack.ml.job.results.Influencer; -import org.elasticsearch.xpack.ml.job.results.ModelPlot; -import org.elasticsearch.xpack.ml.job.results.Result; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; -import org.elasticsearch.xpack.security.support.Exceptions; +import org.elasticsearch.xpack.core.ml.MLMetadataField; +import org.elasticsearch.xpack.core.ml.MlMetaIndex; +import org.elasticsearch.xpack.core.ml.MlMetadata; +import org.elasticsearch.xpack.core.ml.action.GetBucketsAction; +import org.elasticsearch.xpack.core.ml.action.GetCategoriesAction; +import org.elasticsearch.xpack.core.ml.action.GetInfluencersAction; +import org.elasticsearch.xpack.core.ml.action.GetRecordsAction; +import org.elasticsearch.xpack.core.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.calendars.Calendar; +import org.elasticsearch.xpack.core.ml.calendars.ScheduledEvent; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.MlFilter; +import org.elasticsearch.xpack.core.ml.job.persistence.InfluencersQueryBuilder.InfluencersQuery; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.params.AutodetectParams; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.CategorizerState; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.DataCounts; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSizeStats; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshot; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshotField; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.Quantiles; +import org.elasticsearch.xpack.core.ml.job.results.AnomalyRecord; +import org.elasticsearch.xpack.core.ml.job.results.Bucket; +import org.elasticsearch.xpack.core.ml.job.results.CategoryDefinition; +import org.elasticsearch.xpack.core.ml.job.results.ForecastRequestStats; +import org.elasticsearch.xpack.core.ml.job.results.Influencer; +import org.elasticsearch.xpack.core.ml.job.results.ModelPlot; +import org.elasticsearch.xpack.core.ml.job.results.Result; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.security.support.Exceptions; import java.io.IOException; import java.util.ArrayList; @@ -114,10 +114,10 @@ import java.util.function.Consumer; import java.util.function.Supplier; import java.util.stream.Collectors; -import static org.elasticsearch.xpack.ClientHelper.ML_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.clientWithOrigin; -import static org.elasticsearch.xpack.ClientHelper.executeAsyncWithOrigin; -import static org.elasticsearch.xpack.ClientHelper.stashWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.ML_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.clientWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.stashWithOrigin; public class JobProvider { private static final Logger LOGGER = Loggers.getLogger(JobProvider.class); @@ -292,7 +292,8 @@ public class JobProvider { } } - static boolean violatedFieldCountLimit(String indexName, long additionalFieldCount, long fieldCountLimit, ClusterState clusterState) { + public static boolean violatedFieldCountLimit( + String indexName, long additionalFieldCount, long fieldCountLimit, ClusterState clusterState) { long numFields = 0; IndexMetaData indexMetaData = clusterState.metaData().index(indexName); Iterator mappings = indexMetaData.getMappings().valuesIt(); @@ -304,7 +305,7 @@ public class JobProvider { } @SuppressWarnings("unchecked") - static int countFields(Map mapping) { + public static int countFields(Map mapping) { Object propertiesNode = mapping.get("properties"); if (propertiesNode != null && propertiesNode instanceof Map) { mapping = (Map) propertiesNode; @@ -596,7 +597,7 @@ public class JobProvider { false, h, errorHandler, client); } - void bucketRecords(String jobId, Bucket bucket, int from, int size, boolean includeInterim, String sortField, + public void bucketRecords(String jobId, Bucket bucket, int from, int size, boolean includeInterim, String sortField, boolean descending, Consumer> handler, Consumer errorHandler, Client client) { // Find the records using the time stamp rather than a parent-child @@ -667,7 +668,7 @@ public class JobProvider { /** * Search for anomaly records with the parameters in the - * {@link org.elasticsearch.xpack.ml.job.persistence.RecordsQueryBuilder} + * {@link RecordsQueryBuilder} * Uses a supplied client, so may run as the currently authenticated user */ public void records(String jobId, RecordsQueryBuilder recordsQueryBuilder, Consumer> handler, diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobStorageDeletionTask.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/JobStorageDeletionTask.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobStorageDeletionTask.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/JobStorageDeletionTask.java index 78865121e20..13c1bf2a4da 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobStorageDeletionTask.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/JobStorageDeletionTask.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.persistence; +package org.elasticsearch.xpack.core.ml.job.persistence; import com.carrotsearch.hppc.cursors.ObjectObjectCursor; import org.apache.logging.log4j.Logger; @@ -32,10 +32,10 @@ import org.elasticsearch.index.reindex.DeleteByQueryRequest; import org.elasticsearch.search.builder.SearchSourceBuilder; import org.elasticsearch.tasks.Task; import org.elasticsearch.tasks.TaskId; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.CategorizerState; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshot; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.Quantiles; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.CategorizerState; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshot; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.Quantiles; import java.util.ArrayList; import java.util.HashSet; @@ -44,8 +44,8 @@ import java.util.Map; import java.util.Set; import java.util.function.Consumer; -import static org.elasticsearch.xpack.ClientHelper.ML_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.executeAsyncWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.ML_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin; /* Moving this class to plugin-core caused a *lot* of server side logic to be pulled in to plugin-core. This should be considered as needing diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/RecordsQueryBuilder.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/RecordsQueryBuilder.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/RecordsQueryBuilder.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/RecordsQueryBuilder.java index 1ba1e6f4f38..8fb86689ecf 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/RecordsQueryBuilder.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/RecordsQueryBuilder.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.persistence; +package org.elasticsearch.xpack.core.ml.job.persistence; import org.elasticsearch.index.query.BoolQueryBuilder; import org.elasticsearch.index.query.QueryBuilder; @@ -13,8 +13,8 @@ import org.elasticsearch.search.builder.SearchSourceBuilder; import org.elasticsearch.search.sort.FieldSortBuilder; import org.elasticsearch.search.sort.SortBuilders; import org.elasticsearch.search.sort.SortOrder; -import org.elasticsearch.xpack.ml.job.results.AnomalyRecord; -import org.elasticsearch.xpack.ml.job.results.Result; +import org.elasticsearch.xpack.core.ml.job.results.AnomalyRecord; +import org.elasticsearch.xpack.core.ml.job.results.Result; import java.util.Arrays; import java.util.Date; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/ResultsFilterBuilder.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/ResultsFilterBuilder.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/ResultsFilterBuilder.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/ResultsFilterBuilder.java index 82e8725b382..c31e82dd0b6 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/ResultsFilterBuilder.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/ResultsFilterBuilder.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.persistence; +package org.elasticsearch.xpack.core.ml.job.persistence; import org.elasticsearch.common.Strings; import org.elasticsearch.index.query.BoolQueryBuilder; @@ -11,7 +11,7 @@ import org.elasticsearch.index.query.QueryBuilder; import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.index.query.RangeQueryBuilder; import org.elasticsearch.index.query.TermQueryBuilder; -import org.elasticsearch.xpack.ml.job.results.Result; +import org.elasticsearch.xpack.core.ml.job.results.Result; import java.util.ArrayList; import java.util.List; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/ScheduledEventsQueryBuilder.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/ScheduledEventsQueryBuilder.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/ScheduledEventsQueryBuilder.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/ScheduledEventsQueryBuilder.java index 5fbc9433941..a472365f77d 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/persistence/ScheduledEventsQueryBuilder.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/ScheduledEventsQueryBuilder.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.persistence; +package org.elasticsearch.xpack.core.ml.job.persistence; import org.elasticsearch.index.query.BoolQueryBuilder; import org.elasticsearch.index.query.QueryBuilder; @@ -11,8 +11,8 @@ import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.index.query.RangeQueryBuilder; import org.elasticsearch.index.query.TermsQueryBuilder; import org.elasticsearch.search.builder.SearchSourceBuilder; -import org.elasticsearch.xpack.ml.calendars.Calendar; -import org.elasticsearch.xpack.ml.calendars.ScheduledEvent; +import org.elasticsearch.xpack.core.ml.calendars.Calendar; +import org.elasticsearch.xpack.core.ml.calendars.ScheduledEvent; import java.util.ArrayList; import java.util.List; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/FlushAcknowledgement.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/process/autodetect/output/FlushAcknowledgement.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/FlushAcknowledgement.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/process/autodetect/output/FlushAcknowledgement.java index 5659efe3f58..8f61c10f6d6 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/FlushAcknowledgement.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/process/autodetect/output/FlushAcknowledgement.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.process.autodetect.output; +package org.elasticsearch.xpack.core.ml.job.process.autodetect.output; import org.elasticsearch.Version; import org.elasticsearch.common.ParseField; @@ -15,7 +15,7 @@ import org.elasticsearch.common.xcontent.ObjectParser; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.ml.utils.time.TimeUtils; +import org.elasticsearch.xpack.core.ml.utils.time.TimeUtils; import java.io.IOException; import java.util.Date; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/AutodetectParams.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/process/autodetect/params/AutodetectParams.java similarity index 89% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/AutodetectParams.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/process/autodetect/params/AutodetectParams.java index 0991e0935bd..957bc6707be 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/AutodetectParams.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/process/autodetect/params/AutodetectParams.java @@ -3,15 +3,15 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.process.autodetect.params; +package org.elasticsearch.xpack.core.ml.job.process.autodetect.params; import org.elasticsearch.common.Nullable; -import org.elasticsearch.xpack.ml.calendars.ScheduledEvent; -import org.elasticsearch.xpack.ml.job.config.MlFilter; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.DataCounts; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSizeStats; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshot; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.Quantiles; +import org.elasticsearch.xpack.core.ml.calendars.ScheduledEvent; +import org.elasticsearch.xpack.core.ml.job.config.MlFilter; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.DataCounts; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSizeStats; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshot; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.Quantiles; import java.util.ArrayList; import java.util.HashSet; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/CategorizerState.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/process/autodetect/state/CategorizerState.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/CategorizerState.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/process/autodetect/state/CategorizerState.java index f896badc567..8c083003546 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/CategorizerState.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/process/autodetect/state/CategorizerState.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.process.autodetect.state; +package org.elasticsearch.xpack.core.ml.job.process.autodetect.state; /** diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/DataCounts.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/process/autodetect/state/DataCounts.java similarity index 99% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/DataCounts.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/process/autodetect/state/DataCounts.java index 1f27c8968f0..37bc7e14099 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/DataCounts.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/process/autodetect/state/DataCounts.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.process.autodetect.state; +package org.elasticsearch.xpack.core.ml.job.process.autodetect.state; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.io.stream.StreamInput; @@ -14,8 +14,8 @@ import org.elasticsearch.common.xcontent.ObjectParser.ValueType; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser.Token; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.utils.time.TimeUtils; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.utils.time.TimeUtils; import java.io.IOException; import java.util.Date; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/ModelSizeStats.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/process/autodetect/state/ModelSizeStats.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/ModelSizeStats.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/process/autodetect/state/ModelSizeStats.java index a6b565d3e4e..fa30f12454c 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/ModelSizeStats.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/process/autodetect/state/ModelSizeStats.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.process.autodetect.state; +package org.elasticsearch.xpack.core.ml.job.process.autodetect.state; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.io.stream.StreamInput; @@ -14,9 +14,9 @@ import org.elasticsearch.common.xcontent.ObjectParser.ValueType; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser.Token; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.results.Result; -import org.elasticsearch.xpack.ml.utils.time.TimeUtils; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.results.Result; +import org.elasticsearch.xpack.core.ml.utils.time.TimeUtils; import java.io.IOException; import java.util.Date; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/ModelSnapshot.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/process/autodetect/state/ModelSnapshot.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/ModelSnapshot.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/process/autodetect/state/ModelSnapshot.java index 7da9b2259c8..a4ddb27cb9e 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/ModelSnapshot.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/process/autodetect/state/ModelSnapshot.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.process.autodetect.state; +package org.elasticsearch.xpack.core.ml.job.process.autodetect.state; import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.common.ParseField; @@ -19,8 +19,8 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentParser.Token; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.utils.time.TimeUtils; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.utils.time.TimeUtils; import java.io.IOException; import java.util.ArrayList; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/ModelSnapshotField.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/process/autodetect/state/ModelSnapshotField.java similarity index 86% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/ModelSnapshotField.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/process/autodetect/state/ModelSnapshotField.java index 25767179936..c7e005ec66d 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/ModelSnapshotField.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/process/autodetect/state/ModelSnapshotField.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.process.autodetect.state; +package org.elasticsearch.xpack.core.ml.job.process.autodetect.state; import org.elasticsearch.common.ParseField; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/ModelState.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/process/autodetect/state/ModelState.java similarity index 93% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/ModelState.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/process/autodetect/state/ModelState.java index cf2c30f1d8d..dce791a2b3d 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/ModelState.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/process/autodetect/state/ModelState.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.process.autodetect.state; +package org.elasticsearch.xpack.core.ml.job.process.autodetect.state; /** diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/Quantiles.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/process/autodetect/state/Quantiles.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/Quantiles.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/process/autodetect/state/Quantiles.java index 9fcf29ceb1d..3ca39bdecc3 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/Quantiles.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/process/autodetect/state/Quantiles.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.process.autodetect.state; +package org.elasticsearch.xpack.core.ml.job.process.autodetect.state; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.io.stream.StreamInput; @@ -13,7 +13,7 @@ import org.elasticsearch.common.xcontent.ConstructingObjectParser; import org.elasticsearch.common.xcontent.ObjectParser.ValueType; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.Job; import java.io.IOException; import java.util.Date; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/RecordWriter.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/process/autodetect/writer/RecordWriter.java similarity index 93% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/RecordWriter.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/process/autodetect/writer/RecordWriter.java index cc02d873179..61b904246d5 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/RecordWriter.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/process/autodetect/writer/RecordWriter.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.process.autodetect.writer; +package org.elasticsearch.xpack.core.ml.job.process.autodetect.writer; import java.io.IOException; import java.util.List; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/results/AnomalyCause.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/results/AnomalyCause.java similarity index 99% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/results/AnomalyCause.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/results/AnomalyCause.java index 468f27102eb..0c53bbe686a 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/results/AnomalyCause.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/results/AnomalyCause.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.results; +package org.elasticsearch.xpack.core.ml.job.results; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.io.stream.StreamInput; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/results/AnomalyRecord.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/results/AnomalyRecord.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/results/AnomalyRecord.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/results/AnomalyRecord.java index 281000a0f63..189c11f8ca3 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/results/AnomalyRecord.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/results/AnomalyRecord.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.results; +package org.elasticsearch.xpack.core.ml.job.results; import org.elasticsearch.Version; import org.elasticsearch.common.ParseField; @@ -16,10 +16,10 @@ import org.elasticsearch.common.xcontent.ObjectParser.ValueType; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser.Token; -import org.elasticsearch.xpack.ml.job.config.Detector; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; -import org.elasticsearch.xpack.ml.utils.time.TimeUtils; +import org.elasticsearch.xpack.core.ml.job.config.Detector; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.utils.time.TimeUtils; import java.io.IOException; import java.util.ArrayList; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/results/Bucket.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/results/Bucket.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/results/Bucket.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/results/Bucket.java index cb796497f47..cc395afc6ba 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/results/Bucket.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/results/Bucket.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.results; +package org.elasticsearch.xpack.core.ml.job.results; import org.elasticsearch.Version; import org.elasticsearch.common.ParseField; @@ -15,9 +15,9 @@ import org.elasticsearch.common.xcontent.ObjectParser.ValueType; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser.Token; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; -import org.elasticsearch.xpack.ml.utils.time.TimeUtils; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.utils.time.TimeUtils; import java.io.IOException; import java.util.ArrayList; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/results/BucketInfluencer.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/results/BucketInfluencer.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/results/BucketInfluencer.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/results/BucketInfluencer.java index f6d0686181e..ae665c9c8b0 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/results/BucketInfluencer.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/results/BucketInfluencer.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.results; +package org.elasticsearch.xpack.core.ml.job.results; import org.elasticsearch.Version; import org.elasticsearch.common.ParseField; @@ -15,9 +15,9 @@ import org.elasticsearch.common.xcontent.ObjectParser.ValueType; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser.Token; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; -import org.elasticsearch.xpack.ml.utils.time.TimeUtils; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.utils.time.TimeUtils; import java.io.IOException; import java.util.Date; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/results/CategoryDefinition.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/results/CategoryDefinition.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/results/CategoryDefinition.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/results/CategoryDefinition.java index 50e01a41148..850834d7037 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/results/CategoryDefinition.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/results/CategoryDefinition.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.results; +package org.elasticsearch.xpack.core.ml.job.results; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.io.stream.StreamInput; @@ -12,7 +12,7 @@ import org.elasticsearch.common.io.stream.Writeable; import org.elasticsearch.common.xcontent.ConstructingObjectParser; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.Job; import java.io.IOException; import java.util.ArrayList; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/results/Forecast.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/results/Forecast.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/results/Forecast.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/results/Forecast.java index 0e60578c2f4..f0e85b687b2 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/results/Forecast.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/results/Forecast.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.results; +package org.elasticsearch.xpack.core.ml.job.results; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.io.stream.StreamInput; @@ -14,8 +14,8 @@ import org.elasticsearch.common.xcontent.ObjectParser.ValueType; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser.Token; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.utils.time.TimeUtils; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.utils.time.TimeUtils; import java.io.IOException; import java.util.Date; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/results/ForecastRequestStats.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/results/ForecastRequestStats.java similarity index 99% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/results/ForecastRequestStats.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/results/ForecastRequestStats.java index 475fec1bcab..7e92b134784 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/results/ForecastRequestStats.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/results/ForecastRequestStats.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.results; +package org.elasticsearch.xpack.core.ml.job.results; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.io.stream.StreamInput; @@ -13,7 +13,7 @@ import org.elasticsearch.common.xcontent.ConstructingObjectParser; import org.elasticsearch.common.xcontent.ObjectParser.ValueType; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.Job; import java.io.IOException; import java.time.Instant; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/results/Influence.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/results/Influence.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/results/Influence.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/results/Influence.java index d16202b9f54..7b7c012746f 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/results/Influence.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/results/Influence.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.results; +package org.elasticsearch.xpack.core.ml.job.results; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.io.stream.StreamInput; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/results/Influencer.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/results/Influencer.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/results/Influencer.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/results/Influencer.java index ec725a96576..ba37a08b536 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/results/Influencer.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/results/Influencer.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.results; +package org.elasticsearch.xpack.core.ml.job.results; import org.elasticsearch.Version; import org.elasticsearch.common.ParseField; @@ -15,9 +15,9 @@ import org.elasticsearch.common.xcontent.ObjectParser.ValueType; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser.Token; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; -import org.elasticsearch.xpack.ml.utils.time.TimeUtils; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.utils.time.TimeUtils; import java.io.IOException; import java.util.Date; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/results/ModelPlot.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/results/ModelPlot.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/results/ModelPlot.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/results/ModelPlot.java index ab985afd29d..31d5a59f079 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/results/ModelPlot.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/results/ModelPlot.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.results; +package org.elasticsearch.xpack.core.ml.job.results; import org.elasticsearch.Version; import org.elasticsearch.common.ParseField; @@ -15,8 +15,8 @@ import org.elasticsearch.common.xcontent.ObjectParser.ValueType; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser.Token; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.utils.time.TimeUtils; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.utils.time.TimeUtils; import java.io.IOException; import java.util.Date; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/results/OverallBucket.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/results/OverallBucket.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/results/OverallBucket.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/results/OverallBucket.java index 3a2aa328f4c..c1bd37f386c 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/results/OverallBucket.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/results/OverallBucket.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.results; +package org.elasticsearch.xpack.core.ml.job.results; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.io.stream.StreamInput; @@ -11,8 +11,8 @@ import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.io.stream.Writeable; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import java.io.IOException; import java.util.Date; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/results/PartitionScore.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/results/PartitionScore.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/results/PartitionScore.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/results/PartitionScore.java index f2ef04513a4..30afef693a6 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/results/PartitionScore.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/results/PartitionScore.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.results; +package org.elasticsearch.xpack.core.ml.job.results; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.io.stream.StreamInput; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/results/ReservedFieldNames.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/results/ReservedFieldNames.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/results/ReservedFieldNames.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/results/ReservedFieldNames.java index 5fd587c0c54..fb9a697ac46 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/results/ReservedFieldNames.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/results/ReservedFieldNames.java @@ -3,15 +3,15 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.results; +package org.elasticsearch.xpack.core.ml.job.results; -import org.elasticsearch.xpack.ml.job.config.Detector; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.persistence.ElasticsearchMappings; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.DataCounts; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSizeStats; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshot; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshotField; +import org.elasticsearch.xpack.core.ml.job.config.Detector; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.persistence.ElasticsearchMappings; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.DataCounts; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSizeStats; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshot; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshotField; import java.util.Arrays; import java.util.HashSet; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/results/Result.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/results/Result.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/results/Result.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/results/Result.java index 5b829890934..658f0944347 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/job/results/Result.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/results/Result.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.results; +package org.elasticsearch.xpack.core.ml.job.results; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.ParseField; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/notifications/AuditMessage.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/notifications/AuditMessage.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/notifications/AuditMessage.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/notifications/AuditMessage.java index e90700b63df..d423342b8d9 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/notifications/AuditMessage.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/notifications/AuditMessage.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.notifications; +package org.elasticsearch.xpack.core.ml.notifications; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.io.stream.StreamInput; @@ -15,8 +15,8 @@ import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentParser.Token; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.utils.time.TimeUtils; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.utils.time.TimeUtils; import java.io.IOException; import java.util.Date; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/notifications/AuditorField.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/notifications/AuditorField.java similarity index 87% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/notifications/AuditorField.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/notifications/AuditorField.java index f5ef99c6b40..ac83b7c37f5 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/notifications/AuditorField.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/notifications/AuditorField.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.notifications; +package org.elasticsearch.xpack.core.ml.notifications; public final class AuditorField { public static final String NOTIFICATIONS_INDEX = ".ml-notifications"; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/notifications/Level.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/notifications/Level.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/notifications/Level.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/notifications/Level.java index 3b9f69f1403..f54f9cf2680 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/notifications/Level.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/notifications/Level.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.notifications; +package org.elasticsearch.xpack.core.ml.notifications; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/utils/ExceptionsHelper.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/utils/ExceptionsHelper.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/utils/ExceptionsHelper.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/utils/ExceptionsHelper.java index b1d0655ceae..150c539b1ae 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/utils/ExceptionsHelper.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/utils/ExceptionsHelper.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.utils; +package org.elasticsearch.xpack.core.ml.utils; import org.elasticsearch.ElasticsearchException; import org.elasticsearch.ElasticsearchStatusException; @@ -12,7 +12,7 @@ import org.elasticsearch.ResourceNotFoundException; import org.elasticsearch.action.search.ShardSearchFailure; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.search.SearchShardTarget; -import org.elasticsearch.xpack.ml.job.messages.Messages; +import org.elasticsearch.xpack.core.ml.job.messages.Messages; public class ExceptionsHelper { diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/utils/Intervals.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/utils/Intervals.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/utils/Intervals.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/utils/Intervals.java index 5b766e714c0..6cbb84d56fb 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/utils/Intervals.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/utils/Intervals.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.utils; +package org.elasticsearch.xpack.core.ml.utils; /** * A collection of utilities related to intervals diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/utils/MlStrings.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/utils/MlStrings.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/utils/MlStrings.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/utils/MlStrings.java index d872c7e1d2d..717420061ee 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/utils/MlStrings.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/utils/MlStrings.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.utils; +package org.elasticsearch.xpack.core.ml.utils; import org.elasticsearch.cluster.metadata.MetaData; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/utils/NameResolver.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/utils/NameResolver.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/utils/NameResolver.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/utils/NameResolver.java index 4f4654ae0c8..89d021a2e38 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/utils/NameResolver.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/utils/NameResolver.java @@ -3,11 +3,10 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.utils; +package org.elasticsearch.xpack.core.ml.utils; import org.elasticsearch.ResourceNotFoundException; import org.elasticsearch.cluster.metadata.MetaData; -import org.elasticsearch.common.Nullable; import org.elasticsearch.common.Strings; import org.elasticsearch.common.regex.Regex; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/utils/ToXContentParams.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/utils/ToXContentParams.java similarity index 92% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/utils/ToXContentParams.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/utils/ToXContentParams.java index ad31351a9f2..d120e8cf668 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/utils/ToXContentParams.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/utils/ToXContentParams.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.utils; +package org.elasticsearch.xpack.core.ml.utils; /** diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/utils/time/DateTimeFormatterTimestampConverter.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/utils/time/DateTimeFormatterTimestampConverter.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/utils/time/DateTimeFormatterTimestampConverter.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/utils/time/DateTimeFormatterTimestampConverter.java index af128b4d7e2..e991fdd1b5e 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/utils/time/DateTimeFormatterTimestampConverter.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/utils/time/DateTimeFormatterTimestampConverter.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.utils.time; +package org.elasticsearch.xpack.core.ml.utils.time; import java.time.DateTimeException; import java.time.Instant; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/utils/time/TimeUtils.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/utils/time/TimeUtils.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/utils/time/TimeUtils.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/utils/time/TimeUtils.java index b7471d308da..6b334972366 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/utils/time/TimeUtils.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/utils/time/TimeUtils.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.utils.time; +package org.elasticsearch.xpack.core.ml.utils.time; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.unit.TimeValue; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/utils/time/TimestampConverter.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/utils/time/TimestampConverter.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ml/utils/time/TimestampConverter.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/utils/time/TimestampConverter.java index 885c2871dbf..4d23fe891a0 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ml/utils/time/TimestampConverter.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/utils/time/TimestampConverter.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.utils.time; +package org.elasticsearch.xpack.core.ml.utils.time; import java.time.format.DateTimeParseException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/monitoring/MonitoredSystem.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/monitoring/MonitoredSystem.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/monitoring/MonitoredSystem.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/monitoring/MonitoredSystem.java index 2ccfbf5301b..7567c275156 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/monitoring/MonitoredSystem.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/monitoring/MonitoredSystem.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.monitoring; +package org.elasticsearch.xpack.core.monitoring; import java.util.Arrays; import java.util.Locale; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/monitoring/MonitoringFeatureSetUsage.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/monitoring/MonitoringFeatureSetUsage.java similarity index 90% rename from plugin/core/src/main/java/org/elasticsearch/xpack/monitoring/MonitoringFeatureSetUsage.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/monitoring/MonitoringFeatureSetUsage.java index a2b1c5279f9..d4235515eda 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/monitoring/MonitoringFeatureSetUsage.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/monitoring/MonitoringFeatureSetUsage.java @@ -3,14 +3,14 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.monitoring; +package org.elasticsearch.xpack.core.monitoring; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.XPackFeatureSet; -import org.elasticsearch.xpack.XPackField; +import org.elasticsearch.xpack.core.XPackFeatureSet; +import org.elasticsearch.xpack.core.XPackField; import java.io.IOException; import java.util.Map; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/monitoring/MonitoringField.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/monitoring/MonitoringField.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/monitoring/MonitoringField.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/monitoring/MonitoringField.java index 32924dfae88..9174a9d6624 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/monitoring/MonitoringField.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/monitoring/MonitoringField.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.monitoring; +package org.elasticsearch.xpack.core.monitoring; import org.elasticsearch.common.settings.Setting; import org.elasticsearch.common.unit.TimeValue; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/monitoring/action/MonitoringBulkAction.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/monitoring/action/MonitoringBulkAction.java index 13d2c4498be..24dc9be3473 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/monitoring/action/MonitoringBulkAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.monitoring.action; +package org.elasticsearch.xpack.core.monitoring.action; import org.elasticsearch.action.Action; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkDoc.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/monitoring/action/MonitoringBulkDoc.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkDoc.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/monitoring/action/MonitoringBulkDoc.java index 97d3c92cb71..ab243d62e0a 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkDoc.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/monitoring/action/MonitoringBulkDoc.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.monitoring.action; +package org.elasticsearch.xpack.core.monitoring.action; import org.elasticsearch.Version; import org.elasticsearch.common.Nullable; @@ -14,9 +14,9 @@ import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.io.stream.Writeable; import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.xpack.monitoring.MonitoredSystem; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringDoc; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringTemplateUtils; +import org.elasticsearch.xpack.core.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringDoc; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringTemplateUtils; import java.io.IOException; import java.util.Objects; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkRequest.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/monitoring/action/MonitoringBulkRequest.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkRequest.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/monitoring/action/MonitoringBulkRequest.java index 3d56dd8c21d..adb6b04db35 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkRequest.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/monitoring/action/MonitoringBulkRequest.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.monitoring.action; +package org.elasticsearch.xpack.core.monitoring.action; import org.elasticsearch.action.ActionRequest; import org.elasticsearch.action.ActionRequestValidationException; @@ -15,7 +15,7 @@ import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.xpack.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.MonitoredSystem; import java.io.IOException; import java.util.ArrayList; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkRequestBuilder.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/monitoring/action/MonitoringBulkRequestBuilder.java similarity index 92% rename from plugin/core/src/main/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkRequestBuilder.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/monitoring/action/MonitoringBulkRequestBuilder.java index 20887632f8f..e028b2ffc7d 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkRequestBuilder.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/monitoring/action/MonitoringBulkRequestBuilder.java @@ -3,13 +3,13 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.monitoring.action; +package org.elasticsearch.xpack.core.monitoring.action; import org.elasticsearch.action.ActionRequestBuilder; import org.elasticsearch.client.ElasticsearchClient; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.xpack.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.MonitoredSystem; import java.io.IOException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkResponse.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/monitoring/action/MonitoringBulkResponse.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkResponse.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/monitoring/action/MonitoringBulkResponse.java index 10c68dcda50..3643d286781 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkResponse.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/monitoring/action/MonitoringBulkResponse.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.monitoring.action; +package org.elasticsearch.xpack.core.monitoring.action; import org.elasticsearch.ElasticsearchException; import org.elasticsearch.ExceptionsHelper; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/monitoring/action/MonitoringIndex.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/monitoring/action/MonitoringIndex.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/monitoring/action/MonitoringIndex.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/monitoring/action/MonitoringIndex.java index 5589cfb5757..8f80b523f07 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/monitoring/action/MonitoringIndex.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/monitoring/action/MonitoringIndex.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.monitoring.action; +package org.elasticsearch.xpack.core.monitoring.action; import org.elasticsearch.common.Strings; import org.elasticsearch.common.io.stream.StreamInput; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/monitoring/client/MonitoringClient.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/monitoring/client/MonitoringClient.java similarity index 82% rename from plugin/core/src/main/java/org/elasticsearch/xpack/monitoring/client/MonitoringClient.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/monitoring/client/MonitoringClient.java index 0ef0399c20d..2dba6e6a466 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/monitoring/client/MonitoringClient.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/monitoring/client/MonitoringClient.java @@ -3,16 +3,16 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.monitoring.client; +package org.elasticsearch.xpack.core.monitoring.client; import org.elasticsearch.action.ActionFuture; import org.elasticsearch.action.ActionListener; import org.elasticsearch.client.Client; import org.elasticsearch.common.inject.Inject; -import org.elasticsearch.xpack.monitoring.action.MonitoringBulkAction; -import org.elasticsearch.xpack.monitoring.action.MonitoringBulkRequest; -import org.elasticsearch.xpack.monitoring.action.MonitoringBulkRequestBuilder; -import org.elasticsearch.xpack.monitoring.action.MonitoringBulkResponse; +import org.elasticsearch.xpack.core.monitoring.action.MonitoringBulkAction; +import org.elasticsearch.xpack.core.monitoring.action.MonitoringBulkRequest; +import org.elasticsearch.xpack.core.monitoring.action.MonitoringBulkRequestBuilder; +import org.elasticsearch.xpack.core.monitoring.action.MonitoringBulkResponse; import java.util.Map; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/monitoring/exporter/MonitoringDoc.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/monitoring/exporter/MonitoringDoc.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/monitoring/exporter/MonitoringDoc.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/monitoring/exporter/MonitoringDoc.java index e9d329e3527..93785053889 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/monitoring/exporter/MonitoringDoc.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/monitoring/exporter/MonitoringDoc.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.monitoring.exporter; +package org.elasticsearch.xpack.core.monitoring.exporter; import org.elasticsearch.Version; import org.elasticsearch.common.Nullable; @@ -12,7 +12,7 @@ import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.io.stream.Writeable; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.MonitoredSystem; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; @@ -122,7 +122,7 @@ public abstract class MonitoringDoc implements ToXContentObject { * @param timestamp the timestamp to convert * @return a string representing the timestamp */ - static String toUTC(final long timestamp) { + public static String toUTC(final long timestamp) { return new DateTime(timestamp, DateTimeZone.UTC).toString(); } diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/monitoring/exporter/MonitoringTemplateUtils.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/monitoring/exporter/MonitoringTemplateUtils.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/monitoring/exporter/MonitoringTemplateUtils.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/monitoring/exporter/MonitoringTemplateUtils.java index 89c60243283..64e12726165 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/monitoring/exporter/MonitoringTemplateUtils.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/monitoring/exporter/MonitoringTemplateUtils.java @@ -3,13 +3,13 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.monitoring.exporter; +package org.elasticsearch.xpack.core.monitoring.exporter; import org.elasticsearch.Version; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.xpack.monitoring.MonitoredSystem; -import org.elasticsearch.xpack.template.TemplateUtils; +import org.elasticsearch.xpack.core.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.template.TemplateUtils; import org.joda.time.format.DateTimeFormatter; import java.io.IOException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/persistent/AllocatedPersistentTask.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/persistent/AllocatedPersistentTask.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/persistent/AllocatedPersistentTask.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/persistent/AllocatedPersistentTask.java index 87949e16913..0b315d206b0 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/persistent/AllocatedPersistentTask.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/persistent/AllocatedPersistentTask.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.persistent; +package org.elasticsearch.xpack.core.persistent; import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.message.ParameterizedMessage; @@ -14,7 +14,6 @@ import org.elasticsearch.common.Nullable; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.tasks.CancellableTask; import org.elasticsearch.tasks.Task; -import org.elasticsearch.tasks.TaskCancelledException; import org.elasticsearch.tasks.TaskId; import org.elasticsearch.tasks.TaskManager; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/persistent/CompletionPersistentTaskAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/persistent/CompletionPersistentTaskAction.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/persistent/CompletionPersistentTaskAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/persistent/CompletionPersistentTaskAction.java index c88a01bafd4..a6f0342e5f6 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/persistent/CompletionPersistentTaskAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/persistent/CompletionPersistentTaskAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.persistent; +package org.elasticsearch.xpack.core.persistent; import org.elasticsearch.action.Action; import org.elasticsearch.action.ActionListener; @@ -24,7 +24,7 @@ import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData.PersistentTask; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData.PersistentTask; import java.io.IOException; import java.util.Objects; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/persistent/NodePersistentTasksExecutor.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/persistent/NodePersistentTasksExecutor.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/persistent/NodePersistentTasksExecutor.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/persistent/NodePersistentTasksExecutor.java index 9595883ffb5..e7e11a4996d 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/persistent/NodePersistentTasksExecutor.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/persistent/NodePersistentTasksExecutor.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.persistent; +package org.elasticsearch.xpack.core.persistent; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.util.concurrent.AbstractRunnable; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/persistent/PersistentTaskParams.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/persistent/PersistentTaskParams.java similarity index 91% rename from plugin/core/src/main/java/org/elasticsearch/xpack/persistent/PersistentTaskParams.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/persistent/PersistentTaskParams.java index 912252b5c70..60914c7e60d 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/persistent/PersistentTaskParams.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/persistent/PersistentTaskParams.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.persistent; +package org.elasticsearch.xpack.core.persistent; import org.elasticsearch.common.io.stream.NamedWriteable; import org.elasticsearch.common.xcontent.ToXContentObject; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/persistent/PersistentTaskResponse.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/persistent/PersistentTaskResponse.java similarity index 91% rename from plugin/core/src/main/java/org/elasticsearch/xpack/persistent/PersistentTaskResponse.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/persistent/PersistentTaskResponse.java index 6b2e85004b7..a6d815830a5 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/persistent/PersistentTaskResponse.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/persistent/PersistentTaskResponse.java @@ -3,12 +3,12 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.persistent; +package org.elasticsearch.xpack.core.persistent; import org.elasticsearch.action.ActionResponse; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData.PersistentTask; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData.PersistentTask; import java.io.IOException; import java.util.Objects; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/persistent/PersistentTasksClusterService.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/persistent/PersistentTasksClusterService.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/persistent/PersistentTasksClusterService.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/persistent/PersistentTasksClusterService.java index a9b99ed21d5..69db67f1893 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/persistent/PersistentTasksClusterService.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/persistent/PersistentTasksClusterService.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.persistent; +package org.elasticsearch.xpack.core.persistent; import org.apache.logging.log4j.Logger; import org.elasticsearch.ResourceAlreadyExistsException; @@ -20,8 +20,8 @@ import org.elasticsearch.common.Nullable; import org.elasticsearch.common.component.AbstractComponent; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.tasks.Task; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData.Assignment; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData.PersistentTask; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData.Assignment; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData.PersistentTask; import java.util.Objects; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/persistent/PersistentTasksCustomMetaData.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/persistent/PersistentTasksCustomMetaData.java similarity index 99% rename from plugin/core/src/main/java/org/elasticsearch/xpack/persistent/PersistentTasksCustomMetaData.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/persistent/PersistentTasksCustomMetaData.java index 7f9722afc25..8dfe7fa1710 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/persistent/PersistentTasksCustomMetaData.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/persistent/PersistentTasksCustomMetaData.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.persistent; +package org.elasticsearch.xpack.core.persistent; import org.elasticsearch.ResourceAlreadyExistsException; import org.elasticsearch.ResourceNotFoundException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/persistent/PersistentTasksExecutor.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/persistent/PersistentTasksExecutor.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/persistent/PersistentTasksExecutor.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/persistent/PersistentTasksExecutor.java index f15db609787..952a7c0b06c 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/persistent/PersistentTasksExecutor.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/persistent/PersistentTasksExecutor.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.persistent; +package org.elasticsearch.xpack.core.persistent; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.node.DiscoveryNode; @@ -12,8 +12,8 @@ import org.elasticsearch.common.component.AbstractComponent; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.tasks.Task; import org.elasticsearch.tasks.TaskId; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData.Assignment; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData.PersistentTask; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData.Assignment; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData.PersistentTask; import java.util.Map; import java.util.function.Predicate; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/persistent/PersistentTasksExecutorRegistry.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/persistent/PersistentTasksExecutorRegistry.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/persistent/PersistentTasksExecutorRegistry.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/persistent/PersistentTasksExecutorRegistry.java index a4bb86c5dc7..c2b9d8cc0e8 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/persistent/PersistentTasksExecutorRegistry.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/persistent/PersistentTasksExecutorRegistry.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.persistent; +package org.elasticsearch.xpack.core.persistent; import org.elasticsearch.common.component.AbstractComponent; import org.elasticsearch.common.settings.Settings; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/persistent/PersistentTasksNodeService.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/persistent/PersistentTasksNodeService.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/persistent/PersistentTasksNodeService.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/persistent/PersistentTasksNodeService.java index 36907afbe60..a201ebdd70b 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/persistent/PersistentTasksNodeService.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/persistent/PersistentTasksNodeService.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.persistent; +package org.elasticsearch.xpack.core.persistent; import org.apache.logging.log4j.message.ParameterizedMessage; import org.apache.logging.log4j.util.Supplier; @@ -22,7 +22,7 @@ import org.elasticsearch.tasks.Task; import org.elasticsearch.tasks.TaskAwareRequest; import org.elasticsearch.tasks.TaskId; import org.elasticsearch.tasks.TaskManager; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData.PersistentTask; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData.PersistentTask; import java.io.IOException; import java.util.HashMap; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/persistent/PersistentTasksService.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/persistent/PersistentTasksService.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/persistent/PersistentTasksService.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/persistent/PersistentTasksService.java index 57008808b85..00b7c856dc1 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/persistent/PersistentTasksService.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/persistent/PersistentTasksService.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.persistent; +package org.elasticsearch.xpack.core.persistent; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.admin.cluster.node.tasks.cancel.CancelTasksRequest; @@ -21,12 +21,12 @@ import org.elasticsearch.node.NodeClosedException; import org.elasticsearch.tasks.Task; import org.elasticsearch.tasks.TaskId; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData.PersistentTask; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData.PersistentTask; import java.util.function.Predicate; -import static org.elasticsearch.xpack.ClientHelper.PERSISTENT_TASK_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.executeAsyncWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.PERSISTENT_TASK_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin; /** * This service is used by persistent actions to propagate changes in the action state and notify about completion diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/persistent/RemovePersistentTaskAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/persistent/RemovePersistentTaskAction.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/persistent/RemovePersistentTaskAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/persistent/RemovePersistentTaskAction.java index e8350db2268..44959801e51 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/persistent/RemovePersistentTaskAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/persistent/RemovePersistentTaskAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.persistent; +package org.elasticsearch.xpack.core.persistent; import org.elasticsearch.action.Action; import org.elasticsearch.action.ActionListener; @@ -24,7 +24,7 @@ import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData.PersistentTask; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData.PersistentTask; import java.io.IOException; import java.util.Objects; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/persistent/StartPersistentTaskAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/persistent/StartPersistentTaskAction.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/persistent/StartPersistentTaskAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/persistent/StartPersistentTaskAction.java index 6052301ca51..7c3f4157847 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/persistent/StartPersistentTaskAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/persistent/StartPersistentTaskAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.persistent; +package org.elasticsearch.xpack.core.persistent; import org.elasticsearch.action.Action; import org.elasticsearch.action.ActionListener; @@ -25,7 +25,7 @@ import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData.PersistentTask; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData.PersistentTask; import java.io.IOException; import java.util.Objects; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/persistent/UpdatePersistentTaskStatusAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/persistent/UpdatePersistentTaskStatusAction.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/persistent/UpdatePersistentTaskStatusAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/persistent/UpdatePersistentTaskStatusAction.java index 401f158b841..11557554ede 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/persistent/UpdatePersistentTaskStatusAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/persistent/UpdatePersistentTaskStatusAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.persistent; +package org.elasticsearch.xpack.core.persistent; import org.elasticsearch.action.Action; import org.elasticsearch.action.ActionListener; @@ -25,7 +25,7 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.tasks.Task; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData.PersistentTask; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData.PersistentTask; import java.io.IOException; import java.util.Objects; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/persistent/package-info.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/persistent/package-info.java similarity index 50% rename from plugin/core/src/main/java/org/elasticsearch/xpack/persistent/package-info.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/persistent/package-info.java index 8bcd033eb7e..abbce710248 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/persistent/package-info.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/persistent/package-info.java @@ -12,23 +12,24 @@ * requests and responses. The execution is done in six phases: *

* 1. The coordinating node sends an ordinary transport request to the master node to start a new persistent task. This task is handled - * by the {@link org.elasticsearch.xpack.persistent.PersistentTasksService}, which is using - * {@link org.elasticsearch.xpack.persistent.PersistentTasksClusterService} to update cluster state with the record about running persistent - * task. + * by the {@link org.elasticsearch.xpack.core.persistent.PersistentTasksService}, which is using + * {@link org.elasticsearch.xpack.core.persistent.PersistentTasksClusterService} to update cluster state with the record about running + * persistent task. *

- * 2. The master node updates the {@link org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData} in the cluster state to indicate - * that there is a new persistent task is running in the system. + * 2. The master node updates the {@link org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData} in the cluster state to + * indicate that there is a new persistent task is running in the system. *

- * 3. The {@link org.elasticsearch.xpack.persistent.PersistentTasksNodeService} running on every node in the cluster monitors changes in - * the cluster state and starts execution of all new tasks assigned to the node it is running on. + * 3. The {@link org.elasticsearch.xpack.core.persistent.PersistentTasksNodeService} running on every node in the cluster monitors changes + * in the cluster state and starts execution of all new tasks assigned to the node it is running on. *

- * 4. If the task fails to start on the node, the {@link org.elasticsearch.xpack.persistent.PersistentTasksNodeService} uses the - * {@link org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData} to notify the - * {@link org.elasticsearch.xpack.persistent.PersistentTasksService}, which reassigns the action to another node in the cluster. + * 4. If the task fails to start on the node, the {@link org.elasticsearch.xpack.core.persistent.PersistentTasksNodeService} uses the + * {@link org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData} to notify the + * {@link org.elasticsearch.xpack.core.persistent.PersistentTasksService}, which reassigns the action to another node in the cluster. *

* 5. If a task finishes successfully on the node and calls listener.onResponse(), the corresponding persistent action is removed from the * cluster state unless removeOnCompletion flag for this task is set to false. *

- * 6. The {@link org.elasticsearch.xpack.persistent.RemovePersistentTaskAction} action can be also used to remove the persistent task. + * 6. The {@link org.elasticsearch.xpack.core.persistent.RemovePersistentTaskAction} action can be also used to remove the persistent task. */ -package org.elasticsearch.xpack.persistent; \ No newline at end of file + +package org.elasticsearch.xpack.core.persistent; \ No newline at end of file diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/rest/XPackRestHandler.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/rest/XPackRestHandler.java similarity index 91% rename from plugin/core/src/main/java/org/elasticsearch/xpack/rest/XPackRestHandler.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/rest/XPackRestHandler.java index 8c6a0a5442c..5ac0969624b 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/rest/XPackRestHandler.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/rest/XPackRestHandler.java @@ -3,13 +3,13 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.rest; +package org.elasticsearch.xpack.core.rest; import org.elasticsearch.client.node.NodeClient; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.rest.BaseRestHandler; import org.elasticsearch.rest.RestRequest; -import org.elasticsearch.xpack.XPackClient; +import org.elasticsearch.xpack.core.XPackClient; import java.io.IOException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/rest/action/RestXPackInfoAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/rest/action/RestXPackInfoAction.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/rest/action/RestXPackInfoAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/rest/action/RestXPackInfoAction.java index 818005095b5..e1c694742cb 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/rest/action/RestXPackInfoAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/rest/action/RestXPackInfoAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.rest.action; +package org.elasticsearch.xpack.core.rest.action; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentBuilder; @@ -13,9 +13,9 @@ import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.RestResponse; import org.elasticsearch.rest.action.RestBuilderListener; -import org.elasticsearch.xpack.XPackClient; -import org.elasticsearch.xpack.action.XPackInfoRequest; -import org.elasticsearch.xpack.rest.XPackRestHandler; +import org.elasticsearch.xpack.core.XPackClient; +import org.elasticsearch.xpack.core.action.XPackInfoRequest; +import org.elasticsearch.xpack.core.rest.XPackRestHandler; import java.io.IOException; import java.util.EnumSet; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/rest/action/RestXPackUsageAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/rest/action/RestXPackUsageAction.java similarity index 86% rename from plugin/core/src/main/java/org/elasticsearch/xpack/rest/action/RestXPackUsageAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/rest/action/RestXPackUsageAction.java index 4c2f03ac1ae..0f09f17dbb0 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/rest/action/RestXPackUsageAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/rest/action/RestXPackUsageAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.rest.action; +package org.elasticsearch.xpack.core.rest.action; import org.elasticsearch.action.support.master.MasterNodeRequest; import org.elasticsearch.common.settings.Settings; @@ -14,11 +14,11 @@ import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.RestResponse; import org.elasticsearch.rest.action.RestBuilderListener; -import org.elasticsearch.xpack.XPackClient; -import org.elasticsearch.xpack.XPackFeatureSet; -import org.elasticsearch.xpack.action.XPackUsageRequestBuilder; -import org.elasticsearch.xpack.action.XPackUsageResponse; -import org.elasticsearch.xpack.rest.XPackRestHandler; +import org.elasticsearch.xpack.core.XPackClient; +import org.elasticsearch.xpack.core.XPackFeatureSet; +import org.elasticsearch.xpack.core.action.XPackUsageRequestBuilder; +import org.elasticsearch.xpack.core.action.XPackUsageResponse; +import org.elasticsearch.xpack.core.rest.XPackRestHandler; import java.io.IOException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/scheduler/SchedulerEngine.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/scheduler/SchedulerEngine.java similarity index 99% rename from plugin/core/src/main/java/org/elasticsearch/xpack/scheduler/SchedulerEngine.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/scheduler/SchedulerEngine.java index d77f583e045..ec9fd8ef1c7 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/scheduler/SchedulerEngine.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/scheduler/SchedulerEngine.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.scheduler; +package org.elasticsearch.xpack.core.scheduler; import org.elasticsearch.common.util.concurrent.ConcurrentCollections; import org.elasticsearch.common.util.concurrent.EsExecutors; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/ScrollHelper.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/ScrollHelper.java similarity index 99% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/ScrollHelper.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/ScrollHelper.java index 971c8600814..a70c6c2f9ff 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/ScrollHelper.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/ScrollHelper.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security; +package org.elasticsearch.xpack.core.security; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.search.ClearScrollRequest; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/SecurityContext.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/SecurityContext.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/SecurityContext.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/SecurityContext.java index b62bc136f81..1e0a85c454e 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/SecurityContext.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/SecurityContext.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security; +package org.elasticsearch.xpack.core.security; import org.apache.logging.log4j.Logger; import org.elasticsearch.Version; @@ -12,8 +12,8 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.common.util.concurrent.ThreadContext.StoredContext; import org.elasticsearch.node.Node; -import org.elasticsearch.xpack.security.authc.Authentication; -import org.elasticsearch.xpack.security.user.User; +import org.elasticsearch.xpack.core.security.authc.Authentication; +import org.elasticsearch.xpack.core.security.user.User; import java.io.IOException; import java.util.Objects; @@ -63,7 +63,7 @@ public class SecurityContext { * Sets the user forcefully to the provided user. There must not be an existing user in the ThreadContext otherwise an exception * will be thrown. This method is package private for testing. */ - void setUser(User user, Version version) { + public void setUser(User user, Version version) { Objects.requireNonNull(user); final Authentication.RealmRef authenticatedBy = new Authentication.RealmRef("__attach", "__attach", nodeName); final Authentication.RealmRef lookedUpBy; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/SecurityFeatureSetUsage.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/SecurityFeatureSetUsage.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/SecurityFeatureSetUsage.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/SecurityFeatureSetUsage.java index 92615b2e8c8..b549cffc0cc 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/SecurityFeatureSetUsage.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/SecurityFeatureSetUsage.java @@ -3,14 +3,14 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security; +package org.elasticsearch.xpack.core.security; import org.elasticsearch.Version; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.XPackFeatureSet; -import org.elasticsearch.xpack.XPackField; +import org.elasticsearch.xpack.core.XPackFeatureSet; +import org.elasticsearch.xpack.core.XPackField; import java.io.IOException; import java.util.Collections; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/SecurityField.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/SecurityField.java similarity index 90% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/SecurityField.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/SecurityField.java index 8e2a3050571..8d813925e33 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/SecurityField.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/SecurityField.java @@ -3,10 +3,10 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security; +package org.elasticsearch.xpack.core.security; import org.elasticsearch.common.settings.Setting; -import org.elasticsearch.xpack.XPackField; +import org.elasticsearch.xpack.core.XPackField; import java.util.Optional; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/SecurityLifecycleServiceField.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/SecurityLifecycleServiceField.java similarity index 90% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/SecurityLifecycleServiceField.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/SecurityLifecycleServiceField.java index 88a981e7454..8e3cc23d803 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/SecurityLifecycleServiceField.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/SecurityLifecycleServiceField.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security; +package org.elasticsearch.xpack.core.security; public final class SecurityLifecycleServiceField { public static final String SECURITY_TEMPLATE_NAME = "security-index-template"; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/SecuritySettings.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/SecuritySettings.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/SecuritySettings.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/SecuritySettings.java index 5a4334bed65..c48245c054f 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/SecuritySettings.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/SecuritySettings.java @@ -3,13 +3,13 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security; +package org.elasticsearch.xpack.core.security; import org.elasticsearch.common.network.NetworkModule; import org.elasticsearch.common.settings.SecureString; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.concurrent.ThreadContext; -import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken; +import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; import java.util.Optional; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/UserSettings.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/UserSettings.java similarity index 90% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/UserSettings.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/UserSettings.java index b582f22fe0d..4969c6d6dac 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/UserSettings.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/UserSettings.java @@ -3,14 +3,14 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security; +package org.elasticsearch.xpack.core.security; import org.apache.logging.log4j.Logger; import org.elasticsearch.common.logging.ServerLoggers; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.concurrent.ThreadContext; -import org.elasticsearch.xpack.security.authc.Authentication; -import org.elasticsearch.xpack.security.user.User; +import org.elasticsearch.xpack.core.security.authc.Authentication; +import org.elasticsearch.xpack.core.security.user.User; import java.io.IOException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/realm/ClearRealmCacheAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/realm/ClearRealmCacheAction.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/realm/ClearRealmCacheAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/realm/ClearRealmCacheAction.java index 28ef355eab6..83e0334bc0b 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/realm/ClearRealmCacheAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/realm/ClearRealmCacheAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.realm; +package org.elasticsearch.xpack.core.security.action.realm; import org.elasticsearch.action.Action; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/realm/ClearRealmCacheRequest.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/realm/ClearRealmCacheRequest.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/realm/ClearRealmCacheRequest.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/realm/ClearRealmCacheRequest.java index f1cb6bf8bd0..3d7436b9616 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/realm/ClearRealmCacheRequest.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/realm/ClearRealmCacheRequest.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.realm; +package org.elasticsearch.xpack.core.security.action.realm; import org.elasticsearch.action.support.nodes.BaseNodeRequest; import org.elasticsearch.action.support.nodes.BaseNodesRequest; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/realm/ClearRealmCacheRequestBuilder.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/realm/ClearRealmCacheRequestBuilder.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/realm/ClearRealmCacheRequestBuilder.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/realm/ClearRealmCacheRequestBuilder.java index 28021076f22..ae97c4037c4 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/realm/ClearRealmCacheRequestBuilder.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/realm/ClearRealmCacheRequestBuilder.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.realm; +package org.elasticsearch.xpack.core.security.action.realm; import org.elasticsearch.action.support.nodes.NodesOperationRequestBuilder; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/realm/ClearRealmCacheResponse.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/realm/ClearRealmCacheResponse.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/realm/ClearRealmCacheResponse.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/realm/ClearRealmCacheResponse.java index 5dd84c79c9b..1eef39ccbb9 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/realm/ClearRealmCacheResponse.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/realm/ClearRealmCacheResponse.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.realm; +package org.elasticsearch.xpack.core.security.action.realm; import org.elasticsearch.action.FailedNodeException; import org.elasticsearch.action.support.nodes.BaseNodeResponse; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/role/ClearRolesCacheAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/ClearRolesCacheAction.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/role/ClearRolesCacheAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/ClearRolesCacheAction.java index 99729719fd3..68a385f2dfa 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/role/ClearRolesCacheAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/ClearRolesCacheAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.role; +package org.elasticsearch.xpack.core.security.action.role; import org.elasticsearch.action.Action; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/role/ClearRolesCacheRequest.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/ClearRolesCacheRequest.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/role/ClearRolesCacheRequest.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/ClearRolesCacheRequest.java index 4dea7eda181..bb0bb293a88 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/role/ClearRolesCacheRequest.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/ClearRolesCacheRequest.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.role; +package org.elasticsearch.xpack.core.security.action.role; import org.elasticsearch.action.support.nodes.BaseNodeRequest; import org.elasticsearch.action.support.nodes.BaseNodesRequest; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/role/ClearRolesCacheRequestBuilder.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/ClearRolesCacheRequestBuilder.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/role/ClearRolesCacheRequestBuilder.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/ClearRolesCacheRequestBuilder.java index d3799fb3d89..3fa4933f0fb 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/role/ClearRolesCacheRequestBuilder.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/ClearRolesCacheRequestBuilder.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.role; +package org.elasticsearch.xpack.core.security.action.role; import org.elasticsearch.action.support.nodes.NodesOperationRequestBuilder; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/role/ClearRolesCacheResponse.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/ClearRolesCacheResponse.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/role/ClearRolesCacheResponse.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/ClearRolesCacheResponse.java index 411a9465347..3376b40dd8d 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/role/ClearRolesCacheResponse.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/ClearRolesCacheResponse.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.role; +package org.elasticsearch.xpack.core.security.action.role; import org.elasticsearch.action.FailedNodeException; import org.elasticsearch.action.support.nodes.BaseNodeResponse; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/role/DeleteRoleAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/DeleteRoleAction.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/role/DeleteRoleAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/DeleteRoleAction.java index f5cc7decfa3..f7148411c9d 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/role/DeleteRoleAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/DeleteRoleAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.role; +package org.elasticsearch.xpack.core.security.action.role; import org.elasticsearch.action.Action; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/role/DeleteRoleRequest.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/DeleteRoleRequest.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/role/DeleteRoleRequest.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/DeleteRoleRequest.java index 05b8f28fca9..ff4d416e200 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/role/DeleteRoleRequest.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/DeleteRoleRequest.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.role; +package org.elasticsearch.xpack.core.security.action.role; import org.elasticsearch.action.ActionRequest; import org.elasticsearch.action.ActionRequestValidationException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/role/DeleteRoleRequestBuilder.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/DeleteRoleRequestBuilder.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/role/DeleteRoleRequestBuilder.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/DeleteRoleRequestBuilder.java index 77fe219c463..ef1fab2d8e6 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/role/DeleteRoleRequestBuilder.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/DeleteRoleRequestBuilder.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.role; +package org.elasticsearch.xpack.core.security.action.role; import org.elasticsearch.action.ActionRequestBuilder; import org.elasticsearch.action.support.WriteRequestBuilder; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/role/DeleteRoleResponse.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/DeleteRoleResponse.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/role/DeleteRoleResponse.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/DeleteRoleResponse.java index 0269d6cbf80..33314eb0869 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/role/DeleteRoleResponse.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/DeleteRoleResponse.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.role; +package org.elasticsearch.xpack.core.security.action.role; import org.elasticsearch.action.ActionResponse; import org.elasticsearch.common.io.stream.StreamInput; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/role/GetRolesAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/GetRolesAction.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/role/GetRolesAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/GetRolesAction.java index 89ff1d8e8d7..aa770ba160b 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/role/GetRolesAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/GetRolesAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.role; +package org.elasticsearch.xpack.core.security.action.role; import org.elasticsearch.action.Action; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/role/GetRolesRequest.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/GetRolesRequest.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/role/GetRolesRequest.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/GetRolesRequest.java index cb9223d31b7..25851be2f01 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/role/GetRolesRequest.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/GetRolesRequest.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.role; +package org.elasticsearch.xpack.core.security.action.role; import org.elasticsearch.action.ActionRequest; import org.elasticsearch.action.ActionRequestValidationException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/role/GetRolesRequestBuilder.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/GetRolesRequestBuilder.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/role/GetRolesRequestBuilder.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/GetRolesRequestBuilder.java index 94e4734435e..f6308746092 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/role/GetRolesRequestBuilder.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/GetRolesRequestBuilder.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.role; +package org.elasticsearch.xpack.core.security.action.role; import org.elasticsearch.action.ActionRequestBuilder; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/role/GetRolesResponse.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/GetRolesResponse.java similarity index 91% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/role/GetRolesResponse.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/GetRolesResponse.java index 41e254f5c15..93c9d6bca9b 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/role/GetRolesResponse.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/GetRolesResponse.java @@ -3,12 +3,12 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.role; +package org.elasticsearch.xpack.core.security.action.role; import org.elasticsearch.action.ActionResponse; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.xpack.security.authz.RoleDescriptor; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor; import java.io.IOException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/role/PutRoleAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/PutRoleAction.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/role/PutRoleAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/PutRoleAction.java index e80353983d2..8a7461eaeff 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/role/PutRoleAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/PutRoleAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.role; +package org.elasticsearch.xpack.core.security.action.role; import org.elasticsearch.action.Action; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/role/PutRoleRequest.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/PutRoleRequest.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/role/PutRoleRequest.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/PutRoleRequest.java index dbe389a4719..d0f3423fdcf 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/role/PutRoleRequest.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/PutRoleRequest.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.role; +package org.elasticsearch.xpack.core.security.action.role; import org.elasticsearch.action.ActionRequest; import org.elasticsearch.action.ActionRequestValidationException; @@ -13,8 +13,8 @@ import org.elasticsearch.common.Strings; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.xpack.security.authz.RoleDescriptor; -import org.elasticsearch.xpack.security.support.MetadataUtils; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor; +import org.elasticsearch.xpack.core.security.support.MetadataUtils; import java.io.IOException; import java.util.ArrayList; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/role/PutRoleRequestBuilder.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/PutRoleRequestBuilder.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/role/PutRoleRequestBuilder.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/PutRoleRequestBuilder.java index 8b9901e99b0..79142a7b575 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/role/PutRoleRequestBuilder.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/PutRoleRequestBuilder.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.role; +package org.elasticsearch.xpack.core.security.action.role; import org.elasticsearch.action.ActionRequestBuilder; import org.elasticsearch.action.support.WriteRequestBuilder; @@ -11,7 +11,7 @@ import org.elasticsearch.client.ElasticsearchClient; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.xpack.security.authz.RoleDescriptor; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor; import java.io.IOException; import java.util.Map; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/role/PutRoleResponse.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/PutRoleResponse.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/role/PutRoleResponse.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/PutRoleResponse.java index 46d6bdb6150..98115bfd366 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/role/PutRoleResponse.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/PutRoleResponse.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.role; +package org.elasticsearch.xpack.core.security.action.role; import org.elasticsearch.action.ActionResponse; import org.elasticsearch.common.io.stream.StreamInput; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/DeleteRoleMappingAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/rolemapping/DeleteRoleMappingAction.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/DeleteRoleMappingAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/rolemapping/DeleteRoleMappingAction.java index b370df618d2..79e99f38434 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/DeleteRoleMappingAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/rolemapping/DeleteRoleMappingAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.rolemapping; +package org.elasticsearch.xpack.core.security.action.rolemapping; import org.elasticsearch.action.Action; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/DeleteRoleMappingRequest.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/rolemapping/DeleteRoleMappingRequest.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/DeleteRoleMappingRequest.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/rolemapping/DeleteRoleMappingRequest.java index 0665b1ea4c2..9d3e1758026 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/DeleteRoleMappingRequest.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/rolemapping/DeleteRoleMappingRequest.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.rolemapping; +package org.elasticsearch.xpack.core.security.action.rolemapping; import java.io.IOException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/DeleteRoleMappingRequestBuilder.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/rolemapping/DeleteRoleMappingRequestBuilder.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/DeleteRoleMappingRequestBuilder.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/rolemapping/DeleteRoleMappingRequestBuilder.java index 651b3c883d5..106e3589601 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/DeleteRoleMappingRequestBuilder.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/rolemapping/DeleteRoleMappingRequestBuilder.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.rolemapping; +package org.elasticsearch.xpack.core.security.action.rolemapping; import org.elasticsearch.action.ActionRequestBuilder; import org.elasticsearch.action.support.WriteRequestBuilder; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/DeleteRoleMappingResponse.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/rolemapping/DeleteRoleMappingResponse.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/DeleteRoleMappingResponse.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/rolemapping/DeleteRoleMappingResponse.java index 572eec59502..af470c6c821 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/DeleteRoleMappingResponse.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/rolemapping/DeleteRoleMappingResponse.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.rolemapping; +package org.elasticsearch.xpack.core.security.action.rolemapping; import java.io.IOException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/GetRoleMappingsAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/rolemapping/GetRoleMappingsAction.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/GetRoleMappingsAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/rolemapping/GetRoleMappingsAction.java index 544240e3c30..49ada117ae6 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/GetRoleMappingsAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/rolemapping/GetRoleMappingsAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.rolemapping; +package org.elasticsearch.xpack.core.security.action.rolemapping; import org.elasticsearch.action.Action; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/GetRoleMappingsRequest.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/rolemapping/GetRoleMappingsRequest.java similarity index 90% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/GetRoleMappingsRequest.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/rolemapping/GetRoleMappingsRequest.java index ba39d141b39..ff59aa8482d 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/GetRoleMappingsRequest.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/rolemapping/GetRoleMappingsRequest.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.rolemapping; +package org.elasticsearch.xpack.core.security.action.rolemapping; import java.io.IOException; @@ -12,6 +12,7 @@ import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.common.Strings; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; +import org.elasticsearch.xpack.core.security.authc.support.mapper.ExpressionRoleMapping; import static org.elasticsearch.action.ValidateActions.addValidationError; @@ -39,7 +40,7 @@ public class GetRoleMappingsRequest extends ActionRequest { /** * Specify (by name) which role-mappings to delete. - * @see org.elasticsearch.xpack.security.authc.support.mapper.ExpressionRoleMapping#getName() + * @see ExpressionRoleMapping#getName() */ public void setNames(String... names) { this.names = names; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/GetRoleMappingsRequestBuilder.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/rolemapping/GetRoleMappingsRequestBuilder.java similarity index 93% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/GetRoleMappingsRequestBuilder.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/rolemapping/GetRoleMappingsRequestBuilder.java index f563e5df423..1beaed5d4ae 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/GetRoleMappingsRequestBuilder.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/rolemapping/GetRoleMappingsRequestBuilder.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.rolemapping; +package org.elasticsearch.xpack.core.security.action.rolemapping; import org.elasticsearch.action.ActionRequestBuilder; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/GetRoleMappingsResponse.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/rolemapping/GetRoleMappingsResponse.java similarity index 90% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/GetRoleMappingsResponse.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/rolemapping/GetRoleMappingsResponse.java index fde9500e003..738dfa65aaa 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/GetRoleMappingsResponse.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/rolemapping/GetRoleMappingsResponse.java @@ -3,14 +3,14 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.rolemapping; +package org.elasticsearch.xpack.core.security.action.rolemapping; import java.io.IOException; import org.elasticsearch.action.ActionResponse; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.xpack.security.authc.support.mapper.ExpressionRoleMapping; +import org.elasticsearch.xpack.core.security.authc.support.mapper.ExpressionRoleMapping; /** * Response to {@link GetRoleMappingsAction get role-mappings API}. diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/PutRoleMappingAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/rolemapping/PutRoleMappingAction.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/PutRoleMappingAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/rolemapping/PutRoleMappingAction.java index 6c1fd8a7433..4e9b427c63a 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/PutRoleMappingAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/rolemapping/PutRoleMappingAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.rolemapping; +package org.elasticsearch.xpack.core.security.action.rolemapping; import org.elasticsearch.action.Action; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/PutRoleMappingRequest.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/rolemapping/PutRoleMappingRequest.java similarity index 91% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/PutRoleMappingRequest.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/rolemapping/PutRoleMappingRequest.java index 35b1cdd85c1..0f876f64453 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/PutRoleMappingRequest.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/rolemapping/PutRoleMappingRequest.java @@ -3,7 +3,17 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.rolemapping; +package org.elasticsearch.xpack.core.security.action.rolemapping; + +import org.elasticsearch.action.ActionRequest; +import org.elasticsearch.action.ActionRequestValidationException; +import org.elasticsearch.action.support.WriteRequest; +import org.elasticsearch.common.io.stream.StreamInput; +import org.elasticsearch.common.io.stream.StreamOutput; +import org.elasticsearch.xpack.core.security.authc.support.mapper.ExpressionRoleMapping; +import org.elasticsearch.xpack.core.security.authc.support.mapper.expressiondsl.ExpressionParser; +import org.elasticsearch.xpack.core.security.authc.support.mapper.expressiondsl.RoleMapperExpression; +import org.elasticsearch.xpack.core.security.support.MetadataUtils; import java.io.IOException; import java.util.ArrayList; @@ -12,16 +22,6 @@ import java.util.List; import java.util.Map; import java.util.Objects; -import org.elasticsearch.action.ActionRequest; -import org.elasticsearch.action.ActionRequestValidationException; -import org.elasticsearch.action.support.WriteRequest; -import org.elasticsearch.common.io.stream.StreamInput; -import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.xpack.security.authc.support.mapper.ExpressionRoleMapping; -import org.elasticsearch.xpack.security.authc.support.mapper.expressiondsl.RoleMapperExpression; -import org.elasticsearch.xpack.security.authc.support.mapper.expressiondsl.ExpressionParser; -import org.elasticsearch.xpack.security.support.MetadataUtils; - import static org.elasticsearch.action.ValidateActions.addValidationError; /** diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/PutRoleMappingRequestBuilder.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/rolemapping/PutRoleMappingRequestBuilder.java similarity index 90% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/PutRoleMappingRequestBuilder.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/rolemapping/PutRoleMappingRequestBuilder.java index bbdd596284f..1054ab9daa0 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/PutRoleMappingRequestBuilder.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/rolemapping/PutRoleMappingRequestBuilder.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.rolemapping; +package org.elasticsearch.xpack.core.security.action.rolemapping; import java.io.IOException; import java.util.Arrays; @@ -14,8 +14,8 @@ import org.elasticsearch.action.support.WriteRequestBuilder; import org.elasticsearch.client.ElasticsearchClient; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.xpack.security.authc.support.mapper.ExpressionRoleMapping; -import org.elasticsearch.xpack.security.authc.support.mapper.expressiondsl.RoleMapperExpression; +import org.elasticsearch.xpack.core.security.authc.support.mapper.ExpressionRoleMapping; +import org.elasticsearch.xpack.core.security.authc.support.mapper.expressiondsl.RoleMapperExpression; /** * Builder for requests to add/update a role-mapping to the native store diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/PutRoleMappingResponse.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/rolemapping/PutRoleMappingResponse.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/PutRoleMappingResponse.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/rolemapping/PutRoleMappingResponse.java index 560e5fb9f18..eec74c6d61c 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/PutRoleMappingResponse.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/rolemapping/PutRoleMappingResponse.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.rolemapping; +package org.elasticsearch.xpack.core.security.action.rolemapping; import org.elasticsearch.action.ActionResponse; import org.elasticsearch.common.io.stream.StreamInput; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/saml/SamlAuthenticateAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/saml/SamlAuthenticateAction.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/saml/SamlAuthenticateAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/saml/SamlAuthenticateAction.java index 69cfb5ee7ef..51691629209 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/saml/SamlAuthenticateAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/saml/SamlAuthenticateAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.saml; +package org.elasticsearch.xpack.core.security.action.saml; import org.elasticsearch.action.Action; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/saml/SamlAuthenticateRequest.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/saml/SamlAuthenticateRequest.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/saml/SamlAuthenticateRequest.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/saml/SamlAuthenticateRequest.java index 144481b1994..0d6d0f44c71 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/saml/SamlAuthenticateRequest.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/saml/SamlAuthenticateRequest.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.saml; +package org.elasticsearch.xpack.core.security.action.saml; import java.util.List; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/saml/SamlAuthenticateRequestBuilder.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/saml/SamlAuthenticateRequestBuilder.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/saml/SamlAuthenticateRequestBuilder.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/saml/SamlAuthenticateRequestBuilder.java index 28a139b398e..8b8efb504c4 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/saml/SamlAuthenticateRequestBuilder.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/saml/SamlAuthenticateRequestBuilder.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.saml; +package org.elasticsearch.xpack.core.security.action.saml; import java.util.List; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/saml/SamlAuthenticateResponse.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/saml/SamlAuthenticateResponse.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/saml/SamlAuthenticateResponse.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/saml/SamlAuthenticateResponse.java index a5f67075099..3363d4a5137 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/saml/SamlAuthenticateResponse.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/saml/SamlAuthenticateResponse.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.saml; +package org.elasticsearch.xpack.core.security.action.saml; import java.io.IOException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/saml/SamlInvalidateSessionAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/saml/SamlInvalidateSessionAction.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/saml/SamlInvalidateSessionAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/saml/SamlInvalidateSessionAction.java index f59ae98b140..c9bbf3a6671 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/saml/SamlInvalidateSessionAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/saml/SamlInvalidateSessionAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.saml; +package org.elasticsearch.xpack.core.security.action.saml; import org.elasticsearch.action.Action; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/saml/SamlInvalidateSessionRequest.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/saml/SamlInvalidateSessionRequest.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/saml/SamlInvalidateSessionRequest.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/saml/SamlInvalidateSessionRequest.java index 57612a2b035..b2b49db838f 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/saml/SamlInvalidateSessionRequest.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/saml/SamlInvalidateSessionRequest.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.saml; +package org.elasticsearch.xpack.core.security.action.saml; import org.elasticsearch.action.ActionRequest; import org.elasticsearch.action.ActionRequestValidationException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/saml/SamlInvalidateSessionRequestBuilder.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/saml/SamlInvalidateSessionRequestBuilder.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/saml/SamlInvalidateSessionRequestBuilder.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/saml/SamlInvalidateSessionRequestBuilder.java index 181aa5975a5..0d9b26a7b65 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/saml/SamlInvalidateSessionRequestBuilder.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/saml/SamlInvalidateSessionRequestBuilder.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.saml; +package org.elasticsearch.xpack.core.security.action.saml; import org.elasticsearch.action.ActionRequestBuilder; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/saml/SamlInvalidateSessionResponse.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/saml/SamlInvalidateSessionResponse.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/saml/SamlInvalidateSessionResponse.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/saml/SamlInvalidateSessionResponse.java index 511a6400265..7b90071ec6c 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/saml/SamlInvalidateSessionResponse.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/saml/SamlInvalidateSessionResponse.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.saml; +package org.elasticsearch.xpack.core.security.action.saml; import java.io.IOException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/saml/SamlLogoutAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/saml/SamlLogoutAction.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/saml/SamlLogoutAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/saml/SamlLogoutAction.java index d8806da1f05..bc7b0ed257d 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/saml/SamlLogoutAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/saml/SamlLogoutAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.saml; +package org.elasticsearch.xpack.core.security.action.saml; import org.elasticsearch.action.Action; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/saml/SamlLogoutRequest.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/saml/SamlLogoutRequest.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/saml/SamlLogoutRequest.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/saml/SamlLogoutRequest.java index a38752a346c..45088fdd3d9 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/saml/SamlLogoutRequest.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/saml/SamlLogoutRequest.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.saml; +package org.elasticsearch.xpack.core.security.action.saml; import org.elasticsearch.action.ActionRequest; import org.elasticsearch.action.ActionRequestValidationException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/saml/SamlLogoutRequestBuilder.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/saml/SamlLogoutRequestBuilder.java similarity index 93% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/saml/SamlLogoutRequestBuilder.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/saml/SamlLogoutRequestBuilder.java index e0c8f183b0e..8d920a0368f 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/saml/SamlLogoutRequestBuilder.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/saml/SamlLogoutRequestBuilder.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.saml; +package org.elasticsearch.xpack.core.security.action.saml; import org.elasticsearch.action.ActionRequestBuilder; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/saml/SamlLogoutResponse.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/saml/SamlLogoutResponse.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/saml/SamlLogoutResponse.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/saml/SamlLogoutResponse.java index e9966b1b7ee..2770b7925bd 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/saml/SamlLogoutResponse.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/saml/SamlLogoutResponse.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.saml; +package org.elasticsearch.xpack.core.security.action.saml; import java.io.IOException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/saml/SamlPrepareAuthenticationAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/saml/SamlPrepareAuthenticationAction.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/saml/SamlPrepareAuthenticationAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/saml/SamlPrepareAuthenticationAction.java index 3aa8b582c48..bbc4cdbd7fd 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/saml/SamlPrepareAuthenticationAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/saml/SamlPrepareAuthenticationAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.saml; +package org.elasticsearch.xpack.core.security.action.saml; import org.elasticsearch.action.Action; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/saml/SamlPrepareAuthenticationRequest.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/saml/SamlPrepareAuthenticationRequest.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/saml/SamlPrepareAuthenticationRequest.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/saml/SamlPrepareAuthenticationRequest.java index dc0337fda63..bd1c59a48b4 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/saml/SamlPrepareAuthenticationRequest.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/saml/SamlPrepareAuthenticationRequest.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.saml; +package org.elasticsearch.xpack.core.security.action.saml; import java.io.IOException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/saml/SamlPrepareAuthenticationRequestBuilder.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/saml/SamlPrepareAuthenticationRequestBuilder.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/saml/SamlPrepareAuthenticationRequestBuilder.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/saml/SamlPrepareAuthenticationRequestBuilder.java index a9da3faeea2..7474557a76d 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/saml/SamlPrepareAuthenticationRequestBuilder.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/saml/SamlPrepareAuthenticationRequestBuilder.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.saml; +package org.elasticsearch.xpack.core.security.action.saml; import org.elasticsearch.action.ActionRequestBuilder; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/saml/SamlPrepareAuthenticationResponse.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/saml/SamlPrepareAuthenticationResponse.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/saml/SamlPrepareAuthenticationResponse.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/saml/SamlPrepareAuthenticationResponse.java index 8a960f21f62..d9ff6f68c6b 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/saml/SamlPrepareAuthenticationResponse.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/saml/SamlPrepareAuthenticationResponse.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.saml; +package org.elasticsearch.xpack.core.security.action.saml; import java.io.IOException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/token/CreateTokenAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/token/CreateTokenAction.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/token/CreateTokenAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/token/CreateTokenAction.java index 9eb72a09077..98a312b7fcc 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/token/CreateTokenAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/token/CreateTokenAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.token; +package org.elasticsearch.xpack.core.security.action.token; import org.elasticsearch.action.Action; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/token/CreateTokenRequest.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/token/CreateTokenRequest.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/token/CreateTokenRequest.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/token/CreateTokenRequest.java index bf33c43c3fe..aa28605d0fd 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/token/CreateTokenRequest.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/token/CreateTokenRequest.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.token; +package org.elasticsearch.xpack.core.security.action.token; import org.elasticsearch.Version; import org.elasticsearch.action.ActionRequest; @@ -15,7 +15,7 @@ import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.settings.SecureString; -import org.elasticsearch.xpack.security.authc.support.CharArrays; +import org.elasticsearch.xpack.core.security.authc.support.CharArrays; import java.io.IOException; import java.util.Arrays; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/token/CreateTokenRequestBuilder.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/token/CreateTokenRequestBuilder.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/token/CreateTokenRequestBuilder.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/token/CreateTokenRequestBuilder.java index ac7bdf9d8e7..314a0aaf4aa 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/token/CreateTokenRequestBuilder.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/token/CreateTokenRequestBuilder.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.token; +package org.elasticsearch.xpack.core.security.action.token; import org.elasticsearch.action.Action; import org.elasticsearch.action.ActionRequestBuilder; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/token/CreateTokenResponse.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/token/CreateTokenResponse.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/token/CreateTokenResponse.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/token/CreateTokenResponse.java index 0fe6d5f729c..7e887643a41 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/token/CreateTokenResponse.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/token/CreateTokenResponse.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.token; +package org.elasticsearch.xpack.core.security.action.token; import org.elasticsearch.Version; import org.elasticsearch.action.ActionResponse; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/token/InvalidateTokenAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/token/InvalidateTokenAction.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/token/InvalidateTokenAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/token/InvalidateTokenAction.java index 13952b1d524..5f199876d6a 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/token/InvalidateTokenAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/token/InvalidateTokenAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.token; +package org.elasticsearch.xpack.core.security.action.token; import org.elasticsearch.action.Action; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/token/InvalidateTokenRequest.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/token/InvalidateTokenRequest.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/token/InvalidateTokenRequest.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/token/InvalidateTokenRequest.java index b7f797fb038..8ad4f024eaf 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/token/InvalidateTokenRequest.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/token/InvalidateTokenRequest.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.token; +package org.elasticsearch.xpack.core.security.action.token; import org.elasticsearch.Version; import org.elasticsearch.action.ActionRequest; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/token/InvalidateTokenRequestBuilder.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/token/InvalidateTokenRequestBuilder.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/token/InvalidateTokenRequestBuilder.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/token/InvalidateTokenRequestBuilder.java index 71e2110b892..861757aff3c 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/token/InvalidateTokenRequestBuilder.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/token/InvalidateTokenRequestBuilder.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.token; +package org.elasticsearch.xpack.core.security.action.token; import org.elasticsearch.action.ActionRequestBuilder; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/token/InvalidateTokenResponse.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/token/InvalidateTokenResponse.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/token/InvalidateTokenResponse.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/token/InvalidateTokenResponse.java index 519d529a297..cebb005b272 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/token/InvalidateTokenResponse.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/token/InvalidateTokenResponse.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.token; +package org.elasticsearch.xpack.core.security.action.token; import org.elasticsearch.action.ActionResponse; import org.elasticsearch.common.io.stream.StreamInput; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/token/RefreshTokenAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/token/RefreshTokenAction.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/token/RefreshTokenAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/token/RefreshTokenAction.java index c6384950bca..a322f3fa847 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/token/RefreshTokenAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/token/RefreshTokenAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.token; +package org.elasticsearch.xpack.core.security.action.token; import org.elasticsearch.action.Action; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/AuthenticateAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/AuthenticateAction.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/AuthenticateAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/AuthenticateAction.java index e579628bab8..b109ae0861a 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/AuthenticateAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/AuthenticateAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.user; +package org.elasticsearch.xpack.core.security.action.user; import org.elasticsearch.action.Action; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/AuthenticateRequest.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/AuthenticateRequest.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/AuthenticateRequest.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/AuthenticateRequest.java index 1b65cd1282d..1b1b5d8db6c 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/AuthenticateRequest.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/AuthenticateRequest.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.user; +package org.elasticsearch.xpack.core.security.action.user; import org.elasticsearch.action.ActionRequest; import org.elasticsearch.action.ActionRequestValidationException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/AuthenticateRequestBuilder.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/AuthenticateRequestBuilder.java similarity index 93% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/AuthenticateRequestBuilder.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/AuthenticateRequestBuilder.java index 98b0a52d78d..da3ce7956b8 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/AuthenticateRequestBuilder.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/AuthenticateRequestBuilder.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.user; +package org.elasticsearch.xpack.core.security.action.user; import org.elasticsearch.action.ActionRequestBuilder; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/AuthenticateResponse.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/AuthenticateResponse.java similarity index 89% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/AuthenticateResponse.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/AuthenticateResponse.java index 5c18193f7bd..0cf7ace1103 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/AuthenticateResponse.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/AuthenticateResponse.java @@ -3,12 +3,12 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.user; +package org.elasticsearch.xpack.core.security.action.user; import org.elasticsearch.action.ActionResponse; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.xpack.security.user.User; +import org.elasticsearch.xpack.core.security.user.User; import java.io.IOException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/ChangePasswordAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/ChangePasswordAction.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/ChangePasswordAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/ChangePasswordAction.java index 4bd43b1e4b7..44b31e3f3de 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/ChangePasswordAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/ChangePasswordAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.user; +package org.elasticsearch.xpack.core.security.action.user; import org.elasticsearch.action.Action; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/ChangePasswordRequest.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/ChangePasswordRequest.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/ChangePasswordRequest.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/ChangePasswordRequest.java index 289f3fe8a1d..f84b133d984 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/ChangePasswordRequest.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/ChangePasswordRequest.java @@ -3,17 +3,16 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.user; +package org.elasticsearch.xpack.core.security.action.user; import org.elasticsearch.action.ActionRequest; import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.action.support.WriteRequest; -import org.elasticsearch.action.support.WriteRequest.RefreshPolicy; import org.elasticsearch.common.bytes.BytesArray; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.xpack.security.authc.support.CharArrays; +import org.elasticsearch.xpack.core.security.authc.support.CharArrays; import java.io.IOException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/ChangePasswordRequestBuilder.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/ChangePasswordRequestBuilder.java similarity index 92% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/ChangePasswordRequestBuilder.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/ChangePasswordRequestBuilder.java index 93a32287d46..4b1550d1d79 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/ChangePasswordRequestBuilder.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/ChangePasswordRequestBuilder.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.user; +package org.elasticsearch.xpack.core.security.action.user; import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.action.ActionRequestBuilder; @@ -15,10 +15,10 @@ import org.elasticsearch.common.settings.SecureString; import org.elasticsearch.common.xcontent.NamedXContentRegistry; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.xpack.security.authc.support.Hasher; -import org.elasticsearch.xpack.security.support.Validation; -import org.elasticsearch.xpack.security.user.User; -import org.elasticsearch.xpack.security.common.xcontent.XContentUtils; +import org.elasticsearch.xpack.core.security.authc.support.Hasher; +import org.elasticsearch.xpack.core.security.support.Validation; +import org.elasticsearch.xpack.core.security.user.User; +import org.elasticsearch.xpack.core.security.xcontent.XContentUtils; import java.io.IOException; import java.nio.CharBuffer; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/ChangePasswordResponse.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/ChangePasswordResponse.java similarity index 87% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/ChangePasswordResponse.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/ChangePasswordResponse.java index 8e4b820da7a..4a1c5c33a6d 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/ChangePasswordResponse.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/ChangePasswordResponse.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.user; +package org.elasticsearch.xpack.core.security.action.user; import org.elasticsearch.action.ActionResponse; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/DeleteUserAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/DeleteUserAction.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/DeleteUserAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/DeleteUserAction.java index b1e6e9cd1c7..54f99f923db 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/DeleteUserAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/DeleteUserAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.user; +package org.elasticsearch.xpack.core.security.action.user; import org.elasticsearch.action.Action; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/DeleteUserRequest.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/DeleteUserRequest.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/DeleteUserRequest.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/DeleteUserRequest.java index 42d28606977..6587576b515 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/DeleteUserRequest.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/DeleteUserRequest.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.user; +package org.elasticsearch.xpack.core.security.action.user; import org.elasticsearch.action.ActionRequest; import org.elasticsearch.action.ActionRequestValidationException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/DeleteUserRequestBuilder.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/DeleteUserRequestBuilder.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/DeleteUserRequestBuilder.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/DeleteUserRequestBuilder.java index 5d44cdb3418..1eecf5cf36b 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/DeleteUserRequestBuilder.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/DeleteUserRequestBuilder.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.user; +package org.elasticsearch.xpack.core.security.action.user; import org.elasticsearch.action.ActionRequestBuilder; import org.elasticsearch.action.support.WriteRequestBuilder; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/DeleteUserResponse.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/DeleteUserResponse.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/DeleteUserResponse.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/DeleteUserResponse.java index 6d9c175099a..8b668a9b97b 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/DeleteUserResponse.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/DeleteUserResponse.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.user; +package org.elasticsearch.xpack.core.security.action.user; import org.elasticsearch.action.ActionResponse; import org.elasticsearch.common.io.stream.StreamInput; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/GetUsersAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/GetUsersAction.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/GetUsersAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/GetUsersAction.java index bbf6f499a33..4b9bf56fb7b 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/GetUsersAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/GetUsersAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.user; +package org.elasticsearch.xpack.core.security.action.user; import org.elasticsearch.action.Action; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/GetUsersRequest.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/GetUsersRequest.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/GetUsersRequest.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/GetUsersRequest.java index 608c9513a3e..3ed0f798b37 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/GetUsersRequest.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/GetUsersRequest.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.user; +package org.elasticsearch.xpack.core.security.action.user; import org.elasticsearch.action.ActionRequest; import org.elasticsearch.action.ActionRequestValidationException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/GetUsersRequestBuilder.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/GetUsersRequestBuilder.java similarity index 93% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/GetUsersRequestBuilder.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/GetUsersRequestBuilder.java index f5b6a080ffa..6226146dd7c 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/GetUsersRequestBuilder.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/GetUsersRequestBuilder.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.user; +package org.elasticsearch.xpack.core.security.action.user; import org.elasticsearch.action.ActionRequestBuilder; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/GetUsersResponse.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/GetUsersResponse.java similarity index 93% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/GetUsersResponse.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/GetUsersResponse.java index 7b63e3b8b8b..666b79cfe5d 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/GetUsersResponse.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/GetUsersResponse.java @@ -3,12 +3,12 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.user; +package org.elasticsearch.xpack.core.security.action.user; import org.elasticsearch.action.ActionResponse; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.xpack.security.user.User; +import org.elasticsearch.xpack.core.security.user.User; import java.io.IOException; import java.util.Collection; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/HasPrivilegesAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/HasPrivilegesAction.java similarity index 85% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/HasPrivilegesAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/HasPrivilegesAction.java index 54add1cf79c..5df11a349a7 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/HasPrivilegesAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/HasPrivilegesAction.java @@ -3,14 +3,15 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.user; +package org.elasticsearch.xpack.core.security.action.user; import org.elasticsearch.action.Action; import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor; /** * This action is testing whether a user has the specified - * {@link org.elasticsearch.xpack.security.authz.RoleDescriptor.IndicesPrivileges privileges} + * {@link RoleDescriptor.IndicesPrivileges privileges} */ public class HasPrivilegesAction extends Action { diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/HasPrivilegesRequest.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/HasPrivilegesRequest.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/HasPrivilegesRequest.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/HasPrivilegesRequest.java index d39a20211e9..101ae00d635 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/HasPrivilegesRequest.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/HasPrivilegesRequest.java @@ -3,15 +3,15 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.user; - -import java.io.IOException; +package org.elasticsearch.xpack.core.security.action.user; import org.elasticsearch.action.ActionRequest; import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.xpack.security.authz.RoleDescriptor; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor; + +import java.io.IOException; import static org.elasticsearch.action.ValidateActions.addValidationError; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/HasPrivilegesRequestBuilder.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/HasPrivilegesRequestBuilder.java similarity index 89% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/HasPrivilegesRequestBuilder.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/HasPrivilegesRequestBuilder.java index 5d648d0e518..2bf2bdb4d87 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/HasPrivilegesRequestBuilder.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/HasPrivilegesRequestBuilder.java @@ -3,16 +3,15 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.user; - -import java.io.IOException; +package org.elasticsearch.xpack.core.security.action.user; import org.elasticsearch.action.ActionRequestBuilder; import org.elasticsearch.client.ElasticsearchClient; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.xpack.security.authz.RoleDescriptor; -import org.elasticsearch.xpack.security.authz.RoleDescriptor.IndicesPrivileges; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor; + +import java.io.IOException; /** * Request builder for checking a user's privileges diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/HasPrivilegesResponse.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/HasPrivilegesResponse.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/HasPrivilegesResponse.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/HasPrivilegesResponse.java index dd203cf7631..dcc34d75ddb 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/HasPrivilegesResponse.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/HasPrivilegesResponse.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.user; +package org.elasticsearch.xpack.core.security.action.user; import java.io.IOException; import java.util.ArrayList; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/PutUserAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/PutUserAction.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/PutUserAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/PutUserAction.java index 29d2cebbfa7..377fb57d007 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/PutUserAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/PutUserAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.user; +package org.elasticsearch.xpack.core.security.action.user; import org.elasticsearch.action.Action; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/PutUserRequest.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/PutUserRequest.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/PutUserRequest.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/PutUserRequest.java index 702e742963a..c018ad5f73e 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/PutUserRequest.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/PutUserRequest.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.user; +package org.elasticsearch.xpack.core.security.action.user; import org.elasticsearch.action.ActionRequest; import org.elasticsearch.action.ActionRequestValidationException; @@ -14,9 +14,9 @@ import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.xpack.security.authc.support.CharArrays; -import org.elasticsearch.xpack.security.support.MetadataUtils; -import org.elasticsearch.xpack.security.support.Validation; +import org.elasticsearch.xpack.core.security.authc.support.CharArrays; +import org.elasticsearch.xpack.core.security.support.MetadataUtils; +import org.elasticsearch.xpack.core.security.support.Validation; import java.io.IOException; import java.util.Map; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/PutUserRequestBuilder.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/PutUserRequestBuilder.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/PutUserRequestBuilder.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/PutUserRequestBuilder.java index 2af4cf1a61a..6b5d9ca1537 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/PutUserRequestBuilder.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/PutUserRequestBuilder.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.user; +package org.elasticsearch.xpack.core.security.action.user; import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.action.ActionRequestBuilder; @@ -18,10 +18,10 @@ import org.elasticsearch.common.xcontent.NamedXContentRegistry; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentParser.Token; import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.xpack.security.authc.support.Hasher; -import org.elasticsearch.xpack.security.support.Validation; -import org.elasticsearch.xpack.security.user.User; -import org.elasticsearch.xpack.security.common.xcontent.XContentUtils; +import org.elasticsearch.xpack.core.security.authc.support.Hasher; +import org.elasticsearch.xpack.core.security.support.Validation; +import org.elasticsearch.xpack.core.security.user.User; +import org.elasticsearch.xpack.core.security.xcontent.XContentUtils; import java.io.IOException; import java.util.Arrays; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/PutUserResponse.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/PutUserResponse.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/PutUserResponse.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/PutUserResponse.java index 690311cc4fc..30d15e5a3fd 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/PutUserResponse.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/PutUserResponse.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.user; +package org.elasticsearch.xpack.core.security.action.user; import org.elasticsearch.action.ActionResponse; import org.elasticsearch.common.io.stream.StreamInput; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/SetEnabledAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/SetEnabledAction.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/SetEnabledAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/SetEnabledAction.java index c579b769e85..53bb5463c91 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/SetEnabledAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/SetEnabledAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.user; +package org.elasticsearch.xpack.core.security.action.user; import org.elasticsearch.action.Action; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/SetEnabledRequest.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/SetEnabledRequest.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/SetEnabledRequest.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/SetEnabledRequest.java index 266508df76f..664a46ae3e7 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/SetEnabledRequest.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/SetEnabledRequest.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.user; +package org.elasticsearch.xpack.core.security.action.user; import org.elasticsearch.action.ActionRequest; import org.elasticsearch.action.ActionRequestValidationException; @@ -11,8 +11,8 @@ import org.elasticsearch.action.support.WriteRequest; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.xpack.security.support.Validation.Error; -import org.elasticsearch.xpack.security.support.Validation.Users; +import org.elasticsearch.xpack.core.security.support.Validation.Error; +import org.elasticsearch.xpack.core.security.support.Validation.Users; import java.io.IOException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/SetEnabledRequestBuilder.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/SetEnabledRequestBuilder.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/SetEnabledRequestBuilder.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/SetEnabledRequestBuilder.java index 133069e2b31..2f4381ade11 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/SetEnabledRequestBuilder.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/SetEnabledRequestBuilder.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.user; +package org.elasticsearch.xpack.core.security.action.user; import org.elasticsearch.action.ActionRequestBuilder; import org.elasticsearch.action.support.WriteRequestBuilder; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/SetEnabledResponse.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/SetEnabledResponse.java similarity index 87% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/SetEnabledResponse.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/SetEnabledResponse.java index fe44f5f5197..72d1d16b82e 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/SetEnabledResponse.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/SetEnabledResponse.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.user; +package org.elasticsearch.xpack.core.security.action.user; import org.elasticsearch.action.ActionResponse; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/UserRequest.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/UserRequest.java similarity index 89% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/UserRequest.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/UserRequest.java index cec40bc48fc..fe2327805ea 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/action/user/UserRequest.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/UserRequest.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.action.user; +package org.elasticsearch.xpack.core.security.action.user; /** * Interface for requests that involve user operations diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/Authentication.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/Authentication.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/Authentication.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/Authentication.java index 7f543607613..2a2fdd95d61 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/Authentication.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/Authentication.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authc; +package org.elasticsearch.xpack.core.security.authc; import org.elasticsearch.Version; import org.elasticsearch.common.bytes.BytesReference; @@ -11,8 +11,8 @@ import org.elasticsearch.common.io.stream.BytesStreamOutput; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.util.concurrent.ThreadContext; -import org.elasticsearch.xpack.security.user.InternalUserSerializationHelper; -import org.elasticsearch.xpack.security.user.User; +import org.elasticsearch.xpack.core.security.user.InternalUserSerializationHelper; +import org.elasticsearch.xpack.core.security.user.User; import java.io.IOException; import java.util.Base64; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/AuthenticationFailureHandler.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/AuthenticationFailureHandler.java similarity index 99% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/AuthenticationFailureHandler.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/AuthenticationFailureHandler.java index bf6128e15e0..c3661966583 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/AuthenticationFailureHandler.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/AuthenticationFailureHandler.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authc; +package org.elasticsearch.xpack.core.security.authc; import org.elasticsearch.ElasticsearchSecurityException; import org.elasticsearch.common.util.concurrent.ThreadContext; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/AuthenticationField.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/AuthenticationField.java similarity index 88% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/AuthenticationField.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/AuthenticationField.java index b9769f5ba30..a53a58d637a 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/AuthenticationField.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/AuthenticationField.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authc; +package org.elasticsearch.xpack.core.security.authc; public final class AuthenticationField { diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/AuthenticationResult.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/AuthenticationResult.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/AuthenticationResult.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/AuthenticationResult.java index f76bffe2e15..2c61e32a0de 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/AuthenticationResult.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/AuthenticationResult.java @@ -3,12 +3,12 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authc; - -import java.util.Objects; +package org.elasticsearch.xpack.core.security.authc; import org.elasticsearch.common.inject.internal.Nullable; -import org.elasticsearch.xpack.security.user.User; +import org.elasticsearch.xpack.core.security.user.User; + +import java.util.Objects; /** * Represents the result of an authentication attempt. diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/AuthenticationServiceField.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/AuthenticationServiceField.java similarity index 83% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/AuthenticationServiceField.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/AuthenticationServiceField.java index 1c9e167deda..60921b68036 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/AuthenticationServiceField.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/AuthenticationServiceField.java @@ -3,11 +3,11 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authc; +package org.elasticsearch.xpack.core.security.authc; import org.elasticsearch.common.settings.Setting; -import static org.elasticsearch.xpack.security.SecurityField.setting; +import static org.elasticsearch.xpack.core.security.SecurityField.setting; public final class AuthenticationServiceField { diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/AuthenticationToken.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/AuthenticationToken.java similarity index 92% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/AuthenticationToken.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/AuthenticationToken.java index 2669e1c460d..f218d2f9567 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/AuthenticationToken.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/AuthenticationToken.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authc; +package org.elasticsearch.xpack.core.security.authc; /** * Interface for a token that is used for authentication. This token is the representation of the authentication diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/DefaultAuthenticationFailureHandler.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/DefaultAuthenticationFailureHandler.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/DefaultAuthenticationFailureHandler.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/DefaultAuthenticationFailureHandler.java index 9af11e1af80..8b31e77f9f8 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/DefaultAuthenticationFailureHandler.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/DefaultAuthenticationFailureHandler.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authc; +package org.elasticsearch.xpack.core.security.authc; import org.elasticsearch.ElasticsearchSecurityException; import org.elasticsearch.common.util.concurrent.ThreadContext; @@ -11,7 +11,7 @@ import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.transport.TransportMessage; -import static org.elasticsearch.xpack.security.support.Exceptions.authenticationError; +import static org.elasticsearch.xpack.core.security.support.Exceptions.authenticationError; /** * The default implementation of a {@link AuthenticationFailureHandler}. This handler will return an exception with a diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/InternalRealmsSettings.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/InternalRealmsSettings.java similarity index 77% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/InternalRealmsSettings.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/InternalRealmsSettings.java index a4d0233d9d4..0570a2bdad2 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/InternalRealmsSettings.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/InternalRealmsSettings.java @@ -3,14 +3,14 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authc; +package org.elasticsearch.xpack.core.security.authc; import org.elasticsearch.common.settings.Setting; -import org.elasticsearch.xpack.security.authc.esnative.NativeRealmSettings; -import org.elasticsearch.xpack.security.authc.file.FileRealmSettings; -import org.elasticsearch.xpack.security.authc.ldap.LdapRealmSettings; -import org.elasticsearch.xpack.security.authc.pki.PkiRealmSettings; -import org.elasticsearch.xpack.security.authc.saml.SamlRealmSettings; +import org.elasticsearch.xpack.core.security.authc.esnative.NativeRealmSettings; +import org.elasticsearch.xpack.core.security.authc.file.FileRealmSettings; +import org.elasticsearch.xpack.core.security.authc.ldap.LdapRealmSettings; +import org.elasticsearch.xpack.core.security.authc.pki.PkiRealmSettings; +import org.elasticsearch.xpack.core.security.authc.saml.SamlRealmSettings; import java.util.Collections; import java.util.HashMap; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/KeyAndTimestamp.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/KeyAndTimestamp.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/KeyAndTimestamp.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/KeyAndTimestamp.java index 6e3286e5f61..f7c79b21053 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/KeyAndTimestamp.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/KeyAndTimestamp.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authc; +package org.elasticsearch.xpack.core.security.authc; import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.UnicodeUtil; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/Realm.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/Realm.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/Realm.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/Realm.java index f24ce5e574f..234141c77c9 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/Realm.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/Realm.java @@ -3,15 +3,15 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authc; - -import java.util.HashMap; -import java.util.Map; +package org.elasticsearch.xpack.core.security.authc; import org.apache.logging.log4j.Logger; import org.elasticsearch.action.ActionListener; import org.elasticsearch.common.util.concurrent.ThreadContext; -import org.elasticsearch.xpack.security.user.User; +import org.elasticsearch.xpack.core.security.user.User; + +import java.util.HashMap; +import java.util.Map; /** * An authentication mechanism to which the default authentication org.elasticsearch.xpack.security.authc.AuthenticationService @@ -22,6 +22,11 @@ public abstract class Realm implements Comparable { protected final Logger logger; protected final String type; + + public String getType() { + return type; + } + protected RealmConfig config; public Realm(String type, RealmConfig config) { diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/RealmConfig.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/RealmConfig.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/RealmConfig.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/RealmConfig.java index 2d5f69bd4ab..db01711fb1f 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/RealmConfig.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/RealmConfig.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authc; +package org.elasticsearch.xpack.core.security.authc; import org.apache.logging.log4j.Logger; import org.elasticsearch.common.logging.ServerLoggers; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/RealmSettings.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/RealmSettings.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/RealmSettings.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/RealmSettings.java index 8708b8d1fcf..0cb55ccba7e 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/RealmSettings.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/RealmSettings.java @@ -3,7 +3,13 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authc; +package org.elasticsearch.xpack.core.security.authc; + +import org.elasticsearch.common.settings.AbstractScopedSettings; +import org.elasticsearch.common.settings.SecureSetting; +import org.elasticsearch.common.settings.Setting; +import org.elasticsearch.common.settings.Settings; +import org.elasticsearch.xpack.core.extensions.XPackExtension; import java.util.Collection; import java.util.HashMap; @@ -15,21 +21,15 @@ import java.util.function.Consumer; import java.util.function.Function; import java.util.stream.Collectors; -import org.elasticsearch.common.settings.AbstractScopedSettings; -import org.elasticsearch.common.settings.SecureSetting; -import org.elasticsearch.common.settings.Setting; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.xpack.extensions.XPackExtension; - import static org.elasticsearch.common.Strings.isNullOrEmpty; -import static org.elasticsearch.xpack.security.SecurityField.setting; +import static org.elasticsearch.xpack.core.security.SecurityField.setting; /** * Configures the {@link Setting#groupSetting(String, Consumer, Setting.Property...) group setting} for security * {@link Realm realms}, with validation according to the realm type. *

* The allowable settings for a given realm are dependent on the {@link Realm#type() realm type}, so it is not possible - * to simply provide a list of {@link Setting} objects and rely on the global setting validation (e.g. A custom realm-type might + * to simply provide a list of {@link Setting} objects and rely on the global setting vacomlidation (e.g. A custom realm-type might * define a setting with the same logical key as an internal realm-type, but a different data type). *

* Instead, realm configuration relies on the validator parameter to diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/TokenMetaData.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/TokenMetaData.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/TokenMetaData.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/TokenMetaData.java index 77e79d0ddab..3b8ea2910d1 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/TokenMetaData.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/TokenMetaData.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authc; +package org.elasticsearch.xpack.core.security.authc; import org.elasticsearch.Version; import org.elasticsearch.cluster.AbstractNamedDiffable; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/esnative/ClientReservedRealm.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/esnative/ClientReservedRealm.java similarity index 76% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/esnative/ClientReservedRealm.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/esnative/ClientReservedRealm.java index 4e5e72d0c3b..fe1ce45a567 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/esnative/ClientReservedRealm.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/esnative/ClientReservedRealm.java @@ -3,12 +3,12 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authc.esnative; +package org.elasticsearch.xpack.core.security.authc.esnative; import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.security.user.AnonymousUser; -import org.elasticsearch.xpack.security.user.UsernamesField; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.security.user.AnonymousUser; +import org.elasticsearch.xpack.core.security.user.UsernamesField; public class ClientReservedRealm { diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/esnative/NativeRealmSettings.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/esnative/NativeRealmSettings.java similarity index 80% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/esnative/NativeRealmSettings.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/esnative/NativeRealmSettings.java index 7865053983d..e41b1409981 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/esnative/NativeRealmSettings.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/esnative/NativeRealmSettings.java @@ -3,10 +3,10 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authc.esnative; +package org.elasticsearch.xpack.core.security.authc.esnative; import org.elasticsearch.common.settings.Setting; -import org.elasticsearch.xpack.security.authc.support.CachingUsernamePasswordRealmSettings; +import org.elasticsearch.xpack.core.security.authc.support.CachingUsernamePasswordRealmSettings; import java.util.Set; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/file/FileRealmSettings.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/file/FileRealmSettings.java similarity index 81% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/file/FileRealmSettings.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/file/FileRealmSettings.java index 9da479c018e..110b8af9d7b 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/file/FileRealmSettings.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/file/FileRealmSettings.java @@ -3,10 +3,10 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authc.file; +package org.elasticsearch.xpack.core.security.authc.file; import org.elasticsearch.common.settings.Setting; -import org.elasticsearch.xpack.security.authc.support.CachingUsernamePasswordRealmSettings; +import org.elasticsearch.xpack.core.security.authc.support.CachingUsernamePasswordRealmSettings; import java.util.Set; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectorySessionFactorySettings.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/ldap/ActiveDirectorySessionFactorySettings.java similarity index 64% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectorySessionFactorySettings.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/ldap/ActiveDirectorySessionFactorySettings.java index 0c9f1f6ad27..8574611cf7a 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectorySessionFactorySettings.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/ldap/ActiveDirectorySessionFactorySettings.java @@ -3,24 +3,24 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authc.ldap; +package org.elasticsearch.xpack.core.security.authc.ldap; import org.elasticsearch.common.settings.Setting; -import org.elasticsearch.xpack.security.authc.ldap.support.SessionFactorySettings; +import org.elasticsearch.xpack.core.security.authc.ldap.support.SessionFactorySettings; import java.util.HashSet; import java.util.Set; public final class ActiveDirectorySessionFactorySettings { - static final String AD_DOMAIN_NAME_SETTING = "domain_name"; - static final String AD_GROUP_SEARCH_BASEDN_SETTING = "group_search.base_dn"; - static final String AD_GROUP_SEARCH_SCOPE_SETTING = "group_search.scope"; - static final String AD_USER_SEARCH_BASEDN_SETTING = "user_search.base_dn"; - static final String AD_USER_SEARCH_FILTER_SETTING = "user_search.filter"; - static final String AD_UPN_USER_SEARCH_FILTER_SETTING = "user_search.upn_filter"; - static final String AD_DOWN_LEVEL_USER_SEARCH_FILTER_SETTING = "user_search.down_level_filter"; - static final String AD_USER_SEARCH_SCOPE_SETTING = "user_search.scope"; - static final Setting POOL_ENABLED = Setting.boolSetting("user_search.pool.enabled", + public static final String AD_DOMAIN_NAME_SETTING = "domain_name"; + public static final String AD_GROUP_SEARCH_BASEDN_SETTING = "group_search.base_dn"; + public static final String AD_GROUP_SEARCH_SCOPE_SETTING = "group_search.scope"; + public static final String AD_USER_SEARCH_BASEDN_SETTING = "user_search.base_dn"; + public static final String AD_USER_SEARCH_FILTER_SETTING = "user_search.filter"; + public static final String AD_UPN_USER_SEARCH_FILTER_SETTING = "user_search.upn_filter"; + public static final String AD_DOWN_LEVEL_USER_SEARCH_FILTER_SETTING = "user_search.down_level_filter"; + public static final String AD_USER_SEARCH_SCOPE_SETTING = "user_search.scope"; + public static final Setting POOL_ENABLED = Setting.boolSetting("user_search.pool.enabled", settings -> Boolean.toString(PoolingSessionFactorySettings.BIND_DN.exists(settings)), Setting.Property.NodeScope); private ActiveDirectorySessionFactorySettings() {} diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapRealmSettings.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/ldap/LdapRealmSettings.java similarity index 80% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapRealmSettings.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/ldap/LdapRealmSettings.java index cac8144b731..0bb9f195af7 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapRealmSettings.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/ldap/LdapRealmSettings.java @@ -3,13 +3,13 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authc.ldap; +package org.elasticsearch.xpack.core.security.authc.ldap; import org.elasticsearch.common.settings.Setting; import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.xpack.security.authc.ldap.support.LdapMetaDataResolverSettings; -import org.elasticsearch.xpack.security.authc.support.CachingUsernamePasswordRealmSettings; -import org.elasticsearch.xpack.security.authc.support.mapper.CompositeRoleMapperSettings; +import org.elasticsearch.xpack.core.security.authc.ldap.support.LdapMetaDataResolverSettings; +import org.elasticsearch.xpack.core.security.authc.support.CachingUsernamePasswordRealmSettings; +import org.elasticsearch.xpack.core.security.authc.support.mapper.CompositeRoleMapperSettings; import java.util.HashSet; import java.util.Set; @@ -17,7 +17,7 @@ import java.util.Set; public final class LdapRealmSettings { public static final String LDAP_TYPE = "ldap"; public static final String AD_TYPE = "active_directory"; - static final Setting EXECUTION_TIMEOUT = + public static final Setting EXECUTION_TIMEOUT = Setting.timeSetting("timeout.execution", TimeValue.timeValueSeconds(30L), Setting.Property.NodeScope); private LdapRealmSettings() {} diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapSessionFactorySettings.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/ldap/LdapSessionFactorySettings.java similarity index 86% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapSessionFactorySettings.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/ldap/LdapSessionFactorySettings.java index c5a0a973c46..4fb7e9a1d93 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapSessionFactorySettings.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/ldap/LdapSessionFactorySettings.java @@ -3,10 +3,10 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authc.ldap; +package org.elasticsearch.xpack.core.security.authc.ldap; import org.elasticsearch.common.settings.Setting; -import org.elasticsearch.xpack.security.authc.ldap.support.SessionFactorySettings; +import org.elasticsearch.xpack.core.security.authc.ldap.support.SessionFactorySettings; import java.util.Collections; import java.util.HashSet; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapUserSearchSessionFactorySettings.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/ldap/LdapUserSearchSessionFactorySettings.java similarity index 63% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapUserSearchSessionFactorySettings.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/ldap/LdapUserSearchSessionFactorySettings.java index 1e93e1f0f33..86f635e7427 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapUserSearchSessionFactorySettings.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/ldap/LdapUserSearchSessionFactorySettings.java @@ -3,25 +3,25 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authc.ldap; +package org.elasticsearch.xpack.core.security.authc.ldap; import org.elasticsearch.common.settings.Setting; -import org.elasticsearch.xpack.security.authc.ldap.support.LdapSearchScope; -import org.elasticsearch.xpack.security.authc.ldap.support.SessionFactorySettings; +import org.elasticsearch.xpack.core.security.authc.ldap.support.LdapSearchScope; +import org.elasticsearch.xpack.core.security.authc.ldap.support.SessionFactorySettings; import java.util.HashSet; import java.util.Set; import java.util.function.Function; public final class LdapUserSearchSessionFactorySettings { - static final Setting SEARCH_ATTRIBUTE = new Setting<>("user_search.attribute", + public static final Setting SEARCH_ATTRIBUTE = new Setting<>("user_search.attribute", LdapUserSearchSessionFactorySettings.DEFAULT_USERNAME_ATTRIBUTE, Function.identity(), Setting.Property.NodeScope, Setting.Property.Deprecated); - static final Setting SEARCH_BASE_DN = Setting.simpleString("user_search.base_dn", Setting.Property.NodeScope); - static final Setting SEARCH_FILTER = Setting.simpleString("user_search.filter", Setting.Property.NodeScope); - static final Setting SEARCH_SCOPE = new Setting<>("user_search.scope", (String) null, + public static final Setting SEARCH_BASE_DN = Setting.simpleString("user_search.base_dn", Setting.Property.NodeScope); + public static final Setting SEARCH_FILTER = Setting.simpleString("user_search.filter", Setting.Property.NodeScope); + public static final Setting SEARCH_SCOPE = new Setting<>("user_search.scope", (String) null, s -> LdapSearchScope.resolve(s, LdapSearchScope.SUB_TREE), Setting.Property.NodeScope); - static final Setting POOL_ENABLED = Setting.boolSetting("user_search.pool.enabled", true, Setting.Property.NodeScope); + public static final Setting POOL_ENABLED = Setting.boolSetting("user_search.pool.enabled", true, Setting.Property.NodeScope); private static final String DEFAULT_USERNAME_ATTRIBUTE = "uid"; private LdapUserSearchSessionFactorySettings() {} diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/ldap/PoolingSessionFactorySettings.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/ldap/PoolingSessionFactorySettings.java new file mode 100644 index 00000000000..67ee9cc7b99 --- /dev/null +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/ldap/PoolingSessionFactorySettings.java @@ -0,0 +1,39 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ +package org.elasticsearch.xpack.core.security.authc.ldap; + +import org.elasticsearch.common.settings.Setting; +import org.elasticsearch.common.unit.TimeValue; +import org.elasticsearch.common.util.set.Sets; + +import java.util.Optional; +import java.util.Set; + +public final class PoolingSessionFactorySettings { + public static final TimeValue DEFAULT_HEALTH_CHECK_INTERVAL = TimeValue.timeValueSeconds(60L); + public static final Setting BIND_DN = Setting.simpleString("bind_dn", Setting.Property.NodeScope, Setting.Property.Filtered); + public static final Setting BIND_PASSWORD = Setting.simpleString("bind_password", Setting.Property.NodeScope, + Setting.Property.Filtered); + public static final int DEFAULT_CONNECTION_POOL_INITIAL_SIZE = 0; + public static final Setting POOL_INITIAL_SIZE = Setting.intSetting("user_search.pool.initial_size", + DEFAULT_CONNECTION_POOL_INITIAL_SIZE, 0, Setting.Property.NodeScope); + public static final int DEFAULT_CONNECTION_POOL_SIZE = 20; + public static final Setting POOL_SIZE = Setting.intSetting("user_search.pool.size", + DEFAULT_CONNECTION_POOL_SIZE, 1, Setting.Property.NodeScope); + public static final Setting HEALTH_CHECK_INTERVAL = Setting.timeSetting("user_search.pool.health_check.interval", + DEFAULT_HEALTH_CHECK_INTERVAL, Setting.Property.NodeScope); + public static final Setting HEALTH_CHECK_ENABLED = Setting.boolSetting("user_search.pool.health_check.enabled", + true, Setting.Property.NodeScope); + public static final Setting> HEALTH_CHECK_DN = new Setting<>("user_search.pool.health_check.dn", (String) null, + Optional::ofNullable, Setting.Property.NodeScope); + + private PoolingSessionFactorySettings() {} + + public static Set> getSettings() { + return Sets.newHashSet(POOL_INITIAL_SIZE, POOL_SIZE, HEALTH_CHECK_ENABLED, HEALTH_CHECK_INTERVAL, HEALTH_CHECK_DN, BIND_DN, + BIND_PASSWORD); + } +} diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/SearchGroupsResolverSettings.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/ldap/SearchGroupsResolverSettings.java similarity index 72% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/SearchGroupsResolverSettings.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/ldap/SearchGroupsResolverSettings.java index 2493743ccc1..67ae3bcf24b 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/SearchGroupsResolverSettings.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/ldap/SearchGroupsResolverSettings.java @@ -3,27 +3,27 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authc.ldap; +package org.elasticsearch.xpack.core.security.authc.ldap; import org.elasticsearch.common.settings.Setting; -import org.elasticsearch.xpack.security.authc.ldap.support.LdapSearchScope; +import org.elasticsearch.xpack.core.security.authc.ldap.support.LdapSearchScope; import java.util.HashSet; import java.util.Set; import java.util.function.Function; public final class SearchGroupsResolverSettings { - static final Setting BASE_DN = Setting.simpleString("group_search.base_dn", + public static final Setting BASE_DN = Setting.simpleString("group_search.base_dn", Setting.Property.NodeScope); - static final Setting SCOPE = new Setting<>("group_search.scope", (String) null, + public static final Setting SCOPE = new Setting<>("group_search.scope", (String) null, s -> LdapSearchScope.resolve(s, LdapSearchScope.SUB_TREE), Setting.Property.NodeScope); - static final Setting USER_ATTRIBUTE = Setting.simpleString( + public static final Setting USER_ATTRIBUTE = Setting.simpleString( "group_search.user_attribute", Setting.Property.NodeScope); private static final String GROUP_SEARCH_DEFAULT_FILTER = "(&" + "(|(objectclass=groupOfNames)(objectclass=groupOfUniqueNames)" + "(objectclass=group)(objectclass=posixGroup))" + "(|(uniqueMember={0})(member={0})(memberUid={0})))"; - static final Setting FILTER = new Setting<>("group_search.filter", + public static final Setting FILTER = new Setting<>("group_search.filter", GROUP_SEARCH_DEFAULT_FILTER, Function.identity(), Setting.Property.NodeScope); private SearchGroupsResolverSettings() {} diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/UserAttributeGroupsResolverSettings.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/ldap/UserAttributeGroupsResolverSettings.java similarity index 80% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/UserAttributeGroupsResolverSettings.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/ldap/UserAttributeGroupsResolverSettings.java index 0f08e7bd91d..88538a810a5 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/UserAttributeGroupsResolverSettings.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/ldap/UserAttributeGroupsResolverSettings.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authc.ldap; +package org.elasticsearch.xpack.core.security.authc.ldap; import org.elasticsearch.common.settings.Setting; @@ -12,7 +12,7 @@ import java.util.Set; import java.util.function.Function; public final class UserAttributeGroupsResolverSettings { - static final Setting ATTRIBUTE = new Setting<>("user_group_attribute", "memberOf", + public static final Setting ATTRIBUTE = new Setting<>("user_group_attribute", "memberOf", Function.identity(), Setting.Property.NodeScope); private UserAttributeGroupsResolverSettings() {} diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapLoadBalancingSettings.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/ldap/support/LdapLoadBalancingSettings.java similarity index 93% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapLoadBalancingSettings.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/ldap/support/LdapLoadBalancingSettings.java index dcb9057597f..4d7aff09397 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapLoadBalancingSettings.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/ldap/support/LdapLoadBalancingSettings.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authc.ldap.support; +package org.elasticsearch.xpack.core.security.authc.ldap.support; import org.elasticsearch.common.settings.Setting; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapMetaDataResolverSettings.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/ldap/support/LdapMetaDataResolverSettings.java similarity index 92% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapMetaDataResolverSettings.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/ldap/support/LdapMetaDataResolverSettings.java index f8c7965cf49..e284de9c03c 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapMetaDataResolverSettings.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/ldap/support/LdapMetaDataResolverSettings.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authc.ldap.support; +package org.elasticsearch.xpack.core.security.authc.ldap.support; import org.elasticsearch.common.settings.Setting; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapSearchScope.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/ldap/support/LdapSearchScope.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapSearchScope.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/ldap/support/LdapSearchScope.java index 40ea34f78dd..3c3d6bc8ab8 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapSearchScope.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/ldap/support/LdapSearchScope.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authc.ldap.support; +package org.elasticsearch.xpack.core.security.authc.ldap.support; import com.unboundid.ldap.sdk.SearchScope; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/SessionFactorySettings.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/ldap/support/SessionFactorySettings.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/SessionFactorySettings.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/ldap/support/SessionFactorySettings.java index 0ff0526a995..42fc70f2517 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/SessionFactorySettings.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/ldap/support/SessionFactorySettings.java @@ -3,11 +3,11 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authc.ldap.support; +package org.elasticsearch.xpack.core.security.authc.ldap.support; import org.elasticsearch.common.settings.Setting; import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.xpack.ssl.SSLConfigurationSettings; +import org.elasticsearch.xpack.core.ssl.SSLConfigurationSettings; import java.util.Collections; import java.util.HashSet; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/pki/PkiRealmSettings.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/pki/PkiRealmSettings.java similarity index 69% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/pki/PkiRealmSettings.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/pki/PkiRealmSettings.java index bf90dd986c7..c7a07c3c262 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/pki/PkiRealmSettings.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/pki/PkiRealmSettings.java @@ -3,11 +3,11 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authc.pki; +package org.elasticsearch.xpack.core.security.authc.pki; import org.elasticsearch.common.settings.Setting; -import org.elasticsearch.xpack.security.authc.support.mapper.CompositeRoleMapperSettings; -import org.elasticsearch.xpack.ssl.SSLConfigurationSettings; +import org.elasticsearch.xpack.core.security.authc.support.mapper.CompositeRoleMapperSettings; +import org.elasticsearch.xpack.core.ssl.SSLConfigurationSettings; import java.util.HashSet; import java.util.Set; @@ -15,10 +15,10 @@ import java.util.regex.Pattern; public final class PkiRealmSettings { public static final String TYPE = "pki"; - static final String DEFAULT_USERNAME_PATTERN = "CN=(.*?)(?:,|$)"; - static final Setting USERNAME_PATTERN_SETTING = new Setting<>("username_pattern", DEFAULT_USERNAME_PATTERN, + public static final String DEFAULT_USERNAME_PATTERN = "CN=(.*?)(?:,|$)"; + public static final Setting USERNAME_PATTERN_SETTING = new Setting<>("username_pattern", DEFAULT_USERNAME_PATTERN, s -> Pattern.compile(s, Pattern.CASE_INSENSITIVE), Setting.Property.NodeScope); - static final SSLConfigurationSettings SSL_SETTINGS = SSLConfigurationSettings.withoutPrefix(); + public static final SSLConfigurationSettings SSL_SETTINGS = SSLConfigurationSettings.withoutPrefix(); private PkiRealmSettings() {} diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/saml/SamlRealmSettings.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/saml/SamlRealmSettings.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/saml/SamlRealmSettings.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/saml/SamlRealmSettings.java index 379646324e9..a074817b388 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/saml/SamlRealmSettings.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/saml/SamlRealmSettings.java @@ -3,13 +3,13 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authc.saml; +package org.elasticsearch.xpack.core.security.authc.saml; import org.elasticsearch.common.settings.Setting; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.util.set.Sets; -import org.elasticsearch.xpack.ssl.SSLConfigurationSettings; -import org.elasticsearch.xpack.ssl.X509KeyPairSettings; +import org.elasticsearch.xpack.core.ssl.SSLConfigurationSettings; +import org.elasticsearch.xpack.core.ssl.X509KeyPairSettings; import java.util.Arrays; import java.util.Collection; @@ -99,13 +99,13 @@ public class SamlRealmSettings { * This class encapsulates those 2 settings. */ public static final class AttributeSetting { - static final String ATTRIBUTES_PREFIX = "attributes."; - static final String ATTRIBUTE_PATTERNS_PREFIX = "attribute_patterns."; + public static final String ATTRIBUTES_PREFIX = "attributes."; + public static final String ATTRIBUTE_PATTERNS_PREFIX = "attribute_patterns."; private final Setting attribute; private final Setting pattern; - AttributeSetting(String name) { + public AttributeSetting(String name) { attribute = Setting.simpleString(ATTRIBUTES_PREFIX + name, Setting.Property.NodeScope); pattern = Setting.simpleString(ATTRIBUTE_PATTERNS_PREFIX + name, Setting.Property.NodeScope); } diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/BCrypt.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/BCrypt.java similarity index 99% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/BCrypt.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/BCrypt.java index 7871d2b2e04..ceb93dc4c85 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/BCrypt.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/BCrypt.java @@ -1,4 +1,4 @@ -package org.elasticsearch.xpack.security.authc.support; +package org.elasticsearch.xpack.core.security.authc.support; // Copyright (c) 2006 Damien Miller // diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/CachingUsernamePasswordRealmSettings.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/CachingUsernamePasswordRealmSettings.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/CachingUsernamePasswordRealmSettings.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/CachingUsernamePasswordRealmSettings.java index 897d9245dd5..a1d031a5b00 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/CachingUsernamePasswordRealmSettings.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/CachingUsernamePasswordRealmSettings.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authc.support; +package org.elasticsearch.xpack.core.security.authc.support; import org.elasticsearch.common.settings.Setting; import org.elasticsearch.common.unit.TimeValue; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/CharArrays.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/CharArrays.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/CharArrays.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/CharArrays.java index e537c6675b7..26df90c31a2 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/CharArrays.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/CharArrays.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authc.support; +package org.elasticsearch.xpack.core.security.authc.support; import java.nio.ByteBuffer; import java.nio.CharBuffer; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/DnRoleMapperSettings.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/DnRoleMapperSettings.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/DnRoleMapperSettings.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/DnRoleMapperSettings.java index 66cd84df170..034f7a18dbe 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/DnRoleMapperSettings.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/DnRoleMapperSettings.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authc.support; +package org.elasticsearch.xpack.core.security.authc.support; import org.elasticsearch.common.settings.Setting; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/Hasher.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/Hasher.java similarity index 93% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/Hasher.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/Hasher.java index d9f1e07dcf5..0d4a1d23e79 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/Hasher.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/Hasher.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authc.support; +package org.elasticsearch.xpack.core.security.authc.support; import org.elasticsearch.common.Randomness; import org.elasticsearch.common.hash.MessageDigests; @@ -20,7 +20,7 @@ public enum Hasher { BCRYPT() { @Override public char[] hash(SecureString text) { - String salt = org.elasticsearch.xpack.security.authc.support.BCrypt.gensalt(); + String salt = BCrypt.gensalt(); return BCrypt.hashpw(text, salt).toCharArray(); } @@ -37,7 +37,7 @@ public enum Hasher { BCRYPT4() { @Override public char[] hash(SecureString text) { - String salt = org.elasticsearch.xpack.security.authc.support.BCrypt.gensalt(4); + String salt = BCrypt.gensalt(4); return BCrypt.hashpw(text, salt).toCharArray(); } @@ -54,7 +54,7 @@ public enum Hasher { BCRYPT5() { @Override public char[] hash(SecureString text) { - String salt = org.elasticsearch.xpack.security.authc.support.BCrypt.gensalt(5); + String salt = BCrypt.gensalt(5); return BCrypt.hashpw(text, salt).toCharArray(); } @@ -71,7 +71,7 @@ public enum Hasher { BCRYPT6() { @Override public char[] hash(SecureString text) { - String salt = org.elasticsearch.xpack.security.authc.support.BCrypt.gensalt(6); + String salt = BCrypt.gensalt(6); return BCrypt.hashpw(text, salt).toCharArray(); } @@ -88,7 +88,7 @@ public enum Hasher { BCRYPT7() { @Override public char[] hash(SecureString text) { - String salt = org.elasticsearch.xpack.security.authc.support.BCrypt.gensalt(7); + String salt = BCrypt.gensalt(7); return BCrypt.hashpw(text, salt).toCharArray(); } @@ -105,7 +105,7 @@ public enum Hasher { BCRYPT8() { @Override public char[] hash(SecureString text) { - String salt = org.elasticsearch.xpack.security.authc.support.BCrypt.gensalt(8); + String salt = BCrypt.gensalt(8); return BCrypt.hashpw(text, salt).toCharArray(); } @@ -122,7 +122,7 @@ public enum Hasher { BCRYPT9() { @Override public char[] hash(SecureString text) { - String salt = org.elasticsearch.xpack.security.authc.support.BCrypt.gensalt(9); + String salt = BCrypt.gensalt(9); return BCrypt.hashpw(text, salt).toCharArray(); } diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/UsernamePasswordToken.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/UsernamePasswordToken.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/UsernamePasswordToken.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/UsernamePasswordToken.java index 39c745ee420..4fdf32608dd 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/UsernamePasswordToken.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/UsernamePasswordToken.java @@ -3,18 +3,18 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authc.support; +package org.elasticsearch.xpack.core.security.authc.support; import org.elasticsearch.common.settings.SecureString; import org.elasticsearch.common.util.concurrent.ThreadContext; -import org.elasticsearch.xpack.security.authc.AuthenticationToken; +import org.elasticsearch.xpack.core.security.authc.AuthenticationToken; import java.nio.CharBuffer; import java.util.Arrays; import java.util.Base64; import java.util.Objects; -import static org.elasticsearch.xpack.security.support.Exceptions.authenticationError; +import static org.elasticsearch.xpack.core.security.support.Exceptions.authenticationError; public class UsernamePasswordToken implements AuthenticationToken { diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/CompositeRoleMapperSettings.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/mapper/CompositeRoleMapperSettings.java similarity index 78% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/CompositeRoleMapperSettings.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/mapper/CompositeRoleMapperSettings.java index 25b3e03630a..54fa0c2ffbc 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/CompositeRoleMapperSettings.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/mapper/CompositeRoleMapperSettings.java @@ -3,10 +3,10 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authc.support.mapper; +package org.elasticsearch.xpack.core.security.authc.support.mapper; import org.elasticsearch.common.settings.Setting; -import org.elasticsearch.xpack.security.authc.support.DnRoleMapperSettings; +import org.elasticsearch.xpack.core.security.authc.support.DnRoleMapperSettings; import java.util.Collection; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/ExpressionRoleMapping.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/mapper/ExpressionRoleMapping.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/ExpressionRoleMapping.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/mapper/ExpressionRoleMapping.java index bc8b0a4544b..efb7078afe8 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/ExpressionRoleMapping.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/mapper/ExpressionRoleMapping.java @@ -3,13 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authc.support.mapper; - -import java.io.IOException; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.function.BiConsumer; +package org.elasticsearch.xpack.core.security.authc.support.mapper; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.ParsingException; @@ -23,8 +17,15 @@ import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.xpack.security.authc.support.mapper.expressiondsl.RoleMapperExpression; -import org.elasticsearch.xpack.security.authc.support.mapper.expressiondsl.ExpressionParser; +import org.elasticsearch.xpack.core.security.authc.support.mapper.expressiondsl.ExpressionParser; +import org.elasticsearch.xpack.core.security.authc.support.mapper.expressiondsl.RoleMapperExpression; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor; + +import java.io.IOException; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.function.BiConsumer; /** * A representation of a single role-mapping for use in NativeRoleMappingStore. @@ -107,7 +108,7 @@ public class ExpressionRoleMapping implements ToXContentObject, Writeable { } /** - * The list of {@link org.elasticsearch.xpack.security.authz.RoleDescriptor roles} (specified by name) that should be assigned to users + * The list of {@link RoleDescriptor roles} (specified by name) that should be assigned to users * that match the {@link #getExpression() expression} in this mapping. */ public List getRoles() { diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/NativeRoleMappingStoreField.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/mapper/NativeRoleMappingStoreField.java similarity index 89% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/NativeRoleMappingStoreField.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/mapper/NativeRoleMappingStoreField.java index ef363eeaab1..28cb3d4fbbe 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/NativeRoleMappingStoreField.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/mapper/NativeRoleMappingStoreField.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authc.support.mapper; +package org.elasticsearch.xpack.core.security.authc.support.mapper; public final class NativeRoleMappingStoreField { diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/expressiondsl/AllExpression.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/mapper/expressiondsl/AllExpression.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/expressiondsl/AllExpression.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/mapper/expressiondsl/AllExpression.java index 66d925fdc54..11fb5e9728a 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/expressiondsl/AllExpression.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/mapper/expressiondsl/AllExpression.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authc.support.mapper.expressiondsl; +package org.elasticsearch.xpack.core.security.authc.support.mapper.expressiondsl; import java.io.IOException; import java.util.Collections; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/expressiondsl/AnyExpression.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/mapper/expressiondsl/AnyExpression.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/expressiondsl/AnyExpression.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/mapper/expressiondsl/AnyExpression.java index f64a9813474..562410a01ad 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/expressiondsl/AnyExpression.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/mapper/expressiondsl/AnyExpression.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authc.support.mapper.expressiondsl; +package org.elasticsearch.xpack.core.security.authc.support.mapper.expressiondsl; import java.io.IOException; import java.util.Collections; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/expressiondsl/ExceptExpression.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/mapper/expressiondsl/ExceptExpression.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/expressiondsl/ExceptExpression.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/mapper/expressiondsl/ExceptExpression.java index 4c697816641..9243d963e0c 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/expressiondsl/ExceptExpression.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/mapper/expressiondsl/ExceptExpression.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authc.support.mapper.expressiondsl; +package org.elasticsearch.xpack.core.security.authc.support.mapper.expressiondsl; import java.io.IOException; import java.util.Map; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/expressiondsl/ExpressionParser.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/mapper/expressiondsl/ExpressionParser.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/expressiondsl/ExpressionParser.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/mapper/expressiondsl/ExpressionParser.java index 2395cf585da..10700cf4c77 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/expressiondsl/ExpressionParser.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/mapper/expressiondsl/ExpressionParser.java @@ -3,23 +3,22 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authc.support.mapper.expressiondsl; +package org.elasticsearch.xpack.core.security.authc.support.mapper.expressiondsl; + +import org.elasticsearch.ElasticsearchParseException; +import org.elasticsearch.common.CheckedFunction; +import org.elasticsearch.common.ParseField; +import org.elasticsearch.common.io.stream.StreamInput; +import org.elasticsearch.common.io.stream.StreamOutput; +import org.elasticsearch.common.xcontent.NamedXContentRegistry; +import org.elasticsearch.common.xcontent.XContentParser; +import org.elasticsearch.xpack.core.watcher.support.xcontent.XContentSource; import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.List; -import org.elasticsearch.ElasticsearchParseException; -import org.elasticsearch.common.CheckedFunction; -import org.elasticsearch.common.ParseField; -import org.elasticsearch.common.io.stream.NamedWriteableRegistry; -import org.elasticsearch.common.io.stream.StreamInput; -import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.common.xcontent.NamedXContentRegistry; -import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.watcher.support.xcontent.XContentSource; - /** * Parses the JSON (XContent) based boolean expression DSL into a tree of {@link RoleMapperExpression} objects. */ diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/expressiondsl/FieldExpression.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/mapper/expressiondsl/FieldExpression.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/expressiondsl/FieldExpression.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/mapper/expressiondsl/FieldExpression.java index ae72a6b2b99..fc67e1d0a27 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/expressiondsl/FieldExpression.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/mapper/expressiondsl/FieldExpression.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authc.support.mapper.expressiondsl; +package org.elasticsearch.xpack.core.security.authc.support.mapper.expressiondsl; import org.elasticsearch.common.Numbers; import org.elasticsearch.common.io.stream.StreamInput; @@ -11,7 +11,7 @@ import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.io.stream.Writeable; import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.security.support.Automatons; +import org.elasticsearch.xpack.core.security.support.Automatons; import java.io.IOException; import java.util.Collection; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/expressiondsl/RoleMapperExpression.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/mapper/expressiondsl/RoleMapperExpression.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/expressiondsl/RoleMapperExpression.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/mapper/expressiondsl/RoleMapperExpression.java index 85d99e40782..165d8b51421 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/expressiondsl/RoleMapperExpression.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/mapper/expressiondsl/RoleMapperExpression.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authc.support.mapper.expressiondsl; +package org.elasticsearch.xpack.core.security.authc.support.mapper.expressiondsl; import java.util.Map; import java.util.function.Predicate; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/AuthorizationServiceField.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/AuthorizationServiceField.java similarity index 88% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/AuthorizationServiceField.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/AuthorizationServiceField.java index c091c3ea79d..3dd3dff8714 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/AuthorizationServiceField.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/AuthorizationServiceField.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authz; +package org.elasticsearch.xpack.core.security.authz; public final class AuthorizationServiceField { public static final String INDICES_PERMISSIONS_KEY = "_indices_permissions"; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/IndicesAndAliasesResolverField.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/IndicesAndAliasesResolverField.java similarity index 91% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/IndicesAndAliasesResolverField.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/IndicesAndAliasesResolverField.java index da2a55b2d03..932febda180 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/IndicesAndAliasesResolverField.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/IndicesAndAliasesResolverField.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authz; +package org.elasticsearch.xpack.core.security.authz; public final class IndicesAndAliasesResolverField { //placeholder used in the security plugin to indicate that the request is authorized knowing that it will yield an empty response diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/RoleDescriptor.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/RoleDescriptor.java similarity index 99% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/RoleDescriptor.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/RoleDescriptor.java index b8fecef5a7e..696f02905fa 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/RoleDescriptor.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/RoleDescriptor.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authz; +package org.elasticsearch.xpack.core.security.authz; import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.Version; @@ -23,9 +23,9 @@ import org.elasticsearch.common.xcontent.XContentHelper; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.common.xcontent.json.JsonXContent; -import org.elasticsearch.xpack.security.common.xcontent.XContentUtils; -import org.elasticsearch.xpack.security.support.MetadataUtils; -import org.elasticsearch.xpack.security.support.Validation; +import org.elasticsearch.xpack.core.security.support.MetadataUtils; +import org.elasticsearch.xpack.core.security.support.Validation; +import org.elasticsearch.xpack.core.security.xcontent.XContentUtils; import java.io.IOException; import java.util.ArrayList; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/DocumentSubsetReader.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/accesscontrol/DocumentSubsetReader.java similarity index 99% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/DocumentSubsetReader.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/accesscontrol/DocumentSubsetReader.java index 2a122e69e24..6ad0d8a742e 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/DocumentSubsetReader.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/accesscontrol/DocumentSubsetReader.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authz.accesscontrol; +package org.elasticsearch.xpack.core.security.authz.accesscontrol; import org.apache.lucene.index.DirectoryReader; import org.apache.lucene.index.FilterDirectoryReader; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/FieldSubsetReader.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/accesscontrol/FieldSubsetReader.java similarity index 99% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/FieldSubsetReader.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/accesscontrol/FieldSubsetReader.java index 46a78bcb346..9376ded6d20 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/FieldSubsetReader.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/accesscontrol/FieldSubsetReader.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authz.accesscontrol; +package org.elasticsearch.xpack.core.security.authz.accesscontrol; import org.apache.lucene.index.BinaryDocValues; import org.apache.lucene.index.DirectoryReader; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/IndicesAccessControl.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/accesscontrol/IndicesAccessControl.java similarity index 93% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/IndicesAccessControl.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/accesscontrol/IndicesAccessControl.java index 1b5e6833ea1..6df9ad834c1 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/IndicesAccessControl.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/accesscontrol/IndicesAccessControl.java @@ -3,12 +3,12 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authz.accesscontrol; +package org.elasticsearch.xpack.core.security.authz.accesscontrol; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.bytes.BytesReference; -import org.elasticsearch.xpack.security.authz.IndicesAndAliasesResolverField; -import org.elasticsearch.xpack.security.authz.permission.FieldPermissions; +import org.elasticsearch.xpack.core.security.authz.IndicesAndAliasesResolverField; +import org.elasticsearch.xpack.core.security.authz.permission.FieldPermissions; import java.util.Collections; import java.util.Map; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/SecurityIndexSearcherWrapper.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/accesscontrol/SecurityIndexSearcherWrapper.java similarity index 97% rename from plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/SecurityIndexSearcherWrapper.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/accesscontrol/SecurityIndexSearcherWrapper.java index 6e05320e20b..a18913db7c5 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/SecurityIndexSearcherWrapper.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/accesscontrol/SecurityIndexSearcherWrapper.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authz.accesscontrol; +package org.elasticsearch.xpack.core.security.authz.accesscontrol; import org.apache.logging.log4j.Logger; import org.apache.lucene.index.DirectoryReader; @@ -57,12 +57,11 @@ import org.elasticsearch.script.Script; import org.elasticsearch.script.ScriptService; import org.elasticsearch.script.ScriptType; import org.elasticsearch.script.TemplateScript; -import org.elasticsearch.xpack.security.authc.Authentication; -import org.elasticsearch.xpack.security.authz.AuthorizationService; -import org.elasticsearch.xpack.security.authz.AuthorizationServiceField; -import org.elasticsearch.xpack.security.authz.accesscontrol.DocumentSubsetReader.DocumentSubsetDirectoryReader; -import org.elasticsearch.xpack.security.support.Exceptions; -import org.elasticsearch.xpack.security.user.User; +import org.elasticsearch.xpack.core.security.authc.Authentication; +import org.elasticsearch.xpack.core.security.authz.AuthorizationServiceField; +import org.elasticsearch.xpack.core.security.authz.accesscontrol.DocumentSubsetReader.DocumentSubsetDirectoryReader; +import org.elasticsearch.xpack.core.security.support.Exceptions; +import org.elasticsearch.xpack.core.security.user.User; import java.io.IOException; import java.util.ArrayList; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/SetSecurityUserProcessor.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/accesscontrol/SetSecurityUserProcessor.java similarity index 91% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/SetSecurityUserProcessor.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/accesscontrol/SetSecurityUserProcessor.java index 10bedf00e08..051a0776463 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/SetSecurityUserProcessor.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/accesscontrol/SetSecurityUserProcessor.java @@ -3,14 +3,14 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authz.accesscontrol; +package org.elasticsearch.xpack.core.security.authz.accesscontrol; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.ingest.AbstractProcessor; import org.elasticsearch.ingest.IngestDocument; import org.elasticsearch.ingest.Processor; -import org.elasticsearch.xpack.security.authc.Authentication; -import org.elasticsearch.xpack.security.user.User; +import org.elasticsearch.xpack.core.security.authc.Authentication; +import org.elasticsearch.xpack.core.security.user.User; import java.util.Arrays; import java.util.EnumSet; @@ -35,7 +35,7 @@ public final class SetSecurityUserProcessor extends AbstractProcessor { private final String field; private final Set properties; - SetSecurityUserProcessor(String tag, ThreadContext threadContext, String field, Set properties) { + public SetSecurityUserProcessor(String tag, ThreadContext threadContext, String field, Set properties) { super(tag); this.threadContext = threadContext; this.field = field; @@ -127,7 +127,7 @@ public final class SetSecurityUserProcessor extends AbstractProcessor { } } - enum Property { + public enum Property { USERNAME, FULL_NAME, @@ -140,7 +140,7 @@ public final class SetSecurityUserProcessor extends AbstractProcessor { return valueOf(value.toUpperCase(Locale.ROOT)); } catch (IllegalArgumentException e) { // not using the original exception as its message is confusing - // (e.g. 'No enum constant org.elasticsearch.xpack.security.authz.accesscontrol.SetSecurityUserProcessor.Property.INVALID') + // (e.g. 'No enum constant SetSecurityUserProcessor.Property.INVALID') throw newConfigurationException(TYPE, tag, "properties", "Property value [" + value + "] is in valid"); } } diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/permission/ClusterPermission.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/permission/ClusterPermission.java similarity index 86% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/permission/ClusterPermission.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/permission/ClusterPermission.java index 99677028d94..7c990bd735a 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/permission/ClusterPermission.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/permission/ClusterPermission.java @@ -3,9 +3,9 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authz.permission; +package org.elasticsearch.xpack.core.security.authz.permission; -import org.elasticsearch.xpack.security.authz.privilege.ClusterPrivilege; +import org.elasticsearch.xpack.core.security.authz.privilege.ClusterPrivilege; import java.util.function.Predicate; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissions.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/permission/FieldPermissions.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissions.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/permission/FieldPermissions.java index e1f9d810352..210616d84d0 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissions.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/permission/FieldPermissions.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authz.permission; +package org.elasticsearch.xpack.core.security.authz.permission; import org.apache.lucene.index.DirectoryReader; import org.apache.lucene.util.Accountable; @@ -16,9 +16,9 @@ import org.apache.lucene.util.automaton.Operations; import org.elasticsearch.ElasticsearchSecurityException; import org.elasticsearch.common.Strings; import org.elasticsearch.common.regex.Regex; -import org.elasticsearch.xpack.security.authz.accesscontrol.FieldSubsetReader; -import org.elasticsearch.xpack.security.authz.permission.FieldPermissionsDefinition.FieldGrantExcludeGroup; -import org.elasticsearch.xpack.security.support.Automatons; +import org.elasticsearch.xpack.core.security.authz.accesscontrol.FieldSubsetReader; +import org.elasticsearch.xpack.core.security.authz.permission.FieldPermissionsDefinition.FieldGrantExcludeGroup; +import org.elasticsearch.xpack.core.security.support.Automatons; import java.io.IOException; import java.util.Arrays; @@ -29,7 +29,6 @@ import java.util.Set; import java.util.stream.Collectors; import static org.apache.lucene.util.automaton.Operations.subsetOf; -import static org.elasticsearch.xpack.security.support.Automatons.minusAndMinimize; /** * Stores patterns to fields which access is granted or denied to and maintains an automaton that can be used to check if permission is @@ -152,7 +151,7 @@ public final class FieldPermissions implements Accountable { Strings.arrayToCommaDelimitedString(grantedFields)); } - grantedFieldsAutomaton = minusAndMinimize(grantedFieldsAutomaton, deniedFieldsAutomaton); + grantedFieldsAutomaton = Automatons.minusAndMinimize(grantedFieldsAutomaton, deniedFieldsAutomaton); return grantedFieldsAutomaton; } diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissionsCache.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/permission/FieldPermissionsCache.java similarity index 93% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissionsCache.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/permission/FieldPermissionsCache.java index 4b0143c72eb..4036d2c0958 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissionsCache.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/permission/FieldPermissionsCache.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authz.permission; +package org.elasticsearch.xpack.core.security.authz.permission; import org.apache.lucene.util.automaton.Automaton; import org.elasticsearch.ElasticsearchException; @@ -12,8 +12,8 @@ import org.elasticsearch.common.cache.CacheBuilder; import org.elasticsearch.common.settings.Setting; import org.elasticsearch.common.settings.Setting.Property; import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.xpack.security.authz.permission.FieldPermissionsDefinition.FieldGrantExcludeGroup; -import org.elasticsearch.xpack.security.support.Automatons; +import org.elasticsearch.xpack.core.security.authz.permission.FieldPermissionsDefinition.FieldGrantExcludeGroup; +import org.elasticsearch.xpack.core.security.support.Automatons; import java.util.Collection; import java.util.List; @@ -23,7 +23,7 @@ import java.util.concurrent.ExecutionException; import java.util.function.Predicate; import java.util.stream.Collectors; -import static org.elasticsearch.xpack.security.SecurityField.setting; +import static org.elasticsearch.xpack.core.security.SecurityField.setting; /** * A service for managing the caching of {@link FieldPermissions} as these may often need to be combined or created and internally they diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissionsDefinition.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/permission/FieldPermissionsDefinition.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissionsDefinition.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/permission/FieldPermissionsDefinition.java index 74ba204c182..1e259dd008a 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissionsDefinition.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/permission/FieldPermissionsDefinition.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authz.permission; +package org.elasticsearch.xpack.core.security.authz.permission; import java.util.Arrays; import java.util.Collections; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/permission/IndicesPermission.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/permission/IndicesPermission.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/permission/IndicesPermission.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/permission/IndicesPermission.java index b1f13a64122..c3f2a18b7b4 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/permission/IndicesPermission.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/permission/IndicesPermission.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authz.permission; +package org.elasticsearch.xpack.core.security.authz.permission; import org.apache.lucene.util.automaton.Automaton; import org.elasticsearch.cluster.metadata.AliasOrIndex; @@ -11,9 +11,9 @@ import org.elasticsearch.cluster.metadata.IndexMetaData; import org.elasticsearch.cluster.metadata.MetaData; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.bytes.BytesReference; -import org.elasticsearch.xpack.security.authz.accesscontrol.IndicesAccessControl; -import org.elasticsearch.xpack.security.authz.privilege.IndexPrivilege; -import org.elasticsearch.xpack.security.support.Automatons; +import org.elasticsearch.xpack.core.security.authz.accesscontrol.IndicesAccessControl; +import org.elasticsearch.xpack.core.security.authz.privilege.IndexPrivilege; +import org.elasticsearch.xpack.core.security.support.Automatons; import java.util.ArrayList; import java.util.Arrays; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/permission/Role.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/permission/Role.java similarity index 91% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/permission/Role.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/permission/Role.java index 1ea5a57b0f5..8fed501ece2 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/permission/Role.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/permission/Role.java @@ -3,18 +3,17 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authz.permission; +package org.elasticsearch.xpack.core.security.authz.permission; import org.elasticsearch.cluster.metadata.MetaData; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.util.set.Sets; -import org.elasticsearch.xpack.security.authz.RoleDescriptor; -import org.elasticsearch.xpack.security.authz.accesscontrol.IndicesAccessControl; -import org.elasticsearch.xpack.security.authz.accesscontrol.IndicesAccessControl.IndexAccessControl; -import org.elasticsearch.xpack.security.authz.privilege.ClusterPrivilege; -import org.elasticsearch.xpack.security.authz.privilege.IndexPrivilege; -import org.elasticsearch.xpack.security.authz.privilege.Privilege; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor; +import org.elasticsearch.xpack.core.security.authz.accesscontrol.IndicesAccessControl; +import org.elasticsearch.xpack.core.security.authz.privilege.ClusterPrivilege; +import org.elasticsearch.xpack.core.security.authz.privilege.IndexPrivilege; +import org.elasticsearch.xpack.core.security.authz.privilege.Privilege; import java.util.ArrayList; import java.util.Collections; @@ -74,7 +73,7 @@ public final class Role { */ public IndicesAccessControl authorize(String action, Set requestedIndicesOrAliases, MetaData metaData, FieldPermissionsCache fieldPermissionsCache) { - Map indexPermissions = indices.authorize( + Map indexPermissions = indices.authorize( action, requestedIndicesOrAliases, metaData, fieldPermissionsCache ); diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/permission/RunAsPermission.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/permission/RunAsPermission.java similarity index 86% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/permission/RunAsPermission.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/permission/RunAsPermission.java index e864ccb4e9e..a8b2f7bfaef 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/permission/RunAsPermission.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/permission/RunAsPermission.java @@ -3,9 +3,9 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authz.permission; +package org.elasticsearch.xpack.core.security.authz.permission; -import org.elasticsearch.xpack.security.authz.privilege.Privilege; +import org.elasticsearch.xpack.core.security.authz.privilege.Privilege; import java.util.function.Predicate; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/privilege/ClusterPrivilege.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/privilege/ClusterPrivilege.java similarity index 93% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/privilege/ClusterPrivilege.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/privilege/ClusterPrivilege.java index 7d2e6111535..4d9be04e55e 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/privilege/ClusterPrivilege.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/privilege/ClusterPrivilege.java @@ -3,7 +3,14 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authz.privilege; +package org.elasticsearch.xpack.core.security.authz.privilege; + +import org.apache.lucene.util.automaton.Automaton; +import org.elasticsearch.common.Strings; +import org.elasticsearch.common.collect.MapBuilder; +import org.elasticsearch.xpack.core.security.action.token.InvalidateTokenAction; +import org.elasticsearch.xpack.core.security.action.token.RefreshTokenAction; +import org.elasticsearch.xpack.core.security.support.Automatons; import java.util.Collections; import java.util.HashSet; @@ -13,15 +20,8 @@ import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.function.Predicate; -import org.apache.lucene.util.automaton.Automaton; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.collect.MapBuilder; -import org.elasticsearch.xpack.security.action.token.InvalidateTokenAction; -import org.elasticsearch.xpack.security.action.token.RefreshTokenAction; -import org.elasticsearch.xpack.security.support.Automatons; - -import static org.elasticsearch.xpack.security.support.Automatons.minusAndMinimize; -import static org.elasticsearch.xpack.security.support.Automatons.patterns; +import static org.elasticsearch.xpack.core.security.support.Automatons.minusAndMinimize; +import static org.elasticsearch.xpack.core.security.support.Automatons.patterns; public final class ClusterPrivilege extends Privilege { diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/privilege/HealthAndStatsPrivilege.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/privilege/HealthAndStatsPrivilege.java similarity index 91% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/privilege/HealthAndStatsPrivilege.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/privilege/HealthAndStatsPrivilege.java index 1130469b901..9cfa1300e43 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/privilege/HealthAndStatsPrivilege.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/privilege/HealthAndStatsPrivilege.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authz.privilege; +package org.elasticsearch.xpack.core.security.authz.privilege; public final class HealthAndStatsPrivilege extends Privilege { diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/privilege/IndexPrivilege.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/privilege/IndexPrivilege.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/privilege/IndexPrivilege.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/privilege/IndexPrivilege.java index 3d679f75e68..723dff61679 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/privilege/IndexPrivilege.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/privilege/IndexPrivilege.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authz.privilege; +package org.elasticsearch.xpack.core.security.authz.privilege; import org.apache.lucene.util.automaton.Automaton; import org.elasticsearch.action.admin.cluster.shards.ClusterSearchShardsAction; @@ -21,7 +21,7 @@ import org.elasticsearch.action.admin.indices.settings.get.GetSettingsAction; import org.elasticsearch.action.admin.indices.validate.query.ValidateQueryAction; import org.elasticsearch.common.Strings; import org.elasticsearch.common.collect.MapBuilder; -import org.elasticsearch.xpack.security.support.Automatons; +import org.elasticsearch.xpack.core.security.support.Automatons; import java.util.Arrays; import java.util.Collections; @@ -32,8 +32,8 @@ import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.function.Predicate; -import static org.elasticsearch.xpack.security.support.Automatons.patterns; -import static org.elasticsearch.xpack.security.support.Automatons.unionAndMinimize; +import static org.elasticsearch.xpack.core.security.support.Automatons.patterns; +import static org.elasticsearch.xpack.core.security.support.Automatons.unionAndMinimize; public final class IndexPrivilege extends Privilege { diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/privilege/Privilege.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/privilege/Privilege.java similarity index 90% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/privilege/Privilege.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/privilege/Privilege.java index 382bea5fe2b..54db92dacae 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/privilege/Privilege.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/privilege/Privilege.java @@ -3,16 +3,16 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authz.privilege; +package org.elasticsearch.xpack.core.security.authz.privilege; import org.apache.lucene.util.automaton.Automaton; -import org.elasticsearch.xpack.security.support.Automatons; +import org.elasticsearch.xpack.core.security.support.Automatons; import java.util.Collections; import java.util.Set; import java.util.function.Predicate; -import static org.elasticsearch.xpack.security.support.Automatons.patterns; +import static org.elasticsearch.xpack.core.security.support.Automatons.patterns; public class Privilege { diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/privilege/SystemPrivilege.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/privilege/SystemPrivilege.java similarity index 91% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/privilege/SystemPrivilege.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/privilege/SystemPrivilege.java index bd106bd925c..f1527429b32 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/privilege/SystemPrivilege.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/privilege/SystemPrivilege.java @@ -3,9 +3,9 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authz.privilege; +package org.elasticsearch.xpack.core.security.authz.privilege; -import org.elasticsearch.xpack.security.support.Automatons; +import org.elasticsearch.xpack.core.security.support.Automatons; import java.util.Collections; import java.util.function.Predicate; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/store/ReservedRolesStore.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/store/ReservedRolesStore.java similarity index 91% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/store/ReservedRolesStore.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/store/ReservedRolesStore.java index 8df4aecbc11..12cdbe2ec9c 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/store/ReservedRolesStore.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/store/ReservedRolesStore.java @@ -3,23 +3,18 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authz.store; - -import java.util.Collection; -import java.util.Collections; -import java.util.Map; -import java.util.Set; +package org.elasticsearch.xpack.core.security.authz.store; import org.elasticsearch.common.collect.MapBuilder; -import org.elasticsearch.xpack.monitoring.action.MonitoringBulkAction; -import org.elasticsearch.xpack.security.authz.RoleDescriptor; -import org.elasticsearch.xpack.security.authz.permission.Role; -import org.elasticsearch.xpack.security.support.MetadataUtils; -import org.elasticsearch.xpack.security.user.KibanaUser; -import org.elasticsearch.xpack.security.user.UsernamesField; -import org.elasticsearch.xpack.watcher.execution.TriggeredWatchStoreField; -import org.elasticsearch.xpack.watcher.history.HistoryStoreField; -import org.elasticsearch.xpack.watcher.watch.Watch; +import org.elasticsearch.xpack.core.monitoring.action.MonitoringBulkAction; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor; +import org.elasticsearch.xpack.core.security.authz.permission.Role; +import org.elasticsearch.xpack.core.security.support.MetadataUtils; +import org.elasticsearch.xpack.core.security.user.KibanaUser; +import org.elasticsearch.xpack.core.security.user.UsernamesField; +import org.elasticsearch.xpack.core.watcher.execution.TriggeredWatchStoreField; +import org.elasticsearch.xpack.core.watcher.history.HistoryStoreField; +import org.elasticsearch.xpack.core.watcher.watch.Watch; import java.util.Collection; import java.util.Collections; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/client/SecurityClient.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/client/SecurityClient.java similarity index 67% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/client/SecurityClient.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/client/SecurityClient.java index 724f6deb19b..af1cfe0579e 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/client/SecurityClient.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/client/SecurityClient.java @@ -3,79 +3,79 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.client; +package org.elasticsearch.xpack.core.security.client; import org.elasticsearch.action.ActionFuture; import org.elasticsearch.action.ActionListener; import org.elasticsearch.client.ElasticsearchClient; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.xpack.security.action.realm.ClearRealmCacheAction; -import org.elasticsearch.xpack.security.action.realm.ClearRealmCacheRequest; -import org.elasticsearch.xpack.security.action.realm.ClearRealmCacheRequestBuilder; -import org.elasticsearch.xpack.security.action.realm.ClearRealmCacheResponse; -import org.elasticsearch.xpack.security.action.role.ClearRolesCacheAction; -import org.elasticsearch.xpack.security.action.role.ClearRolesCacheRequest; -import org.elasticsearch.xpack.security.action.role.ClearRolesCacheRequestBuilder; -import org.elasticsearch.xpack.security.action.role.ClearRolesCacheResponse; -import org.elasticsearch.xpack.security.action.role.DeleteRoleAction; -import org.elasticsearch.xpack.security.action.role.DeleteRoleRequest; -import org.elasticsearch.xpack.security.action.role.DeleteRoleRequestBuilder; -import org.elasticsearch.xpack.security.action.role.DeleteRoleResponse; -import org.elasticsearch.xpack.security.action.role.GetRolesAction; -import org.elasticsearch.xpack.security.action.role.GetRolesRequest; -import org.elasticsearch.xpack.security.action.role.GetRolesRequestBuilder; -import org.elasticsearch.xpack.security.action.role.GetRolesResponse; -import org.elasticsearch.xpack.security.action.role.PutRoleAction; -import org.elasticsearch.xpack.security.action.role.PutRoleRequest; -import org.elasticsearch.xpack.security.action.role.PutRoleRequestBuilder; -import org.elasticsearch.xpack.security.action.role.PutRoleResponse; -import org.elasticsearch.xpack.security.action.rolemapping.DeleteRoleMappingAction; -import org.elasticsearch.xpack.security.action.rolemapping.DeleteRoleMappingRequestBuilder; -import org.elasticsearch.xpack.security.action.rolemapping.GetRoleMappingsAction; -import org.elasticsearch.xpack.security.action.rolemapping.GetRoleMappingsRequest; -import org.elasticsearch.xpack.security.action.rolemapping.GetRoleMappingsRequestBuilder; -import org.elasticsearch.xpack.security.action.rolemapping.GetRoleMappingsResponse; -import org.elasticsearch.xpack.security.action.rolemapping.PutRoleMappingAction; -import org.elasticsearch.xpack.security.action.rolemapping.PutRoleMappingRequestBuilder; -import org.elasticsearch.xpack.security.action.saml.SamlAuthenticateRequest; -import org.elasticsearch.xpack.security.action.saml.SamlAuthenticateRequestBuilder; -import org.elasticsearch.xpack.security.action.saml.SamlAuthenticateResponse; -import org.elasticsearch.xpack.security.action.saml.SamlAuthenticateAction; -import org.elasticsearch.xpack.security.action.saml.SamlPrepareAuthenticationRequestBuilder; -import org.elasticsearch.xpack.security.action.token.CreateTokenAction; -import org.elasticsearch.xpack.security.action.token.CreateTokenRequest; -import org.elasticsearch.xpack.security.action.token.CreateTokenRequestBuilder; -import org.elasticsearch.xpack.security.action.token.CreateTokenResponse; -import org.elasticsearch.xpack.security.action.token.InvalidateTokenAction; -import org.elasticsearch.xpack.security.action.token.InvalidateTokenRequest; -import org.elasticsearch.xpack.security.action.token.InvalidateTokenRequestBuilder; -import org.elasticsearch.xpack.security.action.token.InvalidateTokenResponse; -import org.elasticsearch.xpack.security.action.token.RefreshTokenAction; -import org.elasticsearch.xpack.security.action.user.ChangePasswordAction; -import org.elasticsearch.xpack.security.action.user.ChangePasswordRequest; -import org.elasticsearch.xpack.security.action.user.ChangePasswordRequestBuilder; -import org.elasticsearch.xpack.security.action.user.ChangePasswordResponse; -import org.elasticsearch.xpack.security.action.user.DeleteUserAction; -import org.elasticsearch.xpack.security.action.user.DeleteUserRequest; -import org.elasticsearch.xpack.security.action.user.DeleteUserRequestBuilder; -import org.elasticsearch.xpack.security.action.user.DeleteUserResponse; -import org.elasticsearch.xpack.security.action.user.GetUsersAction; -import org.elasticsearch.xpack.security.action.user.GetUsersRequest; -import org.elasticsearch.xpack.security.action.user.GetUsersRequestBuilder; -import org.elasticsearch.xpack.security.action.user.GetUsersResponse; -import org.elasticsearch.xpack.security.action.user.HasPrivilegesAction; -import org.elasticsearch.xpack.security.action.user.HasPrivilegesRequest; -import org.elasticsearch.xpack.security.action.user.HasPrivilegesRequestBuilder; -import org.elasticsearch.xpack.security.action.user.HasPrivilegesResponse; -import org.elasticsearch.xpack.security.action.user.PutUserAction; -import org.elasticsearch.xpack.security.action.user.PutUserRequest; -import org.elasticsearch.xpack.security.action.user.PutUserRequestBuilder; -import org.elasticsearch.xpack.security.action.user.PutUserResponse; -import org.elasticsearch.xpack.security.action.user.SetEnabledAction; -import org.elasticsearch.xpack.security.action.user.SetEnabledRequest; -import org.elasticsearch.xpack.security.action.user.SetEnabledRequestBuilder; -import org.elasticsearch.xpack.security.action.user.SetEnabledResponse; +import org.elasticsearch.xpack.core.security.action.realm.ClearRealmCacheAction; +import org.elasticsearch.xpack.core.security.action.realm.ClearRealmCacheRequest; +import org.elasticsearch.xpack.core.security.action.realm.ClearRealmCacheRequestBuilder; +import org.elasticsearch.xpack.core.security.action.realm.ClearRealmCacheResponse; +import org.elasticsearch.xpack.core.security.action.role.ClearRolesCacheAction; +import org.elasticsearch.xpack.core.security.action.role.ClearRolesCacheRequest; +import org.elasticsearch.xpack.core.security.action.role.ClearRolesCacheRequestBuilder; +import org.elasticsearch.xpack.core.security.action.role.ClearRolesCacheResponse; +import org.elasticsearch.xpack.core.security.action.role.DeleteRoleAction; +import org.elasticsearch.xpack.core.security.action.role.DeleteRoleRequest; +import org.elasticsearch.xpack.core.security.action.role.DeleteRoleRequestBuilder; +import org.elasticsearch.xpack.core.security.action.role.DeleteRoleResponse; +import org.elasticsearch.xpack.core.security.action.role.GetRolesAction; +import org.elasticsearch.xpack.core.security.action.role.GetRolesRequest; +import org.elasticsearch.xpack.core.security.action.role.GetRolesRequestBuilder; +import org.elasticsearch.xpack.core.security.action.role.GetRolesResponse; +import org.elasticsearch.xpack.core.security.action.role.PutRoleAction; +import org.elasticsearch.xpack.core.security.action.role.PutRoleRequest; +import org.elasticsearch.xpack.core.security.action.role.PutRoleRequestBuilder; +import org.elasticsearch.xpack.core.security.action.role.PutRoleResponse; +import org.elasticsearch.xpack.core.security.action.rolemapping.DeleteRoleMappingAction; +import org.elasticsearch.xpack.core.security.action.rolemapping.DeleteRoleMappingRequestBuilder; +import org.elasticsearch.xpack.core.security.action.rolemapping.GetRoleMappingsAction; +import org.elasticsearch.xpack.core.security.action.rolemapping.GetRoleMappingsRequest; +import org.elasticsearch.xpack.core.security.action.rolemapping.GetRoleMappingsRequestBuilder; +import org.elasticsearch.xpack.core.security.action.rolemapping.GetRoleMappingsResponse; +import org.elasticsearch.xpack.core.security.action.rolemapping.PutRoleMappingAction; +import org.elasticsearch.xpack.core.security.action.rolemapping.PutRoleMappingRequestBuilder; +import org.elasticsearch.xpack.core.security.action.saml.SamlAuthenticateAction; +import org.elasticsearch.xpack.core.security.action.saml.SamlAuthenticateRequest; +import org.elasticsearch.xpack.core.security.action.saml.SamlAuthenticateRequestBuilder; +import org.elasticsearch.xpack.core.security.action.saml.SamlAuthenticateResponse; +import org.elasticsearch.xpack.core.security.action.saml.SamlPrepareAuthenticationRequestBuilder; +import org.elasticsearch.xpack.core.security.action.token.CreateTokenAction; +import org.elasticsearch.xpack.core.security.action.token.CreateTokenRequest; +import org.elasticsearch.xpack.core.security.action.token.CreateTokenRequestBuilder; +import org.elasticsearch.xpack.core.security.action.token.CreateTokenResponse; +import org.elasticsearch.xpack.core.security.action.token.InvalidateTokenAction; +import org.elasticsearch.xpack.core.security.action.token.InvalidateTokenRequest; +import org.elasticsearch.xpack.core.security.action.token.InvalidateTokenRequestBuilder; +import org.elasticsearch.xpack.core.security.action.token.InvalidateTokenResponse; +import org.elasticsearch.xpack.core.security.action.token.RefreshTokenAction; +import org.elasticsearch.xpack.core.security.action.user.ChangePasswordAction; +import org.elasticsearch.xpack.core.security.action.user.ChangePasswordRequest; +import org.elasticsearch.xpack.core.security.action.user.ChangePasswordRequestBuilder; +import org.elasticsearch.xpack.core.security.action.user.ChangePasswordResponse; +import org.elasticsearch.xpack.core.security.action.user.DeleteUserAction; +import org.elasticsearch.xpack.core.security.action.user.DeleteUserRequest; +import org.elasticsearch.xpack.core.security.action.user.DeleteUserRequestBuilder; +import org.elasticsearch.xpack.core.security.action.user.DeleteUserResponse; +import org.elasticsearch.xpack.core.security.action.user.GetUsersAction; +import org.elasticsearch.xpack.core.security.action.user.GetUsersRequest; +import org.elasticsearch.xpack.core.security.action.user.GetUsersRequestBuilder; +import org.elasticsearch.xpack.core.security.action.user.GetUsersResponse; +import org.elasticsearch.xpack.core.security.action.user.HasPrivilegesAction; +import org.elasticsearch.xpack.core.security.action.user.HasPrivilegesRequest; +import org.elasticsearch.xpack.core.security.action.user.HasPrivilegesRequestBuilder; +import org.elasticsearch.xpack.core.security.action.user.HasPrivilegesResponse; +import org.elasticsearch.xpack.core.security.action.user.PutUserAction; +import org.elasticsearch.xpack.core.security.action.user.PutUserRequest; +import org.elasticsearch.xpack.core.security.action.user.PutUserRequestBuilder; +import org.elasticsearch.xpack.core.security.action.user.PutUserResponse; +import org.elasticsearch.xpack.core.security.action.user.SetEnabledAction; +import org.elasticsearch.xpack.core.security.action.user.SetEnabledRequest; +import org.elasticsearch.xpack.core.security.action.user.SetEnabledRequestBuilder; +import org.elasticsearch.xpack.core.security.action.user.SetEnabledResponse; import java.io.IOException; import java.util.List; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/audit/index/IndexAuditTrailField.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/index/IndexAuditTrailField.java similarity index 88% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/audit/index/IndexAuditTrailField.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/index/IndexAuditTrailField.java index 869f5ef648e..340dad82844 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/audit/index/IndexAuditTrailField.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/index/IndexAuditTrailField.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.audit.index; +package org.elasticsearch.xpack.core.security.index; public final class IndexAuditTrailField { public static final String INDEX_NAME_PREFIX = ".security_audit_log"; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/rest/RestRequestFilter.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/rest/RestRequestFilter.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/rest/RestRequestFilter.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/rest/RestRequestFilter.java index 344586aff83..ff70782a40a 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/rest/RestRequestFilter.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/rest/RestRequestFilter.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.rest; +package org.elasticsearch.xpack.core.security.rest; import org.elasticsearch.ElasticsearchException; import org.elasticsearch.common.Nullable; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/support/Automatons.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/support/Automatons.java similarity index 99% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/support/Automatons.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/support/Automatons.java index da538d4fbf9..70176256cc2 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/support/Automatons.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/support/Automatons.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.support; +package org.elasticsearch.xpack.core.security.support; import org.apache.lucene.util.automaton.Automata; import org.apache.lucene.util.automaton.Automaton; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/support/Exceptions.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/support/Exceptions.java similarity index 92% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/support/Exceptions.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/support/Exceptions.java index 8499e3bae21..9cf09482a52 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/support/Exceptions.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/support/Exceptions.java @@ -3,11 +3,11 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.support; +package org.elasticsearch.xpack.core.security.support; import org.elasticsearch.ElasticsearchSecurityException; import org.elasticsearch.rest.RestStatus; -import org.elasticsearch.xpack.XPackField; +import org.elasticsearch.xpack.core.XPackField; public class Exceptions { diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/support/MetadataUtils.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/support/MetadataUtils.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/support/MetadataUtils.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/support/MetadataUtils.java index 5527463e939..ff457cb8d06 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/support/MetadataUtils.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/support/MetadataUtils.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.support; +package org.elasticsearch.xpack.core.security.support; import java.lang.reflect.Array; import java.util.Collection; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/support/NoOpLogger.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/support/NoOpLogger.java similarity index 99% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/support/NoOpLogger.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/support/NoOpLogger.java index f8943528ec3..9338b2242d1 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/support/NoOpLogger.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/support/NoOpLogger.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.support; +package org.elasticsearch.xpack.core.security.support; import org.apache.logging.log4j.Level; import org.apache.logging.log4j.Logger; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/support/Validation.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/support/Validation.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/support/Validation.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/support/Validation.java index 7566ff0d6b8..55caed43411 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/support/Validation.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/support/Validation.java @@ -3,12 +3,12 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.support; +package org.elasticsearch.xpack.core.security.support; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.set.Sets; -import org.elasticsearch.xpack.security.authc.esnative.ClientReservedRealm; -import org.elasticsearch.xpack.security.authz.store.ReservedRolesStore; +import org.elasticsearch.xpack.core.security.authc.esnative.ClientReservedRealm; +import org.elasticsearch.xpack.core.security.authz.store.ReservedRolesStore; import java.util.Locale; import java.util.Set; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/transport/SSLExceptionHelper.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/transport/SSLExceptionHelper.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/transport/SSLExceptionHelper.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/transport/SSLExceptionHelper.java index 81d552f7ce5..ddc02ac55f7 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/transport/SSLExceptionHelper.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/transport/SSLExceptionHelper.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.transport; +package org.elasticsearch.xpack.core.security.transport; import io.netty.handler.codec.DecoderException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4Transport.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/transport/netty4/SecurityNetty4Transport.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4Transport.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/transport/netty4/SecurityNetty4Transport.java index fd420fc8fb9..a7ef1f0c02f 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4Transport.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/transport/netty4/SecurityNetty4Transport.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.transport.netty4; +package org.elasticsearch.xpack.core.security.transport.netty4; import io.netty.channel.Channel; import io.netty.channel.ChannelHandler; @@ -21,10 +21,10 @@ import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TcpChannel; import org.elasticsearch.transport.TcpTransport; import org.elasticsearch.transport.netty4.Netty4Transport; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.security.transport.SSLExceptionHelper; -import org.elasticsearch.xpack.ssl.SSLConfiguration; -import org.elasticsearch.xpack.ssl.SSLService; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.security.transport.SSLExceptionHelper; +import org.elasticsearch.xpack.core.ssl.SSLConfiguration; +import org.elasticsearch.xpack.core.ssl.SSLService; import javax.net.ssl.SSLEngine; @@ -34,7 +34,7 @@ import java.util.Collections; import java.util.HashMap; import java.util.Map; -import static org.elasticsearch.xpack.security.SecurityField.setting; +import static org.elasticsearch.xpack.core.security.SecurityField.setting; /** * Implementation of a transport that extends the {@link Netty4Transport} to add SSL and IP Filtering @@ -86,7 +86,7 @@ public class SecurityNetty4Transport extends Netty4Transport { } @Override - protected final ChannelHandler getServerChannelInitializer(String name) { + public final ChannelHandler getServerChannelInitializer(String name) { if (sslEnabled) { SSLConfiguration configuration = profileConfiguration.get(name); if (configuration == null) { diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/user/AnonymousUser.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/user/AnonymousUser.java similarity index 90% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/user/AnonymousUser.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/user/AnonymousUser.java index 8130e91d55b..36354ff58b3 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/user/AnonymousUser.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/user/AnonymousUser.java @@ -3,18 +3,18 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.user; +package org.elasticsearch.xpack.core.security.user; import org.elasticsearch.common.Strings; import org.elasticsearch.common.settings.Setting; import org.elasticsearch.common.settings.Setting.Property; import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.xpack.security.support.MetadataUtils; +import org.elasticsearch.xpack.core.security.support.MetadataUtils; import java.util.Collections; import java.util.List; -import static org.elasticsearch.xpack.security.SecurityField.setting; +import static org.elasticsearch.xpack.core.security.SecurityField.setting; /** * The user object for the anonymous user. diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/user/BuiltinUserInfo.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/user/BuiltinUserInfo.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/user/BuiltinUserInfo.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/user/BuiltinUserInfo.java index b54a7360e09..0ecd457ba09 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/user/BuiltinUserInfo.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/user/BuiltinUserInfo.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.user; +package org.elasticsearch.xpack.core.security.user; import org.elasticsearch.Version; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/user/ElasticUser.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/user/ElasticUser.java similarity index 86% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/user/ElasticUser.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/user/ElasticUser.java index 85fb6945089..ec618a4f482 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/user/ElasticUser.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/user/ElasticUser.java @@ -3,9 +3,9 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.user; +package org.elasticsearch.xpack.core.security.user; -import org.elasticsearch.xpack.security.support.MetadataUtils; +import org.elasticsearch.xpack.core.security.support.MetadataUtils; /** diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/user/InternalUserSerializationHelper.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/user/InternalUserSerializationHelper.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/user/InternalUserSerializationHelper.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/user/InternalUserSerializationHelper.java index 2c3c164eaa4..fa41828a7bb 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/user/InternalUserSerializationHelper.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/user/InternalUserSerializationHelper.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.user; +package org.elasticsearch.xpack.core.security.user; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/user/KibanaUser.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/user/KibanaUser.java similarity index 83% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/user/KibanaUser.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/user/KibanaUser.java index 861279277a5..8dfa149987d 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/user/KibanaUser.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/user/KibanaUser.java @@ -3,9 +3,9 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.user; +package org.elasticsearch.xpack.core.security.user; -import org.elasticsearch.xpack.security.support.MetadataUtils; +import org.elasticsearch.xpack.core.security.support.MetadataUtils; /** * Built in user for the kibana server diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/user/LogstashSystemUser.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/user/LogstashSystemUser.java similarity index 88% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/user/LogstashSystemUser.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/user/LogstashSystemUser.java index 9f613955dff..ce37d742a19 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/user/LogstashSystemUser.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/user/LogstashSystemUser.java @@ -3,10 +3,10 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.user; +package org.elasticsearch.xpack.core.security.user; import org.elasticsearch.Version; -import org.elasticsearch.xpack.security.support.MetadataUtils; +import org.elasticsearch.xpack.core.security.support.MetadataUtils; /** * Built in user for logstash internals. Currently used for Logstash monitoring. diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/user/SystemUser.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/user/SystemUser.java similarity index 90% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/user/SystemUser.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/user/SystemUser.java index c74ab069ded..4569c2a68a0 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/user/SystemUser.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/user/SystemUser.java @@ -3,9 +3,9 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.user; +package org.elasticsearch.xpack.core.security.user; -import org.elasticsearch.xpack.security.authz.privilege.SystemPrivilege; +import org.elasticsearch.xpack.core.security.authz.privilege.SystemPrivilege; import java.util.function.Predicate; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/user/User.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/user/User.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/user/User.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/user/User.java index 2e656cefea3..dbf39bb4781 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/user/User.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/user/User.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.user; +package org.elasticsearch.xpack.core.security.user; import org.elasticsearch.Version; import org.elasticsearch.common.ParseField; @@ -13,7 +13,7 @@ import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.security.support.MetadataUtils; +import org.elasticsearch.xpack.core.security.support.MetadataUtils; import java.io.IOException; import java.util.Arrays; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/user/UsernamesField.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/user/UsernamesField.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/user/UsernamesField.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/user/UsernamesField.java index b5c2ba90c36..7b3d4bb8dcb 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/user/UsernamesField.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/user/UsernamesField.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.user; +package org.elasticsearch.xpack.core.security.user; public final class UsernamesField { public static final String ELASTIC_NAME = "elastic"; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/user/XPackSecurityUser.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/user/XPackSecurityUser.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/user/XPackSecurityUser.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/user/XPackSecurityUser.java index dfac8ea1d41..906d3548377 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/user/XPackSecurityUser.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/user/XPackSecurityUser.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.user; +package org.elasticsearch.xpack.core.security.user; /** * internal user that manages xpack security. Has all cluster/indices permissions. diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/user/XPackUser.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/user/XPackUser.java similarity index 83% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/user/XPackUser.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/user/XPackUser.java index d5001c564d5..38c9fe84aa9 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/user/XPackUser.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/user/XPackUser.java @@ -3,12 +3,12 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.user; +package org.elasticsearch.xpack.core.security.user; -import org.elasticsearch.xpack.security.audit.index.IndexAuditTrailField; -import org.elasticsearch.xpack.security.authz.RoleDescriptor; -import org.elasticsearch.xpack.security.authz.permission.Role; -import org.elasticsearch.xpack.security.support.MetadataUtils; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor; +import org.elasticsearch.xpack.core.security.authz.permission.Role; +import org.elasticsearch.xpack.core.security.index.IndexAuditTrailField; +import org.elasticsearch.xpack.core.security.support.MetadataUtils; /** * XPack internal user that manages xpack. Has all cluster/indices permissions for x-pack to operate excluding security permissions. diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/common/xcontent/XContentUtils.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/xcontent/XContentUtils.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/common/xcontent/XContentUtils.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/security/xcontent/XContentUtils.java index c83c202f99f..c4ad5a9026a 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/common/xcontent/XContentUtils.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/xcontent/XContentUtils.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.common.xcontent; +package org.elasticsearch.xpack.core.security.xcontent; import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.common.xcontent.XContentParser; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/CertUtils.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/CertUtils.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ssl/CertUtils.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/CertUtils.java index 7d3c30b975c..bc677297a9e 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/CertUtils.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/CertUtils.java @@ -3,51 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ssl; - -import javax.net.ssl.KeyManager; -import javax.net.ssl.KeyManagerFactory; -import javax.net.ssl.TrustManager; -import javax.net.ssl.TrustManagerFactory; -import javax.net.ssl.X509ExtendedKeyManager; -import javax.net.ssl.X509ExtendedTrustManager; -import javax.security.auth.x500.X500Principal; -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.Reader; -import java.math.BigInteger; -import java.net.InetAddress; -import java.net.SocketException; -import java.nio.charset.StandardCharsets; -import java.nio.file.Files; -import java.nio.file.Path; -import java.security.Key; -import java.security.KeyPair; -import java.security.KeyPairGenerator; -import java.security.KeyStore; -import java.security.KeyStoreException; -import java.security.NoSuchAlgorithmException; -import java.security.PrivateKey; -import java.security.SecureRandom; -import java.security.UnrecoverableKeyException; -import java.security.cert.Certificate; -import java.security.cert.CertificateException; -import java.security.cert.CertificateFactory; -import java.security.cert.X509Certificate; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Enumeration; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.function.Function; -import java.util.function.Supplier; -import java.util.stream.Collectors; +package org.elasticsearch.xpack.core.ssl; import org.bouncycastle.asn1.ASN1Encodable; import org.bouncycastle.asn1.ASN1ObjectIdentifier; @@ -92,7 +48,52 @@ import org.elasticsearch.env.Environment; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; -import static org.elasticsearch.xpack.ssl.SSLConfigurationSettings.getKeyStoreType; +import javax.net.ssl.KeyManager; +import javax.net.ssl.KeyManagerFactory; +import javax.net.ssl.TrustManager; +import javax.net.ssl.TrustManagerFactory; +import javax.net.ssl.X509ExtendedKeyManager; +import javax.net.ssl.X509ExtendedTrustManager; +import javax.security.auth.x500.X500Principal; + +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.Reader; +import java.math.BigInteger; +import java.net.InetAddress; +import java.net.SocketException; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.security.Key; +import java.security.KeyPair; +import java.security.KeyPairGenerator; +import java.security.KeyStore; +import java.security.KeyStoreException; +import java.security.NoSuchAlgorithmException; +import java.security.PrivateKey; +import java.security.SecureRandom; +import java.security.UnrecoverableKeyException; +import java.security.cert.Certificate; +import java.security.cert.CertificateException; +import java.security.cert.CertificateFactory; +import java.security.cert.X509Certificate; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Enumeration; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import static org.elasticsearch.xpack.core.ssl.SSLConfigurationSettings.getKeyStoreType; /** * Utility methods that deal with {@link Certificate}, {@link KeyStore}, {@link X509ExtendedTrustManager}, {@link X509ExtendedKeyManager} @@ -413,7 +414,7 @@ public class CertUtils { /** * Generates a CA certificate */ - static X509Certificate generateCACertificate(X500Principal x500Principal, KeyPair keyPair, int days) + public static X509Certificate generateCACertificate(X500Principal x500Principal, KeyPair keyPair, int days) throws OperatorCreationException, CertificateException, CertIOException, NoSuchAlgorithmException { return generateSignedCertificate(x500Principal, null, keyPair, null, null, true, days); } @@ -509,7 +510,7 @@ public class CertUtils { /** * Gets a random serial for a certificate that is generated from a {@link SecureRandom} */ - static BigInteger getSerial() { + public static BigInteger getSerial() { SecureRandom random = new SecureRandom(); BigInteger serial = new BigInteger(SERIAL_BIT_LENGTH, random); assert serial.compareTo(BigInteger.valueOf(0L)) >= 0; @@ -519,7 +520,7 @@ public class CertUtils { /** * Generates a RSA key pair with the provided key size (in bits) */ - static KeyPair generateKeyPair(int keysize) throws NoSuchAlgorithmException { + public static KeyPair generateKeyPair(int keysize) throws NoSuchAlgorithmException { // generate a private key KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("RSA"); keyPairGenerator.initialize(keysize); @@ -529,7 +530,7 @@ public class CertUtils { /** * Converts the {@link InetAddress} objects into a {@link GeneralNames} object that is used to represent subject alternative names. */ - static GeneralNames getSubjectAlternativeNames(boolean resolveName, Set addresses) throws SocketException { + public static GeneralNames getSubjectAlternativeNames(boolean resolveName, Set addresses) throws SocketException { Set generalNameList = new HashSet<>(); for (InetAddress address : addresses) { if (address.isAnyLocalAddress()) { @@ -564,7 +565,7 @@ public class CertUtils { * This usage of using the {@code cn} OID as a Subject Alternative Name is non-standard and will not be * recognised by other X.509/TLS implementations. */ - static GeneralName createCommonName(String cn) { + public static GeneralName createCommonName(String cn) { final ASN1Encodable[] sequence = { new ASN1ObjectIdentifier(CN_OID), new DERTaggedObject(true, 0, new DERUTF8String(cn)) }; return new GeneralName(GeneralName.otherName, new DERSequence(sequence)); } diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/CertificateGenerateTool.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/CertificateGenerateTool.java similarity index 99% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ssl/CertificateGenerateTool.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/CertificateGenerateTool.java index df4c2a1a4df..f08aab25101 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/CertificateGenerateTool.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/CertificateGenerateTool.java @@ -3,37 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ssl; - -import javax.security.auth.x500.X500Principal; -import java.io.IOException; -import java.io.OutputStream; -import java.io.OutputStreamWriter; -import java.io.Reader; -import java.nio.charset.StandardCharsets; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.StandardOpenOption; -import java.nio.file.attribute.PosixFileAttributeView; -import java.nio.file.attribute.PosixFilePermission; -import java.security.KeyPair; -import java.security.KeyStore; -import java.security.PrivateKey; -import java.security.cert.Certificate; -import java.security.cert.X509Certificate; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.concurrent.atomic.AtomicReference; -import java.util.regex.Pattern; -import java.util.zip.ZipEntry; -import java.util.zip.ZipOutputStream; +package org.elasticsearch.xpack.core.ssl; import joptsimple.ArgumentAcceptingOptionSpec; import joptsimple.OptionSet; @@ -63,6 +33,37 @@ import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.env.Environment; +import javax.security.auth.x500.X500Principal; + +import java.io.IOException; +import java.io.OutputStream; +import java.io.OutputStreamWriter; +import java.io.Reader; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.StandardOpenOption; +import java.nio.file.attribute.PosixFileAttributeView; +import java.nio.file.attribute.PosixFilePermission; +import java.security.KeyPair; +import java.security.KeyStore; +import java.security.PrivateKey; +import java.security.cert.Certificate; +import java.security.cert.X509Certificate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.concurrent.atomic.AtomicReference; +import java.util.regex.Pattern; +import java.util.zip.ZipEntry; +import java.util.zip.ZipOutputStream; + /** * CLI tool to make generation of certificates or certificate requests easier for users * @deprecated Replaced by {@link CertificateTool} diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/CertificateTool.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/CertificateTool.java similarity index 99% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ssl/CertificateTool.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/CertificateTool.java index fba0006799a..1ef37cfdedf 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/CertificateTool.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/CertificateTool.java @@ -3,9 +3,43 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ssl; +package org.elasticsearch.xpack.core.ssl; + +import joptsimple.OptionParser; +import joptsimple.OptionSet; +import joptsimple.OptionSpec; +import joptsimple.OptionSpecBuilder; +import org.bouncycastle.asn1.DERIA5String; +import org.bouncycastle.asn1.x509.GeneralName; +import org.bouncycastle.asn1.x509.GeneralNames; +import org.bouncycastle.openssl.PEMEncryptor; +import org.bouncycastle.openssl.jcajce.JcaPEMWriter; +import org.bouncycastle.openssl.jcajce.JcePEMEncryptorBuilder; +import org.bouncycastle.pkcs.PKCS10CertificationRequest; +import org.elasticsearch.ExceptionsHelper; +import org.elasticsearch.cli.EnvironmentAwareCommand; +import org.elasticsearch.cli.ExitCodes; +import org.elasticsearch.cli.LoggingAwareMultiCommand; +import org.elasticsearch.cli.Terminal; +import org.elasticsearch.cli.Terminal.Verbosity; +import org.elasticsearch.cli.UserException; +import org.elasticsearch.common.CheckedConsumer; +import org.elasticsearch.common.CheckedFunction; +import org.elasticsearch.common.ParseField; +import org.elasticsearch.common.Strings; +import org.elasticsearch.common.SuppressForbidden; +import org.elasticsearch.common.io.PathUtils; +import org.elasticsearch.common.network.InetAddresses; +import org.elasticsearch.common.util.set.Sets; +import org.elasticsearch.common.xcontent.ConstructingObjectParser; +import org.elasticsearch.common.xcontent.NamedXContentRegistry; +import org.elasticsearch.common.xcontent.ObjectParser; +import org.elasticsearch.common.xcontent.XContentParser; +import org.elasticsearch.common.xcontent.XContentType; +import org.elasticsearch.env.Environment; import javax.security.auth.x500.X500Principal; + import java.io.IOException; import java.io.OutputStream; import java.io.OutputStreamWriter; @@ -41,40 +75,6 @@ import java.util.stream.Stream; import java.util.zip.ZipEntry; import java.util.zip.ZipOutputStream; -import joptsimple.OptionParser; -import joptsimple.OptionSet; -import joptsimple.OptionSpec; -import joptsimple.OptionSpecBuilder; -import org.bouncycastle.asn1.DERIA5String; -import org.bouncycastle.asn1.x509.GeneralName; -import org.bouncycastle.asn1.x509.GeneralNames; -import org.bouncycastle.openssl.PEMEncryptor; -import org.bouncycastle.openssl.jcajce.JcaPEMWriter; -import org.bouncycastle.openssl.jcajce.JcePEMEncryptorBuilder; -import org.bouncycastle.pkcs.PKCS10CertificationRequest; -import org.elasticsearch.ExceptionsHelper; -import org.elasticsearch.cli.EnvironmentAwareCommand; -import org.elasticsearch.cli.ExitCodes; -import org.elasticsearch.cli.LoggingAwareMultiCommand; -import org.elasticsearch.cli.MultiCommand; -import org.elasticsearch.cli.Terminal; -import org.elasticsearch.cli.Terminal.Verbosity; -import org.elasticsearch.cli.UserException; -import org.elasticsearch.common.CheckedConsumer; -import org.elasticsearch.common.CheckedFunction; -import org.elasticsearch.common.ParseField; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.SuppressForbidden; -import org.elasticsearch.common.io.PathUtils; -import org.elasticsearch.common.network.InetAddresses; -import org.elasticsearch.common.util.set.Sets; -import org.elasticsearch.common.xcontent.ConstructingObjectParser; -import org.elasticsearch.common.xcontent.NamedXContentRegistry; -import org.elasticsearch.common.xcontent.ObjectParser; -import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.env.Environment; - /** * CLI tool to make generation of certificates or certificate requests easier for users */ diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/CertificateTrustRestrictions.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/CertificateTrustRestrictions.java similarity index 91% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ssl/CertificateTrustRestrictions.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/CertificateTrustRestrictions.java index ff98df7141d..43a805cd4e0 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/CertificateTrustRestrictions.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/CertificateTrustRestrictions.java @@ -3,7 +3,9 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ssl; +package org.elasticsearch.xpack.core.ssl; + +import org.elasticsearch.xpack.core.security.support.Automatons; import java.util.Collection; import java.util.Collections; @@ -11,8 +13,6 @@ import java.util.Set; import java.util.function.Predicate; import java.util.stream.Collectors; -import org.elasticsearch.xpack.security.support.Automatons; - /** * Im memory representation of the trusted names for a "trust group". * diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/DefaultJDKTrustConfig.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/DefaultJDKTrustConfig.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ssl/DefaultJDKTrustConfig.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/DefaultJDKTrustConfig.java index c8967377b05..073fc06c137 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/DefaultJDKTrustConfig.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/DefaultJDKTrustConfig.java @@ -3,19 +3,19 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ssl; +package org.elasticsearch.xpack.core.ssl; import org.elasticsearch.ElasticsearchException; import org.elasticsearch.common.Nullable; import org.elasticsearch.env.Environment; -import org.elasticsearch.xpack.ssl.cert.CertificateInfo; +import org.elasticsearch.xpack.core.ssl.cert.CertificateInfo; import javax.net.ssl.TrustManagerFactory; import javax.net.ssl.X509ExtendedTrustManager; + import java.io.IOException; import java.nio.file.Path; import java.security.GeneralSecurityException; -import java.security.cert.X509Certificate; import java.util.Arrays; import java.util.Collection; import java.util.Collections; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/KeyConfig.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/KeyConfig.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ssl/KeyConfig.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/KeyConfig.java index bcac71d75d9..823f0da367e 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/KeyConfig.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/KeyConfig.java @@ -3,14 +3,15 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ssl; +package org.elasticsearch.xpack.core.ssl; import org.elasticsearch.common.Nullable; import org.elasticsearch.env.Environment; -import org.elasticsearch.xpack.ssl.cert.CertificateInfo; +import org.elasticsearch.xpack.core.ssl.cert.CertificateInfo; import javax.net.ssl.X509ExtendedKeyManager; import javax.net.ssl.X509ExtendedTrustManager; + import java.nio.file.Path; import java.security.PrivateKey; import java.util.Collection; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/PEMKeyConfig.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/PEMKeyConfig.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ssl/PEMKeyConfig.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/PEMKeyConfig.java index c7a4e724b2a..c130d69b917 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/PEMKeyConfig.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/PEMKeyConfig.java @@ -3,10 +3,17 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ssl; +package org.elasticsearch.xpack.core.ssl; + +import org.elasticsearch.ElasticsearchException; +import org.elasticsearch.common.Nullable; +import org.elasticsearch.common.settings.SecureString; +import org.elasticsearch.env.Environment; +import org.elasticsearch.xpack.core.ssl.cert.CertificateInfo; import javax.net.ssl.X509ExtendedKeyManager; import javax.net.ssl.X509ExtendedTrustManager; + import java.io.IOException; import java.io.Reader; import java.io.UncheckedIOException; @@ -26,12 +33,6 @@ import java.util.Collections; import java.util.List; import java.util.Objects; -import org.elasticsearch.ElasticsearchException; -import org.elasticsearch.common.Nullable; -import org.elasticsearch.common.settings.SecureString; -import org.elasticsearch.env.Environment; -import org.elasticsearch.xpack.ssl.cert.CertificateInfo; - /** * Implementation of a key configuration that is backed by a PEM encoded key file and one or more certificates */ diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/PEMTrustConfig.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/PEMTrustConfig.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ssl/PEMTrustConfig.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/PEMTrustConfig.java index 8c63743633e..e191d0e1547 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/PEMTrustConfig.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/PEMTrustConfig.java @@ -3,9 +3,16 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ssl; +package org.elasticsearch.xpack.core.ssl; + +import org.elasticsearch.ElasticsearchException; +import org.elasticsearch.common.Nullable; +import org.elasticsearch.common.Strings; +import org.elasticsearch.env.Environment; +import org.elasticsearch.xpack.core.ssl.cert.CertificateInfo; import javax.net.ssl.X509ExtendedTrustManager; + import java.io.IOException; import java.nio.file.Path; import java.security.cert.Certificate; @@ -17,12 +24,6 @@ import java.util.Collections; import java.util.List; import java.util.Objects; -import org.elasticsearch.ElasticsearchException; -import org.elasticsearch.common.Nullable; -import org.elasticsearch.common.Strings; -import org.elasticsearch.env.Environment; -import org.elasticsearch.xpack.ssl.cert.CertificateInfo; - /** * Implementation of trust configuration that is backed by PEM encoded certificate files. */ diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/RestrictedTrustConfig.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/RestrictedTrustConfig.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ssl/RestrictedTrustConfig.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/RestrictedTrustConfig.java index 11407c9f243..85022fde928 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/RestrictedTrustConfig.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/RestrictedTrustConfig.java @@ -3,9 +3,16 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ssl; +package org.elasticsearch.xpack.core.ssl; + +import org.elasticsearch.ElasticsearchException; +import org.elasticsearch.common.Nullable; +import org.elasticsearch.common.settings.Settings; +import org.elasticsearch.env.Environment; +import org.elasticsearch.xpack.core.ssl.cert.CertificateInfo; import javax.net.ssl.X509ExtendedTrustManager; + import java.io.IOException; import java.nio.file.Path; import java.security.GeneralSecurityException; @@ -15,12 +22,6 @@ import java.util.Collections; import java.util.List; import java.util.Objects; -import org.elasticsearch.ElasticsearchException; -import org.elasticsearch.common.Nullable; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.env.Environment; -import org.elasticsearch.xpack.ssl.cert.CertificateInfo; - /** * An implementation of {@link TrustConfig} that constructs a {@link RestrictedTrustManager}. * This implementation always wraps another TrustConfig to perform the diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/RestrictedTrustManager.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/RestrictedTrustManager.java similarity index 99% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ssl/RestrictedTrustManager.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/RestrictedTrustManager.java index e6921f5ec87..b7e20bf82f2 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/RestrictedTrustManager.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/RestrictedTrustManager.java @@ -3,10 +3,22 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ssl; +package org.elasticsearch.xpack.core.ssl; + +import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.message.ParameterizedMessage; +import org.bouncycastle.asn1.ASN1ObjectIdentifier; +import org.bouncycastle.asn1.ASN1Primitive; +import org.bouncycastle.asn1.ASN1Sequence; +import org.bouncycastle.asn1.ASN1String; +import org.bouncycastle.asn1.ASN1TaggedObject; +import org.bouncycastle.asn1.DERTaggedObject; +import org.elasticsearch.common.logging.ServerLoggers; +import org.elasticsearch.common.settings.Settings; import javax.net.ssl.SSLEngine; import javax.net.ssl.X509ExtendedTrustManager; + import java.net.Socket; import java.security.cert.CertificateException; import java.security.cert.CertificateParsingException; @@ -20,17 +32,6 @@ import java.util.Set; import java.util.function.Predicate; import java.util.stream.Collectors; -import org.apache.logging.log4j.Logger; -import org.apache.logging.log4j.message.ParameterizedMessage; -import org.bouncycastle.asn1.ASN1ObjectIdentifier; -import org.bouncycastle.asn1.ASN1Primitive; -import org.bouncycastle.asn1.ASN1Sequence; -import org.bouncycastle.asn1.ASN1String; -import org.bouncycastle.asn1.ASN1TaggedObject; -import org.bouncycastle.asn1.DERTaggedObject; -import org.elasticsearch.common.logging.ServerLoggers; -import org.elasticsearch.common.settings.Settings; - /** * An X509 trust manager that only trusts connections from a restricted set of predefined network entities (nodes, clients, etc). * The trusted entities are defined as a list of predicates on {@link CertificateTrustRestrictions} that are applied to the diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/SSLClientAuth.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/SSLClientAuth.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ssl/SSLClientAuth.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/SSLClientAuth.java index 1abbeb44e41..673f251deb6 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/SSLClientAuth.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/SSLClientAuth.java @@ -3,9 +3,10 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ssl; +package org.elasticsearch.xpack.core.ssl; import javax.net.ssl.SSLParameters; + import java.util.Locale; /** diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/SSLConfiguration.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/SSLConfiguration.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ssl/SSLConfiguration.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/SSLConfiguration.java index 4165851ce2a..a9ba62998bd 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/SSLConfiguration.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/SSLConfiguration.java @@ -3,28 +3,28 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ssl; - -import javax.net.ssl.KeyManagerFactory; -import javax.net.ssl.TrustManagerFactory; +package org.elasticsearch.xpack.core.ssl; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.settings.SecureString; import org.elasticsearch.common.settings.Setting; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.env.Environment; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.ssl.cert.CertificateInfo; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.ssl.cert.CertificateInfo; + +import javax.net.ssl.KeyManagerFactory; +import javax.net.ssl.TrustManagerFactory; -import static org.elasticsearch.xpack.ssl.SSLConfigurationSettings.getKeyStoreType; import java.io.IOException; import java.nio.file.Path; import java.security.GeneralSecurityException; -import java.security.cert.CertificateException; import java.util.ArrayList; import java.util.List; import java.util.Objects; +import static org.elasticsearch.xpack.core.ssl.SSLConfigurationSettings.getKeyStoreType; + /** * Represents the configuration for an SSLContext diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/SSLConfigurationReloader.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/SSLConfigurationReloader.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ssl/SSLConfigurationReloader.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/SSLConfigurationReloader.java index 77d9d9c2821..2217513c03f 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/SSLConfigurationReloader.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/SSLConfigurationReloader.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ssl; +package org.elasticsearch.xpack.core.ssl; import org.elasticsearch.common.component.AbstractComponent; import org.elasticsearch.common.settings.Settings; @@ -12,9 +12,9 @@ import org.elasticsearch.watcher.FileChangesListener; import org.elasticsearch.watcher.FileWatcher; import org.elasticsearch.watcher.ResourceWatcherService; import org.elasticsearch.watcher.ResourceWatcherService.Frequency; -import org.elasticsearch.xpack.ssl.SSLService.SSLContextHolder; import javax.net.ssl.SSLContext; + import java.io.IOException; import java.nio.file.Path; import java.util.Collection; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/SSLConfigurationSettings.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/SSLConfigurationSettings.java similarity index 99% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ssl/SSLConfigurationSettings.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/SSLConfigurationSettings.java index 3e5339d5e5d..8952619408b 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/SSLConfigurationSettings.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/SSLConfigurationSettings.java @@ -3,9 +3,17 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ssl; +package org.elasticsearch.xpack.core.ssl; + +import org.elasticsearch.common.settings.SecureSetting; +import org.elasticsearch.common.settings.SecureString; +import org.elasticsearch.common.settings.Setting; +import org.elasticsearch.common.settings.Setting.Property; +import org.elasticsearch.common.settings.Settings; +import org.elasticsearch.common.util.CollectionUtils; import javax.net.ssl.TrustManagerFactory; + import java.security.KeyStore; import java.util.Arrays; import java.util.Collection; @@ -15,13 +23,6 @@ import java.util.Locale; import java.util.Optional; import java.util.function.Function; -import org.elasticsearch.common.settings.SecureSetting; -import org.elasticsearch.common.settings.SecureString; -import org.elasticsearch.common.settings.Setting; -import org.elasticsearch.common.settings.Setting.Property; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.util.CollectionUtils; - /** * Bridges SSLConfiguration into the {@link Settings} framework, using {@link Setting} objects. */ diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/SSLService.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/SSLService.java similarity index 99% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ssl/SSLService.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/SSLService.java index 1b75291b9b6..c6fd0eca9c4 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/SSLService.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/SSLService.java @@ -3,7 +3,22 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ssl; +package org.elasticsearch.xpack.core.ssl; + +import org.apache.http.conn.ssl.NoopHostnameVerifier; +import org.apache.http.nio.conn.ssl.SSLIOSessionStrategy; +import org.apache.lucene.util.SetOnce; +import org.bouncycastle.operator.OperatorCreationException; +import org.elasticsearch.ElasticsearchException; +import org.elasticsearch.common.CheckedSupplier; +import org.elasticsearch.common.Strings; +import org.elasticsearch.common.component.AbstractComponent; +import org.elasticsearch.common.settings.Settings; +import org.elasticsearch.env.Environment; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.common.socket.SocketAccess; +import org.elasticsearch.xpack.core.security.SecurityField; +import org.elasticsearch.xpack.core.ssl.cert.CertificateInfo; import javax.net.ssl.HostnameVerifier; import javax.net.ssl.SSLContext; @@ -15,6 +30,7 @@ import javax.net.ssl.SSLSocketFactory; import javax.net.ssl.X509ExtendedKeyManager; import javax.net.ssl.X509ExtendedTrustManager; import javax.security.auth.DestroyFailedException; + import java.io.IOException; import java.net.InetAddress; import java.net.Socket; @@ -40,21 +56,6 @@ import java.util.Map; import java.util.Map.Entry; import java.util.Set; -import org.apache.http.conn.ssl.NoopHostnameVerifier; -import org.apache.http.nio.conn.ssl.SSLIOSessionStrategy; -import org.apache.lucene.util.SetOnce; -import org.bouncycastle.operator.OperatorCreationException; -import org.elasticsearch.ElasticsearchException; -import org.elasticsearch.common.CheckedSupplier; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.component.AbstractComponent; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.env.Environment; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.common.socket.SocketAccess; -import org.elasticsearch.xpack.security.SecurityField; -import org.elasticsearch.xpack.ssl.cert.CertificateInfo; - /** * Provides access to {@link SSLEngine} and {@link SSLSocketFactory} objects based on a provided configuration. All * configurations loaded by this service must be configured on construction. diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/StoreKeyConfig.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/StoreKeyConfig.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ssl/StoreKeyConfig.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/StoreKeyConfig.java index c28ac50d19f..ea9c9267d65 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/StoreKeyConfig.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/StoreKeyConfig.java @@ -3,10 +3,17 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ssl; +package org.elasticsearch.xpack.core.ssl; + +import org.elasticsearch.ElasticsearchException; +import org.elasticsearch.common.Nullable; +import org.elasticsearch.common.settings.SecureString; +import org.elasticsearch.env.Environment; +import org.elasticsearch.xpack.core.ssl.cert.CertificateInfo; import javax.net.ssl.X509ExtendedKeyManager; import javax.net.ssl.X509ExtendedTrustManager; + import java.io.IOException; import java.io.InputStream; import java.nio.file.Files; @@ -28,12 +35,6 @@ import java.util.Enumeration; import java.util.List; import java.util.Objects; -import org.elasticsearch.ElasticsearchException; -import org.elasticsearch.common.Nullable; -import org.elasticsearch.common.settings.SecureString; -import org.elasticsearch.env.Environment; -import org.elasticsearch.xpack.ssl.cert.CertificateInfo; - /** * A key configuration that is backed by a {@link KeyStore} */ diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/StoreTrustConfig.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/StoreTrustConfig.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ssl/StoreTrustConfig.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/StoreTrustConfig.java index 915add67fc4..9b06249000c 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/StoreTrustConfig.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/StoreTrustConfig.java @@ -3,9 +3,16 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ssl; +package org.elasticsearch.xpack.core.ssl; + +import org.elasticsearch.ElasticsearchException; +import org.elasticsearch.common.Nullable; +import org.elasticsearch.common.settings.SecureString; +import org.elasticsearch.env.Environment; +import org.elasticsearch.xpack.core.ssl.cert.CertificateInfo; import javax.net.ssl.X509ExtendedTrustManager; + import java.io.IOException; import java.nio.file.Path; import java.security.GeneralSecurityException; @@ -19,12 +26,6 @@ import java.util.Enumeration; import java.util.List; import java.util.Objects; -import org.elasticsearch.ElasticsearchException; -import org.elasticsearch.common.Nullable; -import org.elasticsearch.common.settings.SecureString; -import org.elasticsearch.env.Environment; -import org.elasticsearch.xpack.ssl.cert.CertificateInfo; - /** * Trust configuration that is backed by a {@link java.security.KeyStore} */ diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/TLSLicenseBootstrapCheck.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/TLSLicenseBootstrapCheck.java similarity index 93% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ssl/TLSLicenseBootstrapCheck.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/TLSLicenseBootstrapCheck.java index c18da907f65..f7a8c29a45a 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/TLSLicenseBootstrapCheck.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/TLSLicenseBootstrapCheck.java @@ -3,13 +3,13 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ssl; +package org.elasticsearch.xpack.core.ssl; import org.elasticsearch.bootstrap.BootstrapCheck; import org.elasticsearch.bootstrap.BootstrapContext; import org.elasticsearch.license.License; import org.elasticsearch.license.LicenseService; -import org.elasticsearch.xpack.XPackSettings; +import org.elasticsearch.xpack.core.XPackSettings; /** * Bootstrap check to ensure that if we are starting up with a production license in the local clusterstate TLS is enabled diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/TrustAllConfig.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/TrustAllConfig.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ssl/TrustAllConfig.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/TrustAllConfig.java index 029d931db90..cf6aa340b09 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/TrustAllConfig.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/TrustAllConfig.java @@ -3,14 +3,15 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ssl; +package org.elasticsearch.xpack.core.ssl; import org.elasticsearch.common.Nullable; import org.elasticsearch.env.Environment; -import org.elasticsearch.xpack.ssl.cert.CertificateInfo; +import org.elasticsearch.xpack.core.ssl.cert.CertificateInfo; import javax.net.ssl.SSLEngine; import javax.net.ssl.X509ExtendedTrustManager; + import java.io.IOException; import java.net.Socket; import java.nio.file.Path; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/TrustConfig.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/TrustConfig.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ssl/TrustConfig.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/TrustConfig.java index 8d795a57d90..b6f638f3b69 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/TrustConfig.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/TrustConfig.java @@ -3,9 +3,15 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ssl; +package org.elasticsearch.xpack.core.ssl; + +import org.elasticsearch.ElasticsearchException; +import org.elasticsearch.common.Nullable; +import org.elasticsearch.env.Environment; +import org.elasticsearch.xpack.core.ssl.cert.CertificateInfo; import javax.net.ssl.X509ExtendedTrustManager; + import java.io.IOException; import java.nio.file.Path; import java.security.GeneralSecurityException; @@ -18,11 +24,6 @@ import java.util.List; import java.util.Optional; import java.util.stream.Collectors; -import org.elasticsearch.ElasticsearchException; -import org.elasticsearch.common.Nullable; -import org.elasticsearch.env.Environment; -import org.elasticsearch.xpack.ssl.cert.CertificateInfo; - /** * The configuration of trust material for SSL usage */ diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/VerificationMode.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/VerificationMode.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ssl/VerificationMode.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/VerificationMode.java index 116b1d96aac..91667396140 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/VerificationMode.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/VerificationMode.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ssl; +package org.elasticsearch.xpack.core.ssl; import java.util.Locale; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/X509KeyPairSettings.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/X509KeyPairSettings.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ssl/X509KeyPairSettings.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/X509KeyPairSettings.java index 8374896dfb3..33b78b2da86 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/X509KeyPairSettings.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/X509KeyPairSettings.java @@ -3,11 +3,15 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ssl; +package org.elasticsearch.xpack.core.ssl; + +import org.elasticsearch.common.settings.SecureSetting; +import org.elasticsearch.common.settings.SecureString; +import org.elasticsearch.common.settings.Setting; +import org.elasticsearch.common.util.CollectionUtils; import javax.net.ssl.KeyManagerFactory; -import javax.net.ssl.TrustManagerFactory; -import javax.net.ssl.X509ExtendedKeyManager; + import java.security.KeyStore; import java.util.Collection; import java.util.Collections; @@ -15,16 +19,6 @@ import java.util.List; import java.util.Optional; import java.util.function.Function; -import org.elasticsearch.common.Nullable; -import org.elasticsearch.common.settings.SecureSetting; -import org.elasticsearch.common.settings.SecureString; -import org.elasticsearch.common.settings.Setting; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.util.CollectionUtils; -import org.elasticsearch.env.Environment; - -import static org.elasticsearch.xpack.ssl.SSLConfigurationSettings.getKeyStoreType; - /** * An encapsulation of the configuration options for X.509 Key Pair support in X-Pack security. * The most common use is as the private key and associated certificate for SSL/TLS support, but it can also be used for providing diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/action/GetCertificateInfoAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/action/GetCertificateInfoAction.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ssl/action/GetCertificateInfoAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/action/GetCertificateInfoAction.java index 83250884595..54e7548b803 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/action/GetCertificateInfoAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/action/GetCertificateInfoAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ssl.action; +package org.elasticsearch.xpack.core.ssl.action; import org.elasticsearch.action.Action; import org.elasticsearch.action.ActionRequest; @@ -15,7 +15,7 @@ import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.ssl.cert.CertificateInfo; +import org.elasticsearch.xpack.core.ssl.cert.CertificateInfo; import java.io.IOException; import java.util.ArrayList; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/action/TransportGetCertificateInfoAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/action/TransportGetCertificateInfoAction.java similarity index 92% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ssl/action/TransportGetCertificateInfoAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/action/TransportGetCertificateInfoAction.java index ca99436bce6..3670efeeeee 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/action/TransportGetCertificateInfoAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/action/TransportGetCertificateInfoAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ssl.action; +package org.elasticsearch.xpack.core.ssl.action; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.support.ActionFilters; @@ -13,8 +13,8 @@ import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.ssl.SSLService; -import org.elasticsearch.xpack.ssl.cert.CertificateInfo; +import org.elasticsearch.xpack.core.ssl.SSLService; +import org.elasticsearch.xpack.core.ssl.cert.CertificateInfo; import java.io.IOException; import java.security.GeneralSecurityException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/cert/CertificateInfo.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/cert/CertificateInfo.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ssl/cert/CertificateInfo.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/cert/CertificateInfo.java index ff8b8df00de..d19a9909ab8 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/cert/CertificateInfo.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/cert/CertificateInfo.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ssl.cert; +package org.elasticsearch.xpack.core.ssl.cert; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/rest/RestGetCertificateInfoAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/rest/RestGetCertificateInfoAction.java similarity index 88% rename from plugin/core/src/main/java/org/elasticsearch/xpack/ssl/rest/RestGetCertificateInfoAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/rest/RestGetCertificateInfoAction.java index c228ed127cf..d7d7d7042ed 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/rest/RestGetCertificateInfoAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/rest/RestGetCertificateInfoAction.java @@ -3,11 +3,8 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ssl.rest; +package org.elasticsearch.xpack.core.ssl.rest; -import java.io.IOException; - -import org.elasticsearch.client.ElasticsearchClient; import org.elasticsearch.client.node.NodeClient; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentBuilder; @@ -18,8 +15,10 @@ import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.RestResponse; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.rest.action.RestBuilderListener; -import org.elasticsearch.xpack.ssl.action.GetCertificateInfoAction; -import org.elasticsearch.xpack.ssl.action.GetCertificateInfoAction.Response; +import org.elasticsearch.xpack.core.ssl.action.GetCertificateInfoAction; +import org.elasticsearch.xpack.core.ssl.action.GetCertificateInfoAction.Response; + +import java.io.IOException; import static org.elasticsearch.rest.RestRequest.Method.GET; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/template/TemplateUtils.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/template/TemplateUtils.java similarity index 99% rename from plugin/core/src/main/java/org/elasticsearch/xpack/template/TemplateUtils.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/template/TemplateUtils.java index 87ef0e5f653..b936b0969c2 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/template/TemplateUtils.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/template/TemplateUtils.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.template; +package org.elasticsearch.xpack.core.template; import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.message.ParameterizedMessage; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/upgrade/IndexUpgradeCheckVersion.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/upgrade/IndexUpgradeCheckVersion.java similarity index 89% rename from plugin/core/src/main/java/org/elasticsearch/xpack/upgrade/IndexUpgradeCheckVersion.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/upgrade/IndexUpgradeCheckVersion.java index 50c35df1c36..e09f73a688e 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/upgrade/IndexUpgradeCheckVersion.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/upgrade/IndexUpgradeCheckVersion.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.upgrade; +package org.elasticsearch.xpack.core.upgrade; public final class IndexUpgradeCheckVersion { public static final int UPRADE_VERSION = 6; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/upgrade/IndexUpgradeServiceFields.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/upgrade/IndexUpgradeServiceFields.java similarity index 91% rename from plugin/core/src/main/java/org/elasticsearch/xpack/upgrade/IndexUpgradeServiceFields.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/upgrade/IndexUpgradeServiceFields.java index 280b4e3d0b2..e666ab89f53 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/upgrade/IndexUpgradeServiceFields.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/upgrade/IndexUpgradeServiceFields.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.upgrade; +package org.elasticsearch.xpack.core.upgrade; import org.elasticsearch.action.support.IndicesOptions; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/upgrade/UpgradeActionRequired.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/upgrade/UpgradeActionRequired.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/upgrade/UpgradeActionRequired.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/upgrade/UpgradeActionRequired.java index e724ae66f78..1bc4d92f33d 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/upgrade/UpgradeActionRequired.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/upgrade/UpgradeActionRequired.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.upgrade; +package org.elasticsearch.xpack.core.upgrade; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/upgrade/UpgradeField.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/upgrade/UpgradeField.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/upgrade/UpgradeField.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/upgrade/UpgradeField.java index c558360dd27..48060c57725 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/upgrade/UpgradeField.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/upgrade/UpgradeField.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.upgrade; +package org.elasticsearch.xpack.core.upgrade; import org.elasticsearch.cluster.metadata.IndexMetaData; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/upgrade/actions/IndexUpgradeAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/upgrade/actions/IndexUpgradeAction.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/upgrade/actions/IndexUpgradeAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/upgrade/actions/IndexUpgradeAction.java index 7daa9525bd1..f5b5844e5f2 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/upgrade/actions/IndexUpgradeAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/upgrade/actions/IndexUpgradeAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.upgrade.actions; +package org.elasticsearch.xpack.core.upgrade.actions; import org.elasticsearch.action.Action; import org.elasticsearch.action.ActionRequestValidationException; @@ -24,7 +24,7 @@ import java.util.Map; import java.util.Objects; import static org.elasticsearch.action.ValidateActions.addValidationError; -import static org.elasticsearch.xpack.upgrade.IndexUpgradeServiceFields.UPGRADE_INDEX_OPTIONS; +import static org.elasticsearch.xpack.core.upgrade.IndexUpgradeServiceFields.UPGRADE_INDEX_OPTIONS; public class IndexUpgradeAction extends Action { diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/upgrade/actions/IndexUpgradeInfoAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/upgrade/actions/IndexUpgradeInfoAction.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/upgrade/actions/IndexUpgradeInfoAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/upgrade/actions/IndexUpgradeInfoAction.java index 2076ebca294..74df1caecdd 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/upgrade/actions/IndexUpgradeInfoAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/upgrade/actions/IndexUpgradeInfoAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.upgrade.actions; +package org.elasticsearch.xpack.core.upgrade.actions; import org.elasticsearch.action.Action; import org.elasticsearch.action.ActionRequestValidationException; @@ -17,7 +17,7 @@ import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.upgrade.UpgradeActionRequired; +import org.elasticsearch.xpack.core.upgrade.UpgradeActionRequired; import java.io.IOException; import java.util.Arrays; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/WatcherFeatureSetUsage.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/WatcherFeatureSetUsage.java similarity index 90% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/WatcherFeatureSetUsage.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/WatcherFeatureSetUsage.java index 27cdb827d23..393c05b8fb3 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/WatcherFeatureSetUsage.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/WatcherFeatureSetUsage.java @@ -3,13 +3,13 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher; +package org.elasticsearch.xpack.core.watcher; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.XPackFeatureSet; -import org.elasticsearch.xpack.XPackField; +import org.elasticsearch.xpack.core.XPackFeatureSet; +import org.elasticsearch.xpack.core.XPackField; import java.io.IOException; import java.util.Map; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/WatcherField.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/WatcherField.java similarity index 92% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/WatcherField.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/WatcherField.java index 598caf1e7bf..b7ad6ee423d 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/WatcherField.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/WatcherField.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher; +package org.elasticsearch.xpack.core.watcher; import org.elasticsearch.common.settings.SecureSetting; import org.elasticsearch.common.settings.Setting; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/WatcherMetaData.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/WatcherMetaData.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/WatcherMetaData.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/WatcherMetaData.java index 96a415744db..a90d12e249f 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/WatcherMetaData.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/WatcherMetaData.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher; +package org.elasticsearch.xpack.core.watcher; import org.elasticsearch.cluster.AbstractNamedDiffable; import org.elasticsearch.cluster.NamedDiff; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/WatcherState.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/WatcherState.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/WatcherState.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/WatcherState.java index 39896519bb8..ac7002667df 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/WatcherState.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/WatcherState.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher; +package org.elasticsearch.xpack.core.watcher; /** * Encapsulates the state of the watcher plugin. diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/actions/Action.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/actions/Action.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/actions/Action.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/actions/Action.java index f50803a06de..3fe07dddacb 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/actions/Action.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/actions/Action.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.actions; +package org.elasticsearch.xpack.core.watcher.actions; import org.elasticsearch.ElasticsearchException; import org.elasticsearch.common.ParseField; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/actions/ActionFactory.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/actions/ActionFactory.java similarity index 93% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/actions/ActionFactory.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/actions/ActionFactory.java index 84213c267c8..3618b2de408 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/actions/ActionFactory.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/actions/ActionFactory.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.actions; +package org.elasticsearch.xpack.core.watcher.actions; import org.apache.logging.log4j.Logger; import org.elasticsearch.common.xcontent.XContentParser; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/actions/ActionRegistry.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/actions/ActionRegistry.java similarity index 91% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/actions/ActionRegistry.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/actions/ActionRegistry.java index 74b6a9098c3..37a639ca822 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/actions/ActionRegistry.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/actions/ActionRegistry.java @@ -3,14 +3,14 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.actions; +package org.elasticsearch.xpack.core.watcher.actions; import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.license.XPackLicenseState; -import org.elasticsearch.xpack.watcher.condition.ConditionRegistry; -import org.elasticsearch.xpack.watcher.support.WatcherUtils; -import org.elasticsearch.xpack.watcher.transform.TransformRegistry; +import org.elasticsearch.xpack.core.watcher.condition.ConditionRegistry; +import org.elasticsearch.xpack.core.watcher.support.WatcherUtils; +import org.elasticsearch.xpack.core.watcher.transform.TransformRegistry; import java.io.IOException; import java.time.Clock; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/actions/ActionStatus.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/actions/ActionStatus.java similarity index 98% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/actions/ActionStatus.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/actions/ActionStatus.java index 6ca07e9759a..fcd52842456 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/actions/ActionStatus.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/actions/ActionStatus.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.actions; +package org.elasticsearch.xpack.core.watcher.actions; import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.common.Nullable; @@ -20,8 +20,8 @@ import java.io.IOException; import java.util.Locale; import java.util.Objects; -import static org.elasticsearch.xpack.watcher.support.Exceptions.illegalArgument; -import static org.elasticsearch.xpack.watcher.support.WatcherDateTimeUtils.dateTimeFormatter; +import static org.elasticsearch.xpack.core.watcher.support.Exceptions.illegalArgument; +import static org.elasticsearch.xpack.core.watcher.support.WatcherDateTimeUtils.dateTimeFormatter; public class ActionStatus implements ToXContentObject { diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/actions/ActionWrapper.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/actions/ActionWrapper.java similarity index 92% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/actions/ActionWrapper.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/actions/ActionWrapper.java index 2a98a80bf7e..919657883fe 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/actions/ActionWrapper.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/actions/ActionWrapper.java @@ -3,29 +3,28 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.actions; +package org.elasticsearch.xpack.core.watcher.actions; import org.apache.logging.log4j.message.ParameterizedMessage; import org.apache.logging.log4j.util.Supplier; import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.common.Nullable; -import org.elasticsearch.common.ParseField; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.license.XPackLicenseState; -import org.elasticsearch.xpack.watcher.actions.throttler.ActionThrottler; -import org.elasticsearch.xpack.watcher.actions.throttler.Throttler; -import org.elasticsearch.xpack.watcher.actions.throttler.ThrottlerField; -import org.elasticsearch.xpack.watcher.condition.Condition; -import org.elasticsearch.xpack.watcher.condition.ExecutableCondition; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; -import org.elasticsearch.xpack.watcher.support.WatcherDateTimeUtils; -import org.elasticsearch.xpack.watcher.transform.ExecutableTransform; -import org.elasticsearch.xpack.watcher.transform.Transform; -import org.elasticsearch.xpack.watcher.watch.Payload; -import org.elasticsearch.xpack.watcher.watch.WatchField; +import org.elasticsearch.xpack.core.watcher.actions.throttler.ActionThrottler; +import org.elasticsearch.xpack.core.watcher.actions.throttler.Throttler; +import org.elasticsearch.xpack.core.watcher.actions.throttler.ThrottlerField; +import org.elasticsearch.xpack.core.watcher.condition.Condition; +import org.elasticsearch.xpack.core.watcher.condition.ExecutableCondition; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.support.WatcherDateTimeUtils; +import org.elasticsearch.xpack.core.watcher.transform.ExecutableTransform; +import org.elasticsearch.xpack.core.watcher.transform.Transform; +import org.elasticsearch.xpack.core.watcher.watch.Payload; +import org.elasticsearch.xpack.core.watcher.watch.WatchField; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/actions/ActionWrapperField.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/actions/ActionWrapperField.java similarity index 91% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/actions/ActionWrapperField.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/actions/ActionWrapperField.java index 385fe651c00..f3a45e4c11c 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/actions/ActionWrapperField.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/actions/ActionWrapperField.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.actions; +package org.elasticsearch.xpack.core.watcher.actions; import org.elasticsearch.common.ParseField; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/actions/ActionWrapperResult.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/actions/ActionWrapperResult.java similarity index 91% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/actions/ActionWrapperResult.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/actions/ActionWrapperResult.java index 47ea2cabc37..f2a29e159c0 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/actions/ActionWrapperResult.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/actions/ActionWrapperResult.java @@ -3,14 +3,14 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.actions; +package org.elasticsearch.xpack.core.watcher.actions; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.watcher.condition.Condition; -import org.elasticsearch.xpack.watcher.transform.Transform; -import org.elasticsearch.xpack.watcher.watch.WatchField; +import org.elasticsearch.xpack.core.watcher.condition.Condition; +import org.elasticsearch.xpack.core.watcher.transform.Transform; +import org.elasticsearch.xpack.core.watcher.watch.WatchField; import java.io.IOException; import java.util.Objects; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/actions/ExecutableAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/actions/ExecutableAction.java similarity index 89% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/actions/ExecutableAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/actions/ExecutableAction.java index a610f65e044..457f10249e5 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/actions/ExecutableAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/actions/ExecutableAction.java @@ -3,13 +3,13 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.actions; +package org.elasticsearch.xpack.core.watcher.actions; import org.apache.logging.log4j.Logger; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; -import org.elasticsearch.xpack.watcher.watch.Payload; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import java.io.IOException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/actions/throttler/AckThrottler.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/actions/throttler/AckThrottler.java similarity index 61% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/actions/throttler/AckThrottler.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/actions/throttler/AckThrottler.java index b7e8ce6097b..370e77dcb2e 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/actions/throttler/AckThrottler.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/actions/throttler/AckThrottler.java @@ -3,14 +3,14 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.actions.throttler; +package org.elasticsearch.xpack.core.watcher.actions.throttler; -import org.elasticsearch.xpack.watcher.actions.ActionStatus; -import org.elasticsearch.xpack.watcher.actions.ActionStatus.AckStatus; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.actions.ActionStatus; +import org.elasticsearch.xpack.core.watcher.actions.ActionStatus.AckStatus; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; -import static org.elasticsearch.xpack.watcher.actions.throttler.Throttler.Type.ACK; -import static org.elasticsearch.xpack.watcher.support.WatcherDateTimeUtils.formatDate; +import static org.elasticsearch.xpack.core.watcher.actions.throttler.Throttler.Type.ACK; +import static org.elasticsearch.xpack.core.watcher.support.WatcherDateTimeUtils.formatDate; public class AckThrottler implements Throttler { diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/actions/throttler/ActionThrottler.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/actions/throttler/ActionThrottler.java similarity index 88% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/actions/throttler/ActionThrottler.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/actions/throttler/ActionThrottler.java index bddeb68a191..d02ee20def0 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/actions/throttler/ActionThrottler.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/actions/throttler/ActionThrottler.java @@ -3,16 +3,16 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.actions.throttler; +package org.elasticsearch.xpack.core.watcher.actions.throttler; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.license.XPackLicenseState; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; import java.time.Clock; -import static org.elasticsearch.xpack.watcher.actions.throttler.Throttler.Type.LICENSE; +import static org.elasticsearch.xpack.core.watcher.actions.throttler.Throttler.Type.LICENSE; public class ActionThrottler implements Throttler { diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/actions/throttler/PeriodThrottler.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/actions/throttler/PeriodThrottler.java similarity index 88% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/actions/throttler/PeriodThrottler.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/actions/throttler/PeriodThrottler.java index 5fcc7baeb97..3985d7da59c 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/actions/throttler/PeriodThrottler.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/actions/throttler/PeriodThrottler.java @@ -3,17 +3,17 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.actions.throttler; +package org.elasticsearch.xpack.core.watcher.actions.throttler; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.xpack.watcher.actions.ActionStatus; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.actions.ActionStatus; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; import org.joda.time.PeriodType; import java.time.Clock; -import static org.elasticsearch.xpack.watcher.actions.throttler.Throttler.Type.PERIOD; +import static org.elasticsearch.xpack.core.watcher.actions.throttler.Throttler.Type.PERIOD; /** * This throttler throttles the action based on its last successful execution time. If the time passed since diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/actions/throttler/Throttler.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/actions/throttler/Throttler.java similarity index 87% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/actions/throttler/Throttler.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/actions/throttler/Throttler.java index 9080314f1cb..af0b8ae02c5 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/actions/throttler/Throttler.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/actions/throttler/Throttler.java @@ -3,13 +3,12 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.actions.throttler; +package org.elasticsearch.xpack.core.watcher.actions.throttler; -import org.elasticsearch.common.ParseField; import org.elasticsearch.common.logging.LoggerMessageFormat; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; -import static org.elasticsearch.xpack.watcher.actions.throttler.Throttler.Type.NONE; +import static org.elasticsearch.xpack.core.watcher.actions.throttler.Throttler.Type.NONE; public interface Throttler { diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/actions/throttler/ThrottlerField.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/actions/throttler/ThrottlerField.java similarity index 89% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/actions/throttler/ThrottlerField.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/actions/throttler/ThrottlerField.java index 77833475f95..7d0e6698f91 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/actions/throttler/ThrottlerField.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/actions/throttler/ThrottlerField.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.actions.throttler; +package org.elasticsearch.xpack.core.watcher.actions.throttler; import org.elasticsearch.common.ParseField; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/client/WatchSourceBuilder.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/client/WatchSourceBuilder.java similarity index 91% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/client/WatchSourceBuilder.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/client/WatchSourceBuilder.java index 409cd1e406d..ee79eddde58 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/client/WatchSourceBuilder.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/client/WatchSourceBuilder.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.client; +package org.elasticsearch.xpack.core.watcher.client; import org.elasticsearch.ElasticsearchException; import org.elasticsearch.common.Nullable; @@ -14,17 +14,17 @@ import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentHelper; import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.xpack.watcher.actions.Action; -import org.elasticsearch.xpack.watcher.actions.throttler.ThrottlerField; -import org.elasticsearch.xpack.watcher.condition.AlwaysCondition; -import org.elasticsearch.xpack.watcher.condition.Condition; -import org.elasticsearch.xpack.watcher.input.Input; -import org.elasticsearch.xpack.watcher.input.none.NoneInput; -import org.elasticsearch.xpack.watcher.support.Exceptions; -import org.elasticsearch.xpack.watcher.support.xcontent.XContentSource; -import org.elasticsearch.xpack.watcher.transform.Transform; -import org.elasticsearch.xpack.watcher.trigger.Trigger; -import org.elasticsearch.xpack.watcher.watch.WatchField; +import org.elasticsearch.xpack.core.watcher.actions.Action; +import org.elasticsearch.xpack.core.watcher.actions.throttler.ThrottlerField; +import org.elasticsearch.xpack.core.watcher.condition.AlwaysCondition; +import org.elasticsearch.xpack.core.watcher.condition.Condition; +import org.elasticsearch.xpack.core.watcher.input.Input; +import org.elasticsearch.xpack.core.watcher.input.none.NoneInput; +import org.elasticsearch.xpack.core.watcher.support.Exceptions; +import org.elasticsearch.xpack.core.watcher.support.xcontent.XContentSource; +import org.elasticsearch.xpack.core.watcher.transform.Transform; +import org.elasticsearch.xpack.core.watcher.trigger.Trigger; +import org.elasticsearch.xpack.core.watcher.watch.WatchField; import java.io.IOException; import java.util.HashMap; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/client/WatcherClient.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/client/WatcherClient.java similarity index 76% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/client/WatcherClient.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/client/WatcherClient.java index c68ca2598a6..10c4f0fffc3 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/client/WatcherClient.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/client/WatcherClient.java @@ -3,43 +3,43 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.client; +package org.elasticsearch.xpack.core.watcher.client; import org.elasticsearch.action.ActionFuture; import org.elasticsearch.action.ActionListener; import org.elasticsearch.client.Client; -import org.elasticsearch.xpack.watcher.transport.actions.ack.AckWatchAction; -import org.elasticsearch.xpack.watcher.transport.actions.ack.AckWatchRequest; -import org.elasticsearch.xpack.watcher.transport.actions.ack.AckWatchRequestBuilder; -import org.elasticsearch.xpack.watcher.transport.actions.ack.AckWatchResponse; -import org.elasticsearch.xpack.watcher.transport.actions.activate.ActivateWatchAction; -import org.elasticsearch.xpack.watcher.transport.actions.activate.ActivateWatchRequest; -import org.elasticsearch.xpack.watcher.transport.actions.activate.ActivateWatchRequestBuilder; -import org.elasticsearch.xpack.watcher.transport.actions.activate.ActivateWatchResponse; -import org.elasticsearch.xpack.watcher.transport.actions.delete.DeleteWatchAction; -import org.elasticsearch.xpack.watcher.transport.actions.delete.DeleteWatchRequest; -import org.elasticsearch.xpack.watcher.transport.actions.delete.DeleteWatchRequestBuilder; -import org.elasticsearch.xpack.watcher.transport.actions.delete.DeleteWatchResponse; -import org.elasticsearch.xpack.watcher.transport.actions.execute.ExecuteWatchAction; -import org.elasticsearch.xpack.watcher.transport.actions.execute.ExecuteWatchRequest; -import org.elasticsearch.xpack.watcher.transport.actions.execute.ExecuteWatchRequestBuilder; -import org.elasticsearch.xpack.watcher.transport.actions.execute.ExecuteWatchResponse; -import org.elasticsearch.xpack.watcher.transport.actions.get.GetWatchAction; -import org.elasticsearch.xpack.watcher.transport.actions.get.GetWatchRequest; -import org.elasticsearch.xpack.watcher.transport.actions.get.GetWatchRequestBuilder; -import org.elasticsearch.xpack.watcher.transport.actions.get.GetWatchResponse; -import org.elasticsearch.xpack.watcher.transport.actions.put.PutWatchAction; -import org.elasticsearch.xpack.watcher.transport.actions.put.PutWatchRequest; -import org.elasticsearch.xpack.watcher.transport.actions.put.PutWatchRequestBuilder; -import org.elasticsearch.xpack.watcher.transport.actions.put.PutWatchResponse; -import org.elasticsearch.xpack.watcher.transport.actions.service.WatcherServiceAction; -import org.elasticsearch.xpack.watcher.transport.actions.service.WatcherServiceRequest; -import org.elasticsearch.xpack.watcher.transport.actions.service.WatcherServiceRequestBuilder; -import org.elasticsearch.xpack.watcher.transport.actions.service.WatcherServiceResponse; -import org.elasticsearch.xpack.watcher.transport.actions.stats.WatcherStatsAction; -import org.elasticsearch.xpack.watcher.transport.actions.stats.WatcherStatsRequest; -import org.elasticsearch.xpack.watcher.transport.actions.stats.WatcherStatsRequestBuilder; -import org.elasticsearch.xpack.watcher.transport.actions.stats.WatcherStatsResponse; +import org.elasticsearch.xpack.core.watcher.transport.actions.ack.AckWatchAction; +import org.elasticsearch.xpack.core.watcher.transport.actions.ack.AckWatchRequest; +import org.elasticsearch.xpack.core.watcher.transport.actions.ack.AckWatchRequestBuilder; +import org.elasticsearch.xpack.core.watcher.transport.actions.ack.AckWatchResponse; +import org.elasticsearch.xpack.core.watcher.transport.actions.activate.ActivateWatchAction; +import org.elasticsearch.xpack.core.watcher.transport.actions.activate.ActivateWatchRequest; +import org.elasticsearch.xpack.core.watcher.transport.actions.activate.ActivateWatchRequestBuilder; +import org.elasticsearch.xpack.core.watcher.transport.actions.activate.ActivateWatchResponse; +import org.elasticsearch.xpack.core.watcher.transport.actions.delete.DeleteWatchAction; +import org.elasticsearch.xpack.core.watcher.transport.actions.delete.DeleteWatchRequest; +import org.elasticsearch.xpack.core.watcher.transport.actions.delete.DeleteWatchRequestBuilder; +import org.elasticsearch.xpack.core.watcher.transport.actions.delete.DeleteWatchResponse; +import org.elasticsearch.xpack.core.watcher.transport.actions.execute.ExecuteWatchAction; +import org.elasticsearch.xpack.core.watcher.transport.actions.execute.ExecuteWatchRequest; +import org.elasticsearch.xpack.core.watcher.transport.actions.execute.ExecuteWatchRequestBuilder; +import org.elasticsearch.xpack.core.watcher.transport.actions.execute.ExecuteWatchResponse; +import org.elasticsearch.xpack.core.watcher.transport.actions.get.GetWatchAction; +import org.elasticsearch.xpack.core.watcher.transport.actions.get.GetWatchRequest; +import org.elasticsearch.xpack.core.watcher.transport.actions.get.GetWatchRequestBuilder; +import org.elasticsearch.xpack.core.watcher.transport.actions.get.GetWatchResponse; +import org.elasticsearch.xpack.core.watcher.transport.actions.put.PutWatchAction; +import org.elasticsearch.xpack.core.watcher.transport.actions.put.PutWatchRequest; +import org.elasticsearch.xpack.core.watcher.transport.actions.put.PutWatchRequestBuilder; +import org.elasticsearch.xpack.core.watcher.transport.actions.put.PutWatchResponse; +import org.elasticsearch.xpack.core.watcher.transport.actions.service.WatcherServiceAction; +import org.elasticsearch.xpack.core.watcher.transport.actions.service.WatcherServiceRequest; +import org.elasticsearch.xpack.core.watcher.transport.actions.service.WatcherServiceRequestBuilder; +import org.elasticsearch.xpack.core.watcher.transport.actions.service.WatcherServiceResponse; +import org.elasticsearch.xpack.core.watcher.transport.actions.stats.WatcherStatsAction; +import org.elasticsearch.xpack.core.watcher.transport.actions.stats.WatcherStatsRequest; +import org.elasticsearch.xpack.core.watcher.transport.actions.stats.WatcherStatsRequestBuilder; +import org.elasticsearch.xpack.core.watcher.transport.actions.stats.WatcherStatsResponse; import java.util.Map; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/common/secret/Secret.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/common/secret/Secret.java similarity index 88% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/common/secret/Secret.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/common/secret/Secret.java index 1832e1fcae9..46ecd299c81 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/common/secret/Secret.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/common/secret/Secret.java @@ -3,9 +3,9 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.common.secret; +package org.elasticsearch.xpack.core.watcher.common.secret; -import org.elasticsearch.xpack.watcher.crypto.CryptoService; +import org.elasticsearch.xpack.core.watcher.crypto.CryptoService; import java.io.IOException; import java.util.Arrays; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/common/xcontent/XContentUtils.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/common/xcontent/XContentUtils.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/common/xcontent/XContentUtils.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/common/xcontent/XContentUtils.java index c82977c988d..da8ac3ef9d8 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/common/xcontent/XContentUtils.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/common/xcontent/XContentUtils.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.common.xcontent; +package org.elasticsearch.xpack.core.watcher.common.xcontent; import org.elasticsearch.common.xcontent.XContentParser; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/condition/AlwaysCondition.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/condition/AlwaysCondition.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/condition/AlwaysCondition.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/condition/AlwaysCondition.java index e33254da448..20aafa7c276 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/condition/AlwaysCondition.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/condition/AlwaysCondition.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.condition; +package org.elasticsearch.xpack.core.watcher.condition; import org.elasticsearch.common.xcontent.XContentBuilder; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/condition/Condition.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/condition/Condition.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/condition/Condition.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/condition/Condition.java index 70c44d73076..c21f906685f 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/condition/Condition.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/condition/Condition.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.condition; +package org.elasticsearch.xpack.core.watcher.condition; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.xcontent.ToXContentObject; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/condition/ConditionFactory.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/condition/ConditionFactory.java similarity index 93% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/condition/ConditionFactory.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/condition/ConditionFactory.java index 402b9b55a0f..37b923ff73b 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/condition/ConditionFactory.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/condition/ConditionFactory.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.condition; +package org.elasticsearch.xpack.core.watcher.condition; import org.elasticsearch.common.xcontent.XContentParser; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/condition/ConditionRegistry.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/condition/ConditionRegistry.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/condition/ConditionRegistry.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/condition/ConditionRegistry.java index fc96933c0e2..769f95f7c49 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/condition/ConditionRegistry.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/condition/ConditionRegistry.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.condition; +package org.elasticsearch.xpack.core.watcher.condition; import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.common.xcontent.XContentParser; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/condition/ExecutableCondition.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/condition/ExecutableCondition.java similarity index 74% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/condition/ExecutableCondition.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/condition/ExecutableCondition.java index 06f2fa43e14..deae53bd0c7 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/condition/ExecutableCondition.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/condition/ExecutableCondition.java @@ -3,9 +3,9 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.condition; +package org.elasticsearch.xpack.core.watcher.condition; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; public interface ExecutableCondition extends Condition { diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/crypto/CryptoService.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/crypto/CryptoService.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/crypto/CryptoService.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/crypto/CryptoService.java index 81e03dbfb72..6d3f46089a7 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/crypto/CryptoService.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/crypto/CryptoService.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.crypto; +package org.elasticsearch.xpack.core.watcher.crypto; import org.elasticsearch.ElasticsearchException; import org.elasticsearch.common.component.AbstractComponent; @@ -11,9 +11,9 @@ import org.elasticsearch.common.io.Streams; import org.elasticsearch.common.settings.Setting; import org.elasticsearch.common.settings.Setting.Property; import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.xpack.security.SecurityField; -import org.elasticsearch.xpack.security.authc.support.CharArrays; -import org.elasticsearch.xpack.watcher.WatcherField; +import org.elasticsearch.xpack.core.watcher.WatcherField; +import org.elasticsearch.xpack.core.security.SecurityField; +import org.elasticsearch.xpack.core.security.authc.support.CharArrays; import javax.crypto.BadPaddingException; import javax.crypto.Cipher; @@ -21,6 +21,7 @@ import javax.crypto.IllegalBlockSizeException; import javax.crypto.SecretKey; import javax.crypto.spec.IvParameterSpec; import javax.crypto.spec.SecretKeySpec; + import java.io.IOException; import java.io.InputStream; import java.security.MessageDigest; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/execution/ActionExecutionMode.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/execution/ActionExecutionMode.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/execution/ActionExecutionMode.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/execution/ActionExecutionMode.java index 7961532cd97..9f8f623f487 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/execution/ActionExecutionMode.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/execution/ActionExecutionMode.java @@ -3,11 +3,11 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.execution; +package org.elasticsearch.xpack.core.watcher.execution; import java.util.Locale; -import static org.elasticsearch.xpack.watcher.support.Exceptions.illegalArgument; +import static org.elasticsearch.xpack.core.watcher.support.Exceptions.illegalArgument; public enum ActionExecutionMode { diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/execution/ExecutionPhase.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/execution/ExecutionPhase.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/execution/ExecutionPhase.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/execution/ExecutionPhase.java index d9ccfa5e76e..f9032ebeaa1 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/execution/ExecutionPhase.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/execution/ExecutionPhase.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.execution; +package org.elasticsearch.xpack.core.watcher.execution; import java.util.Locale; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/execution/ExecutionState.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/execution/ExecutionState.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/execution/ExecutionState.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/execution/ExecutionState.java index c188090e549..8323b40adab 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/execution/ExecutionState.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/execution/ExecutionState.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.execution; +package org.elasticsearch.xpack.core.watcher.execution; import java.util.Locale; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/execution/QueuedWatch.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/execution/QueuedWatch.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/execution/QueuedWatch.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/execution/QueuedWatch.java index c491e4e0bce..bd4e66dd7cf 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/execution/QueuedWatch.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/execution/QueuedWatch.java @@ -3,12 +3,11 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.execution; +package org.elasticsearch.xpack.core.watcher.execution; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.io.stream.Streamable; -import org.elasticsearch.common.xcontent.ToXContent.Params; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.joda.time.DateTime; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/execution/TriggeredWatchStoreField.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/execution/TriggeredWatchStoreField.java similarity index 87% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/execution/TriggeredWatchStoreField.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/execution/TriggeredWatchStoreField.java index 15d812d0665..ac4a0c16c9c 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/execution/TriggeredWatchStoreField.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/execution/TriggeredWatchStoreField.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.execution; +package org.elasticsearch.xpack.core.watcher.execution; public final class TriggeredWatchStoreField { diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/execution/WatchExecutionContext.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/execution/WatchExecutionContext.java similarity index 93% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/execution/WatchExecutionContext.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/execution/WatchExecutionContext.java index b72e4fcf250..e7c08723e8c 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/execution/WatchExecutionContext.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/execution/WatchExecutionContext.java @@ -3,19 +3,19 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.execution; +package org.elasticsearch.xpack.core.watcher.execution; import org.elasticsearch.common.CheckedSupplier; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.util.concurrent.ConcurrentCollections; -import org.elasticsearch.xpack.watcher.actions.ActionWrapperResult; -import org.elasticsearch.xpack.watcher.condition.Condition; -import org.elasticsearch.xpack.watcher.history.WatchRecord; -import org.elasticsearch.xpack.watcher.input.Input; -import org.elasticsearch.xpack.watcher.transform.Transform; -import org.elasticsearch.xpack.watcher.trigger.TriggerEvent; -import org.elasticsearch.xpack.watcher.watch.Payload; -import org.elasticsearch.xpack.watcher.watch.Watch; +import org.elasticsearch.xpack.core.watcher.actions.ActionWrapperResult; +import org.elasticsearch.xpack.core.watcher.condition.Condition; +import org.elasticsearch.xpack.core.watcher.history.WatchRecord; +import org.elasticsearch.xpack.core.watcher.input.Input; +import org.elasticsearch.xpack.core.watcher.transform.Transform; +import org.elasticsearch.xpack.core.watcher.trigger.TriggerEvent; +import org.elasticsearch.xpack.core.watcher.watch.Payload; +import org.elasticsearch.xpack.core.watcher.watch.Watch; import org.joda.time.DateTime; import java.util.Collections; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/execution/WatchExecutionResult.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/execution/WatchExecutionResult.java similarity index 90% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/execution/WatchExecutionResult.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/execution/WatchExecutionResult.java index 352d37c93dc..cce6a1a2511 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/execution/WatchExecutionResult.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/execution/WatchExecutionResult.java @@ -3,17 +3,17 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.execution; +package org.elasticsearch.xpack.core.watcher.execution; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.watcher.actions.ActionWrapperResult; -import org.elasticsearch.xpack.watcher.condition.Condition; -import org.elasticsearch.xpack.watcher.input.Input; -import org.elasticsearch.xpack.watcher.support.WatcherDateTimeUtils; -import org.elasticsearch.xpack.watcher.transform.Transform; +import org.elasticsearch.xpack.core.watcher.actions.ActionWrapperResult; +import org.elasticsearch.xpack.core.watcher.condition.Condition; +import org.elasticsearch.xpack.core.watcher.input.Input; +import org.elasticsearch.xpack.core.watcher.support.WatcherDateTimeUtils; +import org.elasticsearch.xpack.core.watcher.transform.Transform; import org.joda.time.DateTime; import java.io.IOException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/execution/WatchExecutionSnapshot.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/execution/WatchExecutionSnapshot.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/execution/WatchExecutionSnapshot.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/execution/WatchExecutionSnapshot.java index a8f02ccab5e..4d2b87a3a5e 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/execution/WatchExecutionSnapshot.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/execution/WatchExecutionSnapshot.java @@ -3,14 +3,14 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.execution; +package org.elasticsearch.xpack.core.watcher.execution; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.io.stream.Streamable; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.watcher.actions.ActionWrapperResult; +import org.elasticsearch.xpack.core.watcher.actions.ActionWrapperResult; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; @@ -30,7 +30,7 @@ public class WatchExecutionSnapshot implements Streamable, ToXContentObject { public WatchExecutionSnapshot() { } - WatchExecutionSnapshot(WatchExecutionContext context, StackTraceElement[] executionStackTrace) { + public WatchExecutionSnapshot(WatchExecutionContext context, StackTraceElement[] executionStackTrace) { watchId = context.id().watchId(); watchRecordId = context.id().value(); triggeredTime = context.triggerEvent().triggeredTime(); diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/execution/Wid.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/execution/Wid.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/execution/Wid.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/execution/Wid.java index a9378584eef..a7a8fb4bea3 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/execution/Wid.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/execution/Wid.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.execution; +package org.elasticsearch.xpack.core.watcher.execution; import org.joda.time.DateTime; import org.joda.time.format.DateTimeFormatter; @@ -11,7 +11,7 @@ import org.joda.time.format.ISODateTimeFormat; import java.util.UUID; -import static org.elasticsearch.xpack.watcher.support.Exceptions.illegalArgument; +import static org.elasticsearch.xpack.core.watcher.support.Exceptions.illegalArgument; /** * A representation class of a watch id, its execution time and a random UUID diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/history/HistoryStoreField.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/history/HistoryStoreField.java similarity index 86% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/history/HistoryStoreField.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/history/HistoryStoreField.java index 6b59981c041..e655be8beff 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/history/HistoryStoreField.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/history/HistoryStoreField.java @@ -3,9 +3,9 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.history; +package org.elasticsearch.xpack.core.watcher.history; -import org.elasticsearch.xpack.watcher.support.WatcherIndexTemplateRegistryField; +import org.elasticsearch.xpack.core.watcher.support.WatcherIndexTemplateRegistryField; import org.joda.time.DateTime; import org.joda.time.format.DateTimeFormat; import org.joda.time.format.DateTimeFormatter; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/history/WatchRecord.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/history/WatchRecord.java similarity index 92% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/history/WatchRecord.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/history/WatchRecord.java index 2726ef564fe..74e7b2115fa 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/history/WatchRecord.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/history/WatchRecord.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.history; +package org.elasticsearch.xpack.core.watcher.history; import org.elasticsearch.ElasticsearchException; import org.elasticsearch.common.Nullable; @@ -12,18 +12,18 @@ import org.elasticsearch.common.Strings; import org.elasticsearch.common.collect.MapBuilder; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.watcher.actions.Action; -import org.elasticsearch.xpack.watcher.actions.ActionWrapperResult; -import org.elasticsearch.xpack.watcher.condition.ExecutableCondition; -import org.elasticsearch.xpack.watcher.execution.ExecutionState; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionResult; -import org.elasticsearch.xpack.watcher.execution.Wid; -import org.elasticsearch.xpack.watcher.input.ExecutableInput; -import org.elasticsearch.xpack.watcher.support.xcontent.WatcherParams; -import org.elasticsearch.xpack.watcher.trigger.TriggerEvent; -import org.elasticsearch.xpack.watcher.watch.Watch; -import org.elasticsearch.xpack.watcher.watch.WatchField; +import org.elasticsearch.xpack.core.watcher.actions.Action; +import org.elasticsearch.xpack.core.watcher.actions.ActionWrapperResult; +import org.elasticsearch.xpack.core.watcher.condition.ExecutableCondition; +import org.elasticsearch.xpack.core.watcher.execution.ExecutionState; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionResult; +import org.elasticsearch.xpack.core.watcher.execution.Wid; +import org.elasticsearch.xpack.core.watcher.input.ExecutableInput; +import org.elasticsearch.xpack.core.watcher.support.xcontent.WatcherParams; +import org.elasticsearch.xpack.core.watcher.trigger.TriggerEvent; +import org.elasticsearch.xpack.core.watcher.watch.Watch; +import org.elasticsearch.xpack.core.watcher.watch.WatchField; import java.io.IOException; import java.util.Collection; @@ -233,7 +233,7 @@ public abstract class WatchRecord implements ToXContentObject { this.messages = Strings.EMPTY_ARRAY; } - MessageWatchRecord(WatchRecord record, ExecutionState state, String message) { + public MessageWatchRecord(WatchRecord record, ExecutionState state, String message) { super(record, state); if (record instanceof MessageWatchRecord) { MessageWatchRecord messageWatchRecord = (MessageWatchRecord) record; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/input/ExecutableInput.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/input/ExecutableInput.java similarity index 89% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/input/ExecutableInput.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/input/ExecutableInput.java index bc5b815a661..1c08af3cf90 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/input/ExecutableInput.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/input/ExecutableInput.java @@ -3,14 +3,14 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.input; +package org.elasticsearch.xpack.core.watcher.input; import org.apache.logging.log4j.Logger; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; -import org.elasticsearch.xpack.watcher.watch.Payload; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import java.io.IOException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/input/Input.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/input/Input.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/input/Input.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/input/Input.java index 0f126f31954..3188f5e951c 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/input/Input.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/input/Input.java @@ -3,14 +3,14 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.input; +package org.elasticsearch.xpack.core.watcher.input; import org.elasticsearch.ElasticsearchException; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.watcher.watch.Payload; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import java.io.IOException; import java.util.Locale; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/input/none/NoneInput.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/input/none/NoneInput.java similarity index 93% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/input/none/NoneInput.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/input/none/NoneInput.java index e7a14a53874..65668960487 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/input/none/NoneInput.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/input/none/NoneInput.java @@ -3,13 +3,13 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.input.none; +package org.elasticsearch.xpack.core.watcher.input.none; import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.watcher.input.Input; -import org.elasticsearch.xpack.watcher.watch.Payload; +import org.elasticsearch.xpack.core.watcher.input.Input; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import java.io.IOException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/support/Exceptions.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/support/Exceptions.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/support/Exceptions.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/support/Exceptions.java index c46ae4bf7b0..a8082a09355 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/support/Exceptions.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/support/Exceptions.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.support; +package org.elasticsearch.xpack.core.watcher.support; import java.io.IOException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/support/WatcherDateTimeUtils.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/support/WatcherDateTimeUtils.java similarity index 99% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/support/WatcherDateTimeUtils.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/support/WatcherDateTimeUtils.java index 12162b37df4..097d136c629 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/support/WatcherDateTimeUtils.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/support/WatcherDateTimeUtils.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.support; +package org.elasticsearch.xpack.core.watcher.support; import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.common.Nullable; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/support/WatcherIndexTemplateRegistryField.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/support/WatcherIndexTemplateRegistryField.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/support/WatcherIndexTemplateRegistryField.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/support/WatcherIndexTemplateRegistryField.java index 7329a717aa9..4cf0898bae2 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/support/WatcherIndexTemplateRegistryField.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/support/WatcherIndexTemplateRegistryField.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.support; +package org.elasticsearch.xpack.core.watcher.support; public final class WatcherIndexTemplateRegistryField { // history (please add a comment why you increased the version here) diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/support/WatcherUtils.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/support/WatcherUtils.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/support/WatcherUtils.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/support/WatcherUtils.java index d8d5e81597a..15d56db578b 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/support/WatcherUtils.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/support/WatcherUtils.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.support; +package org.elasticsearch.xpack.core.watcher.support; import org.elasticsearch.common.Strings; import org.elasticsearch.common.unit.TimeValue; @@ -18,7 +18,7 @@ import java.util.HashMap; import java.util.Map; import java.util.regex.Pattern; -import static org.elasticsearch.xpack.watcher.support.WatcherDateTimeUtils.formatDate; +import static org.elasticsearch.xpack.core.watcher.support.WatcherDateTimeUtils.formatDate; public final class WatcherUtils { diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/support/xcontent/ObjectPath.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/support/xcontent/ObjectPath.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/support/xcontent/ObjectPath.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/support/xcontent/ObjectPath.java index da8816d2006..67ef405238a 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/support/xcontent/ObjectPath.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/support/xcontent/ObjectPath.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.support.xcontent; +package org.elasticsearch.xpack.core.watcher.support.xcontent; import org.elasticsearch.common.Strings; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/support/xcontent/WatcherParams.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/support/xcontent/WatcherParams.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/support/xcontent/WatcherParams.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/support/xcontent/WatcherParams.java index d9e1f7fce4b..29a526e4b81 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/support/xcontent/WatcherParams.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/support/xcontent/WatcherParams.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.support.xcontent; +package org.elasticsearch.xpack.core.watcher.support.xcontent; import org.elasticsearch.common.xcontent.ToXContent; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/support/xcontent/WatcherXContentParser.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/support/xcontent/WatcherXContentParser.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/support/xcontent/WatcherXContentParser.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/support/xcontent/WatcherXContentParser.java index 66ab179983c..6f6252098ce 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/support/xcontent/WatcherXContentParser.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/support/xcontent/WatcherXContentParser.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.support.xcontent; +package org.elasticsearch.xpack.core.watcher.support.xcontent; import org.apache.lucene.util.BytesRef; import org.elasticsearch.ElasticsearchException; @@ -12,8 +12,8 @@ import org.elasticsearch.common.xcontent.NamedXContentRegistry; import org.elasticsearch.common.xcontent.XContentLocation; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.xpack.watcher.common.secret.Secret; -import org.elasticsearch.xpack.watcher.crypto.CryptoService; +import org.elasticsearch.xpack.core.watcher.common.secret.Secret; +import org.elasticsearch.xpack.core.watcher.crypto.CryptoService; import java.io.IOException; import java.time.Clock; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/support/xcontent/XContentSource.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/support/xcontent/XContentSource.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/support/xcontent/XContentSource.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/support/xcontent/XContentSource.java index 81c916e1639..0b9cff3664e 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/support/xcontent/XContentSource.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/support/xcontent/XContentSource.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.support.xcontent; +package org.elasticsearch.xpack.core.watcher.support.xcontent; import org.elasticsearch.ElasticsearchException; import org.elasticsearch.ElasticsearchParseException; @@ -16,7 +16,7 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentHelper; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.xpack.watcher.common.xcontent.XContentUtils; +import org.elasticsearch.xpack.core.watcher.common.xcontent.XContentUtils; import java.io.IOException; import java.util.List; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transform/ExecutableTransform.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transform/ExecutableTransform.java similarity index 88% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transform/ExecutableTransform.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transform/ExecutableTransform.java index 4e1f1cad039..85dd4a91671 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transform/ExecutableTransform.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transform/ExecutableTransform.java @@ -3,13 +3,13 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.transform; +package org.elasticsearch.xpack.core.watcher.transform; import org.apache.logging.log4j.Logger; import org.elasticsearch.common.xcontent.ToXContentFragment; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; -import org.elasticsearch.xpack.watcher.watch.Payload; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import java.io.IOException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transform/Transform.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transform/Transform.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transform/Transform.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transform/Transform.java index 2e2ffe8c9c2..b3e318aad6b 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transform/Transform.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transform/Transform.java @@ -3,14 +3,14 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.transform; +package org.elasticsearch.xpack.core.watcher.transform; import org.elasticsearch.ElasticsearchException; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.watcher.watch.Payload; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import java.io.IOException; import java.util.Locale; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transform/TransformFactory.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transform/TransformFactory.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transform/TransformFactory.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transform/TransformFactory.java index f2d592c86c4..3d15431c451 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transform/TransformFactory.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transform/TransformFactory.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.transform; +package org.elasticsearch.xpack.core.watcher.transform; import org.apache.logging.log4j.Logger; import org.elasticsearch.common.xcontent.XContentParser; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transform/TransformRegistry.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transform/TransformRegistry.java similarity index 91% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transform/TransformRegistry.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transform/TransformRegistry.java index 0d0094e5106..4d729c10c7d 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transform/TransformRegistry.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transform/TransformRegistry.java @@ -3,13 +3,13 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.transform; +package org.elasticsearch.xpack.core.watcher.transform; import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.watcher.transform.chain.ChainTransform; -import org.elasticsearch.xpack.watcher.transform.chain.ChainTransformFactory; +import org.elasticsearch.xpack.core.watcher.transform.chain.ChainTransform; +import org.elasticsearch.xpack.core.watcher.transform.chain.ChainTransformFactory; import java.io.IOException; import java.util.Collections; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transform/chain/ChainTransform.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transform/chain/ChainTransform.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transform/chain/ChainTransform.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transform/chain/ChainTransform.java index f210794d149..e150f58bc55 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transform/chain/ChainTransform.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transform/chain/ChainTransform.java @@ -3,15 +3,15 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.transform.chain; +package org.elasticsearch.xpack.core.watcher.transform.chain; import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.watcher.transform.Transform; -import org.elasticsearch.xpack.watcher.transform.TransformRegistry; -import org.elasticsearch.xpack.watcher.watch.Payload; +import org.elasticsearch.xpack.core.watcher.transform.Transform; +import org.elasticsearch.xpack.core.watcher.transform.TransformRegistry; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import java.io.IOException; import java.util.ArrayList; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transform/chain/ChainTransformFactory.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transform/chain/ChainTransformFactory.java similarity index 82% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transform/chain/ChainTransformFactory.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transform/chain/ChainTransformFactory.java index 979499c6cad..264495e113f 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transform/chain/ChainTransformFactory.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transform/chain/ChainTransformFactory.java @@ -3,15 +3,15 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.transform.chain; +package org.elasticsearch.xpack.core.watcher.transform.chain; import org.elasticsearch.common.logging.ServerLoggers; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.watcher.transform.ExecutableTransform; -import org.elasticsearch.xpack.watcher.transform.Transform; -import org.elasticsearch.xpack.watcher.transform.TransformFactory; -import org.elasticsearch.xpack.watcher.transform.TransformRegistry; +import org.elasticsearch.xpack.core.watcher.transform.ExecutableTransform; +import org.elasticsearch.xpack.core.watcher.transform.Transform; +import org.elasticsearch.xpack.core.watcher.transform.TransformFactory; +import org.elasticsearch.xpack.core.watcher.transform.TransformRegistry; import java.io.IOException; import java.util.ArrayList; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transform/chain/ExecutableChainTransform.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transform/chain/ExecutableChainTransform.java similarity index 85% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transform/chain/ExecutableChainTransform.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transform/chain/ExecutableChainTransform.java index 02084410404..5887a2bdd6d 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transform/chain/ExecutableChainTransform.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transform/chain/ExecutableChainTransform.java @@ -3,15 +3,15 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.transform.chain; +package org.elasticsearch.xpack.core.watcher.transform.chain; import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.message.ParameterizedMessage; import org.apache.logging.log4j.util.Supplier; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; -import org.elasticsearch.xpack.watcher.transform.ExecutableTransform; -import org.elasticsearch.xpack.watcher.transform.Transform; -import org.elasticsearch.xpack.watcher.watch.Payload; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.transform.ExecutableTransform; +import org.elasticsearch.xpack.core.watcher.transform.Transform; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import java.io.IOException; import java.util.ArrayList; @@ -20,7 +20,7 @@ import java.util.Collections; import java.util.List; import static org.elasticsearch.common.logging.LoggerMessageFormat.format; -import static org.elasticsearch.xpack.watcher.transform.chain.ChainTransform.TYPE; +import static org.elasticsearch.xpack.core.watcher.transform.chain.ChainTransform.TYPE; public class ExecutableChainTransform extends ExecutableTransform { diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/ack/AckWatchAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/ack/AckWatchAction.java similarity index 93% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/ack/AckWatchAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/ack/AckWatchAction.java index 49bb3368f67..d895ae31c50 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/ack/AckWatchAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/ack/AckWatchAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.transport.actions.ack; +package org.elasticsearch.xpack.core.watcher.transport.actions.ack; import org.elasticsearch.action.Action; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/ack/AckWatchRequest.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/ack/AckWatchRequest.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/ack/AckWatchRequest.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/ack/AckWatchRequest.java index a3b3dcc3e4f..d56bb5779e2 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/ack/AckWatchRequest.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/ack/AckWatchRequest.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.transport.actions.ack; +package org.elasticsearch.xpack.core.watcher.transport.actions.ack; import org.elasticsearch.action.ActionRequest; import org.elasticsearch.action.ActionRequestValidationException; @@ -11,7 +11,7 @@ import org.elasticsearch.action.ValidateActions; import org.elasticsearch.common.Strings; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.xpack.watcher.support.WatcherUtils; +import org.elasticsearch.xpack.core.watcher.support.WatcherUtils; import java.io.IOException; import java.util.Locale; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/ack/AckWatchRequestBuilder.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/ack/AckWatchRequestBuilder.java similarity index 93% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/ack/AckWatchRequestBuilder.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/ack/AckWatchRequestBuilder.java index 388db0d080b..16e0d20eaf3 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/ack/AckWatchRequestBuilder.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/ack/AckWatchRequestBuilder.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.transport.actions.ack; +package org.elasticsearch.xpack.core.watcher.transport.actions.ack; import org.elasticsearch.action.ActionRequestBuilder; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/ack/AckWatchResponse.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/ack/AckWatchResponse.java similarity index 91% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/ack/AckWatchResponse.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/ack/AckWatchResponse.java index f19a2cd3307..188c4996315 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/ack/AckWatchResponse.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/ack/AckWatchResponse.java @@ -3,13 +3,13 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.transport.actions.ack; +package org.elasticsearch.xpack.core.watcher.transport.actions.ack; import org.elasticsearch.action.ActionResponse; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.xpack.watcher.watch.WatchStatus; +import org.elasticsearch.xpack.core.watcher.watch.WatchStatus; import java.io.IOException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/activate/ActivateWatchAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/activate/ActivateWatchAction.java similarity index 93% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/activate/ActivateWatchAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/activate/ActivateWatchAction.java index def0ffebbbb..2832b779c40 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/activate/ActivateWatchAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/activate/ActivateWatchAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.transport.actions.activate; +package org.elasticsearch.xpack.core.watcher.transport.actions.activate; import org.elasticsearch.action.Action; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/activate/ActivateWatchRequest.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/activate/ActivateWatchRequest.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/activate/ActivateWatchRequest.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/activate/ActivateWatchRequest.java index 74ffdd5d9fb..326c951bedf 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/activate/ActivateWatchRequest.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/activate/ActivateWatchRequest.java @@ -3,14 +3,14 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.transport.actions.activate; +package org.elasticsearch.xpack.core.watcher.transport.actions.activate; import org.elasticsearch.action.ActionRequest; import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.action.ValidateActions; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.xpack.watcher.support.WatcherUtils; +import org.elasticsearch.xpack.core.watcher.support.WatcherUtils; import java.io.IOException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/activate/ActivateWatchRequestBuilder.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/activate/ActivateWatchRequestBuilder.java similarity index 92% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/activate/ActivateWatchRequestBuilder.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/activate/ActivateWatchRequestBuilder.java index a0b9713f28e..0122b055ae0 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/activate/ActivateWatchRequestBuilder.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/activate/ActivateWatchRequestBuilder.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.transport.actions.activate; +package org.elasticsearch.xpack.core.watcher.transport.actions.activate; import org.elasticsearch.action.ActionRequestBuilder; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/activate/ActivateWatchResponse.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/activate/ActivateWatchResponse.java similarity index 91% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/activate/ActivateWatchResponse.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/activate/ActivateWatchResponse.java index 512a88cd4a5..0c92fc04672 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/activate/ActivateWatchResponse.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/activate/ActivateWatchResponse.java @@ -3,13 +3,13 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.transport.actions.activate; +package org.elasticsearch.xpack.core.watcher.transport.actions.activate; import org.elasticsearch.action.ActionResponse; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.xpack.watcher.watch.WatchStatus; +import org.elasticsearch.xpack.core.watcher.watch.WatchStatus; import java.io.IOException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/delete/DeleteWatchAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/delete/DeleteWatchAction.java similarity index 93% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/delete/DeleteWatchAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/delete/DeleteWatchAction.java index 4dfd63819c9..ffbe6539f60 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/delete/DeleteWatchAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/delete/DeleteWatchAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.transport.actions.delete; +package org.elasticsearch.xpack.core.watcher.transport.actions.delete; import org.elasticsearch.action.Action; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/delete/DeleteWatchRequest.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/delete/DeleteWatchRequest.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/delete/DeleteWatchRequest.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/delete/DeleteWatchRequest.java index c824f0ece4e..f8c1a71f1eb 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/delete/DeleteWatchRequest.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/delete/DeleteWatchRequest.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.transport.actions.delete; +package org.elasticsearch.xpack.core.watcher.transport.actions.delete; import org.elasticsearch.action.ActionRequest; import org.elasticsearch.action.ActionRequestValidationException; @@ -11,7 +11,7 @@ import org.elasticsearch.action.ValidateActions; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.lucene.uid.Versions; -import org.elasticsearch.xpack.watcher.support.WatcherUtils; +import org.elasticsearch.xpack.core.watcher.support.WatcherUtils; import java.io.IOException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/delete/DeleteWatchRequestBuilder.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/delete/DeleteWatchRequestBuilder.java similarity index 93% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/delete/DeleteWatchRequestBuilder.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/delete/DeleteWatchRequestBuilder.java index df5815a85df..1ba3fe12ea4 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/delete/DeleteWatchRequestBuilder.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/delete/DeleteWatchRequestBuilder.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.transport.actions.delete; +package org.elasticsearch.xpack.core.watcher.transport.actions.delete; import org.elasticsearch.action.ActionRequestBuilder; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/delete/DeleteWatchResponse.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/delete/DeleteWatchResponse.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/delete/DeleteWatchResponse.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/delete/DeleteWatchResponse.java index 05e3dad739f..bda5ecabaa0 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/delete/DeleteWatchResponse.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/delete/DeleteWatchResponse.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.transport.actions.delete; +package org.elasticsearch.xpack.core.watcher.transport.actions.delete; import org.elasticsearch.action.ActionResponse; import org.elasticsearch.common.io.stream.StreamInput; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/execute/ExecuteWatchAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/execute/ExecuteWatchAction.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/execute/ExecuteWatchAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/execute/ExecuteWatchAction.java index 3b43360e51c..f8a8b009e44 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/execute/ExecuteWatchAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/execute/ExecuteWatchAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.transport.actions.execute; +package org.elasticsearch.xpack.core.watcher.transport.actions.execute; import org.elasticsearch.action.Action; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/execute/ExecuteWatchRequest.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/execute/ExecuteWatchRequest.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/execute/ExecuteWatchRequest.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/execute/ExecuteWatchRequest.java index 094ee355127..ab68ef2fd84 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/execute/ExecuteWatchRequest.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/execute/ExecuteWatchRequest.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.transport.actions.execute; +package org.elasticsearch.xpack.core.watcher.transport.actions.execute; import org.elasticsearch.action.ActionRequest; import org.elasticsearch.action.ActionRequestValidationException; @@ -13,10 +13,10 @@ import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.xpack.watcher.client.WatchSourceBuilder; -import org.elasticsearch.xpack.watcher.execution.ActionExecutionMode; -import org.elasticsearch.xpack.watcher.support.WatcherUtils; -import org.elasticsearch.xpack.watcher.trigger.TriggerEvent; +import org.elasticsearch.xpack.core.watcher.client.WatchSourceBuilder; +import org.elasticsearch.xpack.core.watcher.execution.ActionExecutionMode; +import org.elasticsearch.xpack.core.watcher.support.WatcherUtils; +import org.elasticsearch.xpack.core.watcher.trigger.TriggerEvent; import java.io.IOException; import java.util.HashMap; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/execute/ExecuteWatchRequestBuilder.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/execute/ExecuteWatchRequestBuilder.java similarity index 93% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/execute/ExecuteWatchRequestBuilder.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/execute/ExecuteWatchRequestBuilder.java index 184469d77e2..ee1f94da3df 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/execute/ExecuteWatchRequestBuilder.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/execute/ExecuteWatchRequestBuilder.java @@ -3,15 +3,15 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.transport.actions.execute; +package org.elasticsearch.xpack.core.watcher.transport.actions.execute; import org.elasticsearch.action.ActionRequestBuilder; import org.elasticsearch.client.ElasticsearchClient; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.xpack.watcher.client.WatchSourceBuilder; -import org.elasticsearch.xpack.watcher.execution.ActionExecutionMode; -import org.elasticsearch.xpack.watcher.trigger.TriggerEvent; +import org.elasticsearch.xpack.core.watcher.client.WatchSourceBuilder; +import org.elasticsearch.xpack.core.watcher.execution.ActionExecutionMode; +import org.elasticsearch.xpack.core.watcher.trigger.TriggerEvent; import java.io.IOException; import java.util.Map; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/execute/ExecuteWatchResponse.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/execute/ExecuteWatchResponse.java similarity index 91% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/execute/ExecuteWatchResponse.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/execute/ExecuteWatchResponse.java index 691ec7e8506..c0eac9b3c61 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/execute/ExecuteWatchResponse.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/execute/ExecuteWatchResponse.java @@ -3,14 +3,14 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.transport.actions.execute; +package org.elasticsearch.xpack.core.watcher.transport.actions.execute; import org.elasticsearch.action.ActionResponse; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.xpack.watcher.support.xcontent.XContentSource; +import org.elasticsearch.xpack.core.watcher.support.xcontent.XContentSource; import java.io.IOException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/GetWatchAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/get/GetWatchAction.java similarity index 93% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/GetWatchAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/get/GetWatchAction.java index f3d75818974..a68223c6f6c 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/GetWatchAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/get/GetWatchAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.transport.actions.get; +package org.elasticsearch.xpack.core.watcher.transport.actions.get; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/GetWatchRequest.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/get/GetWatchRequest.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/GetWatchRequest.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/get/GetWatchRequest.java index db5cc7e83be..a2e7dc171a7 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/GetWatchRequest.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/get/GetWatchRequest.java @@ -3,14 +3,14 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.transport.actions.get; +package org.elasticsearch.xpack.core.watcher.transport.actions.get; import org.elasticsearch.action.ActionRequest; import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.action.ValidateActions; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.xpack.watcher.support.WatcherUtils; +import org.elasticsearch.xpack.core.watcher.support.WatcherUtils; import java.io.IOException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/GetWatchRequestBuilder.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/get/GetWatchRequestBuilder.java similarity index 93% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/GetWatchRequestBuilder.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/get/GetWatchRequestBuilder.java index c0ccfaea4a3..178cebcaf72 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/GetWatchRequestBuilder.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/get/GetWatchRequestBuilder.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.transport.actions.get; +package org.elasticsearch.xpack.core.watcher.transport.actions.get; import org.elasticsearch.action.ActionRequestBuilder; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/GetWatchResponse.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/get/GetWatchResponse.java similarity index 90% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/GetWatchResponse.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/get/GetWatchResponse.java index 80f100509b4..1c8c4031649 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/GetWatchResponse.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/get/GetWatchResponse.java @@ -3,15 +3,15 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.transport.actions.get; +package org.elasticsearch.xpack.core.watcher.transport.actions.get; import org.elasticsearch.action.ActionResponse; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.xpack.watcher.support.xcontent.XContentSource; -import org.elasticsearch.xpack.watcher.watch.WatchStatus; +import org.elasticsearch.xpack.core.watcher.support.xcontent.XContentSource; +import org.elasticsearch.xpack.core.watcher.watch.WatchStatus; import java.io.IOException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/put/PutWatchAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/put/PutWatchAction.java similarity index 93% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/put/PutWatchAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/put/PutWatchAction.java index f06bab38c6c..9b0024ee43b 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/put/PutWatchAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/put/PutWatchAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.transport.actions.put; +package org.elasticsearch.xpack.core.watcher.transport.actions.put; import org.elasticsearch.action.Action; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/put/PutWatchRequest.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/put/PutWatchRequest.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/put/PutWatchRequest.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/put/PutWatchRequest.java index 57343721a06..44d725c9614 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/put/PutWatchRequest.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/put/PutWatchRequest.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.transport.actions.put; +package org.elasticsearch.xpack.core.watcher.transport.actions.put; import org.elasticsearch.action.ActionRequest; @@ -13,8 +13,8 @@ import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.xpack.watcher.client.WatchSourceBuilder; -import org.elasticsearch.xpack.watcher.support.WatcherUtils; +import org.elasticsearch.xpack.core.watcher.client.WatchSourceBuilder; +import org.elasticsearch.xpack.core.watcher.support.WatcherUtils; import java.io.IOException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/put/PutWatchRequestBuilder.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/put/PutWatchRequestBuilder.java similarity index 92% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/put/PutWatchRequestBuilder.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/put/PutWatchRequestBuilder.java index b5b14211331..4e12c9ad6c6 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/put/PutWatchRequestBuilder.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/put/PutWatchRequestBuilder.java @@ -3,13 +3,13 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.transport.actions.put; +package org.elasticsearch.xpack.core.watcher.transport.actions.put; import org.elasticsearch.action.ActionRequestBuilder; import org.elasticsearch.client.ElasticsearchClient; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.xpack.watcher.client.WatchSourceBuilder; +import org.elasticsearch.xpack.core.watcher.client.WatchSourceBuilder; public class PutWatchRequestBuilder extends ActionRequestBuilder { diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/put/PutWatchResponse.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/put/PutWatchResponse.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/put/PutWatchResponse.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/put/PutWatchResponse.java index 16da3b4ed26..b84901ecac1 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/put/PutWatchResponse.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/put/PutWatchResponse.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.transport.actions.put; +package org.elasticsearch.xpack.core.watcher.transport.actions.put; import org.elasticsearch.action.ActionResponse; import org.elasticsearch.common.io.stream.StreamInput; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/service/WatcherServiceAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/service/WatcherServiceAction.java similarity index 93% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/service/WatcherServiceAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/service/WatcherServiceAction.java index e5f5a211911..05cddee273c 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/service/WatcherServiceAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/service/WatcherServiceAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.transport.actions.service; +package org.elasticsearch.xpack.core.watcher.transport.actions.service; import org.elasticsearch.action.Action; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/service/WatcherServiceRequest.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/service/WatcherServiceRequest.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/service/WatcherServiceRequest.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/service/WatcherServiceRequest.java index e20acdc8939..64fc7abc2ae 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/service/WatcherServiceRequest.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/service/WatcherServiceRequest.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.transport.actions.service; +package org.elasticsearch.xpack.core.watcher.transport.actions.service; import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.action.ValidateActions; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/service/WatcherServiceRequestBuilder.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/service/WatcherServiceRequestBuilder.java similarity index 93% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/service/WatcherServiceRequestBuilder.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/service/WatcherServiceRequestBuilder.java index 0f7d284ebef..b43d02aac83 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/service/WatcherServiceRequestBuilder.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/service/WatcherServiceRequestBuilder.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.transport.actions.service; +package org.elasticsearch.xpack.core.watcher.transport.actions.service; import org.elasticsearch.action.support.master.MasterNodeOperationRequestBuilder; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/service/WatcherServiceResponse.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/service/WatcherServiceResponse.java similarity index 92% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/service/WatcherServiceResponse.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/service/WatcherServiceResponse.java index 482fc7576b7..61ac4435f89 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/service/WatcherServiceResponse.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/service/WatcherServiceResponse.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.transport.actions.service; +package org.elasticsearch.xpack.core.watcher.transport.actions.service; import org.elasticsearch.action.support.master.AcknowledgedResponse; import org.elasticsearch.common.io.stream.StreamInput; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/stats/WatcherStatsAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/stats/WatcherStatsAction.java similarity index 93% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/stats/WatcherStatsAction.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/stats/WatcherStatsAction.java index 54ebdd482fb..0c111090f54 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/stats/WatcherStatsAction.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/stats/WatcherStatsAction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.transport.actions.stats; +package org.elasticsearch.xpack.core.watcher.transport.actions.stats; import org.elasticsearch.action.Action; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/stats/WatcherStatsRequest.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/stats/WatcherStatsRequest.java similarity index 97% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/stats/WatcherStatsRequest.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/stats/WatcherStatsRequest.java index 432c4c29a4a..2df487b5516 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/stats/WatcherStatsRequest.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/stats/WatcherStatsRequest.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.transport.actions.stats; +package org.elasticsearch.xpack.core.watcher.transport.actions.stats; import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.action.support.nodes.BaseNodeRequest; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/stats/WatcherStatsRequestBuilder.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/stats/WatcherStatsRequestBuilder.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/stats/WatcherStatsRequestBuilder.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/stats/WatcherStatsRequestBuilder.java index a609ece0f3a..d2ca4e98db6 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/stats/WatcherStatsRequestBuilder.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/stats/WatcherStatsRequestBuilder.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.transport.actions.stats; +package org.elasticsearch.xpack.core.watcher.transport.actions.stats; import org.elasticsearch.action.support.nodes.NodesOperationRequestBuilder; import org.elasticsearch.client.ElasticsearchClient; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/stats/WatcherStatsResponse.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/stats/WatcherStatsResponse.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/stats/WatcherStatsResponse.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/stats/WatcherStatsResponse.java index 161ca77bab4..3f57e7fb889 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/stats/WatcherStatsResponse.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/stats/WatcherStatsResponse.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.transport.actions.stats; +package org.elasticsearch.xpack.core.watcher.transport.actions.stats; import org.elasticsearch.action.FailedNodeException; import org.elasticsearch.action.support.nodes.BaseNodeResponse; @@ -15,10 +15,10 @@ import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.watcher.WatcherMetaData; -import org.elasticsearch.xpack.watcher.WatcherState; -import org.elasticsearch.xpack.watcher.execution.QueuedWatch; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionSnapshot; +import org.elasticsearch.xpack.core.watcher.WatcherMetaData; +import org.elasticsearch.xpack.core.watcher.WatcherState; +import org.elasticsearch.xpack.core.watcher.execution.QueuedWatch; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionSnapshot; import java.io.IOException; import java.util.List; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/trigger/Trigger.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/trigger/Trigger.java similarity index 92% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/trigger/Trigger.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/trigger/Trigger.java index 9090aa072ae..d7fbeb5ec6c 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/trigger/Trigger.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/trigger/Trigger.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.trigger; +package org.elasticsearch.xpack.core.watcher.trigger; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentParser; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/trigger/TriggerEvent.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/trigger/TriggerEvent.java similarity index 94% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/trigger/TriggerEvent.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/trigger/TriggerEvent.java index ecb83d1f4a7..1dfac8a8fcb 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/trigger/TriggerEvent.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/trigger/TriggerEvent.java @@ -3,12 +3,12 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.trigger; +package org.elasticsearch.xpack.core.watcher.trigger; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.watcher.support.WatcherDateTimeUtils; +import org.elasticsearch.xpack.core.watcher.support.WatcherDateTimeUtils; import org.joda.time.DateTime; import java.io.IOException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/watch/Payload.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/watch/Payload.java similarity index 93% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/watch/Payload.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/watch/Payload.java index d697f7c87d8..7ef57c37f30 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/watch/Payload.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/watch/Payload.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.watch; +package org.elasticsearch.xpack.core.watcher.watch; import org.elasticsearch.common.collect.MapBuilder; import org.elasticsearch.common.xcontent.ToXContentObject; @@ -15,7 +15,7 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; -import static org.elasticsearch.xpack.watcher.support.WatcherUtils.responseToData; +import static org.elasticsearch.xpack.core.watcher.support.WatcherUtils.responseToData; public interface Payload extends ToXContentObject { diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/watch/Watch.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/watch/Watch.java similarity index 91% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/watch/Watch.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/watch/Watch.java index 2e9727690b9..3772195570e 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/watch/Watch.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/watch/Watch.java @@ -3,19 +3,19 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.watch; +package org.elasticsearch.xpack.core.watcher.watch; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.lucene.uid.Versions; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.watcher.actions.ActionStatus; -import org.elasticsearch.xpack.watcher.actions.ActionWrapper; -import org.elasticsearch.xpack.watcher.condition.ExecutableCondition; -import org.elasticsearch.xpack.watcher.input.ExecutableInput; -import org.elasticsearch.xpack.watcher.transform.ExecutableTransform; -import org.elasticsearch.xpack.watcher.trigger.Trigger; +import org.elasticsearch.xpack.core.watcher.actions.ActionStatus; +import org.elasticsearch.xpack.core.watcher.actions.ActionWrapper; +import org.elasticsearch.xpack.core.watcher.condition.ExecutableCondition; +import org.elasticsearch.xpack.core.watcher.input.ExecutableInput; +import org.elasticsearch.xpack.core.watcher.transform.ExecutableTransform; +import org.elasticsearch.xpack.core.watcher.trigger.Trigger; import org.joda.time.DateTime; import java.io.IOException; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/watch/WatchField.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/watch/WatchField.java similarity index 95% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/watch/WatchField.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/watch/WatchField.java index 2ce1a11c4a4..6f6a1955927 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/watch/WatchField.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/watch/WatchField.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.watch; +package org.elasticsearch.xpack.core.watcher.watch; import org.elasticsearch.common.ParseField; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/watch/WatchStatus.java b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/watch/WatchStatus.java similarity index 93% rename from plugin/core/src/main/java/org/elasticsearch/xpack/watcher/watch/WatchStatus.java rename to plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/watch/WatchStatus.java index 07e6434d3ec..0a2409ca3db 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/watch/WatchStatus.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/watch/WatchStatus.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.watch; +package org.elasticsearch.xpack.core.watcher.watch; import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.common.Nullable; @@ -14,11 +14,11 @@ import org.elasticsearch.common.io.stream.Streamable; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.watcher.actions.Action; -import org.elasticsearch.xpack.watcher.actions.ActionStatus; -import org.elasticsearch.xpack.watcher.execution.ExecutionState; -import org.elasticsearch.xpack.watcher.support.xcontent.WatcherParams; -import org.elasticsearch.xpack.watcher.support.xcontent.WatcherXContentParser; +import org.elasticsearch.xpack.core.watcher.actions.Action; +import org.elasticsearch.xpack.core.watcher.actions.ActionStatus; +import org.elasticsearch.xpack.core.watcher.execution.ExecutionState; +import org.elasticsearch.xpack.core.watcher.support.xcontent.WatcherParams; +import org.elasticsearch.xpack.core.watcher.support.xcontent.WatcherXContentParser; import org.joda.time.DateTime; import java.io.IOException; @@ -30,11 +30,11 @@ import java.util.Objects; import static java.util.Collections.emptyMap; import static java.util.Collections.unmodifiableMap; -import static org.elasticsearch.xpack.watcher.support.WatcherDateTimeUtils.parseDate; -import static org.elasticsearch.xpack.watcher.support.WatcherDateTimeUtils.readDate; -import static org.elasticsearch.xpack.watcher.support.WatcherDateTimeUtils.readOptionalDate; -import static org.elasticsearch.xpack.watcher.support.WatcherDateTimeUtils.writeDate; -import static org.elasticsearch.xpack.watcher.support.WatcherDateTimeUtils.writeOptionalDate; +import static org.elasticsearch.xpack.core.watcher.support.WatcherDateTimeUtils.parseDate; +import static org.elasticsearch.xpack.core.watcher.support.WatcherDateTimeUtils.readDate; +import static org.elasticsearch.xpack.core.watcher.support.WatcherDateTimeUtils.readOptionalDate; +import static org.elasticsearch.xpack.core.watcher.support.WatcherDateTimeUtils.writeDate; +import static org.elasticsearch.xpack.core.watcher.support.WatcherDateTimeUtils.writeOptionalDate; import static org.joda.time.DateTimeZone.UTC; public class WatchStatus implements ToXContentObject, Streamable { @@ -153,9 +153,9 @@ public class WatchStatus implements ToXContentObject, Streamable { /** * Notifies this status that the givne actions were acked. If the current state of one of these actions is - * {@link org.elasticsearch.xpack.watcher.actions.ActionStatus.AckStatus.State#ACKABLE ACKABLE}, - * then we'll it'll change to {@link org.elasticsearch.xpack.watcher.actions.ActionStatus.AckStatus.State#ACKED ACKED} - * (when set to {@link org.elasticsearch.xpack.watcher.actions.ActionStatus.AckStatus.State#ACKED ACKED}, the AckThrottler + * {@link ActionStatus.AckStatus.State#ACKABLE ACKABLE}, + * then we'll it'll change to {@link ActionStatus.AckStatus.State#ACKED ACKED} + * (when set to {@link ActionStatus.AckStatus.State#ACKED ACKED}, the AckThrottler * will throttle the execution of the action. * * @return {@code true} if the state of changed due to the ack, {@code false} otherwise. diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/extensions/XPackExtension.java b/plugin/core/src/main/java/org/elasticsearch/xpack/extensions/XPackExtension.java deleted file mode 100644 index 7ca3d65fd27..00000000000 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/extensions/XPackExtension.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ -package org.elasticsearch.xpack.extensions; - -import java.util.Collection; -import java.util.Collections; -import java.util.List; - -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.xpack.security.SecurityExtension; - -/** - * An extension point allowing to plug in custom functionality in x-pack authentication module. - * @deprecated use {@link SecurityExtension} via SPI instead - */ -@Deprecated -public abstract class XPackExtension implements SecurityExtension { - /** - * The name of the plugin. - */ - public abstract String name(); - - /** - * The description of the plugin. - */ - public abstract String description(); - - /** - * Returns headers which should be copied from REST requests to internal cluster requests. - */ - public Collection getRestHeaders() { - return Collections.emptyList(); - } - - /** - * Returns a list of settings that should be filtered from API calls. In most cases, - * these settings are sensitive such as passwords. - * - * The value should be the full name of the setting or a wildcard that matches the - * desired setting. - * @deprecated use {@link Plugin#getSettingsFilter()} ()} via SPI extension instead - */ - @Deprecated - public List getSettingsFilter() { - return Collections.emptyList(); - } - - @Override - public String toString() { - return name(); - } -} diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/SecurityExtension.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/SecurityExtension.java index 6e0cde9f560..8d9ee2303cb 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/SecurityExtension.java +++ b/plugin/core/src/main/java/org/elasticsearch/xpack/security/SecurityExtension.java @@ -10,10 +10,10 @@ import org.elasticsearch.action.ActionListener; import org.elasticsearch.common.settings.Setting; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.watcher.ResourceWatcherService; -import org.elasticsearch.xpack.security.authc.AuthenticationFailureHandler; -import org.elasticsearch.xpack.security.authc.Realm; -import org.elasticsearch.xpack.security.authc.RealmConfig; -import org.elasticsearch.xpack.security.authz.RoleDescriptor; +import org.elasticsearch.xpack.core.security.authc.AuthenticationFailureHandler; +import org.elasticsearch.xpack.core.security.authc.Realm; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor; import java.util.ArrayList; import java.util.Collections; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/PoolingSessionFactorySettings.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/PoolingSessionFactorySettings.java deleted file mode 100644 index b1f2704bce5..00000000000 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/PoolingSessionFactorySettings.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ -package org.elasticsearch.xpack.security.authc.ldap; - -import org.elasticsearch.common.settings.Setting; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.common.util.set.Sets; - -import java.util.Optional; -import java.util.Set; - -public final class PoolingSessionFactorySettings { - static final TimeValue DEFAULT_HEALTH_CHECK_INTERVAL = TimeValue.timeValueSeconds(60L); - static final Setting BIND_DN = Setting.simpleString("bind_dn", Setting.Property.NodeScope, Setting.Property.Filtered); - static final Setting BIND_PASSWORD = Setting.simpleString("bind_password", Setting.Property.NodeScope, - Setting.Property.Filtered); - static final int DEFAULT_CONNECTION_POOL_INITIAL_SIZE = 0; - static final Setting POOL_INITIAL_SIZE = Setting.intSetting("user_search.pool.initial_size", - DEFAULT_CONNECTION_POOL_INITIAL_SIZE, 0, Setting.Property.NodeScope); - static final int DEFAULT_CONNECTION_POOL_SIZE = 20; - static final Setting POOL_SIZE = Setting.intSetting("user_search.pool.size", - DEFAULT_CONNECTION_POOL_SIZE, 1, Setting.Property.NodeScope); - static final Setting HEALTH_CHECK_INTERVAL = Setting.timeSetting("user_search.pool.health_check.interval", - DEFAULT_HEALTH_CHECK_INTERVAL, Setting.Property.NodeScope); - static final Setting HEALTH_CHECK_ENABLED = Setting.boolSetting("user_search.pool.health_check.enabled", - true, Setting.Property.NodeScope); - static final Setting> HEALTH_CHECK_DN = new Setting<>("user_search.pool.health_check.dn", (String) null, - Optional::ofNullable, Setting.Property.NodeScope); - - private PoolingSessionFactorySettings() {} - - public static Set> getSettings() { - return Sets.newHashSet(POOL_INITIAL_SIZE, POOL_SIZE, HEALTH_CHECK_ENABLED, HEALTH_CHECK_INTERVAL, HEALTH_CHECK_DN, BIND_DN, - BIND_PASSWORD); - } -} diff --git a/plugin/core/src/test/java/org/elasticsearch/license/AbstractLicenseServiceTestCase.java b/plugin/core/src/test/java/org/elasticsearch/license/AbstractLicenseServiceTestCase.java index ec28fcdff6b..925ba64e578 100644 --- a/plugin/core/src/test/java/org/elasticsearch/license/AbstractLicenseServiceTestCase.java +++ b/plugin/core/src/test/java/org/elasticsearch/license/AbstractLicenseServiceTestCase.java @@ -18,7 +18,7 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.env.Environment; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.watcher.ResourceWatcherService; -import org.elasticsearch.xpack.watcher.watch.clock.ClockMock; +import org.elasticsearch.xpack.core.watcher.watch.ClockMock; import org.junit.After; import org.junit.Before; diff --git a/plugin/core/src/test/java/org/elasticsearch/license/AbstractLicensesIntegrationTestCase.java b/plugin/core/src/test/java/org/elasticsearch/license/AbstractLicensesIntegrationTestCase.java index efea851e73c..e9c9ba95bfd 100644 --- a/plugin/core/src/test/java/org/elasticsearch/license/AbstractLicensesIntegrationTestCase.java +++ b/plugin/core/src/test/java/org/elasticsearch/license/AbstractLicensesIntegrationTestCase.java @@ -14,9 +14,9 @@ import org.elasticsearch.common.Nullable; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.plugins.Plugin; import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.xpack.LocalStateCompositeXPackPlugin; -import org.elasticsearch.xpack.XPackClientPlugin; -import org.elasticsearch.xpack.XPackSettings; +import org.elasticsearch.xpack.core.LocalStateCompositeXPackPlugin; +import org.elasticsearch.xpack.core.XPackClientPlugin; +import org.elasticsearch.xpack.core.XPackSettings; import java.util.Arrays; import java.util.Collection; diff --git a/plugin/core/src/test/java/org/elasticsearch/license/LicenseScheduleTests.java b/plugin/core/src/test/java/org/elasticsearch/license/LicenseScheduleTests.java index 844b14dd676..977061154dc 100644 --- a/plugin/core/src/test/java/org/elasticsearch/license/LicenseScheduleTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/license/LicenseScheduleTests.java @@ -7,7 +7,7 @@ package org.elasticsearch.license; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.scheduler.SchedulerEngine; +import org.elasticsearch.xpack.core.scheduler.SchedulerEngine; import org.junit.Before; import static org.hamcrest.Matchers.equalTo; diff --git a/plugin/core/src/test/java/org/elasticsearch/license/LicenseServiceClusterNotRecoveredTests.java b/plugin/core/src/test/java/org/elasticsearch/license/LicenseServiceClusterNotRecoveredTests.java index dc19e7ab5a6..4e7356ad63d 100644 --- a/plugin/core/src/test/java/org/elasticsearch/license/LicenseServiceClusterNotRecoveredTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/license/LicenseServiceClusterNotRecoveredTests.java @@ -11,7 +11,7 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.plugins.Plugin; import org.elasticsearch.test.ESIntegTestCase; import org.elasticsearch.transport.Netty4Plugin; -import org.elasticsearch.xpack.LocalStateCompositeXPackPlugin; +import org.elasticsearch.xpack.core.LocalStateCompositeXPackPlugin; import java.util.Arrays; import java.util.Collection; diff --git a/plugin/core/src/test/java/org/elasticsearch/license/LicenseServiceClusterTests.java b/plugin/core/src/test/java/org/elasticsearch/license/LicenseServiceClusterTests.java index acd4df85262..55dcf387b7d 100644 --- a/plugin/core/src/test/java/org/elasticsearch/license/LicenseServiceClusterTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/license/LicenseServiceClusterTests.java @@ -13,8 +13,8 @@ import org.elasticsearch.env.Environment; import org.elasticsearch.plugins.Plugin; import org.elasticsearch.test.ESIntegTestCase.ClusterScope; import org.elasticsearch.transport.Netty4Plugin; -import org.elasticsearch.xpack.LocalStateCompositeXPackPlugin; -import org.elasticsearch.xpack.XPackPlugin; +import org.elasticsearch.xpack.core.LocalStateCompositeXPackPlugin; +import org.elasticsearch.xpack.core.XPackPlugin; import java.nio.charset.StandardCharsets; import java.nio.file.Files; diff --git a/plugin/core/src/test/java/org/elasticsearch/license/LicensesManagerServiceTests.java b/plugin/core/src/test/java/org/elasticsearch/license/LicensesManagerServiceTests.java index 53043e2d636..40005fa78c8 100644 --- a/plugin/core/src/test/java/org/elasticsearch/license/LicensesManagerServiceTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/license/LicensesManagerServiceTests.java @@ -12,8 +12,8 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.plugins.Plugin; import org.elasticsearch.test.ESSingleNodeTestCase; -import org.elasticsearch.xpack.LocalStateCompositeXPackPlugin; -import org.elasticsearch.xpack.XPackSettings; +import org.elasticsearch.xpack.core.LocalStateCompositeXPackPlugin; +import org.elasticsearch.xpack.core.XPackSettings; import org.junit.Before; import java.util.Collection; diff --git a/plugin/core/src/test/java/org/elasticsearch/license/LicensesTransportTests.java b/plugin/core/src/test/java/org/elasticsearch/license/LicensesTransportTests.java index f5ba41f6abd..11723818864 100644 --- a/plugin/core/src/test/java/org/elasticsearch/license/LicensesTransportTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/license/LicensesTransportTests.java @@ -13,8 +13,8 @@ import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.node.Node; import org.elasticsearch.plugins.Plugin; import org.elasticsearch.test.ESSingleNodeTestCase; -import org.elasticsearch.xpack.LocalStateCompositeXPackPlugin; -import org.elasticsearch.xpack.XPackSettings; +import org.elasticsearch.xpack.core.LocalStateCompositeXPackPlugin; +import org.elasticsearch.xpack.core.XPackSettings; import java.nio.charset.StandardCharsets; import java.util.Collection; diff --git a/plugin/core/src/test/java/org/elasticsearch/license/UpgradeToTrialTests.java b/plugin/core/src/test/java/org/elasticsearch/license/UpgradeToTrialTests.java index 6268a9170be..bcf53a23495 100644 --- a/plugin/core/src/test/java/org/elasticsearch/license/UpgradeToTrialTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/license/UpgradeToTrialTests.java @@ -14,8 +14,8 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.plugins.Plugin; import org.elasticsearch.test.ESIntegTestCase; import org.elasticsearch.transport.Netty4Plugin; -import org.elasticsearch.xpack.LocalStateCompositeXPackPlugin; -import org.elasticsearch.xpack.XPackClientPlugin; +import org.elasticsearch.xpack.core.LocalStateCompositeXPackPlugin; +import org.elasticsearch.xpack.core.XPackClientPlugin; import java.io.InputStreamReader; import java.nio.charset.StandardCharsets; diff --git a/plugin/core/src/test/java/org/elasticsearch/xpack/ClientHelperTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ClientHelperTests.java similarity index 98% rename from plugin/core/src/test/java/org/elasticsearch/xpack/ClientHelperTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/ClientHelperTests.java index b9212a00216..a243b8c995d 100644 --- a/plugin/core/src/test/java/org/elasticsearch/xpack/ClientHelperTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ClientHelperTests.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack; +package org.elasticsearch.xpack.core; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.admin.cluster.health.ClusterHealthAction; @@ -14,6 +14,7 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.ThreadPool; +import org.elasticsearch.xpack.core.ClientHelper; import java.util.concurrent.CountDownLatch; diff --git a/plugin/core/src/test/java/org/elasticsearch/xpack/LocalStateCompositeXPackPlugin.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/LocalStateCompositeXPackPlugin.java similarity index 99% rename from plugin/core/src/test/java/org/elasticsearch/xpack/LocalStateCompositeXPackPlugin.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/LocalStateCompositeXPackPlugin.java index eaec05a8a22..7d3450bf66c 100644 --- a/plugin/core/src/test/java/org/elasticsearch/xpack/LocalStateCompositeXPackPlugin.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/LocalStateCompositeXPackPlugin.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack; +package org.elasticsearch.xpack.core; import org.elasticsearch.action.ActionRequest; import org.elasticsearch.action.ActionResponse; @@ -56,7 +56,8 @@ import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.Transport; import org.elasticsearch.transport.TransportInterceptor; import org.elasticsearch.watcher.ResourceWatcherService; -import org.elasticsearch.xpack.ssl.SSLService; +import org.elasticsearch.xpack.core.XPackPlugin; +import org.elasticsearch.xpack.core.ssl.SSLService; import java.nio.file.Path; import java.util.ArrayList; diff --git a/plugin/core/src/test/java/org/elasticsearch/xpack/TestXPackTransportClient.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/TestXPackTransportClient.java similarity index 96% rename from plugin/core/src/test/java/org/elasticsearch/xpack/TestXPackTransportClient.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/TestXPackTransportClient.java index e0087bea2c5..dbe4de2abb4 100644 --- a/plugin/core/src/test/java/org/elasticsearch/xpack/TestXPackTransportClient.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/TestXPackTransportClient.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack; +package org.elasticsearch.xpack.core; import org.elasticsearch.client.transport.TransportClient; import org.elasticsearch.common.settings.Settings; diff --git a/plugin/core/src/test/java/org/elasticsearch/xpack/XPackSettingsTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/XPackSettingsTests.java similarity index 92% rename from plugin/core/src/test/java/org/elasticsearch/xpack/XPackSettingsTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/XPackSettingsTests.java index d968b65bf9f..ed76a9a2780 100644 --- a/plugin/core/src/test/java/org/elasticsearch/xpack/XPackSettingsTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/XPackSettingsTests.java @@ -3,9 +3,10 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack; +package org.elasticsearch.xpack.core; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.XPackSettings; import javax.crypto.Cipher; diff --git a/plugin/core/src/test/java/org/elasticsearch/xpack/action/TransportXPackInfoActionTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/action/TransportXPackInfoActionTests.java similarity index 98% rename from plugin/core/src/test/java/org/elasticsearch/xpack/action/TransportXPackInfoActionTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/action/TransportXPackInfoActionTests.java index d6767c4514a..f87d9f33cf5 100644 --- a/plugin/core/src/test/java/org/elasticsearch/xpack/action/TransportXPackInfoActionTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/action/TransportXPackInfoActionTests.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.action; +package org.elasticsearch.xpack.core.action; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.support.ActionFilters; @@ -15,7 +15,7 @@ import org.elasticsearch.license.LicenseService; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.XPackFeatureSet; +import org.elasticsearch.xpack.core.XPackFeatureSet; import org.elasticsearch.license.XPackInfoResponse.FeatureSetsInfo.FeatureSet; import java.util.Collections; diff --git a/plugin/core/src/test/java/org/elasticsearch/xpack/common/IteratingActionListenerTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/common/IteratingActionListenerTests.java similarity index 99% rename from plugin/core/src/test/java/org/elasticsearch/xpack/common/IteratingActionListenerTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/common/IteratingActionListenerTests.java index eea9e6e44e6..0648d774075 100644 --- a/plugin/core/src/test/java/org/elasticsearch/xpack/common/IteratingActionListenerTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/common/IteratingActionListenerTests.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.common; +package org.elasticsearch.xpack.core.common; import org.elasticsearch.ElasticsearchException; import org.elasticsearch.action.ActionListener; diff --git a/plugin/core/src/test/java/org/elasticsearch/xpack/deprecation/DeprecationChecksTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/deprecation/DeprecationChecksTests.java similarity index 95% rename from plugin/core/src/test/java/org/elasticsearch/xpack/deprecation/DeprecationChecksTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/deprecation/DeprecationChecksTests.java index 11607e8ab42..8757b83b136 100644 --- a/plugin/core/src/test/java/org/elasticsearch/xpack/deprecation/DeprecationChecksTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/deprecation/DeprecationChecksTests.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.deprecation; +package org.elasticsearch.xpack.core.deprecation; import org.elasticsearch.test.ESTestCase; diff --git a/plugin/core/src/test/java/org/elasticsearch/xpack/deprecation/DeprecationInfoActionRequestTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/deprecation/DeprecationInfoActionRequestTests.java similarity index 94% rename from plugin/core/src/test/java/org/elasticsearch/xpack/deprecation/DeprecationInfoActionRequestTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/deprecation/DeprecationInfoActionRequestTests.java index dcee63597c5..3eac1f1ace6 100644 --- a/plugin/core/src/test/java/org/elasticsearch/xpack/deprecation/DeprecationInfoActionRequestTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/deprecation/DeprecationInfoActionRequestTests.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.deprecation; +package org.elasticsearch.xpack.core.deprecation; import org.elasticsearch.common.io.stream.Writeable; import org.elasticsearch.test.AbstractWireSerializingTestCase; diff --git a/plugin/core/src/test/java/org/elasticsearch/xpack/deprecation/DeprecationInfoActionResponseTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/deprecation/DeprecationInfoActionResponseTests.java similarity index 99% rename from plugin/core/src/test/java/org/elasticsearch/xpack/deprecation/DeprecationInfoActionResponseTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/deprecation/DeprecationInfoActionResponseTests.java index 504cf6510a6..f776c36398e 100644 --- a/plugin/core/src/test/java/org/elasticsearch/xpack/deprecation/DeprecationInfoActionResponseTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/deprecation/DeprecationInfoActionResponseTests.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.deprecation; +package org.elasticsearch.xpack.core.deprecation; import org.elasticsearch.Build; import org.elasticsearch.Version; diff --git a/plugin/core/src/test/java/org/elasticsearch/xpack/deprecation/DeprecationIssueTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/deprecation/DeprecationIssueTests.java similarity index 95% rename from plugin/core/src/test/java/org/elasticsearch/xpack/deprecation/DeprecationIssueTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/deprecation/DeprecationIssueTests.java index d6cc8c50d63..71f8f62152f 100644 --- a/plugin/core/src/test/java/org/elasticsearch/xpack/deprecation/DeprecationIssueTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/deprecation/DeprecationIssueTests.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.deprecation; +package org.elasticsearch.xpack.core.deprecation; import org.elasticsearch.common.io.stream.BytesStreamOutput; import org.elasticsearch.common.io.stream.StreamInput; @@ -17,7 +17,7 @@ import java.io.IOException; import java.util.Map; import static org.elasticsearch.common.xcontent.ToXContent.EMPTY_PARAMS; -import static org.elasticsearch.xpack.deprecation.DeprecationIssue.Level; +import static org.elasticsearch.xpack.core.deprecation.DeprecationIssue.Level; import static org.hamcrest.core.IsEqual.equalTo; public class DeprecationIssueTests extends ESTestCase { diff --git a/plugin/core/src/test/java/org/elasticsearch/xpack/extensions/InstallXPackExtensionCommandTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/extensions/InstallXPackExtensionCommandTests.java similarity index 99% rename from plugin/core/src/test/java/org/elasticsearch/xpack/extensions/InstallXPackExtensionCommandTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/extensions/InstallXPackExtensionCommandTests.java index 06dd50f7d1c..b0291aa5cbf 100644 --- a/plugin/core/src/test/java/org/elasticsearch/xpack/extensions/InstallXPackExtensionCommandTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/extensions/InstallXPackExtensionCommandTests.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.extensions; +package org.elasticsearch.xpack.core.extensions; import org.apache.lucene.util.LuceneTestCase; import org.elasticsearch.Version; diff --git a/plugin/core/src/test/java/org/elasticsearch/xpack/extensions/ListXPackExtensionCommandTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/extensions/ListXPackExtensionCommandTests.java similarity index 96% rename from plugin/core/src/test/java/org/elasticsearch/xpack/extensions/ListXPackExtensionCommandTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/extensions/ListXPackExtensionCommandTests.java index d515a4549f9..eaaf5bdfe89 100644 --- a/plugin/core/src/test/java/org/elasticsearch/xpack/extensions/ListXPackExtensionCommandTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/extensions/ListXPackExtensionCommandTests.java @@ -3,13 +3,12 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.extensions; +package org.elasticsearch.xpack.core.extensions; import org.apache.lucene.util.LuceneTestCase; import org.elasticsearch.Version; import org.elasticsearch.cli.ExitCodes; import org.elasticsearch.cli.MockTerminal; -import org.elasticsearch.cli.Terminal; import org.elasticsearch.cli.UserException; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.env.Environment; @@ -168,7 +167,6 @@ public class ListXPackExtensionCommandTests extends ESTestCase { "description", "fake desc"); IllegalArgumentException e = expectThrows(IllegalArgumentException.class, () -> listExtensions(home, env)); assertEquals(e.getMessage(), "Property [name] is missing in [" + - extensionsFile(env).resolve("fake1") - .resolve(XPackExtensionInfo.XPACK_EXTENSION_PROPERTIES).toString() + "]"); + extensionsFile(env).resolve("fake1").resolve(XPackExtensionInfo.XPACK_EXTENSION_PROPERTIES).toString() + "]"); } } diff --git a/plugin/core/src/test/java/org/elasticsearch/xpack/extensions/RemoveXPackExtensionCommandTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/extensions/RemoveXPackExtensionCommandTests.java similarity index 98% rename from plugin/core/src/test/java/org/elasticsearch/xpack/extensions/RemoveXPackExtensionCommandTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/extensions/RemoveXPackExtensionCommandTests.java index a7fee499cef..aeb23d15a78 100644 --- a/plugin/core/src/test/java/org/elasticsearch/xpack/extensions/RemoveXPackExtensionCommandTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/extensions/RemoveXPackExtensionCommandTests.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.extensions; +package org.elasticsearch.xpack.core.extensions; import org.apache.lucene.util.LuceneTestCase; import org.elasticsearch.cli.MockTerminal; diff --git a/plugin/core/src/test/java/org/elasticsearch/xpack/extensions/XPackExtensionInfoTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/extensions/XPackExtensionInfoTests.java similarity index 99% rename from plugin/core/src/test/java/org/elasticsearch/xpack/extensions/XPackExtensionInfoTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/extensions/XPackExtensionInfoTests.java index 6894ad853f1..ec960468879 100644 --- a/plugin/core/src/test/java/org/elasticsearch/xpack/extensions/XPackExtensionInfoTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/extensions/XPackExtensionInfoTests.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.extensions; +package org.elasticsearch.xpack.core.extensions; import org.elasticsearch.Version; import org.elasticsearch.test.ESTestCase; diff --git a/plugin/core/src/test/java/org/elasticsearch/xpack/extensions/XPackExtensionSecurityTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/extensions/XPackExtensionSecurityTests.java similarity index 98% rename from plugin/core/src/test/java/org/elasticsearch/xpack/extensions/XPackExtensionSecurityTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/extensions/XPackExtensionSecurityTests.java index d912376aae5..141c5aed97a 100644 --- a/plugin/core/src/test/java/org/elasticsearch/xpack/extensions/XPackExtensionSecurityTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/extensions/XPackExtensionSecurityTests.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.extensions; +package org.elasticsearch.xpack.core.extensions; import org.elasticsearch.test.ESTestCase; diff --git a/plugin/core/src/test/java/org/elasticsearch/xpack/extensions/XPackExtensionTestUtil.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/extensions/XPackExtensionTestUtil.java similarity index 95% rename from plugin/core/src/test/java/org/elasticsearch/xpack/extensions/XPackExtensionTestUtil.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/extensions/XPackExtensionTestUtil.java index 866b6e557e9..5091f2bd87d 100644 --- a/plugin/core/src/test/java/org/elasticsearch/xpack/extensions/XPackExtensionTestUtil.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/extensions/XPackExtensionTestUtil.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.extensions; +package org.elasticsearch.xpack.core.extensions; import java.io.IOException; diff --git a/plugin/core/src/test/java/org/elasticsearch/xpack/extensions/XPackExtensionsServiceTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/extensions/XPackExtensionsServiceTests.java similarity index 94% rename from plugin/core/src/test/java/org/elasticsearch/xpack/extensions/XPackExtensionsServiceTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/extensions/XPackExtensionsServiceTests.java index 7730ec7a4dd..68f90cfdf42 100644 --- a/plugin/core/src/test/java/org/elasticsearch/xpack/extensions/XPackExtensionsServiceTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/extensions/XPackExtensionsServiceTests.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.extensions; +package org.elasticsearch.xpack.core.extensions; import org.elasticsearch.test.ESTestCase; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/StartDatafeedActionRequestTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/StartDatafeedActionRequestTests.java similarity index 91% rename from plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/StartDatafeedActionRequestTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/StartDatafeedActionRequestTests.java index a47ba96b873..bae610c5e36 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/StartDatafeedActionRequestTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/StartDatafeedActionRequestTests.java @@ -3,14 +3,14 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.action; +package org.elasticsearch.xpack.core.ml.action; import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.AbstractStreamableXContentTestCase; -import org.elasticsearch.xpack.ml.action.StartDatafeedAction.DatafeedParams; -import org.elasticsearch.xpack.ml.action.StartDatafeedAction.Request; +import org.elasticsearch.xpack.core.ml.action.StartDatafeedAction.DatafeedParams; +import org.elasticsearch.xpack.core.ml.action.StartDatafeedAction.Request; import static org.hamcrest.Matchers.equalTo; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/calendars/ScheduledEventTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/calendars/ScheduledEventTests.java similarity index 91% rename from plugin/ml/src/test/java/org/elasticsearch/xpack/ml/calendars/ScheduledEventTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/calendars/ScheduledEventTests.java index 47a3d6cff44..d6cca7a61e1 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/calendars/ScheduledEventTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/calendars/ScheduledEventTests.java @@ -3,19 +3,19 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.calendars; +package org.elasticsearch.xpack.core.ml.calendars; import org.elasticsearch.ElasticsearchStatusException; import org.elasticsearch.common.io.stream.Writeable; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.AbstractSerializingTestCase; -import org.elasticsearch.xpack.ml.job.config.Connective; -import org.elasticsearch.xpack.ml.job.config.DetectionRule; -import org.elasticsearch.xpack.ml.job.config.Operator; -import org.elasticsearch.xpack.ml.job.config.RuleAction; -import org.elasticsearch.xpack.ml.job.config.RuleCondition; -import org.elasticsearch.xpack.ml.job.config.RuleConditionType; +import org.elasticsearch.xpack.core.ml.job.config.Connective; +import org.elasticsearch.xpack.core.ml.job.config.DetectionRule; +import org.elasticsearch.xpack.core.ml.job.config.Operator; +import org.elasticsearch.xpack.core.ml.job.config.RuleAction; +import org.elasticsearch.xpack.core.ml.job.config.RuleCondition; +import org.elasticsearch.xpack.core.ml.job.config.RuleConditionType; import org.joda.time.DateTime; import java.io.IOException; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/ChunkingConfigTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/datafeed/ChunkingConfigTests.java similarity index 98% rename from plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/ChunkingConfigTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/datafeed/ChunkingConfigTests.java index 60b132dd29c..ef89200b765 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/ChunkingConfigTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/datafeed/ChunkingConfigTests.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.datafeed; +package org.elasticsearch.xpack.core.ml.datafeed; import org.elasticsearch.common.io.stream.Writeable; import org.elasticsearch.common.unit.TimeValue; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedConfigTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/datafeed/DatafeedConfigTests.java similarity index 99% rename from plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedConfigTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/datafeed/DatafeedConfigTests.java index 5bd0455b6ae..58282667096 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedConfigTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/datafeed/DatafeedConfigTests.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.datafeed; +package org.elasticsearch.xpack.core.ml.datafeed; import com.carrotsearch.randomizedtesting.generators.CodepointSetGenerator; import org.elasticsearch.ElasticsearchException; @@ -31,8 +31,8 @@ import org.elasticsearch.search.builder.SearchSourceBuilder; import org.elasticsearch.search.builder.SearchSourceBuilder.ScriptField; import org.elasticsearch.test.AbstractSerializingTestCase; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.datafeed.ChunkingConfig.Mode; -import org.elasticsearch.xpack.ml.job.messages.Messages; +import org.elasticsearch.xpack.core.ml.datafeed.ChunkingConfig.Mode; +import org.elasticsearch.xpack.core.ml.job.messages.Messages; import org.joda.time.DateTimeZone; import java.io.IOException; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedUpdateTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/datafeed/DatafeedUpdateTests.java similarity index 99% rename from plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedUpdateTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/datafeed/DatafeedUpdateTests.java index 8b153de708a..d059e567d15 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedUpdateTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/datafeed/DatafeedUpdateTests.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.datafeed; +package org.elasticsearch.xpack.core.ml.datafeed; import org.elasticsearch.common.io.stream.NamedWriteableRegistry; import org.elasticsearch.common.io.stream.Writeable; @@ -23,7 +23,7 @@ import org.elasticsearch.search.aggregations.metrics.max.MaxAggregationBuilder; import org.elasticsearch.search.builder.SearchSourceBuilder; import org.elasticsearch.search.builder.SearchSourceBuilder.ScriptField; import org.elasticsearch.test.AbstractSerializingTestCase; -import org.elasticsearch.xpack.ml.datafeed.ChunkingConfig.Mode; +import org.elasticsearch.xpack.core.ml.datafeed.ChunkingConfig.Mode; import java.util.ArrayList; import java.util.Collections; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/ExtractorUtilsTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/datafeed/extractor/ExtractorUtilsTests.java similarity index 98% rename from plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/ExtractorUtilsTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/datafeed/extractor/ExtractorUtilsTests.java index f91510dbb6a..b1eb13b5d73 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/ExtractorUtilsTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/datafeed/extractor/ExtractorUtilsTests.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.datafeed.extractor; +package org.elasticsearch.xpack.core.ml.datafeed.extractor; import org.elasticsearch.ElasticsearchException; import org.elasticsearch.search.aggregations.AggregationBuilder; diff --git a/plugin/core/src/test/java/org/elasticsearch/xpack/ml/integration/MlRestTestStateCleaner.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/integration/MlRestTestStateCleaner.java similarity index 99% rename from plugin/core/src/test/java/org/elasticsearch/xpack/ml/integration/MlRestTestStateCleaner.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/integration/MlRestTestStateCleaner.java index 0ea80b72a2f..9d42efd8eb2 100644 --- a/plugin/core/src/test/java/org/elasticsearch/xpack/ml/integration/MlRestTestStateCleaner.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/integration/MlRestTestStateCleaner.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.integration; +package org.elasticsearch.xpack.core.ml.integration; import org.apache.http.HttpStatus; import org.apache.logging.log4j.Logger; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/AnalysisConfigTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/job/config/AnalysisConfigTests.java similarity index 99% rename from plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/AnalysisConfigTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/job/config/AnalysisConfigTests.java index 7b1b1f10a8c..5e445704dda 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/AnalysisConfigTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/job/config/AnalysisConfigTests.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.config; +package org.elasticsearch.xpack.core.ml.job.config; import org.elasticsearch.ElasticsearchException; import org.elasticsearch.common.io.stream.Writeable; @@ -11,8 +11,8 @@ import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.AbstractSerializingTestCase; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.job.messages.Messages; -import org.elasticsearch.xpack.ml.job.process.autodetect.writer.RecordWriter; +import org.elasticsearch.xpack.core.ml.job.messages.Messages; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.writer.RecordWriter; import java.util.ArrayList; import java.util.Arrays; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/AnalysisLimitsTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/job/config/AnalysisLimitsTests.java similarity index 98% rename from plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/AnalysisLimitsTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/job/config/AnalysisLimitsTests.java index afafa1de687..5dba5ae2519 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/AnalysisLimitsTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/job/config/AnalysisLimitsTests.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.config; +package org.elasticsearch.xpack.core.ml.job.config; import org.elasticsearch.ElasticsearchException; import org.elasticsearch.common.ParsingException; @@ -13,7 +13,7 @@ import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.test.AbstractSerializingTestCase; -import org.elasticsearch.xpack.ml.job.messages.Messages; +import org.elasticsearch.xpack.core.ml.job.messages.Messages; import java.io.IOException; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/DataDescriptionTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/job/config/DataDescriptionTests.java similarity index 97% rename from plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/DataDescriptionTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/job/config/DataDescriptionTests.java index ce4c9c195ef..16ccb1d293a 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/DataDescriptionTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/job/config/DataDescriptionTests.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.config; +package org.elasticsearch.xpack.core.ml.job.config; import org.elasticsearch.ElasticsearchException; import org.elasticsearch.common.ParsingException; @@ -13,8 +13,9 @@ import org.elasticsearch.common.xcontent.NamedXContentRegistry; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.json.JsonXContent; import org.elasticsearch.test.AbstractSerializingTestCase; -import org.elasticsearch.xpack.ml.job.config.DataDescription.DataFormat; -import org.elasticsearch.xpack.ml.job.messages.Messages; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription.DataFormat; +import org.elasticsearch.xpack.core.ml.job.messages.Messages; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; @@ -206,7 +207,7 @@ public class DataDescriptionTests extends AbstractSerializingTestCase { diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/groups/GroupOrJobLookupTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/job/groups/GroupOrJobLookupTests.java similarity index 97% rename from plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/groups/GroupOrJobLookupTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/job/groups/GroupOrJobLookupTests.java index 26cf96f2d85..8543f02cec5 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/groups/GroupOrJobLookupTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/job/groups/GroupOrJobLookupTests.java @@ -3,12 +3,13 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.groups; +package org.elasticsearch.xpack.core.ml.job.groups; import org.elasticsearch.ResourceAlreadyExistsException; import org.elasticsearch.ResourceNotFoundException; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.groups.GroupOrJobLookup; import java.util.ArrayList; import java.util.Arrays; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/groups/GroupOrJobTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/job/groups/GroupOrJobTests.java similarity index 88% rename from plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/groups/GroupOrJobTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/job/groups/GroupOrJobTests.java index d13a9c4bb94..a0059ca940b 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/groups/GroupOrJobTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/job/groups/GroupOrJobTests.java @@ -3,10 +3,11 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.groups; +package org.elasticsearch.xpack.core.ml.job.groups; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.groups.GroupOrJob; import java.util.Arrays; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/persistence/ElasticsearchMappingsTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/job/persistence/ElasticsearchMappingsTests.java similarity index 89% rename from plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/persistence/ElasticsearchMappingsTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/job/persistence/ElasticsearchMappingsTests.java index 70f3ca68c5e..b88f75feeb2 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/persistence/ElasticsearchMappingsTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/job/persistence/ElasticsearchMappingsTests.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.persistence; +package org.elasticsearch.xpack.core.ml.job.persistence; import com.fasterxml.jackson.core.JsonFactory; import com.fasterxml.jackson.core.JsonParseException; @@ -12,14 +12,14 @@ import com.fasterxml.jackson.core.JsonToken; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.DataCounts; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSizeStats; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshot; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.Quantiles; -import org.elasticsearch.xpack.ml.job.results.AnomalyRecord; -import org.elasticsearch.xpack.ml.job.results.CategoryDefinition; -import org.elasticsearch.xpack.ml.job.results.ReservedFieldNames; -import org.elasticsearch.xpack.ml.job.results.Result; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.DataCounts; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSizeStats; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshot; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.Quantiles; +import org.elasticsearch.xpack.core.ml.job.results.AnomalyRecord; +import org.elasticsearch.xpack.core.ml.job.results.CategoryDefinition; +import org.elasticsearch.xpack.core.ml.job.results.ReservedFieldNames; +import org.elasticsearch.xpack.core.ml.job.results.Result; import java.io.BufferedInputStream; import java.io.ByteArrayInputStream; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/AnomalyCauseTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/job/results/AnomalyCauseTests.java similarity index 95% rename from plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/AnomalyCauseTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/job/results/AnomalyCauseTests.java index 87c2b26d654..628239d6f2b 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/AnomalyCauseTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/job/results/AnomalyCauseTests.java @@ -3,11 +3,13 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.results; +package org.elasticsearch.xpack.core.ml.job.results; import org.elasticsearch.common.io.stream.Writeable.Reader; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.AbstractSerializingTestCase; +import org.elasticsearch.xpack.core.ml.job.results.AnomalyCause; +import org.elasticsearch.xpack.core.ml.job.results.Influence; import java.util.ArrayList; import java.util.List; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/AnomalyRecordTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/job/results/AnomalyRecordTests.java similarity index 96% rename from plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/AnomalyRecordTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/job/results/AnomalyRecordTests.java index 376ccd4631b..f8dcd1b37ea 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/AnomalyRecordTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/job/results/AnomalyRecordTests.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.results; +package org.elasticsearch.xpack.core.ml.job.results; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.io.stream.Writeable; @@ -14,6 +14,10 @@ import org.elasticsearch.common.xcontent.XContentHelper; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.test.AbstractSerializingTestCase; +import org.elasticsearch.xpack.core.ml.job.results.AnomalyCause; +import org.elasticsearch.xpack.core.ml.job.results.AnomalyCauseTests; +import org.elasticsearch.xpack.core.ml.job.results.AnomalyRecord; +import org.elasticsearch.xpack.core.ml.job.results.Influence; import java.io.IOException; import java.util.ArrayList; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/BucketInfluencerTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/job/results/BucketInfluencerTests.java similarity index 99% rename from plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/BucketInfluencerTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/job/results/BucketInfluencerTests.java index 27d2d76f45d..31166ebf19a 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/BucketInfluencerTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/job/results/BucketInfluencerTests.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.results; +package org.elasticsearch.xpack.core.ml.job.results; import org.elasticsearch.common.io.stream.Writeable.Reader; import org.elasticsearch.common.xcontent.ToXContent; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/InfluencerTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/job/results/InfluencerTests.java similarity index 97% rename from plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/InfluencerTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/job/results/InfluencerTests.java index 35cd7a3ec85..f1a008ff482 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/InfluencerTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/job/results/InfluencerTests.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.job.results; +package org.elasticsearch.xpack.core.ml.job.results; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.io.stream.Writeable.Reader; @@ -14,6 +14,7 @@ import org.elasticsearch.common.xcontent.XContentHelper; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.test.AbstractSerializingTestCase; +import org.elasticsearch.xpack.core.ml.job.results.Influencer; import java.io.IOException; import java.util.Date; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/notifications/AuditMessageTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/notifications/AuditMessageTests.java similarity index 98% rename from plugin/ml/src/test/java/org/elasticsearch/xpack/ml/notifications/AuditMessageTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/notifications/AuditMessageTests.java index 2bbf552bb7c..f5c30c59003 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/notifications/AuditMessageTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/notifications/AuditMessageTests.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ml.notifications; +package org.elasticsearch.xpack.core.ml.notifications; import org.elasticsearch.common.io.stream.Writeable.Reader; import org.elasticsearch.common.xcontent.XContentParser; diff --git a/plugin/core/src/test/java/org/elasticsearch/xpack/monitoring/test/MockPainlessScriptEngine.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/monitoring/test/MockPainlessScriptEngine.java similarity index 97% rename from plugin/core/src/test/java/org/elasticsearch/xpack/monitoring/test/MockPainlessScriptEngine.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/monitoring/test/MockPainlessScriptEngine.java index 627498400a4..6c0e5e156ca 100644 --- a/plugin/core/src/test/java/org/elasticsearch/xpack/monitoring/test/MockPainlessScriptEngine.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/monitoring/test/MockPainlessScriptEngine.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.monitoring.test; +package org.elasticsearch.xpack.core.monitoring.test; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.script.ExecutableScript; diff --git a/plugin/core/src/test/java/org/elasticsearch/xpack/persistent/CancelPersistentTaskRequestTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/persistent/CancelPersistentTaskRequestTests.java similarity index 84% rename from plugin/core/src/test/java/org/elasticsearch/xpack/persistent/CancelPersistentTaskRequestTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/persistent/CancelPersistentTaskRequestTests.java index 3cd4c67bbf3..d664c120072 100644 --- a/plugin/core/src/test/java/org/elasticsearch/xpack/persistent/CancelPersistentTaskRequestTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/persistent/CancelPersistentTaskRequestTests.java @@ -3,10 +3,10 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.persistent; +package org.elasticsearch.xpack.core.persistent; import org.elasticsearch.test.AbstractStreamableTestCase; -import org.elasticsearch.xpack.persistent.RemovePersistentTaskAction.Request; +import org.elasticsearch.xpack.core.persistent.RemovePersistentTaskAction.Request; import static com.carrotsearch.randomizedtesting.RandomizedTest.randomAsciiOfLength; diff --git a/plugin/core/src/test/java/org/elasticsearch/xpack/persistent/PersistentTasksClusterServiceTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/persistent/PersistentTasksClusterServiceTests.java similarity index 97% rename from plugin/core/src/test/java/org/elasticsearch/xpack/persistent/PersistentTasksClusterServiceTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/persistent/PersistentTasksClusterServiceTests.java index 460c56524bb..3c5039573da 100644 --- a/plugin/core/src/test/java/org/elasticsearch/xpack/persistent/PersistentTasksClusterServiceTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/persistent/PersistentTasksClusterServiceTests.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.persistent; +package org.elasticsearch.xpack.core.persistent; import com.carrotsearch.hppc.cursors.ObjectCursor; import org.elasticsearch.Version; @@ -19,10 +19,10 @@ import org.elasticsearch.common.UUIDs; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.VersionUtils; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData.Assignment; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData.PersistentTask; -import org.elasticsearch.xpack.persistent.TestPersistentTasksPlugin.TestParams; -import org.elasticsearch.xpack.persistent.TestPersistentTasksPlugin.TestPersistentTasksExecutor; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData.Assignment; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData.PersistentTask; +import org.elasticsearch.xpack.core.persistent.TestPersistentTasksPlugin.TestParams; +import org.elasticsearch.xpack.core.persistent.TestPersistentTasksPlugin.TestPersistentTasksExecutor; import java.util.ArrayList; import java.util.Arrays; @@ -31,7 +31,7 @@ import java.util.HashSet; import java.util.List; import static java.util.Collections.emptyMap; -import static org.elasticsearch.xpack.persistent.PersistentTasksExecutor.NO_NODE_FOUND; +import static org.elasticsearch.xpack.core.persistent.PersistentTasksExecutor.NO_NODE_FOUND; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.lessThanOrEqualTo; import static org.hamcrest.Matchers.notNullValue; diff --git a/plugin/core/src/test/java/org/elasticsearch/xpack/persistent/PersistentTasksCustomMetaDataTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/persistent/PersistentTasksCustomMetaDataTests.java similarity index 94% rename from plugin/core/src/test/java/org/elasticsearch/xpack/persistent/PersistentTasksCustomMetaDataTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/persistent/PersistentTasksCustomMetaDataTests.java index 82e945f63b1..7ddc85ce5c1 100644 --- a/plugin/core/src/test/java/org/elasticsearch/xpack/persistent/PersistentTasksCustomMetaDataTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/persistent/PersistentTasksCustomMetaDataTests.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.persistent; +package org.elasticsearch.xpack.core.persistent; import org.elasticsearch.ResourceNotFoundException; import org.elasticsearch.cluster.Diff; @@ -23,12 +23,12 @@ import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.tasks.Task; import org.elasticsearch.test.AbstractDiffableSerializationTestCase; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData.Assignment; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData.Builder; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData.PersistentTask; -import org.elasticsearch.xpack.persistent.TestPersistentTasksPlugin.Status; -import org.elasticsearch.xpack.persistent.TestPersistentTasksPlugin.TestParams; -import org.elasticsearch.xpack.persistent.TestPersistentTasksPlugin.TestPersistentTasksExecutor; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData.Assignment; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData.Builder; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData.PersistentTask; +import org.elasticsearch.xpack.core.persistent.TestPersistentTasksPlugin.Status; +import org.elasticsearch.xpack.core.persistent.TestPersistentTasksPlugin.TestParams; +import org.elasticsearch.xpack.core.persistent.TestPersistentTasksPlugin.TestPersistentTasksExecutor; import java.io.IOException; import java.util.ArrayList; @@ -37,7 +37,7 @@ import java.util.Collections; import static org.elasticsearch.cluster.metadata.MetaData.CONTEXT_MODE_GATEWAY; import static org.elasticsearch.cluster.metadata.MetaData.CONTEXT_MODE_SNAPSHOT; -import static org.elasticsearch.xpack.persistent.PersistentTasksExecutor.NO_NODE_FOUND; +import static org.elasticsearch.xpack.core.persistent.PersistentTasksExecutor.NO_NODE_FOUND; public class PersistentTasksCustomMetaDataTests extends AbstractDiffableSerializationTestCase { diff --git a/plugin/core/src/test/java/org/elasticsearch/xpack/persistent/PersistentTasksExecutorFullRestartIT.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/persistent/PersistentTasksExecutorFullRestartIT.java similarity index 91% rename from plugin/core/src/test/java/org/elasticsearch/xpack/persistent/PersistentTasksExecutorFullRestartIT.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/persistent/PersistentTasksExecutorFullRestartIT.java index aca9f20c112..b87dd922e40 100644 --- a/plugin/core/src/test/java/org/elasticsearch/xpack/persistent/PersistentTasksExecutorFullRestartIT.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/persistent/PersistentTasksExecutorFullRestartIT.java @@ -3,16 +3,16 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.persistent; +package org.elasticsearch.xpack.core.persistent; import org.elasticsearch.action.support.PlainActionFuture; import org.elasticsearch.common.UUIDs; import org.elasticsearch.plugins.Plugin; import org.elasticsearch.test.ESIntegTestCase; import org.elasticsearch.test.junit.annotations.TestLogging; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData.PersistentTask; -import org.elasticsearch.xpack.persistent.TestPersistentTasksPlugin.TestPersistentTasksExecutor; -import org.elasticsearch.xpack.persistent.TestPersistentTasksPlugin.TestParams; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData.PersistentTask; +import org.elasticsearch.xpack.core.persistent.TestPersistentTasksPlugin.TestParams; +import org.elasticsearch.xpack.core.persistent.TestPersistentTasksPlugin.TestPersistentTasksExecutor; import java.util.ArrayList; import java.util.Collection; @@ -22,8 +22,6 @@ import java.util.List; import static org.hamcrest.Matchers.empty; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; -import static org.hamcrest.Matchers.notNullValue; -import static org.hamcrest.Matchers.nullValue; @ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, minNumDataNodes = 1) public class PersistentTasksExecutorFullRestartIT extends ESIntegTestCase { diff --git a/plugin/core/src/test/java/org/elasticsearch/xpack/persistent/PersistentTasksExecutorIT.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/persistent/PersistentTasksExecutorIT.java similarity index 96% rename from plugin/core/src/test/java/org/elasticsearch/xpack/persistent/PersistentTasksExecutorIT.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/persistent/PersistentTasksExecutorIT.java index 5071f5140eb..f451712c2e3 100644 --- a/plugin/core/src/test/java/org/elasticsearch/xpack/persistent/PersistentTasksExecutorIT.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/persistent/PersistentTasksExecutorIT.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.persistent; +package org.elasticsearch.xpack.core.persistent; import org.elasticsearch.ResourceAlreadyExistsException; import org.elasticsearch.ResourceNotFoundException; @@ -15,12 +15,12 @@ import org.elasticsearch.plugins.Plugin; import org.elasticsearch.tasks.TaskId; import org.elasticsearch.tasks.TaskInfo; import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData.PersistentTask; -import org.elasticsearch.xpack.persistent.PersistentTasksService.WaitForPersistentTaskStatusListener; -import org.elasticsearch.xpack.persistent.TestPersistentTasksPlugin.Status; -import org.elasticsearch.xpack.persistent.TestPersistentTasksPlugin.TestPersistentTasksExecutor; -import org.elasticsearch.xpack.persistent.TestPersistentTasksPlugin.TestParams; -import org.elasticsearch.xpack.persistent.TestPersistentTasksPlugin.TestTasksRequestBuilder; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData.PersistentTask; +import org.elasticsearch.xpack.core.persistent.PersistentTasksService.WaitForPersistentTaskStatusListener; +import org.elasticsearch.xpack.core.persistent.TestPersistentTasksPlugin.Status; +import org.elasticsearch.xpack.core.persistent.TestPersistentTasksPlugin.TestParams; +import org.elasticsearch.xpack.core.persistent.TestPersistentTasksPlugin.TestPersistentTasksExecutor; +import org.elasticsearch.xpack.core.persistent.TestPersistentTasksPlugin.TestTasksRequestBuilder; import org.junit.After; import java.util.Collection; diff --git a/plugin/core/src/test/java/org/elasticsearch/xpack/persistent/PersistentTasksExecutorResponseTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/persistent/PersistentTasksExecutorResponseTests.java similarity index 83% rename from plugin/core/src/test/java/org/elasticsearch/xpack/persistent/PersistentTasksExecutorResponseTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/persistent/PersistentTasksExecutorResponseTests.java index 44273098612..9984d4123d6 100644 --- a/plugin/core/src/test/java/org/elasticsearch/xpack/persistent/PersistentTasksExecutorResponseTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/persistent/PersistentTasksExecutorResponseTests.java @@ -3,18 +3,16 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.persistent; +package org.elasticsearch.xpack.core.persistent; import org.elasticsearch.common.UUIDs; import org.elasticsearch.common.io.stream.NamedWriteableRegistry; import org.elasticsearch.test.AbstractStreamableTestCase; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData.PersistentTask; -import org.elasticsearch.xpack.persistent.TestPersistentTasksPlugin.TestPersistentTasksExecutor; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData.PersistentTask; +import org.elasticsearch.xpack.core.persistent.TestPersistentTasksPlugin.TestPersistentTasksExecutor; import java.util.Collections; -import static com.carrotsearch.randomizedtesting.RandomizedTest.randomAsciiOfLength; - public class PersistentTasksExecutorResponseTests extends AbstractStreamableTestCase { @Override diff --git a/plugin/core/src/test/java/org/elasticsearch/xpack/persistent/PersistentTasksNodeServiceStatusTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/persistent/PersistentTasksNodeServiceStatusTests.java similarity index 87% rename from plugin/core/src/test/java/org/elasticsearch/xpack/persistent/PersistentTasksNodeServiceStatusTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/persistent/PersistentTasksNodeServiceStatusTests.java index d22302b8883..39312b62add 100644 --- a/plugin/core/src/test/java/org/elasticsearch/xpack/persistent/PersistentTasksNodeServiceStatusTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/persistent/PersistentTasksNodeServiceStatusTests.java @@ -3,11 +3,11 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.persistent; +package org.elasticsearch.xpack.core.persistent; import org.elasticsearch.common.io.stream.Writeable; import org.elasticsearch.test.AbstractWireSerializingTestCase; -import org.elasticsearch.xpack.persistent.PersistentTasksNodeService.Status; +import org.elasticsearch.xpack.core.persistent.PersistentTasksNodeService.Status; import static org.hamcrest.Matchers.containsString; diff --git a/plugin/core/src/test/java/org/elasticsearch/xpack/persistent/PersistentTasksNodeServiceTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/persistent/PersistentTasksNodeServiceTests.java similarity index 97% rename from plugin/core/src/test/java/org/elasticsearch/xpack/persistent/PersistentTasksNodeServiceTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/persistent/PersistentTasksNodeServiceTests.java index b6165777358..8694148826d 100644 --- a/plugin/core/src/test/java/org/elasticsearch/xpack/persistent/PersistentTasksNodeServiceTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/persistent/PersistentTasksNodeServiceTests.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.persistent; +package org.elasticsearch.xpack.core.persistent; import org.elasticsearch.Version; import org.elasticsearch.action.ActionListener; @@ -23,10 +23,10 @@ import org.elasticsearch.tasks.TaskManager; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.TestThreadPool; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData.Assignment; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData.PersistentTask; -import org.elasticsearch.xpack.persistent.TestPersistentTasksPlugin.TestParams; -import org.elasticsearch.xpack.persistent.TestPersistentTasksPlugin.TestPersistentTasksExecutor; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData.Assignment; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData.PersistentTask; +import org.elasticsearch.xpack.core.persistent.TestPersistentTasksPlugin.TestParams; +import org.elasticsearch.xpack.core.persistent.TestPersistentTasksPlugin.TestPersistentTasksExecutor; import org.junit.After; import org.junit.Before; @@ -45,7 +45,6 @@ import static org.mockito.Matchers.anyLong; import static org.mockito.Matchers.anyString; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; public class PersistentTasksNodeServiceTests extends ESTestCase { diff --git a/plugin/core/src/test/java/org/elasticsearch/xpack/persistent/RestartPersistentTaskRequestTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/persistent/RestartPersistentTaskRequestTests.java similarity index 82% rename from plugin/core/src/test/java/org/elasticsearch/xpack/persistent/RestartPersistentTaskRequestTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/persistent/RestartPersistentTaskRequestTests.java index c113787db9f..d5f10409708 100644 --- a/plugin/core/src/test/java/org/elasticsearch/xpack/persistent/RestartPersistentTaskRequestTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/persistent/RestartPersistentTaskRequestTests.java @@ -3,10 +3,10 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.persistent; +package org.elasticsearch.xpack.core.persistent; import org.elasticsearch.test.AbstractStreamableTestCase; -import org.elasticsearch.xpack.persistent.CompletionPersistentTaskAction.Request; +import org.elasticsearch.xpack.core.persistent.CompletionPersistentTaskAction.Request; public class RestartPersistentTaskRequestTests extends AbstractStreamableTestCase { diff --git a/plugin/core/src/test/java/org/elasticsearch/xpack/persistent/StartPersistentActionRequestTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/persistent/StartPersistentActionRequestTests.java similarity index 83% rename from plugin/core/src/test/java/org/elasticsearch/xpack/persistent/StartPersistentActionRequestTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/persistent/StartPersistentActionRequestTests.java index b75882d3ddf..75b929bcded 100644 --- a/plugin/core/src/test/java/org/elasticsearch/xpack/persistent/StartPersistentActionRequestTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/persistent/StartPersistentActionRequestTests.java @@ -3,15 +3,15 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.persistent; +package org.elasticsearch.xpack.core.persistent; import org.elasticsearch.common.UUIDs; import org.elasticsearch.common.io.stream.NamedWriteableRegistry; import org.elasticsearch.common.io.stream.NamedWriteableRegistry.Entry; -import org.elasticsearch.xpack.persistent.StartPersistentTaskAction.Request; -import org.elasticsearch.xpack.persistent.TestPersistentTasksPlugin.TestPersistentTasksExecutor; -import org.elasticsearch.xpack.persistent.TestPersistentTasksPlugin.TestParams; import org.elasticsearch.test.AbstractStreamableTestCase; +import org.elasticsearch.xpack.core.persistent.StartPersistentTaskAction.Request; +import org.elasticsearch.xpack.core.persistent.TestPersistentTasksPlugin.TestParams; +import org.elasticsearch.xpack.core.persistent.TestPersistentTasksPlugin.TestPersistentTasksExecutor; import java.util.Collections; diff --git a/plugin/core/src/test/java/org/elasticsearch/xpack/persistent/TestPersistentTasksPlugin.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/persistent/TestPersistentTasksPlugin.java similarity index 98% rename from plugin/core/src/test/java/org/elasticsearch/xpack/persistent/TestPersistentTasksPlugin.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/persistent/TestPersistentTasksPlugin.java index a4638961449..b8560fe3f5b 100644 --- a/plugin/core/src/test/java/org/elasticsearch/xpack/persistent/TestPersistentTasksPlugin.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/persistent/TestPersistentTasksPlugin.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.persistent; +package org.elasticsearch.xpack.core.persistent; import org.elasticsearch.action.Action; import org.elasticsearch.action.ActionListener; @@ -48,8 +48,8 @@ import org.elasticsearch.tasks.TaskId; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; import org.elasticsearch.watcher.ResourceWatcherService; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData.Assignment; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData.PersistentTask; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData.Assignment; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData.PersistentTask; import java.io.IOException; import java.util.ArrayList; diff --git a/plugin/core/src/test/java/org/elasticsearch/xpack/persistent/UpdatePersistentTaskRequestTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/persistent/UpdatePersistentTaskRequestTests.java similarity index 77% rename from plugin/core/src/test/java/org/elasticsearch/xpack/persistent/UpdatePersistentTaskRequestTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/persistent/UpdatePersistentTaskRequestTests.java index 729e0833a0e..3807470541c 100644 --- a/plugin/core/src/test/java/org/elasticsearch/xpack/persistent/UpdatePersistentTaskRequestTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/persistent/UpdatePersistentTaskRequestTests.java @@ -3,15 +3,15 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.persistent; +package org.elasticsearch.xpack.core.persistent; import org.elasticsearch.common.UUIDs; import org.elasticsearch.common.io.stream.NamedWriteableRegistry; import org.elasticsearch.tasks.Task; import org.elasticsearch.test.AbstractStreamableTestCase; -import org.elasticsearch.xpack.persistent.TestPersistentTasksPlugin.Status; -import org.elasticsearch.xpack.persistent.TestPersistentTasksPlugin.TestPersistentTasksExecutor; -import org.elasticsearch.xpack.persistent.UpdatePersistentTaskStatusAction.Request; +import org.elasticsearch.xpack.core.persistent.TestPersistentTasksPlugin.Status; +import org.elasticsearch.xpack.core.persistent.TestPersistentTasksPlugin.TestPersistentTasksExecutor; +import org.elasticsearch.xpack.core.persistent.UpdatePersistentTaskStatusAction.Request; import java.util.Collections; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/audit/logfile/CapturingLogger.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/audit/logfile/CapturingLogger.java similarity index 98% rename from plugin/security/src/test/java/org/elasticsearch/xpack/security/audit/logfile/CapturingLogger.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/security/audit/logfile/CapturingLogger.java index 75e131d73fb..39b3eb76ff9 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/audit/logfile/CapturingLogger.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/audit/logfile/CapturingLogger.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.audit.logfile; +package org.elasticsearch.xpack.core.security.audit.logfile; import org.apache.logging.log4j.Level; import org.apache.logging.log4j.LogManager; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/support/mapper/expressiondsl/ExpressionParserTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authc/support/mapper/expressiondsl/ExpressionParserTests.java similarity index 97% rename from plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/support/mapper/expressiondsl/ExpressionParserTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authc/support/mapper/expressiondsl/ExpressionParserTests.java index b67beb7ac9a..8a4ccda9531 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/support/mapper/expressiondsl/ExpressionParserTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authc/support/mapper/expressiondsl/ExpressionParserTests.java @@ -3,14 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authc.support.mapper.expressiondsl; - -import java.io.IOException; -import java.io.StringWriter; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import java.util.function.Predicate; +package org.elasticsearch.xpack.core.security.authc.support.mapper.expressiondsl; import com.carrotsearch.randomizedtesting.WriterOutputStream; import org.elasticsearch.common.bytes.BytesArray; @@ -23,9 +16,15 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.XPackClientPlugin; -import org.elasticsearch.xpack.security.Security; -import org.elasticsearch.xpack.watcher.support.xcontent.XContentSource; +import org.elasticsearch.xpack.core.XPackClientPlugin; +import org.elasticsearch.xpack.core.watcher.support.xcontent.XContentSource; + +import java.io.IOException; +import java.io.StringWriter; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.function.Predicate; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.instanceOf; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/DocumentSubsetReaderTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/accesscontrol/DocumentSubsetReaderTests.java similarity index 97% rename from plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/DocumentSubsetReaderTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/accesscontrol/DocumentSubsetReaderTests.java index 80cdbf8bcf8..7c2e9447675 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/DocumentSubsetReaderTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/accesscontrol/DocumentSubsetReaderTests.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authz.accesscontrol; +package org.elasticsearch.xpack.core.security.authz.accesscontrol; import org.apache.lucene.analysis.standard.StandardAnalyzer; import org.apache.lucene.document.Document; @@ -32,6 +32,7 @@ import org.elasticsearch.index.cache.bitset.BitsetFilterCache; import org.elasticsearch.index.shard.ShardId; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.IndexSettingsModule; +import org.elasticsearch.xpack.core.security.authz.accesscontrol.DocumentSubsetReader; import org.junit.After; import org.junit.Before; @@ -183,7 +184,7 @@ public class DocumentSubsetReaderTests extends ESTestCase { DocumentSubsetReader.wrap(directoryReader, bitsetFilterCache, new MatchAllDocsQuery()); fail("shouldn't be able to wrap DocumentSubsetDirectoryReader twice"); } catch (IllegalArgumentException e) { - assertThat(e.getMessage(), equalTo("Can't wrap [class org.elasticsearch.xpack.security.authz.accesscontrol" + + assertThat(e.getMessage(), equalTo("Can't wrap [class org.elasticsearch.xpack.core.security.authz.accesscontrol" + ".DocumentSubsetReader$DocumentSubsetDirectoryReader] twice")); } diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/FieldSubsetReaderTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/accesscontrol/FieldSubsetReaderTests.java similarity index 99% rename from plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/FieldSubsetReaderTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/accesscontrol/FieldSubsetReaderTests.java index 78d239c596b..c91971efbf2 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/FieldSubsetReaderTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/accesscontrol/FieldSubsetReaderTests.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authz.accesscontrol; +package org.elasticsearch.xpack.core.security.authz.accesscontrol; import org.apache.lucene.analysis.MockAnalyzer; import org.apache.lucene.document.BinaryDocValuesField; @@ -58,9 +58,9 @@ import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.index.mapper.FieldNamesFieldMapper; import org.elasticsearch.index.mapper.SourceFieldMapper; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.security.authz.permission.FieldPermissions; -import org.elasticsearch.xpack.security.authz.permission.FieldPermissionsDefinition; -import org.elasticsearch.xpack.security.support.Automatons; +import org.elasticsearch.xpack.core.security.authz.permission.FieldPermissions; +import org.elasticsearch.xpack.core.security.authz.permission.FieldPermissionsDefinition; +import org.elasticsearch.xpack.core.security.support.Automatons; import java.io.IOException; import java.nio.charset.StandardCharsets; @@ -977,7 +977,7 @@ public class FieldSubsetReaderTests extends ESTestCase { new CharacterRunAutomaton(Automata.makeString("fieldA"))); IllegalArgumentException e = expectThrows(IllegalArgumentException.class, () -> FieldSubsetReader.wrap(directoryReader, new CharacterRunAutomaton(Automata.makeString("fieldA")))); - assertThat(e.getMessage(), equalTo("Can't wrap [class org.elasticsearch.xpack.security.authz.accesscontrol" + + assertThat(e.getMessage(), equalTo("Can't wrap [class org.elasticsearch.xpack.core.security.authz.accesscontrol" + ".FieldSubsetReader$FieldSubsetDirectoryReader] twice")); directoryReader.close(); dir.close(); diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/SecurityIndexSearcherWrapperIntegrationTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/accesscontrol/SecurityIndexSearcherWrapperIntegrationTests.java similarity index 98% rename from plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/SecurityIndexSearcherWrapperIntegrationTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/accesscontrol/SecurityIndexSearcherWrapperIntegrationTests.java index 938b7402eae..14f47e9d4cc 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/SecurityIndexSearcherWrapperIntegrationTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/accesscontrol/SecurityIndexSearcherWrapperIntegrationTests.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authz.accesscontrol; +package org.elasticsearch.xpack.core.security.authz.accesscontrol; import org.apache.lucene.analysis.standard.StandardAnalyzer; import org.apache.lucene.document.Document; @@ -38,7 +38,7 @@ import org.elasticsearch.license.XPackLicenseState; import org.elasticsearch.script.ScriptService; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.IndexSettingsModule; -import org.elasticsearch.xpack.security.authz.permission.FieldPermissions; +import org.elasticsearch.xpack.core.security.authz.permission.FieldPermissions; import java.util.Collections; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/SecurityIndexSearcherWrapperUnitTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/accesscontrol/SecurityIndexSearcherWrapperUnitTests.java similarity index 98% rename from plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/SecurityIndexSearcherWrapperUnitTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/accesscontrol/SecurityIndexSearcherWrapperUnitTests.java index 297278589f7..4c0bdac20af 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/SecurityIndexSearcherWrapperUnitTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/accesscontrol/SecurityIndexSearcherWrapperUnitTests.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authz.accesscontrol; +package org.elasticsearch.xpack.core.security.authz.accesscontrol; import org.apache.lucene.analysis.standard.StandardAnalyzer; import org.apache.lucene.document.Document; @@ -54,8 +54,6 @@ import org.elasticsearch.index.query.BoolQueryBuilder; import org.elasticsearch.index.query.BoostingQueryBuilder; import org.elasticsearch.index.query.ConstantScoreQueryBuilder; import org.elasticsearch.index.query.GeoShapeQueryBuilder; -import org.elasticsearch.join.query.HasChildQueryBuilder; -import org.elasticsearch.join.query.HasParentQueryBuilder; import org.elasticsearch.index.query.MatchAllQueryBuilder; import org.elasticsearch.index.query.QueryBuilder; import org.elasticsearch.index.query.QueryRewriteContext; @@ -65,6 +63,8 @@ import org.elasticsearch.index.query.functionscore.FunctionScoreQueryBuilder; import org.elasticsearch.index.shard.IndexShard; import org.elasticsearch.index.shard.ShardId; import org.elasticsearch.indices.TermsLookup; +import org.elasticsearch.join.query.HasChildQueryBuilder; +import org.elasticsearch.join.query.HasParentQueryBuilder; import org.elasticsearch.license.XPackLicenseState; import org.elasticsearch.script.Script; import org.elasticsearch.script.ScriptService; @@ -73,10 +73,10 @@ import org.elasticsearch.script.TemplateScript; import org.elasticsearch.search.aggregations.LeafBucketCollector; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.IndexSettingsModule; -import org.elasticsearch.xpack.security.authz.accesscontrol.DocumentSubsetReader.DocumentSubsetDirectoryReader; -import org.elasticsearch.xpack.security.authz.permission.FieldPermissions; -import org.elasticsearch.xpack.security.authz.permission.FieldPermissionsDefinition; -import org.elasticsearch.xpack.security.user.User; +import org.elasticsearch.xpack.core.security.authz.accesscontrol.DocumentSubsetReader.DocumentSubsetDirectoryReader; +import org.elasticsearch.xpack.core.security.authz.permission.FieldPermissions; +import org.elasticsearch.xpack.core.security.authz.permission.FieldPermissionsDefinition; +import org.elasticsearch.xpack.core.security.user.User; import org.junit.After; import org.junit.Before; import org.mockito.ArgumentCaptor; @@ -92,7 +92,7 @@ import java.util.Set; import static java.util.Collections.singletonMap; import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.xpack.security.authz.accesscontrol.SecurityIndexSearcherWrapper.intersectScorerAndRoleBits; +import static org.elasticsearch.xpack.core.security.authz.accesscontrol.SecurityIndexSearcherWrapper.intersectScorerAndRoleBits; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.instanceOf; import static org.hamcrest.Matchers.is; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/SetSecurityUserProcessorFactoryTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/accesscontrol/SetSecurityUserProcessorFactoryTests.java similarity index 94% rename from plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/SetSecurityUserProcessorFactoryTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/accesscontrol/SetSecurityUserProcessorFactoryTests.java index 40cee1ff8b3..483d3de2bea 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/SetSecurityUserProcessorFactoryTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/accesscontrol/SetSecurityUserProcessorFactoryTests.java @@ -3,11 +3,11 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authz.accesscontrol; +package org.elasticsearch.xpack.core.security.authz.accesscontrol; import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.security.authz.accesscontrol.SetSecurityUserProcessor.Property; +import org.elasticsearch.xpack.core.security.authz.accesscontrol.SetSecurityUserProcessor.Property; import java.util.Arrays; import java.util.EnumSet; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissionsCacheTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/permission/FieldPermissionsCacheTests.java similarity index 99% rename from plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissionsCacheTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/permission/FieldPermissionsCacheTests.java index 4107b0f526f..c9da206391e 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissionsCacheTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/permission/FieldPermissionsCacheTests.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authz.permission; +package org.elasticsearch.xpack.core.security.authz.permission; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.test.ESTestCase; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/privilege/PrivilegeTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/privilege/PrivilegeTests.java similarity index 98% rename from plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/privilege/PrivilegeTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/privilege/PrivilegeTests.java index f6a5571a418..6857a48784b 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/privilege/PrivilegeTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/privilege/PrivilegeTests.java @@ -3,12 +3,12 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authz.privilege; +package org.elasticsearch.xpack.core.security.authz.privilege; import org.apache.lucene.util.automaton.Operations; import org.elasticsearch.common.util.set.Sets; -import org.elasticsearch.xpack.security.support.Automatons; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.security.support.Automatons; import org.junit.Rule; import org.junit.rules.ExpectedException; diff --git a/plugin/core/src/test/java/org/elasticsearch/xpack/security/authz/store/ReservedRolesStoreTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/store/ReservedRolesStoreTests.java similarity index 90% rename from plugin/core/src/test/java/org/elasticsearch/xpack/security/authz/store/ReservedRolesStoreTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/store/ReservedRolesStoreTests.java index 68d604e3599..05ef3b78ff1 100644 --- a/plugin/core/src/test/java/org/elasticsearch/xpack/security/authz/store/ReservedRolesStoreTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/store/ReservedRolesStoreTests.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.authz.store; +package org.elasticsearch.xpack.core.security.authz.store; import org.elasticsearch.Version; import org.elasticsearch.action.admin.cluster.health.ClusterHealthAction; @@ -34,69 +34,69 @@ import org.elasticsearch.cluster.metadata.MetaData; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.set.Sets; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.MlMetaIndex; -import org.elasticsearch.xpack.ml.action.CloseJobAction; -import org.elasticsearch.xpack.ml.action.DeleteDatafeedAction; -import org.elasticsearch.xpack.ml.action.DeleteExpiredDataAction; -import org.elasticsearch.xpack.ml.action.DeleteFilterAction; -import org.elasticsearch.xpack.ml.action.DeleteJobAction; -import org.elasticsearch.xpack.ml.action.DeleteModelSnapshotAction; -import org.elasticsearch.xpack.ml.action.FinalizeJobExecutionAction; -import org.elasticsearch.xpack.ml.action.FlushJobAction; -import org.elasticsearch.xpack.ml.action.GetBucketsAction; -import org.elasticsearch.xpack.ml.action.GetCategoriesAction; -import org.elasticsearch.xpack.ml.action.GetDatafeedsAction; -import org.elasticsearch.xpack.ml.action.GetDatafeedsStatsAction; -import org.elasticsearch.xpack.ml.action.GetFiltersAction; -import org.elasticsearch.xpack.ml.action.GetInfluencersAction; -import org.elasticsearch.xpack.ml.action.GetJobsAction; -import org.elasticsearch.xpack.ml.action.GetJobsStatsAction; -import org.elasticsearch.xpack.ml.action.GetModelSnapshotsAction; -import org.elasticsearch.xpack.ml.action.GetRecordsAction; -import org.elasticsearch.xpack.ml.action.IsolateDatafeedAction; -import org.elasticsearch.xpack.ml.action.KillProcessAction; -import org.elasticsearch.xpack.ml.action.OpenJobAction; -import org.elasticsearch.xpack.ml.action.PostDataAction; -import org.elasticsearch.xpack.ml.action.PreviewDatafeedAction; -import org.elasticsearch.xpack.ml.action.PutDatafeedAction; -import org.elasticsearch.xpack.ml.action.PutFilterAction; -import org.elasticsearch.xpack.ml.action.PutJobAction; -import org.elasticsearch.xpack.ml.action.RevertModelSnapshotAction; -import org.elasticsearch.xpack.ml.action.StartDatafeedAction; -import org.elasticsearch.xpack.ml.action.StopDatafeedAction; -import org.elasticsearch.xpack.ml.action.UpdateDatafeedAction; -import org.elasticsearch.xpack.ml.action.UpdateJobAction; -import org.elasticsearch.xpack.ml.action.UpdateModelSnapshotAction; -import org.elasticsearch.xpack.ml.action.UpdateProcessAction; -import org.elasticsearch.xpack.ml.action.ValidateDetectorAction; -import org.elasticsearch.xpack.ml.action.ValidateJobConfigAction; -import org.elasticsearch.xpack.ml.job.persistence.AnomalyDetectorsIndex; -import org.elasticsearch.xpack.ml.job.persistence.AnomalyDetectorsIndexFields; -import org.elasticsearch.xpack.ml.notifications.AuditorField; -import org.elasticsearch.xpack.monitoring.action.MonitoringBulkAction; -import org.elasticsearch.xpack.security.action.role.PutRoleAction; -import org.elasticsearch.xpack.security.action.saml.SamlAuthenticateAction; -import org.elasticsearch.xpack.security.action.saml.SamlPrepareAuthenticationAction; -import org.elasticsearch.xpack.security.action.token.CreateTokenAction; -import org.elasticsearch.xpack.security.action.token.InvalidateTokenAction; -import org.elasticsearch.xpack.security.action.user.PutUserAction; -import org.elasticsearch.xpack.security.authz.RoleDescriptor; -import org.elasticsearch.xpack.security.authz.accesscontrol.IndicesAccessControl.IndexAccessControl; -import org.elasticsearch.xpack.security.authz.permission.FieldPermissionsCache; -import org.elasticsearch.xpack.security.authz.permission.Role; -import org.elasticsearch.xpack.security.user.SystemUser; -import org.elasticsearch.xpack.security.user.XPackUser; -import org.elasticsearch.xpack.watcher.execution.TriggeredWatchStoreField; -import org.elasticsearch.xpack.watcher.history.HistoryStoreField; -import org.elasticsearch.xpack.watcher.transport.actions.ack.AckWatchAction; -import org.elasticsearch.xpack.watcher.transport.actions.activate.ActivateWatchAction; -import org.elasticsearch.xpack.watcher.transport.actions.delete.DeleteWatchAction; -import org.elasticsearch.xpack.watcher.transport.actions.execute.ExecuteWatchAction; -import org.elasticsearch.xpack.watcher.transport.actions.get.GetWatchAction; -import org.elasticsearch.xpack.watcher.transport.actions.put.PutWatchAction; -import org.elasticsearch.xpack.watcher.transport.actions.service.WatcherServiceAction; -import org.elasticsearch.xpack.watcher.transport.actions.stats.WatcherStatsAction; -import org.elasticsearch.xpack.watcher.watch.Watch; +import org.elasticsearch.xpack.core.ml.MlMetaIndex; +import org.elasticsearch.xpack.core.ml.action.CloseJobAction; +import org.elasticsearch.xpack.core.ml.action.DeleteDatafeedAction; +import org.elasticsearch.xpack.core.ml.action.DeleteExpiredDataAction; +import org.elasticsearch.xpack.core.ml.action.DeleteFilterAction; +import org.elasticsearch.xpack.core.ml.action.DeleteJobAction; +import org.elasticsearch.xpack.core.ml.action.DeleteModelSnapshotAction; +import org.elasticsearch.xpack.core.ml.action.FinalizeJobExecutionAction; +import org.elasticsearch.xpack.core.ml.action.FlushJobAction; +import org.elasticsearch.xpack.core.ml.action.GetBucketsAction; +import org.elasticsearch.xpack.core.ml.action.GetCategoriesAction; +import org.elasticsearch.xpack.core.ml.action.GetDatafeedsAction; +import org.elasticsearch.xpack.core.ml.action.GetDatafeedsStatsAction; +import org.elasticsearch.xpack.core.ml.action.GetFiltersAction; +import org.elasticsearch.xpack.core.ml.action.GetInfluencersAction; +import org.elasticsearch.xpack.core.ml.action.GetJobsAction; +import org.elasticsearch.xpack.core.ml.action.GetJobsStatsAction; +import org.elasticsearch.xpack.core.ml.action.GetModelSnapshotsAction; +import org.elasticsearch.xpack.core.ml.action.GetRecordsAction; +import org.elasticsearch.xpack.core.ml.action.IsolateDatafeedAction; +import org.elasticsearch.xpack.core.ml.action.KillProcessAction; +import org.elasticsearch.xpack.core.ml.action.OpenJobAction; +import org.elasticsearch.xpack.core.ml.action.PostDataAction; +import org.elasticsearch.xpack.core.ml.action.PreviewDatafeedAction; +import org.elasticsearch.xpack.core.ml.action.PutDatafeedAction; +import org.elasticsearch.xpack.core.ml.action.PutFilterAction; +import org.elasticsearch.xpack.core.ml.action.PutJobAction; +import org.elasticsearch.xpack.core.ml.action.RevertModelSnapshotAction; +import org.elasticsearch.xpack.core.ml.action.StartDatafeedAction; +import org.elasticsearch.xpack.core.ml.action.StopDatafeedAction; +import org.elasticsearch.xpack.core.ml.action.UpdateDatafeedAction; +import org.elasticsearch.xpack.core.ml.action.UpdateJobAction; +import org.elasticsearch.xpack.core.ml.action.UpdateModelSnapshotAction; +import org.elasticsearch.xpack.core.ml.action.UpdateProcessAction; +import org.elasticsearch.xpack.core.ml.action.ValidateDetectorAction; +import org.elasticsearch.xpack.core.ml.action.ValidateJobConfigAction; +import org.elasticsearch.xpack.core.ml.job.persistence.AnomalyDetectorsIndex; +import org.elasticsearch.xpack.core.ml.job.persistence.AnomalyDetectorsIndexFields; +import org.elasticsearch.xpack.core.ml.notifications.AuditorField; +import org.elasticsearch.xpack.core.monitoring.action.MonitoringBulkAction; +import org.elasticsearch.xpack.core.security.action.role.PutRoleAction; +import org.elasticsearch.xpack.core.security.action.saml.SamlAuthenticateAction; +import org.elasticsearch.xpack.core.security.action.saml.SamlPrepareAuthenticationAction; +import org.elasticsearch.xpack.core.security.action.token.CreateTokenAction; +import org.elasticsearch.xpack.core.security.action.token.InvalidateTokenAction; +import org.elasticsearch.xpack.core.security.action.user.PutUserAction; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor; +import org.elasticsearch.xpack.core.security.authz.accesscontrol.IndicesAccessControl.IndexAccessControl; +import org.elasticsearch.xpack.core.security.authz.permission.FieldPermissionsCache; +import org.elasticsearch.xpack.core.security.authz.permission.Role; +import org.elasticsearch.xpack.core.security.user.SystemUser; +import org.elasticsearch.xpack.core.security.user.XPackUser; +import org.elasticsearch.xpack.core.watcher.execution.TriggeredWatchStoreField; +import org.elasticsearch.xpack.core.watcher.history.HistoryStoreField; +import org.elasticsearch.xpack.core.watcher.transport.actions.ack.AckWatchAction; +import org.elasticsearch.xpack.core.watcher.transport.actions.activate.ActivateWatchAction; +import org.elasticsearch.xpack.core.watcher.transport.actions.delete.DeleteWatchAction; +import org.elasticsearch.xpack.core.watcher.transport.actions.execute.ExecuteWatchAction; +import org.elasticsearch.xpack.core.watcher.transport.actions.get.GetWatchAction; +import org.elasticsearch.xpack.core.watcher.transport.actions.put.PutWatchAction; +import org.elasticsearch.xpack.core.watcher.transport.actions.service.WatcherServiceAction; +import org.elasticsearch.xpack.core.watcher.transport.actions.stats.WatcherStatsAction; +import org.elasticsearch.xpack.core.watcher.watch.Watch; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/support/AutomatonsTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/support/AutomatonsTests.java similarity index 89% rename from plugin/security/src/test/java/org/elasticsearch/xpack/security/support/AutomatonsTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/security/support/AutomatonsTests.java index efa7e39e2af..8f65e362209 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/support/AutomatonsTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/support/AutomatonsTests.java @@ -3,17 +3,17 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.support; +package org.elasticsearch.xpack.core.security.support; import org.apache.lucene.util.automaton.Automaton; import org.apache.lucene.util.automaton.CharacterRunAutomaton; import org.elasticsearch.test.ESTestCase; import static org.apache.lucene.util.automaton.Operations.DEFAULT_MAX_DETERMINIZED_STATES; -import static org.elasticsearch.xpack.security.support.Automatons.pattern; -import static org.elasticsearch.xpack.security.support.Automatons.patterns; -import static org.elasticsearch.xpack.security.support.Automatons.predicate; -import static org.elasticsearch.xpack.security.support.Automatons.wildcard; +import static org.elasticsearch.xpack.core.security.support.Automatons.pattern; +import static org.elasticsearch.xpack.core.security.support.Automatons.patterns; +import static org.elasticsearch.xpack.core.security.support.Automatons.predicate; +import static org.elasticsearch.xpack.core.security.support.Automatons.wildcard; import static org.hamcrest.Matchers.equalTo; public class AutomatonsTests extends ESTestCase { diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/support/ValidationTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/support/ValidationTests.java similarity index 92% rename from plugin/security/src/test/java/org/elasticsearch/xpack/security/support/ValidationTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/security/support/ValidationTests.java index e3c22bff847..458280677a4 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/support/ValidationTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/support/ValidationTests.java @@ -3,16 +3,16 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.support; +package org.elasticsearch.xpack.core.security.support; import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.xpack.security.authz.store.ReservedRolesStore; -import org.elasticsearch.xpack.security.support.Validation.Error; -import org.elasticsearch.xpack.security.support.Validation.Users; -import org.elasticsearch.xpack.security.support.Validation.Roles; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.security.user.ElasticUser; -import org.elasticsearch.xpack.security.user.KibanaUser; +import org.elasticsearch.xpack.core.security.authz.store.ReservedRolesStore; +import org.elasticsearch.xpack.core.security.support.Validation.Error; +import org.elasticsearch.xpack.core.security.support.Validation.Roles; +import org.elasticsearch.xpack.core.security.support.Validation.Users; +import org.elasticsearch.xpack.core.security.user.ElasticUser; +import org.elasticsearch.xpack.core.security.user.KibanaUser; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.notNullValue; diff --git a/plugin/core/src/test/java/org/elasticsearch/xpack/security/test/SecurityAssertions.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/test/SecurityAssertions.java similarity index 91% rename from plugin/core/src/test/java/org/elasticsearch/xpack/security/test/SecurityAssertions.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/security/test/SecurityAssertions.java index eb640791a98..1ac1f7798dc 100644 --- a/plugin/core/src/test/java/org/elasticsearch/xpack/security/test/SecurityAssertions.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/test/SecurityAssertions.java @@ -3,11 +3,11 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.security.test; +package org.elasticsearch.xpack.core.security.test; import org.elasticsearch.ElasticsearchSecurityException; import org.elasticsearch.rest.RestStatus; -import org.elasticsearch.xpack.XPackField; +import org.elasticsearch.xpack.core.XPackField; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.contains; diff --git a/plugin/core/src/test/java/org/elasticsearch/xpack/ssl/CertUtilsTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ssl/CertUtilsTests.java similarity index 99% rename from plugin/core/src/test/java/org/elasticsearch/xpack/ssl/CertUtilsTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/ssl/CertUtilsTests.java index 2918b71ec2d..07fbee15c57 100644 --- a/plugin/core/src/test/java/org/elasticsearch/xpack/ssl/CertUtilsTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ssl/CertUtilsTests.java @@ -3,7 +3,15 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ssl; +package org.elasticsearch.xpack.core.ssl; + +import org.bouncycastle.asn1.x509.GeneralName; +import org.bouncycastle.asn1.x509.GeneralNames; +import org.bouncycastle.jce.spec.ECNamedCurveSpec; +import org.elasticsearch.common.SuppressForbidden; +import org.elasticsearch.common.network.InetAddresses; +import org.elasticsearch.common.network.NetworkAddress; +import org.elasticsearch.test.ESTestCase; import java.io.InputStream; import java.io.Reader; @@ -24,14 +32,6 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; -import org.bouncycastle.asn1.x509.GeneralName; -import org.bouncycastle.asn1.x509.GeneralNames; -import org.bouncycastle.jce.spec.ECNamedCurveSpec; -import org.elasticsearch.common.SuppressForbidden; -import org.elasticsearch.common.network.InetAddresses; -import org.elasticsearch.common.network.NetworkAddress; -import org.elasticsearch.test.ESTestCase; - import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.instanceOf; import static org.hamcrest.Matchers.is; diff --git a/plugin/core/src/test/java/org/elasticsearch/xpack/ssl/RestrictedTrustConfigTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ssl/RestrictedTrustConfigTests.java similarity index 96% rename from plugin/core/src/test/java/org/elasticsearch/xpack/ssl/RestrictedTrustConfigTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/ssl/RestrictedTrustConfigTests.java index b2e366dc3ce..2e39ebe8452 100644 --- a/plugin/core/src/test/java/org/elasticsearch/xpack/ssl/RestrictedTrustConfigTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ssl/RestrictedTrustConfigTests.java @@ -3,9 +3,17 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ssl; +package org.elasticsearch.xpack.core.ssl; + +import org.elasticsearch.common.settings.Settings; +import org.elasticsearch.env.Environment; +import org.elasticsearch.env.TestEnvironment; +import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.ssl.cert.CertificateInfo; +import org.hamcrest.Matchers; import javax.net.ssl.X509ExtendedTrustManager; + import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; @@ -15,13 +23,6 @@ import java.util.Collection; import java.util.Collections; import java.util.List; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.env.Environment; -import org.elasticsearch.env.TestEnvironment; -import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ssl.cert.CertificateInfo; -import org.hamcrest.Matchers; - public class RestrictedTrustConfigTests extends ESTestCase { public void testDelegationOfFilesToMonitor() throws Exception { diff --git a/plugin/core/src/test/java/org/elasticsearch/xpack/ssl/RestrictedTrustManagerTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ssl/RestrictedTrustManagerTests.java similarity index 98% rename from plugin/core/src/test/java/org/elasticsearch/xpack/ssl/RestrictedTrustManagerTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/ssl/RestrictedTrustManagerTests.java index 04e1129d154..560459956cb 100644 --- a/plugin/core/src/test/java/org/elasticsearch/xpack/ssl/RestrictedTrustManagerTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ssl/RestrictedTrustManagerTests.java @@ -3,10 +3,20 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ssl; +package org.elasticsearch.xpack.core.ssl; + +import org.bouncycastle.asn1.x509.GeneralNames; +import org.bouncycastle.operator.OperatorException; +import org.elasticsearch.common.settings.Settings; +import org.elasticsearch.test.ESTestCase; +import org.hamcrest.Description; +import org.hamcrest.TypeSafeMatcher; +import org.junit.Assert; +import org.junit.Before; import javax.net.ssl.X509ExtendedTrustManager; import javax.security.auth.x500.X500Principal; + import java.io.IOException; import java.security.GeneralSecurityException; import java.security.KeyPair; @@ -23,17 +33,7 @@ import java.util.Objects; import java.util.regex.Pattern; import java.util.stream.Collectors; -import org.bouncycastle.asn1.x509.GeneralName; -import org.bouncycastle.asn1.x509.GeneralNames; -import org.bouncycastle.operator.OperatorException; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.test.ESTestCase; -import org.hamcrest.Description; -import org.hamcrest.TypeSafeMatcher; -import org.junit.Assert; -import org.junit.Before; - -import static org.elasticsearch.xpack.ssl.CertUtils.generateSignedCertificate; +import static org.elasticsearch.xpack.core.ssl.CertUtils.generateSignedCertificate; public class RestrictedTrustManagerTests extends ESTestCase { diff --git a/plugin/core/src/test/java/org/elasticsearch/xpack/ssl/SSLConfigurationReloaderTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ssl/SSLConfigurationReloaderTests.java similarity index 99% rename from plugin/core/src/test/java/org/elasticsearch/xpack/ssl/SSLConfigurationReloaderTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/ssl/SSLConfigurationReloaderTests.java index 6d08a82777a..c985e943f70 100644 --- a/plugin/core/src/test/java/org/elasticsearch/xpack/ssl/SSLConfigurationReloaderTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ssl/SSLConfigurationReloaderTests.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ssl; +package org.elasticsearch.xpack.core.ssl; import org.apache.lucene.util.SetOnce; import org.bouncycastle.openssl.jcajce.JcaPEMWriter; @@ -22,6 +22,7 @@ import org.junit.Before; import javax.net.ssl.X509ExtendedKeyManager; import javax.net.ssl.X509ExtendedTrustManager; import javax.security.auth.x500.X500Principal; + import java.io.IOException; import java.io.OutputStream; import java.io.OutputStreamWriter; diff --git a/plugin/core/src/test/java/org/elasticsearch/xpack/ssl/SSLConfigurationSettingsTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ssl/SSLConfigurationSettingsTests.java similarity index 99% rename from plugin/core/src/test/java/org/elasticsearch/xpack/ssl/SSLConfigurationSettingsTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/ssl/SSLConfigurationSettingsTests.java index cf4eda70728..4b045951d66 100644 --- a/plugin/core/src/test/java/org/elasticsearch/xpack/ssl/SSLConfigurationSettingsTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ssl/SSLConfigurationSettingsTests.java @@ -3,15 +3,16 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ssl; - -import javax.net.ssl.KeyManagerFactory; -import javax.net.ssl.TrustManagerFactory; -import java.util.Arrays; +package org.elasticsearch.xpack.core.ssl; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.test.ESTestCase; +import javax.net.ssl.KeyManagerFactory; +import javax.net.ssl.TrustManagerFactory; + +import java.util.Arrays; + import static org.hamcrest.Matchers.is; public class SSLConfigurationSettingsTests extends ESTestCase { diff --git a/plugin/core/src/test/java/org/elasticsearch/xpack/ssl/SSLConfigurationTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ssl/SSLConfigurationTests.java similarity index 99% rename from plugin/core/src/test/java/org/elasticsearch/xpack/ssl/SSLConfigurationTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/ssl/SSLConfigurationTests.java index 4613dd9410d..bb6fd279eec 100644 --- a/plugin/core/src/test/java/org/elasticsearch/xpack/ssl/SSLConfigurationTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ssl/SSLConfigurationTests.java @@ -3,13 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ssl; - -import javax.net.ssl.KeyManager; -import javax.net.ssl.KeyManagerFactory; -import javax.net.ssl.TrustManager; -import java.security.cert.X509Certificate; -import java.util.Arrays; +package org.elasticsearch.xpack.core.ssl; import org.elasticsearch.common.settings.MockSecureSettings; import org.elasticsearch.common.settings.Setting; @@ -17,7 +11,14 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.env.Environment; import org.elasticsearch.env.TestEnvironment; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ssl.TrustConfig.CombiningTrustConfig; +import org.elasticsearch.xpack.core.ssl.TrustConfig.CombiningTrustConfig; + +import javax.net.ssl.KeyManager; +import javax.net.ssl.KeyManagerFactory; +import javax.net.ssl.TrustManager; + +import java.security.cert.X509Certificate; +import java.util.Arrays; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.everyItem; diff --git a/plugin/core/src/test/java/org/elasticsearch/xpack/ssl/SSLServiceTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ssl/SSLServiceTests.java similarity index 99% rename from plugin/core/src/test/java/org/elasticsearch/xpack/ssl/SSLServiceTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/ssl/SSLServiceTests.java index c36227c8c95..315b257f151 100644 --- a/plugin/core/src/test/java/org/elasticsearch/xpack/ssl/SSLServiceTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ssl/SSLServiceTests.java @@ -3,27 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ssl; - -import javax.net.ssl.HostnameVerifier; -import javax.net.ssl.SSLContext; -import javax.net.ssl.SSLEngine; -import javax.net.ssl.SSLParameters; -import javax.net.ssl.SSLSocket; -import javax.net.ssl.SSLSocketFactory; -import javax.net.ssl.X509ExtendedTrustManager; -import java.net.Socket; -import java.nio.file.Path; -import java.security.AccessController; -import java.security.PrivilegedActionException; -import java.security.PrivilegedExceptionAction; -import java.security.cert.CertificateException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.Comparator; -import java.util.Iterator; -import java.util.List; +package org.elasticsearch.xpack.core.ssl; import org.apache.http.HttpHost; import org.apache.http.HttpResponse; @@ -45,12 +25,33 @@ import org.elasticsearch.env.Environment; import org.elasticsearch.env.TestEnvironment; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.junit.annotations.Network; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.ssl.cert.CertificateInfo; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.ssl.cert.CertificateInfo; import org.joda.time.DateTime; import org.junit.Before; import org.mockito.ArgumentCaptor; +import javax.net.ssl.HostnameVerifier; +import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLEngine; +import javax.net.ssl.SSLParameters; +import javax.net.ssl.SSLSocket; +import javax.net.ssl.SSLSocketFactory; +import javax.net.ssl.X509ExtendedTrustManager; + +import java.net.Socket; +import java.nio.file.Path; +import java.security.AccessController; +import java.security.PrivilegedActionException; +import java.security.PrivilegedExceptionAction; +import java.security.cert.CertificateException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.Comparator; +import java.util.Iterator; +import java.util.List; + import static org.hamcrest.Matchers.arrayContainingInAnyOrder; import static org.hamcrest.Matchers.contains; import static org.hamcrest.Matchers.containsString; diff --git a/plugin/core/src/test/java/org/elasticsearch/xpack/ssl/StoreKeyConfigTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ssl/StoreKeyConfigTests.java similarity index 97% rename from plugin/core/src/test/java/org/elasticsearch/xpack/ssl/StoreKeyConfigTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/ssl/StoreKeyConfigTests.java index 09325583337..7c336299881 100644 --- a/plugin/core/src/test/java/org/elasticsearch/xpack/ssl/StoreKeyConfigTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ssl/StoreKeyConfigTests.java @@ -3,18 +3,19 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ssl; - -import javax.net.ssl.KeyManagerFactory; -import javax.net.ssl.TrustManagerFactory; -import javax.net.ssl.X509ExtendedKeyManager; -import java.security.PrivateKey; +package org.elasticsearch.xpack.core.ssl; import org.elasticsearch.common.settings.SecureString; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.env.TestEnvironment; import org.elasticsearch.test.ESTestCase; +import javax.net.ssl.KeyManagerFactory; +import javax.net.ssl.TrustManagerFactory; +import javax.net.ssl.X509ExtendedKeyManager; + +import java.security.PrivateKey; + import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.notNullValue; diff --git a/plugin/core/src/test/java/org/elasticsearch/xpack/ssl/TLSLicenseBootstrapCheckTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ssl/TLSLicenseBootstrapCheckTests.java similarity index 98% rename from plugin/core/src/test/java/org/elasticsearch/xpack/ssl/TLSLicenseBootstrapCheckTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/ssl/TLSLicenseBootstrapCheckTests.java index 048cfa9c01d..da1455ea12e 100644 --- a/plugin/core/src/test/java/org/elasticsearch/xpack/ssl/TLSLicenseBootstrapCheckTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ssl/TLSLicenseBootstrapCheckTests.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ssl; +package org.elasticsearch.xpack.core.ssl; import org.elasticsearch.bootstrap.BootstrapContext; import org.elasticsearch.cluster.metadata.MetaData; diff --git a/plugin/core/src/test/java/org/elasticsearch/xpack/ssl/TestsSSLService.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ssl/TestsSSLService.java similarity index 97% rename from plugin/core/src/test/java/org/elasticsearch/xpack/ssl/TestsSSLService.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/ssl/TestsSSLService.java index 768a2ef8e81..675e115e4cb 100644 --- a/plugin/core/src/test/java/org/elasticsearch/xpack/ssl/TestsSSLService.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ssl/TestsSSLService.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ssl; +package org.elasticsearch.xpack.core.ssl; import org.bouncycastle.operator.OperatorCreationException; import org.elasticsearch.common.settings.Settings; @@ -11,6 +11,7 @@ import org.elasticsearch.env.Environment; import javax.net.ssl.SSLContext; import javax.security.auth.DestroyFailedException; + import java.io.IOException; import java.security.KeyStoreException; import java.security.NoSuchAlgorithmException; diff --git a/plugin/core/src/test/java/org/elasticsearch/xpack/ssl/cert/CertificateInfoTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ssl/cert/CertificateInfoTests.java similarity index 95% rename from plugin/core/src/test/java/org/elasticsearch/xpack/ssl/cert/CertificateInfoTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/ssl/cert/CertificateInfoTests.java index a58358556a8..77f3c4ea267 100644 --- a/plugin/core/src/test/java/org/elasticsearch/xpack/ssl/cert/CertificateInfoTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/ssl/cert/CertificateInfoTests.java @@ -3,20 +3,21 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ssl.cert; - -import javax.security.auth.x500.X500Principal; -import java.io.IOException; -import java.security.KeyPair; -import java.security.KeyPairGenerator; -import java.security.NoSuchAlgorithmException; -import java.security.cert.X509Certificate; +package org.elasticsearch.xpack.core.ssl.cert; import org.bouncycastle.asn1.x509.GeneralName; import org.bouncycastle.asn1.x509.GeneralNames; import org.elasticsearch.common.io.stream.BytesStreamOutput; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ssl.CertUtils; +import org.elasticsearch.xpack.core.ssl.CertUtils; + +import javax.security.auth.x500.X500Principal; + +import java.io.IOException; +import java.security.KeyPair; +import java.security.KeyPairGenerator; +import java.security.NoSuchAlgorithmException; +import java.security.cert.X509Certificate; import static org.hamcrest.Matchers.equalTo; diff --git a/plugin/core/src/test/java/org/elasticsearch/xpack/template/TemplateUtilsTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/template/TemplateUtilsTests.java similarity index 97% rename from plugin/core/src/test/java/org/elasticsearch/xpack/template/TemplateUtilsTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/template/TemplateUtilsTests.java index bf045888f0d..57ba25af63f 100644 --- a/plugin/core/src/test/java/org/elasticsearch/xpack/template/TemplateUtilsTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/template/TemplateUtilsTests.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.template; +package org.elasticsearch.xpack.core.template; import org.apache.lucene.util.Constants; import org.elasticsearch.ElasticsearchParseException; @@ -11,6 +11,7 @@ import org.elasticsearch.common.Strings; import org.elasticsearch.common.bytes.BytesArray; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.template.TemplateUtils; import org.hamcrest.Matcher; import java.io.IOException; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/throttler/WatchThrottlerTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/watcher/actions/throttler/WatchThrottlerTests.java similarity index 97% rename from plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/throttler/WatchThrottlerTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/watcher/actions/throttler/WatchThrottlerTests.java index 2acbaf63126..fdad70e08d2 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/throttler/WatchThrottlerTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/watcher/actions/throttler/WatchThrottlerTests.java @@ -3,11 +3,11 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.actions.throttler; +package org.elasticsearch.xpack.core.watcher.actions.throttler; import org.elasticsearch.license.XPackLicenseState; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.notNullValue; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/crypto/CryptoServiceTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/watcher/crypto/CryptoServiceTests.java similarity index 95% rename from plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/crypto/CryptoServiceTests.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/watcher/crypto/CryptoServiceTests.java index 42451cf23ac..e1f0181e7dd 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/crypto/CryptoServiceTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/watcher/crypto/CryptoServiceTests.java @@ -3,16 +3,17 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.crypto; +package org.elasticsearch.xpack.core.watcher.crypto; import org.elasticsearch.ElasticsearchException; import org.elasticsearch.common.settings.MockSecureSettings; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.watcher.WatcherField; +import org.elasticsearch.xpack.core.watcher.WatcherField; import org.junit.Before; import javax.crypto.KeyGenerator; + import java.security.NoSuchAlgorithmException; import java.util.Arrays; diff --git a/plugin/core/src/test/java/org/elasticsearch/xpack/watcher/watch/clock/ClockMock.java b/plugin/core/src/test/java/org/elasticsearch/xpack/core/watcher/watch/ClockMock.java similarity index 98% rename from plugin/core/src/test/java/org/elasticsearch/xpack/watcher/watch/clock/ClockMock.java rename to plugin/core/src/test/java/org/elasticsearch/xpack/core/watcher/watch/ClockMock.java index 3b285e472f0..b7f8e1e6d56 100644 --- a/plugin/core/src/test/java/org/elasticsearch/xpack/watcher/watch/clock/ClockMock.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/core/watcher/watch/ClockMock.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.watcher.watch.clock; +package org.elasticsearch.xpack.core.watcher.watch; import org.elasticsearch.common.unit.TimeValue; import org.joda.time.DateTime; diff --git a/plugin/core/src/test/java/org/elasticsearch/xpack/test/rest/XPackRestTestHelper.java b/plugin/core/src/test/java/org/elasticsearch/xpack/test/rest/XPackRestTestHelper.java index 0ae6049308e..0e3627d64ff 100644 --- a/plugin/core/src/test/java/org/elasticsearch/xpack/test/rest/XPackRestTestHelper.java +++ b/plugin/core/src/test/java/org/elasticsearch/xpack/test/rest/XPackRestTestHelper.java @@ -16,9 +16,9 @@ import org.elasticsearch.client.RestClient; import org.elasticsearch.common.xcontent.XContentHelper; import org.elasticsearch.common.xcontent.json.JsonXContent; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.MlMetaIndex; -import org.elasticsearch.xpack.ml.job.persistence.AnomalyDetectorsIndex; -import org.elasticsearch.xpack.ml.notifications.AuditorField; +import org.elasticsearch.xpack.core.ml.MlMetaIndex; +import org.elasticsearch.xpack.core.ml.job.persistence.AnomalyDetectorsIndex; +import org.elasticsearch.xpack.core.ml.notifications.AuditorField; import java.io.BufferedReader; import java.io.IOException; diff --git a/plugin/core/src/test/resources/org/elasticsearch/xpack/extensions/security/complex-x-pack-extension-security.policy b/plugin/core/src/test/resources/org/elasticsearch/xpack/core/extensions/security/complex-x-pack-extension-security.policy similarity index 100% rename from plugin/core/src/test/resources/org/elasticsearch/xpack/extensions/security/complex-x-pack-extension-security.policy rename to plugin/core/src/test/resources/org/elasticsearch/xpack/core/extensions/security/complex-x-pack-extension-security.policy diff --git a/plugin/core/src/test/resources/org/elasticsearch/xpack/extensions/security/simple-x-pack-extension-security.policy b/plugin/core/src/test/resources/org/elasticsearch/xpack/core/extensions/security/simple-x-pack-extension-security.policy similarity index 100% rename from plugin/core/src/test/resources/org/elasticsearch/xpack/extensions/security/simple-x-pack-extension-security.policy rename to plugin/core/src/test/resources/org/elasticsearch/xpack/core/extensions/security/simple-x-pack-extension-security.policy diff --git a/plugin/core/src/test/resources/org/elasticsearch/xpack/extensions/security/unresolved-x-pack-extension-security.policy b/plugin/core/src/test/resources/org/elasticsearch/xpack/core/extensions/security/unresolved-x-pack-extension-security.policy similarity index 100% rename from plugin/core/src/test/resources/org/elasticsearch/xpack/extensions/security/unresolved-x-pack-extension-security.policy rename to plugin/core/src/test/resources/org/elasticsearch/xpack/core/extensions/security/unresolved-x-pack-extension-security.policy diff --git a/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/Deprecation.java b/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/Deprecation.java index 4077af89ff7..cede3eb3091 100644 --- a/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/Deprecation.java +++ b/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/Deprecation.java @@ -18,7 +18,7 @@ import org.elasticsearch.plugins.ActionPlugin; import org.elasticsearch.plugins.Plugin; import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestHandler; -import org.elasticsearch.xpack.XPackClientPlugin; +import org.elasticsearch.xpack.core.deprecation.DeprecationInfoAction; import java.util.Collections; import java.util.List; diff --git a/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/DeprecationChecks.java b/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/DeprecationChecks.java index ef39595dbe1..371ace3e3e0 100644 --- a/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/DeprecationChecks.java +++ b/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/DeprecationChecks.java @@ -5,24 +5,18 @@ */ package org.elasticsearch.xpack.deprecation; -import com.carrotsearch.hppc.cursors.ObjectCursor; -import org.elasticsearch.Version; import org.elasticsearch.action.admin.cluster.node.info.NodeInfo; import org.elasticsearch.action.admin.cluster.node.stats.NodeStats; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.metadata.IndexMetaData; -import org.elasticsearch.cluster.metadata.MappingMetaData; +import org.elasticsearch.xpack.core.deprecation.DeprecationInfoAction; +import org.elasticsearch.xpack.core.deprecation.DeprecationIssue; -import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; import java.util.function.BiFunction; import java.util.function.Function; -import java.util.stream.Collectors; /** * Class containing all the cluster, node, and index deprecation checks that will be served diff --git a/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/IndexDeprecationChecks.java b/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/IndexDeprecationChecks.java index 4c8340d0d35..5b996fbb9ef 100644 --- a/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/IndexDeprecationChecks.java +++ b/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/IndexDeprecationChecks.java @@ -10,9 +10,9 @@ import com.carrotsearch.hppc.cursors.ObjectCursor; import org.elasticsearch.Version; import org.elasticsearch.cluster.metadata.IndexMetaData; import org.elasticsearch.cluster.metadata.MappingMetaData; -import org.elasticsearch.common.Booleans; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.index.mapper.DynamicTemplate; +import org.elasticsearch.xpack.core.deprecation.DeprecationIssue; import java.util.ArrayList; import java.util.Arrays; diff --git a/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/RestDeprecationInfoAction.java b/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/RestDeprecationInfoAction.java index 3b8e19c61bf..7fe8d15eab7 100644 --- a/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/RestDeprecationInfoAction.java +++ b/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/RestDeprecationInfoAction.java @@ -12,7 +12,8 @@ import org.elasticsearch.rest.BaseRestHandler; import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.RestToXContentListener; -import org.elasticsearch.xpack.deprecation.DeprecationInfoAction.Request; +import org.elasticsearch.xpack.core.deprecation.DeprecationInfoAction; +import org.elasticsearch.xpack.core.deprecation.DeprecationInfoAction.Request; import java.io.IOException; diff --git a/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/TransportDeprecationInfoAction.java b/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/TransportDeprecationInfoAction.java index 2a8a310f732..04d1bde87d9 100644 --- a/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/TransportDeprecationInfoAction.java +++ b/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/TransportDeprecationInfoAction.java @@ -25,8 +25,9 @@ import org.elasticsearch.license.LicenseUtils; import org.elasticsearch.license.XPackLicenseState; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.ClientHelper; -import org.elasticsearch.xpack.XPackField; +import org.elasticsearch.xpack.core.ClientHelper; +import org.elasticsearch.xpack.core.XPackField; +import org.elasticsearch.xpack.core.deprecation.DeprecationInfoAction; public class TransportDeprecationInfoAction extends TransportMasterNodeReadAction { diff --git a/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/IndexDeprecationChecksTests.java b/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/IndexDeprecationChecksTests.java index 6e064976693..275b50fa9f4 100644 --- a/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/IndexDeprecationChecksTests.java +++ b/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/IndexDeprecationChecksTests.java @@ -10,6 +10,8 @@ import org.elasticsearch.cluster.metadata.IndexMetaData; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.deprecation.DeprecationInfoAction; +import org.elasticsearch.xpack.core.deprecation.DeprecationIssue; import java.io.IOException; import java.util.List; diff --git a/plugin/graph/src/main/java/org/elasticsearch/xpack/graph/Graph.java b/plugin/graph/src/main/java/org/elasticsearch/xpack/graph/Graph.java index cde71ef912b..eba19eec807 100644 --- a/plugin/graph/src/main/java/org/elasticsearch/xpack/graph/Graph.java +++ b/plugin/graph/src/main/java/org/elasticsearch/xpack/graph/Graph.java @@ -18,9 +18,9 @@ import org.elasticsearch.plugins.ActionPlugin; import org.elasticsearch.plugins.Plugin; import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestHandler; -import org.elasticsearch.xpack.XPackPlugin; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.graph.action.GraphExploreAction; +import org.elasticsearch.xpack.core.XPackPlugin; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.graph.action.GraphExploreAction; import org.elasticsearch.xpack.graph.action.TransportGraphExploreAction; import org.elasticsearch.xpack.graph.rest.action.RestGraphAction; diff --git a/plugin/graph/src/main/java/org/elasticsearch/xpack/graph/GraphFeatureSet.java b/plugin/graph/src/main/java/org/elasticsearch/xpack/graph/GraphFeatureSet.java index 4d842b6ae80..4986950cc3c 100644 --- a/plugin/graph/src/main/java/org/elasticsearch/xpack/graph/GraphFeatureSet.java +++ b/plugin/graph/src/main/java/org/elasticsearch/xpack/graph/GraphFeatureSet.java @@ -12,9 +12,10 @@ import org.elasticsearch.common.Nullable; import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.license.XPackLicenseState; -import org.elasticsearch.xpack.XPackFeatureSet; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.XPackField; +import org.elasticsearch.xpack.core.XPackFeatureSet; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.XPackField; +import org.elasticsearch.xpack.core.graph.GraphFeatureSetUsage; public class GraphFeatureSet implements XPackFeatureSet { diff --git a/plugin/graph/src/main/java/org/elasticsearch/xpack/graph/action/TransportGraphExploreAction.java b/plugin/graph/src/main/java/org/elasticsearch/xpack/graph/action/TransportGraphExploreAction.java index c5db5ba0f45..994f5c48578 100644 --- a/plugin/graph/src/main/java/org/elasticsearch/xpack/graph/action/TransportGraphExploreAction.java +++ b/plugin/graph/src/main/java/org/elasticsearch/xpack/graph/action/TransportGraphExploreAction.java @@ -38,10 +38,17 @@ import org.elasticsearch.search.aggregations.bucket.terms.TermsAggregationBuilde import org.elasticsearch.search.builder.SearchSourceBuilder; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.XPackField; -import org.elasticsearch.xpack.graph.action.Connection.ConnectionId; -import org.elasticsearch.xpack.graph.action.GraphExploreRequest.TermBoost; -import org.elasticsearch.xpack.graph.action.Vertex.VertexId; +import org.elasticsearch.xpack.core.XPackField; +import org.elasticsearch.xpack.core.graph.action.Connection; +import org.elasticsearch.xpack.core.graph.action.Connection.ConnectionId; +import org.elasticsearch.xpack.core.graph.action.GraphExploreAction; +import org.elasticsearch.xpack.core.graph.action.GraphExploreRequest; +import org.elasticsearch.xpack.core.graph.action.GraphExploreRequest.TermBoost; +import org.elasticsearch.xpack.core.graph.action.GraphExploreResponse; +import org.elasticsearch.xpack.core.graph.action.Hop; +import org.elasticsearch.xpack.core.graph.action.Vertex; +import org.elasticsearch.xpack.core.graph.action.Vertex.VertexId; +import org.elasticsearch.xpack.core.graph.action.VertexRequest; import java.util.ArrayList; import java.util.HashMap; @@ -69,7 +76,7 @@ public class TransportGraphExploreAction extends HandledTransportAction 0) { for (Connection connection : newConnections) { - if (evictions.contains(connection.to)) { + if (evictions.contains(connection.getTo())) { connections.remove(connection.getId()); - removeVertex(connection.to); + removeVertex(connection.getTo()); } } } @@ -535,8 +542,9 @@ public class TransportGraphExploreAction extends HandledTransportAction> entry : lastHopFindings.entrySet()) { for (Vertex vertex : entry.getValue()) { - sourceTermsOrClause.should(QueryBuilders.constantScoreQuery(QueryBuilders.termQuery(vertex.field, vertex.term)) - .boost((float) vertex.weight)); + sourceTermsOrClause.should( + QueryBuilders.constantScoreQuery( + QueryBuilders.termQuery(vertex.getField(), vertex.getTerm())).boost((float) vertex.getWeight())); } } @@ -545,7 +553,7 @@ public class TransportGraphExploreAction extends HandledTransportAction> entry : lastHopFindings.entrySet()) { List perFieldTerms = new ArrayList<>(); for (Vertex vertex : entry.getValue()) { - perFieldTerms.add(vertex.term); + perFieldTerms.add(vertex.getTerm()); } sourceTermsOrClause.should(QueryBuilders.constantScoreQuery(QueryBuilders.termsQuery(entry.getKey(), perFieldTerms))); } @@ -730,7 +738,7 @@ public class TransportGraphExploreAction extends HandledTransportAction termValues = new ArrayList<>(); for (TermBoost tb : termBoosts) { - termValues.add(tb.term); + termValues.add(tb.getTerm()); } includesContainer.should(QueryBuilders.constantScoreQuery(QueryBuilders.termsQuery(vr.fieldName(), termValues))); return; @@ -741,11 +749,11 @@ public class TransportGraphExploreAction extends HandledTransportAction { diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportDeleteCalendarAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportDeleteCalendarAction.java index be50f50e396..78f017f6c60 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportDeleteCalendarAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportDeleteCalendarAction.java @@ -21,13 +21,14 @@ import org.elasticsearch.index.reindex.DeleteByQueryRequest; import org.elasticsearch.search.builder.SearchSourceBuilder; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.ml.MlMetaIndex; -import org.elasticsearch.xpack.ml.calendars.Calendar; +import org.elasticsearch.xpack.core.ml.action.DeleteCalendarAction; +import org.elasticsearch.xpack.core.ml.MlMetaIndex; +import org.elasticsearch.xpack.core.ml.calendars.Calendar; import org.elasticsearch.xpack.ml.job.JobManager; -import org.elasticsearch.xpack.ml.job.persistence.JobProvider; +import org.elasticsearch.xpack.core.ml.job.persistence.JobProvider; -import static org.elasticsearch.xpack.ClientHelper.ML_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.executeAsyncWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.ML_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin; public class TransportDeleteCalendarAction extends HandledTransportAction { diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportDeleteCalendarEventAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportDeleteCalendarEventAction.java index ddec0abeb5b..2fdd447cf2b 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportDeleteCalendarEventAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportDeleteCalendarEventAction.java @@ -22,16 +22,17 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.ml.MlMetaIndex; -import org.elasticsearch.xpack.ml.calendars.Calendar; +import org.elasticsearch.xpack.core.ml.action.DeleteCalendarEventAction; +import org.elasticsearch.xpack.core.ml.MlMetaIndex; +import org.elasticsearch.xpack.core.ml.calendars.Calendar; import org.elasticsearch.xpack.ml.job.JobManager; -import org.elasticsearch.xpack.ml.job.persistence.JobProvider; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.job.persistence.JobProvider; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import java.util.Map; -import static org.elasticsearch.xpack.ClientHelper.ML_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.executeAsyncWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.ML_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin; public class TransportDeleteCalendarEventAction extends HandledTransportAction { diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportDeleteDatafeedAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportDeleteDatafeedAction.java index ba27ee13441..0ccd12c3d1f 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportDeleteDatafeedAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportDeleteDatafeedAction.java @@ -21,13 +21,15 @@ import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.ml.MLMetadataField; -import org.elasticsearch.xpack.ml.MlMetadata; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData; -import org.elasticsearch.xpack.persistent.PersistentTasksService; +import org.elasticsearch.xpack.core.ml.MLMetadataField; +import org.elasticsearch.xpack.core.ml.MlMetadata; +import org.elasticsearch.xpack.core.ml.action.DeleteDatafeedAction; +import org.elasticsearch.xpack.core.ml.action.IsolateDatafeedAction; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData; +import org.elasticsearch.xpack.core.persistent.PersistentTasksService; -import static org.elasticsearch.xpack.ClientHelper.ML_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.executeAsyncWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.ML_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin; public class TransportDeleteDatafeedAction extends TransportMasterNodeAction { diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportDeleteExpiredDataAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportDeleteExpiredDataAction.java index e788c19e5bc..e938cb5c264 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportDeleteExpiredDataAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportDeleteExpiredDataAction.java @@ -15,6 +15,7 @@ import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; +import org.elasticsearch.xpack.core.ml.action.DeleteExpiredDataAction; import org.elasticsearch.xpack.ml.MachineLearning; import org.elasticsearch.xpack.ml.job.retention.ExpiredForecastsRemover; import org.elasticsearch.xpack.ml.job.retention.ExpiredModelSnapshotsRemover; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportDeleteFilterAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportDeleteFilterAction.java index ed883286b69..19e6ec59504 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportDeleteFilterAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportDeleteFilterAction.java @@ -23,20 +23,21 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.ml.MLMetadataField; -import org.elasticsearch.xpack.ml.MlMetaIndex; -import org.elasticsearch.xpack.ml.MlMetadata; -import org.elasticsearch.xpack.ml.job.config.Detector; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.config.MlFilter; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.action.DeleteFilterAction; +import org.elasticsearch.xpack.core.ml.MLMetadataField; +import org.elasticsearch.xpack.core.ml.MlMetaIndex; +import org.elasticsearch.xpack.core.ml.MlMetadata; +import org.elasticsearch.xpack.core.ml.job.config.Detector; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.MlFilter; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import java.util.ArrayList; import java.util.List; import java.util.Map; -import static org.elasticsearch.xpack.ClientHelper.ML_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.executeAsyncWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.ML_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin; public class TransportDeleteFilterAction extends HandledTransportAction { diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportDeleteJobAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportDeleteJobAction.java index bee1e26cf69..e3ca32fcdd9 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportDeleteJobAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportDeleteJobAction.java @@ -27,18 +27,20 @@ import org.elasticsearch.node.NodeClosedException; import org.elasticsearch.tasks.Task; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.ml.MLMetadataField; -import org.elasticsearch.xpack.ml.MachineLearningField; -import org.elasticsearch.xpack.ml.MlMetadata; +import org.elasticsearch.xpack.core.ml.MLMetadataField; +import org.elasticsearch.xpack.core.ml.MachineLearningField; +import org.elasticsearch.xpack.core.ml.MlMetadata; +import org.elasticsearch.xpack.core.ml.action.DeleteJobAction; +import org.elasticsearch.xpack.core.ml.action.KillProcessAction; +import org.elasticsearch.xpack.core.ml.job.persistence.JobStorageDeletionTask; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData; +import org.elasticsearch.xpack.core.persistent.PersistentTasksService; import org.elasticsearch.xpack.ml.job.JobManager; -import org.elasticsearch.xpack.ml.job.persistence.JobStorageDeletionTask; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData; -import org.elasticsearch.xpack.persistent.PersistentTasksService; import java.util.concurrent.TimeoutException; -import static org.elasticsearch.xpack.ClientHelper.ML_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.executeAsyncWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.ML_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin; public class TransportDeleteJobAction extends TransportMasterNodeAction { diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportDeleteModelSnapshotAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportDeleteModelSnapshotAction.java index 4e00fa4d0f5..553243a526c 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportDeleteModelSnapshotAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportDeleteModelSnapshotAction.java @@ -17,12 +17,13 @@ import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; +import org.elasticsearch.xpack.core.ml.action.DeleteModelSnapshotAction; import org.elasticsearch.xpack.ml.job.JobManager; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.messages.Messages; -import org.elasticsearch.xpack.ml.job.persistence.JobDataDeleter; -import org.elasticsearch.xpack.ml.job.persistence.JobProvider; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshot; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.messages.Messages; +import org.elasticsearch.xpack.core.ml.job.persistence.JobDataDeleter; +import org.elasticsearch.xpack.core.ml.job.persistence.JobProvider; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshot; import org.elasticsearch.xpack.ml.notifications.Auditor; import java.util.Collections; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportFinalizeJobExecutionAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportFinalizeJobExecutionAction.java index 7da79f74a62..3f8ca39a0f1 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportFinalizeJobExecutionAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportFinalizeJobExecutionAction.java @@ -19,9 +19,10 @@ import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.ml.MLMetadataField; -import org.elasticsearch.xpack.ml.MlMetadata; -import org.elasticsearch.xpack.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.action.FinalizeJobExecutionAction; +import org.elasticsearch.xpack.core.ml.MLMetadataField; +import org.elasticsearch.xpack.core.ml.MlMetadata; +import org.elasticsearch.xpack.core.ml.job.config.Job; import java.util.Date; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportFlushJobAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportFlushJobAction.java index 0b7f6048891..6ad66f7d24e 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportFlushJobAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportFlushJobAction.java @@ -14,6 +14,7 @@ import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; +import org.elasticsearch.xpack.core.ml.action.FlushJobAction; import org.elasticsearch.xpack.ml.job.process.autodetect.AutodetectProcessManager; import org.elasticsearch.xpack.ml.job.process.autodetect.params.FlushJobParams; import org.elasticsearch.xpack.ml.job.process.autodetect.params.TimeRange; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportForecastJobAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportForecastJobAction.java index f1510f76a2a..9d4a4160343 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportForecastJobAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportForecastJobAction.java @@ -18,19 +18,20 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; +import org.elasticsearch.xpack.core.ml.action.ForecastJobAction; import org.elasticsearch.xpack.ml.job.JobManager; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.persistence.JobProvider; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.persistence.JobProvider; import org.elasticsearch.xpack.ml.job.process.autodetect.AutodetectProcessManager; import org.elasticsearch.xpack.ml.job.process.autodetect.params.ForecastParams; -import org.elasticsearch.xpack.ml.job.results.ForecastRequestStats; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.job.results.ForecastRequestStats; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import java.io.IOException; import java.util.List; import java.util.function.Consumer; -import static org.elasticsearch.xpack.ml.action.ForecastJobAction.Request.DURATION; +import static org.elasticsearch.xpack.core.ml.action.ForecastJobAction.Request.DURATION; public class TransportForecastJobAction extends TransportJobTaskAction { diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetBucketsAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetBucketsAction.java index c81bf65e459..f3a947f5bc0 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetBucketsAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetBucketsAction.java @@ -14,9 +14,10 @@ import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; +import org.elasticsearch.xpack.core.ml.action.GetBucketsAction; import org.elasticsearch.xpack.ml.job.JobManager; -import org.elasticsearch.xpack.ml.job.persistence.BucketsQueryBuilder; -import org.elasticsearch.xpack.ml.job.persistence.JobProvider; +import org.elasticsearch.xpack.core.ml.job.persistence.BucketsQueryBuilder; +import org.elasticsearch.xpack.core.ml.job.persistence.JobProvider; public class TransportGetBucketsAction extends HandledTransportAction { diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetCalendarEventsAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetCalendarEventsAction.java index 02877d322b7..2d215f48660 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetCalendarEventsAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetCalendarEventsAction.java @@ -15,14 +15,16 @@ import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.ml.MLMetadataField; -import org.elasticsearch.xpack.ml.MlMetadata; -import org.elasticsearch.xpack.ml.action.util.QueryPage; -import org.elasticsearch.xpack.ml.calendars.ScheduledEvent; -import org.elasticsearch.xpack.ml.job.persistence.JobProvider; -import org.elasticsearch.xpack.ml.job.persistence.ScheduledEventsQueryBuilder; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.action.GetCalendarEventsAction; +import org.elasticsearch.xpack.core.ml.action.GetCalendarsAction; +import org.elasticsearch.xpack.core.ml.MLMetadataField; +import org.elasticsearch.xpack.core.ml.MlMetadata; +import org.elasticsearch.xpack.core.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.calendars.ScheduledEvent; +import org.elasticsearch.xpack.core.ml.job.persistence.JobProvider; +import org.elasticsearch.xpack.core.ml.job.persistence.ScheduledEventsQueryBuilder; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import java.util.Collections; import java.util.List; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetCalendarsAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetCalendarsAction.java index 515e957d350..ed56731ca69 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetCalendarsAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetCalendarsAction.java @@ -6,40 +6,23 @@ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.action.ActionListener; -import org.elasticsearch.action.get.GetAction; -import org.elasticsearch.action.get.GetRequest; -import org.elasticsearch.action.get.GetResponse; -import org.elasticsearch.action.search.SearchRequest; -import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.action.support.ActionFilters; import org.elasticsearch.action.support.HandledTransportAction; -import org.elasticsearch.client.Client; import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver; -import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.NamedXContentRegistry; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.search.SearchHit; -import org.elasticsearch.search.builder.SearchSourceBuilder; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.ml.MlMetaIndex; -import org.elasticsearch.xpack.ml.action.util.PageParams; -import org.elasticsearch.xpack.ml.action.util.QueryPage; -import org.elasticsearch.xpack.ml.calendars.Calendar; -import org.elasticsearch.xpack.ml.job.persistence.CalendarQueryBuilder; -import org.elasticsearch.xpack.ml.job.persistence.JobProvider; +import org.elasticsearch.xpack.core.ml.action.GetCalendarsAction; +import org.elasticsearch.xpack.core.ml.action.util.PageParams; +import org.elasticsearch.xpack.core.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.calendars.Calendar; +import org.elasticsearch.xpack.core.ml.job.persistence.CalendarQueryBuilder; +import org.elasticsearch.xpack.core.ml.job.persistence.JobProvider; -import java.io.IOException; -import java.util.ArrayList; import java.util.Collections; -import java.util.List; -import static org.elasticsearch.xpack.ClientHelper.ML_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.executeAsyncWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin; public class TransportGetCalendarsAction extends HandledTransportAction { diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetCategoriesAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetCategoriesAction.java index 573082b998c..12988e442ed 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetCategoriesAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetCategoriesAction.java @@ -14,8 +14,9 @@ import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; +import org.elasticsearch.xpack.core.ml.action.GetCategoriesAction; import org.elasticsearch.xpack.ml.job.JobManager; -import org.elasticsearch.xpack.ml.job.persistence.JobProvider; +import org.elasticsearch.xpack.core.ml.job.persistence.JobProvider; public class TransportGetCategoriesAction extends HandledTransportAction { diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetDatafeedsAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetDatafeedsAction.java index 9ed41f263e2..c94449e8c36 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetDatafeedsAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetDatafeedsAction.java @@ -17,10 +17,11 @@ import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.ml.MLMetadataField; -import org.elasticsearch.xpack.ml.MlMetadata; -import org.elasticsearch.xpack.ml.action.util.QueryPage; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.action.GetDatafeedsAction; +import org.elasticsearch.xpack.core.ml.MLMetadataField; +import org.elasticsearch.xpack.core.ml.MlMetadata; +import org.elasticsearch.xpack.core.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; import java.util.ArrayList; import java.util.List; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetDatafeedsStatsAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetDatafeedsStatsAction.java index 5d44b2a4e1e..4c2bd322a23 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetDatafeedsStatsAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetDatafeedsStatsAction.java @@ -18,12 +18,13 @@ import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.ml.MLMetadataField; -import org.elasticsearch.xpack.ml.MlMetadata; -import org.elasticsearch.xpack.ml.action.util.QueryPage; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; -import org.elasticsearch.xpack.ml.datafeed.DatafeedState; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData; +import org.elasticsearch.xpack.core.ml.MLMetadataField; +import org.elasticsearch.xpack.core.ml.MlMetadata; +import org.elasticsearch.xpack.core.ml.action.GetDatafeedsStatsAction; +import org.elasticsearch.xpack.core.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedState; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData; import java.util.List; import java.util.Set; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetFiltersAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetFiltersAction.java index 80195d4b94e..ed9f5e2dac5 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetFiltersAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetFiltersAction.java @@ -27,19 +27,20 @@ import org.elasticsearch.search.SearchHit; import org.elasticsearch.search.builder.SearchSourceBuilder; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.ml.MlMetaIndex; -import org.elasticsearch.xpack.ml.action.util.PageParams; -import org.elasticsearch.xpack.ml.action.util.QueryPage; -import org.elasticsearch.xpack.ml.job.config.MlFilter; -import org.elasticsearch.xpack.ml.job.persistence.JobProvider; +import org.elasticsearch.xpack.core.ml.action.GetFiltersAction; +import org.elasticsearch.xpack.core.ml.MlMetaIndex; +import org.elasticsearch.xpack.core.ml.action.util.PageParams; +import org.elasticsearch.xpack.core.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.job.config.MlFilter; +import org.elasticsearch.xpack.core.ml.job.persistence.JobProvider; import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.List; -import static org.elasticsearch.xpack.ClientHelper.ML_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.executeAsyncWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.ML_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin; public class TransportGetFiltersAction extends HandledTransportAction { diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetInfluencersAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetInfluencersAction.java index 7c39f56c7cb..b827a5c8cd9 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetInfluencersAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetInfluencersAction.java @@ -14,9 +14,10 @@ import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; +import org.elasticsearch.xpack.core.ml.action.GetInfluencersAction; import org.elasticsearch.xpack.ml.job.JobManager; -import org.elasticsearch.xpack.ml.job.persistence.InfluencersQueryBuilder; -import org.elasticsearch.xpack.ml.job.persistence.JobProvider; +import org.elasticsearch.xpack.core.ml.job.persistence.InfluencersQueryBuilder; +import org.elasticsearch.xpack.core.ml.job.persistence.JobProvider; public class TransportGetInfluencersAction extends HandledTransportAction { diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetJobsAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetJobsAction.java index 8c5bf3da675..0932d197232 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetJobsAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetJobsAction.java @@ -17,9 +17,10 @@ import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.action.GetJobsAction; +import org.elasticsearch.xpack.core.ml.action.util.QueryPage; import org.elasticsearch.xpack.ml.job.JobManager; -import org.elasticsearch.xpack.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.Job; public class TransportGetJobsAction extends TransportMasterNodeReadAction { diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetJobsStatsAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetJobsStatsAction.java index ce8c7539c1f..ae308a59e68 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetJobsStatsAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetJobsStatsAction.java @@ -23,16 +23,17 @@ import org.elasticsearch.common.util.concurrent.AtomicArray; import org.elasticsearch.tasks.Task; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.ml.MLMetadataField; -import org.elasticsearch.xpack.ml.MlMetadata; -import org.elasticsearch.xpack.ml.action.util.QueryPage; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.config.JobState; -import org.elasticsearch.xpack.ml.job.persistence.JobProvider; +import org.elasticsearch.xpack.core.ml.MLMetadataField; +import org.elasticsearch.xpack.core.ml.MlMetadata; +import org.elasticsearch.xpack.core.ml.action.GetJobsStatsAction; +import org.elasticsearch.xpack.core.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.JobState; +import org.elasticsearch.xpack.core.ml.job.persistence.JobProvider; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.DataCounts; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSizeStats; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData; import org.elasticsearch.xpack.ml.job.process.autodetect.AutodetectProcessManager; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.DataCounts; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSizeStats; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData; import java.io.IOException; import java.time.Duration; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetModelSnapshotsAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetModelSnapshotsAction.java index c5546f9f0eb..27603025c38 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetModelSnapshotsAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetModelSnapshotsAction.java @@ -13,10 +13,11 @@ import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.action.GetModelSnapshotsAction; +import org.elasticsearch.xpack.core.ml.action.util.QueryPage; import org.elasticsearch.xpack.ml.job.JobManager; -import org.elasticsearch.xpack.ml.job.persistence.JobProvider; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshot; +import org.elasticsearch.xpack.core.ml.job.persistence.JobProvider; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshot; import java.util.stream.Collectors; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetOverallBucketsAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetOverallBucketsAction.java index b2d7ca46438..a1fb4078709 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetOverallBucketsAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetOverallBucketsAction.java @@ -25,29 +25,30 @@ import org.elasticsearch.search.aggregations.metrics.min.Min; import org.elasticsearch.search.builder.SearchSourceBuilder; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; +import org.elasticsearch.xpack.core.ml.action.GetOverallBucketsAction; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.action.util.QueryPage; import org.elasticsearch.xpack.ml.job.JobManager; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.persistence.AnomalyDetectorsIndex; -import org.elasticsearch.xpack.ml.job.persistence.BucketsQueryBuilder; -import org.elasticsearch.xpack.ml.job.persistence.JobProvider; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.persistence.AnomalyDetectorsIndex; +import org.elasticsearch.xpack.core.ml.job.persistence.BucketsQueryBuilder; +import org.elasticsearch.xpack.core.ml.job.persistence.JobProvider; import org.elasticsearch.xpack.ml.job.persistence.overallbuckets.OverallBucketsAggregator; import org.elasticsearch.xpack.ml.job.persistence.overallbuckets.OverallBucketsCollector; import org.elasticsearch.xpack.ml.job.persistence.overallbuckets.OverallBucketsProcessor; import org.elasticsearch.xpack.ml.job.persistence.overallbuckets.OverallBucketsProvider; -import org.elasticsearch.xpack.ml.job.results.Bucket; -import org.elasticsearch.xpack.ml.job.results.OverallBucket; -import org.elasticsearch.xpack.ml.job.results.Result; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; -import org.elasticsearch.xpack.ml.utils.Intervals; +import org.elasticsearch.xpack.core.ml.job.results.Bucket; +import org.elasticsearch.xpack.core.ml.job.results.OverallBucket; +import org.elasticsearch.xpack.core.ml.job.results.Result; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.utils.Intervals; import java.util.HashSet; import java.util.List; import java.util.Set; -import static org.elasticsearch.xpack.ClientHelper.ML_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.executeAsyncWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.ML_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin; public class TransportGetOverallBucketsAction extends HandledTransportAction { diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetRecordsAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetRecordsAction.java index ecd34bb2017..e3af8f6248a 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetRecordsAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetRecordsAction.java @@ -14,9 +14,10 @@ import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; +import org.elasticsearch.xpack.core.ml.action.GetRecordsAction; import org.elasticsearch.xpack.ml.job.JobManager; -import org.elasticsearch.xpack.ml.job.persistence.JobProvider; -import org.elasticsearch.xpack.ml.job.persistence.RecordsQueryBuilder; +import org.elasticsearch.xpack.core.ml.job.persistence.JobProvider; +import org.elasticsearch.xpack.core.ml.job.persistence.RecordsQueryBuilder; public class TransportGetRecordsAction extends HandledTransportAction { diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportIsolateDatafeedAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportIsolateDatafeedAction.java index 45d9ff311ef..0966b9c1dd4 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportIsolateDatafeedAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportIsolateDatafeedAction.java @@ -22,9 +22,10 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.tasks.Task; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; +import org.elasticsearch.xpack.core.ml.MlMetadata; +import org.elasticsearch.xpack.core.ml.action.IsolateDatafeedAction; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.MlMetadata; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData; import java.io.IOException; import java.util.List; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportJobTaskAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportJobTaskAction.java index 1e5201b0e44..2e38e9d85aa 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportJobTaskAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportJobTaskAction.java @@ -19,11 +19,12 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.tasks.Task; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.ml.MlMetadata; +import org.elasticsearch.xpack.core.ml.MlMetadata; +import org.elasticsearch.xpack.core.ml.action.JobTaskRequest; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData; import org.elasticsearch.xpack.ml.job.JobManager; import org.elasticsearch.xpack.ml.job.process.autodetect.AutodetectProcessManager; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData; import java.util.List; import java.util.function.Supplier; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportKillProcessAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportKillProcessAction.java index 5d055f5fb79..35b413913b9 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportKillProcessAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportKillProcessAction.java @@ -19,13 +19,14 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.tasks.Task; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; +import org.elasticsearch.xpack.core.ml.MlMetadata; +import org.elasticsearch.xpack.core.ml.action.KillProcessAction; +import org.elasticsearch.xpack.core.ml.job.messages.Messages; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.MlMetadata; -import org.elasticsearch.xpack.ml.job.messages.Messages; import org.elasticsearch.xpack.ml.job.process.autodetect.AutodetectProcessManager; import org.elasticsearch.xpack.ml.notifications.Auditor; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData; import java.io.IOException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportOpenJobAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportOpenJobAction.java index 25f6c1160e4..e429dd1922c 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportOpenJobAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportOpenJobAction.java @@ -42,24 +42,27 @@ import org.elasticsearch.tasks.Task; import org.elasticsearch.tasks.TaskId; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.XPackField; -import org.elasticsearch.xpack.ml.MLMetadataField; +import org.elasticsearch.xpack.core.XPackField; +import org.elasticsearch.xpack.core.ml.MLMetadataField; +import org.elasticsearch.xpack.core.ml.MlMetaIndex; +import org.elasticsearch.xpack.core.ml.MlMetadata; +import org.elasticsearch.xpack.core.ml.action.OpenJobAction; +import org.elasticsearch.xpack.core.ml.action.PutJobAction; +import org.elasticsearch.xpack.core.ml.action.UpdateJobAction; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.JobState; +import org.elasticsearch.xpack.core.ml.job.config.JobTaskStatus; +import org.elasticsearch.xpack.core.ml.job.config.JobUpdate; +import org.elasticsearch.xpack.core.ml.job.persistence.AnomalyDetectorsIndex; +import org.elasticsearch.xpack.core.ml.job.persistence.ElasticsearchMappings; +import org.elasticsearch.xpack.core.ml.job.persistence.JobProvider; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.persistent.AllocatedPersistentTask; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData; +import org.elasticsearch.xpack.core.persistent.PersistentTasksExecutor; +import org.elasticsearch.xpack.core.persistent.PersistentTasksService; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.MlMetaIndex; -import org.elasticsearch.xpack.ml.MlMetadata; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.config.JobState; -import org.elasticsearch.xpack.ml.job.config.JobTaskStatus; -import org.elasticsearch.xpack.ml.job.config.JobUpdate; -import org.elasticsearch.xpack.ml.job.persistence.AnomalyDetectorsIndex; -import org.elasticsearch.xpack.ml.job.persistence.ElasticsearchMappings; -import org.elasticsearch.xpack.ml.job.persistence.JobProvider; import org.elasticsearch.xpack.ml.job.process.autodetect.AutodetectProcessManager; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; -import org.elasticsearch.xpack.persistent.AllocatedPersistentTask; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData; -import org.elasticsearch.xpack.persistent.PersistentTasksExecutor; -import org.elasticsearch.xpack.persistent.PersistentTasksService; import java.io.IOException; import java.util.ArrayList; @@ -71,8 +74,8 @@ import java.util.Map; import java.util.Set; import java.util.function.Predicate; -import static org.elasticsearch.xpack.ClientHelper.ML_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.executeAsyncWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.ML_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin; import static org.elasticsearch.xpack.ml.job.process.autodetect.AutodetectProcessManager.MAX_OPEN_JOBS_PER_NODE; /* diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportPostCalendarEventsAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportPostCalendarEventsAction.java index 8239db20422..925d9966917 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportPostCalendarEventsAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportPostCalendarEventsAction.java @@ -22,19 +22,20 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.ml.MlMetaIndex; -import org.elasticsearch.xpack.ml.calendars.Calendar; -import org.elasticsearch.xpack.ml.calendars.ScheduledEvent; +import org.elasticsearch.xpack.core.ml.action.PostCalendarEventsAction; +import org.elasticsearch.xpack.core.ml.MlMetaIndex; +import org.elasticsearch.xpack.core.ml.calendars.Calendar; +import org.elasticsearch.xpack.core.ml.calendars.ScheduledEvent; import org.elasticsearch.xpack.ml.job.JobManager; -import org.elasticsearch.xpack.ml.job.persistence.JobProvider; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.job.persistence.JobProvider; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import java.io.IOException; import java.util.Collections; import java.util.List; -import static org.elasticsearch.xpack.ClientHelper.ML_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.executeAsyncWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.ML_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin; public class TransportPostCalendarEventsAction extends HandledTransportAction { diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportPostDataAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportPostDataAction.java index 2a1b99d4cfe..7568fc9c52e 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportPostDataAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportPostDataAction.java @@ -12,10 +12,10 @@ import org.elasticsearch.cluster.service.ClusterService; import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.env.Environment; import org.elasticsearch.index.analysis.AnalysisRegistry; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; +import org.elasticsearch.xpack.core.ml.action.PostDataAction; import org.elasticsearch.xpack.ml.job.process.autodetect.AutodetectProcessManager; import org.elasticsearch.xpack.ml.job.process.autodetect.params.DataLoadParams; import org.elasticsearch.xpack.ml.job.process.autodetect.params.TimeRange; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportPreviewDatafeedAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportPreviewDatafeedAction.java index 4c57e5b0daa..2ee37816374 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportPreviewDatafeedAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportPreviewDatafeedAction.java @@ -16,15 +16,16 @@ import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.ml.MLMetadataField; -import org.elasticsearch.xpack.ml.MlClientHelper; -import org.elasticsearch.xpack.ml.MlMetadata; -import org.elasticsearch.xpack.ml.datafeed.ChunkingConfig; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; -import org.elasticsearch.xpack.ml.datafeed.extractor.DataExtractor; +import org.elasticsearch.xpack.core.ml.action.PreviewDatafeedAction; +import org.elasticsearch.xpack.core.ml.MLMetadataField; +import org.elasticsearch.xpack.core.ml.MlClientHelper; +import org.elasticsearch.xpack.core.ml.MlMetadata; +import org.elasticsearch.xpack.core.ml.datafeed.ChunkingConfig; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.datafeed.extractor.DataExtractor; import org.elasticsearch.xpack.ml.datafeed.extractor.DataExtractorFactory; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import java.io.BufferedReader; import java.io.InputStream; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportPutCalendarAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportPutCalendarAction.java index f8a3a5cecdc..d9f4eca8df3 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportPutCalendarAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportPutCalendarAction.java @@ -25,19 +25,20 @@ import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.index.engine.VersionConflictEngineException; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.ml.MLMetadataField; -import org.elasticsearch.xpack.ml.MlMetaIndex; -import org.elasticsearch.xpack.ml.MlMetadata; -import org.elasticsearch.xpack.ml.calendars.Calendar; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.action.PutCalendarAction; +import org.elasticsearch.xpack.core.ml.MLMetadataField; +import org.elasticsearch.xpack.core.ml.MlMetaIndex; +import org.elasticsearch.xpack.core.ml.MlMetadata; +import org.elasticsearch.xpack.core.ml.calendars.Calendar; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import java.io.IOException; import java.util.Collections; import java.util.List; import java.util.function.Consumer; -import static org.elasticsearch.xpack.ClientHelper.ML_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.executeAsyncWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.ML_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin; public class TransportPutCalendarAction extends HandledTransportAction { diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportPutDatafeedAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportPutDatafeedAction.java index a8e9690433c..ea818f8dfc7 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportPutDatafeedAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportPutDatafeedAction.java @@ -27,16 +27,17 @@ import org.elasticsearch.license.XPackLicenseState; import org.elasticsearch.tasks.Task; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.XPackField; -import org.elasticsearch.xpack.ml.MLMetadataField; -import org.elasticsearch.xpack.ml.MlMetadata; -import org.elasticsearch.xpack.security.SecurityContext; -import org.elasticsearch.xpack.security.action.user.HasPrivilegesAction; -import org.elasticsearch.xpack.security.action.user.HasPrivilegesRequest; -import org.elasticsearch.xpack.security.action.user.HasPrivilegesResponse; -import org.elasticsearch.xpack.security.authz.RoleDescriptor; -import org.elasticsearch.xpack.security.support.Exceptions; +import org.elasticsearch.xpack.core.XPackField; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.ml.MLMetadataField; +import org.elasticsearch.xpack.core.ml.MlMetadata; +import org.elasticsearch.xpack.core.ml.action.PutDatafeedAction; +import org.elasticsearch.xpack.core.security.SecurityContext; +import org.elasticsearch.xpack.core.security.action.user.HasPrivilegesAction; +import org.elasticsearch.xpack.core.security.action.user.HasPrivilegesRequest; +import org.elasticsearch.xpack.core.security.action.user.HasPrivilegesResponse; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor; +import org.elasticsearch.xpack.core.security.support.Exceptions; import java.io.IOException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportPutFilterAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportPutFilterAction.java index 0e3b7f39c13..f7ac11e2d1a 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportPutFilterAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportPutFilterAction.java @@ -22,16 +22,17 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.ml.MlMetaIndex; +import org.elasticsearch.xpack.core.ml.action.PutFilterAction; +import org.elasticsearch.xpack.core.ml.MlMetaIndex; import org.elasticsearch.xpack.ml.job.JobManager; -import org.elasticsearch.xpack.ml.job.config.MlFilter; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.job.config.MlFilter; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import java.io.IOException; import java.util.Collections; -import static org.elasticsearch.xpack.ClientHelper.ML_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.executeAsyncWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.ML_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin; public class TransportPutFilterAction extends HandledTransportAction { diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportPutJobAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportPutJobAction.java index e6a25f5e3a7..eb8fbb86fc9 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportPutJobAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportPutJobAction.java @@ -21,7 +21,8 @@ import org.elasticsearch.license.XPackLicenseState; import org.elasticsearch.tasks.Task; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.XPackField; +import org.elasticsearch.xpack.core.XPackField; +import org.elasticsearch.xpack.core.ml.action.PutJobAction; import org.elasticsearch.xpack.ml.job.JobManager; public class TransportPutJobAction extends TransportMasterNodeAction { diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportRevertModelSnapshotAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportRevertModelSnapshotAction.java index efe3d790b98..41868da955a 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportRevertModelSnapshotAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportRevertModelSnapshotAction.java @@ -19,15 +19,16 @@ import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; +import org.elasticsearch.xpack.core.ml.action.RevertModelSnapshotAction; import org.elasticsearch.xpack.ml.job.JobManager; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.config.JobState; -import org.elasticsearch.xpack.ml.job.messages.Messages; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.JobState; +import org.elasticsearch.xpack.core.ml.job.messages.Messages; import org.elasticsearch.xpack.ml.job.persistence.JobDataCountsPersister; -import org.elasticsearch.xpack.ml.job.persistence.JobDataDeleter; -import org.elasticsearch.xpack.ml.job.persistence.JobProvider; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshot; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.job.persistence.JobDataDeleter; +import org.elasticsearch.xpack.core.ml.job.persistence.JobProvider; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshot; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import java.util.Date; import java.util.function.Consumer; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportStartDatafeedAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportStartDatafeedAction.java index edfa2f08cc6..3547e7738db 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportStartDatafeedAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportStartDatafeedAction.java @@ -28,23 +28,24 @@ import org.elasticsearch.tasks.Task; import org.elasticsearch.tasks.TaskId; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.XPackField; -import org.elasticsearch.xpack.ml.MLMetadataField; +import org.elasticsearch.xpack.core.XPackField; +import org.elasticsearch.xpack.core.ml.MLMetadataField; +import org.elasticsearch.xpack.core.ml.MlMetadata; +import org.elasticsearch.xpack.core.ml.action.StartDatafeedAction; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedJobValidator; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedState; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.JobState; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.persistent.AllocatedPersistentTask; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData; +import org.elasticsearch.xpack.core.persistent.PersistentTasksExecutor; +import org.elasticsearch.xpack.core.persistent.PersistentTasksService; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.MlMetadata; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; -import org.elasticsearch.xpack.ml.datafeed.DatafeedJobValidator; import org.elasticsearch.xpack.ml.datafeed.DatafeedManager; import org.elasticsearch.xpack.ml.datafeed.DatafeedNodeSelector; -import org.elasticsearch.xpack.ml.datafeed.DatafeedState; import org.elasticsearch.xpack.ml.datafeed.extractor.DataExtractorFactory; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.config.JobState; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; -import org.elasticsearch.xpack.persistent.AllocatedPersistentTask; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData; -import org.elasticsearch.xpack.persistent.PersistentTasksExecutor; -import org.elasticsearch.xpack.persistent.PersistentTasksService; import java.util.Map; import java.util.function.Predicate; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportStopDatafeedAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportStopDatafeedAction.java index 18a25ab7c46..96019829663 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportStopDatafeedAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportStopDatafeedAction.java @@ -26,15 +26,16 @@ import org.elasticsearch.discovery.MasterNotDiscoveredException; import org.elasticsearch.tasks.Task; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.ml.MLMetadataField; +import org.elasticsearch.xpack.core.ml.MLMetadataField; +import org.elasticsearch.xpack.core.ml.MlMetadata; +import org.elasticsearch.xpack.core.ml.action.StopDatafeedAction; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedState; +import org.elasticsearch.xpack.core.ml.job.messages.Messages; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData; +import org.elasticsearch.xpack.core.persistent.PersistentTasksService; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.MlMetadata; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; -import org.elasticsearch.xpack.ml.datafeed.DatafeedState; -import org.elasticsearch.xpack.ml.job.messages.Messages; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData; -import org.elasticsearch.xpack.persistent.PersistentTasksService; import java.io.IOException; import java.util.ArrayList; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportUpdateCalendarJobAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportUpdateCalendarJobAction.java index 75a80d9caad..913c67dacc0 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportUpdateCalendarJobAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportUpdateCalendarJobAction.java @@ -14,8 +14,10 @@ import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; +import org.elasticsearch.xpack.core.ml.action.PutCalendarAction; +import org.elasticsearch.xpack.core.ml.action.UpdateCalendarJobAction; import org.elasticsearch.xpack.ml.job.JobManager; -import org.elasticsearch.xpack.ml.job.persistence.JobProvider; +import org.elasticsearch.xpack.core.ml.job.persistence.JobProvider; public class TransportUpdateCalendarJobAction extends HandledTransportAction { diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportUpdateDatafeedAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportUpdateDatafeedAction.java index 065559decb4..9ce40e67bc7 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportUpdateDatafeedAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportUpdateDatafeedAction.java @@ -19,11 +19,13 @@ import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.ml.MLMetadataField; -import org.elasticsearch.xpack.ml.MlMetadata; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; -import org.elasticsearch.xpack.ml.datafeed.DatafeedUpdate; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData; +import org.elasticsearch.xpack.core.ml.MLMetadataField; +import org.elasticsearch.xpack.core.ml.MlMetadata; +import org.elasticsearch.xpack.core.ml.action.PutDatafeedAction; +import org.elasticsearch.xpack.core.ml.action.UpdateDatafeedAction; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedUpdate; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData; public class TransportUpdateDatafeedAction extends TransportMasterNodeAction { diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportUpdateJobAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportUpdateJobAction.java index 7273d271361..7d915834e9e 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportUpdateJobAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportUpdateJobAction.java @@ -18,6 +18,8 @@ import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; +import org.elasticsearch.xpack.core.ml.action.PutJobAction; +import org.elasticsearch.xpack.core.ml.action.UpdateJobAction; import org.elasticsearch.xpack.ml.job.JobManager; public class TransportUpdateJobAction extends TransportMasterNodeAction { diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportUpdateModelSnapshotAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportUpdateModelSnapshotAction.java index cf7e9c1b75f..9fedf7975c3 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportUpdateModelSnapshotAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportUpdateModelSnapshotAction.java @@ -23,17 +23,18 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.ml.job.messages.Messages; -import org.elasticsearch.xpack.ml.job.persistence.ElasticsearchMappings; -import org.elasticsearch.xpack.ml.job.persistence.JobProvider; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshot; -import org.elasticsearch.xpack.ml.job.results.Result; +import org.elasticsearch.xpack.core.ml.action.UpdateModelSnapshotAction; +import org.elasticsearch.xpack.core.ml.job.messages.Messages; +import org.elasticsearch.xpack.core.ml.job.persistence.ElasticsearchMappings; +import org.elasticsearch.xpack.core.ml.job.persistence.JobProvider; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshot; +import org.elasticsearch.xpack.core.ml.job.results.Result; import java.io.IOException; import java.util.function.Consumer; -import static org.elasticsearch.xpack.ClientHelper.ML_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.executeAsyncWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.ML_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin; public class TransportUpdateModelSnapshotAction extends HandledTransportAction { diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportUpdateProcessAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportUpdateProcessAction.java index bafc2a00d09..c7818859118 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportUpdateProcessAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportUpdateProcessAction.java @@ -14,6 +14,7 @@ import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; +import org.elasticsearch.xpack.core.ml.action.UpdateProcessAction; import org.elasticsearch.xpack.ml.job.process.autodetect.AutodetectProcessManager; import org.elasticsearch.xpack.ml.job.process.autodetect.UpdateParams; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportValidateDetectorAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportValidateDetectorAction.java index 510c1580822..efa24ebcc0c 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportValidateDetectorAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportValidateDetectorAction.java @@ -13,6 +13,7 @@ import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; +import org.elasticsearch.xpack.core.ml.action.ValidateDetectorAction; public class TransportValidateDetectorAction extends HandledTransportAction { diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportValidateJobConfigAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportValidateJobConfigAction.java index 822b3ba7852..9cd1e5e6aca 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportValidateJobConfigAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportValidateJobConfigAction.java @@ -13,6 +13,7 @@ import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; +import org.elasticsearch.xpack.core.ml.action.ValidateJobConfigAction; public class TransportValidateJobConfigAction extends HandledTransportAction { diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJob.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJob.java index 38f6d897cbc..ef52adedd9f 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJob.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJob.java @@ -16,13 +16,13 @@ import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.index.mapper.DateFieldMapper; import org.elasticsearch.rest.RestStatus; -import org.elasticsearch.xpack.ml.action.FlushJobAction; -import org.elasticsearch.xpack.ml.action.PostDataAction; -import org.elasticsearch.xpack.ml.datafeed.extractor.DataExtractor; +import org.elasticsearch.xpack.core.ml.action.FlushJobAction; +import org.elasticsearch.xpack.core.ml.action.PostDataAction; +import org.elasticsearch.xpack.core.ml.datafeed.extractor.DataExtractor; import org.elasticsearch.xpack.ml.datafeed.extractor.DataExtractorFactory; -import org.elasticsearch.xpack.ml.job.config.DataDescription; -import org.elasticsearch.xpack.ml.job.messages.Messages; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.DataCounts; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.messages.Messages; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.DataCounts; import org.elasticsearch.xpack.ml.notifications.Auditor; import java.io.ByteArrayOutputStream; @@ -33,8 +33,8 @@ import java.util.Optional; import java.util.concurrent.atomic.AtomicBoolean; import java.util.function.Supplier; -import static org.elasticsearch.xpack.ClientHelper.ML_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.stashWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.ML_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.stashWithOrigin; class DatafeedJob { diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobBuilder.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobBuilder.java index 3ada8792747..622620e0fe4 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobBuilder.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobBuilder.java @@ -9,15 +9,16 @@ import org.elasticsearch.ResourceNotFoundException; import org.elasticsearch.action.ActionListener; import org.elasticsearch.client.Client; import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.xpack.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; import org.elasticsearch.xpack.ml.datafeed.extractor.DataExtractorFactory; -import org.elasticsearch.xpack.ml.job.config.DataDescription; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.persistence.BucketsQueryBuilder; -import org.elasticsearch.xpack.ml.job.persistence.JobProvider; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.DataCounts; -import org.elasticsearch.xpack.ml.job.results.Bucket; -import org.elasticsearch.xpack.ml.job.results.Result; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.persistence.BucketsQueryBuilder; +import org.elasticsearch.xpack.core.ml.job.persistence.JobProvider; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.DataCounts; +import org.elasticsearch.xpack.core.ml.job.results.Bucket; +import org.elasticsearch.xpack.core.ml.job.results.Result; import org.elasticsearch.xpack.ml.notifications.Auditor; import java.util.Collections; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedManager.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedManager.java index a917d2fa618..48c67dd14e7 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedManager.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedManager.java @@ -20,18 +20,23 @@ import org.elasticsearch.common.util.concurrent.FutureUtils; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.xpack.ml.MLMetadataField; +import org.elasticsearch.xpack.core.ml.MLMetadataField; +import org.elasticsearch.xpack.core.ml.MlMetadata; +import org.elasticsearch.xpack.core.ml.action.CloseJobAction; +import org.elasticsearch.xpack.core.ml.action.StartDatafeedAction; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedState; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.JobState; +import org.elasticsearch.xpack.core.ml.job.messages.Messages; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData.PersistentTask; +import org.elasticsearch.xpack.core.persistent.PersistentTasksService; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.MlMetadata; -import org.elasticsearch.xpack.ml.action.CloseJobAction; -import org.elasticsearch.xpack.ml.action.StartDatafeedAction; import org.elasticsearch.xpack.ml.action.TransportStartDatafeedAction; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.config.JobState; -import org.elasticsearch.xpack.ml.job.messages.Messages; import org.elasticsearch.xpack.ml.notifications.Auditor; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData.PersistentTask; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData.PersistentTask; import java.util.ArrayList; import java.util.Iterator; @@ -46,9 +51,9 @@ import java.util.concurrent.locks.ReentrantLock; import java.util.function.Consumer; import java.util.function.Supplier; -import static org.elasticsearch.xpack.ClientHelper.ML_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.executeAsyncWithOrigin; -import static org.elasticsearch.xpack.persistent.PersistentTasksService.WaitForPersistentTaskStatusListener; +import static org.elasticsearch.xpack.core.ClientHelper.ML_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin; +import static org.elasticsearch.xpack.core.persistent.PersistentTasksService.WaitForPersistentTaskStatusListener; public class DatafeedManager extends AbstractComponent { diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedNodeSelector.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedNodeSelector.java index 46969c184ac..c40599ba99f 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedNodeSelector.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedNodeSelector.java @@ -12,12 +12,13 @@ import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver; import org.elasticsearch.cluster.routing.IndexRoutingTable; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.logging.Loggers; -import org.elasticsearch.xpack.ml.MLMetadataField; -import org.elasticsearch.xpack.ml.MlMetadata; -import org.elasticsearch.xpack.ml.job.config.JobState; -import org.elasticsearch.xpack.ml.job.config.JobTaskStatus; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData; +import org.elasticsearch.xpack.core.ml.MLMetadataField; +import org.elasticsearch.xpack.core.ml.MlMetadata; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.job.config.JobState; +import org.elasticsearch.xpack.core.ml.job.config.JobTaskStatus; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData; import java.util.List; import java.util.Objects; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/ProblemTracker.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/ProblemTracker.java index 4d3537e1de7..d8001fb69b4 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/ProblemTracker.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/ProblemTracker.java @@ -5,7 +5,7 @@ */ package org.elasticsearch.xpack.ml.datafeed; -import org.elasticsearch.xpack.ml.job.messages.Messages; +import org.elasticsearch.xpack.core.ml.job.messages.Messages; import org.elasticsearch.xpack.ml.notifications.Auditor; import java.util.Objects; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/DataExtractorFactory.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/DataExtractorFactory.java index 5d3abb6014e..8fd1ced1729 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/DataExtractorFactory.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/DataExtractorFactory.java @@ -7,11 +7,12 @@ package org.elasticsearch.xpack.ml.datafeed.extractor; import org.elasticsearch.action.ActionListener; import org.elasticsearch.client.Client; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.datafeed.extractor.DataExtractor; import org.elasticsearch.xpack.ml.datafeed.extractor.aggregation.AggregationDataExtractorFactory; import org.elasticsearch.xpack.ml.datafeed.extractor.chunked.ChunkedDataExtractorFactory; import org.elasticsearch.xpack.ml.datafeed.extractor.scroll.ScrollDataExtractorFactory; -import org.elasticsearch.xpack.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.Job; public interface DataExtractorFactory { DataExtractor newExtractor(long start, long end); diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationDataExtractor.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationDataExtractor.java index aa16f839d31..f9089b6bc17 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationDataExtractor.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationDataExtractor.java @@ -14,9 +14,9 @@ import org.elasticsearch.common.Nullable; import org.elasticsearch.common.logging.Loggers; import org.elasticsearch.search.aggregations.Aggregation; import org.elasticsearch.search.aggregations.Aggregations; -import org.elasticsearch.xpack.ml.MlClientHelper; -import org.elasticsearch.xpack.ml.datafeed.extractor.DataExtractor; -import org.elasticsearch.xpack.ml.datafeed.extractor.ExtractorUtils; +import org.elasticsearch.xpack.core.ml.MlClientHelper; +import org.elasticsearch.xpack.core.ml.datafeed.extractor.DataExtractor; +import org.elasticsearch.xpack.core.ml.datafeed.extractor.ExtractorUtils; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationDataExtractorFactory.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationDataExtractorFactory.java index a353b5a6b67..a4322275e03 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationDataExtractorFactory.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationDataExtractorFactory.java @@ -6,11 +6,11 @@ package org.elasticsearch.xpack.ml.datafeed.extractor.aggregation; import org.elasticsearch.client.Client; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; -import org.elasticsearch.xpack.ml.datafeed.extractor.DataExtractor; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.datafeed.extractor.DataExtractor; import org.elasticsearch.xpack.ml.datafeed.extractor.DataExtractorFactory; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.utils.Intervals; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.utils.Intervals; import java.util.Objects; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationToJsonProcessor.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationToJsonProcessor.java index b46ca924452..e481986504d 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationToJsonProcessor.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationToJsonProcessor.java @@ -18,8 +18,8 @@ import org.elasticsearch.search.aggregations.metrics.NumericMetricsAggregation; import org.elasticsearch.search.aggregations.metrics.max.Max; import org.elasticsearch.search.aggregations.metrics.percentiles.Percentile; import org.elasticsearch.search.aggregations.metrics.percentiles.Percentiles; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; -import org.elasticsearch.xpack.ml.job.messages.Messages; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.job.messages.Messages; import org.joda.time.DateTime; import java.io.IOException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/chunked/ChunkedDataExtractor.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/chunked/ChunkedDataExtractor.java index 3e4eb0866d4..61298f16abd 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/chunked/ChunkedDataExtractor.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/chunked/ChunkedDataExtractor.java @@ -15,10 +15,10 @@ import org.elasticsearch.search.aggregations.AggregationBuilders; import org.elasticsearch.search.aggregations.Aggregations; import org.elasticsearch.search.aggregations.metrics.max.Max; import org.elasticsearch.search.aggregations.metrics.min.Min; -import org.elasticsearch.xpack.ml.MlClientHelper; -import org.elasticsearch.xpack.ml.datafeed.extractor.DataExtractor; +import org.elasticsearch.xpack.core.ml.MlClientHelper; +import org.elasticsearch.xpack.core.ml.datafeed.extractor.DataExtractor; import org.elasticsearch.xpack.ml.datafeed.extractor.DataExtractorFactory; -import org.elasticsearch.xpack.ml.datafeed.extractor.ExtractorUtils; +import org.elasticsearch.xpack.core.ml.datafeed.extractor.ExtractorUtils; import java.io.IOException; import java.io.InputStream; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/chunked/ChunkedDataExtractorFactory.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/chunked/ChunkedDataExtractorFactory.java index fc438e1b017..7b5bac64740 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/chunked/ChunkedDataExtractorFactory.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/chunked/ChunkedDataExtractorFactory.java @@ -6,11 +6,11 @@ package org.elasticsearch.xpack.ml.datafeed.extractor.chunked; import org.elasticsearch.client.Client; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; -import org.elasticsearch.xpack.ml.datafeed.extractor.DataExtractor; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.datafeed.extractor.DataExtractor; import org.elasticsearch.xpack.ml.datafeed.extractor.DataExtractorFactory; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.utils.Intervals; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.utils.Intervals; import java.util.Objects; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ExtractedFields.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ExtractedFields.java index ada9d37fec2..f8e0fb04992 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ExtractedFields.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ExtractedFields.java @@ -8,10 +8,10 @@ package org.elasticsearch.xpack.ml.datafeed.extractor.scroll; import org.elasticsearch.action.fieldcaps.FieldCapabilities; import org.elasticsearch.action.fieldcaps.FieldCapabilitiesResponse; import org.elasticsearch.search.SearchHit; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; -import org.elasticsearch.xpack.ml.utils.MlStrings; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.utils.MlStrings; import java.util.ArrayList; import java.util.Arrays; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ScrollDataExtractor.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ScrollDataExtractor.java index e64c4b0116e..57601406e71 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ScrollDataExtractor.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ScrollDataExtractor.java @@ -20,9 +20,9 @@ import org.elasticsearch.script.Script; import org.elasticsearch.search.SearchHit; import org.elasticsearch.search.fetch.StoredFieldsContext; import org.elasticsearch.search.sort.SortOrder; -import org.elasticsearch.xpack.ml.MlClientHelper; -import org.elasticsearch.xpack.ml.datafeed.extractor.DataExtractor; -import org.elasticsearch.xpack.ml.datafeed.extractor.ExtractorUtils; +import org.elasticsearch.xpack.core.ml.MlClientHelper; +import org.elasticsearch.xpack.core.ml.datafeed.extractor.DataExtractor; +import org.elasticsearch.xpack.core.ml.datafeed.extractor.ExtractorUtils; import org.elasticsearch.xpack.ml.utils.DomainSplitFunction; import java.io.ByteArrayInputStream; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ScrollDataExtractorFactory.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ScrollDataExtractorFactory.java index 8a70eb6f046..f4f359580db 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ScrollDataExtractorFactory.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ScrollDataExtractorFactory.java @@ -12,12 +12,12 @@ import org.elasticsearch.action.fieldcaps.FieldCapabilitiesRequest; import org.elasticsearch.action.fieldcaps.FieldCapabilitiesResponse; import org.elasticsearch.client.Client; import org.elasticsearch.index.IndexNotFoundException; -import org.elasticsearch.xpack.ml.MlClientHelper; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; -import org.elasticsearch.xpack.ml.datafeed.extractor.DataExtractor; +import org.elasticsearch.xpack.core.ml.MlClientHelper; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.datafeed.extractor.DataExtractor; import org.elasticsearch.xpack.ml.datafeed.extractor.DataExtractorFactory; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.utils.MlStrings; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.utils.MlStrings; import java.util.Objects; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/JobManager.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/JobManager.java index 3c3ad52587a..c3c076f0e29 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/JobManager.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/JobManager.java @@ -26,28 +26,28 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.env.Environment; import org.elasticsearch.index.analysis.AnalysisRegistry; -import org.elasticsearch.xpack.ml.MLMetadataField; -import org.elasticsearch.xpack.ml.MachineLearningField; -import org.elasticsearch.xpack.ml.MlMetadata; -import org.elasticsearch.xpack.ml.action.DeleteJobAction; -import org.elasticsearch.xpack.ml.action.PutJobAction; -import org.elasticsearch.xpack.ml.action.RevertModelSnapshotAction; -import org.elasticsearch.xpack.ml.action.util.QueryPage; -import org.elasticsearch.xpack.ml.job.config.DataDescription; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.config.JobState; -import org.elasticsearch.xpack.ml.job.config.JobUpdate; -import org.elasticsearch.xpack.ml.job.config.MlFilter; -import org.elasticsearch.xpack.ml.job.messages.Messages; -import org.elasticsearch.xpack.ml.job.persistence.JobProvider; +import org.elasticsearch.xpack.core.ml.MLMetadataField; +import org.elasticsearch.xpack.core.ml.MachineLearningField; +import org.elasticsearch.xpack.core.ml.MlMetadata; +import org.elasticsearch.xpack.core.ml.action.DeleteJobAction; +import org.elasticsearch.xpack.core.ml.action.PutJobAction; +import org.elasticsearch.xpack.core.ml.action.RevertModelSnapshotAction; +import org.elasticsearch.xpack.core.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.JobState; +import org.elasticsearch.xpack.core.ml.job.config.JobUpdate; +import org.elasticsearch.xpack.core.ml.job.config.MlFilter; +import org.elasticsearch.xpack.core.ml.job.messages.Messages; +import org.elasticsearch.xpack.core.ml.job.persistence.JobProvider; +import org.elasticsearch.xpack.core.ml.job.persistence.JobStorageDeletionTask; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSizeStats; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshot; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData; import org.elasticsearch.xpack.ml.job.persistence.JobResultsPersister; -import org.elasticsearch.xpack.ml.job.persistence.JobStorageDeletionTask; import org.elasticsearch.xpack.ml.job.process.autodetect.UpdateParams; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSizeStats; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshot; import org.elasticsearch.xpack.ml.notifications.Auditor; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData; import java.io.IOException; import java.util.ArrayList; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/UpdateJobProcessNotifier.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/UpdateJobProcessNotifier.java index 5804702a3ae..2bba7cfc17f 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/UpdateJobProcessNotifier.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/UpdateJobProcessNotifier.java @@ -16,15 +16,15 @@ import org.elasticsearch.common.component.LifecycleListener; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.xpack.ml.action.UpdateProcessAction; +import org.elasticsearch.xpack.core.ml.action.UpdateProcessAction; import org.elasticsearch.xpack.ml.job.process.autodetect.UpdateParams; import java.util.concurrent.LinkedBlockingQueue; -import static org.elasticsearch.xpack.ClientHelper.ML_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.executeAsyncWithOrigin; -import static org.elasticsearch.xpack.ml.action.UpdateProcessAction.Request; -import static org.elasticsearch.xpack.ml.action.UpdateProcessAction.Response; +import static org.elasticsearch.xpack.core.ClientHelper.ML_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin; +import static org.elasticsearch.xpack.core.ml.action.UpdateProcessAction.Request; +import static org.elasticsearch.xpack.core.ml.action.UpdateProcessAction.Response; public class UpdateJobProcessNotifier extends AbstractComponent implements LocalNodeMasterListener { diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/categorization/CategorizationAnalyzer.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/categorization/CategorizationAnalyzer.java index 82d9e5bc7f1..a0101b999d5 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/categorization/CategorizationAnalyzer.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/categorization/CategorizationAnalyzer.java @@ -12,7 +12,7 @@ import org.elasticsearch.ElasticsearchException; import org.elasticsearch.common.collect.Tuple; import org.elasticsearch.env.Environment; import org.elasticsearch.index.analysis.AnalysisRegistry; -import org.elasticsearch.xpack.ml.job.config.CategorizationAnalyzerConfig; +import org.elasticsearch.xpack.core.ml.job.config.CategorizationAnalyzerConfig; import java.io.Closeable; import java.io.IOException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobDataCountsPersister.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobDataCountsPersister.java index 115d678665c..d3b66f47661 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobDataCountsPersister.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobDataCountsPersister.java @@ -16,13 +16,15 @@ import org.elasticsearch.common.component.AbstractComponent; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.DataCounts; +import org.elasticsearch.xpack.core.ml.job.persistence.AnomalyDetectorsIndex; +import org.elasticsearch.xpack.core.ml.job.persistence.ElasticsearchMappings; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.DataCounts; import java.io.IOException; import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.xpack.ClientHelper.ML_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.executeAsyncWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.ML_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin; /** * Update a job's dataCounts diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobRenormalizedResultsPersister.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobRenormalizedResultsPersister.java index 661c7155795..f318737e0b4 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobRenormalizedResultsPersister.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobRenormalizedResultsPersister.java @@ -17,16 +17,16 @@ import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.xpack.ml.job.process.normalizer.BucketNormalizable; import org.elasticsearch.xpack.ml.job.process.normalizer.Normalizable; -import org.elasticsearch.xpack.ml.job.results.Bucket; -import org.elasticsearch.xpack.ml.job.results.BucketInfluencer; +import org.elasticsearch.xpack.core.ml.job.results.Bucket; +import org.elasticsearch.xpack.core.ml.job.results.BucketInfluencer; import java.io.IOException; import java.util.List; import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.xpack.ClientHelper.ML_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.stashWithOrigin; -import static org.elasticsearch.xpack.ml.job.persistence.ElasticsearchMappings.DOC_TYPE; +import static org.elasticsearch.xpack.core.ClientHelper.ML_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.stashWithOrigin; +import static org.elasticsearch.xpack.core.ml.job.persistence.ElasticsearchMappings.DOC_TYPE; /** diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobResultsPersister.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobResultsPersister.java index d88f2390241..5f0043b8645 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobResultsPersister.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobResultsPersister.java @@ -23,17 +23,20 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSizeStats; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshot; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.Quantiles; -import org.elasticsearch.xpack.ml.job.results.AnomalyRecord; -import org.elasticsearch.xpack.ml.job.results.Bucket; -import org.elasticsearch.xpack.ml.job.results.BucketInfluencer; -import org.elasticsearch.xpack.ml.job.results.CategoryDefinition; -import org.elasticsearch.xpack.ml.job.results.Forecast; -import org.elasticsearch.xpack.ml.job.results.ForecastRequestStats; -import org.elasticsearch.xpack.ml.job.results.Influencer; -import org.elasticsearch.xpack.ml.job.results.ModelPlot; +import org.elasticsearch.xpack.core.ml.job.persistence.AnomalyDetectorsIndex; +import org.elasticsearch.xpack.core.ml.job.persistence.ElasticsearchMappings; +import org.elasticsearch.xpack.core.ml.job.persistence.JobDataDeleter; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSizeStats; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshot; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.Quantiles; +import org.elasticsearch.xpack.core.ml.job.results.AnomalyRecord; +import org.elasticsearch.xpack.core.ml.job.results.Bucket; +import org.elasticsearch.xpack.core.ml.job.results.BucketInfluencer; +import org.elasticsearch.xpack.core.ml.job.results.CategoryDefinition; +import org.elasticsearch.xpack.core.ml.job.results.Forecast; +import org.elasticsearch.xpack.core.ml.job.results.ForecastRequestStats; +import org.elasticsearch.xpack.core.ml.job.results.Influencer; +import org.elasticsearch.xpack.core.ml.job.results.ModelPlot; import java.io.IOException; import java.util.Collections; @@ -41,10 +44,10 @@ import java.util.List; import java.util.Objects; import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.xpack.ClientHelper.ML_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.executeAsyncWithOrigin; -import static org.elasticsearch.xpack.ClientHelper.stashWithOrigin; -import static org.elasticsearch.xpack.ml.job.persistence.ElasticsearchMappings.DOC_TYPE; +import static org.elasticsearch.xpack.core.ClientHelper.ML_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.stashWithOrigin; +import static org.elasticsearch.xpack.core.ml.job.persistence.ElasticsearchMappings.DOC_TYPE; /** * Persists result types, Quantiles etc to Elasticsearch
@@ -60,7 +63,7 @@ import static org.elasticsearch.xpack.ml.job.persistence.ElasticsearchMappings.D * ModelSizeStats This is stored in a flat structure
* ModelSnapShot This is stored in a flat structure
* - * @see org.elasticsearch.xpack.ml.job.persistence.ElasticsearchMappings + * @see ElasticsearchMappings */ public class JobResultsPersister extends AbstractComponent { diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/persistence/StateStreamer.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/persistence/StateStreamer.java index ada27bf9f9a..a800ff95136 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/persistence/StateStreamer.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/persistence/StateStreamer.java @@ -13,15 +13,17 @@ import org.elasticsearch.client.Client; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.logging.Loggers; import org.elasticsearch.common.util.concurrent.ThreadContext; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.CategorizerState; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshot; +import org.elasticsearch.xpack.core.ml.job.persistence.AnomalyDetectorsIndex; +import org.elasticsearch.xpack.core.ml.job.persistence.ElasticsearchMappings; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.CategorizerState; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshot; import java.io.IOException; import java.io.OutputStream; import java.util.Objects; -import static org.elasticsearch.xpack.ClientHelper.ML_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.stashWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.ML_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.stashWithOrigin; /** * A {@code StateStreamer} fetches the various state documents and diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/persistence/overallbuckets/OverallBucketsAggregator.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/persistence/overallbuckets/OverallBucketsAggregator.java index 67253396510..2b55da7a6cb 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/persistence/overallbuckets/OverallBucketsAggregator.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/persistence/overallbuckets/OverallBucketsAggregator.java @@ -6,8 +6,8 @@ package org.elasticsearch.xpack.ml.job.persistence.overallbuckets; import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.xpack.ml.job.results.OverallBucket; -import org.elasticsearch.xpack.ml.utils.Intervals; +import org.elasticsearch.xpack.core.ml.job.results.OverallBucket; +import org.elasticsearch.xpack.core.ml.utils.Intervals; import java.util.ArrayList; import java.util.Date; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/persistence/overallbuckets/OverallBucketsCollector.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/persistence/overallbuckets/OverallBucketsCollector.java index acf47831f3c..5bc449c0220 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/persistence/overallbuckets/OverallBucketsCollector.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/persistence/overallbuckets/OverallBucketsCollector.java @@ -5,7 +5,7 @@ */ package org.elasticsearch.xpack.ml.job.persistence.overallbuckets; -import org.elasticsearch.xpack.ml.job.results.OverallBucket; +import org.elasticsearch.xpack.core.ml.job.results.OverallBucket; import java.util.ArrayList; import java.util.List; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/persistence/overallbuckets/OverallBucketsProcessor.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/persistence/overallbuckets/OverallBucketsProcessor.java index ca4dbb80969..09bce502ca7 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/persistence/overallbuckets/OverallBucketsProcessor.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/persistence/overallbuckets/OverallBucketsProcessor.java @@ -5,7 +5,7 @@ */ package org.elasticsearch.xpack.ml.job.persistence.overallbuckets; -import org.elasticsearch.xpack.ml.job.results.OverallBucket; +import org.elasticsearch.xpack.core.ml.job.results.OverallBucket; import java.util.List; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/persistence/overallbuckets/OverallBucketsProvider.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/persistence/overallbuckets/OverallBucketsProvider.java index fe853c5890a..9bcabad9aea 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/persistence/overallbuckets/OverallBucketsProvider.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/persistence/overallbuckets/OverallBucketsProvider.java @@ -11,9 +11,9 @@ import org.elasticsearch.search.aggregations.Aggregations; import org.elasticsearch.search.aggregations.bucket.histogram.Histogram; import org.elasticsearch.search.aggregations.bucket.terms.Terms; import org.elasticsearch.search.aggregations.metrics.max.Max; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.results.OverallBucket; -import org.elasticsearch.xpack.ml.job.results.Result; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.results.OverallBucket; +import org.elasticsearch.xpack.core.ml.job.results.Result; import org.joda.time.DateTime; import java.util.ArrayList; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/DataCountsReporter.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/DataCountsReporter.java index 7b5d6b51ae1..debe1c36bba 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/DataCountsReporter.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/DataCountsReporter.java @@ -11,9 +11,9 @@ import org.elasticsearch.common.settings.Setting; import org.elasticsearch.common.settings.Setting.Property; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.xpack.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.Job; import org.elasticsearch.xpack.ml.job.persistence.JobDataCountsPersister; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.DataCounts; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.DataCounts; import java.util.Date; import java.util.Locale; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/DataStreamDiagnostics.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/DataStreamDiagnostics.java index 51902153554..b7332042586 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/DataStreamDiagnostics.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/DataStreamDiagnostics.java @@ -8,7 +8,7 @@ package org.elasticsearch.xpack.ml.job.process; import org.apache.logging.log4j.Logger; import org.apache.lucene.util.Counter; import org.elasticsearch.common.logging.Loggers; -import org.elasticsearch.xpack.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.Job; import java.util.Date; import java.util.SortedMap; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/NativeControllerHolder.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/NativeControllerHolder.java index a8d99991857..9bcb6e78729 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/NativeControllerHolder.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/NativeControllerHolder.java @@ -6,7 +6,7 @@ package org.elasticsearch.xpack.ml.job.process; import org.elasticsearch.env.Environment; -import org.elasticsearch.xpack.ml.MachineLearningField; +import org.elasticsearch.xpack.core.ml.MachineLearningField; import org.elasticsearch.xpack.ml.utils.NamedPipeHelper; import java.io.IOException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/ProcessCtrl.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/ProcessCtrl.java index aaf0eb43b7d..fd1ca460a7d 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/ProcessCtrl.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/ProcessCtrl.java @@ -13,10 +13,10 @@ import org.elasticsearch.common.settings.Setting.Property; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.env.Environment; -import org.elasticsearch.xpack.XPackPlugin; -import org.elasticsearch.xpack.ml.job.config.AnalysisConfig; -import org.elasticsearch.xpack.ml.job.config.DataDescription; -import org.elasticsearch.xpack.ml.job.config.Job; +import org.elasticsearch.xpack.core.XPackPlugin; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.Job; import java.io.BufferedWriter; import java.io.IOException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectBuilder.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectBuilder.java index 904c8a7b1aa..407bed6f19f 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectBuilder.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectBuilder.java @@ -8,15 +8,15 @@ package org.elasticsearch.xpack.ml.job.process.autodetect; import org.apache.logging.log4j.Logger; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.env.Environment; -import org.elasticsearch.xpack.ml.calendars.ScheduledEvent; -import org.elasticsearch.xpack.ml.job.config.AnalysisLimits; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.config.MlFilter; -import org.elasticsearch.xpack.ml.job.config.ModelPlotConfig; +import org.elasticsearch.xpack.core.ml.calendars.ScheduledEvent; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisLimits; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.MlFilter; +import org.elasticsearch.xpack.core.ml.job.config.ModelPlotConfig; import org.elasticsearch.xpack.ml.job.process.NativeController; import org.elasticsearch.xpack.ml.job.process.ProcessCtrl; import org.elasticsearch.xpack.ml.job.process.ProcessPipes; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.Quantiles; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.Quantiles; import org.elasticsearch.xpack.ml.job.process.autodetect.writer.AnalysisLimitsWriter; import org.elasticsearch.xpack.ml.job.process.autodetect.writer.FieldConfigWriter; import org.elasticsearch.xpack.ml.job.process.autodetect.writer.ModelPlotConfigWriter; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectCommunicator.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectCommunicator.java index 446bfd436d6..c982a95540f 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectCommunicator.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectCommunicator.java @@ -17,27 +17,27 @@ import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.env.Environment; import org.elasticsearch.index.analysis.AnalysisRegistry; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.calendars.ScheduledEvent; +import org.elasticsearch.xpack.core.ml.calendars.ScheduledEvent; import org.elasticsearch.xpack.ml.job.categorization.CategorizationAnalyzer; -import org.elasticsearch.xpack.ml.job.config.AnalysisConfig; -import org.elasticsearch.xpack.ml.job.config.CategorizationAnalyzerConfig; -import org.elasticsearch.xpack.ml.job.config.DataDescription; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.config.JobUpdate; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig; +import org.elasticsearch.xpack.core.ml.job.config.CategorizationAnalyzerConfig; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.JobUpdate; import org.elasticsearch.xpack.ml.job.persistence.StateStreamer; import org.elasticsearch.xpack.ml.job.process.CountingInputStream; import org.elasticsearch.xpack.ml.job.process.DataCountsReporter; import org.elasticsearch.xpack.ml.job.process.autodetect.output.AutoDetectResultProcessor; -import org.elasticsearch.xpack.ml.job.process.autodetect.output.FlushAcknowledgement; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.output.FlushAcknowledgement; import org.elasticsearch.xpack.ml.job.process.autodetect.params.DataLoadParams; import org.elasticsearch.xpack.ml.job.process.autodetect.params.FlushJobParams; import org.elasticsearch.xpack.ml.job.process.autodetect.params.ForecastParams; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.DataCounts; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSizeStats; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshot; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.DataCounts; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSizeStats; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshot; import org.elasticsearch.xpack.ml.job.process.autodetect.writer.DataToProcessWriter; import org.elasticsearch.xpack.ml.job.process.autodetect.writer.DataToProcessWriterFactory; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import java.io.Closeable; import java.io.IOException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectProcess.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectProcess.java index 44ab1753e61..97238a43045 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectProcess.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectProcess.java @@ -6,15 +6,15 @@ package org.elasticsearch.xpack.ml.job.process.autodetect; import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.xpack.ml.calendars.ScheduledEvent; -import org.elasticsearch.xpack.ml.job.config.DetectionRule; -import org.elasticsearch.xpack.ml.job.config.MlFilter; -import org.elasticsearch.xpack.ml.job.config.ModelPlotConfig; +import org.elasticsearch.xpack.core.ml.calendars.ScheduledEvent; +import org.elasticsearch.xpack.core.ml.job.config.DetectionRule; +import org.elasticsearch.xpack.core.ml.job.config.MlFilter; +import org.elasticsearch.xpack.core.ml.job.config.ModelPlotConfig; import org.elasticsearch.xpack.ml.job.persistence.StateStreamer; import org.elasticsearch.xpack.ml.job.process.autodetect.params.DataLoadParams; import org.elasticsearch.xpack.ml.job.process.autodetect.params.FlushJobParams; import org.elasticsearch.xpack.ml.job.process.autodetect.params.ForecastParams; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshot; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshot; import org.elasticsearch.xpack.ml.job.results.AutodetectResult; import java.io.Closeable; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectProcessFactory.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectProcessFactory.java index cebde270574..f065849af6b 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectProcessFactory.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectProcessFactory.java @@ -5,13 +5,9 @@ */ package org.elasticsearch.xpack.ml.job.process.autodetect; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.config.MlFilter; -import org.elasticsearch.xpack.ml.job.process.autodetect.params.AutodetectParams; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshot; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.Quantiles; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.params.AutodetectParams; -import java.util.Set; import java.util.concurrent.ExecutorService; /** diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectProcessManager.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectProcessManager.java index fecc3448715..59c88093f2d 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectProcessManager.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectProcessManager.java @@ -24,37 +24,37 @@ import org.elasticsearch.env.Environment; import org.elasticsearch.index.analysis.AnalysisRegistry; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.threadpool.ThreadPool; +import org.elasticsearch.xpack.core.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.calendars.ScheduledEvent; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.JobState; +import org.elasticsearch.xpack.core.ml.job.config.JobTaskStatus; +import org.elasticsearch.xpack.core.ml.job.persistence.JobProvider; +import org.elasticsearch.xpack.core.ml.job.persistence.ScheduledEventsQueryBuilder; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.output.FlushAcknowledgement; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.params.AutodetectParams; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.DataCounts; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSizeStats; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshot; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData.PersistentTask; import org.elasticsearch.xpack.ml.MachineLearning; import org.elasticsearch.xpack.ml.action.TransportOpenJobAction.JobTask; -import org.elasticsearch.xpack.ml.action.util.QueryPage; -import org.elasticsearch.xpack.ml.calendars.ScheduledEvent; import org.elasticsearch.xpack.ml.job.JobManager; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.config.JobState; -import org.elasticsearch.xpack.ml.job.config.JobTaskStatus; import org.elasticsearch.xpack.ml.job.persistence.JobDataCountsPersister; -import org.elasticsearch.xpack.ml.job.persistence.JobProvider; import org.elasticsearch.xpack.ml.job.persistence.JobRenormalizedResultsPersister; import org.elasticsearch.xpack.ml.job.persistence.JobResultsPersister; -import org.elasticsearch.xpack.ml.job.persistence.ScheduledEventsQueryBuilder; import org.elasticsearch.xpack.ml.job.persistence.StateStreamer; import org.elasticsearch.xpack.ml.job.process.DataCountsReporter; import org.elasticsearch.xpack.ml.job.process.autodetect.output.AutoDetectResultProcessor; -import org.elasticsearch.xpack.ml.job.process.autodetect.output.FlushAcknowledgement; -import org.elasticsearch.xpack.ml.job.process.autodetect.params.AutodetectParams; import org.elasticsearch.xpack.ml.job.process.autodetect.params.DataLoadParams; import org.elasticsearch.xpack.ml.job.process.autodetect.params.FlushJobParams; import org.elasticsearch.xpack.ml.job.process.autodetect.params.ForecastParams; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.DataCounts; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSizeStats; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshot; import org.elasticsearch.xpack.ml.job.process.normalizer.NormalizerFactory; import org.elasticsearch.xpack.ml.job.process.normalizer.Renormalizer; import org.elasticsearch.xpack.ml.job.process.normalizer.ScoresUpdater; import org.elasticsearch.xpack.ml.job.process.normalizer.ShortCircuitingRenormalizer; import org.elasticsearch.xpack.ml.notifications.Auditor; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData.PersistentTask; import java.io.IOException; import java.io.InputStream; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/BlackHoleAutodetectProcess.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/BlackHoleAutodetectProcess.java index 3de56d0b169..b4dd5aa0cb5 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/BlackHoleAutodetectProcess.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/BlackHoleAutodetectProcess.java @@ -6,17 +6,17 @@ package org.elasticsearch.xpack.ml.job.process.autodetect; import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.xpack.ml.calendars.ScheduledEvent; -import org.elasticsearch.xpack.ml.job.config.DetectionRule; -import org.elasticsearch.xpack.ml.job.config.MlFilter; -import org.elasticsearch.xpack.ml.job.config.ModelPlotConfig; +import org.elasticsearch.xpack.core.ml.calendars.ScheduledEvent; +import org.elasticsearch.xpack.core.ml.job.config.DetectionRule; +import org.elasticsearch.xpack.core.ml.job.config.MlFilter; +import org.elasticsearch.xpack.core.ml.job.config.ModelPlotConfig; import org.elasticsearch.xpack.ml.job.persistence.StateStreamer; -import org.elasticsearch.xpack.ml.job.process.autodetect.output.FlushAcknowledgement; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.output.FlushAcknowledgement; import org.elasticsearch.xpack.ml.job.process.autodetect.params.DataLoadParams; import org.elasticsearch.xpack.ml.job.process.autodetect.params.FlushJobParams; import org.elasticsearch.xpack.ml.job.process.autodetect.params.ForecastParams; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshot; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.Quantiles; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshot; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.Quantiles; import org.elasticsearch.xpack.ml.job.results.AutodetectResult; import java.io.IOException; @@ -31,7 +31,7 @@ import java.util.concurrent.TimeUnit; /** * A placeholder class simulating the actions of the native Autodetect process. * Most methods consume data without performing any action however, after a call to - * {@link #flushJob(FlushJobParams)} a {@link org.elasticsearch.xpack.ml.job.process.autodetect.output.FlushAcknowledgement} + * {@link #flushJob(FlushJobParams)} a {@link FlushAcknowledgement} * message is expected on the {@link #readAutodetectResults()} ()} stream. This class writes the flush * acknowledgement immediately. */ diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/NativeAutodetectProcess.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/NativeAutodetectProcess.java index 88aa050a5ea..193ecda2826 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/NativeAutodetectProcess.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/NativeAutodetectProcess.java @@ -9,11 +9,11 @@ import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.message.ParameterizedMessage; import org.elasticsearch.common.logging.Loggers; import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.xpack.ml.MachineLearningField; -import org.elasticsearch.xpack.ml.calendars.ScheduledEvent; -import org.elasticsearch.xpack.ml.job.config.DetectionRule; -import org.elasticsearch.xpack.ml.job.config.MlFilter; -import org.elasticsearch.xpack.ml.job.config.ModelPlotConfig; +import org.elasticsearch.xpack.core.ml.MachineLearningField; +import org.elasticsearch.xpack.core.ml.calendars.ScheduledEvent; +import org.elasticsearch.xpack.core.ml.job.config.DetectionRule; +import org.elasticsearch.xpack.core.ml.job.config.MlFilter; +import org.elasticsearch.xpack.core.ml.job.config.ModelPlotConfig; import org.elasticsearch.xpack.ml.job.persistence.StateStreamer; import org.elasticsearch.xpack.ml.job.process.NativeControllerHolder; import org.elasticsearch.xpack.ml.job.process.autodetect.output.AutodetectResultsParser; @@ -21,12 +21,12 @@ import org.elasticsearch.xpack.ml.job.process.autodetect.output.StateProcessor; import org.elasticsearch.xpack.ml.job.process.autodetect.params.DataLoadParams; import org.elasticsearch.xpack.ml.job.process.autodetect.params.FlushJobParams; import org.elasticsearch.xpack.ml.job.process.autodetect.params.ForecastParams; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshot; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshot; import org.elasticsearch.xpack.ml.job.process.autodetect.writer.ControlMsgToProcessWriter; import org.elasticsearch.xpack.ml.job.process.autodetect.writer.LengthEncodedWriter; import org.elasticsearch.xpack.ml.job.process.logging.CppLogMessageHandler; import org.elasticsearch.xpack.ml.job.results.AutodetectResult; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import java.io.BufferedOutputStream; import java.io.IOException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/NativeAutodetectProcessFactory.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/NativeAutodetectProcessFactory.java index 50e9f4e1b62..1f869a184ad 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/NativeAutodetectProcessFactory.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/NativeAutodetectProcessFactory.java @@ -13,14 +13,14 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.concurrent.EsRejectedExecutionException; import org.elasticsearch.env.Environment; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.Job; import org.elasticsearch.xpack.ml.job.process.NativeController; import org.elasticsearch.xpack.ml.job.process.ProcessCtrl; import org.elasticsearch.xpack.ml.job.process.ProcessPipes; import org.elasticsearch.xpack.ml.job.process.autodetect.output.AutodetectResultsParser; import org.elasticsearch.xpack.ml.job.process.autodetect.output.StateProcessor; -import org.elasticsearch.xpack.ml.job.process.autodetect.params.AutodetectParams; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.params.AutodetectParams; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import org.elasticsearch.xpack.ml.utils.NamedPipeHelper; import java.io.IOException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/ProcessContext.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/ProcessContext.java index a8fa7eb7d85..474968adc93 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/ProcessContext.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/ProcessContext.java @@ -8,9 +8,9 @@ package org.elasticsearch.xpack.ml.job.process.autodetect; import org.apache.logging.log4j.Logger; import org.elasticsearch.ElasticsearchException; import org.elasticsearch.common.logging.Loggers; -import org.elasticsearch.xpack.ml.MachineLearningField; +import org.elasticsearch.xpack.core.ml.MachineLearningField; import org.elasticsearch.xpack.ml.action.TransportOpenJobAction.JobTask; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import java.io.IOException; import java.util.concurrent.TimeUnit; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/UpdateParams.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/UpdateParams.java index d6f65ea4e11..ac41dcccbcf 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/UpdateParams.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/UpdateParams.java @@ -6,9 +6,9 @@ package org.elasticsearch.xpack.ml.job.process.autodetect; import org.elasticsearch.common.Nullable; -import org.elasticsearch.xpack.ml.job.config.JobUpdate; -import org.elasticsearch.xpack.ml.job.config.MlFilter; -import org.elasticsearch.xpack.ml.job.config.ModelPlotConfig; +import org.elasticsearch.xpack.core.ml.job.config.JobUpdate; +import org.elasticsearch.xpack.core.ml.job.config.MlFilter; +import org.elasticsearch.xpack.core.ml.job.config.ModelPlotConfig; import java.util.List; import java.util.Objects; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/AutoDetectResultProcessor.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/AutoDetectResultProcessor.java index ebbd4aa430d..7113ca19d80 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/AutoDetectResultProcessor.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/AutoDetectResultProcessor.java @@ -12,25 +12,26 @@ import org.elasticsearch.action.support.WriteRequest; import org.elasticsearch.client.Client; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.logging.Loggers; -import org.elasticsearch.xpack.ml.MachineLearningField; -import org.elasticsearch.xpack.ml.action.PutJobAction; -import org.elasticsearch.xpack.ml.action.UpdateJobAction; -import org.elasticsearch.xpack.ml.job.config.JobUpdate; -import org.elasticsearch.xpack.ml.job.persistence.JobProvider; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.output.FlushAcknowledgement; +import org.elasticsearch.xpack.core.ml.MachineLearningField; +import org.elasticsearch.xpack.core.ml.action.PutJobAction; +import org.elasticsearch.xpack.core.ml.action.UpdateJobAction; +import org.elasticsearch.xpack.core.ml.job.config.JobUpdate; +import org.elasticsearch.xpack.core.ml.job.persistence.JobProvider; import org.elasticsearch.xpack.ml.job.persistence.JobResultsPersister; import org.elasticsearch.xpack.ml.job.process.autodetect.AutodetectProcess; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSizeStats; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshot; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.Quantiles; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSizeStats; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshot; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.Quantiles; import org.elasticsearch.xpack.ml.job.process.normalizer.Renormalizer; -import org.elasticsearch.xpack.ml.job.results.AnomalyRecord; +import org.elasticsearch.xpack.core.ml.job.results.AnomalyRecord; import org.elasticsearch.xpack.ml.job.results.AutodetectResult; -import org.elasticsearch.xpack.ml.job.results.Bucket; -import org.elasticsearch.xpack.ml.job.results.CategoryDefinition; -import org.elasticsearch.xpack.ml.job.results.Forecast; -import org.elasticsearch.xpack.ml.job.results.ForecastRequestStats; -import org.elasticsearch.xpack.ml.job.results.Influencer; -import org.elasticsearch.xpack.ml.job.results.ModelPlot; +import org.elasticsearch.xpack.core.ml.job.results.Bucket; +import org.elasticsearch.xpack.core.ml.job.results.CategoryDefinition; +import org.elasticsearch.xpack.core.ml.job.results.Forecast; +import org.elasticsearch.xpack.core.ml.job.results.ForecastRequestStats; +import org.elasticsearch.xpack.core.ml.job.results.Influencer; +import org.elasticsearch.xpack.core.ml.job.results.ModelPlot; import java.time.Duration; import java.util.Date; @@ -42,8 +43,8 @@ import java.util.concurrent.Semaphore; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; -import static org.elasticsearch.xpack.ClientHelper.ML_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.executeAsyncWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.ML_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin; /** * A runnable class that reads the autodetect process output in the diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/FlushListener.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/FlushListener.java index b9250190ee5..66b43b5e36f 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/FlushListener.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/FlushListener.java @@ -6,6 +6,7 @@ package org.elasticsearch.xpack.ml.job.process.autodetect.output; import org.elasticsearch.common.Nullable; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.output.FlushAcknowledgement; import java.time.Duration; import java.util.Iterator; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/StateProcessor.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/StateProcessor.java index 65902d22a42..75b7ea1e593 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/StateProcessor.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/StateProcessor.java @@ -14,16 +14,16 @@ import org.elasticsearch.common.component.AbstractComponent; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.xpack.ml.job.persistence.AnomalyDetectorsIndex; -import org.elasticsearch.xpack.ml.job.persistence.ElasticsearchMappings; +import org.elasticsearch.xpack.core.ml.job.persistence.AnomalyDetectorsIndex; +import org.elasticsearch.xpack.core.ml.job.persistence.ElasticsearchMappings; import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; import java.util.List; -import static org.elasticsearch.xpack.ClientHelper.ML_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.stashWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.ML_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.stashWithOrigin; /** * Reads the autodetect state and persists via a bulk request diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/DataLoadParams.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/DataLoadParams.java index a63f140f904..87184c7426c 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/DataLoadParams.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/DataLoadParams.java @@ -5,7 +5,7 @@ */ package org.elasticsearch.xpack.ml.job.process.autodetect.params; -import org.elasticsearch.xpack.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; import java.util.Objects; import java.util.Optional; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/FlushJobParams.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/FlushJobParams.java index e4572af77f4..fd813e27fda 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/FlushJobParams.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/FlushJobParams.java @@ -7,9 +7,9 @@ package org.elasticsearch.xpack.ml.job.process.autodetect.params; import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.common.Strings; -import org.elasticsearch.xpack.ml.job.messages.Messages; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; -import org.elasticsearch.xpack.ml.utils.time.TimeUtils; +import org.elasticsearch.xpack.core.ml.job.messages.Messages; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.utils.time.TimeUtils; import java.util.Objects; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/TimeRange.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/TimeRange.java index 84c5be5fe48..a14d810d0d2 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/TimeRange.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/TimeRange.java @@ -7,9 +7,9 @@ package org.elasticsearch.xpack.ml.job.process.autodetect.params; import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.ElasticsearchStatusException; -import org.elasticsearch.xpack.ml.job.messages.Messages; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; -import org.elasticsearch.xpack.ml.utils.time.TimeUtils; +import org.elasticsearch.xpack.core.ml.job.messages.Messages; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.utils.time.TimeUtils; import java.util.Objects; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/AbstractDataToProcessWriter.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/AbstractDataToProcessWriter.java index 5bed84f26d1..7961fec4497 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/AbstractDataToProcessWriter.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/AbstractDataToProcessWriter.java @@ -8,8 +8,8 @@ package org.elasticsearch.xpack.ml.job.process.autodetect.writer; import org.apache.logging.log4j.Logger; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.xpack.ml.job.categorization.CategorizationAnalyzer; -import org.elasticsearch.xpack.ml.job.config.AnalysisConfig; -import org.elasticsearch.xpack.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; import org.elasticsearch.xpack.ml.job.process.DataCountsReporter; import org.elasticsearch.xpack.ml.job.process.autodetect.AutodetectProcess; import org.supercsv.encoder.CsvEncoder; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/AnalysisLimitsWriter.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/AnalysisLimitsWriter.java index 021eb0baa57..e5efc5b772c 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/AnalysisLimitsWriter.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/AnalysisLimitsWriter.java @@ -5,7 +5,7 @@ */ package org.elasticsearch.xpack.ml.job.process.autodetect.writer; -import org.elasticsearch.xpack.ml.job.config.AnalysisLimits; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisLimits; import java.io.IOException; import java.io.OutputStreamWriter; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/ControlMsgToProcessWriter.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/ControlMsgToProcessWriter.java index 7255de3bb17..9bea189a0e8 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/ControlMsgToProcessWriter.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/ControlMsgToProcessWriter.java @@ -10,10 +10,10 @@ import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.common.xcontent.json.JsonXContent; -import org.elasticsearch.xpack.ml.calendars.ScheduledEvent; -import org.elasticsearch.xpack.ml.job.config.DetectionRule; -import org.elasticsearch.xpack.ml.job.config.MlFilter; -import org.elasticsearch.xpack.ml.job.config.ModelPlotConfig; +import org.elasticsearch.xpack.core.ml.calendars.ScheduledEvent; +import org.elasticsearch.xpack.core.ml.job.config.DetectionRule; +import org.elasticsearch.xpack.core.ml.job.config.MlFilter; +import org.elasticsearch.xpack.core.ml.job.config.ModelPlotConfig; import org.elasticsearch.xpack.ml.job.process.autodetect.params.DataLoadParams; import org.elasticsearch.xpack.ml.job.process.autodetect.params.FlushJobParams; import org.elasticsearch.xpack.ml.job.process.autodetect.params.ForecastParams; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/CsvDataToProcessWriter.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/CsvDataToProcessWriter.java index c3272d3e84d..e99628a8f0e 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/CsvDataToProcessWriter.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/CsvDataToProcessWriter.java @@ -10,11 +10,11 @@ import org.elasticsearch.action.ActionListener; import org.elasticsearch.common.logging.Loggers; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.xpack.ml.job.categorization.CategorizationAnalyzer; -import org.elasticsearch.xpack.ml.job.config.AnalysisConfig; -import org.elasticsearch.xpack.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; import org.elasticsearch.xpack.ml.job.process.DataCountsReporter; import org.elasticsearch.xpack.ml.job.process.autodetect.AutodetectProcess; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.DataCounts; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.DataCounts; import org.supercsv.io.CsvListReader; import org.supercsv.prefs.CsvPreference; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/CsvRecordWriter.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/CsvRecordWriter.java index 07b47e1804a..2228835bea2 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/CsvRecordWriter.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/CsvRecordWriter.java @@ -5,6 +5,7 @@ */ package org.elasticsearch.xpack.ml.job.process.autodetect.writer; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.writer.RecordWriter; import org.supercsv.io.CsvListWriter; import org.supercsv.prefs.CsvPreference; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DataToProcessWriter.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DataToProcessWriter.java index 8e15376ea3e..8f0d59c58fd 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DataToProcessWriter.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DataToProcessWriter.java @@ -7,7 +7,7 @@ package org.elasticsearch.xpack.ml.job.process.autodetect.writer; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.xpack.ml.job.categorization.CategorizationAnalyzer; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.DataCounts; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.DataCounts; import java.io.IOException; import java.io.InputStream; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DataToProcessWriterFactory.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DataToProcessWriterFactory.java index b26c3a56a2a..f50f47aac49 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DataToProcessWriterFactory.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DataToProcessWriterFactory.java @@ -6,8 +6,8 @@ package org.elasticsearch.xpack.ml.job.process.autodetect.writer; import org.elasticsearch.common.xcontent.NamedXContentRegistry; -import org.elasticsearch.xpack.ml.job.config.AnalysisConfig; -import org.elasticsearch.xpack.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; import org.elasticsearch.xpack.ml.job.process.DataCountsReporter; import org.elasticsearch.xpack.ml.job.process.autodetect.AutodetectProcess; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DateFormatDateTransformer.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DateFormatDateTransformer.java index 74c257224d2..ae36d1215e9 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DateFormatDateTransformer.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DateFormatDateTransformer.java @@ -5,8 +5,8 @@ */ package org.elasticsearch.xpack.ml.job.process.autodetect.writer; -import org.elasticsearch.xpack.ml.utils.time.DateTimeFormatterTimestampConverter; -import org.elasticsearch.xpack.ml.utils.time.TimestampConverter; +import org.elasticsearch.xpack.core.ml.utils.time.DateTimeFormatterTimestampConverter; +import org.elasticsearch.xpack.core.ml.utils.time.TimestampConverter; import java.time.ZoneOffset; import java.time.format.DateTimeParseException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/FieldConfigWriter.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/FieldConfigWriter.java index 88b842d2ba5..f495693f0dd 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/FieldConfigWriter.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/FieldConfigWriter.java @@ -11,13 +11,13 @@ import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.calendars.ScheduledEvent; -import org.elasticsearch.xpack.ml.job.config.AnalysisConfig; -import org.elasticsearch.xpack.ml.job.config.DefaultDetectorDescription; -import org.elasticsearch.xpack.ml.job.config.DetectionRule; -import org.elasticsearch.xpack.ml.job.config.Detector; -import org.elasticsearch.xpack.ml.job.config.MlFilter; -import org.elasticsearch.xpack.ml.utils.MlStrings; +import org.elasticsearch.xpack.core.ml.calendars.ScheduledEvent; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig; +import org.elasticsearch.xpack.core.ml.job.config.DefaultDetectorDescription; +import org.elasticsearch.xpack.core.ml.job.config.DetectionRule; +import org.elasticsearch.xpack.core.ml.job.config.Detector; +import org.elasticsearch.xpack.core.ml.job.config.MlFilter; +import org.elasticsearch.xpack.core.ml.utils.MlStrings; import java.io.IOException; import java.io.OutputStreamWriter; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/JsonDataToProcessWriter.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/JsonDataToProcessWriter.java index d0421275f0b..eae7385269e 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/JsonDataToProcessWriter.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/JsonDataToProcessWriter.java @@ -13,11 +13,11 @@ import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.xpack.ml.job.categorization.CategorizationAnalyzer; -import org.elasticsearch.xpack.ml.job.config.AnalysisConfig; -import org.elasticsearch.xpack.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; import org.elasticsearch.xpack.ml.job.process.DataCountsReporter; import org.elasticsearch.xpack.ml.job.process.autodetect.AutodetectProcess; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.DataCounts; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.DataCounts; import java.io.IOException; import java.io.InputStream; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/LengthEncodedWriter.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/LengthEncodedWriter.java index bf380cc713b..34f9d8dc469 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/LengthEncodedWriter.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/LengthEncodedWriter.java @@ -5,6 +5,8 @@ */ package org.elasticsearch.xpack.ml.job.process.autodetect.writer; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.writer.RecordWriter; + import java.io.IOException; import java.io.OutputStream; import java.nio.ByteBuffer; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/MlFilterWriter.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/MlFilterWriter.java index 9e8c8452cab..d832c197e0e 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/MlFilterWriter.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/MlFilterWriter.java @@ -5,7 +5,7 @@ */ package org.elasticsearch.xpack.ml.job.process.autodetect.writer; -import org.elasticsearch.xpack.ml.job.config.MlFilter; +import org.elasticsearch.xpack.core.ml.job.config.MlFilter; import java.io.IOException; import java.util.Collection; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/ModelPlotConfigWriter.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/ModelPlotConfigWriter.java index 4fb8fedbd44..7b7e51f3bb2 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/ModelPlotConfigWriter.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/ModelPlotConfigWriter.java @@ -5,7 +5,7 @@ */ package org.elasticsearch.xpack.ml.job.process.autodetect.writer; -import org.elasticsearch.xpack.ml.job.config.ModelPlotConfig; +import org.elasticsearch.xpack.core.ml.job.config.ModelPlotConfig; import java.io.IOException; import java.io.Writer; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/ScheduledEventsWriter.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/ScheduledEventsWriter.java index 229252abd8f..6f45a0a814b 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/ScheduledEventsWriter.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/ScheduledEventsWriter.java @@ -8,7 +8,7 @@ package org.elasticsearch.xpack.ml.job.process.autodetect.writer; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.xpack.ml.calendars.ScheduledEvent; +import org.elasticsearch.xpack.core.ml.calendars.ScheduledEvent; import java.io.IOException; import java.util.Collection; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/BucketInfluencerNormalizable.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/BucketInfluencerNormalizable.java index af570970095..e55e5ac0346 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/BucketInfluencerNormalizable.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/BucketInfluencerNormalizable.java @@ -6,7 +6,7 @@ package org.elasticsearch.xpack.ml.job.process.normalizer; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.ml.job.results.BucketInfluencer; +import org.elasticsearch.xpack.core.ml.job.results.BucketInfluencer; import java.io.IOException; import java.util.Objects; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/BucketNormalizable.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/BucketNormalizable.java index 51af9fb209c..1ba2e770408 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/BucketNormalizable.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/BucketNormalizable.java @@ -6,7 +6,7 @@ package org.elasticsearch.xpack.ml.job.process.normalizer; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.ml.job.results.Bucket; +import org.elasticsearch.xpack.core.ml.job.results.Bucket; import java.io.IOException; import java.util.ArrayList; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/InfluencerNormalizable.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/InfluencerNormalizable.java index baaf1fb5853..74cb86a3fdf 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/InfluencerNormalizable.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/InfluencerNormalizable.java @@ -6,7 +6,7 @@ package org.elasticsearch.xpack.ml.job.process.normalizer; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.ml.job.results.Influencer; +import org.elasticsearch.xpack.core.ml.job.results.Influencer; import java.io.IOException; import java.util.Objects; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/NativeNormalizerProcess.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/NativeNormalizerProcess.java index f4a14495258..ee6c7818b38 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/NativeNormalizerProcess.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/NativeNormalizerProcess.java @@ -13,7 +13,7 @@ import org.elasticsearch.common.util.concurrent.EsRejectedExecutionException; import org.elasticsearch.xpack.ml.job.process.autodetect.writer.LengthEncodedWriter; import org.elasticsearch.xpack.ml.job.process.logging.CppLogMessageHandler; import org.elasticsearch.xpack.ml.job.process.normalizer.output.NormalizerResultHandler; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import java.io.BufferedOutputStream; import java.io.IOException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/NativeNormalizerProcessFactory.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/NativeNormalizerProcessFactory.java index 8d68b305f02..1125581d041 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/NativeNormalizerProcessFactory.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/NativeNormalizerProcessFactory.java @@ -12,7 +12,7 @@ import org.elasticsearch.env.Environment; import org.elasticsearch.xpack.ml.job.process.NativeController; import org.elasticsearch.xpack.ml.job.process.ProcessCtrl; import org.elasticsearch.xpack.ml.job.process.ProcessPipes; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import org.elasticsearch.xpack.ml.utils.NamedPipeHelper; import java.io.IOException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/PartitionScoreNormalizable.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/PartitionScoreNormalizable.java index f8a929f9026..4d5d91aa12f 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/PartitionScoreNormalizable.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/PartitionScoreNormalizable.java @@ -6,7 +6,7 @@ package org.elasticsearch.xpack.ml.job.process.normalizer; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.ml.job.results.PartitionScore; +import org.elasticsearch.xpack.core.ml.job.results.PartitionScore; import java.io.IOException; import java.util.Objects; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/RecordNormalizable.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/RecordNormalizable.java index e43f75671f1..97114130c84 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/RecordNormalizable.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/RecordNormalizable.java @@ -6,7 +6,7 @@ package org.elasticsearch.xpack.ml.job.process.normalizer; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.ml.job.results.AnomalyRecord; +import org.elasticsearch.xpack.core.ml.job.results.AnomalyRecord; import java.io.IOException; import java.util.Objects; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/Renormalizer.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/Renormalizer.java index f8d7854c434..d702872f2ac 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/Renormalizer.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/Renormalizer.java @@ -5,7 +5,7 @@ */ package org.elasticsearch.xpack.ml.job.process.normalizer; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.Quantiles; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.Quantiles; public interface Renormalizer { diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/ScoresUpdater.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/ScoresUpdater.java index 7d689046209..39c38d9ba27 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/ScoresUpdater.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/ScoresUpdater.java @@ -7,14 +7,14 @@ package org.elasticsearch.xpack.ml.job.process.normalizer; import org.apache.logging.log4j.Logger; import org.elasticsearch.common.logging.Loggers; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.persistence.BatchedDocumentsIterator; -import org.elasticsearch.xpack.ml.job.persistence.JobProvider; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.persistence.BatchedDocumentsIterator; +import org.elasticsearch.xpack.core.ml.job.persistence.JobProvider; import org.elasticsearch.xpack.ml.job.persistence.JobRenormalizedResultsPersister; -import org.elasticsearch.xpack.ml.job.results.AnomalyRecord; -import org.elasticsearch.xpack.ml.job.results.Bucket; -import org.elasticsearch.xpack.ml.job.results.Influencer; -import org.elasticsearch.xpack.ml.job.results.Result; +import org.elasticsearch.xpack.core.ml.job.results.AnomalyRecord; +import org.elasticsearch.xpack.core.ml.job.results.Bucket; +import org.elasticsearch.xpack.core.ml.job.results.Influencer; +import org.elasticsearch.xpack.core.ml.job.results.Result; import java.util.ArrayList; import java.util.Deque; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/ShortCircuitingRenormalizer.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/ShortCircuitingRenormalizer.java index b11db903d6d..057ed18cd69 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/ShortCircuitingRenormalizer.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/ShortCircuitingRenormalizer.java @@ -7,7 +7,7 @@ package org.elasticsearch.xpack.ml.job.process.normalizer; import org.apache.logging.log4j.Logger; import org.elasticsearch.common.logging.Loggers; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.Quantiles; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.Quantiles; import java.util.Deque; import java.util.Objects; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/results/AutodetectResult.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/results/AutodetectResult.java index ed1f0ede7e8..5512cdd8281 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/results/AutodetectResult.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/results/AutodetectResult.java @@ -14,10 +14,17 @@ import org.elasticsearch.common.xcontent.ConstructingObjectParser; import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.ml.job.process.autodetect.output.FlushAcknowledgement; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSizeStats; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshot; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.Quantiles; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.output.FlushAcknowledgement; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSizeStats; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshot; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.Quantiles; +import org.elasticsearch.xpack.core.ml.job.results.AnomalyRecord; +import org.elasticsearch.xpack.core.ml.job.results.Bucket; +import org.elasticsearch.xpack.core.ml.job.results.CategoryDefinition; +import org.elasticsearch.xpack.core.ml.job.results.Forecast; +import org.elasticsearch.xpack.core.ml.job.results.ForecastRequestStats; +import org.elasticsearch.xpack.core.ml.job.results.Influencer; +import org.elasticsearch.xpack.core.ml.job.results.ModelPlot; import java.io.IOException; import java.util.List; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/retention/AbstractExpiredJobDataRemover.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/retention/AbstractExpiredJobDataRemover.java index 62486905b31..aa003d29559 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/retention/AbstractExpiredJobDataRemover.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/retention/AbstractExpiredJobDataRemover.java @@ -11,10 +11,10 @@ import org.elasticsearch.cluster.service.ClusterService; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.index.query.BoolQueryBuilder; import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.xpack.ml.MLMetadataField; -import org.elasticsearch.xpack.ml.MlMetadata; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.results.Result; +import org.elasticsearch.xpack.core.ml.MLMetadataField; +import org.elasticsearch.xpack.core.ml.MlMetadata; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.results.Result; import org.elasticsearch.xpack.ml.utils.VolatileCursorIterator; import org.joda.time.DateTime; import org.joda.time.chrono.ISOChronology; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/retention/ExpiredForecastsRemover.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/retention/ExpiredForecastsRemover.java index 21330c84575..2052a2023bb 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/retention/ExpiredForecastsRemover.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/retention/ExpiredForecastsRemover.java @@ -26,11 +26,11 @@ import org.elasticsearch.index.reindex.DeleteByQueryRequest; import org.elasticsearch.search.SearchHit; import org.elasticsearch.search.SearchHits; import org.elasticsearch.search.builder.SearchSourceBuilder; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.persistence.AnomalyDetectorsIndex; -import org.elasticsearch.xpack.ml.job.results.Forecast; -import org.elasticsearch.xpack.ml.job.results.ForecastRequestStats; -import org.elasticsearch.xpack.ml.job.results.Result; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.persistence.AnomalyDetectorsIndex; +import org.elasticsearch.xpack.core.ml.job.results.Forecast; +import org.elasticsearch.xpack.core.ml.job.results.ForecastRequestStats; +import org.elasticsearch.xpack.core.ml.job.results.Result; import org.joda.time.DateTime; import org.joda.time.chrono.ISOChronology; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/retention/ExpiredModelSnapshotsRemover.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/retention/ExpiredModelSnapshotsRemover.java index 52c13741e82..3b1105774ea 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/retention/ExpiredModelSnapshotsRemover.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/retention/ExpiredModelSnapshotsRemover.java @@ -18,11 +18,11 @@ import org.elasticsearch.index.query.QueryBuilder; import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.search.SearchHit; import org.elasticsearch.search.builder.SearchSourceBuilder; -import org.elasticsearch.xpack.ml.action.DeleteModelSnapshotAction; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.persistence.AnomalyDetectorsIndex; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshot; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshotField; +import org.elasticsearch.xpack.core.ml.action.DeleteModelSnapshotAction; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.persistence.AnomalyDetectorsIndex; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshot; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshotField; import java.util.ArrayList; import java.util.Iterator; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/retention/ExpiredResultsRemover.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/retention/ExpiredResultsRemover.java index e83adc109a4..3f0ca4558b5 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/retention/ExpiredResultsRemover.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/retention/ExpiredResultsRemover.java @@ -18,13 +18,13 @@ import org.elasticsearch.index.reindex.BulkByScrollResponse; import org.elasticsearch.index.reindex.DeleteByQueryAction; import org.elasticsearch.index.reindex.DeleteByQueryRequest; import org.elasticsearch.search.builder.SearchSourceBuilder; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.messages.Messages; -import org.elasticsearch.xpack.ml.job.persistence.AnomalyDetectorsIndex; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSizeStats; -import org.elasticsearch.xpack.ml.job.results.Forecast; -import org.elasticsearch.xpack.ml.job.results.ForecastRequestStats; -import org.elasticsearch.xpack.ml.job.results.Result; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.messages.Messages; +import org.elasticsearch.xpack.core.ml.job.persistence.AnomalyDetectorsIndex; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSizeStats; +import org.elasticsearch.xpack.core.ml.job.results.Forecast; +import org.elasticsearch.xpack.core.ml.job.results.ForecastRequestStats; +import org.elasticsearch.xpack.core.ml.job.results.Result; import org.elasticsearch.xpack.ml.notifications.Auditor; import java.time.Instant; @@ -33,8 +33,8 @@ import java.time.ZonedDateTime; import java.time.format.DateTimeFormatter; import java.util.Objects; -import static org.elasticsearch.xpack.ClientHelper.ML_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.executeAsyncWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.ML_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin; /** * Removes all results that have expired the configured retention time diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/notifications/Auditor.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/notifications/Auditor.java index 6b4b3df9126..483d5230acb 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/notifications/Auditor.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/notifications/Auditor.java @@ -16,13 +16,15 @@ import org.elasticsearch.common.logging.Loggers; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentBuilder; +import org.elasticsearch.xpack.core.ml.notifications.AuditMessage; +import org.elasticsearch.xpack.core.ml.notifications.AuditorField; import java.io.IOException; import java.util.Objects; import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.xpack.ClientHelper.ML_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.executeAsyncWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.ML_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin; public class Auditor { diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/RestDeleteExpiredDataAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/RestDeleteExpiredDataAction.java index d985b517ec7..3939efed540 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/RestDeleteExpiredDataAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/RestDeleteExpiredDataAction.java @@ -12,7 +12,7 @@ import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.RestToXContentListener; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.action.DeleteExpiredDataAction; +import org.elasticsearch.xpack.core.ml.action.DeleteExpiredDataAction; import java.io.IOException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/calendar/RestDeleteCalendarAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/calendar/RestDeleteCalendarAction.java index 6bad2ea8609..47e07ba7285 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/calendar/RestDeleteCalendarAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/calendar/RestDeleteCalendarAction.java @@ -12,8 +12,8 @@ import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.AcknowledgedRestListener; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.action.DeleteCalendarAction; -import org.elasticsearch.xpack.ml.calendars.Calendar; +import org.elasticsearch.xpack.core.ml.action.DeleteCalendarAction; +import org.elasticsearch.xpack.core.ml.calendars.Calendar; import java.io.IOException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/calendar/RestDeleteCalendarEventAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/calendar/RestDeleteCalendarEventAction.java index 291a5c39bd8..b751147f20e 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/calendar/RestDeleteCalendarEventAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/calendar/RestDeleteCalendarEventAction.java @@ -12,9 +12,9 @@ import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.AcknowledgedRestListener; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.action.DeleteCalendarEventAction; -import org.elasticsearch.xpack.ml.calendars.Calendar; -import org.elasticsearch.xpack.ml.calendars.ScheduledEvent; +import org.elasticsearch.xpack.core.ml.action.DeleteCalendarEventAction; +import org.elasticsearch.xpack.core.ml.calendars.Calendar; +import org.elasticsearch.xpack.core.ml.calendars.ScheduledEvent; import java.io.IOException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/calendar/RestDeleteCalendarJobAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/calendar/RestDeleteCalendarJobAction.java index 54dd6885018..6ed022d8c2f 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/calendar/RestDeleteCalendarJobAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/calendar/RestDeleteCalendarJobAction.java @@ -12,9 +12,9 @@ import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.RestToXContentListener; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.action.UpdateCalendarJobAction; -import org.elasticsearch.xpack.ml.calendars.Calendar; -import org.elasticsearch.xpack.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.action.UpdateCalendarJobAction; +import org.elasticsearch.xpack.core.ml.calendars.Calendar; +import org.elasticsearch.xpack.core.ml.job.config.Job; import java.io.IOException; import java.util.Collections; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/calendar/RestGetCalendarEventsAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/calendar/RestGetCalendarEventsAction.java index d57760c83dd..185164ad094 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/calendar/RestGetCalendarEventsAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/calendar/RestGetCalendarEventsAction.java @@ -13,10 +13,10 @@ import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.RestToXContentListener; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.action.GetCalendarEventsAction; -import org.elasticsearch.xpack.ml.action.util.PageParams; -import org.elasticsearch.xpack.ml.calendars.Calendar; -import org.elasticsearch.xpack.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.action.GetCalendarEventsAction; +import org.elasticsearch.xpack.core.ml.action.util.PageParams; +import org.elasticsearch.xpack.core.ml.calendars.Calendar; +import org.elasticsearch.xpack.core.ml.job.config.Job; import java.io.IOException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/calendar/RestGetCalendarsAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/calendar/RestGetCalendarsAction.java index 10d8fc17404..80fb6b02eb7 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/calendar/RestGetCalendarsAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/calendar/RestGetCalendarsAction.java @@ -14,9 +14,9 @@ import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.RestStatusToXContentListener; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.action.GetCalendarsAction; -import org.elasticsearch.xpack.ml.action.util.PageParams; -import org.elasticsearch.xpack.ml.calendars.Calendar; +import org.elasticsearch.xpack.core.ml.action.GetCalendarsAction; +import org.elasticsearch.xpack.core.ml.action.util.PageParams; +import org.elasticsearch.xpack.core.ml.calendars.Calendar; import java.io.IOException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/calendar/RestPostCalendarEventAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/calendar/RestPostCalendarEventAction.java index 3a8afcd6a6d..5d0b8aa7f3d 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/calendar/RestPostCalendarEventAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/calendar/RestPostCalendarEventAction.java @@ -13,8 +13,8 @@ import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.RestToXContentListener; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.action.PostCalendarEventsAction; -import org.elasticsearch.xpack.ml.calendars.Calendar; +import org.elasticsearch.xpack.core.ml.action.PostCalendarEventsAction; +import org.elasticsearch.xpack.core.ml.calendars.Calendar; import java.io.IOException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/calendar/RestPutCalendarAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/calendar/RestPutCalendarAction.java index 5d1043417bf..4e86770fa92 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/calendar/RestPutCalendarAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/calendar/RestPutCalendarAction.java @@ -13,8 +13,8 @@ import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.RestToXContentListener; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.action.PutCalendarAction; -import org.elasticsearch.xpack.ml.calendars.Calendar; +import org.elasticsearch.xpack.core.ml.action.PutCalendarAction; +import org.elasticsearch.xpack.core.ml.calendars.Calendar; import java.io.IOException; import java.util.Collections; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/calendar/RestPutCalendarJobAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/calendar/RestPutCalendarJobAction.java index adc9da8876c..ce595e3e4e4 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/calendar/RestPutCalendarJobAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/calendar/RestPutCalendarJobAction.java @@ -12,9 +12,9 @@ import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.RestToXContentListener; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.action.UpdateCalendarJobAction; -import org.elasticsearch.xpack.ml.calendars.Calendar; -import org.elasticsearch.xpack.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.action.UpdateCalendarJobAction; +import org.elasticsearch.xpack.core.ml.calendars.Calendar; +import org.elasticsearch.xpack.core.ml.job.config.Job; import java.io.IOException; import java.util.Collections; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestDeleteDatafeedAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestDeleteDatafeedAction.java index 6e847af0886..700d6bf5d3b 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestDeleteDatafeedAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestDeleteDatafeedAction.java @@ -12,9 +12,9 @@ import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.AcknowledgedRestListener; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.action.CloseJobAction; -import org.elasticsearch.xpack.ml.action.DeleteDatafeedAction; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.action.CloseJobAction; +import org.elasticsearch.xpack.core.ml.action.DeleteDatafeedAction; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; import java.io.IOException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestGetDatafeedStatsAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestGetDatafeedStatsAction.java index 8a57a5455b7..0ec179be42f 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestGetDatafeedStatsAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestGetDatafeedStatsAction.java @@ -13,8 +13,8 @@ import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.RestToXContentListener; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.action.GetDatafeedsStatsAction; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.action.GetDatafeedsStatsAction; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; import java.io.IOException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestGetDatafeedsAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestGetDatafeedsAction.java index 0939df1d756..354731d21c6 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestGetDatafeedsAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestGetDatafeedsAction.java @@ -12,8 +12,8 @@ import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.RestToXContentListener; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.action.GetDatafeedsAction; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.action.GetDatafeedsAction; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; import java.io.IOException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestPreviewDatafeedAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestPreviewDatafeedAction.java index aaba03ff449..8436d257ce8 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestPreviewDatafeedAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestPreviewDatafeedAction.java @@ -12,8 +12,8 @@ import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.RestToXContentListener; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.action.PreviewDatafeedAction; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.action.PreviewDatafeedAction; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; import java.io.IOException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestPutDatafeedAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestPutDatafeedAction.java index e4032da3c35..1bc8da7b57e 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestPutDatafeedAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestPutDatafeedAction.java @@ -13,8 +13,8 @@ import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.RestToXContentListener; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.action.PutDatafeedAction; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.action.PutDatafeedAction; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; import java.io.IOException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestStartDatafeedAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestStartDatafeedAction.java index 08feeb43389..cb4cab14dda 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestStartDatafeedAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestStartDatafeedAction.java @@ -18,8 +18,8 @@ import org.elasticsearch.rest.RestResponse; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.rest.action.RestBuilderListener; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.action.StartDatafeedAction; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.action.StartDatafeedAction; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; import java.io.IOException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestStopDatafeedAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestStopDatafeedAction.java index 37fc430ad94..5015df58e79 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestStopDatafeedAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestStopDatafeedAction.java @@ -18,9 +18,9 @@ import org.elasticsearch.rest.RestResponse; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.rest.action.RestBuilderListener; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.action.StopDatafeedAction; -import org.elasticsearch.xpack.ml.action.StopDatafeedAction.Response; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.action.StopDatafeedAction; +import org.elasticsearch.xpack.core.ml.action.StopDatafeedAction.Response; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; import java.io.IOException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestUpdateDatafeedAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestUpdateDatafeedAction.java index 7c36ae1dd62..ae44f18e5d1 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestUpdateDatafeedAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestUpdateDatafeedAction.java @@ -13,8 +13,8 @@ import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.RestToXContentListener; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.action.UpdateDatafeedAction; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.action.UpdateDatafeedAction; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; import java.io.IOException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/filter/RestDeleteFilterAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/filter/RestDeleteFilterAction.java index bbdcdc7f15f..dec1fb39fa4 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/filter/RestDeleteFilterAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/filter/RestDeleteFilterAction.java @@ -12,8 +12,8 @@ import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.AcknowledgedRestListener; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.action.DeleteFilterAction; -import org.elasticsearch.xpack.ml.action.DeleteFilterAction.Request; +import org.elasticsearch.xpack.core.ml.action.DeleteFilterAction; +import org.elasticsearch.xpack.core.ml.action.DeleteFilterAction.Request; import java.io.IOException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/filter/RestGetFiltersAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/filter/RestGetFiltersAction.java index 1e6b76bdbd1..c62b3258e6d 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/filter/RestGetFiltersAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/filter/RestGetFiltersAction.java @@ -13,9 +13,9 @@ import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.RestStatusToXContentListener; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.action.GetFiltersAction; -import org.elasticsearch.xpack.ml.action.util.PageParams; -import org.elasticsearch.xpack.ml.job.config.MlFilter; +import org.elasticsearch.xpack.core.ml.action.GetFiltersAction; +import org.elasticsearch.xpack.core.ml.action.util.PageParams; +import org.elasticsearch.xpack.core.ml.job.config.MlFilter; import java.io.IOException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/filter/RestPutFilterAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/filter/RestPutFilterAction.java index b0230e09e0e..68a10d28875 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/filter/RestPutFilterAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/filter/RestPutFilterAction.java @@ -13,8 +13,8 @@ import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.AcknowledgedRestListener; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.action.PutFilterAction; -import org.elasticsearch.xpack.ml.job.config.MlFilter; +import org.elasticsearch.xpack.core.ml.action.PutFilterAction; +import org.elasticsearch.xpack.core.ml.job.config.MlFilter; import java.io.IOException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestCloseJobAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestCloseJobAction.java index f29e9f0305c..fc0638048ce 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestCloseJobAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestCloseJobAction.java @@ -13,9 +13,9 @@ import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.RestToXContentListener; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.action.CloseJobAction; -import org.elasticsearch.xpack.ml.action.CloseJobAction.Request; -import org.elasticsearch.xpack.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.action.CloseJobAction; +import org.elasticsearch.xpack.core.ml.action.CloseJobAction.Request; +import org.elasticsearch.xpack.core.ml.job.config.Job; import java.io.IOException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestDeleteJobAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestDeleteJobAction.java index 1f2e499fd46..9c2101135ad 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestDeleteJobAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestDeleteJobAction.java @@ -12,9 +12,9 @@ import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.AcknowledgedRestListener; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.action.CloseJobAction; -import org.elasticsearch.xpack.ml.action.DeleteJobAction; -import org.elasticsearch.xpack.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.action.CloseJobAction; +import org.elasticsearch.xpack.core.ml.action.DeleteJobAction; +import org.elasticsearch.xpack.core.ml.job.config.Job; import java.io.IOException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestFlushJobAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestFlushJobAction.java index f5169b01332..11c51fffb3c 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestFlushJobAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestFlushJobAction.java @@ -13,8 +13,8 @@ import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.RestToXContentListener; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.action.FlushJobAction; -import org.elasticsearch.xpack.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.action.FlushJobAction; +import org.elasticsearch.xpack.core.ml.job.config.Job; import java.io.IOException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestForecastJobAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestForecastJobAction.java index 9002f1db3d8..a67f9f31aae 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestForecastJobAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestForecastJobAction.java @@ -13,8 +13,8 @@ import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.RestToXContentListener; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.action.ForecastJobAction; -import org.elasticsearch.xpack.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.action.ForecastJobAction; +import org.elasticsearch.xpack.core.ml.job.config.Job; import java.io.IOException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestGetJobStatsAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestGetJobStatsAction.java index 603b6294015..b35629e72e7 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestGetJobStatsAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestGetJobStatsAction.java @@ -14,8 +14,8 @@ import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.RestToXContentListener; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.action.GetJobsStatsAction; -import org.elasticsearch.xpack.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.action.GetJobsStatsAction; +import org.elasticsearch.xpack.core.ml.job.config.Job; import java.io.IOException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestGetJobsAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestGetJobsAction.java index 121d8263a44..ed6f20d9899 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestGetJobsAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestGetJobsAction.java @@ -14,8 +14,8 @@ import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.RestToXContentListener; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.action.GetJobsAction; -import org.elasticsearch.xpack.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.action.GetJobsAction; +import org.elasticsearch.xpack.core.ml.job.config.Job; import java.io.IOException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestOpenJobAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestOpenJobAction.java index 6c050baa7d8..80e00eb1a47 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestOpenJobAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestOpenJobAction.java @@ -17,8 +17,8 @@ import org.elasticsearch.rest.RestResponse; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.rest.action.RestBuilderListener; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.action.OpenJobAction; -import org.elasticsearch.xpack.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.action.OpenJobAction; +import org.elasticsearch.xpack.core.ml.job.config.Job; import java.io.IOException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestPostDataAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestPostDataAction.java index 758fa8053fb..b7095c6fbfc 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestPostDataAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestPostDataAction.java @@ -12,8 +12,8 @@ import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.RestStatusToXContentListener; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.action.PostDataAction; -import org.elasticsearch.xpack.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.action.PostDataAction; +import org.elasticsearch.xpack.core.ml.job.config.Job; import java.io.IOException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestPostJobUpdateAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestPostJobUpdateAction.java index 9238110c720..f0937bdae58 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestPostJobUpdateAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestPostJobUpdateAction.java @@ -13,8 +13,8 @@ import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.RestToXContentListener; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.action.UpdateJobAction; -import org.elasticsearch.xpack.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.action.UpdateJobAction; +import org.elasticsearch.xpack.core.ml.job.config.Job; import java.io.IOException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestPutJobAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestPutJobAction.java index 85ed6b5c967..14b76bbe599 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestPutJobAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestPutJobAction.java @@ -13,8 +13,8 @@ import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.RestToXContentListener; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.action.PutJobAction; -import org.elasticsearch.xpack.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.action.PutJobAction; +import org.elasticsearch.xpack.core.ml.job.config.Job; import java.io.IOException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/modelsnapshots/RestDeleteModelSnapshotAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/modelsnapshots/RestDeleteModelSnapshotAction.java index 55dea1373fb..ebba31b1217 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/modelsnapshots/RestDeleteModelSnapshotAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/modelsnapshots/RestDeleteModelSnapshotAction.java @@ -12,9 +12,9 @@ import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.AcknowledgedRestListener; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.action.DeleteModelSnapshotAction; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshotField; +import org.elasticsearch.xpack.core.ml.action.DeleteModelSnapshotAction; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshotField; import java.io.IOException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/modelsnapshots/RestGetModelSnapshotsAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/modelsnapshots/RestGetModelSnapshotsAction.java index 6f0d528864f..ceeb55442e5 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/modelsnapshots/RestGetModelSnapshotsAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/modelsnapshots/RestGetModelSnapshotsAction.java @@ -13,10 +13,10 @@ import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.RestToXContentListener; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.action.GetModelSnapshotsAction; -import org.elasticsearch.xpack.ml.action.GetModelSnapshotsAction.Request; -import org.elasticsearch.xpack.ml.action.util.PageParams; -import org.elasticsearch.xpack.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.action.GetModelSnapshotsAction; +import org.elasticsearch.xpack.core.ml.action.GetModelSnapshotsAction.Request; +import org.elasticsearch.xpack.core.ml.action.util.PageParams; +import org.elasticsearch.xpack.core.ml.job.config.Job; import java.io.IOException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/modelsnapshots/RestRevertModelSnapshotAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/modelsnapshots/RestRevertModelSnapshotAction.java index 37867b8b290..3939991cf15 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/modelsnapshots/RestRevertModelSnapshotAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/modelsnapshots/RestRevertModelSnapshotAction.java @@ -13,8 +13,8 @@ import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.RestStatusToXContentListener; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.action.RevertModelSnapshotAction; -import org.elasticsearch.xpack.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.action.RevertModelSnapshotAction; +import org.elasticsearch.xpack.core.ml.job.config.Job; import java.io.IOException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/modelsnapshots/RestUpdateModelSnapshotAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/modelsnapshots/RestUpdateModelSnapshotAction.java index 6d61d50c473..b428f43b55e 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/modelsnapshots/RestUpdateModelSnapshotAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/modelsnapshots/RestUpdateModelSnapshotAction.java @@ -13,9 +13,9 @@ import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.RestStatusToXContentListener; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.action.UpdateModelSnapshotAction; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshotField; +import org.elasticsearch.xpack.core.ml.action.UpdateModelSnapshotAction; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshotField; import java.io.IOException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/results/RestGetBucketsAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/results/RestGetBucketsAction.java index b73a8bd0755..9783870acc4 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/results/RestGetBucketsAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/results/RestGetBucketsAction.java @@ -14,10 +14,10 @@ import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.RestToXContentListener; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.action.GetBucketsAction; -import org.elasticsearch.xpack.ml.action.util.PageParams; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.results.Result; +import org.elasticsearch.xpack.core.ml.action.GetBucketsAction; +import org.elasticsearch.xpack.core.ml.action.util.PageParams; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.results.Result; import java.io.IOException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/results/RestGetCategoriesAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/results/RestGetCategoriesAction.java index 8eed5fba7a1..e8a74575197 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/results/RestGetCategoriesAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/results/RestGetCategoriesAction.java @@ -13,10 +13,10 @@ import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.RestToXContentListener; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.action.GetCategoriesAction; -import org.elasticsearch.xpack.ml.action.GetCategoriesAction.Request; -import org.elasticsearch.xpack.ml.action.util.PageParams; -import org.elasticsearch.xpack.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.action.GetCategoriesAction; +import org.elasticsearch.xpack.core.ml.action.GetCategoriesAction.Request; +import org.elasticsearch.xpack.core.ml.action.util.PageParams; +import org.elasticsearch.xpack.core.ml.job.config.Job; import java.io.IOException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/results/RestGetInfluencersAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/results/RestGetInfluencersAction.java index d7ffbda1ea6..53794c7a45b 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/results/RestGetInfluencersAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/results/RestGetInfluencersAction.java @@ -13,9 +13,9 @@ import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.RestToXContentListener; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.action.GetInfluencersAction; -import org.elasticsearch.xpack.ml.action.util.PageParams; -import org.elasticsearch.xpack.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.action.GetInfluencersAction; +import org.elasticsearch.xpack.core.ml.action.util.PageParams; +import org.elasticsearch.xpack.core.ml.job.config.Job; import java.io.IOException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/results/RestGetOverallBucketsAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/results/RestGetOverallBucketsAction.java index 287d5ba1e6b..bf4121c3ec7 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/results/RestGetOverallBucketsAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/results/RestGetOverallBucketsAction.java @@ -13,9 +13,9 @@ import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.RestToXContentListener; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.action.GetOverallBucketsAction; -import org.elasticsearch.xpack.ml.action.GetOverallBucketsAction.Request; -import org.elasticsearch.xpack.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.action.GetOverallBucketsAction; +import org.elasticsearch.xpack.core.ml.action.GetOverallBucketsAction.Request; +import org.elasticsearch.xpack.core.ml.job.config.Job; import java.io.IOException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/results/RestGetRecordsAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/results/RestGetRecordsAction.java index 5b339992d91..4c5fc6c3346 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/results/RestGetRecordsAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/results/RestGetRecordsAction.java @@ -13,10 +13,10 @@ import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.RestToXContentListener; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.action.GetRecordsAction; -import org.elasticsearch.xpack.ml.action.util.PageParams; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.results.AnomalyRecord; +import org.elasticsearch.xpack.core.ml.action.GetRecordsAction; +import org.elasticsearch.xpack.core.ml.action.util.PageParams; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.results.AnomalyRecord; import java.io.IOException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/validate/RestValidateDetectorAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/validate/RestValidateDetectorAction.java index 92fa327e414..bda21efafb7 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/validate/RestValidateDetectorAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/validate/RestValidateDetectorAction.java @@ -13,7 +13,7 @@ import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.AcknowledgedRestListener; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.action.ValidateDetectorAction; +import org.elasticsearch.xpack.core.ml.action.ValidateDetectorAction; import java.io.IOException; diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/validate/RestValidateJobConfigAction.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/validate/RestValidateJobConfigAction.java index d30d515a830..23231aaf9a4 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/validate/RestValidateJobConfigAction.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/validate/RestValidateJobConfigAction.java @@ -13,7 +13,7 @@ import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.AcknowledgedRestListener; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.action.ValidateJobConfigAction; +import org.elasticsearch.xpack.core.ml.action.ValidateJobConfigAction; import java.io.IOException; diff --git a/plugin/ml/src/test/java/org/elasticsearch/license/MachineLearningLicensingTests.java b/plugin/ml/src/test/java/org/elasticsearch/license/MachineLearningLicensingTests.java index abc3cbd45b9..10d6ef8f9cb 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/license/MachineLearningLicensingTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/license/MachineLearningLicensingTests.java @@ -16,24 +16,24 @@ import org.elasticsearch.license.License.OperationMode; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.test.junit.annotations.TestLogging; import org.elasticsearch.transport.Transport; -import org.elasticsearch.xpack.TestXPackTransportClient; -import org.elasticsearch.xpack.XPackField; +import org.elasticsearch.xpack.core.TestXPackTransportClient; +import org.elasticsearch.xpack.core.XPackField; +import org.elasticsearch.xpack.core.ml.action.CloseJobAction; +import org.elasticsearch.xpack.core.ml.action.DeleteDatafeedAction; +import org.elasticsearch.xpack.core.ml.action.DeleteJobAction; +import org.elasticsearch.xpack.core.ml.action.GetDatafeedsStatsAction; +import org.elasticsearch.xpack.core.ml.action.GetJobsStatsAction; +import org.elasticsearch.xpack.core.ml.action.OpenJobAction; +import org.elasticsearch.xpack.core.ml.action.PutDatafeedAction; +import org.elasticsearch.xpack.core.ml.action.PutJobAction; +import org.elasticsearch.xpack.core.ml.action.StartDatafeedAction; +import org.elasticsearch.xpack.core.ml.action.StopDatafeedAction; +import org.elasticsearch.xpack.core.ml.client.MachineLearningClient; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedState; +import org.elasticsearch.xpack.core.ml.job.config.JobState; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData; import org.elasticsearch.xpack.ml.LocalStateMachineLearning; -import org.elasticsearch.xpack.ml.action.CloseJobAction; -import org.elasticsearch.xpack.ml.action.DeleteDatafeedAction; -import org.elasticsearch.xpack.ml.action.DeleteJobAction; -import org.elasticsearch.xpack.ml.action.GetDatafeedsStatsAction; -import org.elasticsearch.xpack.ml.action.GetJobsStatsAction; -import org.elasticsearch.xpack.ml.action.OpenJobAction; -import org.elasticsearch.xpack.ml.action.PutDatafeedAction; -import org.elasticsearch.xpack.ml.action.PutJobAction; -import org.elasticsearch.xpack.ml.action.StartDatafeedAction; -import org.elasticsearch.xpack.ml.action.StopDatafeedAction; -import org.elasticsearch.xpack.ml.client.MachineLearningClient; -import org.elasticsearch.xpack.ml.datafeed.DatafeedState; -import org.elasticsearch.xpack.ml.job.config.JobState; import org.elasticsearch.xpack.ml.support.BaseMlIntegTestCase; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData; import org.junit.Before; import java.util.Collections; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/LocalStateMachineLearning.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/LocalStateMachineLearning.java index 6cb5a8c5e02..485556d8441 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/LocalStateMachineLearning.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/LocalStateMachineLearning.java @@ -8,10 +8,10 @@ package org.elasticsearch.xpack.ml; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.license.LicenseService; import org.elasticsearch.license.XPackLicenseState; -import org.elasticsearch.xpack.LocalStateCompositeXPackPlugin; +import org.elasticsearch.xpack.core.LocalStateCompositeXPackPlugin; +import org.elasticsearch.xpack.core.ssl.SSLService; import org.elasticsearch.xpack.monitoring.Monitoring; import org.elasticsearch.xpack.security.Security; -import org.elasticsearch.xpack.ssl.SSLService; import java.nio.file.Path; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/MachineLearningFeatureSetTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/MachineLearningFeatureSetTests.java index 3a150895e72..b685e6b961d 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/MachineLearningFeatureSetTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/MachineLearningFeatureSetTests.java @@ -21,21 +21,25 @@ import org.elasticsearch.env.Environment; import org.elasticsearch.env.TestEnvironment; import org.elasticsearch.license.XPackLicenseState; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.XPackFeatureSet; -import org.elasticsearch.xpack.XPackFeatureSet.Usage; -import org.elasticsearch.xpack.XPackField; -import org.elasticsearch.xpack.ml.action.GetDatafeedsStatsAction; -import org.elasticsearch.xpack.ml.action.GetJobsStatsAction; -import org.elasticsearch.xpack.ml.action.util.QueryPage; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; -import org.elasticsearch.xpack.ml.datafeed.DatafeedState; -import org.elasticsearch.xpack.ml.job.config.AnalysisConfig; -import org.elasticsearch.xpack.ml.job.config.DataDescription; -import org.elasticsearch.xpack.ml.job.config.Detector; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.config.JobState; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSizeStats; -import org.elasticsearch.xpack.watcher.support.xcontent.XContentSource; +import org.elasticsearch.xpack.core.XPackFeatureSet; +import org.elasticsearch.xpack.core.XPackFeatureSet.Usage; +import org.elasticsearch.xpack.core.XPackField; +import org.elasticsearch.xpack.core.ml.MLMetadataField; +import org.elasticsearch.xpack.core.ml.MachineLearningFeatureSetUsage; +import org.elasticsearch.xpack.core.ml.MachineLearningField; +import org.elasticsearch.xpack.core.ml.MlMetadata; +import org.elasticsearch.xpack.core.ml.action.GetDatafeedsStatsAction; +import org.elasticsearch.xpack.core.ml.action.GetJobsStatsAction; +import org.elasticsearch.xpack.core.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedState; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.Detector; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.JobState; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSizeStats; +import org.elasticsearch.xpack.core.watcher.support.xcontent.XContentSource; import org.junit.Before; import java.util.Arrays; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/MlAssignmentNotifierTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/MlAssignmentNotifierTests.java index 0f305e38f0c..b76b8fb439a 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/MlAssignmentNotifierTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/MlAssignmentNotifierTests.java @@ -16,8 +16,8 @@ import org.elasticsearch.cluster.service.ClusterService; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.transport.TransportAddress; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData; import org.elasticsearch.xpack.ml.notifications.Auditor; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData; import java.net.InetAddress; import java.util.Collections; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/MlClientHelperTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/MlClientHelperTests.java index 6533ddbd3c8..284e746e67d 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/MlClientHelperTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/MlClientHelperTests.java @@ -14,17 +14,18 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; -import org.elasticsearch.xpack.security.authc.AuthenticationField; -import org.elasticsearch.xpack.security.authc.AuthenticationServiceField; +import org.elasticsearch.xpack.core.ml.MlClientHelper; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.security.authc.AuthenticationField; +import org.elasticsearch.xpack.core.security.authc.AuthenticationServiceField; import org.junit.Before; import java.util.Collections; import java.util.Map; import java.util.function.Consumer; -import static org.elasticsearch.xpack.ClientHelper.ACTION_ORIGIN_TRANSIENT_NAME; -import static org.elasticsearch.xpack.ClientHelper.ML_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.ACTION_ORIGIN_TRANSIENT_NAME; +import static org.elasticsearch.xpack.core.ClientHelper.ML_ORIGIN; import static org.hamcrest.Matchers.hasEntry; import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.is; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/MlDailyManagementServiceTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/MlDailyManagementServiceTests.java index 2c6f208c9b5..0a4cbcd85e7 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/MlDailyManagementServiceTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/MlDailyManagementServiceTests.java @@ -10,7 +10,7 @@ import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.TestThreadPool; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.xpack.ml.action.DeleteExpiredDataAction; +import org.elasticsearch.xpack.core.ml.action.DeleteExpiredDataAction; import org.junit.After; import org.junit.Before; import org.mockito.Mockito; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/MlInitializationServiceTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/MlInitializationServiceTests.java index aa56f359e23..ce46139a18b 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/MlInitializationServiceTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/MlInitializationServiceTests.java @@ -19,6 +19,8 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.transport.TransportAddress; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.ThreadPool; +import org.elasticsearch.xpack.core.ml.MLMetadataField; +import org.elasticsearch.xpack.core.ml.MlMetadata; import org.junit.Before; import org.mockito.Mockito; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/MlMetadataTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/MlMetadataTests.java index 2c27fc1e5f7..ea10b21e94a 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/MlMetadataTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/MlMetadataTests.java @@ -17,27 +17,29 @@ import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.search.SearchModule; import org.elasticsearch.test.AbstractSerializingTestCase; -import org.elasticsearch.xpack.ml.action.OpenJobAction; -import org.elasticsearch.xpack.ml.action.StartDatafeedAction; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfigTests; -import org.elasticsearch.xpack.ml.datafeed.DatafeedUpdate; -import org.elasticsearch.xpack.ml.job.config.AnalysisConfig; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.config.JobState; -import org.elasticsearch.xpack.ml.job.config.JobTaskStatus; -import org.elasticsearch.xpack.ml.job.config.JobTests; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData; +import org.elasticsearch.xpack.core.ml.MLMetadataField; +import org.elasticsearch.xpack.core.ml.MlMetadata; +import org.elasticsearch.xpack.core.ml.action.OpenJobAction; +import org.elasticsearch.xpack.core.ml.action.StartDatafeedAction; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfigTests; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedUpdate; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.JobState; +import org.elasticsearch.xpack.core.ml.job.config.JobTaskStatus; +import org.elasticsearch.xpack.core.ml.job.config.JobTests; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData; import java.util.Collections; import java.util.Date; import java.util.Map; +import static org.elasticsearch.xpack.core.ml.job.config.JobTests.buildJobBuilder; +import static org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData.INITIAL_ASSIGNMENT; import static org.elasticsearch.xpack.ml.action.OpenJobActionTests.addJobTask; import static org.elasticsearch.xpack.ml.datafeed.DatafeedManagerTests.createDatafeedConfig; import static org.elasticsearch.xpack.ml.datafeed.DatafeedManagerTests.createDatafeedJob; -import static org.elasticsearch.xpack.ml.job.config.JobTests.buildJobBuilder; -import static org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData.INITIAL_ASSIGNMENT; import static org.hamcrest.Matchers.contains; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.nullValue; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/MlSingleNodeTestCase.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/MlSingleNodeTestCase.java index 7bcf76a4b58..ac9ffa8952a 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/MlSingleNodeTestCase.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/MlSingleNodeTestCase.java @@ -7,6 +7,7 @@ package org.elasticsearch.xpack.ml; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.test.ESSingleNodeTestCase; +import org.elasticsearch.xpack.core.ml.MachineLearningField; /** * An extention to {@link ESSingleNodeTestCase} that adds node settings specifically needed for ML test cases. diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/CloseJobActionRequestTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/CloseJobActionRequestTests.java index 1334a845b6f..517ef47f24a 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/CloseJobActionRequestTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/CloseJobActionRequestTests.java @@ -23,16 +23,18 @@ import org.elasticsearch.tasks.Task; import org.elasticsearch.test.AbstractStreamableXContentTestCase; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.ml.MLMetadataField; -import org.elasticsearch.xpack.ml.MlMetadata; -import org.elasticsearch.xpack.ml.action.CloseJobAction.Request; -import org.elasticsearch.xpack.ml.datafeed.DatafeedState; -import org.elasticsearch.xpack.ml.job.config.JobState; +import org.elasticsearch.xpack.core.ml.MLMetadataField; +import org.elasticsearch.xpack.core.ml.MlMetadata; +import org.elasticsearch.xpack.core.ml.action.CloseJobAction; +import org.elasticsearch.xpack.core.ml.action.CloseJobAction.Request; +import org.elasticsearch.xpack.core.ml.action.StartDatafeedAction; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedState; +import org.elasticsearch.xpack.core.ml.job.config.JobState; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData.Assignment; +import org.elasticsearch.xpack.core.persistent.PersistentTasksService; import org.elasticsearch.xpack.ml.notifications.Auditor; import org.elasticsearch.xpack.ml.support.BaseMlIntegTestCase; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData.Assignment; -import org.elasticsearch.xpack.persistent.PersistentTasksService; import java.util.ArrayList; import java.util.Arrays; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/CloseJobActionResponseTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/CloseJobActionResponseTests.java index 1bf87c1a849..93bac8f518b 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/CloseJobActionResponseTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/CloseJobActionResponseTests.java @@ -6,7 +6,7 @@ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.test.AbstractStreamableTestCase; -import org.elasticsearch.xpack.ml.action.CloseJobAction.Response; +import org.elasticsearch.xpack.core.ml.action.CloseJobAction.Response; public class CloseJobActionResponseTests extends AbstractStreamableTestCase { diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/DeleteCalendarEventActionRequestTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/DeleteCalendarEventActionRequestTests.java index 4facff25f8c..99d441708ee 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/DeleteCalendarEventActionRequestTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/DeleteCalendarEventActionRequestTests.java @@ -6,7 +6,8 @@ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.test.AbstractStreamableTestCase; -import org.elasticsearch.xpack.ml.action.DeleteCalendarEventAction.Request; +import org.elasticsearch.xpack.core.ml.action.DeleteCalendarEventAction; +import org.elasticsearch.xpack.core.ml.action.DeleteCalendarEventAction.Request; public class DeleteCalendarEventActionRequestTests extends AbstractStreamableTestCase { diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/DeleteDatafeedRequestTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/DeleteDatafeedRequestTests.java index 7420f640406..23336d44c98 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/DeleteDatafeedRequestTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/DeleteDatafeedRequestTests.java @@ -6,7 +6,7 @@ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.test.AbstractStreamableTestCase; -import org.elasticsearch.xpack.ml.action.DeleteDatafeedAction.Request; +import org.elasticsearch.xpack.core.ml.action.DeleteDatafeedAction.Request; public class DeleteDatafeedRequestTests extends AbstractStreamableTestCase { diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/DeleteExpiredDataActionResponseTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/DeleteExpiredDataActionResponseTests.java index 7ba26254495..ec94e087483 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/DeleteExpiredDataActionResponseTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/DeleteExpiredDataActionResponseTests.java @@ -6,7 +6,7 @@ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.test.AbstractStreamableTestCase; -import org.elasticsearch.xpack.ml.action.DeleteExpiredDataAction.Response; +import org.elasticsearch.xpack.core.ml.action.DeleteExpiredDataAction.Response; public class DeleteExpiredDataActionResponseTests extends AbstractStreamableTestCase { diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/DeleteJobActionTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/DeleteJobActionTests.java index a2683d1d9e8..7c9d3e38e66 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/DeleteJobActionTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/DeleteJobActionTests.java @@ -9,8 +9,8 @@ import org.elasticsearch.cluster.ClusterName; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.metadata.MetaData; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.MLMetadataField; -import org.elasticsearch.xpack.ml.MlMetadata; +import org.elasticsearch.xpack.core.ml.MLMetadataField; +import org.elasticsearch.xpack.core.ml.MlMetadata; import org.elasticsearch.xpack.ml.support.BaseMlIntegTestCase; import java.util.Date; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/DeleteJobRequestTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/DeleteJobRequestTests.java index 60217ccef5b..fa780a18b00 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/DeleteJobRequestTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/DeleteJobRequestTests.java @@ -6,6 +6,7 @@ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.test.AbstractStreamableTestCase; +import org.elasticsearch.xpack.core.ml.action.DeleteJobAction; public class DeleteJobRequestTests extends AbstractStreamableTestCase { diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/ForecastJobActionRequestTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/ForecastJobActionRequestTests.java index 5d96b9515df..6da7daaf39c 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/ForecastJobActionRequestTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/ForecastJobActionRequestTests.java @@ -10,11 +10,12 @@ import org.elasticsearch.Version; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.AbstractStreamableXContentTestCase; -import org.elasticsearch.xpack.ml.action.ForecastJobAction.Request; -import org.elasticsearch.xpack.ml.job.config.AnalysisConfig; -import org.elasticsearch.xpack.ml.job.config.DataDescription; -import org.elasticsearch.xpack.ml.job.config.Detector; -import org.elasticsearch.xpack.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.action.ForecastJobAction; +import org.elasticsearch.xpack.core.ml.action.ForecastJobAction.Request; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.Detector; +import org.elasticsearch.xpack.core.ml.job.config.Job; import java.util.Collections; import java.util.Date; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/ForecastJobActionResponseTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/ForecastJobActionResponseTests.java index a3e14c53b8e..123c40ddde2 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/ForecastJobActionResponseTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/ForecastJobActionResponseTests.java @@ -6,7 +6,7 @@ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.test.AbstractStreamableTestCase; -import org.elasticsearch.xpack.ml.action.ForecastJobAction.Response; +import org.elasticsearch.xpack.core.ml.action.ForecastJobAction.Response; public class ForecastJobActionResponseTests extends AbstractStreamableTestCase { diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetBucketActionRequestTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetBucketActionRequestTests.java index c5e44222d99..08f39238f05 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetBucketActionRequestTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetBucketActionRequestTests.java @@ -7,8 +7,9 @@ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.AbstractStreamableXContentTestCase; -import org.elasticsearch.xpack.ml.action.GetBucketsAction.Request; -import org.elasticsearch.xpack.ml.action.util.PageParams; +import org.elasticsearch.xpack.core.ml.action.GetBucketsAction; +import org.elasticsearch.xpack.core.ml.action.GetBucketsAction.Request; +import org.elasticsearch.xpack.core.ml.action.util.PageParams; public class GetBucketActionRequestTests extends AbstractStreamableXContentTestCase { diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetBucketActionResponseTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetBucketActionResponseTests.java index ed5e95da43a..17f7d98378b 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetBucketActionResponseTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetBucketActionResponseTests.java @@ -6,12 +6,13 @@ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.test.AbstractStreamableTestCase; -import org.elasticsearch.xpack.ml.action.GetBucketsAction.Response; -import org.elasticsearch.xpack.ml.action.util.QueryPage; -import org.elasticsearch.xpack.ml.job.results.AnomalyRecord; -import org.elasticsearch.xpack.ml.job.results.Bucket; -import org.elasticsearch.xpack.ml.job.results.BucketInfluencer; -import org.elasticsearch.xpack.ml.job.results.PartitionScore; +import org.elasticsearch.xpack.core.ml.action.GetBucketsAction; +import org.elasticsearch.xpack.core.ml.action.GetBucketsAction.Response; +import org.elasticsearch.xpack.core.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.job.results.AnomalyRecord; +import org.elasticsearch.xpack.core.ml.job.results.Bucket; +import org.elasticsearch.xpack.core.ml.job.results.BucketInfluencer; +import org.elasticsearch.xpack.core.ml.job.results.PartitionScore; import java.util.ArrayList; import java.util.Collections; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetCalendarEventsActionRequestTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetCalendarEventsActionRequestTests.java index c5d0cf12e70..95c0e5dc61b 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetCalendarEventsActionRequestTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetCalendarEventsActionRequestTests.java @@ -8,7 +8,8 @@ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.AbstractStreamableXContentTestCase; -import org.elasticsearch.xpack.ml.action.util.PageParams; +import org.elasticsearch.xpack.core.ml.action.GetCalendarEventsAction; +import org.elasticsearch.xpack.core.ml.action.util.PageParams; public class GetCalendarEventsActionRequestTests extends AbstractStreamableXContentTestCase { diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetCalendarsActionRequestTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetCalendarsActionRequestTests.java index c646d835d95..80ea99b571f 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetCalendarsActionRequestTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetCalendarsActionRequestTests.java @@ -7,7 +7,8 @@ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.AbstractStreamableXContentTestCase; -import org.elasticsearch.xpack.ml.action.util.PageParams; +import org.elasticsearch.xpack.core.ml.action.GetCalendarsAction; +import org.elasticsearch.xpack.core.ml.action.util.PageParams; public class GetCalendarsActionRequestTests extends AbstractStreamableXContentTestCase { diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetCategoriesRequestTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetCategoriesRequestTests.java index 916b0be60a5..1ef80abefe8 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetCategoriesRequestTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetCategoriesRequestTests.java @@ -7,7 +7,8 @@ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.AbstractStreamableXContentTestCase; -import org.elasticsearch.xpack.ml.action.util.PageParams; +import org.elasticsearch.xpack.core.ml.action.GetCategoriesAction; +import org.elasticsearch.xpack.core.ml.action.util.PageParams; public class GetCategoriesRequestTests extends AbstractStreamableXContentTestCase { diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetCategoriesResponseTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetCategoriesResponseTests.java index 588f58ad894..a149e728e0d 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetCategoriesResponseTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetCategoriesResponseTests.java @@ -6,8 +6,9 @@ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.test.AbstractStreamableTestCase; -import org.elasticsearch.xpack.ml.action.util.QueryPage; -import org.elasticsearch.xpack.ml.job.results.CategoryDefinition; +import org.elasticsearch.xpack.core.ml.action.GetCategoriesAction; +import org.elasticsearch.xpack.core.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.job.results.CategoryDefinition; import java.util.Collections; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetDatafeedStatsActionRequestTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetDatafeedStatsActionRequestTests.java index 62bf1a0039e..1eed91c171d 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetDatafeedStatsActionRequestTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetDatafeedStatsActionRequestTests.java @@ -8,7 +8,7 @@ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.cluster.metadata.MetaData; import org.elasticsearch.common.io.stream.Writeable; import org.elasticsearch.test.AbstractWireSerializingTestCase; -import org.elasticsearch.xpack.ml.action.GetDatafeedsStatsAction.Request; +import org.elasticsearch.xpack.core.ml.action.GetDatafeedsStatsAction.Request; public class GetDatafeedStatsActionRequestTests extends AbstractWireSerializingTestCase { diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetDatafeedStatsActionResponseTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetDatafeedStatsActionResponseTests.java index 69a254eb941..676352ce9fd 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetDatafeedStatsActionResponseTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetDatafeedStatsActionResponseTests.java @@ -9,10 +9,10 @@ import org.elasticsearch.Version; import org.elasticsearch.cluster.node.DiscoveryNode; import org.elasticsearch.common.transport.TransportAddress; import org.elasticsearch.test.AbstractStreamableTestCase; -import org.elasticsearch.xpack.ml.action.GetDatafeedsStatsAction.Response; -import org.elasticsearch.xpack.ml.action.util.QueryPage; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; -import org.elasticsearch.xpack.ml.datafeed.DatafeedState; +import org.elasticsearch.xpack.core.ml.action.GetDatafeedsStatsAction.Response; +import org.elasticsearch.xpack.core.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedState; import java.net.InetAddress; import java.util.ArrayList; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetDatafeedsActionRequestTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetDatafeedsActionRequestTests.java index dff10b92731..14f0f882fcc 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetDatafeedsActionRequestTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetDatafeedsActionRequestTests.java @@ -8,7 +8,7 @@ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.cluster.metadata.MetaData; import org.elasticsearch.common.io.stream.Writeable; import org.elasticsearch.test.AbstractWireSerializingTestCase; -import org.elasticsearch.xpack.ml.action.GetDatafeedsAction.Request; +import org.elasticsearch.xpack.core.ml.action.GetDatafeedsAction.Request; public class GetDatafeedsActionRequestTests extends AbstractWireSerializingTestCase { diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetDatafeedsActionResponseTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetDatafeedsActionResponseTests.java index 7fd225c3262..27ad882c258 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetDatafeedsActionResponseTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetDatafeedsActionResponseTests.java @@ -9,10 +9,10 @@ import org.elasticsearch.common.io.stream.NamedWriteableRegistry; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.search.SearchModule; import org.elasticsearch.test.AbstractStreamableTestCase; -import org.elasticsearch.xpack.ml.action.GetDatafeedsAction.Response; -import org.elasticsearch.xpack.ml.action.util.QueryPage; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfigTests; +import org.elasticsearch.xpack.core.ml.action.GetDatafeedsAction.Response; +import org.elasticsearch.xpack.core.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfigTests; import java.util.ArrayList; import java.util.Collections; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetFiltersActionRequestTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetFiltersActionRequestTests.java index 14a11c57f40..bb88839d6e2 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetFiltersActionRequestTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetFiltersActionRequestTests.java @@ -6,8 +6,9 @@ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.test.AbstractStreamableTestCase; -import org.elasticsearch.xpack.ml.action.GetFiltersAction.Request; -import org.elasticsearch.xpack.ml.action.util.PageParams; +import org.elasticsearch.xpack.core.ml.action.GetFiltersAction; +import org.elasticsearch.xpack.core.ml.action.GetFiltersAction.Request; +import org.elasticsearch.xpack.core.ml.action.util.PageParams; public class GetFiltersActionRequestTests extends AbstractStreamableTestCase { diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetFiltersActionResponseTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetFiltersActionResponseTests.java index ce4485dfbfc..f60444a2fa2 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetFiltersActionResponseTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetFiltersActionResponseTests.java @@ -6,9 +6,10 @@ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.test.AbstractStreamableTestCase; -import org.elasticsearch.xpack.ml.action.GetFiltersAction.Response; -import org.elasticsearch.xpack.ml.action.util.QueryPage; -import org.elasticsearch.xpack.ml.job.config.MlFilter; +import org.elasticsearch.xpack.core.ml.action.GetFiltersAction; +import org.elasticsearch.xpack.core.ml.action.GetFiltersAction.Response; +import org.elasticsearch.xpack.core.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.job.config.MlFilter; import java.util.Collections; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetInfluencersActionRequestTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetInfluencersActionRequestTests.java index e421759d1fb..742e94c7bfa 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetInfluencersActionRequestTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetInfluencersActionRequestTests.java @@ -7,8 +7,9 @@ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.AbstractStreamableXContentTestCase; -import org.elasticsearch.xpack.ml.action.GetInfluencersAction.Request; -import org.elasticsearch.xpack.ml.action.util.PageParams; +import org.elasticsearch.xpack.core.ml.action.GetInfluencersAction; +import org.elasticsearch.xpack.core.ml.action.GetInfluencersAction.Request; +import org.elasticsearch.xpack.core.ml.action.util.PageParams; public class GetInfluencersActionRequestTests extends AbstractStreamableXContentTestCase { diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetInfluencersActionResponseTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetInfluencersActionResponseTests.java index 769d93a5b3c..c97c2441e93 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetInfluencersActionResponseTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetInfluencersActionResponseTests.java @@ -6,9 +6,10 @@ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.test.AbstractStreamableTestCase; -import org.elasticsearch.xpack.ml.action.GetInfluencersAction.Response; -import org.elasticsearch.xpack.ml.action.util.QueryPage; -import org.elasticsearch.xpack.ml.job.results.Influencer; +import org.elasticsearch.xpack.core.ml.action.GetInfluencersAction; +import org.elasticsearch.xpack.core.ml.action.GetInfluencersAction.Response; +import org.elasticsearch.xpack.core.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.job.results.Influencer; import java.util.ArrayList; import java.util.Date; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetJobStatsActionRequestTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetJobStatsActionRequestTests.java index 10f2f834002..232908a6250 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetJobStatsActionRequestTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetJobStatsActionRequestTests.java @@ -7,7 +7,7 @@ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.cluster.metadata.MetaData; import org.elasticsearch.test.AbstractStreamableTestCase; -import org.elasticsearch.xpack.ml.action.GetJobsStatsAction.Request; +import org.elasticsearch.xpack.core.ml.action.GetJobsStatsAction.Request; public class GetJobStatsActionRequestTests extends AbstractStreamableTestCase { diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetJobStatsActionResponseTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetJobStatsActionResponseTests.java index 62f074e2236..6a71f767905 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetJobStatsActionResponseTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetJobStatsActionResponseTests.java @@ -10,13 +10,13 @@ import org.elasticsearch.cluster.node.DiscoveryNode; import org.elasticsearch.common.transport.TransportAddress; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.test.AbstractStreamableTestCase; -import org.elasticsearch.xpack.ml.action.GetJobsStatsAction.Response; -import org.elasticsearch.xpack.ml.action.util.QueryPage; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.config.JobState; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.DataCounts; +import org.elasticsearch.xpack.core.ml.action.GetJobsStatsAction.Response; +import org.elasticsearch.xpack.core.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.JobState; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.DataCounts; import org.elasticsearch.xpack.ml.job.process.autodetect.state.DataCountsTests; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSizeStats; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSizeStats; import java.net.InetAddress; import java.util.ArrayList; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetJobsActionRequestTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetJobsActionRequestTests.java index b75ff8aed50..8c746d2504c 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetJobsActionRequestTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetJobsActionRequestTests.java @@ -8,7 +8,7 @@ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.cluster.metadata.MetaData; import org.elasticsearch.common.io.stream.Writeable; import org.elasticsearch.test.AbstractWireSerializingTestCase; -import org.elasticsearch.xpack.ml.action.GetJobsAction.Request; +import org.elasticsearch.xpack.core.ml.action.GetJobsAction.Request; public class GetJobsActionRequestTests extends AbstractWireSerializingTestCase { diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetJobsActionResponseTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetJobsActionResponseTests.java index 862746d98be..719755c5ead 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetJobsActionResponseTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetJobsActionResponseTests.java @@ -6,10 +6,11 @@ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.test.AbstractStreamableTestCase; -import org.elasticsearch.xpack.ml.action.GetJobsAction.Response; -import org.elasticsearch.xpack.ml.action.util.QueryPage; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.config.JobTests; +import org.elasticsearch.xpack.core.ml.action.GetJobsAction; +import org.elasticsearch.xpack.core.ml.action.GetJobsAction.Response; +import org.elasticsearch.xpack.core.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.JobTests; import java.util.ArrayList; import java.util.List; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetJobsStatsActionTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetJobsStatsActionTests.java index 7826c94ddf1..115ec09d986 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetJobsStatsActionTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetJobsStatsActionTests.java @@ -7,9 +7,10 @@ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.MlMetadata; -import org.elasticsearch.xpack.ml.job.config.JobState; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.DataCounts; +import org.elasticsearch.xpack.core.ml.action.GetJobsStatsAction; +import org.elasticsearch.xpack.core.ml.MlMetadata; +import org.elasticsearch.xpack.core.ml.job.config.JobState; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.DataCounts; import java.time.Duration; import java.util.Arrays; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetModelSnapshotsActionRequestTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetModelSnapshotsActionRequestTests.java index 11225afac8d..c6ee60aaf56 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetModelSnapshotsActionRequestTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetModelSnapshotsActionRequestTests.java @@ -7,8 +7,9 @@ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.AbstractStreamableXContentTestCase; -import org.elasticsearch.xpack.ml.action.GetModelSnapshotsAction.Request; -import org.elasticsearch.xpack.ml.action.util.PageParams; +import org.elasticsearch.xpack.core.ml.action.GetModelSnapshotsAction; +import org.elasticsearch.xpack.core.ml.action.GetModelSnapshotsAction.Request; +import org.elasticsearch.xpack.core.ml.action.util.PageParams; public class GetModelSnapshotsActionRequestTests extends AbstractStreamableXContentTestCase { diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetModelSnapshotsActionResponseTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetModelSnapshotsActionResponseTests.java index 6a96e9f243a..52072aa0aa2 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetModelSnapshotsActionResponseTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetModelSnapshotsActionResponseTests.java @@ -6,9 +6,10 @@ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.test.AbstractStreamableTestCase; -import org.elasticsearch.xpack.ml.action.GetModelSnapshotsAction.Response; -import org.elasticsearch.xpack.ml.action.util.QueryPage; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshot; +import org.elasticsearch.xpack.core.ml.action.GetModelSnapshotsAction; +import org.elasticsearch.xpack.core.ml.action.GetModelSnapshotsAction.Response; +import org.elasticsearch.xpack.core.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshot; import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshotTests; import java.util.ArrayList; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetOverallBucketsActionRequestTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetOverallBucketsActionRequestTests.java index 40aa875787b..d2a6bf22789 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetOverallBucketsActionRequestTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetOverallBucketsActionRequestTests.java @@ -8,7 +8,7 @@ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.AbstractStreamableXContentTestCase; -import org.elasticsearch.xpack.ml.action.GetOverallBucketsAction.Request; +import org.elasticsearch.xpack.core.ml.action.GetOverallBucketsAction.Request; public class GetOverallBucketsActionRequestTests extends AbstractStreamableXContentTestCase { diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetOverallBucketsActionResponseTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetOverallBucketsActionResponseTests.java index 8b5867af1ec..a93d0cc1517 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetOverallBucketsActionResponseTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetOverallBucketsActionResponseTests.java @@ -6,9 +6,9 @@ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.test.AbstractStreamableTestCase; -import org.elasticsearch.xpack.ml.action.GetOverallBucketsAction.Response; -import org.elasticsearch.xpack.ml.action.util.QueryPage; -import org.elasticsearch.xpack.ml.job.results.OverallBucket; +import org.elasticsearch.xpack.core.ml.action.GetOverallBucketsAction.Response; +import org.elasticsearch.xpack.core.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.job.results.OverallBucket; import java.util.ArrayList; import java.util.Date; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetRecordsActionRequestTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetRecordsActionRequestTests.java index 7a46d33f421..fb394f3d060 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetRecordsActionRequestTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetRecordsActionRequestTests.java @@ -7,8 +7,9 @@ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.AbstractStreamableXContentTestCase; -import org.elasticsearch.xpack.ml.action.GetRecordsAction.Request; -import org.elasticsearch.xpack.ml.action.util.PageParams; +import org.elasticsearch.xpack.core.ml.action.GetRecordsAction; +import org.elasticsearch.xpack.core.ml.action.GetRecordsAction.Request; +import org.elasticsearch.xpack.core.ml.action.util.PageParams; public class GetRecordsActionRequestTests extends AbstractStreamableXContentTestCase { diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetRecordsActionResponseTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetRecordsActionResponseTests.java index dd1002bae5b..8ecdea0113e 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetRecordsActionResponseTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/GetRecordsActionResponseTests.java @@ -6,9 +6,10 @@ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.test.AbstractStreamableTestCase; -import org.elasticsearch.xpack.ml.action.GetRecordsAction.Response; -import org.elasticsearch.xpack.ml.action.util.QueryPage; -import org.elasticsearch.xpack.ml.job.results.AnomalyRecord; +import org.elasticsearch.xpack.core.ml.action.GetRecordsAction; +import org.elasticsearch.xpack.core.ml.action.GetRecordsAction.Response; +import org.elasticsearch.xpack.core.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.job.results.AnomalyRecord; import java.util.ArrayList; import java.util.Date; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/OpenJobActionRequestTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/OpenJobActionRequestTests.java index ea43a36037c..71c227955e9 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/OpenJobActionRequestTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/OpenJobActionRequestTests.java @@ -8,7 +8,8 @@ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.AbstractStreamableXContentTestCase; -import org.elasticsearch.xpack.ml.action.OpenJobAction.Request; +import org.elasticsearch.xpack.core.ml.action.OpenJobAction; +import org.elasticsearch.xpack.core.ml.action.OpenJobAction.Request; public class OpenJobActionRequestTests extends AbstractStreamableXContentTestCase { diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/OpenJobActionTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/OpenJobActionTests.java index ca0cfebcbae..a8b280ec1fe 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/OpenJobActionTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/OpenJobActionTests.java @@ -30,20 +30,21 @@ import org.elasticsearch.index.shard.ShardId; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.VersionUtils; -import org.elasticsearch.xpack.ml.MLMetadataField; +import org.elasticsearch.xpack.core.ml.MLMetadataField; +import org.elasticsearch.xpack.core.ml.MlMetaIndex; +import org.elasticsearch.xpack.core.ml.MlMetadata; +import org.elasticsearch.xpack.core.ml.action.OpenJobAction; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.JobState; +import org.elasticsearch.xpack.core.ml.job.config.JobTaskStatus; +import org.elasticsearch.xpack.core.ml.job.persistence.AnomalyDetectorsIndex; +import org.elasticsearch.xpack.core.ml.job.persistence.AnomalyDetectorsIndexFields; +import org.elasticsearch.xpack.core.ml.job.persistence.ElasticsearchMappings; +import org.elasticsearch.xpack.core.ml.notifications.AuditorField; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData.Assignment; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.MlMetaIndex; -import org.elasticsearch.xpack.ml.MlMetadata; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.config.JobState; -import org.elasticsearch.xpack.ml.job.config.JobTaskStatus; -import org.elasticsearch.xpack.ml.job.persistence.AnomalyDetectorsIndex; -import org.elasticsearch.xpack.ml.job.persistence.AnomalyDetectorsIndexFields; -import org.elasticsearch.xpack.ml.job.persistence.ElasticsearchMappings; -import org.elasticsearch.xpack.ml.notifications.AuditorField; import org.elasticsearch.xpack.ml.support.BaseMlIntegTestCase; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData.Assignment; import java.io.IOException; import java.net.InetAddress; @@ -55,7 +56,7 @@ import java.util.List; import java.util.Map; import java.util.function.Function; -import static org.elasticsearch.xpack.ml.job.config.JobTests.buildJobBuilder; +import static org.elasticsearch.xpack.core.ml.job.config.JobTests.buildJobBuilder; import static org.hamcrest.Matchers.containsString; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PostCalendarEventActionRequestTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PostCalendarEventActionRequestTests.java index a5c6fec5ed9..5b21908c402 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PostCalendarEventActionRequestTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PostCalendarEventActionRequestTests.java @@ -10,8 +10,9 @@ import org.elasticsearch.common.Strings; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.test.AbstractStreamableTestCase; -import org.elasticsearch.xpack.ml.calendars.ScheduledEvent; -import org.elasticsearch.xpack.ml.calendars.ScheduledEventTests; +import org.elasticsearch.xpack.core.ml.action.PostCalendarEventsAction; +import org.elasticsearch.xpack.core.ml.calendars.ScheduledEvent; +import org.elasticsearch.xpack.core.ml.calendars.ScheduledEventTests; import java.io.IOException; import java.util.ArrayList; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PostDataActionRequestTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PostDataActionRequestTests.java index 07deca607a3..c1730162a98 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PostDataActionRequestTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PostDataActionRequestTests.java @@ -8,8 +8,9 @@ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.common.bytes.BytesArray; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.test.AbstractStreamableTestCase; -import org.elasticsearch.xpack.ml.job.config.DataDescription; -import org.elasticsearch.xpack.ml.job.config.DataDescription.DataFormat; +import org.elasticsearch.xpack.core.ml.action.PostDataAction; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription.DataFormat; public class PostDataActionRequestTests extends AbstractStreamableTestCase { @Override diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PostDataActionResponseTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PostDataActionResponseTests.java index e622037e8da..22d604825c1 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PostDataActionResponseTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PostDataActionResponseTests.java @@ -6,7 +6,8 @@ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.test.AbstractStreamableTestCase; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.DataCounts; +import org.elasticsearch.xpack.core.ml.action.PostDataAction; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.DataCounts; import org.elasticsearch.xpack.ml.job.process.autodetect.state.DataCountsTests; public class PostDataActionResponseTests extends AbstractStreamableTestCase { diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PostDataFlushRequestTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PostDataFlushRequestTests.java index 69b0f784933..bc91699037a 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PostDataFlushRequestTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PostDataFlushRequestTests.java @@ -6,7 +6,7 @@ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.test.AbstractStreamableTestCase; -import org.elasticsearch.xpack.ml.action.FlushJobAction.Request; +import org.elasticsearch.xpack.core.ml.action.FlushJobAction.Request; public class PostDataFlushRequestTests extends AbstractStreamableTestCase { diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PostDataFlushResponseTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PostDataFlushResponseTests.java index 8cb971f6245..4b6755121c9 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PostDataFlushResponseTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PostDataFlushResponseTests.java @@ -6,7 +6,7 @@ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.test.AbstractStreamableTestCase; -import org.elasticsearch.xpack.ml.action.FlushJobAction.Response; +import org.elasticsearch.xpack.core.ml.action.FlushJobAction.Response; import org.joda.time.DateTime; public class PostDataFlushResponseTests extends AbstractStreamableTestCase { diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PreviewDatafeedActionRequestTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PreviewDatafeedActionRequestTests.java index bba9e6975d2..e8f2e99087e 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PreviewDatafeedActionRequestTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PreviewDatafeedActionRequestTests.java @@ -6,7 +6,7 @@ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.test.AbstractStreamableTestCase; -import org.elasticsearch.xpack.ml.action.PreviewDatafeedAction.Request; +import org.elasticsearch.xpack.core.ml.action.PreviewDatafeedAction.Request; public class PreviewDatafeedActionRequestTests extends AbstractStreamableTestCase { diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PreviewDatafeedActionTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PreviewDatafeedActionTests.java index 5eb05a8e27b..39949c52d4f 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PreviewDatafeedActionTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PreviewDatafeedActionTests.java @@ -7,7 +7,8 @@ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.action.ActionListener; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.datafeed.extractor.DataExtractor; +import org.elasticsearch.xpack.core.ml.action.PreviewDatafeedAction; +import org.elasticsearch.xpack.core.ml.datafeed.extractor.DataExtractor; import org.junit.Before; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PutCalendarActionRequestTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PutCalendarActionRequestTests.java index 636619cb389..da3d60e816e 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PutCalendarActionRequestTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PutCalendarActionRequestTests.java @@ -7,8 +7,9 @@ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.AbstractStreamableXContentTestCase; +import org.elasticsearch.xpack.core.ml.action.PutCalendarAction; +import org.elasticsearch.xpack.core.ml.job.config.JobTests; import org.elasticsearch.xpack.ml.calendars.CalendarTests; -import org.elasticsearch.xpack.ml.job.config.JobTests; public class PutCalendarActionRequestTests extends AbstractStreamableXContentTestCase { diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PutCalendarActionResponseTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PutCalendarActionResponseTests.java index 231e264ef35..2c80dfb5600 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PutCalendarActionResponseTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PutCalendarActionResponseTests.java @@ -6,6 +6,7 @@ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.test.AbstractStreamableTestCase; +import org.elasticsearch.xpack.core.ml.action.PutCalendarAction; import org.elasticsearch.xpack.ml.calendars.CalendarTests; public class PutCalendarActionResponseTests extends AbstractStreamableTestCase { diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PutDatafeedActionRequestTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PutDatafeedActionRequestTests.java index f67456da06b..bba1727f708 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PutDatafeedActionRequestTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PutDatafeedActionRequestTests.java @@ -11,9 +11,9 @@ import org.elasticsearch.common.xcontent.NamedXContentRegistry; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.search.SearchModule; import org.elasticsearch.test.AbstractStreamableXContentTestCase; -import org.elasticsearch.xpack.ml.action.PutDatafeedAction.Request; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfigTests; +import org.elasticsearch.xpack.core.ml.action.PutDatafeedAction.Request; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfigTests; import org.junit.Before; import java.util.Collections; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PutDatafeedActionResponseTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PutDatafeedActionResponseTests.java index 27606faa7be..7855e0f39f2 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PutDatafeedActionResponseTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PutDatafeedActionResponseTests.java @@ -9,9 +9,9 @@ import org.elasticsearch.common.io.stream.NamedWriteableRegistry; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.search.SearchModule; import org.elasticsearch.test.AbstractStreamableTestCase; -import org.elasticsearch.xpack.ml.action.PutDatafeedAction.Response; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfigTests; +import org.elasticsearch.xpack.core.ml.action.PutDatafeedAction.Response; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfigTests; import java.util.Arrays; import java.util.Collections; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PutFilterActionRequestTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PutFilterActionRequestTests.java index c851bfb6f5c..03c6c55df8a 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PutFilterActionRequestTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PutFilterActionRequestTests.java @@ -7,8 +7,9 @@ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.AbstractStreamableXContentTestCase; -import org.elasticsearch.xpack.ml.action.PutFilterAction.Request; -import org.elasticsearch.xpack.ml.job.config.MlFilter; +import org.elasticsearch.xpack.core.ml.action.PutFilterAction; +import org.elasticsearch.xpack.core.ml.action.PutFilterAction.Request; +import org.elasticsearch.xpack.core.ml.job.config.MlFilter; import java.util.ArrayList; import java.util.List; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PutJobActionRequestTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PutJobActionRequestTests.java index 3165266af24..0d87f9ae86a 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PutJobActionRequestTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PutJobActionRequestTests.java @@ -10,14 +10,14 @@ import org.elasticsearch.common.xcontent.XContentHelper; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.test.AbstractStreamableXContentTestCase; -import org.elasticsearch.xpack.ml.action.PutJobAction.Request; -import org.elasticsearch.xpack.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.action.PutJobAction.Request; +import org.elasticsearch.xpack.core.ml.job.config.Job; import java.io.IOException; import java.util.Date; -import static org.elasticsearch.xpack.ml.job.config.JobTests.buildJobBuilder; -import static org.elasticsearch.xpack.ml.job.config.JobTests.randomValidJobId; +import static org.elasticsearch.xpack.core.ml.job.config.JobTests.buildJobBuilder; +import static org.elasticsearch.xpack.core.ml.job.config.JobTests.randomValidJobId; public class PutJobActionRequestTests extends AbstractStreamableXContentTestCase { diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PutJobActionResponseTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PutJobActionResponseTests.java index 71bb6dd1ffb..5779f3e72fc 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PutJobActionResponseTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/PutJobActionResponseTests.java @@ -6,11 +6,11 @@ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.test.AbstractStreamableTestCase; -import org.elasticsearch.xpack.ml.action.PutJobAction.Response; -import org.elasticsearch.xpack.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.action.PutJobAction.Response; +import org.elasticsearch.xpack.core.ml.job.config.Job; -import static org.elasticsearch.xpack.ml.job.config.JobTests.buildJobBuilder; -import static org.elasticsearch.xpack.ml.job.config.JobTests.randomValidJobId; +import static org.elasticsearch.xpack.core.ml.job.config.JobTests.buildJobBuilder; +import static org.elasticsearch.xpack.core.ml.job.config.JobTests.randomValidJobId; public class PutJobActionResponseTests extends AbstractStreamableTestCase { diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/RevertModelSnapshotActionRequestTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/RevertModelSnapshotActionRequestTests.java index be1073a99b4..d5038cc1af9 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/RevertModelSnapshotActionRequestTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/RevertModelSnapshotActionRequestTests.java @@ -7,7 +7,8 @@ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.AbstractStreamableXContentTestCase; -import org.elasticsearch.xpack.ml.action.RevertModelSnapshotAction.Request; +import org.elasticsearch.xpack.core.ml.action.RevertModelSnapshotAction; +import org.elasticsearch.xpack.core.ml.action.RevertModelSnapshotAction.Request; public class RevertModelSnapshotActionRequestTests extends AbstractStreamableXContentTestCase { diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/RevertModelSnapshotActionResponseTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/RevertModelSnapshotActionResponseTests.java index f1ff60ef4aa..14e9dcbb973 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/RevertModelSnapshotActionResponseTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/RevertModelSnapshotActionResponseTests.java @@ -6,7 +6,8 @@ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.test.AbstractStreamableTestCase; -import org.elasticsearch.xpack.ml.action.RevertModelSnapshotAction.Response; +import org.elasticsearch.xpack.core.ml.action.RevertModelSnapshotAction; +import org.elasticsearch.xpack.core.ml.action.RevertModelSnapshotAction.Response; import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshotTests; public class RevertModelSnapshotActionResponseTests extends AbstractStreamableTestCase { diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/StartDatafeedActionTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/StartDatafeedActionTests.java index fbca7361573..656c0da89ce 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/StartDatafeedActionTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/StartDatafeedActionTests.java @@ -9,19 +9,20 @@ import org.elasticsearch.ElasticsearchStatusException; import org.elasticsearch.ResourceNotFoundException; import org.elasticsearch.tasks.TaskId; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.MlMetadata; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.MlMetadata; +import org.elasticsearch.xpack.core.ml.action.StartDatafeedAction; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.JobState; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData; import org.elasticsearch.xpack.ml.datafeed.DatafeedManager; import org.elasticsearch.xpack.ml.datafeed.DatafeedManagerTests; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.config.JobState; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData; import java.util.Collections; import java.util.Date; +import static org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData.INITIAL_ASSIGNMENT; import static org.elasticsearch.xpack.ml.action.OpenJobActionTests.addJobTask; -import static org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData.INITIAL_ASSIGNMENT; import static org.hamcrest.Matchers.equalTo; public class StartDatafeedActionTests extends ESTestCase { diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/StopDatafeedActionRequestTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/StopDatafeedActionRequestTests.java index 665db11a0b3..c6eadcbcbec 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/StopDatafeedActionRequestTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/StopDatafeedActionRequestTests.java @@ -9,16 +9,18 @@ import org.elasticsearch.ResourceNotFoundException; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.AbstractStreamableXContentTestCase; -import org.elasticsearch.xpack.ml.MLMetadataField; -import org.elasticsearch.xpack.ml.MlMetadata; -import org.elasticsearch.xpack.ml.MlMetadata.Builder; -import org.elasticsearch.xpack.ml.action.StopDatafeedAction.Request; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; -import org.elasticsearch.xpack.ml.datafeed.DatafeedState; -import org.elasticsearch.xpack.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.MLMetadataField; +import org.elasticsearch.xpack.core.ml.MlMetadata; +import org.elasticsearch.xpack.core.ml.MlMetadata.Builder; +import org.elasticsearch.xpack.core.ml.action.StartDatafeedAction; +import org.elasticsearch.xpack.core.ml.action.StopDatafeedAction; +import org.elasticsearch.xpack.core.ml.action.StopDatafeedAction.Request; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedState; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData.Assignment; import org.elasticsearch.xpack.ml.support.BaseMlIntegTestCase; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData.Assignment; import java.util.ArrayList; import java.util.Collections; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/UpdateCalendarJobActionResquestTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/UpdateCalendarJobActionResquestTests.java index c56483441b1..5364ec12f4a 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/UpdateCalendarJobActionResquestTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/UpdateCalendarJobActionResquestTests.java @@ -6,6 +6,7 @@ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.test.AbstractStreamableTestCase; +import org.elasticsearch.xpack.core.ml.action.UpdateCalendarJobAction; import java.util.HashSet; import java.util.Set; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/UpdateDatafeedActionRequestTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/UpdateDatafeedActionRequestTests.java index e5edf5ee74c..8a77e7499d5 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/UpdateDatafeedActionRequestTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/UpdateDatafeedActionRequestTests.java @@ -11,9 +11,9 @@ import org.elasticsearch.common.xcontent.NamedXContentRegistry; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.search.SearchModule; import org.elasticsearch.test.AbstractStreamableXContentTestCase; -import org.elasticsearch.xpack.ml.action.UpdateDatafeedAction.Request; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfigTests; -import org.elasticsearch.xpack.ml.datafeed.DatafeedUpdateTests; +import org.elasticsearch.xpack.core.ml.action.UpdateDatafeedAction.Request; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfigTests; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedUpdateTests; import org.junit.Before; import java.util.Collections; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/UpdateJobActionRequestTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/UpdateJobActionRequestTests.java index e662dcff752..e129772d288 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/UpdateJobActionRequestTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/UpdateJobActionRequestTests.java @@ -6,8 +6,9 @@ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.test.AbstractStreamableTestCase; -import org.elasticsearch.xpack.ml.job.config.AnalysisLimits; -import org.elasticsearch.xpack.ml.job.config.JobUpdate; +import org.elasticsearch.xpack.core.ml.action.UpdateJobAction; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisLimits; +import org.elasticsearch.xpack.core.ml.job.config.JobUpdate; public class UpdateJobActionRequestTests extends AbstractStreamableTestCase { diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/UpdateModelSnapshotActionRequestTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/UpdateModelSnapshotActionRequestTests.java index 76ddf3fcbaa..ef00ffb04b7 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/UpdateModelSnapshotActionRequestTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/UpdateModelSnapshotActionRequestTests.java @@ -7,7 +7,8 @@ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.AbstractStreamableXContentTestCase; -import org.elasticsearch.xpack.ml.action.UpdateModelSnapshotAction.Request; +import org.elasticsearch.xpack.core.ml.action.UpdateModelSnapshotAction; +import org.elasticsearch.xpack.core.ml.action.UpdateModelSnapshotAction.Request; public class UpdateModelSnapshotActionRequestTests extends AbstractStreamableXContentTestCase { diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/UpdateModelSnapshotActionResponseTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/UpdateModelSnapshotActionResponseTests.java index 19d37aff466..15c63c5cf1e 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/UpdateModelSnapshotActionResponseTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/UpdateModelSnapshotActionResponseTests.java @@ -6,7 +6,8 @@ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.test.AbstractStreamableTestCase; -import org.elasticsearch.xpack.ml.action.UpdateModelSnapshotAction.Response; +import org.elasticsearch.xpack.core.ml.action.UpdateModelSnapshotAction; +import org.elasticsearch.xpack.core.ml.action.UpdateModelSnapshotAction.Response; import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshotTests; public class UpdateModelSnapshotActionResponseTests diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/UpdateProcessActionRequestTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/UpdateProcessActionRequestTests.java index 6f7c3e0b62e..0fca50b49bb 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/UpdateProcessActionRequestTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/UpdateProcessActionRequestTests.java @@ -6,10 +6,11 @@ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.test.AbstractStreamableTestCase; -import org.elasticsearch.xpack.ml.job.config.JobUpdate; -import org.elasticsearch.xpack.ml.job.config.MlFilter; +import org.elasticsearch.xpack.core.ml.action.UpdateProcessAction; +import org.elasticsearch.xpack.core.ml.job.config.JobUpdate; +import org.elasticsearch.xpack.core.ml.job.config.MlFilter; import org.elasticsearch.xpack.ml.job.config.MlFilterTests; -import org.elasticsearch.xpack.ml.job.config.ModelPlotConfig; +import org.elasticsearch.xpack.core.ml.job.config.ModelPlotConfig; import java.util.ArrayList; import java.util.List; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/ValidateDetectorActionRequestTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/ValidateDetectorActionRequestTests.java index fc301714a04..8d880e5506b 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/ValidateDetectorActionRequestTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/ValidateDetectorActionRequestTests.java @@ -7,8 +7,8 @@ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.AbstractStreamableXContentTestCase; -import org.elasticsearch.xpack.ml.action.ValidateDetectorAction.Request; -import org.elasticsearch.xpack.ml.job.config.Detector; +import org.elasticsearch.xpack.core.ml.action.ValidateDetectorAction.Request; +import org.elasticsearch.xpack.core.ml.job.config.Detector; public class ValidateDetectorActionRequestTests extends AbstractStreamableXContentTestCase { diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/ValidateJobConfigActionRequestTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/ValidateJobConfigActionRequestTests.java index e16a6e629ee..4f3b258ddae 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/ValidateJobConfigActionRequestTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/ValidateJobConfigActionRequestTests.java @@ -12,14 +12,14 @@ import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.test.AbstractStreamableTestCase; -import org.elasticsearch.xpack.ml.action.ValidateJobConfigAction.Request; -import org.elasticsearch.xpack.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.action.ValidateJobConfigAction.Request; +import org.elasticsearch.xpack.core.ml.job.config.Job; import java.io.IOException; import java.util.Date; -import static org.elasticsearch.xpack.ml.job.config.JobTests.buildJobBuilder; -import static org.elasticsearch.xpack.ml.job.config.JobTests.randomValidJobId; +import static org.elasticsearch.xpack.core.ml.job.config.JobTests.buildJobBuilder; +import static org.elasticsearch.xpack.core.ml.job.config.JobTests.randomValidJobId; public class ValidateJobConfigActionRequestTests extends AbstractStreamableTestCase { diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/util/PageParamsTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/util/PageParamsTests.java index fac2e34ffb4..9e57c17d2ff 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/util/PageParamsTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/util/PageParamsTests.java @@ -8,6 +8,7 @@ package org.elasticsearch.xpack.ml.action.util; import org.elasticsearch.common.io.stream.Writeable.Reader; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.AbstractSerializingTestCase; +import org.elasticsearch.xpack.core.ml.action.util.PageParams; import java.io.IOException; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/util/QueryPageTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/util/QueryPageTests.java index 70ca2dcb167..944a600a4c0 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/util/QueryPageTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/util/QueryPageTests.java @@ -8,7 +8,8 @@ package org.elasticsearch.xpack.ml.action.util; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.io.stream.Writeable.Reader; import org.elasticsearch.test.AbstractWireSerializingTestCase; -import org.elasticsearch.xpack.ml.job.results.Influencer; +import org.elasticsearch.xpack.core.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.job.results.Influencer; import java.io.IOException; import java.util.ArrayList; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/calendars/CalendarTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/calendars/CalendarTests.java index 7548fc4b602..4040db5fc9e 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/calendars/CalendarTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/calendars/CalendarTests.java @@ -8,7 +8,8 @@ package org.elasticsearch.xpack.ml.calendars; import org.elasticsearch.common.io.stream.Writeable; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.AbstractSerializingTestCase; -import org.elasticsearch.xpack.ml.job.config.JobTests; +import org.elasticsearch.xpack.core.ml.calendars.Calendar; +import org.elasticsearch.xpack.core.ml.job.config.JobTests; import java.io.IOException; import java.util.ArrayList; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobBuilderTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobBuilderTests.java index c5a7b23c6e4..a224763e0ca 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobBuilderTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobBuilderTests.java @@ -13,12 +13,13 @@ import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.mock.orig.Mockito; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.xpack.ml.action.util.QueryPage; -import org.elasticsearch.xpack.ml.job.config.DataDescription; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.persistence.JobProvider; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.DataCounts; -import org.elasticsearch.xpack.ml.job.results.Bucket; +import org.elasticsearch.xpack.core.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.persistence.JobProvider; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.DataCounts; +import org.elasticsearch.xpack.core.ml.job.results.Bucket; import org.elasticsearch.xpack.ml.notifications.Auditor; import org.junit.Before; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobTests.java index f95b17b7cbd..2b4fb816e7d 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobTests.java @@ -14,14 +14,14 @@ import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.mock.orig.Mockito; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.xpack.ml.action.FlushJobAction; -import org.elasticsearch.xpack.ml.action.PostDataAction; -import org.elasticsearch.xpack.ml.datafeed.extractor.DataExtractor; +import org.elasticsearch.xpack.core.ml.action.FlushJobAction; +import org.elasticsearch.xpack.core.ml.action.PostDataAction; +import org.elasticsearch.xpack.core.ml.datafeed.extractor.DataExtractor; import org.elasticsearch.xpack.ml.datafeed.extractor.DataExtractorFactory; -import org.elasticsearch.xpack.ml.job.config.DataDescription; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.DataCounts; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.DataCounts; import org.elasticsearch.xpack.ml.notifications.Auditor; -import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper; import org.junit.Before; import org.mockito.ArgumentCaptor; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobValidatorTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobValidatorTests.java index 149896539de..180727e88f2 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobValidatorTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobValidatorTests.java @@ -12,11 +12,13 @@ import org.elasticsearch.search.aggregations.AggregatorFactories; import org.elasticsearch.search.aggregations.bucket.histogram.HistogramAggregationBuilder; import org.elasticsearch.search.aggregations.metrics.max.MaxAggregationBuilder; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.job.config.AnalysisConfig; -import org.elasticsearch.xpack.ml.job.config.DataDescription; -import org.elasticsearch.xpack.ml.job.config.Detector; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.messages.Messages; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedJobValidator; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.Detector; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.messages.Messages; import java.io.IOException; import java.util.Arrays; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedManagerTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedManagerTests.java index b3122d599ac..59c7236d28d 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedManagerTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedManagerTests.java @@ -23,24 +23,25 @@ import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.xpack.ml.MLMetadataField; +import org.elasticsearch.xpack.core.ml.MLMetadataField; +import org.elasticsearch.xpack.core.ml.MlMetadata; +import org.elasticsearch.xpack.core.ml.action.StartDatafeedAction; +import org.elasticsearch.xpack.core.ml.action.StopDatafeedAction; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.Detector; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.JobState; +import org.elasticsearch.xpack.core.ml.notifications.AuditMessage; +import org.elasticsearch.xpack.core.ml.notifications.AuditorField; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData.PersistentTask; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.MlMetadata; -import org.elasticsearch.xpack.ml.action.StartDatafeedAction; -import org.elasticsearch.xpack.ml.action.TransportStartDatafeedAction.DatafeedTask; import org.elasticsearch.xpack.ml.action.StartDatafeedActionTests; -import org.elasticsearch.xpack.ml.action.StopDatafeedAction; -import org.elasticsearch.xpack.ml.job.config.AnalysisConfig; -import org.elasticsearch.xpack.ml.job.config.DataDescription; -import org.elasticsearch.xpack.ml.job.config.Detector; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.config.JobState; +import org.elasticsearch.xpack.ml.action.TransportStartDatafeedAction.DatafeedTask; import org.elasticsearch.xpack.ml.job.persistence.MockClientBuilder; -import org.elasticsearch.xpack.ml.notifications.AuditMessage; import org.elasticsearch.xpack.ml.notifications.Auditor; -import org.elasticsearch.xpack.ml.notifications.AuditorField; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData.PersistentTask; import org.junit.Before; import org.mockito.ArgumentCaptor; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedNodeSelectorTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedNodeSelectorTests.java index a88b9fbebfb..bcb67fed6bd 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedNodeSelectorTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedNodeSelectorTests.java @@ -27,12 +27,12 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.transport.TransportAddress; import org.elasticsearch.index.shard.ShardId; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.MLMetadataField; -import org.elasticsearch.xpack.ml.MlMetadata; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.config.JobState; -import org.elasticsearch.xpack.ml.job.config.JobTaskStatus; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData; +import org.elasticsearch.xpack.core.ml.MLMetadataField; +import org.elasticsearch.xpack.core.ml.MlMetadata; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.JobState; +import org.elasticsearch.xpack.core.ml.job.config.JobTaskStatus; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData; import org.junit.Before; import java.net.InetAddress; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedStateTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedStateTests.java index 720e7fa2118..8b3e68b1e57 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedStateTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedStateTests.java @@ -8,6 +8,7 @@ package org.elasticsearch.xpack.ml.datafeed; import org.elasticsearch.Version; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedState; import org.mockito.ArgumentCaptor; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/DataExtractorFactoryTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/DataExtractorFactoryTests.java index 1f09aafb522..52e38a70abd 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/DataExtractorFactoryTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/DataExtractorFactoryTests.java @@ -17,14 +17,14 @@ import org.elasticsearch.search.aggregations.AggregatorFactories; import org.elasticsearch.search.aggregations.metrics.max.MaxAggregationBuilder; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.xpack.ml.datafeed.ChunkingConfig; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.datafeed.ChunkingConfig; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; import org.elasticsearch.xpack.ml.datafeed.DatafeedManagerTests; import org.elasticsearch.xpack.ml.datafeed.extractor.aggregation.AggregationDataExtractorFactory; import org.elasticsearch.xpack.ml.datafeed.extractor.chunked.ChunkedDataExtractorFactory; import org.elasticsearch.xpack.ml.datafeed.extractor.scroll.ScrollDataExtractorFactory; -import org.elasticsearch.xpack.ml.job.config.DataDescription; -import org.elasticsearch.xpack.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.Job; import org.junit.Before; import java.util.Date; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationDataExtractorFactoryTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationDataExtractorFactoryTests.java index 6da9823d921..8f4aad57c3f 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationDataExtractorFactoryTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationDataExtractorFactoryTests.java @@ -9,11 +9,11 @@ import org.elasticsearch.client.Client; import org.elasticsearch.search.aggregations.AggregationBuilders; import org.elasticsearch.search.aggregations.AggregatorFactories; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; -import org.elasticsearch.xpack.ml.job.config.AnalysisConfig; -import org.elasticsearch.xpack.ml.job.config.DataDescription; -import org.elasticsearch.xpack.ml.job.config.Detector; -import org.elasticsearch.xpack.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.Detector; +import org.elasticsearch.xpack.core.ml.job.config.Job; import org.junit.Before; import java.util.Arrays; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/chunked/ChunkedDataExtractorFactoryTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/chunked/ChunkedDataExtractorFactoryTests.java index 66ae570ed51..3dc2364cc2a 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/chunked/ChunkedDataExtractorFactoryTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/chunked/ChunkedDataExtractorFactoryTests.java @@ -9,12 +9,12 @@ import org.elasticsearch.client.Client; import org.elasticsearch.search.aggregations.AggregationBuilders; import org.elasticsearch.search.aggregations.AggregatorFactories; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; import org.elasticsearch.xpack.ml.datafeed.extractor.DataExtractorFactory; -import org.elasticsearch.xpack.ml.job.config.AnalysisConfig; -import org.elasticsearch.xpack.ml.job.config.DataDescription; -import org.elasticsearch.xpack.ml.job.config.Detector; -import org.elasticsearch.xpack.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.Detector; +import org.elasticsearch.xpack.core.ml.job.config.Job; import org.junit.Before; import java.util.Arrays; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/chunked/ChunkedDataExtractorTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/chunked/ChunkedDataExtractorTests.java index e4e9c36b3f1..18c35155b6f 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/chunked/ChunkedDataExtractorTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/chunked/ChunkedDataExtractorTests.java @@ -21,7 +21,7 @@ import org.elasticsearch.search.aggregations.Aggregations; import org.elasticsearch.search.aggregations.metrics.max.Max; import org.elasticsearch.search.aggregations.metrics.min.Min; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.datafeed.extractor.DataExtractor; +import org.elasticsearch.xpack.core.ml.datafeed.extractor.DataExtractor; import org.elasticsearch.xpack.ml.datafeed.extractor.DataExtractorFactory; import org.junit.Before; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ExtractedFieldsTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ExtractedFieldsTests.java index 4f1d0700c8c..a921d1f3e73 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ExtractedFieldsTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ExtractedFieldsTests.java @@ -12,11 +12,11 @@ import org.elasticsearch.rest.RestStatus; import org.elasticsearch.search.SearchHit; import org.elasticsearch.search.builder.SearchSourceBuilder; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; -import org.elasticsearch.xpack.ml.job.config.AnalysisConfig; -import org.elasticsearch.xpack.ml.job.config.DataDescription; -import org.elasticsearch.xpack.ml.job.config.Detector; -import org.elasticsearch.xpack.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.Detector; +import org.elasticsearch.xpack.core.ml.job.config.Job; import org.elasticsearch.xpack.ml.test.SearchHitBuilder; import org.joda.time.DateTime; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/AutodetectMemoryLimitIT.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/AutodetectMemoryLimitIT.java index 76188e52eb7..d2cdcf244e0 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/AutodetectMemoryLimitIT.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/AutodetectMemoryLimitIT.java @@ -6,13 +6,13 @@ package org.elasticsearch.xpack.ml.integration; import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.xpack.ml.action.GetJobsStatsAction; -import org.elasticsearch.xpack.ml.job.config.AnalysisConfig; -import org.elasticsearch.xpack.ml.job.config.AnalysisLimits; -import org.elasticsearch.xpack.ml.job.config.DataDescription; -import org.elasticsearch.xpack.ml.job.config.Detector; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSizeStats; +import org.elasticsearch.xpack.core.ml.action.GetJobsStatsAction; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisLimits; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.Detector; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSizeStats; import org.junit.After; import java.time.Instant; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/AutodetectResultProcessorIT.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/AutodetectResultProcessorIT.java index 20ab81e4ee6..1cf181e5f29 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/AutodetectResultProcessorIT.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/AutodetectResultProcessorIT.java @@ -13,38 +13,38 @@ import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.index.reindex.ReindexPlugin; import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.ml.MlSingleNodeTestCase; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.ml.action.DeleteJobAction; +import org.elasticsearch.xpack.core.ml.action.PutJobAction; +import org.elasticsearch.xpack.core.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.Detector; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.JobTests; +import org.elasticsearch.xpack.core.ml.job.persistence.BucketsQueryBuilder; +import org.elasticsearch.xpack.core.ml.job.persistence.InfluencersQueryBuilder; +import org.elasticsearch.xpack.core.ml.job.persistence.JobProvider; +import org.elasticsearch.xpack.core.ml.job.persistence.RecordsQueryBuilder; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.output.FlushAcknowledgement; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSizeStats; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshot; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.Quantiles; +import org.elasticsearch.xpack.core.ml.job.results.AnomalyRecord; +import org.elasticsearch.xpack.core.ml.job.results.Bucket; +import org.elasticsearch.xpack.core.ml.job.results.CategoryDefinition; +import org.elasticsearch.xpack.core.ml.job.results.Influencer; +import org.elasticsearch.xpack.core.ml.job.results.ModelPlot; import org.elasticsearch.xpack.ml.LocalStateMachineLearning; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.action.DeleteJobAction; -import org.elasticsearch.xpack.ml.action.PutJobAction; -import org.elasticsearch.xpack.ml.action.util.QueryPage; -import org.elasticsearch.xpack.ml.job.config.AnalysisConfig; -import org.elasticsearch.xpack.ml.job.config.DataDescription; -import org.elasticsearch.xpack.ml.job.config.Detector; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.config.JobTests; -import org.elasticsearch.xpack.ml.job.persistence.BucketsQueryBuilder; -import org.elasticsearch.xpack.ml.job.persistence.InfluencersQueryBuilder; -import org.elasticsearch.xpack.ml.job.persistence.JobProvider; +import org.elasticsearch.xpack.ml.MlSingleNodeTestCase; import org.elasticsearch.xpack.ml.job.persistence.JobResultsPersister; -import org.elasticsearch.xpack.ml.job.persistence.RecordsQueryBuilder; import org.elasticsearch.xpack.ml.job.process.autodetect.AutodetectProcess; import org.elasticsearch.xpack.ml.job.process.autodetect.output.AutoDetectResultProcessor; -import org.elasticsearch.xpack.ml.job.process.autodetect.output.FlushAcknowledgement; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSizeStats; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshot; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.Quantiles; import org.elasticsearch.xpack.ml.job.process.normalizer.Renormalizer; -import org.elasticsearch.xpack.ml.job.results.AnomalyRecord; import org.elasticsearch.xpack.ml.job.results.AutodetectResult; -import org.elasticsearch.xpack.ml.job.results.Bucket; import org.elasticsearch.xpack.ml.job.results.BucketTests; -import org.elasticsearch.xpack.ml.job.results.CategoryDefinition; import org.elasticsearch.xpack.ml.job.results.CategoryDefinitionTests; -import org.elasticsearch.xpack.ml.job.results.Influencer; -import org.elasticsearch.xpack.ml.job.results.ModelPlot; import org.elasticsearch.xpack.ml.job.results.ModelPlotTests; import org.junit.After; import org.junit.Before; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/BasicDistributedJobsIT.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/BasicDistributedJobsIT.java index 738c18c8999..46d569a4ae4 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/BasicDistributedJobsIT.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/BasicDistributedJobsIT.java @@ -21,27 +21,27 @@ import org.elasticsearch.search.aggregations.AggregatorFactories; import org.elasticsearch.search.aggregations.bucket.histogram.HistogramAggregationBuilder; import org.elasticsearch.search.aggregations.metrics.max.MaxAggregationBuilder; import org.elasticsearch.test.junit.annotations.TestLogging; +import org.elasticsearch.xpack.core.ml.MlMetadata; +import org.elasticsearch.xpack.core.ml.action.CloseJobAction; +import org.elasticsearch.xpack.core.ml.action.GetDatafeedsStatsAction; +import org.elasticsearch.xpack.core.ml.action.GetJobsStatsAction; +import org.elasticsearch.xpack.core.ml.action.OpenJobAction; +import org.elasticsearch.xpack.core.ml.action.PostDataAction; +import org.elasticsearch.xpack.core.ml.action.PutDatafeedAction; +import org.elasticsearch.xpack.core.ml.action.PutJobAction; +import org.elasticsearch.xpack.core.ml.action.StartDatafeedAction; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedState; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.Detector; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.JobState; +import org.elasticsearch.xpack.core.ml.job.config.JobTaskStatus; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData.PersistentTask; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.MlMetadata; -import org.elasticsearch.xpack.ml.action.CloseJobAction; -import org.elasticsearch.xpack.ml.action.GetDatafeedsStatsAction; -import org.elasticsearch.xpack.ml.action.GetJobsStatsAction; -import org.elasticsearch.xpack.ml.action.OpenJobAction; -import org.elasticsearch.xpack.ml.action.PostDataAction; -import org.elasticsearch.xpack.ml.action.PutDatafeedAction; -import org.elasticsearch.xpack.ml.action.PutJobAction; -import org.elasticsearch.xpack.ml.action.StartDatafeedAction; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; -import org.elasticsearch.xpack.ml.datafeed.DatafeedState; -import org.elasticsearch.xpack.ml.job.config.AnalysisConfig; -import org.elasticsearch.xpack.ml.job.config.DataDescription; -import org.elasticsearch.xpack.ml.job.config.Detector; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.config.JobState; -import org.elasticsearch.xpack.ml.job.config.JobTaskStatus; import org.elasticsearch.xpack.ml.support.BaseMlIntegTestCase; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData.PersistentTask; import java.io.IOException; import java.util.Collection; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/BasicRenormalizationIT.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/BasicRenormalizationIT.java index 019535c7cff..36f578bf08f 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/BasicRenormalizationIT.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/BasicRenormalizationIT.java @@ -5,15 +5,14 @@ */ package org.elasticsearch.xpack.ml.integration; -import org.elasticsearch.common.Nullable; import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.xpack.ml.action.GetJobsStatsAction; -import org.elasticsearch.xpack.ml.job.config.AnalysisConfig; -import org.elasticsearch.xpack.ml.job.config.DataDescription; -import org.elasticsearch.xpack.ml.job.config.Detector; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSizeStats; -import org.elasticsearch.xpack.ml.job.results.AnomalyRecord; +import org.elasticsearch.xpack.core.ml.action.GetJobsStatsAction; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.Detector; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSizeStats; +import org.elasticsearch.xpack.core.ml.job.results.AnomalyRecord; import org.junit.After; import java.io.IOException; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/CategorizationIT.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/CategorizationIT.java index aad0149672e..33a611fcb57 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/CategorizationIT.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/CategorizationIT.java @@ -12,12 +12,12 @@ import org.elasticsearch.action.support.WriteRequest; import org.elasticsearch.common.logging.Loggers; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; -import org.elasticsearch.xpack.ml.job.config.AnalysisConfig; -import org.elasticsearch.xpack.ml.job.config.DataDescription; -import org.elasticsearch.xpack.ml.job.config.Detector; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.results.CategoryDefinition; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.Detector; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.results.CategoryDefinition; import org.junit.After; import org.junit.Before; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/DatafeedJobsIT.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/DatafeedJobsIT.java index ce6d7ab66b6..b72f06c48b0 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/DatafeedJobsIT.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/DatafeedJobsIT.java @@ -12,19 +12,19 @@ import org.elasticsearch.action.admin.cluster.node.hotthreads.NodesHotThreadsRes import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.util.concurrent.ConcurrentCollections; import org.elasticsearch.common.util.concurrent.ConcurrentMapLong; -import org.elasticsearch.xpack.ml.action.DeleteDatafeedAction; -import org.elasticsearch.xpack.ml.action.GetDatafeedsStatsAction; -import org.elasticsearch.xpack.ml.action.GetJobsStatsAction; -import org.elasticsearch.xpack.ml.action.KillProcessAction; -import org.elasticsearch.xpack.ml.action.PutJobAction; -import org.elasticsearch.xpack.ml.action.StopDatafeedAction; -import org.elasticsearch.xpack.ml.datafeed.ChunkingConfig; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; -import org.elasticsearch.xpack.ml.datafeed.DatafeedState; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.config.JobState; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.DataCounts; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSizeStats; +import org.elasticsearch.xpack.core.ml.action.DeleteDatafeedAction; +import org.elasticsearch.xpack.core.ml.action.GetDatafeedsStatsAction; +import org.elasticsearch.xpack.core.ml.action.GetJobsStatsAction; +import org.elasticsearch.xpack.core.ml.action.KillProcessAction; +import org.elasticsearch.xpack.core.ml.action.PutJobAction; +import org.elasticsearch.xpack.core.ml.action.StopDatafeedAction; +import org.elasticsearch.xpack.core.ml.datafeed.ChunkingConfig; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedState; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.JobState; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.DataCounts; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSizeStats; import org.junit.After; import java.util.ArrayList; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/DatafeedJobsRestIT.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/DatafeedJobsRestIT.java index afa34bc22d8..cfd4594ffa5 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/DatafeedJobsRestIT.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/DatafeedJobsRestIT.java @@ -15,8 +15,9 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.test.SecuritySettingsSourceField; import org.elasticsearch.test.rest.ESRestTestCase; +import org.elasticsearch.xpack.core.ml.integration.MlRestTestStateCleaner; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.notifications.AuditorField; +import org.elasticsearch.xpack.core.ml.notifications.AuditorField; import org.elasticsearch.xpack.test.rest.XPackRestTestHelper; import org.junit.After; import org.junit.Before; @@ -32,7 +33,7 @@ import java.util.List; import java.util.Locale; import java.util.stream.Collectors; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/DeleteExpiredDataIT.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/DeleteExpiredDataIT.java index 0a96893131e..3a1fc2b0f6d 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/DeleteExpiredDataIT.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/DeleteExpiredDataIT.java @@ -14,16 +14,16 @@ import org.elasticsearch.action.update.UpdateRequest; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.xpack.ml.action.DeleteExpiredDataAction; -import org.elasticsearch.xpack.ml.action.UpdateModelSnapshotAction; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; -import org.elasticsearch.xpack.ml.job.config.AnalysisConfig; -import org.elasticsearch.xpack.ml.job.config.DataDescription; -import org.elasticsearch.xpack.ml.job.config.Detector; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshot; -import org.elasticsearch.xpack.ml.job.results.Bucket; -import org.elasticsearch.xpack.ml.job.results.ForecastRequestStats; +import org.elasticsearch.xpack.core.ml.action.DeleteExpiredDataAction; +import org.elasticsearch.xpack.core.ml.action.UpdateModelSnapshotAction; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.Detector; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshot; +import org.elasticsearch.xpack.core.ml.job.results.Bucket; +import org.elasticsearch.xpack.core.ml.job.results.ForecastRequestStats; import org.junit.After; import org.junit.Before; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/DeleteJobIT.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/DeleteJobIT.java index 8a9c0dc4e93..758911e1365 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/DeleteJobIT.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/DeleteJobIT.java @@ -10,13 +10,13 @@ import org.elasticsearch.cluster.ClusterChangedEvent; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.ClusterStateUpdateTask; import org.elasticsearch.cluster.metadata.MetaData; -import org.elasticsearch.xpack.ml.MLMetadataField; -import org.elasticsearch.xpack.ml.MlMetadata; -import org.elasticsearch.xpack.ml.action.DeleteJobAction; -import org.elasticsearch.xpack.ml.action.PutJobAction; -import org.elasticsearch.xpack.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.MLMetadataField; +import org.elasticsearch.xpack.core.ml.MlMetadata; +import org.elasticsearch.xpack.core.ml.action.DeleteJobAction; +import org.elasticsearch.xpack.core.ml.action.PutJobAction; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData; import org.elasticsearch.xpack.ml.support.BaseMlIntegTestCase; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData; import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutionException; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/DetectionRulesIT.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/DetectionRulesIT.java index 0933f8780f4..8343d7132b2 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/DetectionRulesIT.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/DetectionRulesIT.java @@ -6,18 +6,18 @@ package org.elasticsearch.xpack.ml.integration; import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.xpack.ml.action.GetRecordsAction; -import org.elasticsearch.xpack.ml.job.config.AnalysisConfig; -import org.elasticsearch.xpack.ml.job.config.Condition; -import org.elasticsearch.xpack.ml.job.config.DataDescription; -import org.elasticsearch.xpack.ml.job.config.DetectionRule; -import org.elasticsearch.xpack.ml.job.config.Detector; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.config.JobUpdate; -import org.elasticsearch.xpack.ml.job.config.Operator; -import org.elasticsearch.xpack.ml.job.config.RuleCondition; -import org.elasticsearch.xpack.ml.job.config.RuleConditionType; -import org.elasticsearch.xpack.ml.job.results.AnomalyRecord; +import org.elasticsearch.xpack.core.ml.action.GetRecordsAction; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig; +import org.elasticsearch.xpack.core.ml.job.config.Condition; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.DetectionRule; +import org.elasticsearch.xpack.core.ml.job.config.Detector; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.JobUpdate; +import org.elasticsearch.xpack.core.ml.job.config.Operator; +import org.elasticsearch.xpack.core.ml.job.config.RuleCondition; +import org.elasticsearch.xpack.core.ml.job.config.RuleConditionType; +import org.elasticsearch.xpack.core.ml.job.results.AnomalyRecord; import org.junit.After; import java.util.ArrayList; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/EstablishedMemUsageIT.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/EstablishedMemUsageIT.java index 4ee1ad9523b..7ee8df9bbdb 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/EstablishedMemUsageIT.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/EstablishedMemUsageIT.java @@ -6,13 +6,13 @@ package org.elasticsearch.xpack.ml.integration; import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.xpack.ml.action.PutJobAction; -import org.elasticsearch.xpack.ml.job.config.AnalysisConfig; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.persistence.JobProvider; +import org.elasticsearch.xpack.core.ml.action.PutJobAction; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.persistence.JobProvider; import org.elasticsearch.xpack.ml.job.persistence.JobResultsPersister; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSizeStats; -import org.elasticsearch.xpack.ml.job.results.Bucket; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSizeStats; +import org.elasticsearch.xpack.core.ml.job.results.Bucket; import org.elasticsearch.xpack.ml.support.BaseMlIntegTestCase; import org.junit.Before; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/ForecastIT.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/ForecastIT.java index e29d9d1642c..a5fc1575f48 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/ForecastIT.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/ForecastIT.java @@ -7,14 +7,14 @@ package org.elasticsearch.xpack.ml.integration; import org.elasticsearch.ElasticsearchException; import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.xpack.ml.job.config.AnalysisConfig; -import org.elasticsearch.xpack.ml.job.config.AnalysisLimits; -import org.elasticsearch.xpack.ml.job.config.DataDescription; -import org.elasticsearch.xpack.ml.job.config.Detector; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.results.Bucket; -import org.elasticsearch.xpack.ml.job.results.Forecast; -import org.elasticsearch.xpack.ml.job.results.ForecastRequestStats; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisLimits; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.Detector; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.results.Bucket; +import org.elasticsearch.xpack.core.ml.job.results.Forecast; +import org.elasticsearch.xpack.core.ml.job.results.ForecastRequestStats; import org.junit.After; import java.io.IOException; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/InterimResultsDeletedAfterReopeningJobIT.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/InterimResultsDeletedAfterReopeningJobIT.java index b05c6d5f839..add0b9e8a93 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/InterimResultsDeletedAfterReopeningJobIT.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/InterimResultsDeletedAfterReopeningJobIT.java @@ -8,12 +8,12 @@ package org.elasticsearch.xpack.ml.integration; import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.xpack.ml.job.config.AnalysisConfig; -import org.elasticsearch.xpack.ml.job.config.DataDescription; -import org.elasticsearch.xpack.ml.job.config.Detector; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.persistence.AnomalyDetectorsIndex; -import org.elasticsearch.xpack.ml.job.results.AnomalyRecord; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.Detector; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.persistence.AnomalyDetectorsIndex; +import org.elasticsearch.xpack.core.ml.job.results.AnomalyRecord; import org.junit.After; import java.util.ArrayList; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/JobProviderIT.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/JobProviderIT.java index a3ed476fa38..6640e1a7ea3 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/JobProviderIT.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/JobProviderIT.java @@ -21,38 +21,38 @@ import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.xpack.XPackSettings; +import org.elasticsearch.xpack.core.XPackSettings; import org.elasticsearch.xpack.ml.LocalStateMachineLearning; -import org.elasticsearch.xpack.ml.MLMetadataField; +import org.elasticsearch.xpack.core.ml.MLMetadataField; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.MlMetaIndex; -import org.elasticsearch.xpack.ml.MlMetadata; +import org.elasticsearch.xpack.core.ml.MlMetaIndex; +import org.elasticsearch.xpack.core.ml.MlMetadata; import org.elasticsearch.xpack.ml.MlSingleNodeTestCase; -import org.elasticsearch.xpack.ml.action.PutJobAction; -import org.elasticsearch.xpack.ml.action.util.QueryPage; -import org.elasticsearch.xpack.ml.calendars.Calendar; -import org.elasticsearch.xpack.ml.calendars.ScheduledEvent; -import org.elasticsearch.xpack.ml.job.config.AnalysisConfig; -import org.elasticsearch.xpack.ml.job.config.Connective; -import org.elasticsearch.xpack.ml.job.config.DataDescription; -import org.elasticsearch.xpack.ml.job.config.DetectionRule; -import org.elasticsearch.xpack.ml.job.config.Detector; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.config.MlFilter; -import org.elasticsearch.xpack.ml.job.config.RuleAction; -import org.elasticsearch.xpack.ml.job.config.RuleCondition; -import org.elasticsearch.xpack.ml.job.persistence.AnomalyDetectorsIndex; -import org.elasticsearch.xpack.ml.job.persistence.CalendarQueryBuilder; +import org.elasticsearch.xpack.core.ml.action.PutJobAction; +import org.elasticsearch.xpack.core.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.calendars.Calendar; +import org.elasticsearch.xpack.core.ml.calendars.ScheduledEvent; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig; +import org.elasticsearch.xpack.core.ml.job.config.Connective; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.DetectionRule; +import org.elasticsearch.xpack.core.ml.job.config.Detector; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.MlFilter; +import org.elasticsearch.xpack.core.ml.job.config.RuleAction; +import org.elasticsearch.xpack.core.ml.job.config.RuleCondition; +import org.elasticsearch.xpack.core.ml.job.persistence.AnomalyDetectorsIndex; +import org.elasticsearch.xpack.core.ml.job.persistence.CalendarQueryBuilder; import org.elasticsearch.xpack.ml.job.persistence.JobDataCountsPersister; -import org.elasticsearch.xpack.ml.job.persistence.JobProvider; +import org.elasticsearch.xpack.core.ml.job.persistence.JobProvider; import org.elasticsearch.xpack.ml.job.persistence.JobResultsPersister; -import org.elasticsearch.xpack.ml.job.persistence.ScheduledEventsQueryBuilder; -import org.elasticsearch.xpack.ml.job.process.autodetect.params.AutodetectParams; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.DataCounts; +import org.elasticsearch.xpack.core.ml.job.persistence.ScheduledEventsQueryBuilder; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.params.AutodetectParams; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.DataCounts; import org.elasticsearch.xpack.ml.job.process.autodetect.state.DataCountsTests; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSizeStats; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshot; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.Quantiles; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSizeStats; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshot; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.Quantiles; import org.junit.Before; import java.io.IOException; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/JobStorageDeletionTaskIT.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/JobStorageDeletionTaskIT.java index d409264a567..200e7139bbe 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/JobStorageDeletionTaskIT.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/JobStorageDeletionTaskIT.java @@ -8,10 +8,10 @@ package org.elasticsearch.xpack.ml.integration; import org.elasticsearch.cluster.metadata.IndexMetaData; import org.elasticsearch.common.unit.ByteSizeUnit; import org.elasticsearch.common.unit.ByteSizeValue; -import org.elasticsearch.xpack.ml.action.DeleteJobAction; -import org.elasticsearch.xpack.ml.action.OpenJobAction; -import org.elasticsearch.xpack.ml.action.PutJobAction; -import org.elasticsearch.xpack.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.action.DeleteJobAction; +import org.elasticsearch.xpack.core.ml.action.OpenJobAction; +import org.elasticsearch.xpack.core.ml.action.PutJobAction; +import org.elasticsearch.xpack.core.ml.job.config.Job; import org.elasticsearch.xpack.ml.support.BaseMlIntegTestCase; /** diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/MlDistributedFailureIT.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/MlDistributedFailureIT.java index 083d95d9cae..9977bebc805 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/MlDistributedFailureIT.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/MlDistributedFailureIT.java @@ -18,24 +18,24 @@ import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.test.junit.annotations.TestLogging; -import org.elasticsearch.xpack.ml.action.CloseJobAction; -import org.elasticsearch.xpack.ml.action.GetDatafeedsStatsAction; -import org.elasticsearch.xpack.ml.action.GetDatafeedsStatsAction.Response.DatafeedStats; -import org.elasticsearch.xpack.ml.action.GetJobsStatsAction; -import org.elasticsearch.xpack.ml.action.GetJobsStatsAction.Response.JobStats; -import org.elasticsearch.xpack.ml.action.OpenJobAction; -import org.elasticsearch.xpack.ml.action.PutDatafeedAction; -import org.elasticsearch.xpack.ml.action.PutJobAction; -import org.elasticsearch.xpack.ml.action.StartDatafeedAction; -import org.elasticsearch.xpack.ml.action.StopDatafeedAction; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; -import org.elasticsearch.xpack.ml.datafeed.DatafeedState; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.config.JobState; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.DataCounts; +import org.elasticsearch.xpack.core.ml.action.CloseJobAction; +import org.elasticsearch.xpack.core.ml.action.GetDatafeedsStatsAction; +import org.elasticsearch.xpack.core.ml.action.GetDatafeedsStatsAction.Response.DatafeedStats; +import org.elasticsearch.xpack.core.ml.action.GetJobsStatsAction; +import org.elasticsearch.xpack.core.ml.action.GetJobsStatsAction.Response.JobStats; +import org.elasticsearch.xpack.core.ml.action.OpenJobAction; +import org.elasticsearch.xpack.core.ml.action.PutDatafeedAction; +import org.elasticsearch.xpack.core.ml.action.PutJobAction; +import org.elasticsearch.xpack.core.ml.action.StartDatafeedAction; +import org.elasticsearch.xpack.core.ml.action.StopDatafeedAction; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedState; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.JobState; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.DataCounts; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData.PersistentTask; import org.elasticsearch.xpack.ml.support.BaseMlIntegTestCase; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData.PersistentTask; import java.io.IOException; import java.util.Collections; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/MlJobIT.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/MlJobIT.java index 1e45868a30c..f4adbc25113 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/MlJobIT.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/MlJobIT.java @@ -15,9 +15,10 @@ import org.elasticsearch.common.util.concurrent.ConcurrentMapLong; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.test.SecuritySettingsSourceField; import org.elasticsearch.test.rest.ESRestTestCase; +import org.elasticsearch.xpack.core.ml.integration.MlRestTestStateCleaner; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.job.persistence.AnomalyDetectorsIndex; -import org.elasticsearch.xpack.ml.job.persistence.AnomalyDetectorsIndexFields; +import org.elasticsearch.xpack.core.ml.job.persistence.AnomalyDetectorsIndex; +import org.elasticsearch.xpack.core.ml.job.persistence.AnomalyDetectorsIndexFields; import org.elasticsearch.xpack.test.rest.XPackRestTestHelper; import org.junit.After; @@ -31,7 +32,7 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; import java.util.stream.Collectors; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.not; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/MlNativeAutodetectIntegTestCase.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/MlNativeAutodetectIntegTestCase.java index c2ef5ad87c1..0c2e4051c0e 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/MlNativeAutodetectIntegTestCase.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/MlNativeAutodetectIntegTestCase.java @@ -31,48 +31,48 @@ import org.elasticsearch.search.sort.SortOrder; import org.elasticsearch.tasks.Task; import org.elasticsearch.test.SecurityIntegTestCase; import org.elasticsearch.test.SecuritySettingsSourceField; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.ml.MlMetadata; -import org.elasticsearch.xpack.ml.action.CloseJobAction; -import org.elasticsearch.xpack.ml.action.DeleteDatafeedAction; -import org.elasticsearch.xpack.ml.action.DeleteJobAction; -import org.elasticsearch.xpack.ml.action.FlushJobAction; -import org.elasticsearch.xpack.ml.action.ForecastJobAction; -import org.elasticsearch.xpack.ml.action.GetBucketsAction; -import org.elasticsearch.xpack.ml.action.GetCategoriesAction; -import org.elasticsearch.xpack.ml.action.GetJobsAction; -import org.elasticsearch.xpack.ml.action.GetJobsStatsAction; -import org.elasticsearch.xpack.ml.action.GetModelSnapshotsAction; -import org.elasticsearch.xpack.ml.action.GetRecordsAction; -import org.elasticsearch.xpack.ml.action.OpenJobAction; -import org.elasticsearch.xpack.ml.action.PostDataAction; -import org.elasticsearch.xpack.ml.action.PutDatafeedAction; -import org.elasticsearch.xpack.ml.action.PutJobAction; -import org.elasticsearch.xpack.ml.action.RevertModelSnapshotAction; -import org.elasticsearch.xpack.ml.action.StartDatafeedAction; -import org.elasticsearch.xpack.ml.action.StopDatafeedAction; -import org.elasticsearch.xpack.ml.action.UpdateJobAction; -import org.elasticsearch.xpack.ml.action.util.PageParams; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; -import org.elasticsearch.xpack.ml.datafeed.DatafeedState; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.config.JobState; -import org.elasticsearch.xpack.ml.job.config.JobTaskStatus; -import org.elasticsearch.xpack.ml.job.config.JobUpdate; -import org.elasticsearch.xpack.ml.job.persistence.AnomalyDetectorsIndex; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.DataCounts; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshot; -import org.elasticsearch.xpack.ml.job.results.AnomalyRecord; -import org.elasticsearch.xpack.ml.job.results.Bucket; -import org.elasticsearch.xpack.ml.job.results.CategoryDefinition; -import org.elasticsearch.xpack.ml.job.results.Forecast; -import org.elasticsearch.xpack.ml.job.results.ForecastRequestStats; -import org.elasticsearch.xpack.ml.job.results.Result; -import org.elasticsearch.xpack.persistent.PersistentTaskParams; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData; -import org.elasticsearch.xpack.persistent.PersistentTasksNodeService; -import org.elasticsearch.xpack.security.SecurityField; -import org.elasticsearch.xpack.security.authc.TokenMetaData; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.ml.MlMetadata; +import org.elasticsearch.xpack.core.ml.action.CloseJobAction; +import org.elasticsearch.xpack.core.ml.action.DeleteDatafeedAction; +import org.elasticsearch.xpack.core.ml.action.DeleteJobAction; +import org.elasticsearch.xpack.core.ml.action.FlushJobAction; +import org.elasticsearch.xpack.core.ml.action.ForecastJobAction; +import org.elasticsearch.xpack.core.ml.action.GetBucketsAction; +import org.elasticsearch.xpack.core.ml.action.GetCategoriesAction; +import org.elasticsearch.xpack.core.ml.action.GetJobsAction; +import org.elasticsearch.xpack.core.ml.action.GetJobsStatsAction; +import org.elasticsearch.xpack.core.ml.action.GetModelSnapshotsAction; +import org.elasticsearch.xpack.core.ml.action.GetRecordsAction; +import org.elasticsearch.xpack.core.ml.action.OpenJobAction; +import org.elasticsearch.xpack.core.ml.action.PostDataAction; +import org.elasticsearch.xpack.core.ml.action.PutDatafeedAction; +import org.elasticsearch.xpack.core.ml.action.PutJobAction; +import org.elasticsearch.xpack.core.ml.action.RevertModelSnapshotAction; +import org.elasticsearch.xpack.core.ml.action.StartDatafeedAction; +import org.elasticsearch.xpack.core.ml.action.StopDatafeedAction; +import org.elasticsearch.xpack.core.ml.action.UpdateJobAction; +import org.elasticsearch.xpack.core.ml.action.util.PageParams; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedState; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.JobState; +import org.elasticsearch.xpack.core.ml.job.config.JobTaskStatus; +import org.elasticsearch.xpack.core.ml.job.config.JobUpdate; +import org.elasticsearch.xpack.core.ml.job.persistence.AnomalyDetectorsIndex; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.DataCounts; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshot; +import org.elasticsearch.xpack.core.ml.job.results.AnomalyRecord; +import org.elasticsearch.xpack.core.ml.job.results.Bucket; +import org.elasticsearch.xpack.core.ml.job.results.CategoryDefinition; +import org.elasticsearch.xpack.core.ml.job.results.Forecast; +import org.elasticsearch.xpack.core.ml.job.results.ForecastRequestStats; +import org.elasticsearch.xpack.core.ml.job.results.Result; +import org.elasticsearch.xpack.core.persistent.PersistentTaskParams; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData; +import org.elasticsearch.xpack.core.persistent.PersistentTasksNodeService; +import org.elasticsearch.xpack.core.security.SecurityField; +import org.elasticsearch.xpack.core.security.authc.TokenMetaData; import java.io.IOException; import java.net.URISyntaxException; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/NetworkDisruptionIT.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/NetworkDisruptionIT.java index ff1f44fa215..ec7cab63e3c 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/NetworkDisruptionIT.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/NetworkDisruptionIT.java @@ -17,12 +17,12 @@ import org.elasticsearch.plugins.Plugin; import org.elasticsearch.test.discovery.TestZenDiscovery; import org.elasticsearch.test.disruption.NetworkDisruption; import org.elasticsearch.test.transport.MockTransportService; -import org.elasticsearch.xpack.ml.action.CloseJobAction; -import org.elasticsearch.xpack.ml.action.OpenJobAction; -import org.elasticsearch.xpack.ml.action.PutJobAction; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.persistence.AnomalyDetectorsIndex; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.Quantiles; +import org.elasticsearch.xpack.core.ml.action.CloseJobAction; +import org.elasticsearch.xpack.core.ml.action.OpenJobAction; +import org.elasticsearch.xpack.core.ml.action.PutJobAction; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.persistence.AnomalyDetectorsIndex; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.Quantiles; import org.elasticsearch.xpack.ml.support.BaseMlIntegTestCase; import java.util.ArrayList; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/OverallBucketsIT.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/OverallBucketsIT.java index 9cb5c8c6e92..5d054cba706 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/OverallBucketsIT.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/OverallBucketsIT.java @@ -6,15 +6,15 @@ package org.elasticsearch.xpack.ml.integration; import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.xpack.ml.action.GetBucketsAction; -import org.elasticsearch.xpack.ml.action.GetJobsStatsAction; -import org.elasticsearch.xpack.ml.action.GetOverallBucketsAction; -import org.elasticsearch.xpack.ml.action.util.PageParams; -import org.elasticsearch.xpack.ml.job.config.AnalysisConfig; -import org.elasticsearch.xpack.ml.job.config.DataDescription; -import org.elasticsearch.xpack.ml.job.config.Detector; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSizeStats; +import org.elasticsearch.xpack.core.ml.action.GetBucketsAction; +import org.elasticsearch.xpack.core.ml.action.GetJobsStatsAction; +import org.elasticsearch.xpack.core.ml.action.GetOverallBucketsAction; +import org.elasticsearch.xpack.core.ml.action.util.PageParams; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.Detector; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSizeStats; import org.junit.After; import java.util.ArrayList; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/RestoreModelSnapshotIT.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/RestoreModelSnapshotIT.java index 3ff29e6af12..1c25139f05c 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/RestoreModelSnapshotIT.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/RestoreModelSnapshotIT.java @@ -6,13 +6,13 @@ package org.elasticsearch.xpack.ml.integration; import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.xpack.ml.action.GetJobsStatsAction; -import org.elasticsearch.xpack.ml.job.config.AnalysisConfig; -import org.elasticsearch.xpack.ml.job.config.DataDescription; -import org.elasticsearch.xpack.ml.job.config.Detector; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSizeStats; -import org.elasticsearch.xpack.ml.job.results.Bucket; +import org.elasticsearch.xpack.core.ml.action.GetJobsStatsAction; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.Detector; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSizeStats; +import org.elasticsearch.xpack.core.ml.job.results.Bucket; import org.junit.After; import java.util.ArrayList; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/RevertModelSnapshotIT.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/RevertModelSnapshotIT.java index ec53eb0d29f..f5904e9ce63 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/RevertModelSnapshotIT.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/RevertModelSnapshotIT.java @@ -12,14 +12,14 @@ import org.elasticsearch.common.xcontent.json.JsonXContent; import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.search.SearchHits; -import org.elasticsearch.xpack.ml.job.config.AnalysisConfig; -import org.elasticsearch.xpack.ml.job.config.DataDescription; -import org.elasticsearch.xpack.ml.job.config.Detector; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSizeStats; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshot; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.Quantiles; -import org.elasticsearch.xpack.ml.job.results.Bucket; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.Detector; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSizeStats; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshot; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.Quantiles; +import org.elasticsearch.xpack.core.ml.job.results.Bucket; import org.junit.After; import java.io.IOException; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/TooManyJobsIT.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/TooManyJobsIT.java index 130952d9606..dd80d0a9889 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/TooManyJobsIT.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/TooManyJobsIT.java @@ -13,18 +13,18 @@ import org.elasticsearch.common.unit.ByteSizeUnit; import org.elasticsearch.common.unit.ByteSizeValue; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.transport.TransportService; +import org.elasticsearch.xpack.core.ml.MlMetadata; +import org.elasticsearch.xpack.core.ml.action.CloseJobAction; +import org.elasticsearch.xpack.core.ml.action.GetJobsStatsAction; +import org.elasticsearch.xpack.core.ml.action.OpenJobAction; +import org.elasticsearch.xpack.core.ml.action.PutJobAction; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.JobState; +import org.elasticsearch.xpack.core.ml.job.config.JobTaskStatus; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.MlMetadata; -import org.elasticsearch.xpack.ml.action.CloseJobAction; -import org.elasticsearch.xpack.ml.action.GetJobsStatsAction; -import org.elasticsearch.xpack.ml.action.OpenJobAction; -import org.elasticsearch.xpack.ml.action.PutJobAction; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.config.JobState; -import org.elasticsearch.xpack.ml.job.config.JobTaskStatus; import org.elasticsearch.xpack.ml.job.process.autodetect.AutodetectProcessManager; import org.elasticsearch.xpack.ml.support.BaseMlIntegTestCase; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData; public class TooManyJobsIT extends BaseMlIntegTestCase { diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/UpdateInterimResultsIT.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/UpdateInterimResultsIT.java index bf071dd4cdd..3d5533fed08 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/UpdateInterimResultsIT.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/UpdateInterimResultsIT.java @@ -6,13 +6,13 @@ package org.elasticsearch.xpack.ml.integration; import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.xpack.ml.action.GetBucketsAction; -import org.elasticsearch.xpack.ml.action.util.PageParams; -import org.elasticsearch.xpack.ml.job.config.AnalysisConfig; -import org.elasticsearch.xpack.ml.job.config.DataDescription; -import org.elasticsearch.xpack.ml.job.config.Detector; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.results.Bucket; +import org.elasticsearch.xpack.core.ml.action.GetBucketsAction; +import org.elasticsearch.xpack.core.ml.action.util.PageParams; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.Detector; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.results.Bucket; import org.junit.After; import java.util.Collections; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/JobManagerTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/JobManagerTests.java index b3fb3910558..a5c12d87724 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/JobManagerTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/JobManagerTests.java @@ -20,24 +20,24 @@ import org.elasticsearch.env.Environment; import org.elasticsearch.env.TestEnvironment; import org.elasticsearch.index.analysis.AnalysisRegistry; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.MLMetadataField; -import org.elasticsearch.xpack.ml.MachineLearningField; -import org.elasticsearch.xpack.ml.MlMetadata; -import org.elasticsearch.xpack.ml.action.PutJobAction; -import org.elasticsearch.xpack.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.MLMetadataField; +import org.elasticsearch.xpack.core.ml.MachineLearningField; +import org.elasticsearch.xpack.core.ml.MlMetadata; +import org.elasticsearch.xpack.core.ml.action.PutJobAction; +import org.elasticsearch.xpack.core.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.DetectionRule; +import org.elasticsearch.xpack.core.ml.job.config.Detector; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.JobState; +import org.elasticsearch.xpack.core.ml.job.config.MlFilter; +import org.elasticsearch.xpack.core.ml.job.config.RuleCondition; +import org.elasticsearch.xpack.core.ml.job.persistence.JobProvider; +import org.elasticsearch.xpack.core.persistent.PersistentTasksCustomMetaData; import org.elasticsearch.xpack.ml.job.categorization.CategorizationAnalyzerTests; -import org.elasticsearch.xpack.ml.job.config.AnalysisConfig; -import org.elasticsearch.xpack.ml.job.config.DataDescription; -import org.elasticsearch.xpack.ml.job.config.DetectionRule; -import org.elasticsearch.xpack.ml.job.config.Detector; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.config.JobState; -import org.elasticsearch.xpack.ml.job.config.MlFilter; -import org.elasticsearch.xpack.ml.job.config.RuleCondition; -import org.elasticsearch.xpack.ml.job.persistence.JobProvider; import org.elasticsearch.xpack.ml.job.process.autodetect.UpdateParams; import org.elasticsearch.xpack.ml.notifications.Auditor; -import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData; import org.junit.Before; import org.mockito.ArgumentCaptor; import org.mockito.Matchers; @@ -48,8 +48,8 @@ import java.util.Collections; import java.util.Date; import java.util.List; +import static org.elasticsearch.xpack.core.ml.job.config.JobTests.buildJobBuilder; import static org.elasticsearch.xpack.ml.action.OpenJobActionTests.addJobTask; -import static org.elasticsearch.xpack.ml.job.config.JobTests.buildJobBuilder; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThanOrEqualTo; import static org.hamcrest.Matchers.is; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/categorization/CategorizationAnalyzerTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/categorization/CategorizationAnalyzerTests.java index cc3a1372f17..418b4439262 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/categorization/CategorizationAnalyzerTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/categorization/CategorizationAnalyzerTests.java @@ -12,9 +12,8 @@ import org.elasticsearch.env.TestEnvironment; import org.elasticsearch.index.analysis.AnalysisRegistry; import org.elasticsearch.indices.analysis.AnalysisModule; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.XPackPlugin; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.job.config.CategorizationAnalyzerConfig; +import org.elasticsearch.xpack.core.ml.job.config.CategorizationAnalyzerConfig; import org.junit.Before; import java.io.IOException; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/CategorizationAnalyzerConfigTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/CategorizationAnalyzerConfigTests.java index 3e45dd73fd0..9c725fe7629 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/CategorizationAnalyzerConfigTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/CategorizationAnalyzerConfigTests.java @@ -12,7 +12,8 @@ import org.elasticsearch.env.Environment; import org.elasticsearch.env.TestEnvironment; import org.elasticsearch.index.analysis.AnalysisRegistry; import org.elasticsearch.test.AbstractSerializingTestCase; -import org.elasticsearch.xpack.ml.MlParserType; +import org.elasticsearch.xpack.core.ml.job.config.CategorizationAnalyzerConfig; +import org.elasticsearch.xpack.core.ml.MlParserType; import org.elasticsearch.xpack.ml.job.categorization.CategorizationAnalyzerTests; import org.junit.Before; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/ConditionTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/ConditionTests.java index 10715bb39c1..09bae9fb8cb 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/ConditionTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/ConditionTests.java @@ -10,7 +10,9 @@ import org.elasticsearch.common.io.stream.Writeable.Reader; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.AbstractSerializingTestCase; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.job.messages.Messages; +import org.elasticsearch.xpack.core.ml.job.config.Condition; +import org.elasticsearch.xpack.core.ml.job.config.Operator; +import org.elasticsearch.xpack.core.ml.job.messages.Messages; import java.io.IOException; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/ConnectiveTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/ConnectiveTests.java index 0b34d489512..c8f9b6d36cb 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/ConnectiveTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/ConnectiveTests.java @@ -8,6 +8,7 @@ package org.elasticsearch.xpack.ml.job.config; import org.elasticsearch.common.io.stream.BytesStreamOutput; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.ml.job.config.Connective; import java.io.IOException; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/DataFormatTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/DataFormatTests.java index 0f72d8239c9..6c7d3347618 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/DataFormatTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/DataFormatTests.java @@ -8,7 +8,7 @@ package org.elasticsearch.xpack.ml.job.config; import org.elasticsearch.common.io.stream.BytesStreamOutput; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.job.config.DataDescription.DataFormat; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription.DataFormat; import java.io.IOException; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/DefaultDetectorDescriptionTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/DefaultDetectorDescriptionTests.java index 6e60ab63c1c..fc95aaaa973 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/DefaultDetectorDescriptionTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/DefaultDetectorDescriptionTests.java @@ -6,6 +6,8 @@ package org.elasticsearch.xpack.ml.job.config; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.ml.job.config.DefaultDetectorDescription; +import org.elasticsearch.xpack.core.ml.job.config.Detector; public class DefaultDetectorDescriptionTests extends ESTestCase { diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/JobBuilderTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/JobBuilderTests.java index 79e9da3b39c..e5f1c32fb8c 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/JobBuilderTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/JobBuilderTests.java @@ -9,11 +9,16 @@ import org.elasticsearch.common.io.stream.Writeable; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.AbstractSerializingTestCase; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfigTests; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisLimitsTests; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.ModelPlotConfig; import java.util.Collections; import java.util.Date; -import static org.elasticsearch.xpack.ml.job.config.JobTests.randomValidJobId; +import static org.elasticsearch.xpack.core.ml.job.config.JobTests.randomValidJobId; public class JobBuilderTests extends AbstractSerializingTestCase { @Override diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/JobStateTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/JobStateTests.java index ec7f378895f..cd983c6b030 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/JobStateTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/JobStateTests.java @@ -8,6 +8,7 @@ package org.elasticsearch.xpack.ml.job.config; import org.elasticsearch.Version; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.ml.job.config.JobState; import org.mockito.ArgumentCaptor; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/JobTaskStatusTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/JobTaskStatusTests.java index 40b20cd4ccb..7183235b6ff 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/JobTaskStatusTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/JobTaskStatusTests.java @@ -8,6 +8,8 @@ package org.elasticsearch.xpack.ml.job.config; import org.elasticsearch.common.io.stream.Writeable; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.AbstractSerializingTestCase; +import org.elasticsearch.xpack.core.ml.job.config.JobState; +import org.elasticsearch.xpack.core.ml.job.config.JobTaskStatus; public class JobTaskStatusTests extends AbstractSerializingTestCase { diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/MlFilterTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/MlFilterTests.java index e6e0d89d612..64b76b8c0eb 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/MlFilterTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/MlFilterTests.java @@ -8,6 +8,7 @@ package org.elasticsearch.xpack.ml.job.config; import org.elasticsearch.common.io.stream.Writeable.Reader; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.AbstractSerializingTestCase; +import org.elasticsearch.xpack.core.ml.job.config.MlFilter; import java.util.ArrayList; import java.util.Collections; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/ModelPlotConfigTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/ModelPlotConfigTests.java index b85790669a2..7b9a94eb009 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/ModelPlotConfigTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/ModelPlotConfigTests.java @@ -8,6 +8,7 @@ package org.elasticsearch.xpack.ml.job.config; import org.elasticsearch.common.io.stream.Writeable.Reader; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.AbstractSerializingTestCase; +import org.elasticsearch.xpack.core.ml.job.config.ModelPlotConfig; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.nullValue; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/OperatorTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/OperatorTests.java index 695d7eea087..07f4d4c5edf 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/OperatorTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/OperatorTests.java @@ -8,6 +8,7 @@ package org.elasticsearch.xpack.ml.job.config; import org.elasticsearch.common.io.stream.BytesStreamOutput; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.ml.job.config.Operator; import java.io.IOException; import java.util.regex.Pattern; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/RuleActionTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/RuleActionTests.java index b371471227a..1aeefc47ac6 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/RuleActionTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/RuleActionTests.java @@ -8,6 +8,7 @@ package org.elasticsearch.xpack.ml.job.config; import org.elasticsearch.common.io.stream.BytesStreamOutput; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.ml.job.config.RuleAction; import static org.hamcrest.Matchers.equalTo; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/RuleConditionTypeTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/RuleConditionTypeTests.java index 9f20b370c1d..c053d48e7f8 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/RuleConditionTypeTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/config/RuleConditionTypeTests.java @@ -8,6 +8,7 @@ package org.elasticsearch.xpack.ml.job.config; import org.elasticsearch.common.io.stream.BytesStreamOutput; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.ml.job.config.RuleConditionType; import java.io.IOException; import java.util.EnumSet; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/messages/MessagesTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/messages/MessagesTests.java index 0f76699d046..e8472de5671 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/messages/MessagesTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/messages/MessagesTests.java @@ -6,6 +6,7 @@ package org.elasticsearch.xpack.ml.job.messages; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.ml.job.messages.Messages; public class MessagesTests extends ESTestCase { diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/persistence/BatchedDocumentsIteratorTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/persistence/BatchedDocumentsIteratorTests.java index 47a168aefad..96337e1e7a2 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/persistence/BatchedDocumentsIteratorTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/persistence/BatchedDocumentsIteratorTests.java @@ -17,6 +17,7 @@ import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.search.SearchHit; import org.elasticsearch.search.SearchHits; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.ml.job.persistence.BatchedDocumentsIterator; import org.elasticsearch.xpack.ml.test.SearchHitBuilder; import org.junit.Before; import org.mockito.ArgumentCaptor; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/persistence/InfluencersQueryBuilderTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/persistence/InfluencersQueryBuilderTests.java index e9530fb9258..af1265cdf7d 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/persistence/InfluencersQueryBuilderTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/persistence/InfluencersQueryBuilderTests.java @@ -6,7 +6,8 @@ package org.elasticsearch.xpack.ml.job.persistence; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.job.results.Influencer; +import org.elasticsearch.xpack.core.ml.job.persistence.InfluencersQueryBuilder; +import org.elasticsearch.xpack.core.ml.job.results.Influencer; public class InfluencersQueryBuilderTests extends ESTestCase { diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/persistence/JobProviderTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/persistence/JobProviderTests.java index 91e544aeb51..674279dcdb0 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/persistence/JobProviderTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/persistence/JobProviderTests.java @@ -38,17 +38,23 @@ import org.elasticsearch.search.SearchHit; import org.elasticsearch.search.SearchHits; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.xpack.ml.MLMetadataField; -import org.elasticsearch.xpack.ml.MlMetadata; -import org.elasticsearch.xpack.ml.action.util.QueryPage; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.persistence.InfluencersQueryBuilder.InfluencersQuery; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshot; -import org.elasticsearch.xpack.ml.job.results.AnomalyRecord; -import org.elasticsearch.xpack.ml.job.results.Bucket; -import org.elasticsearch.xpack.ml.job.results.CategoryDefinition; -import org.elasticsearch.xpack.ml.job.results.Influencer; -import org.elasticsearch.xpack.ml.job.results.Result; +import org.elasticsearch.xpack.core.ml.MLMetadataField; +import org.elasticsearch.xpack.core.ml.MlMetadata; +import org.elasticsearch.xpack.core.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.persistence.AnomalyDetectorsIndex; +import org.elasticsearch.xpack.core.ml.job.persistence.AnomalyDetectorsIndexFields; +import org.elasticsearch.xpack.core.ml.job.persistence.BucketsQueryBuilder; +import org.elasticsearch.xpack.core.ml.job.persistence.InfluencersQueryBuilder; +import org.elasticsearch.xpack.core.ml.job.persistence.InfluencersQueryBuilder.InfluencersQuery; +import org.elasticsearch.xpack.core.ml.job.persistence.JobProvider; +import org.elasticsearch.xpack.core.ml.job.persistence.RecordsQueryBuilder; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshot; +import org.elasticsearch.xpack.core.ml.job.results.AnomalyRecord; +import org.elasticsearch.xpack.core.ml.job.results.Bucket; +import org.elasticsearch.xpack.core.ml.job.results.CategoryDefinition; +import org.elasticsearch.xpack.core.ml.job.results.Influencer; +import org.elasticsearch.xpack.core.ml.job.results.Result; import org.mockito.ArgumentCaptor; import java.io.IOException; @@ -62,7 +68,7 @@ import java.util.concurrent.ExecutionException; import java.util.concurrent.atomic.AtomicReference; import java.util.function.Consumer; -import static org.elasticsearch.xpack.ml.job.config.JobTests.buildJobBuilder; +import static org.elasticsearch.xpack.core.ml.job.config.JobTests.buildJobBuilder; import static org.hamcrest.Matchers.equalTo; import static org.mockito.Matchers.any; import static org.mockito.Matchers.eq; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/persistence/JobRenormalizedResultsPersisterTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/persistence/JobRenormalizedResultsPersisterTests.java index 0e500c999b5..b1ec3008d33 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/persistence/JobRenormalizedResultsPersisterTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/persistence/JobRenormalizedResultsPersisterTests.java @@ -10,9 +10,9 @@ import org.elasticsearch.client.Client; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.xpack.ml.job.process.normalizer.BucketNormalizable; -import org.elasticsearch.xpack.ml.job.results.Bucket; -import org.elasticsearch.xpack.ml.job.results.BucketInfluencer; -import org.elasticsearch.xpack.ml.job.results.ModelPlot; +import org.elasticsearch.xpack.core.ml.job.results.Bucket; +import org.elasticsearch.xpack.core.ml.job.results.BucketInfluencer; +import org.elasticsearch.xpack.core.ml.job.results.ModelPlot; import java.util.Date; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/persistence/JobResultsPersisterTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/persistence/JobResultsPersisterTests.java index 59bf73f955d..f2c18ec9d5a 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/persistence/JobResultsPersisterTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/persistence/JobResultsPersisterTests.java @@ -15,11 +15,11 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.xpack.ml.job.results.AnomalyRecord; -import org.elasticsearch.xpack.ml.job.results.Bucket; -import org.elasticsearch.xpack.ml.job.results.BucketInfluencer; -import org.elasticsearch.xpack.ml.job.results.Influencer; -import org.elasticsearch.xpack.ml.job.results.ModelPlot; +import org.elasticsearch.xpack.core.ml.job.results.AnomalyRecord; +import org.elasticsearch.xpack.core.ml.job.results.Bucket; +import org.elasticsearch.xpack.core.ml.job.results.BucketInfluencer; +import org.elasticsearch.xpack.core.ml.job.results.Influencer; +import org.elasticsearch.xpack.core.ml.job.results.ModelPlot; import org.mockito.ArgumentCaptor; import java.io.IOException; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/persistence/MockBatchedDocumentsIterator.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/persistence/MockBatchedDocumentsIterator.java index d2b0937d494..d483711c10a 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/persistence/MockBatchedDocumentsIterator.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/persistence/MockBatchedDocumentsIterator.java @@ -8,7 +8,8 @@ package org.elasticsearch.xpack.ml.job.persistence; import org.elasticsearch.client.Client; import org.elasticsearch.common.Nullable; import org.elasticsearch.search.SearchHit; -import org.elasticsearch.xpack.ml.job.results.Result; +import org.elasticsearch.xpack.core.ml.job.persistence.BatchedResultsIterator; +import org.elasticsearch.xpack.core.ml.job.results.Result; import java.util.Deque; import java.util.List; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/persistence/MockClientBuilder.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/persistence/MockClientBuilder.java index 289d784cb99..437a965dcf0 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/persistence/MockClientBuilder.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/persistence/MockClientBuilder.java @@ -50,7 +50,7 @@ import org.elasticsearch.index.query.QueryBuilder; import org.elasticsearch.search.sort.SortBuilder; import org.elasticsearch.search.sort.SortOrder; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.xpack.ml.action.DeleteJobAction; +import org.elasticsearch.xpack.core.ml.action.DeleteJobAction; import org.mockito.ArgumentCaptor; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/persistence/ResultsFilterBuilderTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/persistence/ResultsFilterBuilderTests.java index 1c8ef26e0dc..75db898e856 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/persistence/ResultsFilterBuilderTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/persistence/ResultsFilterBuilderTests.java @@ -8,7 +8,8 @@ package org.elasticsearch.xpack.ml.job.persistence; import org.elasticsearch.index.query.QueryBuilder; import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.job.results.Result; +import org.elasticsearch.xpack.core.ml.job.persistence.ResultsFilterBuilder; +import org.elasticsearch.xpack.core.ml.job.results.Result; public class ResultsFilterBuilderTests extends ESTestCase { private static final String TIMESTAMP = "timestamp"; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/persistence/StateStreamerTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/persistence/StateStreamerTests.java index 10d86cfcc21..4a95fd7f251 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/persistence/StateStreamerTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/persistence/StateStreamerTests.java @@ -10,9 +10,11 @@ import org.elasticsearch.client.Client; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.mock.orig.Mockito; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.CategorizerState; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshot; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelState; +import org.elasticsearch.xpack.core.ml.job.persistence.AnomalyDetectorsIndex; +import org.elasticsearch.xpack.core.ml.job.persistence.ElasticsearchMappings; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.CategorizerState; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshot; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelState; import java.io.ByteArrayOutputStream; import java.io.IOException; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/persistence/overallbuckets/OverallBucketsAggregatorTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/persistence/overallbuckets/OverallBucketsAggregatorTests.java index f71ebc01551..0eba2de3be5 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/persistence/overallbuckets/OverallBucketsAggregatorTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/persistence/overallbuckets/OverallBucketsAggregatorTests.java @@ -7,8 +7,8 @@ package org.elasticsearch.xpack.ml.job.persistence.overallbuckets; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.job.results.OverallBucket; -import org.elasticsearch.xpack.ml.job.results.OverallBucket.JobInfo; +import org.elasticsearch.xpack.core.ml.job.results.OverallBucket; +import org.elasticsearch.xpack.core.ml.job.results.OverallBucket.JobInfo; import java.util.ArrayList; import java.util.Arrays; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/persistence/overallbuckets/OverallBucketsCollectorTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/persistence/overallbuckets/OverallBucketsCollectorTests.java index 809bb4c118d..67ed274c7e7 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/persistence/overallbuckets/OverallBucketsCollectorTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/persistence/overallbuckets/OverallBucketsCollectorTests.java @@ -6,7 +6,7 @@ package org.elasticsearch.xpack.ml.job.persistence.overallbuckets; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.job.results.OverallBucket; +import org.elasticsearch.xpack.core.ml.job.results.OverallBucket; import java.util.Arrays; import java.util.Collections; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/DataCountsReporterTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/DataCountsReporterTests.java index 3776e0fb921..d3afb732418 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/DataCountsReporterTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/DataCountsReporterTests.java @@ -10,12 +10,12 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.env.Environment; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.job.config.AnalysisConfig; -import org.elasticsearch.xpack.ml.job.config.DataDescription; -import org.elasticsearch.xpack.ml.job.config.Detector; -import org.elasticsearch.xpack.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.Detector; +import org.elasticsearch.xpack.core.ml.job.config.Job; import org.elasticsearch.xpack.ml.job.persistence.JobDataCountsPersister; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.DataCounts; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.DataCounts; import org.junit.Before; import org.mockito.Mockito; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/DataStreamDiagnosticsTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/DataStreamDiagnosticsTests.java index 46d9127c478..2c167f0df82 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/DataStreamDiagnosticsTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/DataStreamDiagnosticsTests.java @@ -7,10 +7,10 @@ package org.elasticsearch.xpack.ml.job.process; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.job.config.AnalysisConfig; -import org.elasticsearch.xpack.ml.job.config.DataDescription; -import org.elasticsearch.xpack.ml.job.config.Detector; -import org.elasticsearch.xpack.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.Detector; +import org.elasticsearch.xpack.core.ml.job.config.Job; import org.junit.Before; import java.io.IOException; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/DummyDataCountsReporter.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/DummyDataCountsReporter.java index ee2df3521ba..bcf41a994b9 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/DummyDataCountsReporter.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/DummyDataCountsReporter.java @@ -7,12 +7,12 @@ package org.elasticsearch.xpack.ml.job.process; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.xpack.ml.job.config.AnalysisConfig; -import org.elasticsearch.xpack.ml.job.config.DataDescription; -import org.elasticsearch.xpack.ml.job.config.Detector; -import org.elasticsearch.xpack.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.Detector; +import org.elasticsearch.xpack.core.ml.job.config.Job; import org.elasticsearch.xpack.ml.job.persistence.JobDataCountsPersister; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.DataCounts; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.DataCounts; import java.util.Arrays; import java.util.Date; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/ProcessCtrlTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/ProcessCtrlTests.java index 7cbd7cc4ac7..4690bde52e3 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/ProcessCtrlTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/ProcessCtrlTests.java @@ -11,17 +11,17 @@ import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.env.Environment; import org.elasticsearch.env.TestEnvironment; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.job.config.AnalysisConfig; -import org.elasticsearch.xpack.ml.job.config.DataDescription; -import org.elasticsearch.xpack.ml.job.config.Detector; -import org.elasticsearch.xpack.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.Detector; +import org.elasticsearch.xpack.core.ml.job.config.Job; import org.mockito.Mockito; import java.io.IOException; import java.util.Collections; import java.util.List; -import static org.elasticsearch.xpack.ml.job.config.JobTests.buildJobBuilder; +import static org.elasticsearch.xpack.core.ml.job.config.JobTests.buildJobBuilder; public class ProcessCtrlTests extends ESTestCase { diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectCommunicatorTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectCommunicatorTests.java index 900a86c6c28..0aecad2b3a6 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectCommunicatorTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectCommunicatorTests.java @@ -14,20 +14,20 @@ import org.elasticsearch.env.Environment; import org.elasticsearch.env.TestEnvironment; import org.elasticsearch.index.analysis.AnalysisRegistry; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.calendars.ScheduledEvent; -import org.elasticsearch.xpack.ml.calendars.ScheduledEventTests; +import org.elasticsearch.xpack.core.ml.calendars.ScheduledEvent; +import org.elasticsearch.xpack.core.ml.calendars.ScheduledEventTests; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.DetectionRule; +import org.elasticsearch.xpack.core.ml.job.config.Detector; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.JobUpdate; +import org.elasticsearch.xpack.core.ml.job.config.RuleCondition; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.output.FlushAcknowledgement; import org.elasticsearch.xpack.ml.job.categorization.CategorizationAnalyzerTests; -import org.elasticsearch.xpack.ml.job.config.AnalysisConfig; -import org.elasticsearch.xpack.ml.job.config.DataDescription; -import org.elasticsearch.xpack.ml.job.config.DetectionRule; -import org.elasticsearch.xpack.ml.job.config.Detector; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.config.JobUpdate; -import org.elasticsearch.xpack.ml.job.config.RuleCondition; import org.elasticsearch.xpack.ml.job.persistence.StateStreamer; import org.elasticsearch.xpack.ml.job.process.DataCountsReporter; import org.elasticsearch.xpack.ml.job.process.autodetect.output.AutoDetectResultProcessor; -import org.elasticsearch.xpack.ml.job.process.autodetect.output.FlushAcknowledgement; import org.elasticsearch.xpack.ml.job.process.autodetect.params.DataLoadParams; import org.elasticsearch.xpack.ml.job.process.autodetect.params.FlushJobParams; import org.elasticsearch.xpack.ml.job.process.autodetect.params.TimeRange; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectProcessManagerTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectProcessManagerTests.java index 8645dbb4f36..a1afc619026 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectProcessManagerTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectProcessManagerTests.java @@ -24,27 +24,27 @@ import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.xpack.ml.action.TransportOpenJobAction.JobTask; import org.elasticsearch.xpack.ml.job.JobManager; import org.elasticsearch.xpack.ml.job.categorization.CategorizationAnalyzerTests; -import org.elasticsearch.xpack.ml.job.config.AnalysisConfig; -import org.elasticsearch.xpack.ml.job.config.DataDescription; -import org.elasticsearch.xpack.ml.job.config.DetectionRule; -import org.elasticsearch.xpack.ml.job.config.Detector; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.config.JobState; -import org.elasticsearch.xpack.ml.job.config.JobTaskStatus; -import org.elasticsearch.xpack.ml.job.config.JobUpdate; -import org.elasticsearch.xpack.ml.job.config.MlFilter; -import org.elasticsearch.xpack.ml.job.config.ModelPlotConfig; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.DetectionRule; +import org.elasticsearch.xpack.core.ml.job.config.Detector; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.JobState; +import org.elasticsearch.xpack.core.ml.job.config.JobTaskStatus; +import org.elasticsearch.xpack.core.ml.job.config.JobUpdate; +import org.elasticsearch.xpack.core.ml.job.config.MlFilter; +import org.elasticsearch.xpack.core.ml.job.config.ModelPlotConfig; import org.elasticsearch.xpack.ml.job.persistence.JobDataCountsPersister; -import org.elasticsearch.xpack.ml.job.persistence.JobProvider; +import org.elasticsearch.xpack.core.ml.job.persistence.JobProvider; import org.elasticsearch.xpack.ml.job.persistence.JobResultsPersister; -import org.elasticsearch.xpack.ml.job.process.autodetect.params.AutodetectParams; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.params.AutodetectParams; import org.elasticsearch.xpack.ml.job.process.autodetect.params.DataLoadParams; import org.elasticsearch.xpack.ml.job.process.autodetect.params.FlushJobParams; import org.elasticsearch.xpack.ml.job.process.autodetect.params.TimeRange; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.DataCounts; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSizeStats; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshot; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.Quantiles; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.DataCounts; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSizeStats; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshot; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.Quantiles; import org.elasticsearch.xpack.ml.job.process.normalizer.NormalizerFactory; import org.elasticsearch.xpack.ml.notifications.Auditor; import org.junit.Before; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/BlackHoleAutodetectProcessTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/BlackHoleAutodetectProcessTests.java index 6120e78cd25..4b11fd813ce 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/BlackHoleAutodetectProcessTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/BlackHoleAutodetectProcessTests.java @@ -6,7 +6,7 @@ package org.elasticsearch.xpack.ml.job.process.autodetect; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.job.process.autodetect.output.FlushAcknowledgement; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.output.FlushAcknowledgement; import org.elasticsearch.xpack.ml.job.process.autodetect.params.FlushJobParams; import org.elasticsearch.xpack.ml.job.results.AutodetectResult; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/NativeAutodetectProcessTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/NativeAutodetectProcessTests.java index 439b67d7033..2ab27eedbac 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/NativeAutodetectProcessTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/NativeAutodetectProcessTests.java @@ -7,7 +7,7 @@ package org.elasticsearch.xpack.ml.job.process.autodetect; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.job.config.ModelPlotConfig; +import org.elasticsearch.xpack.core.ml.job.config.ModelPlotConfig; import org.elasticsearch.xpack.ml.job.process.autodetect.output.AutodetectResultsParser; import org.elasticsearch.xpack.ml.job.process.autodetect.output.StateProcessor; import org.elasticsearch.xpack.ml.job.process.autodetect.params.DataLoadParams; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/AutoDetectResultProcessorTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/AutoDetectResultProcessorTests.java index c55da2598a2..8f2c5887d7f 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/AutoDetectResultProcessorTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/AutoDetectResultProcessorTests.java @@ -13,21 +13,22 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.xpack.ml.action.UpdateJobAction; -import org.elasticsearch.xpack.ml.job.config.JobUpdate; -import org.elasticsearch.xpack.ml.job.persistence.JobProvider; +import org.elasticsearch.xpack.core.ml.action.UpdateJobAction; +import org.elasticsearch.xpack.core.ml.job.config.JobUpdate; +import org.elasticsearch.xpack.core.ml.job.persistence.JobProvider; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.output.FlushAcknowledgement; import org.elasticsearch.xpack.ml.job.persistence.JobResultsPersister; import org.elasticsearch.xpack.ml.job.process.autodetect.AutodetectProcess; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSizeStats; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshot; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.Quantiles; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSizeStats; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshot; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.Quantiles; import org.elasticsearch.xpack.ml.job.process.normalizer.Renormalizer; -import org.elasticsearch.xpack.ml.job.results.AnomalyRecord; +import org.elasticsearch.xpack.core.ml.job.results.AnomalyRecord; import org.elasticsearch.xpack.ml.job.results.AutodetectResult; -import org.elasticsearch.xpack.ml.job.results.Bucket; -import org.elasticsearch.xpack.ml.job.results.CategoryDefinition; -import org.elasticsearch.xpack.ml.job.results.Influencer; -import org.elasticsearch.xpack.ml.job.results.ModelPlot; +import org.elasticsearch.xpack.core.ml.job.results.Bucket; +import org.elasticsearch.xpack.core.ml.job.results.CategoryDefinition; +import org.elasticsearch.xpack.core.ml.job.results.Influencer; +import org.elasticsearch.xpack.core.ml.job.results.ModelPlot; import org.junit.Before; import org.mockito.InOrder; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/AutodetectResultsParserTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/AutodetectResultsParserTests.java index b5d4c2f87b3..67c6d68703e 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/AutodetectResultsParserTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/AutodetectResultsParserTests.java @@ -9,10 +9,10 @@ import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.common.ParsingException; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.Quantiles; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.Quantiles; import org.elasticsearch.xpack.ml.job.results.AutodetectResult; -import org.elasticsearch.xpack.ml.job.results.Bucket; -import org.elasticsearch.xpack.ml.job.results.BucketInfluencer; +import org.elasticsearch.xpack.core.ml.job.results.Bucket; +import org.elasticsearch.xpack.core.ml.job.results.BucketInfluencer; import java.io.ByteArrayInputStream; import java.io.IOException; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/FlushAcknowledgementTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/FlushAcknowledgementTests.java index d451bd57267..25af894fd3f 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/FlushAcknowledgementTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/FlushAcknowledgementTests.java @@ -8,6 +8,7 @@ package org.elasticsearch.xpack.ml.job.process.autodetect.output; import org.elasticsearch.common.io.stream.Writeable.Reader; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.AbstractSerializingTestCase; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.output.FlushAcknowledgement; import java.util.Date; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/FlushListenerTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/FlushListenerTests.java index 2bd62d971a9..70ba757f148 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/FlushListenerTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/FlushListenerTests.java @@ -6,6 +6,7 @@ package org.elasticsearch.xpack.ml.job.process.autodetect.output; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.output.FlushAcknowledgement; import java.time.Duration; import java.util.ArrayList; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/TimeRangeTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/TimeRangeTests.java index 4f80fe72f53..00593d12898 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/TimeRangeTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/TimeRangeTests.java @@ -7,7 +7,7 @@ package org.elasticsearch.xpack.ml.job.process.autodetect.params; import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.job.messages.Messages; +import org.elasticsearch.xpack.core.ml.job.messages.Messages; public class TimeRangeTests extends ESTestCase { public void testGetStart() { diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/DataCountsTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/DataCountsTests.java index 5da24e8117e..f1ab23a821a 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/DataCountsTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/DataCountsTests.java @@ -8,6 +8,7 @@ package org.elasticsearch.xpack.ml.job.process.autodetect.state; import org.elasticsearch.common.io.stream.Writeable; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.AbstractSerializingTestCase; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.DataCounts; import org.joda.time.DateTime; import java.util.Date; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/MemoryStatusTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/MemoryStatusTests.java index 321468117e9..e9d28406598 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/MemoryStatusTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/MemoryStatusTests.java @@ -8,7 +8,7 @@ package org.elasticsearch.xpack.ml.job.process.autodetect.state; import org.elasticsearch.common.io.stream.BytesStreamOutput; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSizeStats.MemoryStatus; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSizeStats.MemoryStatus; import java.io.IOException; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/ModelSizeStatsTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/ModelSizeStatsTests.java index cc50fe3574e..010c4590c87 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/ModelSizeStatsTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/ModelSizeStatsTests.java @@ -9,7 +9,8 @@ import org.elasticsearch.common.io.stream.Writeable.Reader; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.AbstractSerializingTestCase; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSizeStats.MemoryStatus; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSizeStats; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSizeStats.MemoryStatus; import java.util.Date; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/ModelSnapshotTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/ModelSnapshotTests.java index 127f2aa7320..42bd034c6cb 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/ModelSnapshotTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/ModelSnapshotTests.java @@ -9,6 +9,9 @@ import org.elasticsearch.common.io.stream.Writeable.Reader; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.AbstractSerializingTestCase; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSizeStats; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshot; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.Quantiles; import java.util.Arrays; import java.util.Date; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/QuantilesTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/QuantilesTests.java index c9e99e76c07..935adf05498 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/QuantilesTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/QuantilesTests.java @@ -9,6 +9,7 @@ import org.elasticsearch.common.io.stream.Writeable.Reader; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.AbstractSerializingTestCase; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.Quantiles; import java.util.Date; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/AbstractDataToProcessWriterTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/AbstractDataToProcessWriterTests.java index 259ad6949bd..38bef42f800 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/AbstractDataToProcessWriterTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/AbstractDataToProcessWriterTests.java @@ -12,10 +12,10 @@ import org.elasticsearch.index.analysis.AnalysisRegistry; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.xpack.ml.job.categorization.CategorizationAnalyzer; import org.elasticsearch.xpack.ml.job.categorization.CategorizationAnalyzerTests; -import org.elasticsearch.xpack.ml.job.config.AnalysisConfig; -import org.elasticsearch.xpack.ml.job.config.CategorizationAnalyzerConfig; -import org.elasticsearch.xpack.ml.job.config.DataDescription; -import org.elasticsearch.xpack.ml.job.config.Detector; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig; +import org.elasticsearch.xpack.core.ml.job.config.CategorizationAnalyzerConfig; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.Detector; import org.elasticsearch.xpack.ml.job.process.DataCountsReporter; import org.elasticsearch.xpack.ml.job.process.autodetect.AutodetectProcess; import org.elasticsearch.xpack.ml.job.process.autodetect.writer.AbstractDataToProcessWriter.InputOutputMap; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/AnalysisLimitsWriterTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/AnalysisLimitsWriterTests.java index 076ba9ffbb9..af1c53cb0b0 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/AnalysisLimitsWriterTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/AnalysisLimitsWriterTests.java @@ -6,7 +6,7 @@ package org.elasticsearch.xpack.ml.job.process.autodetect.writer; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.job.config.AnalysisLimits; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisLimits; import org.junit.After; import org.junit.Before; import org.mockito.Mockito; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/ControlMsgToProcessWriterTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/ControlMsgToProcessWriterTests.java index 114b7809988..fd92df1f6ab 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/ControlMsgToProcessWriterTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/ControlMsgToProcessWriterTests.java @@ -7,15 +7,15 @@ package org.elasticsearch.xpack.ml.job.process.autodetect.writer; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.calendars.ScheduledEvent; -import org.elasticsearch.xpack.ml.job.config.Condition; -import org.elasticsearch.xpack.ml.job.config.Connective; -import org.elasticsearch.xpack.ml.job.config.DetectionRule; -import org.elasticsearch.xpack.ml.job.config.MlFilter; -import org.elasticsearch.xpack.ml.job.config.ModelPlotConfig; -import org.elasticsearch.xpack.ml.job.config.Operator; -import org.elasticsearch.xpack.ml.job.config.RuleCondition; -import org.elasticsearch.xpack.ml.job.config.RuleConditionType; +import org.elasticsearch.xpack.core.ml.calendars.ScheduledEvent; +import org.elasticsearch.xpack.core.ml.job.config.Condition; +import org.elasticsearch.xpack.core.ml.job.config.Connective; +import org.elasticsearch.xpack.core.ml.job.config.DetectionRule; +import org.elasticsearch.xpack.core.ml.job.config.MlFilter; +import org.elasticsearch.xpack.core.ml.job.config.ModelPlotConfig; +import org.elasticsearch.xpack.core.ml.job.config.Operator; +import org.elasticsearch.xpack.core.ml.job.config.RuleCondition; +import org.elasticsearch.xpack.core.ml.job.config.RuleConditionType; import org.elasticsearch.xpack.ml.job.process.autodetect.params.DataLoadParams; import org.elasticsearch.xpack.ml.job.process.autodetect.params.FlushJobParams; import org.elasticsearch.xpack.ml.job.process.autodetect.params.TimeRange; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/CsvDataToProcessWriterTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/CsvDataToProcessWriterTests.java index 2d153ad72ba..abe4a44f69f 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/CsvDataToProcessWriterTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/CsvDataToProcessWriterTests.java @@ -15,14 +15,14 @@ import org.elasticsearch.test.ESTestCase; import org.elasticsearch.xpack.ml.MachineLearning; import org.elasticsearch.xpack.ml.job.categorization.CategorizationAnalyzer; import org.elasticsearch.xpack.ml.job.categorization.CategorizationAnalyzerTests; -import org.elasticsearch.xpack.ml.job.config.AnalysisConfig; -import org.elasticsearch.xpack.ml.job.config.CategorizationAnalyzerConfig; -import org.elasticsearch.xpack.ml.job.config.DataDescription; -import org.elasticsearch.xpack.ml.job.config.DataDescription.DataFormat; -import org.elasticsearch.xpack.ml.job.config.Detector; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig; +import org.elasticsearch.xpack.core.ml.job.config.CategorizationAnalyzerConfig; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription.DataFormat; +import org.elasticsearch.xpack.core.ml.job.config.Detector; import org.elasticsearch.xpack.ml.job.process.DataCountsReporter; import org.elasticsearch.xpack.ml.job.process.autodetect.AutodetectProcess; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.DataCounts; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.DataCounts; import org.junit.Before; import org.mockito.Mockito; import org.mockito.invocation.InvocationOnMock; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/CsvParserTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/CsvParserTests.java index ea1d8bfbd27..27ddef23cca 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/CsvParserTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/CsvParserTests.java @@ -6,7 +6,7 @@ package org.elasticsearch.xpack.ml.job.process.autodetect.writer; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; import org.supercsv.io.CsvListReader; import org.supercsv.prefs.CsvPreference; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DataToProcessWriterFactoryTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DataToProcessWriterFactoryTests.java index 7a956e9c79b..72e19c9d4e0 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DataToProcessWriterFactoryTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DataToProcessWriterFactoryTests.java @@ -7,9 +7,9 @@ package org.elasticsearch.xpack.ml.job.process.autodetect.writer; import org.elasticsearch.common.xcontent.NamedXContentRegistry; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.job.config.AnalysisConfigTests; -import org.elasticsearch.xpack.ml.job.config.DataDescription; -import org.elasticsearch.xpack.ml.job.config.DataDescription.DataFormat; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfigTests; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription.DataFormat; import org.elasticsearch.xpack.ml.job.process.DataCountsReporter; import org.elasticsearch.xpack.ml.job.process.autodetect.AutodetectProcess; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/FieldConfigWriterTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/FieldConfigWriterTests.java index e82bbd6d0f9..ae0f02af25e 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/FieldConfigWriterTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/FieldConfigWriterTests.java @@ -10,15 +10,15 @@ import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.calendars.ScheduledEvent; -import org.elasticsearch.xpack.ml.job.config.AnalysisConfig; -import org.elasticsearch.xpack.ml.job.config.Condition; -import org.elasticsearch.xpack.ml.job.config.DetectionRule; -import org.elasticsearch.xpack.ml.job.config.Detector; -import org.elasticsearch.xpack.ml.job.config.MlFilter; -import org.elasticsearch.xpack.ml.job.config.Operator; -import org.elasticsearch.xpack.ml.job.config.RuleCondition; -import org.elasticsearch.xpack.ml.job.config.RuleConditionType; +import org.elasticsearch.xpack.core.ml.calendars.ScheduledEvent; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig; +import org.elasticsearch.xpack.core.ml.job.config.Condition; +import org.elasticsearch.xpack.core.ml.job.config.DetectionRule; +import org.elasticsearch.xpack.core.ml.job.config.Detector; +import org.elasticsearch.xpack.core.ml.job.config.MlFilter; +import org.elasticsearch.xpack.core.ml.job.config.Operator; +import org.elasticsearch.xpack.core.ml.job.config.RuleCondition; +import org.elasticsearch.xpack.core.ml.job.config.RuleConditionType; import org.ini4j.Config; import org.ini4j.Ini; import org.ini4j.Profile.Section; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/JsonDataToProcessWriterTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/JsonDataToProcessWriterTests.java index 73395744402..39860033e67 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/JsonDataToProcessWriterTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/JsonDataToProcessWriterTests.java @@ -21,11 +21,11 @@ import org.elasticsearch.test.ESTestCase; import org.elasticsearch.xpack.ml.MachineLearning; import org.elasticsearch.xpack.ml.job.categorization.CategorizationAnalyzer; import org.elasticsearch.xpack.ml.job.categorization.CategorizationAnalyzerTests; -import org.elasticsearch.xpack.ml.job.config.AnalysisConfig; -import org.elasticsearch.xpack.ml.job.config.CategorizationAnalyzerConfig; -import org.elasticsearch.xpack.ml.job.config.DataDescription; -import org.elasticsearch.xpack.ml.job.config.DataDescription.DataFormat; -import org.elasticsearch.xpack.ml.job.config.Detector; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig; +import org.elasticsearch.xpack.core.ml.job.config.CategorizationAnalyzerConfig; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription.DataFormat; +import org.elasticsearch.xpack.core.ml.job.config.Detector; import org.elasticsearch.xpack.ml.job.process.DataCountsReporter; import org.elasticsearch.xpack.ml.job.process.autodetect.AutodetectProcess; import org.junit.Before; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/MlFilterWriterTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/MlFilterWriterTests.java index a1188e6e367..f22f7d85090 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/MlFilterWriterTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/MlFilterWriterTests.java @@ -6,7 +6,7 @@ package org.elasticsearch.xpack.ml.job.process.autodetect.writer; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.job.config.MlFilter; +import org.elasticsearch.xpack.core.ml.job.config.MlFilter; import java.io.IOException; import java.util.ArrayList; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/ModelPlotConfigWriterTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/ModelPlotConfigWriterTests.java index a67c79f9a67..4440c06b673 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/ModelPlotConfigWriterTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/ModelPlotConfigWriterTests.java @@ -6,7 +6,7 @@ package org.elasticsearch.xpack.ml.job.process.autodetect.writer; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.job.config.ModelPlotConfig; +import org.elasticsearch.xpack.core.ml.job.config.ModelPlotConfig; import org.junit.After; import org.junit.Before; import org.mockito.Mockito; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/ScheduledEventsWriterTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/ScheduledEventsWriterTests.java index 6a379aa0221..ae1b77b3408 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/ScheduledEventsWriterTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/ScheduledEventsWriterTests.java @@ -7,7 +7,7 @@ package org.elasticsearch.xpack.ml.job.process.autodetect.writer; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.calendars.ScheduledEvent; +import org.elasticsearch.xpack.core.ml.calendars.ScheduledEvent; import java.io.IOException; import java.time.Instant; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/BucketInfluencerNormalizableTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/BucketInfluencerNormalizableTests.java index d39d20f4898..f83d51d84b0 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/BucketInfluencerNormalizableTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/BucketInfluencerNormalizableTests.java @@ -6,7 +6,7 @@ package org.elasticsearch.xpack.ml.job.process.normalizer; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.job.results.BucketInfluencer; +import org.elasticsearch.xpack.core.ml.job.results.BucketInfluencer; import org.junit.Before; import java.util.Date; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/BucketNormalizableTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/BucketNormalizableTests.java index ce1c837ccf6..630bffe1112 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/BucketNormalizableTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/BucketNormalizableTests.java @@ -6,10 +6,10 @@ package org.elasticsearch.xpack.ml.job.process.normalizer; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.job.results.AnomalyRecord; -import org.elasticsearch.xpack.ml.job.results.Bucket; -import org.elasticsearch.xpack.ml.job.results.BucketInfluencer; -import org.elasticsearch.xpack.ml.job.results.PartitionScore; +import org.elasticsearch.xpack.core.ml.job.results.AnomalyRecord; +import org.elasticsearch.xpack.core.ml.job.results.Bucket; +import org.elasticsearch.xpack.core.ml.job.results.BucketInfluencer; +import org.elasticsearch.xpack.core.ml.job.results.PartitionScore; import org.junit.Before; import java.util.ArrayList; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/InfluencerNormalizableTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/InfluencerNormalizableTests.java index ac87ab9bf34..215f88ad332 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/InfluencerNormalizableTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/InfluencerNormalizableTests.java @@ -6,7 +6,7 @@ package org.elasticsearch.xpack.ml.job.process.normalizer; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.job.results.Influencer; +import org.elasticsearch.xpack.core.ml.job.results.Influencer; import org.junit.Before; import java.util.Date; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/NormalizerTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/NormalizerTests.java index 830ea1b97e3..1b34226e336 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/NormalizerTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/NormalizerTests.java @@ -7,8 +7,8 @@ package org.elasticsearch.xpack.ml.job.process.normalizer; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.job.results.Bucket; -import org.elasticsearch.xpack.ml.job.results.BucketInfluencer; +import org.elasticsearch.xpack.core.ml.job.results.Bucket; +import org.elasticsearch.xpack.core.ml.job.results.BucketInfluencer; import java.io.IOException; import java.util.Arrays; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/ScoresUpdaterTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/ScoresUpdaterTests.java index 91ee664c038..2c91ffd94c3 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/ScoresUpdaterTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/ScoresUpdaterTests.java @@ -7,18 +7,18 @@ package org.elasticsearch.xpack.ml.job.process.normalizer; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.job.config.AnalysisConfig; -import org.elasticsearch.xpack.ml.job.config.DataDescription; -import org.elasticsearch.xpack.ml.job.config.Detector; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.persistence.JobProvider; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.Detector; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.persistence.JobProvider; import org.elasticsearch.xpack.ml.job.persistence.JobRenormalizedResultsPersister; import org.elasticsearch.xpack.ml.job.persistence.MockBatchedDocumentsIterator; -import org.elasticsearch.xpack.ml.job.results.AnomalyRecord; -import org.elasticsearch.xpack.ml.job.results.Bucket; -import org.elasticsearch.xpack.ml.job.results.BucketInfluencer; -import org.elasticsearch.xpack.ml.job.results.Influencer; -import org.elasticsearch.xpack.ml.job.results.Result; +import org.elasticsearch.xpack.core.ml.job.results.AnomalyRecord; +import org.elasticsearch.xpack.core.ml.job.results.Bucket; +import org.elasticsearch.xpack.core.ml.job.results.BucketInfluencer; +import org.elasticsearch.xpack.core.ml.job.results.Influencer; +import org.elasticsearch.xpack.core.ml.job.results.Result; import org.junit.Before; import org.mockito.MockitoAnnotations; import org.mockito.invocation.InvocationOnMock; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/ShortCircuitingRenormalizerTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/ShortCircuitingRenormalizerTests.java index cdc2fce6822..769d3657b04 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/ShortCircuitingRenormalizerTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/ShortCircuitingRenormalizerTests.java @@ -6,7 +6,7 @@ package org.elasticsearch.xpack.ml.job.process.normalizer; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.Quantiles; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.Quantiles; import org.junit.Before; import org.mockito.ArgumentCaptor; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/AutodetectResultTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/AutodetectResultTests.java index 7ffd9a2048f..a685820430f 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/AutodetectResultTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/AutodetectResultTests.java @@ -8,11 +8,18 @@ package org.elasticsearch.xpack.ml.job.results; import org.elasticsearch.common.io.stream.Writeable.Reader; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.AbstractSerializingTestCase; -import org.elasticsearch.xpack.ml.job.process.autodetect.output.FlushAcknowledgement; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSizeStats; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshot; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.output.FlushAcknowledgement; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSizeStats; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshot; +import org.elasticsearch.xpack.core.ml.job.results.AnomalyRecord; +import org.elasticsearch.xpack.core.ml.job.results.Bucket; +import org.elasticsearch.xpack.core.ml.job.results.CategoryDefinition; +import org.elasticsearch.xpack.core.ml.job.results.Forecast; +import org.elasticsearch.xpack.core.ml.job.results.ForecastRequestStats; +import org.elasticsearch.xpack.core.ml.job.results.Influencer; +import org.elasticsearch.xpack.core.ml.job.results.ModelPlot; import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshotTests; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.Quantiles; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.Quantiles; import org.elasticsearch.xpack.ml.job.process.autodetect.state.QuantilesTests; import java.util.ArrayList; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/BucketTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/BucketTests.java index 039f91809a6..375e87249df 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/BucketTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/BucketTests.java @@ -8,6 +8,11 @@ package org.elasticsearch.xpack.ml.job.results; import org.elasticsearch.common.io.stream.Writeable.Reader; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.AbstractSerializingTestCase; +import org.elasticsearch.xpack.core.ml.job.results.AnomalyRecord; +import org.elasticsearch.xpack.core.ml.job.results.AnomalyRecordTests; +import org.elasticsearch.xpack.core.ml.job.results.Bucket; +import org.elasticsearch.xpack.core.ml.job.results.BucketInfluencer; +import org.elasticsearch.xpack.core.ml.job.results.PartitionScore; import java.util.ArrayList; import java.util.Arrays; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/CategoryDefinitionTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/CategoryDefinitionTests.java index 2e2069bbf07..f6491a7306d 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/CategoryDefinitionTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/CategoryDefinitionTests.java @@ -8,6 +8,7 @@ package org.elasticsearch.xpack.ml.job.results; import org.elasticsearch.common.io.stream.Writeable; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.AbstractSerializingTestCase; +import org.elasticsearch.xpack.core.ml.job.results.CategoryDefinition; import java.util.Arrays; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/ForecastRequestStatsTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/ForecastRequestStatsTests.java index c8ec8b7077d..edc6d3dc48d 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/ForecastRequestStatsTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/ForecastRequestStatsTests.java @@ -8,7 +8,8 @@ package org.elasticsearch.xpack.ml.job.results; import org.elasticsearch.common.io.stream.Writeable.Reader; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.AbstractSerializingTestCase; -import org.elasticsearch.xpack.ml.job.results.ForecastRequestStats.ForecastRequestStatus; +import org.elasticsearch.xpack.core.ml.job.results.ForecastRequestStats; +import org.elasticsearch.xpack.core.ml.job.results.ForecastRequestStats.ForecastRequestStatus; import java.io.IOException; import java.time.Instant; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/ForecastTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/ForecastTests.java index de7de588409..385c9777e2b 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/ForecastTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/ForecastTests.java @@ -8,6 +8,7 @@ package org.elasticsearch.xpack.ml.job.results; import org.elasticsearch.common.io.stream.Writeable.Reader; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.AbstractSerializingTestCase; +import org.elasticsearch.xpack.core.ml.job.results.Forecast; import java.io.IOException; import java.util.Date; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/InfluenceTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/InfluenceTests.java index e5fe60cd2b6..30931634ddc 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/InfluenceTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/InfluenceTests.java @@ -8,6 +8,7 @@ package org.elasticsearch.xpack.ml.job.results; import org.elasticsearch.common.io.stream.Writeable.Reader; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.AbstractSerializingTestCase; +import org.elasticsearch.xpack.core.ml.job.results.Influence; import java.util.ArrayList; import java.util.List; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/ModelPlotTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/ModelPlotTests.java index 7cff66b3c7d..f6466ecfa08 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/ModelPlotTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/ModelPlotTests.java @@ -11,6 +11,7 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.json.JsonXContent; import org.elasticsearch.test.AbstractSerializingTestCase; +import org.elasticsearch.xpack.core.ml.job.results.ModelPlot; import java.io.IOException; import java.util.Date; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/OverallBucketTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/OverallBucketTests.java index c16d8c23ff1..42b29cb5ee2 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/OverallBucketTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/OverallBucketTests.java @@ -7,7 +7,8 @@ package org.elasticsearch.xpack.ml.job.results; import org.elasticsearch.common.io.stream.Writeable; import org.elasticsearch.test.AbstractWireSerializingTestCase; -import org.elasticsearch.xpack.ml.job.config.JobTests; +import org.elasticsearch.xpack.core.ml.job.config.JobTests; +import org.elasticsearch.xpack.core.ml.job.results.OverallBucket; import java.util.ArrayList; import java.util.Date; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/PartitionScoreTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/PartitionScoreTests.java index b2accac58bb..9f2a705c579 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/PartitionScoreTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/PartitionScoreTests.java @@ -8,6 +8,7 @@ package org.elasticsearch.xpack.ml.job.results; import org.elasticsearch.common.io.stream.Writeable.Reader; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.AbstractSerializingTestCase; +import org.elasticsearch.xpack.core.ml.job.results.PartitionScore; public class PartitionScoreTests extends AbstractSerializingTestCase { diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/ReservedFieldNamesTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/ReservedFieldNamesTests.java index d421896e482..2fa4834d1ec 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/ReservedFieldNamesTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/results/ReservedFieldNamesTests.java @@ -6,6 +6,8 @@ package org.elasticsearch.xpack.ml.job.results; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.ml.job.results.AnomalyRecord; +import org.elasticsearch.xpack.core.ml.job.results.ReservedFieldNames; public class ReservedFieldNamesTests extends ESTestCase { diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/retention/ExpiredModelSnapshotsRemoverTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/retention/ExpiredModelSnapshotsRemoverTests.java index 832ca7028ca..e68f579555b 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/retention/ExpiredModelSnapshotsRemoverTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/retention/ExpiredModelSnapshotsRemoverTests.java @@ -20,13 +20,13 @@ import org.elasticsearch.mock.orig.Mockito; import org.elasticsearch.search.SearchHit; import org.elasticsearch.search.SearchHits; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.MLMetadataField; -import org.elasticsearch.xpack.ml.MlMetadata; -import org.elasticsearch.xpack.ml.action.DeleteModelSnapshotAction; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.config.JobTests; -import org.elasticsearch.xpack.ml.job.persistence.AnomalyDetectorsIndex; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshot; +import org.elasticsearch.xpack.core.ml.MLMetadataField; +import org.elasticsearch.xpack.core.ml.MlMetadata; +import org.elasticsearch.xpack.core.ml.action.DeleteModelSnapshotAction; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.JobTests; +import org.elasticsearch.xpack.core.ml.job.persistence.AnomalyDetectorsIndex; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshot; import org.junit.Before; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/retention/ExpiredResultsRemoverTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/retention/ExpiredResultsRemoverTests.java index d9ae8560b97..2f08574e1a6 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/retention/ExpiredResultsRemoverTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/retention/ExpiredResultsRemoverTests.java @@ -18,11 +18,11 @@ import org.elasticsearch.index.reindex.DeleteByQueryRequest; import org.elasticsearch.mock.orig.Mockito; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.xpack.ml.MLMetadataField; -import org.elasticsearch.xpack.ml.MlMetadata; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.config.JobTests; -import org.elasticsearch.xpack.ml.job.persistence.AnomalyDetectorsIndex; +import org.elasticsearch.xpack.core.ml.MLMetadataField; +import org.elasticsearch.xpack.core.ml.MlMetadata; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.JobTests; +import org.elasticsearch.xpack.core.ml.job.persistence.AnomalyDetectorsIndex; import org.elasticsearch.xpack.ml.notifications.Auditor; import org.junit.Before; import org.mockito.invocation.InvocationOnMock; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/modelsnapshots/GetModelSnapshotsTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/modelsnapshots/GetModelSnapshotsTests.java index 817dee6fd03..e72959601a0 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/modelsnapshots/GetModelSnapshotsTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/modelsnapshots/GetModelSnapshotsTests.java @@ -7,12 +7,12 @@ package org.elasticsearch.xpack.ml.modelsnapshots; import org.elasticsearch.common.ParseField; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.action.GetModelSnapshotsAction; +import org.elasticsearch.xpack.core.ml.action.GetModelSnapshotsAction; import org.elasticsearch.xpack.ml.action.TransportGetModelSnapshotsAction; -import org.elasticsearch.xpack.ml.action.util.PageParams; -import org.elasticsearch.xpack.ml.action.util.QueryPage; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshot; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.Quantiles; +import org.elasticsearch.xpack.core.ml.action.util.PageParams; +import org.elasticsearch.xpack.core.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshot; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.Quantiles; import java.util.Arrays; import java.util.Date; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/modelsnapshots/UpdateModelSnapshotActionTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/modelsnapshots/UpdateModelSnapshotActionTests.java index f80858e53b0..7f29d2cebb8 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/modelsnapshots/UpdateModelSnapshotActionTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/modelsnapshots/UpdateModelSnapshotActionTests.java @@ -6,7 +6,7 @@ package org.elasticsearch.xpack.ml.modelsnapshots; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ml.action.UpdateModelSnapshotAction; +import org.elasticsearch.xpack.core.ml.action.UpdateModelSnapshotAction; public class UpdateModelSnapshotActionTests extends ESTestCase { diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/notifications/AuditorTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/notifications/AuditorTests.java index b14f5fbb1f4..dc5e679bf09 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/notifications/AuditorTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/notifications/AuditorTests.java @@ -18,6 +18,8 @@ import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.ThreadPool; +import org.elasticsearch.xpack.core.ml.notifications.AuditMessage; +import org.elasticsearch.xpack.core.ml.notifications.Level; import org.junit.Before; import org.mockito.ArgumentCaptor; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/notifications/LevelTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/notifications/LevelTests.java index 0526f6b0efa..c3e3a885e82 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/notifications/LevelTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/notifications/LevelTests.java @@ -8,6 +8,7 @@ package org.elasticsearch.xpack.ml.notifications; import org.elasticsearch.common.io.stream.BytesStreamOutput; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.ml.notifications.Level; import java.io.IOException; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/support/BaseMlIntegTestCase.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/support/BaseMlIntegTestCase.java index 3aa78cbc65f..bea390915b9 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/support/BaseMlIntegTestCase.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/support/BaseMlIntegTestCase.java @@ -24,29 +24,27 @@ import org.elasticsearch.indices.recovery.RecoveryState; import org.elasticsearch.plugins.Plugin; import org.elasticsearch.test.ESIntegTestCase; import org.elasticsearch.test.discovery.TestZenDiscovery; -import org.elasticsearch.xpack.XPackPlugin; -import org.elasticsearch.xpack.XPackSettings; +import org.elasticsearch.xpack.core.XPackSettings; import org.elasticsearch.xpack.ml.LocalStateMachineLearning; -import org.elasticsearch.xpack.ml.MLMetadataField; +import org.elasticsearch.xpack.core.ml.MLMetadataField; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.MachineLearningField; -import org.elasticsearch.xpack.ml.MlMetadata; -import org.elasticsearch.xpack.ml.action.CloseJobAction; -import org.elasticsearch.xpack.ml.action.DeleteDatafeedAction; -import org.elasticsearch.xpack.ml.action.DeleteJobAction; -import org.elasticsearch.xpack.ml.action.GetDatafeedsStatsAction; -import org.elasticsearch.xpack.ml.action.GetJobsStatsAction; -import org.elasticsearch.xpack.ml.action.StopDatafeedAction; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; -import org.elasticsearch.xpack.ml.datafeed.DatafeedState; -import org.elasticsearch.xpack.ml.job.config.AnalysisConfig; -import org.elasticsearch.xpack.ml.job.config.AnalysisLimits; -import org.elasticsearch.xpack.ml.job.config.DataDescription; -import org.elasticsearch.xpack.ml.job.config.Detector; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.ml.job.config.JobState; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.DataCounts; -import org.elasticsearch.xpack.security.Security; +import org.elasticsearch.xpack.core.ml.MachineLearningField; +import org.elasticsearch.xpack.core.ml.MlMetadata; +import org.elasticsearch.xpack.core.ml.action.CloseJobAction; +import org.elasticsearch.xpack.core.ml.action.DeleteDatafeedAction; +import org.elasticsearch.xpack.core.ml.action.DeleteJobAction; +import org.elasticsearch.xpack.core.ml.action.GetDatafeedsStatsAction; +import org.elasticsearch.xpack.core.ml.action.GetJobsStatsAction; +import org.elasticsearch.xpack.core.ml.action.StopDatafeedAction; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedState; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisLimits; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.Detector; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.ml.job.config.JobState; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.DataCounts; import org.junit.After; import org.junit.Before; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/utils/IntervalsTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/utils/IntervalsTests.java index 1052f65047c..04796b4813b 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/utils/IntervalsTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/utils/IntervalsTests.java @@ -6,6 +6,7 @@ package org.elasticsearch.xpack.ml.utils; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.ml.utils.Intervals; import static org.hamcrest.Matchers.equalTo; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/utils/MlStringsTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/utils/MlStringsTests.java index ac05f8b0efa..fed7e79655a 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/utils/MlStringsTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/utils/MlStringsTests.java @@ -7,6 +7,7 @@ package org.elasticsearch.xpack.ml.utils; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.ml.utils.MlStrings; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.is; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/utils/NameResolverTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/utils/NameResolverTests.java index d7dd05530da..9f4bcc13cbd 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/utils/NameResolverTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/utils/NameResolverTests.java @@ -7,6 +7,7 @@ package org.elasticsearch.xpack.ml.utils; import org.elasticsearch.ResourceNotFoundException; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.ml.utils.NameResolver; import java.util.Arrays; import java.util.Collections; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/utils/time/DateTimeFormatterTimestampConverterTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/utils/time/DateTimeFormatterTimestampConverterTests.java index 224690d7852..2021b056a08 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/utils/time/DateTimeFormatterTimestampConverterTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/utils/time/DateTimeFormatterTimestampConverterTests.java @@ -6,6 +6,8 @@ package org.elasticsearch.xpack.ml.utils.time; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.ml.utils.time.DateTimeFormatterTimestampConverter; +import org.elasticsearch.xpack.core.ml.utils.time.TimestampConverter; import java.text.ParseException; import java.time.LocalDate; diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/utils/time/TimeUtilsTests.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/utils/time/TimeUtilsTests.java index 46245db0bca..d33968a37cf 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/utils/time/TimeUtilsTests.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/utils/time/TimeUtilsTests.java @@ -8,6 +8,7 @@ package org.elasticsearch.xpack.ml.utils.time; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.ml.utils.time.TimeUtils; import java.util.concurrent.TimeUnit; diff --git a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/Monitoring.java b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/Monitoring.java index 0289d62d3b6..26a85867279 100644 --- a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/Monitoring.java +++ b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/Monitoring.java @@ -31,10 +31,12 @@ import org.elasticsearch.rest.RestHandler; import org.elasticsearch.script.ScriptService; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.watcher.ResourceWatcherService; -import org.elasticsearch.xpack.XPackClientActionPlugin; -import org.elasticsearch.xpack.XPackPlugin; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.monitoring.action.MonitoringBulkAction; +import org.elasticsearch.xpack.core.XPackClientActionPlugin; +import org.elasticsearch.xpack.core.XPackPlugin; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.monitoring.MonitoringField; +import org.elasticsearch.xpack.core.monitoring.action.MonitoringBulkAction; +import org.elasticsearch.xpack.core.ssl.SSLService; import org.elasticsearch.xpack.monitoring.action.TransportMonitoringBulkAction; import org.elasticsearch.xpack.monitoring.cleaner.CleanerService; import org.elasticsearch.xpack.monitoring.collector.Collector; @@ -49,7 +51,6 @@ import org.elasticsearch.xpack.monitoring.exporter.Exporters; import org.elasticsearch.xpack.monitoring.exporter.http.HttpExporter; import org.elasticsearch.xpack.monitoring.exporter.local.LocalExporter; import org.elasticsearch.xpack.monitoring.rest.action.RestMonitoringBulkAction; -import org.elasticsearch.xpack.ssl.SSLService; import java.util.ArrayList; import java.util.Arrays; diff --git a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/MonitoringFeatureSet.java b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/MonitoringFeatureSet.java index 6f4fc5f93d7..71e1f639bee 100644 --- a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/MonitoringFeatureSet.java +++ b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/MonitoringFeatureSet.java @@ -5,20 +5,21 @@ */ package org.elasticsearch.xpack.monitoring; -import java.util.HashMap; -import java.util.Map; - import org.elasticsearch.action.ActionListener; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.license.XPackLicenseState; -import org.elasticsearch.xpack.XPackFeatureSet; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.XPackField; +import org.elasticsearch.xpack.core.XPackFeatureSet; +import org.elasticsearch.xpack.core.XPackField; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.monitoring.MonitoringFeatureSetUsage; import org.elasticsearch.xpack.monitoring.exporter.Exporter; import org.elasticsearch.xpack.monitoring.exporter.Exporters; +import java.util.HashMap; +import java.util.Map; + public class MonitoringFeatureSet implements XPackFeatureSet { private final boolean enabled; diff --git a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/MonitoringService.java b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/MonitoringService.java index 30e4df5d953..cab1c533296 100644 --- a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/MonitoringService.java +++ b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/MonitoringService.java @@ -11,16 +11,15 @@ import org.elasticsearch.action.ActionListener; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.service.ClusterService; import org.elasticsearch.common.component.AbstractLifecycleComponent; -import org.elasticsearch.common.settings.ClusterSettings; import org.elasticsearch.common.settings.Setting; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.util.concurrent.AbstractRunnable; import org.elasticsearch.threadpool.ThreadPool; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringDoc; import org.elasticsearch.xpack.monitoring.collector.Collector; import org.elasticsearch.xpack.monitoring.exporter.Exporter; import org.elasticsearch.xpack.monitoring.exporter.Exporters; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringDoc; import java.io.Closeable; import java.util.ArrayList; diff --git a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/action/TransportMonitoringBulkAction.java b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/action/TransportMonitoringBulkAction.java index 788a7fcd872..4f313733fa8 100644 --- a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/action/TransportMonitoringBulkAction.java +++ b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/action/TransportMonitoringBulkAction.java @@ -18,10 +18,14 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.action.MonitoringBulkAction; +import org.elasticsearch.xpack.core.monitoring.action.MonitoringBulkDoc; +import org.elasticsearch.xpack.core.monitoring.action.MonitoringBulkRequest; +import org.elasticsearch.xpack.core.monitoring.action.MonitoringBulkResponse; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringDoc; import org.elasticsearch.xpack.monitoring.exporter.BytesReferenceMonitoringDoc; import org.elasticsearch.xpack.monitoring.exporter.Exporters; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringDoc; import java.util.Collection; import java.util.concurrent.TimeUnit; diff --git a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/cleaner/CleanerService.java b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/cleaner/CleanerService.java index 49d32c13b61..a0d56d3a6b5 100644 --- a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/cleaner/CleanerService.java +++ b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/cleaner/CleanerService.java @@ -14,7 +14,7 @@ import org.elasticsearch.common.util.concurrent.EsRejectedExecutionException; import org.elasticsearch.common.util.concurrent.FutureUtils; import org.elasticsearch.license.XPackLicenseState; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.xpack.monitoring.MonitoringField; +import org.elasticsearch.xpack.core.monitoring.MonitoringField; import org.joda.time.DateTime; import org.joda.time.chrono.ISOChronology; diff --git a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/Collector.java b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/Collector.java index 71a2c577925..a1cb1af51a8 100644 --- a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/Collector.java +++ b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/Collector.java @@ -18,8 +18,8 @@ import org.elasticsearch.common.settings.Setting; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.license.XPackLicenseState; -import org.elasticsearch.xpack.XPackField; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringDoc; +import org.elasticsearch.xpack.core.XPackField; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringDoc; import java.util.Collection; import java.util.List; diff --git a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStatsCollector.java b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStatsCollector.java index 04a28c93b47..731f0694ad4 100644 --- a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStatsCollector.java +++ b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStatsCollector.java @@ -25,18 +25,18 @@ import org.elasticsearch.license.License; import org.elasticsearch.license.LicenseService; import org.elasticsearch.license.LicenseUtils; import org.elasticsearch.license.XPackLicenseState; -import org.elasticsearch.xpack.XPackFeatureSet; -import org.elasticsearch.xpack.action.XPackUsageRequestBuilder; +import org.elasticsearch.xpack.core.XPackFeatureSet; +import org.elasticsearch.xpack.core.action.XPackUsageRequestBuilder; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringDoc; import org.elasticsearch.xpack.monitoring.collector.Collector; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringDoc; import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.Objects; -import static org.elasticsearch.xpack.XPackSettings.SECURITY_ENABLED; -import static org.elasticsearch.xpack.XPackSettings.TRANSPORT_SSL_ENABLED; +import static org.elasticsearch.xpack.core.XPackSettings.SECURITY_ENABLED; +import static org.elasticsearch.xpack.core.XPackSettings.TRANSPORT_SSL_ENABLED; /** * Collector for cluster stats. diff --git a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStatsMonitoringDoc.java b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStatsMonitoringDoc.java index 693d81b265a..0eb7221140a 100644 --- a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStatsMonitoringDoc.java +++ b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStatsMonitoringDoc.java @@ -16,9 +16,9 @@ import org.elasticsearch.common.hash.MessageDigests; import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.license.License; -import org.elasticsearch.xpack.XPackFeatureSet; -import org.elasticsearch.xpack.monitoring.MonitoredSystem; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringDoc; +import org.elasticsearch.xpack.core.XPackFeatureSet; +import org.elasticsearch.xpack.core.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringDoc; import java.io.IOException; import java.nio.charset.StandardCharsets; diff --git a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexRecoveryCollector.java b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexRecoveryCollector.java index 06cebf7a857..ea8b5065387 100644 --- a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexRecoveryCollector.java +++ b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexRecoveryCollector.java @@ -14,8 +14,8 @@ import org.elasticsearch.common.settings.Setting; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.license.XPackLicenseState; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringDoc; import org.elasticsearch.xpack.monitoring.collector.Collector; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringDoc; import java.util.ArrayList; import java.util.Collection; diff --git a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexRecoveryMonitoringDoc.java b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexRecoveryMonitoringDoc.java index 9ecd46ef907..892c364f9bf 100644 --- a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexRecoveryMonitoringDoc.java +++ b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexRecoveryMonitoringDoc.java @@ -8,8 +8,8 @@ package org.elasticsearch.xpack.monitoring.collector.indices; import org.elasticsearch.action.admin.indices.recovery.RecoveryResponse; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.indices.recovery.RecoveryState; -import org.elasticsearch.xpack.monitoring.MonitoredSystem; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringDoc; +import org.elasticsearch.xpack.core.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringDoc; import java.io.IOException; import java.util.List; diff --git a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexStatsCollector.java b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexStatsCollector.java index e64a83dbf5d..f21f0697a18 100644 --- a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexStatsCollector.java +++ b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexStatsCollector.java @@ -17,8 +17,8 @@ import org.elasticsearch.common.settings.Setting; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.license.XPackLicenseState; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringDoc; import org.elasticsearch.xpack.monitoring.collector.Collector; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringDoc; import java.util.ArrayList; import java.util.Collection; diff --git a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexStatsMonitoringDoc.java b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexStatsMonitoringDoc.java index 68892eda04e..0af877d8343 100644 --- a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexStatsMonitoringDoc.java +++ b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexStatsMonitoringDoc.java @@ -13,9 +13,9 @@ import org.elasticsearch.cluster.routing.IndexRoutingTable; import org.elasticsearch.common.inject.internal.Nullable; import org.elasticsearch.common.util.set.Sets; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringDoc; import org.elasticsearch.xpack.monitoring.exporter.FilteredMonitoringDoc; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringDoc; import java.io.IOException; import java.util.Locale; diff --git a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndicesStatsMonitoringDoc.java b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndicesStatsMonitoringDoc.java index 4958957ca2e..b58fecc9740 100644 --- a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndicesStatsMonitoringDoc.java +++ b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndicesStatsMonitoringDoc.java @@ -8,9 +8,9 @@ package org.elasticsearch.xpack.monitoring.collector.indices; import org.elasticsearch.action.admin.indices.stats.IndicesStatsResponse; import org.elasticsearch.common.util.set.Sets; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringDoc; import org.elasticsearch.xpack.monitoring.exporter.FilteredMonitoringDoc; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringDoc; import java.io.IOException; import java.util.Objects; diff --git a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/ml/JobStatsCollector.java b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/ml/JobStatsCollector.java index bf570bd64e3..cfbf9b7e0a4 100644 --- a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/ml/JobStatsCollector.java +++ b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/ml/JobStatsCollector.java @@ -14,18 +14,18 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.license.XPackLicenseState; -import org.elasticsearch.xpack.XPackClient; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.ml.action.GetJobsStatsAction; -import org.elasticsearch.xpack.ml.client.MachineLearningClient; +import org.elasticsearch.xpack.core.XPackClient; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.ml.action.GetJobsStatsAction; +import org.elasticsearch.xpack.core.ml.client.MachineLearningClient; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringDoc; import org.elasticsearch.xpack.monitoring.collector.Collector; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringDoc; import java.util.List; import java.util.stream.Collectors; -import static org.elasticsearch.xpack.ClientHelper.MONITORING_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.stashWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.MONITORING_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.stashWithOrigin; /** * Collector for Machine Learning Job Stats. diff --git a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/ml/JobStatsMonitoringDoc.java b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/ml/JobStatsMonitoringDoc.java index 637c1c05456..5c593118b62 100644 --- a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/ml/JobStatsMonitoringDoc.java +++ b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/ml/JobStatsMonitoringDoc.java @@ -6,9 +6,9 @@ package org.elasticsearch.xpack.monitoring.collector.ml; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.ml.action.GetJobsStatsAction.Response.JobStats; -import org.elasticsearch.xpack.monitoring.MonitoredSystem; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringDoc; +import org.elasticsearch.xpack.core.ml.action.GetJobsStatsAction.Response.JobStats; +import org.elasticsearch.xpack.core.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringDoc; import java.io.IOException; import java.util.Objects; diff --git a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/node/NodeStatsCollector.java b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/node/NodeStatsCollector.java index c67a08fda5a..c990485e6a5 100644 --- a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/node/NodeStatsCollector.java +++ b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/node/NodeStatsCollector.java @@ -17,8 +17,8 @@ import org.elasticsearch.common.settings.Setting; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.license.XPackLicenseState; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringDoc; import org.elasticsearch.xpack.monitoring.collector.Collector; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringDoc; import java.util.Collection; import java.util.Collections; diff --git a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/node/NodeStatsMonitoringDoc.java b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/node/NodeStatsMonitoringDoc.java index deaac67991f..dc40da3a4ff 100644 --- a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/node/NodeStatsMonitoringDoc.java +++ b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/node/NodeStatsMonitoringDoc.java @@ -8,9 +8,9 @@ package org.elasticsearch.xpack.monitoring.collector.node; import org.elasticsearch.action.admin.cluster.node.stats.NodeStats; import org.elasticsearch.common.util.set.Sets; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringDoc; import org.elasticsearch.xpack.monitoring.exporter.FilteredMonitoringDoc; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringDoc; import java.io.IOException; import java.util.Objects; diff --git a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/shards/ShardMonitoringDoc.java b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/shards/ShardMonitoringDoc.java index b27aa8de765..dbf6d5403a0 100644 --- a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/shards/ShardMonitoringDoc.java +++ b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/shards/ShardMonitoringDoc.java @@ -8,9 +8,9 @@ package org.elasticsearch.xpack.monitoring.collector.shards; import org.elasticsearch.cluster.routing.ShardRouting; import org.elasticsearch.common.util.set.Sets; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringDoc; import org.elasticsearch.xpack.monitoring.exporter.FilteredMonitoringDoc; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringDoc; import java.io.IOException; import java.util.Objects; diff --git a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/shards/ShardsCollector.java b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/shards/ShardsCollector.java index f1a23d46d2c..b5a3a2920e2 100644 --- a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/shards/ShardsCollector.java +++ b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/collector/shards/ShardsCollector.java @@ -13,8 +13,8 @@ import org.elasticsearch.cluster.service.ClusterService; import org.elasticsearch.common.regex.Regex; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.license.XPackLicenseState; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringDoc; import org.elasticsearch.xpack.monitoring.collector.Collector; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringDoc; import java.util.ArrayList; import java.util.Arrays; diff --git a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/BytesReferenceMonitoringDoc.java b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/BytesReferenceMonitoringDoc.java index bd46492ffa5..56ece12ec69 100644 --- a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/BytesReferenceMonitoringDoc.java +++ b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/BytesReferenceMonitoringDoc.java @@ -9,7 +9,8 @@ import org.elasticsearch.common.Nullable; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.xpack.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringDoc; import java.io.IOException; import java.util.Objects; diff --git a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/ExportBulk.java b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/ExportBulk.java index c9a95bc1641..0501c625727 100644 --- a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/ExportBulk.java +++ b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/ExportBulk.java @@ -8,7 +8,8 @@ package org.elasticsearch.xpack.monitoring.exporter; import org.apache.lucene.util.SetOnce; import org.elasticsearch.action.ActionListener; import org.elasticsearch.common.util.concurrent.ThreadContext; -import org.elasticsearch.xpack.common.IteratingActionListener; +import org.elasticsearch.xpack.core.common.IteratingActionListener; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringDoc; import java.util.Collection; import java.util.List; diff --git a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/Exporters.java b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/Exporters.java index 04478e01f9b..12f2f74fd6f 100644 --- a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/Exporters.java +++ b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/Exporters.java @@ -18,6 +18,7 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.settings.SettingsException; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.license.XPackLicenseState; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringDoc; import org.elasticsearch.xpack.monitoring.exporter.local.LocalExporter; import java.util.ArrayList; diff --git a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/FilteredMonitoringDoc.java b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/FilteredMonitoringDoc.java index 63c9cb08db1..fc70e9422b9 100644 --- a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/FilteredMonitoringDoc.java +++ b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/FilteredMonitoringDoc.java @@ -11,7 +11,8 @@ import org.elasticsearch.common.util.set.Sets; import org.elasticsearch.common.xcontent.XContent; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringDoc; import java.io.IOException; import java.util.Set; diff --git a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExportBulk.java b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExportBulk.java index 2691517b00e..633b41d212d 100644 --- a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExportBulk.java +++ b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExportBulk.java @@ -24,10 +24,10 @@ import org.elasticsearch.common.xcontent.XContent; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentHelper; import org.elasticsearch.common.xcontent.XContentType; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringDoc; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringTemplateUtils; import org.elasticsearch.xpack.monitoring.exporter.ExportBulk; import org.elasticsearch.xpack.monitoring.exporter.ExportException; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringDoc; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringTemplateUtils; import org.joda.time.format.DateTimeFormatter; import java.io.IOException; diff --git a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporter.java b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporter.java index a0d91498496..899e5fa3251 100644 --- a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporter.java +++ b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporter.java @@ -5,8 +5,6 @@ */ package org.elasticsearch.xpack.monitoring.exporter.http; -import org.apache.http.nio.conn.ssl.SSLIOSessionStrategy; -import org.apache.logging.log4j.Logger; import org.apache.http.Header; import org.apache.http.HttpHost; import org.apache.http.auth.AuthScope; @@ -14,6 +12,8 @@ import org.apache.http.auth.UsernamePasswordCredentials; import org.apache.http.client.CredentialsProvider; import org.apache.http.impl.client.BasicCredentialsProvider; import org.apache.http.message.BasicHeader; +import org.apache.http.nio.conn.ssl.SSLIOSessionStrategy; +import org.apache.logging.log4j.Logger; import org.elasticsearch.Version; import org.elasticsearch.client.RestClient; import org.elasticsearch.client.RestClientBuilder; @@ -31,13 +31,14 @@ import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.common.util.set.Sets; import org.elasticsearch.common.xcontent.XContentType; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringTemplateUtils; +import org.elasticsearch.xpack.core.ssl.SSLService; import org.elasticsearch.xpack.monitoring.exporter.ClusterAlertsUtil; import org.elasticsearch.xpack.monitoring.exporter.Exporter; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringTemplateUtils; -import org.elasticsearch.xpack.ssl.SSLService; import org.joda.time.format.DateTimeFormatter; import javax.net.ssl.SSLContext; + import java.io.IOException; import java.util.ArrayList; import java.util.Collections; diff --git a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/PipelineHttpResource.java b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/PipelineHttpResource.java index 0ffbfaba331..77f9de409d3 100644 --- a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/PipelineHttpResource.java +++ b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/PipelineHttpResource.java @@ -14,7 +14,7 @@ import org.elasticsearch.common.Nullable; import org.elasticsearch.common.logging.Loggers; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringTemplateUtils; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringTemplateUtils; import java.util.Objects; import java.util.function.Supplier; diff --git a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/TemplateHttpResource.java b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/TemplateHttpResource.java index 596a514c646..21f208a77bf 100644 --- a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/TemplateHttpResource.java +++ b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/TemplateHttpResource.java @@ -14,7 +14,7 @@ import org.elasticsearch.common.Nullable; import org.elasticsearch.common.logging.Loggers; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringTemplateUtils; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringTemplateUtils; import java.util.Objects; import java.util.function.Supplier; diff --git a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/local/LocalBulk.java b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/local/LocalBulk.java index f925f4df816..05320224ede 100644 --- a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/local/LocalBulk.java +++ b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/local/LocalBulk.java @@ -16,17 +16,17 @@ import org.elasticsearch.common.Strings; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.xcontent.XContentHelper; import org.elasticsearch.common.xcontent.XContentType; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringDoc; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringTemplateUtils; import org.elasticsearch.xpack.monitoring.exporter.ExportBulk; import org.elasticsearch.xpack.monitoring.exporter.ExportException; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringDoc; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringTemplateUtils; import org.joda.time.format.DateTimeFormatter; import java.util.Arrays; import java.util.Collection; -import static org.elasticsearch.xpack.ClientHelper.MONITORING_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.executeAsyncWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.MONITORING_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin; /** * LocalBulk exports monitoring data in the local cluster using bulk requests. Its usage is not thread safe since the diff --git a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/local/LocalExporter.java b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/local/LocalExporter.java index 73ba5514a5a..fd8f1cb07f8 100644 --- a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/local/LocalExporter.java +++ b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/local/LocalExporter.java @@ -39,20 +39,20 @@ import org.elasticsearch.index.IndexNotFoundException; import org.elasticsearch.ingest.IngestMetadata; import org.elasticsearch.ingest.PipelineConfiguration; import org.elasticsearch.license.XPackLicenseState; -import org.elasticsearch.xpack.XPackClient; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.XPackClient; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringTemplateUtils; +import org.elasticsearch.xpack.core.watcher.client.WatcherClient; +import org.elasticsearch.xpack.core.watcher.transport.actions.delete.DeleteWatchRequest; +import org.elasticsearch.xpack.core.watcher.transport.actions.get.GetWatchRequest; +import org.elasticsearch.xpack.core.watcher.transport.actions.get.GetWatchResponse; +import org.elasticsearch.xpack.core.watcher.transport.actions.put.PutWatchRequest; +import org.elasticsearch.xpack.core.watcher.transport.actions.put.PutWatchResponse; +import org.elasticsearch.xpack.core.watcher.watch.Watch; import org.elasticsearch.xpack.monitoring.cleaner.CleanerService; import org.elasticsearch.xpack.monitoring.exporter.ClusterAlertsUtil; import org.elasticsearch.xpack.monitoring.exporter.Exporter; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringTemplateUtils; -import org.elasticsearch.xpack.watcher.client.WatcherClient; -import org.elasticsearch.xpack.watcher.transport.actions.delete.DeleteWatchRequest; -import org.elasticsearch.xpack.watcher.transport.actions.get.GetWatchRequest; -import org.elasticsearch.xpack.watcher.transport.actions.get.GetWatchResponse; -import org.elasticsearch.xpack.watcher.transport.actions.put.PutWatchRequest; -import org.elasticsearch.xpack.watcher.transport.actions.put.PutWatchResponse; -import org.elasticsearch.xpack.watcher.watch.Watch; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.joda.time.format.DateTimeFormatter; @@ -71,15 +71,15 @@ import java.util.concurrent.atomic.AtomicReference; import java.util.stream.Collectors; import static org.elasticsearch.common.Strings.collectionToCommaDelimitedString; -import static org.elasticsearch.xpack.ClientHelper.MONITORING_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.executeAsyncWithOrigin; -import static org.elasticsearch.xpack.ClientHelper.stashWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.MONITORING_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.stashWithOrigin; +import static org.elasticsearch.xpack.core.monitoring.exporter.MonitoringTemplateUtils.LAST_UPDATED_VERSION; +import static org.elasticsearch.xpack.core.monitoring.exporter.MonitoringTemplateUtils.PIPELINE_IDS; +import static org.elasticsearch.xpack.core.monitoring.exporter.MonitoringTemplateUtils.TEMPLATE_VERSION; +import static org.elasticsearch.xpack.core.monitoring.exporter.MonitoringTemplateUtils.loadPipeline; +import static org.elasticsearch.xpack.core.monitoring.exporter.MonitoringTemplateUtils.pipelineName; import static org.elasticsearch.xpack.monitoring.Monitoring.CLEAN_WATCHER_HISTORY; -import static org.elasticsearch.xpack.monitoring.exporter.MonitoringTemplateUtils.LAST_UPDATED_VERSION; -import static org.elasticsearch.xpack.monitoring.exporter.MonitoringTemplateUtils.PIPELINE_IDS; -import static org.elasticsearch.xpack.monitoring.exporter.MonitoringTemplateUtils.TEMPLATE_VERSION; -import static org.elasticsearch.xpack.monitoring.exporter.MonitoringTemplateUtils.loadPipeline; -import static org.elasticsearch.xpack.monitoring.exporter.MonitoringTemplateUtils.pipelineName; public class LocalExporter extends Exporter implements ClusterStateListener, CleanerService.Listener { diff --git a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/rest/MonitoringRestHandler.java b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/rest/MonitoringRestHandler.java index 02b758fb4ae..a0e1f919f5a 100644 --- a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/rest/MonitoringRestHandler.java +++ b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/rest/MonitoringRestHandler.java @@ -6,7 +6,7 @@ package org.elasticsearch.xpack.monitoring.rest; import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.xpack.rest.XPackRestHandler; +import org.elasticsearch.xpack.core.rest.XPackRestHandler; public abstract class MonitoringRestHandler extends XPackRestHandler { diff --git a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/rest/action/RestMonitoringBulkAction.java b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/rest/action/RestMonitoringBulkAction.java index 8ae1ed74ade..3abe8669d7e 100644 --- a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/rest/action/RestMonitoringBulkAction.java +++ b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/rest/action/RestMonitoringBulkAction.java @@ -14,11 +14,11 @@ import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.RestResponse; import org.elasticsearch.rest.action.RestBuilderListener; -import org.elasticsearch.xpack.XPackClient; -import org.elasticsearch.xpack.monitoring.MonitoredSystem; -import org.elasticsearch.xpack.monitoring.action.MonitoringBulkRequestBuilder; -import org.elasticsearch.xpack.monitoring.action.MonitoringBulkResponse; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringTemplateUtils; +import org.elasticsearch.xpack.core.XPackClient; +import org.elasticsearch.xpack.core.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.action.MonitoringBulkRequestBuilder; +import org.elasticsearch.xpack.core.monitoring.action.MonitoringBulkResponse; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringTemplateUtils; import org.elasticsearch.xpack.monitoring.rest.MonitoringRestHandler; import java.io.IOException; diff --git a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/BaseCollectorTestCase.java b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/BaseCollectorTestCase.java index 255184c46d7..2a48bc66204 100644 --- a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/BaseCollectorTestCase.java +++ b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/BaseCollectorTestCase.java @@ -20,13 +20,10 @@ import org.elasticsearch.common.transport.TransportAddress; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.common.util.set.Sets; -import org.elasticsearch.license.LicenseService; import org.elasticsearch.license.XPackLicenseState; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.xpack.monitoring.Monitoring; import org.elasticsearch.xpack.monitoring.collector.Collector; -import org.elasticsearch.xpack.ssl.SSLService; import java.util.function.Function; diff --git a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/LocalStateMonitoring.java b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/LocalStateMonitoring.java index bab05c4fb4c..f1563e8c68b 100644 --- a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/LocalStateMonitoring.java +++ b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/LocalStateMonitoring.java @@ -8,8 +8,8 @@ package org.elasticsearch.xpack.monitoring; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.license.LicenseService; import org.elasticsearch.license.XPackLicenseState; -import org.elasticsearch.xpack.LocalStateCompositeXPackPlugin; -import org.elasticsearch.xpack.ssl.SSLService; +import org.elasticsearch.xpack.core.LocalStateCompositeXPackPlugin; +import org.elasticsearch.xpack.core.ssl.SSLService; import org.elasticsearch.xpack.watcher.Watcher; import java.nio.file.Path; diff --git a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/MonitoredSystemTests.java b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/MonitoredSystemTests.java index bee006b67b9..7f5d645dabb 100644 --- a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/MonitoredSystemTests.java +++ b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/MonitoredSystemTests.java @@ -6,6 +6,7 @@ package org.elasticsearch.xpack.monitoring; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.monitoring.MonitoredSystem; import java.util.Locale; diff --git a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringFeatureSetTests.java b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringFeatureSetTests.java index 5da23effd9b..cf0a9e04f01 100644 --- a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringFeatureSetTests.java +++ b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringFeatureSetTests.java @@ -13,8 +13,9 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.license.XPackLicenseState; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.rest.yaml.ObjectPath; -import org.elasticsearch.xpack.XPackFeatureSet; -import org.elasticsearch.xpack.XPackFeatureSet.Usage; +import org.elasticsearch.xpack.core.XPackFeatureSet; +import org.elasticsearch.xpack.core.XPackFeatureSet.Usage; +import org.elasticsearch.xpack.core.monitoring.MonitoringFeatureSetUsage; import org.elasticsearch.xpack.monitoring.exporter.Exporter; import org.elasticsearch.xpack.monitoring.exporter.Exporters; import org.elasticsearch.xpack.monitoring.exporter.http.HttpExporter; diff --git a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringHistoryDurationSettingsTests.java b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringHistoryDurationSettingsTests.java index 7770b670805..e1fa921f446 100644 --- a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringHistoryDurationSettingsTests.java +++ b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringHistoryDurationSettingsTests.java @@ -8,6 +8,7 @@ package org.elasticsearch.xpack.monitoring; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.monitoring.MonitoringField; public class MonitoringHistoryDurationSettingsTests extends ESTestCase { diff --git a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringServiceTests.java b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringServiceTests.java index adb81d9b798..0f23781c69c 100644 --- a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringServiceTests.java +++ b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringServiceTests.java @@ -14,9 +14,9 @@ import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.license.XPackLicenseState; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.TestThreadPool; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringDoc; import org.elasticsearch.xpack.monitoring.exporter.ExportException; import org.elasticsearch.xpack.monitoring.exporter.Exporters; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringDoc; import org.junit.After; import org.junit.Before; diff --git a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringTestUtils.java b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringTestUtils.java index d2a2b960b64..368758654cb 100644 --- a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringTestUtils.java +++ b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringTestUtils.java @@ -12,8 +12,9 @@ import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.transport.TransportAddress; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.test.RandomObjects; -import org.elasticsearch.xpack.monitoring.action.MonitoringBulkDoc; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringDoc; +import org.elasticsearch.xpack.core.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.action.MonitoringBulkDoc; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringDoc; import java.io.IOException; import java.util.Random; diff --git a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/MultiNodesStatsTests.java b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/MultiNodesStatsTests.java index a8f55ddc132..3aa0bc00aaf 100644 --- a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/MultiNodesStatsTests.java +++ b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/MultiNodesStatsTests.java @@ -14,7 +14,6 @@ import org.elasticsearch.search.aggregations.AggregationBuilders; import org.elasticsearch.search.aggregations.bucket.terms.StringTerms; import org.elasticsearch.test.ESIntegTestCase.ClusterScope; import org.elasticsearch.test.ESIntegTestCase.Scope; -import org.elasticsearch.xpack.XPackPlugin; import org.elasticsearch.xpack.monitoring.collector.node.NodeStatsMonitoringDoc; import org.elasticsearch.xpack.monitoring.test.MonitoringIntegTestCase; import org.junit.After; diff --git a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkDocTests.java b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkDocTests.java index 10d0333b677..57106363bc1 100644 --- a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkDocTests.java +++ b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkDocTests.java @@ -15,7 +15,8 @@ import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.EqualsHashCodeTestUtils; import org.elasticsearch.test.RandomObjects; -import org.elasticsearch.xpack.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.action.MonitoringBulkDoc; import org.junit.Before; import java.io.IOException; diff --git a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkRequestTests.java b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkRequestTests.java index 4de670ccf21..b336b3c8853 100644 --- a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkRequestTests.java +++ b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkRequestTests.java @@ -17,7 +17,9 @@ import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.RandomObjects; -import org.elasticsearch.xpack.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.action.MonitoringBulkDoc; +import org.elasticsearch.xpack.core.monitoring.action.MonitoringBulkRequest; import org.elasticsearch.xpack.monitoring.MonitoringTestUtils; import java.io.IOException; diff --git a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkResponseTests.java b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkResponseTests.java index b7de7766ecf..3b2aa984beb 100644 --- a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkResponseTests.java +++ b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkResponseTests.java @@ -11,6 +11,7 @@ import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.VersionUtils; +import org.elasticsearch.xpack.core.monitoring.action.MonitoringBulkResponse; import org.elasticsearch.xpack.monitoring.exporter.ExportException; import java.io.IOException; diff --git a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/action/MonitoringIndexTests.java b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/action/MonitoringIndexTests.java index 95cdbb7575c..af00f1220f7 100644 --- a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/action/MonitoringIndexTests.java +++ b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/action/MonitoringIndexTests.java @@ -8,6 +8,7 @@ package org.elasticsearch.xpack.monitoring.action; import org.elasticsearch.common.io.stream.BytesStreamOutput; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.monitoring.action.MonitoringIndex; import java.io.IOException; diff --git a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/action/TransportMonitoringBulkActionTests.java b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/action/TransportMonitoringBulkActionTests.java index dd4274b0f51..3217d55cb67 100644 --- a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/action/TransportMonitoringBulkActionTests.java +++ b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/action/TransportMonitoringBulkActionTests.java @@ -31,11 +31,15 @@ import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.RandomObjects; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.action.MonitoringBulkAction; +import org.elasticsearch.xpack.core.monitoring.action.MonitoringBulkDoc; +import org.elasticsearch.xpack.core.monitoring.action.MonitoringBulkRequest; +import org.elasticsearch.xpack.core.monitoring.action.MonitoringBulkResponse; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringDoc; import org.elasticsearch.xpack.monitoring.MonitoringTestUtils; import org.elasticsearch.xpack.monitoring.exporter.BytesReferenceMonitoringDoc; import org.elasticsearch.xpack.monitoring.exporter.Exporters; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringDoc; import org.junit.Before; import org.mockito.ArgumentCaptor; diff --git a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/cleaner/AbstractIndicesCleanerTestCase.java b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/cleaner/AbstractIndicesCleanerTestCase.java index 053355564b5..dcff0a27f92 100644 --- a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/cleaner/AbstractIndicesCleanerTestCase.java +++ b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/cleaner/AbstractIndicesCleanerTestCase.java @@ -8,11 +8,11 @@ package org.elasticsearch.xpack.monitoring.cleaner; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.elasticsearch.xpack.monitoring.MonitoringField; +import org.elasticsearch.xpack.core.monitoring.MonitoringField; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringTemplateUtils; import org.elasticsearch.xpack.monitoring.MonitoringService; import org.elasticsearch.xpack.monitoring.exporter.Exporter; import org.elasticsearch.xpack.monitoring.exporter.Exporters; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringTemplateUtils; import org.elasticsearch.xpack.monitoring.test.MonitoringIntegTestCase; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; diff --git a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/cleaner/CleanerServiceTests.java b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/cleaner/CleanerServiceTests.java index 3f3f9d5ba81..a38406c7c72 100644 --- a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/cleaner/CleanerServiceTests.java +++ b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/cleaner/CleanerServiceTests.java @@ -12,7 +12,7 @@ import org.elasticsearch.license.XPackLicenseState; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.TestThreadPool; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.xpack.monitoring.MonitoringField; +import org.elasticsearch.xpack.core.monitoring.MonitoringField; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.junit.After; diff --git a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/CollectorTests.java b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/CollectorTests.java index f2763fdd4f7..79279faa6f4 100644 --- a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/CollectorTests.java +++ b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/CollectorTests.java @@ -9,7 +9,7 @@ import org.elasticsearch.Version; import org.elasticsearch.cluster.node.DiscoveryNode; import org.elasticsearch.common.transport.TransportAddress; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringDoc; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringDoc; import java.util.Arrays; import java.util.Collections; diff --git a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStatsCollectorTests.java b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStatsCollectorTests.java index 261d5cf5f2a..a6f8f81c9aa 100644 --- a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStatsCollectorTests.java +++ b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStatsCollectorTests.java @@ -23,16 +23,16 @@ import org.elasticsearch.index.Index; import org.elasticsearch.index.IndexNotFoundException; import org.elasticsearch.license.License; import org.elasticsearch.license.LicenseService; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.XPackField; -import org.elasticsearch.xpack.action.XPackUsageAction; -import org.elasticsearch.xpack.action.XPackUsageRequest; -import org.elasticsearch.xpack.action.XPackUsageResponse; +import org.elasticsearch.xpack.core.XPackField; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.action.XPackUsageAction; +import org.elasticsearch.xpack.core.action.XPackUsageRequest; +import org.elasticsearch.xpack.core.action.XPackUsageResponse; +import org.elasticsearch.xpack.core.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.MonitoringFeatureSetUsage; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringDoc; import org.elasticsearch.xpack.monitoring.BaseCollectorTestCase; -import org.elasticsearch.xpack.monitoring.MonitoredSystem; -import org.elasticsearch.xpack.monitoring.MonitoringFeatureSetUsage; import org.elasticsearch.xpack.monitoring.MonitoringTestUtils; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringDoc; import org.junit.Assert; import java.util.Collection; diff --git a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStatsMonitoringDocTests.java b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStatsMonitoringDocTests.java index 7be81846ae5..8ff4bd77f02 100644 --- a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStatsMonitoringDocTests.java +++ b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStatsMonitoringDocTests.java @@ -43,11 +43,11 @@ import org.elasticsearch.monitor.process.ProcessStats; import org.elasticsearch.plugins.PluginInfo; import org.elasticsearch.test.VersionUtils; import org.elasticsearch.transport.TransportInfo; -import org.elasticsearch.xpack.XPackFeatureSet; -import org.elasticsearch.xpack.monitoring.MonitoredSystem; -import org.elasticsearch.xpack.monitoring.MonitoringFeatureSetUsage; +import org.elasticsearch.xpack.core.XPackFeatureSet; +import org.elasticsearch.xpack.core.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.MonitoringFeatureSetUsage; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringDoc; import org.elasticsearch.xpack.monitoring.exporter.BaseMonitoringDocTestCase; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringDoc; import org.junit.Before; import java.io.IOException; diff --git a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexRecoveryCollectorTests.java b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexRecoveryCollectorTests.java index 516c3aea4a0..3a87fa5a873 100644 --- a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexRecoveryCollectorTests.java +++ b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexRecoveryCollectorTests.java @@ -21,9 +21,9 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.index.shard.ShardId; import org.elasticsearch.indices.recovery.RecoveryState; -import org.elasticsearch.xpack.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringDoc; import org.elasticsearch.xpack.monitoring.BaseCollectorTestCase; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringDoc; import java.util.Collection; import java.util.HashMap; diff --git a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexRecoveryMonitoringDocTests.java b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexRecoveryMonitoringDocTests.java index 8d3777848ba..eb135ea5938 100644 --- a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexRecoveryMonitoringDocTests.java +++ b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexRecoveryMonitoringDocTests.java @@ -20,9 +20,9 @@ import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.index.shard.ShardId; import org.elasticsearch.indices.recovery.RecoveryState; import org.elasticsearch.transport.NodeDisconnectedException; -import org.elasticsearch.xpack.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringDoc; import org.elasticsearch.xpack.monitoring.exporter.BaseMonitoringDocTestCase; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringDoc; import org.junit.Before; import java.io.IOException; diff --git a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexStatsCollectorTests.java b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexStatsCollectorTests.java index d8206b7ba71..39c97e761bc 100644 --- a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexStatsCollectorTests.java +++ b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexStatsCollectorTests.java @@ -18,9 +18,9 @@ import org.elasticsearch.cluster.routing.IndexRoutingTable; import org.elasticsearch.cluster.routing.RoutingTable; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.xpack.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringDoc; import org.elasticsearch.xpack.monitoring.BaseCollectorTestCase; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringDoc; import java.util.Collection; import java.util.HashMap; diff --git a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexStatsMonitoringDocTests.java b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexStatsMonitoringDocTests.java index 059351b66df..278af123625 100644 --- a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexStatsMonitoringDocTests.java +++ b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexStatsMonitoringDocTests.java @@ -31,10 +31,10 @@ import org.elasticsearch.index.shard.DocsStats; import org.elasticsearch.index.shard.IndexingStats; import org.elasticsearch.index.shard.ShardId; import org.elasticsearch.index.store.StoreStats; -import org.elasticsearch.xpack.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringDoc; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringTemplateUtils; import org.elasticsearch.xpack.monitoring.exporter.BaseFilteredMonitoringDocTestCase; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringDoc; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringTemplateUtils; import org.junit.Before; import java.io.IOException; diff --git a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndicesStatsMonitoringDocTests.java b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndicesStatsMonitoringDocTests.java index 75acdde9d4f..896bce5a2d9 100644 --- a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndicesStatsMonitoringDocTests.java +++ b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndicesStatsMonitoringDocTests.java @@ -22,9 +22,9 @@ import org.elasticsearch.index.shard.IndexingStats; import org.elasticsearch.index.shard.ShardId; import org.elasticsearch.index.shard.ShardPath; import org.elasticsearch.index.store.StoreStats; -import org.elasticsearch.xpack.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringDoc; import org.elasticsearch.xpack.monitoring.exporter.BaseFilteredMonitoringDocTestCase; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringDoc; import org.junit.Before; import java.io.IOException; diff --git a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/ml/JobStatsCollectorTests.java b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/ml/JobStatsCollectorTests.java index af0213703b0..1d4e3d8857b 100644 --- a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/ml/JobStatsCollectorTests.java +++ b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/ml/JobStatsCollectorTests.java @@ -10,16 +10,16 @@ import org.elasticsearch.cluster.metadata.MetaData; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.util.concurrent.ThreadContext; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.ml.action.GetJobsStatsAction.Request; -import org.elasticsearch.xpack.ml.action.GetJobsStatsAction.Response; -import org.elasticsearch.xpack.ml.action.GetJobsStatsAction.Response.JobStats; -import org.elasticsearch.xpack.ml.action.util.QueryPage; -import org.elasticsearch.xpack.ml.client.MachineLearningClient; -import org.elasticsearch.xpack.ml.job.config.Job; -import org.elasticsearch.xpack.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.ml.action.GetJobsStatsAction.Request; +import org.elasticsearch.xpack.core.ml.action.GetJobsStatsAction.Response; +import org.elasticsearch.xpack.core.ml.action.GetJobsStatsAction.Response.JobStats; +import org.elasticsearch.xpack.core.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.client.MachineLearningClient; +import org.elasticsearch.xpack.core.ml.job.config.Job; +import org.elasticsearch.xpack.core.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringDoc; import org.elasticsearch.xpack.monitoring.BaseCollectorTestCase; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringDoc; import java.util.ArrayList; import java.util.List; diff --git a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/ml/JobStatsMonitoringDocTests.java b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/ml/JobStatsMonitoringDocTests.java index 6385fcb7827..88f34c4577c 100644 --- a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/ml/JobStatsMonitoringDocTests.java +++ b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/ml/JobStatsMonitoringDocTests.java @@ -12,13 +12,13 @@ import org.elasticsearch.common.transport.TransportAddress; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.XContentHelper; import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.xpack.ml.action.GetJobsStatsAction.Response.JobStats; -import org.elasticsearch.xpack.ml.job.config.JobState; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.DataCounts; -import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSizeStats; -import org.elasticsearch.xpack.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.ml.action.GetJobsStatsAction.Response.JobStats; +import org.elasticsearch.xpack.core.ml.job.config.JobState; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.DataCounts; +import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSizeStats; +import org.elasticsearch.xpack.core.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringDoc; import org.elasticsearch.xpack.monitoring.exporter.BaseMonitoringDocTestCase; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringDoc; import org.joda.time.DateTime; import org.junit.Before; diff --git a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/node/NodeStatsCollectorTests.java b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/node/NodeStatsCollectorTests.java index 6b88055d391..03692cc9d53 100644 --- a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/node/NodeStatsCollectorTests.java +++ b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/node/NodeStatsCollectorTests.java @@ -16,9 +16,9 @@ import org.elasticsearch.client.Client; import org.elasticsearch.client.ClusterAdminClient; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.xpack.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringDoc; import org.elasticsearch.xpack.monitoring.BaseCollectorTestCase; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringDoc; import java.util.Collection; import java.util.Collections; diff --git a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/node/NodeStatsMonitoringDocTests.java b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/node/NodeStatsMonitoringDocTests.java index f581f7dd596..f30fc4ba11d 100644 --- a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/node/NodeStatsMonitoringDocTests.java +++ b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/node/NodeStatsMonitoringDocTests.java @@ -28,9 +28,9 @@ import org.elasticsearch.monitor.jvm.JvmStats; import org.elasticsearch.monitor.os.OsStats; import org.elasticsearch.monitor.process.ProcessStats; import org.elasticsearch.threadpool.ThreadPoolStats; -import org.elasticsearch.xpack.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringDoc; import org.elasticsearch.xpack.monitoring.exporter.BaseFilteredMonitoringDocTestCase; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringDoc; import org.junit.Before; import java.io.IOException; diff --git a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/shards/ShardsCollectorTests.java b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/shards/ShardsCollectorTests.java index 20375be77ee..4affc3a1643 100644 --- a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/shards/ShardsCollectorTests.java +++ b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/shards/ShardsCollectorTests.java @@ -13,10 +13,10 @@ import org.elasticsearch.cluster.routing.TestShardRouting; import org.elasticsearch.common.Strings; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.index.shard.ShardId; -import org.elasticsearch.xpack.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringDoc; import org.elasticsearch.xpack.monitoring.BaseCollectorTestCase; import org.elasticsearch.xpack.monitoring.collector.Collector; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringDoc; import java.util.ArrayList; import java.util.Collection; diff --git a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/shards/ShardsMonitoringDocTests.java b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/shards/ShardsMonitoringDocTests.java index 9d32e12238e..ccec3421cd9 100644 --- a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/shards/ShardsMonitoringDocTests.java +++ b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/shards/ShardsMonitoringDocTests.java @@ -9,10 +9,10 @@ import org.elasticsearch.cluster.routing.ShardRouting; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.xcontent.XContentHelper; import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.xpack.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringDoc; import org.elasticsearch.xpack.monitoring.MonitoringTestUtils; import org.elasticsearch.xpack.monitoring.exporter.BaseFilteredMonitoringDocTestCase; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringDoc; import org.junit.Before; import java.io.IOException; diff --git a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/BaseFilteredMonitoringDocTestCase.java b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/BaseFilteredMonitoringDocTestCase.java index 2298643c4f0..d8146767709 100644 --- a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/BaseFilteredMonitoringDocTestCase.java +++ b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/BaseFilteredMonitoringDocTestCase.java @@ -10,7 +10,8 @@ import org.elasticsearch.common.util.set.Sets; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentHelper; import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.xpack.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringDoc; import java.io.IOException; import java.util.HashSet; diff --git a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/BaseMonitoringDocTestCase.java b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/BaseMonitoringDocTestCase.java index 5f8a533b8c3..5785f2e529d 100644 --- a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/BaseMonitoringDocTestCase.java +++ b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/BaseMonitoringDocTestCase.java @@ -20,7 +20,8 @@ import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.EqualsHashCodeTestUtils; -import org.elasticsearch.xpack.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringDoc; import org.elasticsearch.xpack.monitoring.MonitoringTestUtils; import org.elasticsearch.xpack.monitoring.collector.shards.ShardMonitoringDoc; import org.joda.time.DateTime; diff --git a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/BytesReferenceMonitoringDocTests.java b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/BytesReferenceMonitoringDocTests.java index caa86b8ba71..d2fff200ce7 100644 --- a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/BytesReferenceMonitoringDocTests.java +++ b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/BytesReferenceMonitoringDocTests.java @@ -12,7 +12,8 @@ import org.elasticsearch.common.xcontent.XContentHelper; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.test.EqualsHashCodeTestUtils; import org.elasticsearch.test.RandomObjects; -import org.elasticsearch.xpack.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringDoc; import org.elasticsearch.xpack.monitoring.MonitoringTestUtils; import org.junit.Before; @@ -21,7 +22,7 @@ import java.util.ArrayList; import java.util.List; import static org.elasticsearch.test.EqualsHashCodeTestUtils.checkEqualsAndHashCode; -import static org.elasticsearch.xpack.monitoring.MonitoredSystem.KIBANA; +import static org.elasticsearch.xpack.core.monitoring.MonitoredSystem.KIBANA; import static org.hamcrest.Matchers.equalTo; /** diff --git a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/ExportersTests.java b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/ExportersTests.java index 242814e49ed..78e4086d990 100644 --- a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/ExportersTests.java +++ b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/ExportersTests.java @@ -18,7 +18,8 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.license.XPackLicenseState; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.xpack.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringDoc; import org.elasticsearch.xpack.monitoring.MonitoringService; import org.elasticsearch.xpack.monitoring.cleaner.CleanerService; import org.elasticsearch.xpack.monitoring.exporter.local.LocalExporter; diff --git a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/MonitoringTemplateUtilsTests.java b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/MonitoringTemplateUtilsTests.java index 41a47777eeb..f229016c841 100644 --- a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/MonitoringTemplateUtilsTests.java +++ b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/MonitoringTemplateUtilsTests.java @@ -7,7 +7,8 @@ package org.elasticsearch.xpack.monitoring.exporter; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringTemplateUtils; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.joda.time.format.DateTimeFormat; @@ -15,15 +16,15 @@ import org.joda.time.format.DateTimeFormatter; import java.io.IOException; -import static org.elasticsearch.xpack.monitoring.exporter.MonitoringTemplateUtils.LAST_UPDATED_VERSION; -import static org.elasticsearch.xpack.monitoring.exporter.MonitoringTemplateUtils.OLD_TEMPLATE_IDS; -import static org.elasticsearch.xpack.monitoring.exporter.MonitoringTemplateUtils.OLD_TEMPLATE_VERSION; -import static org.elasticsearch.xpack.monitoring.exporter.MonitoringTemplateUtils.TEMPLATE_VERSION; -import static org.elasticsearch.xpack.monitoring.exporter.MonitoringTemplateUtils.indexName; -import static org.elasticsearch.xpack.monitoring.exporter.MonitoringTemplateUtils.oldTemplateName; -import static org.elasticsearch.xpack.monitoring.exporter.MonitoringTemplateUtils.pipelineName; -import static org.elasticsearch.xpack.monitoring.exporter.MonitoringTemplateUtils.templateName; -import static org.elasticsearch.xpack.template.TemplateUtilsTests.assertTemplate; +import static org.elasticsearch.xpack.core.monitoring.exporter.MonitoringTemplateUtils.LAST_UPDATED_VERSION; +import static org.elasticsearch.xpack.core.monitoring.exporter.MonitoringTemplateUtils.OLD_TEMPLATE_IDS; +import static org.elasticsearch.xpack.core.monitoring.exporter.MonitoringTemplateUtils.OLD_TEMPLATE_VERSION; +import static org.elasticsearch.xpack.core.monitoring.exporter.MonitoringTemplateUtils.TEMPLATE_VERSION; +import static org.elasticsearch.xpack.core.monitoring.exporter.MonitoringTemplateUtils.indexName; +import static org.elasticsearch.xpack.core.monitoring.exporter.MonitoringTemplateUtils.oldTemplateName; +import static org.elasticsearch.xpack.core.monitoring.exporter.MonitoringTemplateUtils.pipelineName; +import static org.elasticsearch.xpack.core.monitoring.exporter.MonitoringTemplateUtils.templateName; +import static org.elasticsearch.xpack.core.template.TemplateUtilsTests.assertTemplate; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; diff --git a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterIT.java b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterIT.java index 7d139ecf017..3124b343de8 100644 --- a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterIT.java +++ b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterIT.java @@ -29,15 +29,15 @@ import org.elasticsearch.test.ESIntegTestCase.Scope; import org.elasticsearch.test.http.MockRequest; import org.elasticsearch.test.http.MockResponse; import org.elasticsearch.test.http.MockWebServer; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringDoc; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringTemplateUtils; +import org.elasticsearch.xpack.core.ssl.SSLService; import org.elasticsearch.xpack.monitoring.MonitoringService; import org.elasticsearch.xpack.monitoring.MonitoringTestUtils; import org.elasticsearch.xpack.monitoring.collector.indices.IndexRecoveryMonitoringDoc; import org.elasticsearch.xpack.monitoring.exporter.ClusterAlertsUtil; import org.elasticsearch.xpack.monitoring.exporter.Exporter; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringDoc; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringTemplateUtils; import org.elasticsearch.xpack.monitoring.test.MonitoringIntegTestCase; -import org.elasticsearch.xpack.ssl.SSLService; import org.joda.time.format.DateTimeFormat; import org.junit.After; import org.junit.Before; @@ -56,9 +56,9 @@ import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.xpack.monitoring.exporter.MonitoringTemplateUtils.LAST_UPDATED_VERSION; -import static org.elasticsearch.xpack.monitoring.exporter.MonitoringTemplateUtils.TEMPLATE_VERSION; -import static org.elasticsearch.xpack.monitoring.exporter.MonitoringTemplateUtils.indexName; +import static org.elasticsearch.xpack.core.monitoring.exporter.MonitoringTemplateUtils.LAST_UPDATED_VERSION; +import static org.elasticsearch.xpack.core.monitoring.exporter.MonitoringTemplateUtils.TEMPLATE_VERSION; +import static org.elasticsearch.xpack.core.monitoring.exporter.MonitoringTemplateUtils.indexName; import static org.elasticsearch.xpack.monitoring.exporter.http.ClusterAlertHttpResource.CLUSTER_ALERT_VERSION_PARAMETERS; import static org.elasticsearch.xpack.monitoring.exporter.http.PublishableHttpResource.FILTER_PATH_RESOURCE_VERSION; import static org.elasticsearch.xpack.monitoring.exporter.http.WatcherExistsHttpResource.WATCHER_CHECK_PARAMETERS; diff --git a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterResourceTests.java b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterResourceTests.java index db8647153f1..166440e09e1 100644 --- a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterResourceTests.java +++ b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterResourceTests.java @@ -20,9 +20,9 @@ import org.elasticsearch.cluster.service.ClusterService; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.license.XPackLicenseState; import org.elasticsearch.rest.RestStatus; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringTemplateUtils; import org.elasticsearch.xpack.monitoring.exporter.ClusterAlertsUtil; import org.elasticsearch.xpack.monitoring.exporter.Exporter; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringTemplateUtils; import org.junit.Before; import java.io.IOException; @@ -31,9 +31,9 @@ import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; -import static org.elasticsearch.xpack.monitoring.exporter.MonitoringTemplateUtils.OLD_TEMPLATE_IDS; -import static org.elasticsearch.xpack.monitoring.exporter.MonitoringTemplateUtils.PIPELINE_IDS; -import static org.elasticsearch.xpack.monitoring.exporter.MonitoringTemplateUtils.TEMPLATE_IDS; +import static org.elasticsearch.xpack.core.monitoring.exporter.MonitoringTemplateUtils.OLD_TEMPLATE_IDS; +import static org.elasticsearch.xpack.core.monitoring.exporter.MonitoringTemplateUtils.PIPELINE_IDS; +import static org.elasticsearch.xpack.core.monitoring.exporter.MonitoringTemplateUtils.TEMPLATE_IDS; import static org.elasticsearch.xpack.monitoring.exporter.http.HttpExporter.TEMPLATE_CREATE_LEGACY_VERSIONS_SETTING; import static org.elasticsearch.xpack.monitoring.exporter.http.PublishableHttpResource.CheckResponse.DOES_NOT_EXIST; import static org.elasticsearch.xpack.monitoring.exporter.http.PublishableHttpResource.CheckResponse.EXISTS; diff --git a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterTests.java b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterTests.java index 18bcb32c364..ec54a7cc918 100644 --- a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterTests.java +++ b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterTests.java @@ -21,10 +21,10 @@ import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.license.XPackLicenseState; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringTemplateUtils; +import org.elasticsearch.xpack.core.ssl.SSLService; import org.elasticsearch.xpack.monitoring.exporter.ClusterAlertsUtil; import org.elasticsearch.xpack.monitoring.exporter.Exporter.Config; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringTemplateUtils; -import org.elasticsearch.xpack.ssl.SSLService; import org.junit.Before; import org.mockito.InOrder; @@ -36,9 +36,9 @@ import java.util.List; import java.util.Map; import java.util.stream.Collectors; -import static org.elasticsearch.xpack.monitoring.exporter.MonitoringTemplateUtils.OLD_TEMPLATE_IDS; -import static org.elasticsearch.xpack.monitoring.exporter.MonitoringTemplateUtils.PIPELINE_IDS; -import static org.elasticsearch.xpack.monitoring.exporter.MonitoringTemplateUtils.TEMPLATE_IDS; +import static org.elasticsearch.xpack.core.monitoring.exporter.MonitoringTemplateUtils.OLD_TEMPLATE_IDS; +import static org.elasticsearch.xpack.core.monitoring.exporter.MonitoringTemplateUtils.PIPELINE_IDS; +import static org.elasticsearch.xpack.core.monitoring.exporter.MonitoringTemplateUtils.TEMPLATE_IDS; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.not; diff --git a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/PipelineHttpResourceTests.java b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/PipelineHttpResourceTests.java index 5d03642d687..c97f5d03c0f 100644 --- a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/PipelineHttpResourceTests.java +++ b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/PipelineHttpResourceTests.java @@ -9,7 +9,7 @@ import org.apache.http.HttpEntity; import org.apache.http.entity.ByteArrayEntity; import org.apache.http.entity.ContentType; import org.elasticsearch.Version; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringTemplateUtils; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringTemplateUtils; import java.io.IOException; import java.io.InputStream; diff --git a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/TemplateHttpResourceTests.java b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/TemplateHttpResourceTests.java index 09476950e89..0922e5e3d5c 100644 --- a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/TemplateHttpResourceTests.java +++ b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/TemplateHttpResourceTests.java @@ -9,7 +9,7 @@ import org.apache.http.HttpEntity; import org.apache.http.entity.ContentType; import org.apache.http.entity.StringEntity; import org.elasticsearch.Version; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringTemplateUtils; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringTemplateUtils; import java.io.IOException; import java.io.InputStream; diff --git a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/local/LocalExporterIntegTestCase.java b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/local/LocalExporterIntegTestCase.java index f3f8e952d3a..ae73e88f8aa 100644 --- a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/local/LocalExporterIntegTestCase.java +++ b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/local/LocalExporterIntegTestCase.java @@ -10,7 +10,7 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.license.XPackLicenseState; import org.elasticsearch.threadpool.TestThreadPool; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.xpack.XPackSettings; +import org.elasticsearch.xpack.core.XPackSettings; import org.elasticsearch.xpack.monitoring.MonitoringService; import org.elasticsearch.xpack.monitoring.cleaner.CleanerService; import org.elasticsearch.xpack.monitoring.exporter.Exporter; diff --git a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/local/LocalExporterIntegTests.java b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/local/LocalExporterIntegTests.java index c43ce24c724..ffa967aa76f 100644 --- a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/local/LocalExporterIntegTests.java +++ b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/local/LocalExporterIntegTests.java @@ -24,12 +24,12 @@ import org.elasticsearch.search.SearchHit; import org.elasticsearch.search.aggregations.bucket.terms.Terms; import org.elasticsearch.search.aggregations.metrics.max.Max; import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.xpack.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.action.MonitoringBulkDoc; +import org.elasticsearch.xpack.core.monitoring.action.MonitoringBulkRequestBuilder; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringTemplateUtils; import org.elasticsearch.xpack.monitoring.MonitoringService; import org.elasticsearch.xpack.monitoring.MonitoringTestUtils; -import org.elasticsearch.xpack.monitoring.action.MonitoringBulkDoc; -import org.elasticsearch.xpack.monitoring.action.MonitoringBulkRequestBuilder; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringTemplateUtils; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.joda.time.format.DateTimeFormat; @@ -49,11 +49,11 @@ import java.util.stream.Collectors; import static org.elasticsearch.search.aggregations.AggregationBuilders.max; import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.xpack.monitoring.MonitoredSystem.BEATS; -import static org.elasticsearch.xpack.monitoring.MonitoredSystem.KIBANA; -import static org.elasticsearch.xpack.monitoring.MonitoredSystem.LOGSTASH; -import static org.elasticsearch.xpack.monitoring.exporter.MonitoringTemplateUtils.PIPELINE_IDS; -import static org.elasticsearch.xpack.monitoring.exporter.MonitoringTemplateUtils.TEMPLATE_VERSION; +import static org.elasticsearch.xpack.core.monitoring.MonitoredSystem.BEATS; +import static org.elasticsearch.xpack.core.monitoring.MonitoredSystem.KIBANA; +import static org.elasticsearch.xpack.core.monitoring.MonitoredSystem.LOGSTASH; +import static org.elasticsearch.xpack.core.monitoring.exporter.MonitoringTemplateUtils.PIPELINE_IDS; +import static org.elasticsearch.xpack.core.monitoring.exporter.MonitoringTemplateUtils.TEMPLATE_VERSION; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.is; diff --git a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/local/LocalExporterResourceIntegTests.java b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/local/LocalExporterResourceIntegTests.java index e8eb0e9e959..84fa0cbdedf 100644 --- a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/local/LocalExporterResourceIntegTests.java +++ b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/local/LocalExporterResourceIntegTests.java @@ -12,9 +12,9 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.ingest.PipelineConfiguration; import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.xpack.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringTemplateUtils; import org.elasticsearch.xpack.monitoring.exporter.ClusterAlertsUtil; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringTemplateUtils; import java.io.IOException; diff --git a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/integration/MonitoringIT.java b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/integration/MonitoringIT.java index 1931ff0e8c7..69f8b0f626a 100644 --- a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/integration/MonitoringIT.java +++ b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/integration/MonitoringIT.java @@ -26,14 +26,14 @@ import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.common.xcontent.support.XContentMapValues; import org.elasticsearch.license.License; import org.elasticsearch.test.rest.ESRestTestCase; -import org.elasticsearch.xpack.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.MonitoredSystem; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringTemplateUtils; import org.elasticsearch.xpack.monitoring.collector.cluster.ClusterStatsMonitoringDoc; import org.elasticsearch.xpack.monitoring.collector.indices.IndexRecoveryMonitoringDoc; import org.elasticsearch.xpack.monitoring.collector.indices.IndexStatsMonitoringDoc; import org.elasticsearch.xpack.monitoring.collector.indices.IndicesStatsMonitoringDoc; import org.elasticsearch.xpack.monitoring.collector.node.NodeStatsMonitoringDoc; import org.elasticsearch.xpack.monitoring.collector.shards.ShardMonitoringDoc; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringTemplateUtils; import org.elasticsearch.xpack.monitoring.rest.action.RestMonitoringBulkAction; import org.hamcrest.Matcher; import org.joda.time.format.DateTimeFormat; @@ -50,9 +50,9 @@ import static java.util.Collections.singletonMap; import static org.elasticsearch.common.xcontent.XContentHelper.toXContent; import static org.elasticsearch.common.xcontent.support.XContentMapValues.extractValue; import static org.elasticsearch.test.SecuritySettingsSourceField.TEST_PASSWORD_SECURE_STRING; +import static org.elasticsearch.xpack.core.monitoring.exporter.MonitoringTemplateUtils.TEMPLATE_VERSION; import static org.elasticsearch.xpack.monitoring.collector.cluster.ClusterStatsMonitoringDoc.hash; -import static org.elasticsearch.xpack.monitoring.exporter.MonitoringTemplateUtils.TEMPLATE_VERSION; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; diff --git a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/test/MonitoringIntegTestCase.java b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/test/MonitoringIntegTestCase.java index 00932f5dea9..8951b33f319 100644 --- a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/test/MonitoringIntegTestCase.java +++ b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/test/MonitoringIntegTestCase.java @@ -20,14 +20,15 @@ import org.elasticsearch.plugins.Plugin; import org.elasticsearch.test.ESIntegTestCase; import org.elasticsearch.test.store.MockFSIndexStore; import org.elasticsearch.test.transport.MockTransportService; -import org.elasticsearch.xpack.XPackClient; -import org.elasticsearch.xpack.XPackClientPlugin; -import org.elasticsearch.xpack.XPackSettings; +import org.elasticsearch.xpack.core.XPackClient; +import org.elasticsearch.xpack.core.XPackClientPlugin; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.monitoring.client.MonitoringClient; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringTemplateUtils; +import org.elasticsearch.xpack.core.monitoring.test.MockPainlessScriptEngine; import org.elasticsearch.xpack.monitoring.LocalStateMonitoring; import org.elasticsearch.xpack.monitoring.MonitoringService; -import org.elasticsearch.xpack.monitoring.client.MonitoringClient; import org.elasticsearch.xpack.monitoring.exporter.ClusterAlertsUtil; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringTemplateUtils; import org.junit.After; import org.junit.Before; diff --git a/plugin/security/src/main/bin/certgen b/plugin/security/src/main/bin/certgen index e15f01907fd..b091460f6a1 100644 --- a/plugin/security/src/main/bin/certgen +++ b/plugin/security/src/main/bin/certgen @@ -14,5 +14,5 @@ exec \ -Des.path.home="$ES_HOME" \ -Des.path.conf="$ES_PATH_CONF" \ -cp "$ES_CLASSPATH" \ - org.elasticsearch.xpack.ssl.CertificateGenerateTool \ + org.elasticsearch.xpack.core.ssl.CertificateGenerateTool \ "$@" diff --git a/plugin/security/src/main/bin/certgen.bat b/plugin/security/src/main/bin/certgen.bat index dc1563930fd..a0f2e6ed289 100644 --- a/plugin/security/src/main/bin/certgen.bat +++ b/plugin/security/src/main/bin/certgen.bat @@ -16,7 +16,7 @@ call "%~dp0x-pack-security-env.bat" || exit /b 1 -Des.path.home="%ES_HOME%" ^ -Des.path.conf="%ES_PATH_CONF%" ^ -cp "%ES_CLASSPATH%" ^ - org.elasticsearch.xpack.ssl.CertificateGenerateTool ^ + org.elasticsearch.xpack.core.ssl.CertificateGenerateTool ^ %* endlocal diff --git a/plugin/security/src/main/bin/certutil b/plugin/security/src/main/bin/certutil index 1cdf2181594..2c6874a5b78 100644 --- a/plugin/security/src/main/bin/certutil +++ b/plugin/security/src/main/bin/certutil @@ -14,5 +14,5 @@ exec \ -Des.path.home="$ES_HOME" \ -Des.path.conf="$ES_PATH_CONF" \ -cp "$ES_CLASSPATH" \ - org.elasticsearch.xpack.ssl.CertificateTool \ + org.elasticsearch.xpack.core.ssl.CertificateTool \ "$@" diff --git a/plugin/security/src/main/bin/certutil.bat b/plugin/security/src/main/bin/certutil.bat index 3152c2db587..32cf87d74a0 100644 --- a/plugin/security/src/main/bin/certutil.bat +++ b/plugin/security/src/main/bin/certutil.bat @@ -16,7 +16,7 @@ call "%~dp0x-pack-security-env.bat" || exit /b 1 -Des.path.home="%ES_HOME%" ^ -Des.path.conf="%ES_PATH_CONF%" ^ -cp "%ES_CLASSPATH%" ^ - org.elasticsearch.xpack.ssl.CertificateTool ^ + org.elasticsearch.xpack.core.ssl.CertificateTool ^ %* endlocal diff --git a/plugin/security/src/main/bin/extension b/plugin/security/src/main/bin/extension index 9a0773f8a06..3bed986920b 100755 --- a/plugin/security/src/main/bin/extension +++ b/plugin/security/src/main/bin/extension @@ -14,5 +14,5 @@ exec \ -Des.path.home="$ES_HOME" \ -Des.path.conf="$ES_PATH_CONF" \ -cp "$ES_CLASSPATH" \ - org.elasticsearch.xpack.extensions.XPackExtensionCli \ + org.elasticsearch.xpack.core.extensions.XPackExtensionCli \ "$@" diff --git a/plugin/security/src/main/bin/extension.bat b/plugin/security/src/main/bin/extension.bat index f9daf77f3db..4f6bb3a0515 100644 --- a/plugin/security/src/main/bin/extension.bat +++ b/plugin/security/src/main/bin/extension.bat @@ -16,7 +16,7 @@ call "%~dp0x-pack-security-env.bat" || exit /b 1 -Des.path.home="%ES_HOME%" ^ -Des.path.conf="%ES_PATH_CONF%" ^ -cp "%ES_CLASSPATH%" ^ - org.elasticsearch.xpack.extensions.XPackExtensionCli ^ + org.elasticsearch.xpack.core.extensions.XPackExtensionCli ^ %* endlocal diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/PkiRealmBootstrapCheck.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/PkiRealmBootstrapCheck.java index 01844cd56b3..8c8c13a78d7 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/PkiRealmBootstrapCheck.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/PkiRealmBootstrapCheck.java @@ -8,16 +8,16 @@ package org.elasticsearch.xpack.security; import org.elasticsearch.bootstrap.BootstrapCheck; import org.elasticsearch.bootstrap.BootstrapContext; import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.security.authc.RealmSettings; -import org.elasticsearch.xpack.security.authc.pki.PkiRealmSettings; -import org.elasticsearch.xpack.security.transport.netty4.SecurityNetty4Transport; -import org.elasticsearch.xpack.ssl.SSLService; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.security.authc.RealmSettings; +import org.elasticsearch.xpack.core.security.authc.pki.PkiRealmSettings; +import org.elasticsearch.xpack.core.security.transport.netty4.SecurityNetty4Transport; +import org.elasticsearch.xpack.core.ssl.SSLService; import java.util.Map; -import static org.elasticsearch.xpack.XPackSettings.HTTP_SSL_ENABLED; -import static org.elasticsearch.xpack.security.SecurityField.setting; +import static org.elasticsearch.xpack.core.XPackSettings.HTTP_SSL_ENABLED; +import static org.elasticsearch.xpack.core.security.SecurityField.setting; class PkiRealmBootstrapCheck implements BootstrapCheck { diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/Security.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/Security.java index 32fe0a061d6..df7718b296b 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/Security.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/Security.java @@ -77,10 +77,60 @@ import org.elasticsearch.transport.TransportInterceptor; import org.elasticsearch.transport.TransportRequest; import org.elasticsearch.transport.TransportRequestHandler; import org.elasticsearch.watcher.ResourceWatcherService; -import org.elasticsearch.xpack.XPackPlugin; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.extensions.XPackExtension; -import org.elasticsearch.xpack.extensions.XPackExtensionsService; +import org.elasticsearch.xpack.core.XPackPlugin; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.extensions.XPackExtension; +import org.elasticsearch.xpack.core.extensions.XPackExtensionsService; +import org.elasticsearch.xpack.core.security.SecurityContext; +import org.elasticsearch.xpack.core.security.SecurityField; +import org.elasticsearch.xpack.core.security.SecuritySettings; +import org.elasticsearch.xpack.core.security.action.realm.ClearRealmCacheAction; +import org.elasticsearch.xpack.core.security.action.role.ClearRolesCacheAction; +import org.elasticsearch.xpack.core.security.action.role.DeleteRoleAction; +import org.elasticsearch.xpack.core.security.action.role.GetRolesAction; +import org.elasticsearch.xpack.core.security.action.role.PutRoleAction; +import org.elasticsearch.xpack.core.security.action.rolemapping.DeleteRoleMappingAction; +import org.elasticsearch.xpack.core.security.action.rolemapping.GetRoleMappingsAction; +import org.elasticsearch.xpack.core.security.action.rolemapping.PutRoleMappingAction; +import org.elasticsearch.xpack.core.security.action.saml.SamlAuthenticateAction; +import org.elasticsearch.xpack.core.security.action.saml.SamlInvalidateSessionAction; +import org.elasticsearch.xpack.core.security.action.saml.SamlLogoutAction; +import org.elasticsearch.xpack.core.security.action.saml.SamlPrepareAuthenticationAction; +import org.elasticsearch.xpack.core.security.action.token.CreateTokenAction; +import org.elasticsearch.xpack.core.security.action.token.InvalidateTokenAction; +import org.elasticsearch.xpack.core.security.action.token.RefreshTokenAction; +import org.elasticsearch.xpack.core.security.action.user.AuthenticateAction; +import org.elasticsearch.xpack.core.security.action.user.ChangePasswordAction; +import org.elasticsearch.xpack.core.security.action.user.DeleteUserAction; +import org.elasticsearch.xpack.core.security.action.user.GetUsersAction; +import org.elasticsearch.xpack.core.security.action.user.HasPrivilegesAction; +import org.elasticsearch.xpack.core.security.action.user.PutUserAction; +import org.elasticsearch.xpack.core.security.action.user.SetEnabledAction; +import org.elasticsearch.xpack.core.security.authc.AuthenticationFailureHandler; +import org.elasticsearch.xpack.core.security.authc.AuthenticationServiceField; +import org.elasticsearch.xpack.core.security.authc.DefaultAuthenticationFailureHandler; +import org.elasticsearch.xpack.core.security.authc.Realm; +import org.elasticsearch.xpack.core.security.authc.RealmSettings; +import org.elasticsearch.xpack.core.security.authc.TokenMetaData; +import org.elasticsearch.xpack.core.security.authc.esnative.NativeRealmSettings; +import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; +import org.elasticsearch.xpack.core.security.authz.AuthorizationServiceField; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor; +import org.elasticsearch.xpack.core.security.authz.accesscontrol.IndicesAccessControl; +import org.elasticsearch.xpack.core.security.authz.accesscontrol.SecurityIndexSearcherWrapper; +import org.elasticsearch.xpack.core.security.authz.accesscontrol.SetSecurityUserProcessor; +import org.elasticsearch.xpack.core.security.authz.permission.FieldPermissions; +import org.elasticsearch.xpack.core.security.authz.permission.FieldPermissionsCache; +import org.elasticsearch.xpack.security.authz.store.FileRolesStore; +import org.elasticsearch.xpack.core.security.authz.store.ReservedRolesStore; +import org.elasticsearch.xpack.core.security.index.IndexAuditTrailField; +import org.elasticsearch.xpack.core.security.user.AnonymousUser; +import org.elasticsearch.xpack.core.ssl.SSLConfigurationSettings; +import org.elasticsearch.xpack.core.ssl.SSLService; +import org.elasticsearch.xpack.core.ssl.TLSLicenseBootstrapCheck; +import org.elasticsearch.xpack.core.ssl.action.GetCertificateInfoAction; +import org.elasticsearch.xpack.core.ssl.action.TransportGetCertificateInfoAction; +import org.elasticsearch.xpack.core.ssl.rest.RestGetCertificateInfoAction; import org.elasticsearch.xpack.security.action.filter.SecurityActionFilter; import org.elasticsearch.xpack.security.action.interceptor.BulkShardRequestInterceptor; import org.elasticsearch.xpack.security.action.interceptor.IndicesAliasesRequestInterceptor; @@ -88,43 +138,21 @@ import org.elasticsearch.xpack.security.action.interceptor.RequestInterceptor; import org.elasticsearch.xpack.security.action.interceptor.ResizeRequestInterceptor; import org.elasticsearch.xpack.security.action.interceptor.SearchRequestInterceptor; import org.elasticsearch.xpack.security.action.interceptor.UpdateRequestInterceptor; -import org.elasticsearch.xpack.security.action.realm.ClearRealmCacheAction; import org.elasticsearch.xpack.security.action.realm.TransportClearRealmCacheAction; -import org.elasticsearch.xpack.security.action.role.ClearRolesCacheAction; -import org.elasticsearch.xpack.security.action.role.DeleteRoleAction; -import org.elasticsearch.xpack.security.action.role.GetRolesAction; -import org.elasticsearch.xpack.security.action.role.PutRoleAction; import org.elasticsearch.xpack.security.action.role.TransportClearRolesCacheAction; import org.elasticsearch.xpack.security.action.role.TransportDeleteRoleAction; import org.elasticsearch.xpack.security.action.role.TransportGetRolesAction; import org.elasticsearch.xpack.security.action.role.TransportPutRoleAction; -import org.elasticsearch.xpack.security.action.rolemapping.DeleteRoleMappingAction; -import org.elasticsearch.xpack.security.action.rolemapping.GetRoleMappingsAction; -import org.elasticsearch.xpack.security.action.rolemapping.PutRoleMappingAction; import org.elasticsearch.xpack.security.action.rolemapping.TransportDeleteRoleMappingAction; import org.elasticsearch.xpack.security.action.rolemapping.TransportGetRoleMappingsAction; import org.elasticsearch.xpack.security.action.rolemapping.TransportPutRoleMappingAction; -import org.elasticsearch.xpack.security.action.saml.SamlAuthenticateAction; -import org.elasticsearch.xpack.security.action.saml.SamlInvalidateSessionAction; -import org.elasticsearch.xpack.security.action.saml.SamlPrepareAuthenticationAction; -import org.elasticsearch.xpack.security.action.saml.SamlLogoutAction; import org.elasticsearch.xpack.security.action.saml.TransportSamlAuthenticateAction; import org.elasticsearch.xpack.security.action.saml.TransportSamlInvalidateSessionAction; -import org.elasticsearch.xpack.security.action.saml.TransportSamlPrepareAuthenticationAction; import org.elasticsearch.xpack.security.action.saml.TransportSamlLogoutAction; -import org.elasticsearch.xpack.security.action.token.CreateTokenAction; -import org.elasticsearch.xpack.security.action.token.InvalidateTokenAction; -import org.elasticsearch.xpack.security.action.token.RefreshTokenAction; +import org.elasticsearch.xpack.security.action.saml.TransportSamlPrepareAuthenticationAction; import org.elasticsearch.xpack.security.action.token.TransportCreateTokenAction; import org.elasticsearch.xpack.security.action.token.TransportInvalidateTokenAction; import org.elasticsearch.xpack.security.action.token.TransportRefreshTokenAction; -import org.elasticsearch.xpack.security.action.user.AuthenticateAction; -import org.elasticsearch.xpack.security.action.user.ChangePasswordAction; -import org.elasticsearch.xpack.security.action.user.DeleteUserAction; -import org.elasticsearch.xpack.security.action.user.GetUsersAction; -import org.elasticsearch.xpack.security.action.user.HasPrivilegesAction; -import org.elasticsearch.xpack.security.action.user.PutUserAction; -import org.elasticsearch.xpack.security.action.user.SetEnabledAction; import org.elasticsearch.xpack.security.action.user.TransportAuthenticateAction; import org.elasticsearch.xpack.security.action.user.TransportChangePasswordAction; import org.elasticsearch.xpack.security.action.user.TransportDeleteUserAction; @@ -135,38 +163,20 @@ import org.elasticsearch.xpack.security.action.user.TransportSetEnabledAction; import org.elasticsearch.xpack.security.audit.AuditTrail; import org.elasticsearch.xpack.security.audit.AuditTrailService; import org.elasticsearch.xpack.security.audit.index.IndexAuditTrail; -import org.elasticsearch.xpack.security.audit.index.IndexAuditTrailField; import org.elasticsearch.xpack.security.audit.index.IndexNameResolver; import org.elasticsearch.xpack.security.audit.logfile.LoggingAuditTrail; -import org.elasticsearch.xpack.security.authc.AuthenticationFailureHandler; import org.elasticsearch.xpack.security.authc.AuthenticationService; -import org.elasticsearch.xpack.security.authc.AuthenticationServiceField; -import org.elasticsearch.xpack.security.authc.DefaultAuthenticationFailureHandler; import org.elasticsearch.xpack.security.authc.InternalRealms; -import org.elasticsearch.xpack.security.authc.Realm; -import org.elasticsearch.xpack.security.authc.RealmSettings; import org.elasticsearch.xpack.security.authc.Realms; -import org.elasticsearch.xpack.security.authc.TokenMetaData; import org.elasticsearch.xpack.security.authc.TokenService; -import org.elasticsearch.xpack.security.authc.esnative.NativeRealmSettings; import org.elasticsearch.xpack.security.authc.esnative.NativeUsersStore; import org.elasticsearch.xpack.security.authc.esnative.ReservedRealm; -import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken; import org.elasticsearch.xpack.security.authc.support.mapper.NativeRoleMappingStore; import org.elasticsearch.xpack.security.authz.AuthorizationService; -import org.elasticsearch.xpack.security.authz.AuthorizationServiceField; -import org.elasticsearch.xpack.security.authz.RoleDescriptor; import org.elasticsearch.xpack.security.authz.SecuritySearchOperationListener; -import org.elasticsearch.xpack.security.authz.accesscontrol.IndicesAccessControl; import org.elasticsearch.xpack.security.authz.accesscontrol.OptOutQueryCache; -import org.elasticsearch.xpack.security.authz.accesscontrol.SecurityIndexSearcherWrapper; -import org.elasticsearch.xpack.security.authz.accesscontrol.SetSecurityUserProcessor; -import org.elasticsearch.xpack.security.authz.permission.FieldPermissions; -import org.elasticsearch.xpack.security.authz.permission.FieldPermissionsCache; import org.elasticsearch.xpack.security.authz.store.CompositeRolesStore; -import org.elasticsearch.xpack.security.authz.store.FileRolesStore; import org.elasticsearch.xpack.security.authz.store.NativeRolesStore; -import org.elasticsearch.xpack.security.authz.store.ReservedRolesStore; import org.elasticsearch.xpack.security.rest.SecurityRestFilter; import org.elasticsearch.xpack.security.rest.action.RestAuthenticateAction; import org.elasticsearch.xpack.security.rest.action.oauth2.RestGetTokenAction; @@ -181,8 +191,8 @@ import org.elasticsearch.xpack.security.rest.action.rolemapping.RestGetRoleMappi import org.elasticsearch.xpack.security.rest.action.rolemapping.RestPutRoleMappingAction; import org.elasticsearch.xpack.security.rest.action.saml.RestSamlAuthenticateAction; import org.elasticsearch.xpack.security.rest.action.saml.RestSamlInvalidateSessionAction; -import org.elasticsearch.xpack.security.rest.action.saml.RestSamlPrepareAuthenticationAction; import org.elasticsearch.xpack.security.rest.action.saml.RestSamlLogoutAction; +import org.elasticsearch.xpack.security.rest.action.saml.RestSamlPrepareAuthenticationAction; import org.elasticsearch.xpack.security.rest.action.user.RestChangePasswordAction; import org.elasticsearch.xpack.security.rest.action.user.RestDeleteUserAction; import org.elasticsearch.xpack.security.rest.action.user.RestGetUsersAction; @@ -194,14 +204,7 @@ import org.elasticsearch.xpack.security.transport.SecurityServerTransportInterce import org.elasticsearch.xpack.security.transport.filter.IPFilter; import org.elasticsearch.xpack.security.transport.netty4.SecurityNetty4HttpServerTransport; import org.elasticsearch.xpack.security.transport.netty4.SecurityNetty4ServerTransport; -import org.elasticsearch.xpack.security.user.AnonymousUser; -import org.elasticsearch.xpack.ssl.SSLConfigurationSettings; -import org.elasticsearch.xpack.ssl.SSLService; -import org.elasticsearch.xpack.ssl.TLSLicenseBootstrapCheck; -import org.elasticsearch.xpack.ssl.action.GetCertificateInfoAction; -import org.elasticsearch.xpack.ssl.action.TransportGetCertificateInfoAction; -import org.elasticsearch.xpack.ssl.rest.RestGetCertificateInfoAction; -import org.elasticsearch.xpack.template.TemplateUtils; +import org.elasticsearch.xpack.core.template.TemplateUtils; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; @@ -230,10 +233,10 @@ import java.util.stream.Collectors; import static java.util.Collections.emptyList; import static java.util.Collections.singletonList; import static org.elasticsearch.cluster.metadata.IndexMetaData.INDEX_FORMAT_SETTING; -import static org.elasticsearch.xpack.XPackPlugin.resolveXPackExtensionsFile; -import static org.elasticsearch.xpack.XPackSettings.HTTP_SSL_ENABLED; +import static org.elasticsearch.xpack.core.XPackPlugin.resolveXPackExtensionsFile; +import static org.elasticsearch.xpack.core.XPackSettings.HTTP_SSL_ENABLED; +import static org.elasticsearch.xpack.core.security.SecurityLifecycleServiceField.SECURITY_TEMPLATE_NAME; import static org.elasticsearch.xpack.security.SecurityLifecycleService.SECURITY_INDEX_NAME; -import static org.elasticsearch.xpack.security.SecurityLifecycleServiceField.SECURITY_TEMPLATE_NAME; import static org.elasticsearch.xpack.security.support.IndexLifecycleManager.INTERNAL_INDEX_FORMAT; public class Security extends Plugin implements ActionPlugin, IngestPlugin, NetworkPlugin, ClusterPlugin, @@ -350,7 +353,6 @@ public class Security extends Plugin implements ActionPlugin, IngestPlugin, Netw NamedXContentRegistry xContentRegistry, Environment environment, NodeEnvironment nodeEnvironment, NamedWriteableRegistry namedWriteableRegistry) { try { - return createComponents(client, threadPool, clusterService, resourceWatcherService, extensionsService.getExtensions().stream().collect(Collectors.toList())); } catch (final Exception e) { diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/SecurityFeatureSet.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/SecurityFeatureSet.java index b3eac1578da..f1c60f08b25 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/SecurityFeatureSet.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/SecurityFeatureSet.java @@ -5,29 +5,30 @@ */ package org.elasticsearch.xpack.security; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; -import java.util.concurrent.atomic.AtomicReference; - import org.elasticsearch.action.ActionListener; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.concurrent.CountDown; import org.elasticsearch.license.XPackLicenseState; -import org.elasticsearch.xpack.XPackFeatureSet; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.XPackField; +import org.elasticsearch.xpack.core.XPackFeatureSet; +import org.elasticsearch.xpack.core.XPackField; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.security.SecurityFeatureSetUsage; +import org.elasticsearch.xpack.core.security.user.AnonymousUser; import org.elasticsearch.xpack.security.authc.Realms; import org.elasticsearch.xpack.security.authc.support.mapper.NativeRoleMappingStore; import org.elasticsearch.xpack.security.authz.store.CompositeRolesStore; import org.elasticsearch.xpack.security.transport.filter.IPFilter; -import org.elasticsearch.xpack.security.user.AnonymousUser; + +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.atomic.AtomicReference; import static java.util.Collections.singletonMap; -import static org.elasticsearch.xpack.XPackSettings.HTTP_SSL_ENABLED; -import static org.elasticsearch.xpack.XPackSettings.TRANSPORT_SSL_ENABLED; +import static org.elasticsearch.xpack.core.XPackSettings.HTTP_SSL_ENABLED; +import static org.elasticsearch.xpack.core.XPackSettings.TRANSPORT_SSL_ENABLED; /** * Indicates whether the features of Security are currently in use diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/TokenSSLBootstrapCheck.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/TokenSSLBootstrapCheck.java index dfa3681c3f8..cc6da232479 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/TokenSSLBootstrapCheck.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/TokenSSLBootstrapCheck.java @@ -8,8 +8,7 @@ package org.elasticsearch.xpack.security; import org.elasticsearch.bootstrap.BootstrapCheck; import org.elasticsearch.bootstrap.BootstrapContext; import org.elasticsearch.common.network.NetworkModule; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.xpack.XPackSettings; +import org.elasticsearch.xpack.core.XPackSettings; import java.util.Locale; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/filter/SecurityActionFilter.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/filter/SecurityActionFilter.java index 81ccb354dc1..43d9c7d8ea6 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/filter/SecurityActionFilter.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/filter/SecurityActionFilter.java @@ -24,18 +24,18 @@ import org.elasticsearch.license.LicenseUtils; import org.elasticsearch.license.XPackLicenseState; import org.elasticsearch.tasks.Task; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.xpack.XPackField; -import org.elasticsearch.xpack.security.SecurityContext; +import org.elasticsearch.xpack.core.XPackField; +import org.elasticsearch.xpack.core.security.SecurityContext; +import org.elasticsearch.xpack.core.security.authc.Authentication; +import org.elasticsearch.xpack.core.security.authz.privilege.HealthAndStatsPrivilege; +import org.elasticsearch.xpack.core.security.support.Automatons; +import org.elasticsearch.xpack.core.security.user.SystemUser; +import org.elasticsearch.xpack.core.security.user.User; import org.elasticsearch.xpack.security.action.SecurityActionMapper; import org.elasticsearch.xpack.security.action.interceptor.RequestInterceptor; -import org.elasticsearch.xpack.security.authc.Authentication; import org.elasticsearch.xpack.security.authc.AuthenticationService; import org.elasticsearch.xpack.security.authz.AuthorizationService; import org.elasticsearch.xpack.security.authz.AuthorizationUtils; -import org.elasticsearch.xpack.security.authz.privilege.HealthAndStatsPrivilege; -import org.elasticsearch.xpack.security.support.Automatons; -import org.elasticsearch.xpack.security.user.SystemUser; -import org.elasticsearch.xpack.security.user.User; import java.io.IOException; import java.util.Set; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/interceptor/BulkShardRequestInterceptor.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/interceptor/BulkShardRequestInterceptor.java index 0fa26d3bb0c..de36aa0e672 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/interceptor/BulkShardRequestInterceptor.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/interceptor/BulkShardRequestInterceptor.java @@ -16,10 +16,10 @@ import org.elasticsearch.license.XPackLicenseState; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportRequest; -import org.elasticsearch.xpack.security.authz.AuthorizationServiceField; -import org.elasticsearch.xpack.security.authz.accesscontrol.IndicesAccessControl; -import org.elasticsearch.xpack.security.authz.permission.Role; -import org.elasticsearch.xpack.security.user.User; +import org.elasticsearch.xpack.core.security.authz.AuthorizationServiceField; +import org.elasticsearch.xpack.core.security.authz.accesscontrol.IndicesAccessControl; +import org.elasticsearch.xpack.core.security.authz.permission.Role; +import org.elasticsearch.xpack.core.security.user.User; /** * Similar to {@link UpdateRequestInterceptor}, but checks if there are update requests embedded in a bulk request. diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/interceptor/FieldAndDocumentLevelSecurityRequestInterceptor.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/interceptor/FieldAndDocumentLevelSecurityRequestInterceptor.java index b835de8a732..7711bf3277b 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/interceptor/FieldAndDocumentLevelSecurityRequestInterceptor.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/interceptor/FieldAndDocumentLevelSecurityRequestInterceptor.java @@ -10,10 +10,10 @@ import org.elasticsearch.common.component.AbstractComponent; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.license.XPackLicenseState; -import org.elasticsearch.xpack.security.authz.AuthorizationServiceField; -import org.elasticsearch.xpack.security.authz.accesscontrol.IndicesAccessControl; -import org.elasticsearch.xpack.security.authz.permission.Role; -import org.elasticsearch.xpack.security.user.User; +import org.elasticsearch.xpack.core.security.authz.AuthorizationServiceField; +import org.elasticsearch.xpack.core.security.authz.accesscontrol.IndicesAccessControl; +import org.elasticsearch.xpack.core.security.authz.permission.Role; +import org.elasticsearch.xpack.core.security.user.User; /** * Base class for interceptors that disables features when field level security is configured for indices a request diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/interceptor/IndicesAliasesRequestInterceptor.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/interceptor/IndicesAliasesRequestInterceptor.java index c60206fca3f..bdb19621da5 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/interceptor/IndicesAliasesRequestInterceptor.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/interceptor/IndicesAliasesRequestInterceptor.java @@ -13,12 +13,12 @@ import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.license.XPackLicenseState; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.transport.TransportRequest; +import org.elasticsearch.xpack.core.security.authz.AuthorizationServiceField; +import org.elasticsearch.xpack.core.security.authz.accesscontrol.IndicesAccessControl; +import org.elasticsearch.xpack.core.security.authz.permission.Role; +import org.elasticsearch.xpack.core.security.support.Exceptions; +import org.elasticsearch.xpack.core.security.user.User; import org.elasticsearch.xpack.security.audit.AuditTrailService; -import org.elasticsearch.xpack.security.authz.AuthorizationServiceField; -import org.elasticsearch.xpack.security.authz.accesscontrol.IndicesAccessControl; -import org.elasticsearch.xpack.security.authz.permission.Role; -import org.elasticsearch.xpack.security.support.Exceptions; -import org.elasticsearch.xpack.security.user.User; import java.util.HashMap; import java.util.Map; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/interceptor/RequestInterceptor.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/interceptor/RequestInterceptor.java index 5c1d137f88f..933bb522649 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/interceptor/RequestInterceptor.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/interceptor/RequestInterceptor.java @@ -5,9 +5,9 @@ */ package org.elasticsearch.xpack.security.action.interceptor; -import org.elasticsearch.xpack.security.authz.permission.Role; -import org.elasticsearch.xpack.security.user.User; import org.elasticsearch.transport.TransportRequest; +import org.elasticsearch.xpack.core.security.authz.permission.Role; +import org.elasticsearch.xpack.core.security.user.User; /** * A request interceptor can introspect a request and modify it. diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/interceptor/ResizeRequestInterceptor.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/interceptor/ResizeRequestInterceptor.java index 71d2dc3111e..f11410f33b7 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/interceptor/ResizeRequestInterceptor.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/interceptor/ResizeRequestInterceptor.java @@ -16,12 +16,12 @@ import org.elasticsearch.license.XPackLicenseState; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportRequest; +import org.elasticsearch.xpack.core.security.authz.AuthorizationServiceField; +import org.elasticsearch.xpack.core.security.authz.accesscontrol.IndicesAccessControl; +import org.elasticsearch.xpack.core.security.authz.permission.Role; +import org.elasticsearch.xpack.core.security.support.Exceptions; +import org.elasticsearch.xpack.core.security.user.User; import org.elasticsearch.xpack.security.audit.AuditTrailService; -import org.elasticsearch.xpack.security.authz.AuthorizationServiceField; -import org.elasticsearch.xpack.security.authz.accesscontrol.IndicesAccessControl; -import org.elasticsearch.xpack.security.authz.permission.Role; -import org.elasticsearch.xpack.security.support.Exceptions; -import org.elasticsearch.xpack.security.user.User; public final class ResizeRequestInterceptor extends AbstractComponent implements RequestInterceptor { diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/realm/TransportClearRealmCacheAction.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/realm/TransportClearRealmCacheAction.java index 3901a93fa56..1f7a307396a 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/realm/TransportClearRealmCacheAction.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/realm/TransportClearRealmCacheAction.java @@ -13,7 +13,10 @@ import org.elasticsearch.cluster.service.ClusterService; import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver; import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.xpack.security.authc.Realm; +import org.elasticsearch.xpack.core.security.action.realm.ClearRealmCacheAction; +import org.elasticsearch.xpack.core.security.action.realm.ClearRealmCacheRequest; +import org.elasticsearch.xpack.core.security.action.realm.ClearRealmCacheResponse; +import org.elasticsearch.xpack.core.security.authc.Realm; import org.elasticsearch.xpack.security.authc.Realms; import org.elasticsearch.xpack.security.authc.support.CachingRealm; import org.elasticsearch.threadpool.ThreadPool; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/role/TransportClearRolesCacheAction.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/role/TransportClearRolesCacheAction.java index 07f5a03ac11..92e524b0c50 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/role/TransportClearRolesCacheAction.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/role/TransportClearRolesCacheAction.java @@ -12,6 +12,9 @@ import org.elasticsearch.cluster.service.ClusterService; import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver; import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; +import org.elasticsearch.xpack.core.security.action.role.ClearRolesCacheAction; +import org.elasticsearch.xpack.core.security.action.role.ClearRolesCacheRequest; +import org.elasticsearch.xpack.core.security.action.role.ClearRolesCacheResponse; import org.elasticsearch.xpack.security.authz.store.CompositeRolesStore; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/role/TransportDeleteRoleAction.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/role/TransportDeleteRoleAction.java index b866e00d37d..756e330ff3a 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/role/TransportDeleteRoleAction.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/role/TransportDeleteRoleAction.java @@ -15,8 +15,11 @@ import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; +import org.elasticsearch.xpack.core.security.action.role.DeleteRoleAction; +import org.elasticsearch.xpack.core.security.action.role.DeleteRoleRequest; +import org.elasticsearch.xpack.core.security.action.role.DeleteRoleResponse; +import org.elasticsearch.xpack.core.security.authz.store.ReservedRolesStore; import org.elasticsearch.xpack.security.authz.store.NativeRolesStore; -import org.elasticsearch.xpack.security.authz.store.ReservedRolesStore; public class TransportDeleteRoleAction extends HandledTransportAction { diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/role/TransportGetRolesAction.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/role/TransportGetRolesAction.java index 29097391896..74f93ddff2f 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/role/TransportGetRolesAction.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/role/TransportGetRolesAction.java @@ -13,9 +13,12 @@ import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.security.authz.RoleDescriptor; +import org.elasticsearch.xpack.core.security.action.role.GetRolesAction; +import org.elasticsearch.xpack.core.security.action.role.GetRolesRequest; +import org.elasticsearch.xpack.core.security.action.role.GetRolesResponse; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor; +import org.elasticsearch.xpack.core.security.authz.store.ReservedRolesStore; import org.elasticsearch.xpack.security.authz.store.NativeRolesStore; -import org.elasticsearch.xpack.security.authz.store.ReservedRolesStore; import java.util.ArrayList; import java.util.List; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/role/TransportPutRoleAction.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/role/TransportPutRoleAction.java index fd2d9442b71..874a11131c5 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/role/TransportPutRoleAction.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/role/TransportPutRoleAction.java @@ -11,10 +11,13 @@ import org.elasticsearch.action.support.HandledTransportAction; import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver; import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.xpack.security.authz.store.NativeRolesStore; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.security.authz.store.ReservedRolesStore; +import org.elasticsearch.xpack.core.security.action.role.PutRoleAction; +import org.elasticsearch.xpack.core.security.action.role.PutRoleRequest; +import org.elasticsearch.xpack.core.security.action.role.PutRoleResponse; +import org.elasticsearch.xpack.core.security.authz.store.ReservedRolesStore; +import org.elasticsearch.xpack.security.authz.store.NativeRolesStore; public class TransportPutRoleAction extends HandledTransportAction { diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/TransportDeleteRoleMappingAction.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/TransportDeleteRoleMappingAction.java index cf41416238f..dd2bf593cbe 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/TransportDeleteRoleMappingAction.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/TransportDeleteRoleMappingAction.java @@ -13,6 +13,9 @@ import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; +import org.elasticsearch.xpack.core.security.action.rolemapping.DeleteRoleMappingAction; +import org.elasticsearch.xpack.core.security.action.rolemapping.DeleteRoleMappingRequest; +import org.elasticsearch.xpack.core.security.action.rolemapping.DeleteRoleMappingResponse; import org.elasticsearch.xpack.security.authc.support.mapper.NativeRoleMappingStore; public class TransportDeleteRoleMappingAction diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/TransportGetRoleMappingsAction.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/TransportGetRoleMappingsAction.java index 0011a4d3622..f87d8147fba 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/TransportGetRoleMappingsAction.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/TransportGetRoleMappingsAction.java @@ -17,7 +17,10 @@ import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.security.authc.support.mapper.ExpressionRoleMapping; +import org.elasticsearch.xpack.core.security.action.rolemapping.GetRoleMappingsAction; +import org.elasticsearch.xpack.core.security.action.rolemapping.GetRoleMappingsRequest; +import org.elasticsearch.xpack.core.security.action.rolemapping.GetRoleMappingsResponse; +import org.elasticsearch.xpack.core.security.authc.support.mapper.ExpressionRoleMapping; import org.elasticsearch.xpack.security.authc.support.mapper.NativeRoleMappingStore; public class TransportGetRoleMappingsAction diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/TransportPutRoleMappingAction.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/TransportPutRoleMappingAction.java index f72c066d613..8c07d86e416 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/TransportPutRoleMappingAction.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/TransportPutRoleMappingAction.java @@ -13,6 +13,9 @@ import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; +import org.elasticsearch.xpack.core.security.action.rolemapping.PutRoleMappingAction; +import org.elasticsearch.xpack.core.security.action.rolemapping.PutRoleMappingRequest; +import org.elasticsearch.xpack.core.security.action.rolemapping.PutRoleMappingResponse; import org.elasticsearch.xpack.security.authc.support.mapper.NativeRoleMappingStore; public class TransportPutRoleMappingAction diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/saml/TransportSamlAuthenticateAction.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/saml/TransportSamlAuthenticateAction.java index 78035fad7ef..48f846579c4 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/saml/TransportSamlAuthenticateAction.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/saml/TransportSamlAuthenticateAction.java @@ -18,7 +18,10 @@ import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.security.authc.Authentication; +import org.elasticsearch.xpack.core.security.action.saml.SamlAuthenticateAction; +import org.elasticsearch.xpack.core.security.action.saml.SamlAuthenticateRequest; +import org.elasticsearch.xpack.core.security.action.saml.SamlAuthenticateResponse; +import org.elasticsearch.xpack.core.security.authc.Authentication; import org.elasticsearch.xpack.security.authc.AuthenticationService; import org.elasticsearch.xpack.security.authc.TokenService; import org.elasticsearch.xpack.security.authc.saml.SamlRealm; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/saml/TransportSamlInvalidateSessionAction.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/saml/TransportSamlInvalidateSessionAction.java index 1323cf5bbd3..517b13933cf 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/saml/TransportSamlInvalidateSessionAction.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/saml/TransportSamlInvalidateSessionAction.java @@ -17,6 +17,9 @@ import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; +import org.elasticsearch.xpack.core.security.action.saml.SamlInvalidateSessionAction; +import org.elasticsearch.xpack.core.security.action.saml.SamlInvalidateSessionRequest; +import org.elasticsearch.xpack.core.security.action.saml.SamlInvalidateSessionResponse; import org.elasticsearch.xpack.security.authc.Realms; import org.elasticsearch.xpack.security.authc.TokenService; import org.elasticsearch.xpack.security.authc.UserToken; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/saml/TransportSamlLogoutAction.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/saml/TransportSamlLogoutAction.java index 8bad7586888..16eb5676046 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/saml/TransportSamlLogoutAction.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/saml/TransportSamlLogoutAction.java @@ -5,9 +5,6 @@ */ package org.elasticsearch.xpack.security.action.saml; -import java.io.IOException; -import java.util.Map; - import org.elasticsearch.ElasticsearchException; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.support.ActionFilters; @@ -18,17 +15,23 @@ import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.security.authc.Authentication; -import org.elasticsearch.xpack.security.authc.Realm; +import org.elasticsearch.xpack.core.security.action.saml.SamlLogoutAction; +import org.elasticsearch.xpack.core.security.action.saml.SamlLogoutRequest; +import org.elasticsearch.xpack.core.security.action.saml.SamlLogoutResponse; +import org.elasticsearch.xpack.core.security.authc.Authentication; +import org.elasticsearch.xpack.core.security.authc.Realm; +import org.elasticsearch.xpack.core.security.user.User; import org.elasticsearch.xpack.security.authc.Realms; import org.elasticsearch.xpack.security.authc.TokenService; import org.elasticsearch.xpack.security.authc.saml.SamlNameId; import org.elasticsearch.xpack.security.authc.saml.SamlRealm; import org.elasticsearch.xpack.security.authc.saml.SamlRedirect; import org.elasticsearch.xpack.security.authc.saml.SamlUtils; -import org.elasticsearch.xpack.security.user.User; import org.opensaml.saml.saml2.core.LogoutRequest; +import java.io.IOException; +import java.util.Map; + /** * Transport action responsible for generating a SAML {@code <LogoutRequest>} as a redirect binding URL. */ diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/saml/TransportSamlPrepareAuthenticationAction.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/saml/TransportSamlPrepareAuthenticationAction.java index 129b391df27..7bba1974b3d 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/saml/TransportSamlPrepareAuthenticationAction.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/saml/TransportSamlPrepareAuthenticationAction.java @@ -16,6 +16,9 @@ import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; +import org.elasticsearch.xpack.core.security.action.saml.SamlPrepareAuthenticationAction; +import org.elasticsearch.xpack.core.security.action.saml.SamlPrepareAuthenticationRequest; +import org.elasticsearch.xpack.core.security.action.saml.SamlPrepareAuthenticationResponse; import org.elasticsearch.xpack.security.authc.Realms; import org.elasticsearch.xpack.security.authc.saml.SamlRealm; import org.elasticsearch.xpack.security.authc.saml.SamlRedirect; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/token/TransportCreateTokenAction.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/token/TransportCreateTokenAction.java index b3020f2cf4d..4a96c3c88d8 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/token/TransportCreateTokenAction.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/token/TransportCreateTokenAction.java @@ -14,11 +14,13 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.security.authc.Authentication; +import org.elasticsearch.xpack.core.security.action.token.CreateTokenAction; +import org.elasticsearch.xpack.core.security.action.token.CreateTokenRequest; +import org.elasticsearch.xpack.core.security.action.token.CreateTokenResponse; +import org.elasticsearch.xpack.core.security.authc.Authentication; import org.elasticsearch.xpack.security.authc.AuthenticationService; import org.elasticsearch.xpack.security.authc.TokenService; -import org.elasticsearch.xpack.security.authc.UserToken; -import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken; +import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; import java.util.Collections; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/token/TransportInvalidateTokenAction.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/token/TransportInvalidateTokenAction.java index 06c2ced6b78..63a130b3004 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/token/TransportInvalidateTokenAction.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/token/TransportInvalidateTokenAction.java @@ -13,6 +13,9 @@ import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; +import org.elasticsearch.xpack.core.security.action.token.InvalidateTokenAction; +import org.elasticsearch.xpack.core.security.action.token.InvalidateTokenRequest; +import org.elasticsearch.xpack.core.security.action.token.InvalidateTokenResponse; import org.elasticsearch.xpack.security.authc.TokenService; /** diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/token/TransportRefreshTokenAction.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/token/TransportRefreshTokenAction.java index f03810bdb06..0462fe6cdde 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/token/TransportRefreshTokenAction.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/token/TransportRefreshTokenAction.java @@ -13,6 +13,9 @@ import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; +import org.elasticsearch.xpack.core.security.action.token.CreateTokenRequest; +import org.elasticsearch.xpack.core.security.action.token.CreateTokenResponse; +import org.elasticsearch.xpack.core.security.action.token.RefreshTokenAction; import org.elasticsearch.xpack.security.authc.TokenService; import static org.elasticsearch.xpack.security.action.token.TransportCreateTokenAction.getResponseScopeValue; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/user/TransportAuthenticateAction.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/user/TransportAuthenticateAction.java index c4bd170e031..6386917a1e9 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/user/TransportAuthenticateAction.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/user/TransportAuthenticateAction.java @@ -12,12 +12,15 @@ import org.elasticsearch.action.support.HandledTransportAction; import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver; import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.xpack.security.SecurityContext; -import org.elasticsearch.xpack.security.user.SystemUser; -import org.elasticsearch.xpack.security.user.User; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.security.user.XPackUser; +import org.elasticsearch.xpack.core.security.SecurityContext; +import org.elasticsearch.xpack.core.security.action.user.AuthenticateAction; +import org.elasticsearch.xpack.core.security.action.user.AuthenticateRequest; +import org.elasticsearch.xpack.core.security.action.user.AuthenticateResponse; +import org.elasticsearch.xpack.core.security.user.SystemUser; +import org.elasticsearch.xpack.core.security.user.User; +import org.elasticsearch.xpack.core.security.user.XPackUser; public class TransportAuthenticateAction extends HandledTransportAction { diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/user/TransportChangePasswordAction.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/user/TransportChangePasswordAction.java index d75e780818e..047b47dfa25 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/user/TransportChangePasswordAction.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/user/TransportChangePasswordAction.java @@ -11,12 +11,15 @@ import org.elasticsearch.action.support.HandledTransportAction; import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver; import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.xpack.security.authc.esnative.NativeUsersStore; -import org.elasticsearch.xpack.security.user.AnonymousUser; -import org.elasticsearch.xpack.security.user.SystemUser; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.security.user.XPackUser; +import org.elasticsearch.xpack.core.security.action.user.ChangePasswordAction; +import org.elasticsearch.xpack.core.security.action.user.ChangePasswordRequest; +import org.elasticsearch.xpack.core.security.action.user.ChangePasswordResponse; +import org.elasticsearch.xpack.core.security.user.AnonymousUser; +import org.elasticsearch.xpack.core.security.user.SystemUser; +import org.elasticsearch.xpack.core.security.user.XPackUser; +import org.elasticsearch.xpack.security.authc.esnative.NativeUsersStore; public class TransportChangePasswordAction extends HandledTransportAction { diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/user/TransportDeleteUserAction.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/user/TransportDeleteUserAction.java index 46eaf7f07ba..4ada1ab0e33 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/user/TransportDeleteUserAction.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/user/TransportDeleteUserAction.java @@ -11,13 +11,16 @@ import org.elasticsearch.action.support.HandledTransportAction; import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver; import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.xpack.security.authc.esnative.ClientReservedRealm; -import org.elasticsearch.xpack.security.authc.esnative.NativeUsersStore; -import org.elasticsearch.xpack.security.user.AnonymousUser; -import org.elasticsearch.xpack.security.user.SystemUser; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.security.user.XPackUser; +import org.elasticsearch.xpack.core.security.action.user.DeleteUserAction; +import org.elasticsearch.xpack.core.security.action.user.DeleteUserRequest; +import org.elasticsearch.xpack.core.security.action.user.DeleteUserResponse; +import org.elasticsearch.xpack.core.security.authc.esnative.ClientReservedRealm; +import org.elasticsearch.xpack.core.security.user.AnonymousUser; +import org.elasticsearch.xpack.core.security.user.SystemUser; +import org.elasticsearch.xpack.core.security.user.XPackUser; +import org.elasticsearch.xpack.security.authc.esnative.NativeUsersStore; public class TransportDeleteUserAction extends HandledTransportAction { diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/user/TransportGetUsersAction.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/user/TransportGetUsersAction.java index aa7a548ddf7..4a57a918c1a 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/user/TransportGetUsersAction.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/user/TransportGetUsersAction.java @@ -14,12 +14,15 @@ import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.security.authc.esnative.ClientReservedRealm; +import org.elasticsearch.xpack.core.security.action.user.GetUsersAction; +import org.elasticsearch.xpack.core.security.action.user.GetUsersRequest; +import org.elasticsearch.xpack.core.security.action.user.GetUsersResponse; +import org.elasticsearch.xpack.core.security.authc.esnative.ClientReservedRealm; +import org.elasticsearch.xpack.core.security.user.SystemUser; +import org.elasticsearch.xpack.core.security.user.User; +import org.elasticsearch.xpack.core.security.user.XPackUser; import org.elasticsearch.xpack.security.authc.esnative.NativeUsersStore; import org.elasticsearch.xpack.security.authc.esnative.ReservedRealm; -import org.elasticsearch.xpack.security.user.SystemUser; -import org.elasticsearch.xpack.security.user.User; -import org.elasticsearch.xpack.security.user.XPackUser; import java.util.ArrayList; import java.util.Collection; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/user/TransportHasPrivilegesAction.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/user/TransportHasPrivilegesAction.java index 51a8ab270be..dbc2d8f82bd 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/user/TransportHasPrivilegesAction.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/user/TransportHasPrivilegesAction.java @@ -5,13 +5,6 @@ */ package org.elasticsearch.xpack.security.action.user; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; - import org.apache.logging.log4j.message.ParameterizedMessage; import org.apache.lucene.util.automaton.Automaton; import org.apache.lucene.util.automaton.Operations; @@ -24,20 +17,30 @@ import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.security.authc.Authentication; +import org.elasticsearch.xpack.core.security.action.user.HasPrivilegesAction; +import org.elasticsearch.xpack.core.security.action.user.HasPrivilegesRequest; +import org.elasticsearch.xpack.core.security.action.user.HasPrivilegesResponse; +import org.elasticsearch.xpack.core.security.authc.Authentication; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor; +import org.elasticsearch.xpack.core.security.authz.permission.IndicesPermission; +import org.elasticsearch.xpack.core.security.authz.permission.Role; +import org.elasticsearch.xpack.core.security.authz.privilege.ClusterPrivilege; +import org.elasticsearch.xpack.core.security.authz.privilege.IndexPrivilege; +import org.elasticsearch.xpack.core.security.authz.privilege.Privilege; +import org.elasticsearch.xpack.core.security.support.Automatons; +import org.elasticsearch.xpack.core.security.user.User; import org.elasticsearch.xpack.security.authz.AuthorizationService; -import org.elasticsearch.xpack.security.authz.RoleDescriptor; -import org.elasticsearch.xpack.security.authz.permission.IndicesPermission; -import org.elasticsearch.xpack.security.authz.permission.Role; -import org.elasticsearch.xpack.security.authz.privilege.ClusterPrivilege; -import org.elasticsearch.xpack.security.authz.privilege.IndexPrivilege; -import org.elasticsearch.xpack.security.authz.privilege.Privilege; -import org.elasticsearch.xpack.security.support.Automatons; -import org.elasticsearch.xpack.security.user.User; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; /** * Transport action that tests whether a user has the specified - * {@link org.elasticsearch.xpack.security.authz.RoleDescriptor.IndicesPrivileges privileges} + * {@link RoleDescriptor.IndicesPrivileges privileges} */ public class TransportHasPrivilegesAction extends HandledTransportAction { diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/user/TransportPutUserAction.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/user/TransportPutUserAction.java index ac8e66dc7dc..1d2f792b298 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/user/TransportPutUserAction.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/user/TransportPutUserAction.java @@ -15,11 +15,14 @@ import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.security.authc.esnative.ClientReservedRealm; +import org.elasticsearch.xpack.core.security.action.user.PutUserAction; +import org.elasticsearch.xpack.core.security.action.user.PutUserRequest; +import org.elasticsearch.xpack.core.security.action.user.PutUserResponse; +import org.elasticsearch.xpack.core.security.authc.esnative.ClientReservedRealm; +import org.elasticsearch.xpack.core.security.user.AnonymousUser; +import org.elasticsearch.xpack.core.security.user.SystemUser; +import org.elasticsearch.xpack.core.security.user.XPackUser; import org.elasticsearch.xpack.security.authc.esnative.NativeUsersStore; -import org.elasticsearch.xpack.security.user.AnonymousUser; -import org.elasticsearch.xpack.security.user.SystemUser; -import org.elasticsearch.xpack.security.user.XPackUser; public class TransportPutUserAction extends HandledTransportAction { diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/user/TransportSetEnabledAction.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/user/TransportSetEnabledAction.java index 3bed8c63cc2..a8c884ccc16 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/user/TransportSetEnabledAction.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/user/TransportSetEnabledAction.java @@ -13,11 +13,14 @@ import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.security.authc.Authentication; +import org.elasticsearch.xpack.core.security.action.user.SetEnabledAction; +import org.elasticsearch.xpack.core.security.action.user.SetEnabledRequest; +import org.elasticsearch.xpack.core.security.action.user.SetEnabledResponse; +import org.elasticsearch.xpack.core.security.authc.Authentication; +import org.elasticsearch.xpack.core.security.user.AnonymousUser; +import org.elasticsearch.xpack.core.security.user.SystemUser; +import org.elasticsearch.xpack.core.security.user.XPackUser; import org.elasticsearch.xpack.security.authc.esnative.NativeUsersStore; -import org.elasticsearch.xpack.security.user.AnonymousUser; -import org.elasticsearch.xpack.security.user.SystemUser; -import org.elasticsearch.xpack.security.user.XPackUser; /** * Transport action that handles setting a native or reserved user to enabled diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/audit/AuditTrail.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/audit/AuditTrail.java index 0bfc1d75542..852728e750d 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/audit/AuditTrail.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/audit/AuditTrail.java @@ -6,10 +6,10 @@ package org.elasticsearch.xpack.security.audit; import org.elasticsearch.rest.RestRequest; -import org.elasticsearch.xpack.security.user.User; -import org.elasticsearch.xpack.security.authc.AuthenticationToken; -import org.elasticsearch.xpack.security.transport.filter.SecurityIpFilterRule; import org.elasticsearch.transport.TransportMessage; +import org.elasticsearch.xpack.core.security.authc.AuthenticationToken; +import org.elasticsearch.xpack.core.security.user.User; +import org.elasticsearch.xpack.security.transport.filter.SecurityIpFilterRule; import java.net.InetAddress; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/audit/AuditTrailService.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/audit/AuditTrailService.java index 8b7868caad6..730990d9e71 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/audit/AuditTrailService.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/audit/AuditTrailService.java @@ -5,18 +5,18 @@ */ package org.elasticsearch.xpack.security.audit; -import java.net.InetAddress; -import java.util.Collections; -import java.util.List; - import org.elasticsearch.common.component.AbstractComponent; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.license.XPackLicenseState; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.transport.TransportMessage; -import org.elasticsearch.xpack.security.authc.AuthenticationToken; +import org.elasticsearch.xpack.core.security.authc.AuthenticationToken; +import org.elasticsearch.xpack.core.security.user.User; import org.elasticsearch.xpack.security.transport.filter.SecurityIpFilterRule; -import org.elasticsearch.xpack.security.user.User; + +import java.net.InetAddress; +import java.util.Collections; +import java.util.List; public class AuditTrailService extends AbstractComponent implements AuditTrail { diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/audit/index/IndexAuditTrail.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/audit/index/IndexAuditTrail.java index 68bbbef6e24..409e53abeb1 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/audit/index/IndexAuditTrail.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/audit/index/IndexAuditTrail.java @@ -44,18 +44,19 @@ import org.elasticsearch.plugins.Plugin; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportMessage; -import org.elasticsearch.xpack.XPackPlugin; +import org.elasticsearch.xpack.core.XPackPlugin; +import org.elasticsearch.xpack.core.security.authc.AuthenticationToken; +import org.elasticsearch.xpack.core.security.index.IndexAuditTrailField; +import org.elasticsearch.xpack.core.security.user.SystemUser; +import org.elasticsearch.xpack.core.security.user.User; +import org.elasticsearch.xpack.core.security.user.XPackUser; import org.elasticsearch.xpack.security.Security; import org.elasticsearch.xpack.security.audit.AuditLevel; import org.elasticsearch.xpack.security.audit.AuditTrail; -import org.elasticsearch.xpack.security.authc.AuthenticationToken; import org.elasticsearch.xpack.security.rest.RemoteHostHeader; import org.elasticsearch.xpack.security.support.IndexLifecycleManager; import org.elasticsearch.xpack.security.transport.filter.SecurityIpFilterRule; -import org.elasticsearch.xpack.security.user.SystemUser; -import org.elasticsearch.xpack.security.user.User; -import org.elasticsearch.xpack.security.user.XPackUser; -import org.elasticsearch.xpack.template.TemplateUtils; +import org.elasticsearch.xpack.core.template.TemplateUtils; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; @@ -80,9 +81,9 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicReference; import java.util.function.Function; -import static org.elasticsearch.xpack.ClientHelper.SECURITY_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.clientWithOrigin; -import static org.elasticsearch.xpack.security.SecurityField.setting; +import static org.elasticsearch.xpack.core.ClientHelper.SECURITY_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.clientWithOrigin; +import static org.elasticsearch.xpack.core.security.SecurityField.setting; import static org.elasticsearch.xpack.security.audit.AuditLevel.ACCESS_DENIED; import static org.elasticsearch.xpack.security.audit.AuditLevel.ACCESS_GRANTED; import static org.elasticsearch.xpack.security.audit.AuditLevel.ANONYMOUS_ACCESS_DENIED; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/audit/logfile/LoggingAuditTrail.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/audit/logfile/LoggingAuditTrail.java index 27a23b05a39..e34bb89b2b6 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/audit/logfile/LoggingAuditTrail.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/audit/logfile/LoggingAuditTrail.java @@ -23,15 +23,15 @@ import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportMessage; +import org.elasticsearch.xpack.core.security.authc.AuthenticationToken; +import org.elasticsearch.xpack.core.security.support.Automatons; +import org.elasticsearch.xpack.core.security.user.SystemUser; +import org.elasticsearch.xpack.core.security.user.User; +import org.elasticsearch.xpack.core.security.user.XPackUser; import org.elasticsearch.xpack.security.audit.AuditLevel; import org.elasticsearch.xpack.security.audit.AuditTrail; -import org.elasticsearch.xpack.security.authc.AuthenticationToken; import org.elasticsearch.xpack.security.rest.RemoteHostHeader; -import org.elasticsearch.xpack.security.support.Automatons; import org.elasticsearch.xpack.security.transport.filter.SecurityIpFilterRule; -import org.elasticsearch.xpack.security.user.SystemUser; -import org.elasticsearch.xpack.security.user.User; -import org.elasticsearch.xpack.security.user.XPackUser; import java.net.InetAddress; import java.net.InetSocketAddress; @@ -50,19 +50,19 @@ import java.util.stream.Collectors; import java.util.stream.Stream; import static org.elasticsearch.common.Strings.arrayToCommaDelimitedString; -import static org.elasticsearch.xpack.security.SecurityField.setting; +import static org.elasticsearch.xpack.core.security.SecurityField.setting; import static org.elasticsearch.xpack.security.audit.AuditLevel.ACCESS_DENIED; import static org.elasticsearch.xpack.security.audit.AuditLevel.ACCESS_GRANTED; import static org.elasticsearch.xpack.security.audit.AuditLevel.ANONYMOUS_ACCESS_DENIED; import static org.elasticsearch.xpack.security.audit.AuditLevel.AUTHENTICATION_FAILED; -import static org.elasticsearch.xpack.security.audit.AuditLevel.REALM_AUTHENTICATION_FAILED; +import static org.elasticsearch.xpack.security.audit.AuditLevel.AUTHENTICATION_SUCCESS; import static org.elasticsearch.xpack.security.audit.AuditLevel.CONNECTION_DENIED; import static org.elasticsearch.xpack.security.audit.AuditLevel.CONNECTION_GRANTED; +import static org.elasticsearch.xpack.security.audit.AuditLevel.REALM_AUTHENTICATION_FAILED; import static org.elasticsearch.xpack.security.audit.AuditLevel.RUN_AS_DENIED; import static org.elasticsearch.xpack.security.audit.AuditLevel.RUN_AS_GRANTED; import static org.elasticsearch.xpack.security.audit.AuditLevel.SYSTEM_ACCESS_GRANTED; import static org.elasticsearch.xpack.security.audit.AuditLevel.TAMPERED_REQUEST; -import static org.elasticsearch.xpack.security.audit.AuditLevel.AUTHENTICATION_SUCCESS; import static org.elasticsearch.xpack.security.audit.AuditLevel.parse; import static org.elasticsearch.xpack.security.audit.AuditUtil.restRequestContent; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/AuthenticationService.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/AuthenticationService.java index df90ad75adc..3e619e96857 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/AuthenticationService.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/AuthenticationService.java @@ -5,12 +5,6 @@ */ package org.elasticsearch.xpack.security.authc; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import java.util.function.BiConsumer; -import java.util.function.Consumer; - import org.apache.logging.log4j.message.ParameterizedMessage; import org.apache.logging.log4j.util.Supplier; import org.elasticsearch.ElasticsearchSecurityException; @@ -25,15 +19,27 @@ import org.elasticsearch.node.Node; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportMessage; -import org.elasticsearch.xpack.common.IteratingActionListener; +import org.elasticsearch.xpack.core.common.IteratingActionListener; +import org.elasticsearch.xpack.core.security.authc.Authentication; +import org.elasticsearch.xpack.core.security.authc.Authentication.RealmRef; +import org.elasticsearch.xpack.core.security.authc.AuthenticationFailureHandler; +import org.elasticsearch.xpack.core.security.authc.AuthenticationResult; +import org.elasticsearch.xpack.core.security.authc.AuthenticationServiceField; +import org.elasticsearch.xpack.core.security.authc.AuthenticationToken; +import org.elasticsearch.xpack.core.security.authc.Realm; +import org.elasticsearch.xpack.core.security.authz.permission.Role; +import org.elasticsearch.xpack.core.security.support.Exceptions; +import org.elasticsearch.xpack.core.security.user.AnonymousUser; +import org.elasticsearch.xpack.core.security.user.SystemUser; +import org.elasticsearch.xpack.core.security.user.User; import org.elasticsearch.xpack.security.audit.AuditTrail; import org.elasticsearch.xpack.security.audit.AuditTrailService; -import org.elasticsearch.xpack.security.authc.Authentication.RealmRef; -import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken; -import org.elasticsearch.xpack.security.authz.permission.Role; -import org.elasticsearch.xpack.security.support.Exceptions; -import org.elasticsearch.xpack.security.user.AnonymousUser; -import org.elasticsearch.xpack.security.user.User; + +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.function.BiConsumer; +import java.util.function.Consumer; /** * An authentication service that delegates the authentication process to its configured {@link Realm realms}. @@ -303,7 +309,7 @@ public class AuthenticationService extends AbstractComponent { *

  • this is an initial request from a client without preemptive authentication, so we must return an authentication * challenge
  • *
  • this is a request made internally within a node and there is a fallback user, which is typically the - * {@link org.elasticsearch.xpack.security.user.SystemUser}
  • + * {@link SystemUser} *
  • anonymous access is enabled and this will be considered an anonymous request
  • * * diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ExpiredTokenRemover.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ExpiredTokenRemover.java index 7cce0e14742..25b309a1cdf 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ExpiredTokenRemover.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ExpiredTokenRemover.java @@ -29,8 +29,8 @@ import java.time.temporal.ChronoUnit; import java.util.concurrent.atomic.AtomicBoolean; import static org.elasticsearch.action.support.TransportActions.isShardNotAvailableException; -import static org.elasticsearch.xpack.ClientHelper.SECURITY_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.executeAsyncWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.SECURITY_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin; /** * Responsible for cleaning the invalidated tokens from the invalidated tokens index. diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/InternalRealms.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/InternalRealms.java index ba040edc08c..017f4a6e049 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/InternalRealms.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/InternalRealms.java @@ -5,6 +5,32 @@ */ package org.elasticsearch.xpack.security.authc; +import org.elasticsearch.bootstrap.BootstrapCheck; +import org.elasticsearch.common.settings.Settings; +import org.elasticsearch.common.util.set.Sets; +import org.elasticsearch.env.Environment; +import org.elasticsearch.threadpool.ThreadPool; +import org.elasticsearch.watcher.ResourceWatcherService; +import org.elasticsearch.xpack.core.security.authc.Realm; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.RealmSettings; +import org.elasticsearch.xpack.core.security.authc.esnative.NativeRealmSettings; +import org.elasticsearch.xpack.core.security.authc.file.FileRealmSettings; +import org.elasticsearch.xpack.core.security.authc.ldap.LdapRealmSettings; +import org.elasticsearch.xpack.core.security.authc.pki.PkiRealmSettings; +import org.elasticsearch.xpack.core.security.authc.saml.SamlRealmSettings; +import org.elasticsearch.xpack.core.ssl.SSLService; +import org.elasticsearch.xpack.security.SecurityLifecycleService; +import org.elasticsearch.xpack.security.authc.esnative.NativeRealm; +import org.elasticsearch.xpack.security.authc.esnative.NativeUsersStore; +import org.elasticsearch.xpack.security.authc.esnative.ReservedRealm; +import org.elasticsearch.xpack.security.authc.file.FileRealm; +import org.elasticsearch.xpack.security.authc.ldap.LdapRealm; +import org.elasticsearch.xpack.security.authc.pki.PkiRealm; +import org.elasticsearch.xpack.security.authc.saml.SamlRealm; +import org.elasticsearch.xpack.security.authc.support.RoleMappingFileBootstrapCheck; +import org.elasticsearch.xpack.security.authc.support.mapper.NativeRoleMappingStore; + import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; @@ -14,30 +40,6 @@ import java.util.List; import java.util.Map; import java.util.Set; -import org.elasticsearch.bootstrap.BootstrapCheck; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.util.set.Sets; -import org.elasticsearch.env.Environment; -import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.watcher.ResourceWatcherService; -import org.elasticsearch.xpack.security.SecurityLifecycleService; -import org.elasticsearch.xpack.security.authc.esnative.NativeRealm; -import org.elasticsearch.xpack.security.authc.esnative.NativeRealmSettings; -import org.elasticsearch.xpack.security.authc.esnative.NativeUsersStore; -import org.elasticsearch.xpack.security.authc.esnative.ReservedRealm; -import org.elasticsearch.xpack.security.authc.file.FileRealm; -import org.elasticsearch.xpack.security.authc.file.FileRealmSettings; -import org.elasticsearch.xpack.security.authc.ldap.LdapRealm; -import org.elasticsearch.xpack.security.authc.ldap.LdapRealmSettings; -import org.elasticsearch.xpack.security.authc.pki.PkiRealm; -import org.elasticsearch.xpack.security.authc.pki.PkiRealmSettings; -import org.elasticsearch.xpack.security.authc.saml.SamlRealm; -import org.elasticsearch.xpack.security.authc.saml.SamlRealmSettings; -import org.elasticsearch.xpack.ssl.SSLService; - -import org.elasticsearch.xpack.security.authc.support.RoleMappingFileBootstrapCheck; -import org.elasticsearch.xpack.security.authc.support.mapper.NativeRoleMappingStore; - /** * Provides a single entry point into dealing with all standard XPack security {@link Realm realms}. * This class does not handle extensions. diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/Realms.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/Realms.java index 7b453bd704c..83bbeebe839 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/Realms.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/Realms.java @@ -25,9 +25,12 @@ import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.env.Environment; import org.elasticsearch.license.XPackLicenseState; import org.elasticsearch.license.XPackLicenseState.AllowedRealmType; -import org.elasticsearch.xpack.security.authc.esnative.NativeRealmSettings; +import org.elasticsearch.xpack.core.security.authc.Realm; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.RealmSettings; +import org.elasticsearch.xpack.core.security.authc.esnative.NativeRealmSettings; import org.elasticsearch.xpack.security.authc.esnative.ReservedRealm; -import org.elasticsearch.xpack.security.authc.file.FileRealmSettings; +import org.elasticsearch.xpack.core.security.authc.file.FileRealmSettings; /** diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/TokenService.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/TokenService.java index ffac7508d0a..5ebd7933926 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/TokenService.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/TokenService.java @@ -62,8 +62,11 @@ import org.elasticsearch.index.engine.VersionConflictEngineException; import org.elasticsearch.index.query.BoolQueryBuilder; import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.rest.RestStatus; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.XPackField; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.XPackField; +import org.elasticsearch.xpack.core.security.authc.Authentication; +import org.elasticsearch.xpack.core.security.authc.KeyAndTimestamp; +import org.elasticsearch.xpack.core.security.authc.TokenMetaData; import org.elasticsearch.xpack.security.SecurityLifecycleService; import javax.crypto.Cipher; @@ -108,8 +111,8 @@ import java.util.stream.StreamSupport; import static org.elasticsearch.action.support.TransportActions.isShardNotAvailableException; import static org.elasticsearch.gateway.GatewayService.STATE_NOT_RECOVERED_BLOCK; -import static org.elasticsearch.xpack.ClientHelper.SECURITY_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.executeAsyncWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.SECURITY_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin; /** * Service responsible for the creation, validation, and other management of {@link UserToken} diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/UserToken.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/UserToken.java index 978f6b34ef5..0d7d33ed55c 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/UserToken.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/UserToken.java @@ -13,6 +13,7 @@ import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.io.stream.Writeable; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; +import org.elasticsearch.xpack.core.security.authc.Authentication; import java.io.IOException; import java.time.Instant; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/esnative/ESNativeRealmMigrateTool.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/esnative/ESNativeRealmMigrateTool.java index de9962054c2..6cd8041ef06 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/esnative/ESNativeRealmMigrateTool.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/esnative/ESNativeRealmMigrateTool.java @@ -19,8 +19,8 @@ import org.apache.logging.log4j.core.config.Configuration; import org.apache.logging.log4j.core.config.LoggerConfig; import org.apache.logging.log4j.core.layout.PatternLayout; import org.elasticsearch.ElasticsearchException; -import org.elasticsearch.cli.LoggingAwareMultiCommand; import org.elasticsearch.cli.EnvironmentAwareCommand; +import org.elasticsearch.cli.LoggingAwareMultiCommand; import org.elasticsearch.cli.Terminal; import org.elasticsearch.cli.Terminal.Verbosity; import org.elasticsearch.common.Nullable; @@ -37,13 +37,15 @@ import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.common.xcontent.json.JsonXContent; import org.elasticsearch.env.Environment; -import org.elasticsearch.xpack.common.socket.SocketAccess; +import org.elasticsearch.xpack.core.common.socket.SocketAccess; +import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor; +import org.elasticsearch.xpack.security.authz.store.FileRolesStore; +import org.elasticsearch.xpack.core.ssl.SSLService; import org.elasticsearch.xpack.security.authc.file.FileUserPasswdStore; import org.elasticsearch.xpack.security.authc.file.FileUserRolesStore; -import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken; -import org.elasticsearch.xpack.security.authz.RoleDescriptor; -import org.elasticsearch.xpack.security.authz.store.FileRolesStore; -import org.elasticsearch.xpack.ssl.SSLService; + +import javax.net.ssl.HttpsURLConnection; import java.io.BufferedReader; import java.io.FileNotFoundException; @@ -63,10 +65,8 @@ import java.util.HashSet; import java.util.Map; import java.util.Set; -import javax.net.ssl.HttpsURLConnection; - import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.xpack.security.SecurityField.setting; +import static org.elasticsearch.xpack.core.security.SecurityField.setting; /** * This is the command-line tool used for migrating users and roles from the file-based realm into the new native realm using the API for diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/esnative/NativeRealm.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/esnative/NativeRealm.java index a733d52c308..6b8f9eb703d 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/esnative/NativeRealm.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/esnative/NativeRealm.java @@ -8,11 +8,12 @@ package org.elasticsearch.xpack.security.authc.esnative; import org.elasticsearch.action.ActionListener; import org.elasticsearch.cluster.health.ClusterHealthStatus; import org.elasticsearch.cluster.health.ClusterIndexHealth; -import org.elasticsearch.xpack.security.authc.AuthenticationResult; -import org.elasticsearch.xpack.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.AuthenticationResult; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.esnative.NativeRealmSettings; +import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; +import org.elasticsearch.xpack.core.security.user.User; import org.elasticsearch.xpack.security.authc.support.CachingUsernamePasswordRealm; -import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken; -import org.elasticsearch.xpack.security.user.User; /** * User/password realm that is backed by an Elasticsearch index diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/esnative/NativeUsersStore.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/esnative/NativeUsersStore.java index dd1700baadb..2d5af8b3271 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/esnative/NativeUsersStore.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/esnative/NativeUsersStore.java @@ -36,21 +36,22 @@ import org.elasticsearch.index.engine.DocumentMissingException; import org.elasticsearch.index.query.QueryBuilder; import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.search.SearchHit; -import org.elasticsearch.xpack.XPackClientActionPlugin; -import org.elasticsearch.xpack.security.ScrollHelper; +import org.elasticsearch.xpack.core.XPackClientActionPlugin; +import org.elasticsearch.xpack.core.security.ScrollHelper; +import org.elasticsearch.xpack.core.security.action.realm.ClearRealmCacheRequest; +import org.elasticsearch.xpack.core.security.action.realm.ClearRealmCacheResponse; +import org.elasticsearch.xpack.core.security.action.user.ChangePasswordRequest; +import org.elasticsearch.xpack.core.security.action.user.DeleteUserRequest; +import org.elasticsearch.xpack.core.security.action.user.PutUserRequest; +import org.elasticsearch.xpack.core.security.authc.AuthenticationResult; +import org.elasticsearch.xpack.core.security.authc.esnative.ClientReservedRealm; +import org.elasticsearch.xpack.core.security.authc.support.Hasher; +import org.elasticsearch.xpack.core.security.client.SecurityClient; +import org.elasticsearch.xpack.core.security.user.SystemUser; +import org.elasticsearch.xpack.core.security.user.User; +import org.elasticsearch.xpack.core.security.user.User.Fields; +import org.elasticsearch.xpack.core.security.user.XPackUser; import org.elasticsearch.xpack.security.SecurityLifecycleService; -import org.elasticsearch.xpack.security.action.realm.ClearRealmCacheRequest; -import org.elasticsearch.xpack.security.action.realm.ClearRealmCacheResponse; -import org.elasticsearch.xpack.security.action.user.ChangePasswordRequest; -import org.elasticsearch.xpack.security.action.user.DeleteUserRequest; -import org.elasticsearch.xpack.security.action.user.PutUserRequest; -import org.elasticsearch.xpack.security.authc.AuthenticationResult; -import org.elasticsearch.xpack.security.authc.support.Hasher; -import org.elasticsearch.xpack.security.client.SecurityClient; -import org.elasticsearch.xpack.security.user.SystemUser; -import org.elasticsearch.xpack.security.user.User; -import org.elasticsearch.xpack.security.user.User.Fields; -import org.elasticsearch.xpack.security.user.XPackUser; import java.util.Arrays; import java.util.Collection; @@ -61,9 +62,9 @@ import java.util.Map; import java.util.function.Consumer; import java.util.function.Supplier; -import static org.elasticsearch.xpack.ClientHelper.SECURITY_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.executeAsyncWithOrigin; -import static org.elasticsearch.xpack.ClientHelper.stashWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.SECURITY_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.stashWithOrigin; import static org.elasticsearch.xpack.security.SecurityLifecycleService.SECURITY_INDEX_NAME; /** diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/esnative/ReservedRealm.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/esnative/ReservedRealm.java index 43dfa5d3837..ee299ad5f36 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/esnative/ReservedRealm.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/esnative/ReservedRealm.java @@ -5,12 +5,6 @@ */ package org.elasticsearch.xpack.security.authc.esnative; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; -import java.util.List; - import org.apache.logging.log4j.message.ParameterizedMessage; import org.apache.logging.log4j.util.Supplier; import org.elasticsearch.Version; @@ -22,21 +16,28 @@ import org.elasticsearch.common.settings.Setting; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.env.Environment; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.security.SecurityField; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.security.SecurityField; +import org.elasticsearch.xpack.core.security.authc.AuthenticationResult; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.esnative.ClientReservedRealm; +import org.elasticsearch.xpack.core.security.authc.support.Hasher; +import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; +import org.elasticsearch.xpack.core.security.support.Exceptions; +import org.elasticsearch.xpack.core.security.user.AnonymousUser; +import org.elasticsearch.xpack.core.security.user.ElasticUser; +import org.elasticsearch.xpack.core.security.user.KibanaUser; +import org.elasticsearch.xpack.core.security.user.LogstashSystemUser; +import org.elasticsearch.xpack.core.security.user.User; import org.elasticsearch.xpack.security.SecurityLifecycleService; -import org.elasticsearch.xpack.security.authc.AuthenticationResult; -import org.elasticsearch.xpack.security.authc.RealmConfig; import org.elasticsearch.xpack.security.authc.esnative.NativeUsersStore.ReservedUserInfo; import org.elasticsearch.xpack.security.authc.support.CachingUsernamePasswordRealm; -import org.elasticsearch.xpack.security.authc.support.Hasher; -import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken; -import org.elasticsearch.xpack.security.support.Exceptions; -import org.elasticsearch.xpack.security.user.AnonymousUser; -import org.elasticsearch.xpack.security.user.ElasticUser; -import org.elasticsearch.xpack.security.user.KibanaUser; -import org.elasticsearch.xpack.security.user.LogstashSystemUser; -import org.elasticsearch.xpack.security.user.User; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.List; /** * A realm for predefined users. These users can only be modified in terms of changing their passwords; no other modifications are allowed. diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/esnative/UserAndPassword.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/esnative/UserAndPassword.java index ac548dcd38d..58351ac2879 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/esnative/UserAndPassword.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/esnative/UserAndPassword.java @@ -5,7 +5,7 @@ */ package org.elasticsearch.xpack.security.authc.esnative; -import org.elasticsearch.xpack.security.user.User; +import org.elasticsearch.xpack.core.security.user.User; /** * Like User, but includes the hashed password diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/esnative/tool/CommandLineHttpClient.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/esnative/tool/CommandLineHttpClient.java index 5cfb909aa66..ac3d20cacad 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/esnative/tool/CommandLineHttpClient.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/esnative/tool/CommandLineHttpClient.java @@ -16,12 +16,13 @@ import org.elasticsearch.common.settings.SecureString; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.env.Environment; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.common.socket.SocketAccess; -import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken; -import org.elasticsearch.xpack.ssl.SSLService; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.common.socket.SocketAccess; +import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; +import org.elasticsearch.xpack.core.ssl.SSLService; import javax.net.ssl.HttpsURLConnection; + import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; @@ -38,7 +39,7 @@ import java.util.List; import static org.elasticsearch.http.HttpTransportSettings.SETTING_HTTP_PORT; import static org.elasticsearch.http.HttpTransportSettings.SETTING_HTTP_PUBLISH_HOST; import static org.elasticsearch.http.HttpTransportSettings.SETTING_HTTP_PUBLISH_PORT; -import static org.elasticsearch.xpack.security.SecurityField.setting; +import static org.elasticsearch.xpack.core.security.SecurityField.setting; /** * A simple http client for usage in command line tools. This client only uses internal jdk classes and does diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/esnative/tool/SetupPasswordTool.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/esnative/tool/SetupPasswordTool.java index 8cfcf07b225..371f3a2db7e 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/esnative/tool/SetupPasswordTool.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/esnative/tool/SetupPasswordTool.java @@ -5,18 +5,6 @@ */ package org.elasticsearch.xpack.security.authc.esnative.tool; -import javax.net.ssl.SSLException; -import java.io.IOException; -import java.io.InputStream; -import java.net.HttpURLConnection; -import java.net.URL; -import java.nio.charset.StandardCharsets; -import java.security.SecureRandom; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - import joptsimple.OptionParser; import joptsimple.OptionSet; import joptsimple.OptionSpec; @@ -25,7 +13,6 @@ import org.elasticsearch.ExceptionsHelper; import org.elasticsearch.cli.EnvironmentAwareCommand; import org.elasticsearch.cli.ExitCodes; import org.elasticsearch.cli.LoggingAwareMultiCommand; -import org.elasticsearch.cli.MultiCommand; import org.elasticsearch.cli.Terminal; import org.elasticsearch.cli.Terminal.Verbosity; import org.elasticsearch.cli.UserException; @@ -38,11 +25,24 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.json.JsonXContent; import org.elasticsearch.env.Environment; +import org.elasticsearch.xpack.core.security.support.Validation; +import org.elasticsearch.xpack.core.security.user.ElasticUser; +import org.elasticsearch.xpack.core.security.user.KibanaUser; +import org.elasticsearch.xpack.core.security.user.LogstashSystemUser; import org.elasticsearch.xpack.security.authc.esnative.ReservedRealm; -import org.elasticsearch.xpack.security.support.Validation; -import org.elasticsearch.xpack.security.user.ElasticUser; -import org.elasticsearch.xpack.security.user.KibanaUser; -import org.elasticsearch.xpack.security.user.LogstashSystemUser; + +import javax.net.ssl.SSLException; + +import java.io.IOException; +import java.io.InputStream; +import java.net.HttpURLConnection; +import java.net.URL; +import java.nio.charset.StandardCharsets; +import java.security.SecureRandom; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** * A tool to set passwords of reserved users (elastic, kibana and diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/file/FileRealm.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/file/FileRealm.java index ad924fcc8fc..9e85b450521 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/file/FileRealm.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/file/FileRealm.java @@ -7,11 +7,12 @@ package org.elasticsearch.xpack.security.authc.file; import org.elasticsearch.action.ActionListener; import org.elasticsearch.watcher.ResourceWatcherService; -import org.elasticsearch.xpack.security.authc.AuthenticationResult; -import org.elasticsearch.xpack.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.AuthenticationResult; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.file.FileRealmSettings; +import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; +import org.elasticsearch.xpack.core.security.user.User; import org.elasticsearch.xpack.security.authc.support.CachingUsernamePasswordRealm; -import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken; -import org.elasticsearch.xpack.security.user.User; import java.util.Map; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/file/FileUserPasswdStore.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/file/FileUserPasswdStore.java index 5c946aa3b0e..2652e72dada 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/file/FileUserPasswdStore.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/file/FileUserPasswdStore.java @@ -16,16 +16,16 @@ import org.elasticsearch.env.Environment; import org.elasticsearch.watcher.FileChangesListener; import org.elasticsearch.watcher.FileWatcher; import org.elasticsearch.watcher.ResourceWatcherService; -import org.elasticsearch.xpack.XPackPlugin; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.security.authc.AuthenticationResult; -import org.elasticsearch.xpack.security.authc.RealmConfig; -import org.elasticsearch.xpack.security.authc.support.Hasher; -import org.elasticsearch.xpack.security.support.NoOpLogger; +import org.elasticsearch.xpack.core.XPackPlugin; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.security.authc.AuthenticationResult; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.support.Hasher; +import org.elasticsearch.xpack.core.security.support.NoOpLogger; +import org.elasticsearch.xpack.core.security.support.Validation; +import org.elasticsearch.xpack.core.security.support.Validation.Users; +import org.elasticsearch.xpack.core.security.user.User; import org.elasticsearch.xpack.security.support.SecurityFiles; -import org.elasticsearch.xpack.security.support.Validation; -import org.elasticsearch.xpack.security.support.Validation.Users; -import org.elasticsearch.xpack.security.user.User; import java.io.IOException; import java.nio.charset.StandardCharsets; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/file/FileUserRolesStore.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/file/FileUserRolesStore.java index 7c6f5ada1ca..e96a8b6b36c 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/file/FileUserRolesStore.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/file/FileUserRolesStore.java @@ -15,11 +15,11 @@ import org.elasticsearch.env.Environment; import org.elasticsearch.watcher.FileChangesListener; import org.elasticsearch.watcher.FileWatcher; import org.elasticsearch.watcher.ResourceWatcherService; -import org.elasticsearch.xpack.XPackPlugin; -import org.elasticsearch.xpack.security.authc.RealmConfig; -import org.elasticsearch.xpack.security.support.NoOpLogger; +import org.elasticsearch.xpack.core.XPackPlugin; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.support.NoOpLogger; +import org.elasticsearch.xpack.core.security.support.Validation; import org.elasticsearch.xpack.security.support.SecurityFiles; -import org.elasticsearch.xpack.security.support.Validation; import java.io.IOException; import java.nio.charset.StandardCharsets; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/file/tool/UsersTool.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/file/tool/UsersTool.java index 31d5dc62c53..84af68435da 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/file/tool/UsersTool.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/file/tool/UsersTool.java @@ -8,25 +8,25 @@ package org.elasticsearch.xpack.security.authc.file.tool; import joptsimple.OptionSet; import joptsimple.OptionSpec; import org.elasticsearch.cli.EnvironmentAwareCommand; +import org.elasticsearch.cli.ExitCodes; import org.elasticsearch.cli.LoggingAwareMultiCommand; import org.elasticsearch.cli.Terminal; import org.elasticsearch.cli.UserException; -import org.elasticsearch.cli.ExitCodes; import org.elasticsearch.common.Strings; import org.elasticsearch.common.settings.SecureString; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.set.Sets; import org.elasticsearch.env.Environment; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.XPackField; +import org.elasticsearch.xpack.core.XPackField; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.security.authc.support.Hasher; +import org.elasticsearch.xpack.security.authz.store.FileRolesStore; +import org.elasticsearch.xpack.core.security.authz.store.ReservedRolesStore; +import org.elasticsearch.xpack.core.security.support.Validation; +import org.elasticsearch.xpack.core.security.support.Validation.Users; import org.elasticsearch.xpack.security.authc.file.FileUserPasswdStore; import org.elasticsearch.xpack.security.authc.file.FileUserRolesStore; -import org.elasticsearch.xpack.security.authc.support.Hasher; -import org.elasticsearch.xpack.security.authz.store.FileRolesStore; -import org.elasticsearch.xpack.security.authz.store.ReservedRolesStore; import org.elasticsearch.xpack.security.support.FileAttributesChecker; -import org.elasticsearch.xpack.security.support.Validation; -import org.elasticsearch.xpack.security.support.Validation.Users; import java.nio.file.Files; import java.nio.file.Path; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectoryGroupsResolver.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectoryGroupsResolver.java index 75ee4f43e3c..f43e1768267 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectoryGroupsResolver.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectoryGroupsResolver.java @@ -15,7 +15,7 @@ import org.apache.logging.log4j.Logger; import org.elasticsearch.action.ActionListener; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.xpack.security.authc.ldap.support.LdapSearchScope; +import org.elasticsearch.xpack.core.security.authc.ldap.support.LdapSearchScope; import org.elasticsearch.xpack.security.authc.ldap.support.LdapSession.GroupsResolver; import java.util.Arrays; @@ -24,12 +24,12 @@ import java.util.Collections; import java.util.List; import java.util.stream.Collectors; -import static org.elasticsearch.xpack.security.authc.ldap.ActiveDirectorySessionFactorySettings.AD_DOMAIN_NAME_SETTING; +import static org.elasticsearch.xpack.core.security.authc.ldap.ActiveDirectorySessionFactorySettings.AD_DOMAIN_NAME_SETTING; import static org.elasticsearch.xpack.security.authc.ldap.ActiveDirectorySessionFactory.buildDnFromDomain; import static org.elasticsearch.xpack.security.authc.ldap.support.LdapUtils.OBJECT_CLASS_PRESENCE_FILTER; import static org.elasticsearch.xpack.security.authc.ldap.support.LdapUtils.search; import static org.elasticsearch.xpack.security.authc.ldap.support.LdapUtils.searchForEntry; -import static org.elasticsearch.xpack.security.authc.ldap.support.SessionFactorySettings.IGNORE_REFERRAL_ERRORS_SETTING; +import static org.elasticsearch.xpack.core.security.authc.ldap.support.SessionFactorySettings.IGNORE_REFERRAL_ERRORS_SETTING; class ActiveDirectoryGroupsResolver implements GroupsResolver { diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectorySessionFactory.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectorySessionFactory.java index 37cf04663b1..8f5dbe2cb29 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectorySessionFactory.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectorySessionFactory.java @@ -26,15 +26,17 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.util.concurrent.AbstractRunnable; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.xpack.security.authc.RealmConfig; -import org.elasticsearch.xpack.security.authc.RealmSettings; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.RealmSettings; +import org.elasticsearch.xpack.core.security.authc.ldap.ActiveDirectorySessionFactorySettings; +import org.elasticsearch.xpack.core.security.authc.ldap.PoolingSessionFactorySettings; +import org.elasticsearch.xpack.core.security.authc.ldap.support.LdapSearchScope; +import org.elasticsearch.xpack.core.security.authc.support.CharArrays; +import org.elasticsearch.xpack.core.ssl.SSLService; import org.elasticsearch.xpack.security.authc.ldap.support.LdapMetaDataResolver; -import org.elasticsearch.xpack.security.authc.ldap.support.LdapSearchScope; import org.elasticsearch.xpack.security.authc.ldap.support.LdapSession; import org.elasticsearch.xpack.security.authc.ldap.support.LdapSession.GroupsResolver; import org.elasticsearch.xpack.security.authc.ldap.support.LdapUtils; -import org.elasticsearch.xpack.security.authc.support.CharArrays; -import org.elasticsearch.xpack.ssl.SSLService; import java.util.Collections; import java.util.List; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapRealm.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapRealm.java index bc0a5608b6e..a2546e2d633 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapRealm.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapRealm.java @@ -5,13 +5,6 @@ */ package org.elasticsearch.xpack.security.authc.ldap; -import java.util.Map; -import java.util.Objects; -import java.util.concurrent.atomic.AtomicReference; -import java.util.function.Consumer; -import java.util.function.Function; -import java.util.function.Supplier; - import com.unboundid.ldap.sdk.LDAPException; import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.message.ParameterizedMessage; @@ -26,20 +19,29 @@ import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.threadpool.ThreadPool.Names; import org.elasticsearch.watcher.ResourceWatcherService; -import org.elasticsearch.xpack.security.authc.AuthenticationResult; -import org.elasticsearch.xpack.security.authc.RealmConfig; -import org.elasticsearch.xpack.security.authc.RealmSettings; +import org.elasticsearch.xpack.core.security.authc.AuthenticationResult; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.RealmSettings; +import org.elasticsearch.xpack.core.security.authc.ldap.LdapRealmSettings; +import org.elasticsearch.xpack.core.security.authc.ldap.LdapSessionFactorySettings; +import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; +import org.elasticsearch.xpack.core.security.user.User; +import org.elasticsearch.xpack.core.ssl.SSLService; import org.elasticsearch.xpack.security.authc.ldap.support.LdapLoadBalancing; import org.elasticsearch.xpack.security.authc.ldap.support.LdapSession; import org.elasticsearch.xpack.security.authc.ldap.support.SessionFactory; import org.elasticsearch.xpack.security.authc.support.CachingUsernamePasswordRealm; import org.elasticsearch.xpack.security.authc.support.UserRoleMapper; import org.elasticsearch.xpack.security.authc.support.UserRoleMapper.UserData; -import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken; import org.elasticsearch.xpack.security.authc.support.mapper.CompositeRoleMapper; import org.elasticsearch.xpack.security.authc.support.mapper.NativeRoleMappingStore; -import org.elasticsearch.xpack.security.user.User; -import org.elasticsearch.xpack.ssl.SSLService; + +import java.util.Map; +import java.util.Objects; +import java.util.concurrent.atomic.AtomicReference; +import java.util.function.Consumer; +import java.util.function.Function; +import java.util.function.Supplier; /** diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapSessionFactory.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapSessionFactory.java index b1ed70e41f1..891b5d04da4 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapSessionFactory.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapSessionFactory.java @@ -8,7 +8,6 @@ package org.elasticsearch.xpack.security.authc.ldap; import com.unboundid.ldap.sdk.LDAPConnection; import com.unboundid.ldap.sdk.LDAPException; import com.unboundid.ldap.sdk.SimpleBindRequest; - import org.apache.lucene.util.IOUtils; import org.elasticsearch.action.ActionListener; import org.elasticsearch.common.Strings; @@ -16,15 +15,17 @@ import org.elasticsearch.common.settings.SecureString; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.concurrent.AbstractRunnable; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.xpack.security.authc.RealmConfig; -import org.elasticsearch.xpack.security.authc.RealmSettings; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.RealmSettings; +import org.elasticsearch.xpack.core.security.authc.ldap.LdapSessionFactorySettings; +import org.elasticsearch.xpack.core.security.authc.ldap.SearchGroupsResolverSettings; +import org.elasticsearch.xpack.core.security.authc.support.CharArrays; +import org.elasticsearch.xpack.core.ssl.SSLService; import org.elasticsearch.xpack.security.authc.ldap.support.LdapMetaDataResolver; import org.elasticsearch.xpack.security.authc.ldap.support.LdapSession; import org.elasticsearch.xpack.security.authc.ldap.support.LdapSession.GroupsResolver; import org.elasticsearch.xpack.security.authc.ldap.support.LdapUtils; import org.elasticsearch.xpack.security.authc.ldap.support.SessionFactory; -import org.elasticsearch.xpack.security.authc.support.CharArrays; -import org.elasticsearch.xpack.ssl.SSLService; import java.text.MessageFormat; import java.util.Locale; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapUserSearchSessionFactory.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapUserSearchSessionFactory.java index cb8ed1afc35..4a21d43e809 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapUserSearchSessionFactory.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapUserSearchSessionFactory.java @@ -19,14 +19,17 @@ import org.elasticsearch.common.settings.SecureString; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.concurrent.AbstractRunnable; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.xpack.security.authc.RealmConfig; -import org.elasticsearch.xpack.security.authc.RealmSettings; -import org.elasticsearch.xpack.security.authc.ldap.support.LdapSearchScope; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.RealmSettings; +import org.elasticsearch.xpack.core.security.authc.ldap.LdapUserSearchSessionFactorySettings; +import org.elasticsearch.xpack.core.security.authc.ldap.PoolingSessionFactorySettings; +import org.elasticsearch.xpack.core.security.authc.ldap.SearchGroupsResolverSettings; +import org.elasticsearch.xpack.core.security.authc.ldap.support.LdapSearchScope; +import org.elasticsearch.xpack.core.security.authc.support.CharArrays; +import org.elasticsearch.xpack.core.ssl.SSLService; import org.elasticsearch.xpack.security.authc.ldap.support.LdapSession; import org.elasticsearch.xpack.security.authc.ldap.support.LdapSession.GroupsResolver; import org.elasticsearch.xpack.security.authc.ldap.support.LdapUtils; -import org.elasticsearch.xpack.security.authc.support.CharArrays; -import org.elasticsearch.xpack.ssl.SSLService; import static org.elasticsearch.xpack.security.authc.ldap.support.LdapUtils.attributesToSearchFor; import static org.elasticsearch.xpack.security.authc.ldap.support.LdapUtils.createFilter; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/PoolingSessionFactory.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/PoolingSessionFactory.java index daf0aed4e49..2e0c2a18063 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/PoolingSessionFactory.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/PoolingSessionFactory.java @@ -20,13 +20,14 @@ import org.elasticsearch.common.settings.Setting; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.xpack.security.authc.RealmConfig; -import org.elasticsearch.xpack.security.authc.RealmSettings; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.RealmSettings; +import org.elasticsearch.xpack.core.security.authc.ldap.PoolingSessionFactorySettings; +import org.elasticsearch.xpack.core.ssl.SSLService; import org.elasticsearch.xpack.security.authc.ldap.support.LdapMetaDataResolver; import org.elasticsearch.xpack.security.authc.ldap.support.LdapSession; import org.elasticsearch.xpack.security.authc.ldap.support.LdapUtils; import org.elasticsearch.xpack.security.authc.ldap.support.SessionFactory; -import org.elasticsearch.xpack.ssl.SSLService; import java.util.function.Supplier; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/SearchGroupsResolver.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/SearchGroupsResolver.java index 37ef8d5d2a0..c641be947d8 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/SearchGroupsResolver.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/SearchGroupsResolver.java @@ -16,7 +16,8 @@ import org.elasticsearch.action.ActionListener; import org.elasticsearch.common.Strings; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.xpack.security.authc.ldap.support.LdapSearchScope; +import org.elasticsearch.xpack.core.security.authc.ldap.SearchGroupsResolverSettings; +import org.elasticsearch.xpack.core.security.authc.ldap.support.LdapSearchScope; import org.elasticsearch.xpack.security.authc.ldap.support.LdapSession.GroupsResolver; import java.util.Collection; @@ -29,7 +30,7 @@ import static org.elasticsearch.xpack.security.authc.ldap.support.LdapUtils.OBJE import static org.elasticsearch.xpack.security.authc.ldap.support.LdapUtils.createFilter; import static org.elasticsearch.xpack.security.authc.ldap.support.LdapUtils.search; import static org.elasticsearch.xpack.security.authc.ldap.support.LdapUtils.searchForEntry; -import static org.elasticsearch.xpack.security.authc.ldap.support.SessionFactorySettings.IGNORE_REFERRAL_ERRORS_SETTING; +import static org.elasticsearch.xpack.core.security.authc.ldap.support.SessionFactorySettings.IGNORE_REFERRAL_ERRORS_SETTING; /** * Resolves the groups for a user by executing a search with a filter usually that contains a group diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/UserAttributeGroupsResolver.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/UserAttributeGroupsResolver.java index 449fb3a46da..6f5393d591e 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/UserAttributeGroupsResolver.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/UserAttributeGroupsResolver.java @@ -12,6 +12,7 @@ import org.apache.logging.log4j.Logger; import org.elasticsearch.action.ActionListener; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; +import org.elasticsearch.xpack.core.security.authc.ldap.UserAttributeGroupsResolverSettings; import org.elasticsearch.xpack.security.authc.ldap.support.LdapSession.GroupsResolver; import java.util.Arrays; @@ -23,7 +24,7 @@ import java.util.stream.Collectors; import static org.elasticsearch.xpack.security.authc.ldap.support.LdapUtils.OBJECT_CLASS_PRESENCE_FILTER; import static org.elasticsearch.xpack.security.authc.ldap.support.LdapUtils.searchForEntry; -import static org.elasticsearch.xpack.security.authc.ldap.support.SessionFactorySettings.IGNORE_REFERRAL_ERRORS_SETTING; +import static org.elasticsearch.xpack.core.security.authc.ldap.support.SessionFactorySettings.IGNORE_REFERRAL_ERRORS_SETTING; /** * Resolves the groups of a user based on the value of a attribute of the user's ldap entry diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapLoadBalancing.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapLoadBalancing.java index 1fa2ff4d095..3ac40eb374a 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapLoadBalancing.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapLoadBalancing.java @@ -14,6 +14,7 @@ import org.elasticsearch.common.Nullable; import org.elasticsearch.common.network.InetAddresses; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; +import org.elasticsearch.xpack.core.security.authc.ldap.support.LdapLoadBalancingSettings; import javax.net.SocketFactory; import java.util.Locale; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapMetaDataResolver.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapMetaDataResolver.java index 4f6607d4064..e957c29fe2b 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapMetaDataResolver.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapMetaDataResolver.java @@ -21,6 +21,7 @@ import org.apache.logging.log4j.Logger; import org.elasticsearch.action.ActionListener; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; +import org.elasticsearch.xpack.core.security.authc.ldap.support.LdapMetaDataResolverSettings; import static org.elasticsearch.xpack.security.authc.ldap.support.LdapUtils.OBJECT_CLASS_PRESENCE_FILTER; import static org.elasticsearch.xpack.security.authc.ldap.support.LdapUtils.searchForEntry; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapSession.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapSession.java index c9d11e1a7a3..bd1f0408a0c 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapSession.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapSession.java @@ -12,7 +12,7 @@ import org.apache.logging.log4j.Logger; import org.elasticsearch.action.ActionListener; import org.elasticsearch.common.lease.Releasable; import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.xpack.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; import java.util.Collection; import java.util.List; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapUtils.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapUtils.java index 35912f25adf..bab3d1af6fc 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapUtils.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapUtils.java @@ -36,9 +36,10 @@ import org.elasticsearch.common.logging.ESLoggerFactory; import org.elasticsearch.common.util.concurrent.AbstractRunnable; import org.elasticsearch.common.util.concurrent.CountDown; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.xpack.security.support.Exceptions; +import org.elasticsearch.xpack.core.security.support.Exceptions; import javax.naming.ldap.Rdn; + import java.security.AccessController; import java.security.PrivilegedActionException; import java.security.PrivilegedExceptionAction; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/SessionFactory.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/SessionFactory.java index 858a3b90ba6..aabea2eb854 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/SessionFactory.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/SessionFactory.java @@ -18,13 +18,15 @@ import org.elasticsearch.common.settings.SecureString; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.xpack.security.authc.RealmConfig; -import org.elasticsearch.xpack.security.authc.RealmSettings; -import org.elasticsearch.xpack.ssl.SSLConfigurationSettings; -import org.elasticsearch.xpack.ssl.SSLService; -import org.elasticsearch.xpack.ssl.VerificationMode; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.RealmSettings; +import org.elasticsearch.xpack.core.security.authc.ldap.support.SessionFactorySettings; +import org.elasticsearch.xpack.core.ssl.SSLConfigurationSettings; +import org.elasticsearch.xpack.core.ssl.SSLService; +import org.elasticsearch.xpack.core.ssl.VerificationMode; import javax.net.SocketFactory; + import java.util.Arrays; import java.util.List; import java.util.regex.Pattern; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/pki/PkiRealm.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/pki/PkiRealm.java index 985a82340b9..9815e6fae7b 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/pki/PkiRealm.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/pki/PkiRealm.java @@ -16,19 +16,21 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.env.Environment; import org.elasticsearch.watcher.ResourceWatcherService; -import org.elasticsearch.xpack.security.authc.AuthenticationResult; -import org.elasticsearch.xpack.security.authc.AuthenticationToken; -import org.elasticsearch.xpack.security.authc.Realm; -import org.elasticsearch.xpack.security.authc.RealmConfig; -import org.elasticsearch.xpack.security.authc.RealmSettings; +import org.elasticsearch.xpack.core.security.authc.AuthenticationResult; +import org.elasticsearch.xpack.core.security.authc.AuthenticationToken; +import org.elasticsearch.xpack.core.security.authc.Realm; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.RealmSettings; +import org.elasticsearch.xpack.core.security.authc.pki.PkiRealmSettings; +import org.elasticsearch.xpack.core.security.user.User; +import org.elasticsearch.xpack.core.ssl.CertUtils; +import org.elasticsearch.xpack.core.ssl.SSLConfigurationSettings; import org.elasticsearch.xpack.security.authc.support.UserRoleMapper; import org.elasticsearch.xpack.security.authc.support.mapper.CompositeRoleMapper; import org.elasticsearch.xpack.security.authc.support.mapper.NativeRoleMappingStore; -import org.elasticsearch.xpack.security.user.User; -import org.elasticsearch.xpack.ssl.CertUtils; -import org.elasticsearch.xpack.ssl.SSLConfigurationSettings; import javax.net.ssl.X509TrustManager; + import java.security.cert.Certificate; import java.security.cert.CertificateException; import java.security.cert.X509Certificate; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/pki/X509AuthenticationToken.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/pki/X509AuthenticationToken.java index 4eacafd9647..8603a662efa 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/pki/X509AuthenticationToken.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/pki/X509AuthenticationToken.java @@ -5,7 +5,7 @@ */ package org.elasticsearch.xpack.security.authc.pki; -import org.elasticsearch.xpack.security.authc.AuthenticationToken; +import org.elasticsearch.xpack.core.security.authc.AuthenticationToken; import java.security.cert.X509Certificate; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/saml/SamlAuthenticator.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/saml/SamlAuthenticator.java index 347bd8620da..dd3c41b0a4e 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/saml/SamlAuthenticator.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/saml/SamlAuthenticator.java @@ -19,7 +19,7 @@ import org.elasticsearch.ElasticsearchSecurityException; import org.elasticsearch.common.Strings; import org.elasticsearch.common.collect.Tuple; import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.xpack.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; import org.opensaml.core.xml.XMLObject; import org.opensaml.saml.saml2.core.Assertion; import org.opensaml.saml.saml2.core.Attribute; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/saml/SamlLogoutRequestHandler.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/saml/SamlLogoutRequestHandler.java index 97d34feec72..370cf59b5c4 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/saml/SamlLogoutRequestHandler.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/saml/SamlLogoutRequestHandler.java @@ -23,7 +23,7 @@ import org.elasticsearch.common.Strings; import org.elasticsearch.common.io.Streams; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.rest.RestUtils; -import org.elasticsearch.xpack.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; import org.opensaml.saml.common.SAMLObject; import org.opensaml.saml.saml2.core.EncryptedID; import org.opensaml.saml.saml2.core.LogoutRequest; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/saml/SamlMetadataCommand.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/saml/SamlMetadataCommand.java index 1e14eb5f575..2a389186172 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/saml/SamlMetadataCommand.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/saml/SamlMetadataCommand.java @@ -36,8 +36,9 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.LocaleUtils; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.env.Environment; -import org.elasticsearch.xpack.security.authc.RealmConfig; -import org.elasticsearch.xpack.security.authc.RealmSettings; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.RealmSettings; +import org.elasticsearch.xpack.core.security.authc.saml.SamlRealmSettings; import org.elasticsearch.xpack.security.authc.saml.SamlSpMetadataBuilder.ContactInfo; import org.opensaml.saml.saml2.core.AuthnRequest; import org.opensaml.saml.saml2.metadata.EntityDescriptor; @@ -45,7 +46,7 @@ import org.opensaml.saml.saml2.metadata.impl.EntityDescriptorMarshaller; import org.w3c.dom.Element; import org.xml.sax.SAXException; -import static org.elasticsearch.xpack.security.authc.RealmSettings.getRealmType; +import static org.elasticsearch.xpack.core.security.authc.RealmSettings.getRealmType; import static org.elasticsearch.xpack.security.authc.saml.SamlRealm.require; /** diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/saml/SamlRealm.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/saml/SamlRealm.java index 283b3f2901c..ef25a53d38a 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/saml/SamlRealm.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/saml/SamlRealm.java @@ -35,20 +35,20 @@ import org.elasticsearch.common.util.set.Sets; import org.elasticsearch.watcher.FileChangesListener; import org.elasticsearch.watcher.FileWatcher; import org.elasticsearch.watcher.ResourceWatcherService; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.security.authc.AuthenticationResult; -import org.elasticsearch.xpack.security.authc.AuthenticationToken; -import org.elasticsearch.xpack.security.authc.Realm; -import org.elasticsearch.xpack.security.authc.RealmConfig; -import org.elasticsearch.xpack.security.authc.RealmSettings; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.security.authc.AuthenticationResult; +import org.elasticsearch.xpack.core.security.authc.AuthenticationToken; +import org.elasticsearch.xpack.core.security.authc.Realm; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.RealmSettings; +import org.elasticsearch.xpack.core.security.authc.saml.SamlRealmSettings; +import org.elasticsearch.xpack.core.security.user.User; +import org.elasticsearch.xpack.core.ssl.CertUtils; +import org.elasticsearch.xpack.core.ssl.SSLService; +import org.elasticsearch.xpack.core.ssl.X509KeyPairSettings; import org.elasticsearch.xpack.security.authc.Realms; import org.elasticsearch.xpack.security.authc.TokenService; import org.elasticsearch.xpack.security.authc.support.UserRoleMapper; -import org.elasticsearch.xpack.security.user.User; -import org.elasticsearch.xpack.ssl.CertUtils; -import org.elasticsearch.xpack.ssl.SSLConfigurationSettings; -import org.elasticsearch.xpack.ssl.SSLService; -import org.elasticsearch.xpack.ssl.X509KeyPairSettings; import org.opensaml.core.criterion.EntityIdCriterion; import org.opensaml.saml.common.xml.SAMLConstants; import org.opensaml.saml.criterion.EntityRoleCriterion; @@ -75,6 +75,7 @@ import org.opensaml.xmlsec.keyinfo.impl.provider.InlineX509DataProvider; import javax.net.ssl.HostnameVerifier; import javax.net.ssl.X509KeyManager; + import java.io.IOException; import java.nio.file.Path; import java.security.AccessController; @@ -88,7 +89,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Objects; -import java.util.Set; import java.util.function.Function; import java.util.function.Supplier; import java.util.regex.Matcher; @@ -96,28 +96,28 @@ import java.util.regex.Pattern; import java.util.stream.Collectors; import java.util.stream.Stream; -import static org.elasticsearch.xpack.security.authc.saml.SamlRealmSettings.CLOCK_SKEW; -import static org.elasticsearch.xpack.security.authc.saml.SamlRealmSettings.DN_ATTRIBUTE; -import static org.elasticsearch.xpack.security.authc.saml.SamlRealmSettings.ENCRYPTION_KEY_ALIAS; -import static org.elasticsearch.xpack.security.authc.saml.SamlRealmSettings.ENCRYPTION_SETTINGS; -import static org.elasticsearch.xpack.security.authc.saml.SamlRealmSettings.FORCE_AUTHN; -import static org.elasticsearch.xpack.security.authc.saml.SamlRealmSettings.GROUPS_ATTRIBUTE; -import static org.elasticsearch.xpack.security.authc.saml.SamlRealmSettings.IDP_ENTITY_ID; -import static org.elasticsearch.xpack.security.authc.saml.SamlRealmSettings.IDP_METADATA_HTTP_REFRESH; -import static org.elasticsearch.xpack.security.authc.saml.SamlRealmSettings.IDP_METADATA_PATH; -import static org.elasticsearch.xpack.security.authc.saml.SamlRealmSettings.IDP_SINGLE_LOGOUT; -import static org.elasticsearch.xpack.security.authc.saml.SamlRealmSettings.MAIL_ATTRIBUTE; -import static org.elasticsearch.xpack.security.authc.saml.SamlRealmSettings.NAMEID_FORMAT; -import static org.elasticsearch.xpack.security.authc.saml.SamlRealmSettings.NAME_ATTRIBUTE; -import static org.elasticsearch.xpack.security.authc.saml.SamlRealmSettings.POPULATE_USER_METADATA; -import static org.elasticsearch.xpack.security.authc.saml.SamlRealmSettings.PRINCIPAL_ATTRIBUTE; -import static org.elasticsearch.xpack.security.authc.saml.SamlRealmSettings.SIGNING_KEY_ALIAS; -import static org.elasticsearch.xpack.security.authc.saml.SamlRealmSettings.SIGNING_MESSAGE_TYPES; -import static org.elasticsearch.xpack.security.authc.saml.SamlRealmSettings.SIGNING_SETTINGS; -import static org.elasticsearch.xpack.security.authc.saml.SamlRealmSettings.SP_ACS; -import static org.elasticsearch.xpack.security.authc.saml.SamlRealmSettings.SP_ENTITY_ID; -import static org.elasticsearch.xpack.security.authc.saml.SamlRealmSettings.SP_LOGOUT; -import static org.elasticsearch.xpack.security.authc.saml.SamlRealmSettings.TYPE; +import static org.elasticsearch.xpack.core.security.authc.saml.SamlRealmSettings.CLOCK_SKEW; +import static org.elasticsearch.xpack.core.security.authc.saml.SamlRealmSettings.DN_ATTRIBUTE; +import static org.elasticsearch.xpack.core.security.authc.saml.SamlRealmSettings.ENCRYPTION_KEY_ALIAS; +import static org.elasticsearch.xpack.core.security.authc.saml.SamlRealmSettings.ENCRYPTION_SETTINGS; +import static org.elasticsearch.xpack.core.security.authc.saml.SamlRealmSettings.FORCE_AUTHN; +import static org.elasticsearch.xpack.core.security.authc.saml.SamlRealmSettings.GROUPS_ATTRIBUTE; +import static org.elasticsearch.xpack.core.security.authc.saml.SamlRealmSettings.IDP_ENTITY_ID; +import static org.elasticsearch.xpack.core.security.authc.saml.SamlRealmSettings.IDP_METADATA_HTTP_REFRESH; +import static org.elasticsearch.xpack.core.security.authc.saml.SamlRealmSettings.IDP_METADATA_PATH; +import static org.elasticsearch.xpack.core.security.authc.saml.SamlRealmSettings.IDP_SINGLE_LOGOUT; +import static org.elasticsearch.xpack.core.security.authc.saml.SamlRealmSettings.MAIL_ATTRIBUTE; +import static org.elasticsearch.xpack.core.security.authc.saml.SamlRealmSettings.NAMEID_FORMAT; +import static org.elasticsearch.xpack.core.security.authc.saml.SamlRealmSettings.NAME_ATTRIBUTE; +import static org.elasticsearch.xpack.core.security.authc.saml.SamlRealmSettings.POPULATE_USER_METADATA; +import static org.elasticsearch.xpack.core.security.authc.saml.SamlRealmSettings.PRINCIPAL_ATTRIBUTE; +import static org.elasticsearch.xpack.core.security.authc.saml.SamlRealmSettings.SIGNING_KEY_ALIAS; +import static org.elasticsearch.xpack.core.security.authc.saml.SamlRealmSettings.SIGNING_MESSAGE_TYPES; +import static org.elasticsearch.xpack.core.security.authc.saml.SamlRealmSettings.SIGNING_SETTINGS; +import static org.elasticsearch.xpack.core.security.authc.saml.SamlRealmSettings.SP_ACS; +import static org.elasticsearch.xpack.core.security.authc.saml.SamlRealmSettings.SP_ENTITY_ID; +import static org.elasticsearch.xpack.core.security.authc.saml.SamlRealmSettings.SP_LOGOUT; +import static org.elasticsearch.xpack.core.security.authc.saml.SamlRealmSettings.TYPE; /** * This class is {@link Releasable} because it uses a library that thinks timers and timer tasks diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/saml/SamlRequestHandler.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/saml/SamlRequestHandler.java index 687cfd92a38..7e4d9674310 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/saml/SamlRequestHandler.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/saml/SamlRequestHandler.java @@ -27,7 +27,7 @@ import org.elasticsearch.common.Nullable; import org.elasticsearch.common.Strings; import org.elasticsearch.common.logging.ServerLoggers; import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.xpack.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; import org.elasticsearch.xpack.security.support.RestorableContextClassLoader; import org.joda.time.DateTime; import org.opensaml.core.xml.XMLObject; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/saml/SamlToken.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/saml/SamlToken.java index 1aee761f7fe..3420733f74a 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/saml/SamlToken.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/saml/SamlToken.java @@ -9,7 +9,7 @@ import java.util.List; import org.apache.commons.codec.binary.Hex; import org.elasticsearch.common.Strings; -import org.elasticsearch.xpack.security.authc.AuthenticationToken; +import org.elasticsearch.xpack.core.security.authc.AuthenticationToken; /** * A very lightweight {@link AuthenticationToken} to hold SAML content. diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/support/CachingRealm.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/support/CachingRealm.java index 61ac9e266f8..4c18ac2df6d 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/support/CachingRealm.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/support/CachingRealm.java @@ -5,8 +5,10 @@ */ package org.elasticsearch.xpack.security.authc.support; +import org.elasticsearch.xpack.core.security.authc.Realm; + /** - * This interface allows a {@link org.elasticsearch.xpack.security.authc.Realm} to indicate that it supports caching user credentials + * This interface allows a {@link Realm} to indicate that it supports caching user credentials * and expose the ability to clear the cache for a given String identifier or all of the cache */ public interface CachingRealm { diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/support/CachingUsernamePasswordRealm.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/support/CachingUsernamePasswordRealm.java index 9fd46891fbb..e5a90c0855f 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/support/CachingUsernamePasswordRealm.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/support/CachingUsernamePasswordRealm.java @@ -5,19 +5,22 @@ */ package org.elasticsearch.xpack.security.authc.support; -import java.util.Map; -import java.util.Objects; -import java.util.concurrent.ExecutionException; - import org.elasticsearch.action.ActionListener; import org.elasticsearch.common.cache.Cache; import org.elasticsearch.common.cache.CacheBuilder; import org.elasticsearch.common.settings.SecureString; import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.xpack.security.authc.AuthenticationResult; -import org.elasticsearch.xpack.security.authc.AuthenticationToken; -import org.elasticsearch.xpack.security.authc.RealmConfig; -import org.elasticsearch.xpack.security.user.User; +import org.elasticsearch.xpack.core.security.authc.AuthenticationResult; +import org.elasticsearch.xpack.core.security.authc.AuthenticationToken; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.support.CachingUsernamePasswordRealmSettings; +import org.elasticsearch.xpack.core.security.authc.support.Hasher; +import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; +import org.elasticsearch.xpack.core.security.user.User; + +import java.util.Map; +import java.util.Objects; +import java.util.concurrent.ExecutionException; public abstract class CachingUsernamePasswordRealm extends UsernamePasswordRealm implements CachingRealm { diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/support/DnRoleMapper.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/support/DnRoleMapper.java index f13de374e6c..6516b02f68d 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/support/DnRoleMapper.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/support/DnRoleMapper.java @@ -30,8 +30,9 @@ import org.elasticsearch.env.Environment; import org.elasticsearch.watcher.FileChangesListener; import org.elasticsearch.watcher.FileWatcher; import org.elasticsearch.watcher.ResourceWatcherService; -import org.elasticsearch.xpack.XPackPlugin; -import org.elasticsearch.xpack.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.XPackPlugin; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.support.DnRoleMapperSettings; import static java.util.Collections.emptyMap; import static java.util.Collections.unmodifiableMap; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/support/RoleMappingFileBootstrapCheck.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/support/RoleMappingFileBootstrapCheck.java index afb23ccb187..c4193c19219 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/support/RoleMappingFileBootstrapCheck.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/support/RoleMappingFileBootstrapCheck.java @@ -9,7 +9,8 @@ import java.nio.file.Path; import org.elasticsearch.bootstrap.BootstrapCheck; import org.elasticsearch.bootstrap.BootstrapContext; -import org.elasticsearch.xpack.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.support.DnRoleMapperSettings; /** * A BootstrapCheck that {@link DnRoleMapper} files exist and are valid (valid YAML and valid DNs) diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/support/UserRoleMapper.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/support/UserRoleMapper.java index eaa73ae1d7a..95dc26417e6 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/support/UserRoleMapper.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/support/UserRoleMapper.java @@ -5,6 +5,11 @@ */ package org.elasticsearch.xpack.security.authc.support; +import org.elasticsearch.action.ActionListener; +import org.elasticsearch.common.Nullable; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authz.permission.Role; + import java.util.Collection; import java.util.Collections; import java.util.HashMap; @@ -12,13 +17,9 @@ import java.util.HashSet; import java.util.Map; import java.util.Set; -import org.elasticsearch.action.ActionListener; -import org.elasticsearch.common.Nullable; -import org.elasticsearch.xpack.security.authc.RealmConfig; - /** * Where a realm users an authentication method that does not have in-built support for X-Pack - * {@link org.elasticsearch.xpack.security.authz.permission.Role roles}, it may delegate to an implementation of this class the + * {@link Role roles}, it may delegate to an implementation of this class the * responsibility for determining the set roles that an authenticated user should have. */ public interface UserRoleMapper { diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/support/UsernamePasswordRealm.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/support/UsernamePasswordRealm.java index 26080f58f94..b50cba349dc 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/support/UsernamePasswordRealm.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/support/UsernamePasswordRealm.java @@ -6,10 +6,10 @@ package org.elasticsearch.xpack.security.authc.support; import org.elasticsearch.common.util.concurrent.ThreadContext; -import org.elasticsearch.xpack.security.authc.AuthenticationToken; -import org.elasticsearch.xpack.security.authc.Realm; -import org.elasticsearch.xpack.security.authc.RealmConfig; -import org.elasticsearch.xpack.security.user.User; +import org.elasticsearch.xpack.core.security.authc.AuthenticationToken; +import org.elasticsearch.xpack.core.security.authc.Realm; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; abstract class UsernamePasswordRealm extends Realm { diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/CompositeRoleMapper.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/CompositeRoleMapper.java index f641fa1b12b..0814469cfce 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/CompositeRoleMapper.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/CompositeRoleMapper.java @@ -7,7 +7,6 @@ package org.elasticsearch.xpack.security.authc.support.mapper; import java.util.ArrayList; import java.util.Arrays; -import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.Set; @@ -15,9 +14,8 @@ import java.util.stream.Collectors; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.support.GroupedActionListener; -import org.elasticsearch.common.settings.Setting; import org.elasticsearch.watcher.ResourceWatcherService; -import org.elasticsearch.xpack.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; import org.elasticsearch.xpack.security.authc.support.CachingUsernamePasswordRealm; import org.elasticsearch.xpack.security.authc.support.DnRoleMapper; import org.elasticsearch.xpack.security.authc.support.UserRoleMapper; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/NativeRoleMappingStore.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/NativeRoleMappingStore.java index 0491f69ded2..80f407440a7 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/NativeRoleMappingStore.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/NativeRoleMappingStore.java @@ -25,15 +25,17 @@ import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.index.query.QueryBuilder; import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.xpack.XPackClientActionPlugin; -import org.elasticsearch.xpack.security.ScrollHelper; +import org.elasticsearch.xpack.core.XPackClientActionPlugin; +import org.elasticsearch.xpack.core.security.ScrollHelper; +import org.elasticsearch.xpack.core.security.action.realm.ClearRealmCacheAction; +import org.elasticsearch.xpack.core.security.action.realm.ClearRealmCacheResponse; +import org.elasticsearch.xpack.core.security.action.rolemapping.DeleteRoleMappingRequest; +import org.elasticsearch.xpack.core.security.action.rolemapping.PutRoleMappingRequest; +import org.elasticsearch.xpack.core.security.authc.support.mapper.ExpressionRoleMapping; +import org.elasticsearch.xpack.core.security.client.SecurityClient; import org.elasticsearch.xpack.security.SecurityLifecycleService; -import org.elasticsearch.xpack.security.action.realm.ClearRealmCacheResponse; -import org.elasticsearch.xpack.security.action.rolemapping.DeleteRoleMappingRequest; -import org.elasticsearch.xpack.security.action.rolemapping.PutRoleMappingRequest; import org.elasticsearch.xpack.security.authc.support.CachingUsernamePasswordRealm; import org.elasticsearch.xpack.security.authc.support.UserRoleMapper; -import org.elasticsearch.xpack.security.client.SecurityClient; import java.io.IOException; import java.util.Arrays; @@ -52,9 +54,9 @@ import java.util.stream.Stream; import static org.elasticsearch.action.DocWriteResponse.Result.CREATED; import static org.elasticsearch.action.DocWriteResponse.Result.DELETED; import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.xpack.ClientHelper.SECURITY_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.executeAsyncWithOrigin; -import static org.elasticsearch.xpack.ClientHelper.stashWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.SECURITY_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.stashWithOrigin; import static org.elasticsearch.xpack.security.SecurityLifecycleService.SECURITY_INDEX_NAME; /** @@ -347,7 +349,7 @@ public class NativeRoleMappingStore extends AbstractComponent implements UserRol * Indicates that the provided realm should have its cache cleared if this store is updated * (that is, {@link #putRoleMapping(PutRoleMappingRequest, ActionListener)} or * {@link #deleteRoleMapping(DeleteRoleMappingRequest, ActionListener)} are called). - * @see org.elasticsearch.xpack.security.action.realm.ClearRealmCacheAction + * @see ClearRealmCacheAction */ @Override public void refreshRealmOnChange(CachingUsernamePasswordRealm realm) { diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/AuthorizationService.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/AuthorizationService.java index 95fb684cbb8..4dbc1fb4b5c 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/AuthorizationService.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/AuthorizationService.java @@ -5,15 +5,6 @@ */ package org.elasticsearch.xpack.security.authz; -import java.util.Arrays; -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.function.Predicate; - import org.elasticsearch.ElasticsearchSecurityException; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.CompositeIndicesRequest; @@ -48,34 +39,44 @@ import org.elasticsearch.common.util.set.Sets; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportActionProxy; import org.elasticsearch.transport.TransportRequest; +import org.elasticsearch.xpack.core.security.action.user.AuthenticateAction; +import org.elasticsearch.xpack.core.security.action.user.ChangePasswordAction; +import org.elasticsearch.xpack.core.security.action.user.HasPrivilegesAction; +import org.elasticsearch.xpack.core.security.action.user.UserRequest; +import org.elasticsearch.xpack.core.security.authc.Authentication; +import org.elasticsearch.xpack.core.security.authc.AuthenticationFailureHandler; +import org.elasticsearch.xpack.core.security.authc.esnative.NativeRealmSettings; +import org.elasticsearch.xpack.core.security.authz.AuthorizationServiceField; +import org.elasticsearch.xpack.core.security.authz.accesscontrol.IndicesAccessControl; +import org.elasticsearch.xpack.core.security.authz.permission.ClusterPermission; +import org.elasticsearch.xpack.core.security.authz.permission.FieldPermissionsCache; +import org.elasticsearch.xpack.core.security.authz.permission.Role; +import org.elasticsearch.xpack.core.security.authz.privilege.ClusterPrivilege; +import org.elasticsearch.xpack.core.security.authz.privilege.IndexPrivilege; +import org.elasticsearch.xpack.core.security.authz.store.ReservedRolesStore; +import org.elasticsearch.xpack.core.security.support.Automatons; +import org.elasticsearch.xpack.core.security.user.AnonymousUser; +import org.elasticsearch.xpack.core.security.user.SystemUser; +import org.elasticsearch.xpack.core.security.user.User; +import org.elasticsearch.xpack.core.security.user.XPackSecurityUser; +import org.elasticsearch.xpack.core.security.user.XPackUser; import org.elasticsearch.xpack.security.SecurityLifecycleService; -import org.elasticsearch.xpack.security.action.user.AuthenticateAction; -import org.elasticsearch.xpack.security.action.user.ChangePasswordAction; -import org.elasticsearch.xpack.security.action.user.HasPrivilegesAction; -import org.elasticsearch.xpack.security.action.user.UserRequest; import org.elasticsearch.xpack.security.audit.AuditTrailService; -import org.elasticsearch.xpack.security.authc.Authentication; -import org.elasticsearch.xpack.security.authc.AuthenticationFailureHandler; -import org.elasticsearch.xpack.security.authc.esnative.NativeRealmSettings; import org.elasticsearch.xpack.security.authc.esnative.ReservedRealm; import org.elasticsearch.xpack.security.authz.IndicesAndAliasesResolver.ResolvedIndices; -import org.elasticsearch.xpack.security.authz.accesscontrol.IndicesAccessControl; -import org.elasticsearch.xpack.security.authz.permission.ClusterPermission; -import org.elasticsearch.xpack.security.authz.permission.FieldPermissionsCache; -import org.elasticsearch.xpack.security.authz.permission.Role; -import org.elasticsearch.xpack.security.authz.privilege.ClusterPrivilege; -import org.elasticsearch.xpack.security.authz.privilege.IndexPrivilege; import org.elasticsearch.xpack.security.authz.store.CompositeRolesStore; -import org.elasticsearch.xpack.security.authz.store.ReservedRolesStore; -import org.elasticsearch.xpack.security.support.Automatons; -import org.elasticsearch.xpack.security.user.AnonymousUser; -import org.elasticsearch.xpack.security.user.SystemUser; -import org.elasticsearch.xpack.security.user.User; -import org.elasticsearch.xpack.security.user.XPackSecurityUser; -import org.elasticsearch.xpack.security.user.XPackUser; -import static org.elasticsearch.xpack.security.SecurityField.setting; -import static org.elasticsearch.xpack.security.support.Exceptions.authorizationError; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Predicate; + +import static org.elasticsearch.xpack.core.security.SecurityField.setting; +import static org.elasticsearch.xpack.core.security.support.Exceptions.authorizationError; public class AuthorizationService extends AbstractComponent { diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/AuthorizationUtils.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/AuthorizationUtils.java index 2a782c4456b..a7d68fb15c6 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/AuthorizationUtils.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/AuthorizationUtils.java @@ -9,26 +9,26 @@ import org.elasticsearch.Version; import org.elasticsearch.action.ActionListener; import org.elasticsearch.common.util.concurrent.CountDown; import org.elasticsearch.common.util.concurrent.ThreadContext; -import org.elasticsearch.xpack.ClientHelper; -import org.elasticsearch.xpack.security.SecurityContext; -import org.elasticsearch.xpack.security.authc.Authentication; -import org.elasticsearch.xpack.security.authc.AuthenticationField; -import org.elasticsearch.xpack.security.authz.permission.Role; -import org.elasticsearch.xpack.security.support.Automatons; -import org.elasticsearch.xpack.security.user.SystemUser; -import org.elasticsearch.xpack.security.user.XPackSecurityUser; -import org.elasticsearch.xpack.security.user.XPackUser; +import org.elasticsearch.xpack.core.ClientHelper; +import org.elasticsearch.xpack.core.security.SecurityContext; +import org.elasticsearch.xpack.core.security.authc.Authentication; +import org.elasticsearch.xpack.core.security.authc.AuthenticationField; +import org.elasticsearch.xpack.core.security.authz.permission.Role; +import org.elasticsearch.xpack.core.security.support.Automatons; +import org.elasticsearch.xpack.core.security.user.SystemUser; +import org.elasticsearch.xpack.core.security.user.XPackSecurityUser; +import org.elasticsearch.xpack.core.security.user.XPackUser; import java.util.function.BiConsumer; import java.util.function.Consumer; import java.util.function.Predicate; -import static org.elasticsearch.xpack.ClientHelper.DEPRECATION_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.ML_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.MONITORING_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.PERSISTENT_TASK_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.SECURITY_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.WATCHER_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.DEPRECATION_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.ML_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.MONITORING_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.PERSISTENT_TASK_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.SECURITY_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.WATCHER_ORIGIN; public final class AuthorizationUtils { diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/AuthorizedIndices.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/AuthorizedIndices.java index b59dc214629..3f257b7f0ce 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/AuthorizedIndices.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/AuthorizedIndices.java @@ -7,9 +7,9 @@ package org.elasticsearch.xpack.security.authz; import org.elasticsearch.cluster.metadata.AliasOrIndex; import org.elasticsearch.cluster.metadata.MetaData; +import org.elasticsearch.xpack.core.security.authz.permission.Role; +import org.elasticsearch.xpack.core.security.user.User; import org.elasticsearch.xpack.security.SecurityLifecycleService; -import org.elasticsearch.xpack.security.authz.permission.Role; -import org.elasticsearch.xpack.security.user.User; import java.util.ArrayList; import java.util.Collections; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/IndicesAndAliasesResolver.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/IndicesAndAliasesResolver.java index fc1b0c4688d..5c0000d4304 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/IndicesAndAliasesResolver.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/IndicesAndAliasesResolver.java @@ -5,18 +5,6 @@ */ package org.elasticsearch.xpack.security.authz; -import java.net.InetSocketAddress; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.SortedMap; -import java.util.concurrent.CopyOnWriteArraySet; -import java.util.stream.Collectors; - import org.elasticsearch.action.AliasesRequest; import org.elasticsearch.action.IndicesRequest; import org.elasticsearch.action.admin.indices.alias.IndicesAliasesRequest; @@ -37,7 +25,20 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.index.IndexNotFoundException; import org.elasticsearch.transport.RemoteClusterAware; import org.elasticsearch.transport.TransportRequest; -import org.elasticsearch.xpack.graph.action.GraphExploreRequest; +import org.elasticsearch.xpack.core.graph.action.GraphExploreRequest; +import org.elasticsearch.xpack.core.security.authz.IndicesAndAliasesResolverField; + +import java.net.InetSocketAddress; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.SortedMap; +import java.util.concurrent.CopyOnWriteArraySet; +import java.util.stream.Collectors; public class IndicesAndAliasesResolver { diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/SecuritySearchOperationListener.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/SecuritySearchOperationListener.java index 682abe47e66..8e4070439a7 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/SecuritySearchOperationListener.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/SecuritySearchOperationListener.java @@ -13,8 +13,8 @@ import org.elasticsearch.search.internal.ScrollContext; import org.elasticsearch.search.internal.SearchContext; import org.elasticsearch.transport.TransportRequest; import org.elasticsearch.xpack.security.audit.AuditTrailService; -import org.elasticsearch.xpack.security.authc.Authentication; -import org.elasticsearch.xpack.security.authc.AuthenticationField; +import org.elasticsearch.xpack.core.security.authc.Authentication; +import org.elasticsearch.xpack.core.security.authc.AuthenticationField; import static org.elasticsearch.xpack.security.authz.AuthorizationService.ORIGINATING_ACTION_KEY; import static org.elasticsearch.xpack.security.authz.AuthorizationService.ROLE_NAMES_KEY; diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/FieldExtractor.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/FieldExtractor.java similarity index 100% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/FieldExtractor.java rename to plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/FieldExtractor.java diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/OptOutQueryCache.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/OptOutQueryCache.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/OptOutQueryCache.java rename to plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/OptOutQueryCache.java index 73083cdc9c0..e15ff2f4d0c 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/OptOutQueryCache.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/OptOutQueryCache.java @@ -13,7 +13,8 @@ import org.elasticsearch.index.AbstractIndexComponent; import org.elasticsearch.index.IndexSettings; import org.elasticsearch.index.cache.query.QueryCache; import org.elasticsearch.indices.IndicesQueryCache; -import org.elasticsearch.xpack.security.authz.AuthorizationServiceField; +import org.elasticsearch.xpack.core.security.authz.AuthorizationServiceField; +import org.elasticsearch.xpack.core.security.authz.accesscontrol.IndicesAccessControl; import java.util.HashSet; import java.util.Objects; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/store/CompositeRolesStore.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/store/CompositeRolesStore.java index f238d3bc2be..dfe3a51750c 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/store/CompositeRolesStore.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/store/CompositeRolesStore.java @@ -5,23 +5,6 @@ */ package org.elasticsearch.xpack.security.authz.store; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.concurrent.atomic.AtomicLong; -import java.util.concurrent.locks.ReadWriteLock; -import java.util.concurrent.locks.ReentrantReadWriteLock; -import java.util.function.BiConsumer; -import java.util.stream.Collectors; - import org.apache.logging.log4j.message.ParameterizedMessage; import org.elasticsearch.action.ActionListener; import org.elasticsearch.cluster.health.ClusterHealthStatus; @@ -40,18 +23,36 @@ import org.elasticsearch.common.util.concurrent.ReleasableLock; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.common.util.set.Sets; import org.elasticsearch.license.XPackLicenseState; -import org.elasticsearch.xpack.common.IteratingActionListener; -import org.elasticsearch.xpack.security.authz.RoleDescriptor; -import org.elasticsearch.xpack.security.authz.RoleDescriptor.IndicesPrivileges; -import org.elasticsearch.xpack.security.authz.permission.FieldPermissionsCache; -import org.elasticsearch.xpack.security.authz.permission.FieldPermissionsDefinition; -import org.elasticsearch.xpack.security.authz.permission.FieldPermissionsDefinition.FieldGrantExcludeGroup; -import org.elasticsearch.xpack.security.authz.permission.Role; -import org.elasticsearch.xpack.security.authz.privilege.ClusterPrivilege; -import org.elasticsearch.xpack.security.authz.privilege.IndexPrivilege; -import org.elasticsearch.xpack.security.authz.privilege.Privilege; +import org.elasticsearch.xpack.core.common.IteratingActionListener; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor.IndicesPrivileges; +import org.elasticsearch.xpack.core.security.authz.permission.FieldPermissionsCache; +import org.elasticsearch.xpack.core.security.authz.permission.FieldPermissionsDefinition; +import org.elasticsearch.xpack.core.security.authz.permission.FieldPermissionsDefinition.FieldGrantExcludeGroup; +import org.elasticsearch.xpack.core.security.authz.permission.Role; +import org.elasticsearch.xpack.core.security.authz.privilege.ClusterPrivilege; +import org.elasticsearch.xpack.core.security.authz.privilege.IndexPrivilege; +import org.elasticsearch.xpack.core.security.authz.privilege.Privilege; +import org.elasticsearch.xpack.core.security.authz.store.ReservedRolesStore; -import static org.elasticsearch.xpack.security.SecurityField.setting; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.concurrent.atomic.AtomicLong; +import java.util.concurrent.locks.ReadWriteLock; +import java.util.concurrent.locks.ReentrantReadWriteLock; +import java.util.function.BiConsumer; +import java.util.stream.Collectors; + +import static org.elasticsearch.xpack.core.security.SecurityField.setting; /** * A composite roles store that combines built in roles, file-based roles, and index-based roles. Checks the built in roles first, then the diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/store/FileRolesStore.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/store/FileRolesStore.java similarity index 96% rename from plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/store/FileRolesStore.java rename to plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/store/FileRolesStore.java index 41145af6f1a..84ece7bf655 100644 --- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/store/FileRolesStore.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/store/FileRolesStore.java @@ -20,12 +20,13 @@ import org.elasticsearch.license.XPackLicenseState; import org.elasticsearch.watcher.FileChangesListener; import org.elasticsearch.watcher.FileWatcher; import org.elasticsearch.watcher.ResourceWatcherService; -import org.elasticsearch.xpack.XPackPlugin; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.security.authz.RoleDescriptor; -import org.elasticsearch.xpack.security.authz.RoleDescriptor.IndicesPrivileges; -import org.elasticsearch.xpack.security.support.NoOpLogger; -import org.elasticsearch.xpack.security.support.Validation; +import org.elasticsearch.xpack.core.XPackPlugin; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor.IndicesPrivileges; +import org.elasticsearch.xpack.core.security.authz.store.ReservedRolesStore; +import org.elasticsearch.xpack.core.security.support.NoOpLogger; +import org.elasticsearch.xpack.core.security.support.Validation; import java.io.IOException; import java.nio.charset.StandardCharsets; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/store/NativeRolesStore.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/store/NativeRolesStore.java index 4af94758abc..46fde754367 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/store/NativeRolesStore.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/store/NativeRolesStore.java @@ -35,16 +35,16 @@ import org.elasticsearch.index.query.QueryBuilder; import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.license.LicenseUtils; import org.elasticsearch.license.XPackLicenseState; -import org.elasticsearch.xpack.XPackClientActionPlugin; -import org.elasticsearch.xpack.security.ScrollHelper; +import org.elasticsearch.xpack.core.XPackClientActionPlugin; +import org.elasticsearch.xpack.core.security.ScrollHelper; +import org.elasticsearch.xpack.core.security.action.role.ClearRolesCacheRequest; +import org.elasticsearch.xpack.core.security.action.role.ClearRolesCacheResponse; +import org.elasticsearch.xpack.core.security.action.role.DeleteRoleRequest; +import org.elasticsearch.xpack.core.security.action.role.PutRoleRequest; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor.IndicesPrivileges; +import org.elasticsearch.xpack.core.security.client.SecurityClient; import org.elasticsearch.xpack.security.SecurityLifecycleService; -import org.elasticsearch.xpack.security.action.role.ClearRolesCacheRequest; -import org.elasticsearch.xpack.security.action.role.ClearRolesCacheResponse; -import org.elasticsearch.xpack.security.action.role.DeleteRoleRequest; -import org.elasticsearch.xpack.security.action.role.PutRoleRequest; -import org.elasticsearch.xpack.security.authz.RoleDescriptor; -import org.elasticsearch.xpack.security.authz.RoleDescriptor.IndicesPrivileges; -import org.elasticsearch.xpack.security.client.SecurityClient; import java.io.IOException; import java.util.ArrayList; @@ -59,11 +59,11 @@ import java.util.function.Supplier; import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; import static org.elasticsearch.index.query.QueryBuilders.existsQuery; -import static org.elasticsearch.xpack.ClientHelper.SECURITY_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.executeAsyncWithOrigin; -import static org.elasticsearch.xpack.ClientHelper.stashWithOrigin; -import static org.elasticsearch.xpack.security.SecurityField.setting; -import static org.elasticsearch.xpack.security.authz.RoleDescriptor.ROLE_TYPE; +import static org.elasticsearch.xpack.core.ClientHelper.SECURITY_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.stashWithOrigin; +import static org.elasticsearch.xpack.core.security.SecurityField.setting; +import static org.elasticsearch.xpack.core.security.authz.RoleDescriptor.ROLE_TYPE; /** * NativeRolesStore is a {@code RolesStore} that, instead of reading from a diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/crypto/tool/SystemKeyTool.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/crypto/tool/SystemKeyTool.java index 24f83ca65d1..f57969b2a3c 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/crypto/tool/SystemKeyTool.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/crypto/tool/SystemKeyTool.java @@ -16,7 +16,7 @@ import org.elasticsearch.common.SuppressForbidden; import org.elasticsearch.common.io.PathUtils; import org.elasticsearch.common.util.set.Sets; import org.elasticsearch.env.Environment; -import org.elasticsearch.xpack.XPackField; +import org.elasticsearch.xpack.core.XPackField; import javax.crypto.KeyGenerator; import javax.crypto.SecretKey; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/SecurityRestFilter.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/SecurityRestFilter.java index 03f729ca8dc..86b559a097a 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/SecurityRestFilter.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/SecurityRestFilter.java @@ -20,6 +20,7 @@ import org.elasticsearch.rest.RestChannel; import org.elasticsearch.rest.RestHandler; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.RestRequest.Method; +import org.elasticsearch.xpack.core.security.rest.RestRequestFilter; import org.elasticsearch.xpack.security.authc.AuthenticationService; import org.elasticsearch.xpack.security.transport.ServerTransportFilter; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/RestAuthenticateAction.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/RestAuthenticateAction.java index cefc1ab9582..b280b3a89a2 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/RestAuthenticateAction.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/RestAuthenticateAction.java @@ -16,11 +16,11 @@ import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.RestResponse; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.rest.action.RestBuilderListener; -import org.elasticsearch.xpack.security.SecurityContext; -import org.elasticsearch.xpack.security.action.user.AuthenticateAction; -import org.elasticsearch.xpack.security.action.user.AuthenticateRequest; -import org.elasticsearch.xpack.security.action.user.AuthenticateResponse; -import org.elasticsearch.xpack.security.user.User; +import org.elasticsearch.xpack.core.security.SecurityContext; +import org.elasticsearch.xpack.core.security.action.user.AuthenticateAction; +import org.elasticsearch.xpack.core.security.action.user.AuthenticateRequest; +import org.elasticsearch.xpack.core.security.action.user.AuthenticateResponse; +import org.elasticsearch.xpack.core.security.user.User; import java.io.IOException; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/SecurityBaseRestHandler.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/SecurityBaseRestHandler.java index 711d512549c..949645f08cf 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/SecurityBaseRestHandler.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/SecurityBaseRestHandler.java @@ -15,7 +15,7 @@ import org.elasticsearch.rest.RestRequest; import java.io.IOException; -import static org.elasticsearch.xpack.XPackField.SECURITY; +import static org.elasticsearch.xpack.core.XPackField.SECURITY; /** * Base class for security rest handlers. This handler takes care of ensuring that the license diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/oauth2/RestGetTokenAction.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/oauth2/RestGetTokenAction.java index fb4d6b6be18..e2cfb44a258 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/oauth2/RestGetTokenAction.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/oauth2/RestGetTokenAction.java @@ -24,11 +24,11 @@ import org.elasticsearch.rest.RestChannel; import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.RestStatus; -import org.elasticsearch.xpack.security.action.token.CreateTokenAction; -import org.elasticsearch.xpack.security.action.token.CreateTokenRequest; -import org.elasticsearch.xpack.security.action.token.CreateTokenRequestBuilder; -import org.elasticsearch.xpack.security.action.token.CreateTokenResponse; -import org.elasticsearch.xpack.security.action.token.RefreshTokenAction; +import org.elasticsearch.xpack.core.security.action.token.CreateTokenAction; +import org.elasticsearch.xpack.core.security.action.token.CreateTokenRequest; +import org.elasticsearch.xpack.core.security.action.token.CreateTokenRequestBuilder; +import org.elasticsearch.xpack.core.security.action.token.CreateTokenResponse; +import org.elasticsearch.xpack.core.security.action.token.RefreshTokenAction; import org.elasticsearch.xpack.security.rest.action.SecurityBaseRestHandler; import java.io.IOException; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/oauth2/RestInvalidateTokenAction.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/oauth2/RestInvalidateTokenAction.java index bd8caecf375..d76f4da7d8c 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/oauth2/RestInvalidateTokenAction.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/oauth2/RestInvalidateTokenAction.java @@ -20,9 +20,9 @@ import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.RestResponse; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.rest.action.RestBuilderListener; -import org.elasticsearch.xpack.security.action.token.InvalidateTokenAction; -import org.elasticsearch.xpack.security.action.token.InvalidateTokenRequest; -import org.elasticsearch.xpack.security.action.token.InvalidateTokenResponse; +import org.elasticsearch.xpack.core.security.action.token.InvalidateTokenAction; +import org.elasticsearch.xpack.core.security.action.token.InvalidateTokenRequest; +import org.elasticsearch.xpack.core.security.action.token.InvalidateTokenResponse; import org.elasticsearch.xpack.security.rest.action.SecurityBaseRestHandler; import java.io.IOException; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/realm/RestClearRealmCacheAction.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/realm/RestClearRealmCacheAction.java index bf42bb15163..cc507fdfb51 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/realm/RestClearRealmCacheAction.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/realm/RestClearRealmCacheAction.java @@ -11,8 +11,8 @@ import org.elasticsearch.license.XPackLicenseState; import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.RestActions.NodesResponseRestListener; -import org.elasticsearch.xpack.security.action.realm.ClearRealmCacheRequest; -import org.elasticsearch.xpack.security.client.SecurityClient; +import org.elasticsearch.xpack.core.security.action.realm.ClearRealmCacheRequest; +import org.elasticsearch.xpack.core.security.client.SecurityClient; import org.elasticsearch.xpack.security.rest.action.SecurityBaseRestHandler; import java.io.IOException; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestClearRolesCacheAction.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestClearRolesCacheAction.java index 01c00ac3e72..e60ce90aa88 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestClearRolesCacheAction.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestClearRolesCacheAction.java @@ -11,8 +11,8 @@ import org.elasticsearch.license.XPackLicenseState; import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.RestActions.NodesResponseRestListener; -import org.elasticsearch.xpack.security.action.role.ClearRolesCacheRequest; -import org.elasticsearch.xpack.security.client.SecurityClient; +import org.elasticsearch.xpack.core.security.action.role.ClearRolesCacheRequest; +import org.elasticsearch.xpack.core.security.client.SecurityClient; import org.elasticsearch.xpack.security.rest.action.SecurityBaseRestHandler; import java.io.IOException; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestDeleteRoleAction.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestDeleteRoleAction.java index 0cbb4fc9f45..f4ec8774704 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestDeleteRoleAction.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestDeleteRoleAction.java @@ -15,8 +15,8 @@ import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.RestResponse; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.rest.action.RestBuilderListener; -import org.elasticsearch.xpack.security.action.role.DeleteRoleResponse; -import org.elasticsearch.xpack.security.client.SecurityClient; +import org.elasticsearch.xpack.core.security.action.role.DeleteRoleResponse; +import org.elasticsearch.xpack.core.security.client.SecurityClient; import org.elasticsearch.xpack.security.rest.action.SecurityBaseRestHandler; import java.io.IOException; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestGetRolesAction.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestGetRolesAction.java index 0b9190c92e2..b4c394dfa51 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestGetRolesAction.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestGetRolesAction.java @@ -16,9 +16,9 @@ import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.RestResponse; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.rest.action.RestBuilderListener; -import org.elasticsearch.xpack.security.action.role.GetRolesResponse; -import org.elasticsearch.xpack.security.authz.RoleDescriptor; -import org.elasticsearch.xpack.security.client.SecurityClient; +import org.elasticsearch.xpack.core.security.action.role.GetRolesResponse; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor; +import org.elasticsearch.xpack.core.security.client.SecurityClient; import org.elasticsearch.xpack.security.rest.action.SecurityBaseRestHandler; import java.io.IOException; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestPutRoleAction.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestPutRoleAction.java index 0ac2b9fc43b..ea22cdb3cf9 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestPutRoleAction.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestPutRoleAction.java @@ -15,9 +15,9 @@ import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.RestResponse; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.rest.action.RestBuilderListener; -import org.elasticsearch.xpack.security.action.role.PutRoleRequestBuilder; -import org.elasticsearch.xpack.security.action.role.PutRoleResponse; -import org.elasticsearch.xpack.security.client.SecurityClient; +import org.elasticsearch.xpack.core.security.action.role.PutRoleRequestBuilder; +import org.elasticsearch.xpack.core.security.action.role.PutRoleResponse; +import org.elasticsearch.xpack.core.security.client.SecurityClient; import org.elasticsearch.xpack.security.rest.action.SecurityBaseRestHandler; import java.io.IOException; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/rolemapping/RestDeleteRoleMappingAction.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/rolemapping/RestDeleteRoleMappingAction.java index 4f3037b0b8a..ce1f9ad0595 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/rolemapping/RestDeleteRoleMappingAction.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/rolemapping/RestDeleteRoleMappingAction.java @@ -15,8 +15,8 @@ import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.RestResponse; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.rest.action.RestBuilderListener; -import org.elasticsearch.xpack.security.action.rolemapping.DeleteRoleMappingResponse; -import org.elasticsearch.xpack.security.client.SecurityClient; +import org.elasticsearch.xpack.core.security.action.rolemapping.DeleteRoleMappingResponse; +import org.elasticsearch.xpack.core.security.client.SecurityClient; import org.elasticsearch.xpack.security.rest.action.SecurityBaseRestHandler; import java.io.IOException; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/rolemapping/RestGetRoleMappingsAction.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/rolemapping/RestGetRoleMappingsAction.java index c49e0109e7f..4d1f3d969fa 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/rolemapping/RestGetRoleMappingsAction.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/rolemapping/RestGetRoleMappingsAction.java @@ -15,9 +15,9 @@ import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.RestResponse; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.rest.action.RestBuilderListener; -import org.elasticsearch.xpack.security.action.rolemapping.GetRoleMappingsResponse; -import org.elasticsearch.xpack.security.authc.support.mapper.ExpressionRoleMapping; -import org.elasticsearch.xpack.security.client.SecurityClient; +import org.elasticsearch.xpack.core.security.action.rolemapping.GetRoleMappingsResponse; +import org.elasticsearch.xpack.core.security.authc.support.mapper.ExpressionRoleMapping; +import org.elasticsearch.xpack.core.security.client.SecurityClient; import org.elasticsearch.xpack.security.rest.action.SecurityBaseRestHandler; import java.io.IOException; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/rolemapping/RestPutRoleMappingAction.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/rolemapping/RestPutRoleMappingAction.java index dc60e6f16ff..088364eb95c 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/rolemapping/RestPutRoleMappingAction.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/rolemapping/RestPutRoleMappingAction.java @@ -15,9 +15,9 @@ import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.RestResponse; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.rest.action.RestBuilderListener; -import org.elasticsearch.xpack.security.action.rolemapping.PutRoleMappingRequestBuilder; -import org.elasticsearch.xpack.security.action.rolemapping.PutRoleMappingResponse; -import org.elasticsearch.xpack.security.client.SecurityClient; +import org.elasticsearch.xpack.core.security.action.rolemapping.PutRoleMappingRequestBuilder; +import org.elasticsearch.xpack.core.security.action.rolemapping.PutRoleMappingResponse; +import org.elasticsearch.xpack.core.security.client.SecurityClient; import org.elasticsearch.xpack.security.rest.action.SecurityBaseRestHandler; import java.io.IOException; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/saml/RestSamlAuthenticateAction.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/saml/RestSamlAuthenticateAction.java index 429cf874dff..7649f9cba1d 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/saml/RestSamlAuthenticateAction.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/saml/RestSamlAuthenticateAction.java @@ -5,10 +5,6 @@ */ package org.elasticsearch.xpack.security.rest.action.saml; -import java.io.IOException; -import java.util.Base64; -import java.util.List; - import org.elasticsearch.client.node.NodeClient; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.Strings; @@ -24,11 +20,15 @@ import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.RestResponse; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.rest.action.RestBuilderListener; -import org.elasticsearch.xpack.security.action.saml.SamlAuthenticateRequestBuilder; -import org.elasticsearch.xpack.security.action.saml.SamlAuthenticateResponse; -import org.elasticsearch.xpack.security.client.SecurityClient; +import org.elasticsearch.xpack.core.security.action.saml.SamlAuthenticateRequestBuilder; +import org.elasticsearch.xpack.core.security.action.saml.SamlAuthenticateResponse; +import org.elasticsearch.xpack.core.security.client.SecurityClient; import org.elasticsearch.xpack.security.rest.action.SecurityBaseRestHandler; +import java.io.IOException; +import java.util.Base64; +import java.util.List; + import static org.elasticsearch.rest.RestRequest.Method.POST; /** diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/saml/RestSamlInvalidateSessionAction.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/saml/RestSamlInvalidateSessionAction.java index fd77ae45aab..2ca45327a84 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/saml/RestSamlInvalidateSessionAction.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/saml/RestSamlInvalidateSessionAction.java @@ -20,9 +20,9 @@ import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.RestResponse; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.rest.action.RestBuilderListener; -import org.elasticsearch.xpack.security.action.saml.SamlInvalidateSessionAction; -import org.elasticsearch.xpack.security.action.saml.SamlInvalidateSessionRequest; -import org.elasticsearch.xpack.security.action.saml.SamlInvalidateSessionResponse; +import org.elasticsearch.xpack.core.security.action.saml.SamlInvalidateSessionAction; +import org.elasticsearch.xpack.core.security.action.saml.SamlInvalidateSessionRequest; +import org.elasticsearch.xpack.core.security.action.saml.SamlInvalidateSessionResponse; import org.elasticsearch.xpack.security.rest.action.SecurityBaseRestHandler; import static org.elasticsearch.rest.RestRequest.Method.POST; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/saml/RestSamlLogoutAction.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/saml/RestSamlLogoutAction.java index 095ffca6ee8..7a17b9202f2 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/saml/RestSamlLogoutAction.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/saml/RestSamlLogoutAction.java @@ -20,9 +20,9 @@ import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.RestResponse; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.rest.action.RestBuilderListener; -import org.elasticsearch.xpack.security.action.saml.SamlLogoutAction; -import org.elasticsearch.xpack.security.action.saml.SamlLogoutRequest; -import org.elasticsearch.xpack.security.action.saml.SamlLogoutResponse; +import org.elasticsearch.xpack.core.security.action.saml.SamlLogoutAction; +import org.elasticsearch.xpack.core.security.action.saml.SamlLogoutRequest; +import org.elasticsearch.xpack.core.security.action.saml.SamlLogoutResponse; import org.elasticsearch.xpack.security.rest.action.SecurityBaseRestHandler; import static org.elasticsearch.rest.RestRequest.Method.POST; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/saml/RestSamlPrepareAuthenticationAction.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/saml/RestSamlPrepareAuthenticationAction.java index 7e171734a3b..08bd864fc30 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/saml/RestSamlPrepareAuthenticationAction.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/saml/RestSamlPrepareAuthenticationAction.java @@ -20,9 +20,9 @@ import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.RestResponse; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.rest.action.RestBuilderListener; -import org.elasticsearch.xpack.security.action.saml.SamlPrepareAuthenticationAction; -import org.elasticsearch.xpack.security.action.saml.SamlPrepareAuthenticationRequest; -import org.elasticsearch.xpack.security.action.saml.SamlPrepareAuthenticationResponse; +import org.elasticsearch.xpack.core.security.action.saml.SamlPrepareAuthenticationAction; +import org.elasticsearch.xpack.core.security.action.saml.SamlPrepareAuthenticationRequest; +import org.elasticsearch.xpack.core.security.action.saml.SamlPrepareAuthenticationResponse; import org.elasticsearch.xpack.security.rest.action.SecurityBaseRestHandler; import static org.elasticsearch.rest.RestRequest.Method.POST; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestChangePasswordAction.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestChangePasswordAction.java index f514b5d8a7a..b47881de2db 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestChangePasswordAction.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestChangePasswordAction.java @@ -15,12 +15,12 @@ import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.RestResponse; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.rest.action.RestBuilderListener; -import org.elasticsearch.xpack.security.SecurityContext; -import org.elasticsearch.xpack.security.action.user.ChangePasswordResponse; -import org.elasticsearch.xpack.security.client.SecurityClient; -import org.elasticsearch.xpack.security.rest.RestRequestFilter; +import org.elasticsearch.xpack.core.security.SecurityContext; +import org.elasticsearch.xpack.core.security.action.user.ChangePasswordResponse; +import org.elasticsearch.xpack.core.security.client.SecurityClient; +import org.elasticsearch.xpack.core.security.rest.RestRequestFilter; +import org.elasticsearch.xpack.core.security.user.User; import org.elasticsearch.xpack.security.rest.action.SecurityBaseRestHandler; -import org.elasticsearch.xpack.security.user.User; import java.io.IOException; import java.util.Collections; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestDeleteUserAction.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestDeleteUserAction.java index caecc785883..a8590388398 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestDeleteUserAction.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestDeleteUserAction.java @@ -15,8 +15,8 @@ import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.RestResponse; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.rest.action.RestBuilderListener; -import org.elasticsearch.xpack.security.action.user.DeleteUserResponse; -import org.elasticsearch.xpack.security.client.SecurityClient; +import org.elasticsearch.xpack.core.security.action.user.DeleteUserResponse; +import org.elasticsearch.xpack.core.security.client.SecurityClient; import org.elasticsearch.xpack.security.rest.action.SecurityBaseRestHandler; import java.io.IOException; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestGetUsersAction.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestGetUsersAction.java index d71d334b9dd..1ab80954e9b 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestGetUsersAction.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestGetUsersAction.java @@ -16,10 +16,10 @@ import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.RestResponse; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.rest.action.RestBuilderListener; -import org.elasticsearch.xpack.security.action.user.GetUsersResponse; -import org.elasticsearch.xpack.security.client.SecurityClient; +import org.elasticsearch.xpack.core.security.action.user.GetUsersResponse; +import org.elasticsearch.xpack.core.security.client.SecurityClient; +import org.elasticsearch.xpack.core.security.user.User; import org.elasticsearch.xpack.security.rest.action.SecurityBaseRestHandler; -import org.elasticsearch.xpack.security.user.User; import java.io.IOException; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestHasPrivilegesAction.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestHasPrivilegesAction.java index 9c6a41a6da8..cc566c212cf 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestHasPrivilegesAction.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestHasPrivilegesAction.java @@ -16,10 +16,11 @@ import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.RestResponse; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.rest.action.RestBuilderListener; -import org.elasticsearch.xpack.security.SecurityContext; -import org.elasticsearch.xpack.security.action.user.HasPrivilegesRequestBuilder; -import org.elasticsearch.xpack.security.action.user.HasPrivilegesResponse; -import org.elasticsearch.xpack.security.client.SecurityClient; +import org.elasticsearch.xpack.core.security.SecurityContext; +import org.elasticsearch.xpack.core.security.action.user.HasPrivilegesRequestBuilder; +import org.elasticsearch.xpack.core.security.action.user.HasPrivilegesResponse; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor; +import org.elasticsearch.xpack.core.security.client.SecurityClient; import org.elasticsearch.xpack.security.rest.action.SecurityBaseRestHandler; import java.io.IOException; @@ -29,7 +30,7 @@ import static org.elasticsearch.rest.RestRequest.Method.POST; /** * REST handler that tests whether a user has the specified - * {@link org.elasticsearch.xpack.security.authz.RoleDescriptor.IndicesPrivileges privileges} + * {@link RoleDescriptor.IndicesPrivileges privileges} */ public class RestHasPrivilegesAction extends SecurityBaseRestHandler { diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestPutUserAction.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestPutUserAction.java index dddb78accc0..1b35e5684d9 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestPutUserAction.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestPutUserAction.java @@ -16,10 +16,10 @@ import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.RestResponse; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.rest.action.RestBuilderListener; -import org.elasticsearch.xpack.security.action.user.PutUserRequestBuilder; -import org.elasticsearch.xpack.security.action.user.PutUserResponse; -import org.elasticsearch.xpack.security.client.SecurityClient; -import org.elasticsearch.xpack.security.rest.RestRequestFilter; +import org.elasticsearch.xpack.core.security.action.user.PutUserRequestBuilder; +import org.elasticsearch.xpack.core.security.action.user.PutUserResponse; +import org.elasticsearch.xpack.core.security.client.SecurityClient; +import org.elasticsearch.xpack.core.security.rest.RestRequestFilter; import org.elasticsearch.xpack.security.rest.action.SecurityBaseRestHandler; import java.io.IOException; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestSetEnabledAction.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestSetEnabledAction.java index 2748125b396..8d796b9c618 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestSetEnabledAction.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestSetEnabledAction.java @@ -15,8 +15,8 @@ import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.RestResponse; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.rest.action.RestBuilderListener; -import org.elasticsearch.xpack.security.action.user.SetEnabledResponse; -import org.elasticsearch.xpack.security.client.SecurityClient; +import org.elasticsearch.xpack.core.security.action.user.SetEnabledResponse; +import org.elasticsearch.xpack.core.security.client.SecurityClient; import org.elasticsearch.xpack.security.rest.action.SecurityBaseRestHandler; import java.io.IOException; diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/support/AbstractSecurityModule.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/support/AbstractSecurityModule.java index 0024aab38cb..0dfb369bc37 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/support/AbstractSecurityModule.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/support/AbstractSecurityModule.java @@ -9,7 +9,7 @@ import org.elasticsearch.client.Client; import org.elasticsearch.client.transport.TransportClient; import org.elasticsearch.common.inject.AbstractModule; import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.xpack.XPackSettings; +import org.elasticsearch.xpack.core.XPackSettings; public abstract class AbstractSecurityModule extends AbstractModule { diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/support/IndexLifecycleManager.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/support/IndexLifecycleManager.java index 0ae07d85281..e2e278c7082 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/support/IndexLifecycleManager.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/support/IndexLifecycleManager.java @@ -34,8 +34,8 @@ import org.elasticsearch.common.component.AbstractComponent; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.index.mapper.MapperService; -import org.elasticsearch.xpack.template.TemplateUtils; -import org.elasticsearch.xpack.upgrade.IndexUpgradeCheckVersion; +import org.elasticsearch.xpack.core.template.TemplateUtils; +import org.elasticsearch.xpack.core.upgrade.IndexUpgradeCheckVersion; import java.nio.charset.StandardCharsets; import java.util.HashSet; @@ -50,10 +50,10 @@ import java.util.regex.Pattern; import java.util.stream.Collectors; import static org.elasticsearch.cluster.metadata.IndexMetaData.INDEX_FORMAT_SETTING; -import static org.elasticsearch.xpack.ClientHelper.SECURITY_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.executeAsyncWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.SECURITY_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin; import static org.elasticsearch.xpack.security.SecurityLifecycleService.SECURITY_INDEX_NAME; -import static org.elasticsearch.xpack.security.SecurityLifecycleServiceField.SECURITY_TEMPLATE_NAME; +import static org.elasticsearch.xpack.core.security.SecurityLifecycleServiceField.SECURITY_TEMPLATE_NAME; /** * Manages the lifecycle of a single index, its template, mapping and and data upgrades/migrations. diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/transport/SecurityServerTransportInterceptor.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/transport/SecurityServerTransportInterceptor.java index 2582f5a2cd8..10fcb9c2c64 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/transport/SecurityServerTransportInterceptor.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/transport/SecurityServerTransportInterceptor.java @@ -30,14 +30,14 @@ import org.elasticsearch.transport.TransportResponse; import org.elasticsearch.transport.TransportResponseHandler; import org.elasticsearch.transport.TransportService; import org.elasticsearch.transport.TransportService.ContextRestoreResponseHandler; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.security.SecurityContext; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.security.SecurityContext; +import org.elasticsearch.xpack.core.security.transport.netty4.SecurityNetty4Transport; +import org.elasticsearch.xpack.core.security.user.SystemUser; +import org.elasticsearch.xpack.core.ssl.SSLService; import org.elasticsearch.xpack.security.authc.AuthenticationService; import org.elasticsearch.xpack.security.authz.AuthorizationService; import org.elasticsearch.xpack.security.authz.AuthorizationUtils; -import org.elasticsearch.xpack.security.transport.netty4.SecurityNetty4Transport; -import org.elasticsearch.xpack.security.user.SystemUser; -import org.elasticsearch.xpack.ssl.SSLService; import java.util.Collections; import java.util.HashMap; @@ -45,7 +45,7 @@ import java.util.Map; import java.util.concurrent.Executor; import java.util.function.Function; -import static org.elasticsearch.xpack.security.SecurityField.setting; +import static org.elasticsearch.xpack.core.security.SecurityField.setting; public class SecurityServerTransportInterceptor extends AbstractComponent implements TransportInterceptor { diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/transport/ServerTransportFilter.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/transport/ServerTransportFilter.java index 4a88c778c2b..161ac3678ae 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/transport/ServerTransportFilter.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/transport/ServerTransportFilter.java @@ -25,24 +25,25 @@ import org.elasticsearch.transport.TransportChannel; import org.elasticsearch.transport.TransportRequest; import org.elasticsearch.transport.TransportService; import org.elasticsearch.transport.netty4.NettyTcpChannel; -import org.elasticsearch.xpack.security.SecurityContext; +import org.elasticsearch.xpack.core.security.SecurityContext; +import org.elasticsearch.xpack.core.security.authc.Authentication; +import org.elasticsearch.xpack.core.security.user.KibanaUser; +import org.elasticsearch.xpack.core.security.user.SystemUser; +import org.elasticsearch.xpack.core.security.user.User; import org.elasticsearch.xpack.security.action.SecurityActionMapper; -import org.elasticsearch.xpack.security.authc.Authentication; import org.elasticsearch.xpack.security.authc.AuthenticationService; import org.elasticsearch.xpack.security.authc.pki.PkiRealm; import org.elasticsearch.xpack.security.authz.AuthorizationService; import org.elasticsearch.xpack.security.authz.AuthorizationUtils; -import org.elasticsearch.xpack.security.user.KibanaUser; -import org.elasticsearch.xpack.security.user.SystemUser; -import org.elasticsearch.xpack.security.user.User; import javax.net.ssl.SSLEngine; import javax.net.ssl.SSLPeerUnverifiedException; + import java.io.IOException; import java.security.cert.Certificate; import java.security.cert.X509Certificate; -import static org.elasticsearch.xpack.security.support.Exceptions.authenticationError; +import static org.elasticsearch.xpack.core.security.support.Exceptions.authenticationError; /** * This interface allows to intercept messages as they come in and execute logic diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/transport/filter/IPFilter.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/transport/filter/IPFilter.java index 07d72353d8c..3de06dce666 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/transport/filter/IPFilter.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/transport/filter/IPFilter.java @@ -32,7 +32,7 @@ import java.util.function.Function; import java.util.stream.Collectors; import static java.util.Collections.unmodifiableMap; -import static org.elasticsearch.xpack.security.SecurityField.setting; +import static org.elasticsearch.xpack.core.security.SecurityField.setting; public class IPFilter { diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4HttpServerTransport.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4HttpServerTransport.java index 50c0b716a66..5b4543ccaf2 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4HttpServerTransport.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4HttpServerTransport.java @@ -17,17 +17,17 @@ import org.elasticsearch.common.xcontent.NamedXContentRegistry; import org.elasticsearch.http.netty4.Netty4HttpServerTransport; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.netty4.Netty4Utils; -import org.elasticsearch.xpack.ssl.SSLConfiguration; -import org.elasticsearch.xpack.ssl.SSLService; +import org.elasticsearch.xpack.core.ssl.SSLConfiguration; +import org.elasticsearch.xpack.core.ssl.SSLService; import org.elasticsearch.xpack.security.transport.filter.IPFilter; import javax.net.ssl.SSLEngine; import static org.elasticsearch.http.HttpTransportSettings.SETTING_HTTP_COMPRESSION; -import static org.elasticsearch.xpack.security.transport.SSLExceptionHelper.isCloseDuringHandshakeException; -import static org.elasticsearch.xpack.security.transport.SSLExceptionHelper.isNotSslRecordException; -import static org.elasticsearch.xpack.XPackSettings.HTTP_SSL_ENABLED; -import static org.elasticsearch.xpack.security.transport.SSLExceptionHelper.isReceivedCertificateUnknownException; +import static org.elasticsearch.xpack.core.XPackSettings.HTTP_SSL_ENABLED; +import static org.elasticsearch.xpack.core.security.transport.SSLExceptionHelper.isCloseDuringHandshakeException; +import static org.elasticsearch.xpack.core.security.transport.SSLExceptionHelper.isNotSslRecordException; +import static org.elasticsearch.xpack.core.security.transport.SSLExceptionHelper.isReceivedCertificateUnknownException; public class SecurityNetty4HttpServerTransport extends Netty4HttpServerTransport { diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4ServerTransport.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4ServerTransport.java index 858ccc0e954..e0794d037e3 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4ServerTransport.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4ServerTransport.java @@ -14,9 +14,10 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.BigArrays; import org.elasticsearch.indices.breaker.CircuitBreakerService; import org.elasticsearch.threadpool.ThreadPool; +import org.elasticsearch.xpack.core.security.transport.netty4.SecurityNetty4Transport; +import org.elasticsearch.xpack.core.ssl.SSLConfiguration; +import org.elasticsearch.xpack.core.ssl.SSLService; import org.elasticsearch.xpack.security.transport.filter.IPFilter; -import org.elasticsearch.xpack.ssl.SSLConfiguration; -import org.elasticsearch.xpack.ssl.SSLService; public class SecurityNetty4ServerTransport extends SecurityNetty4Transport { diff --git a/plugin/security/src/main/java/org/elasticsearch/xpack/security/transport/nio/SecurityNioTransport.java b/plugin/security/src/main/java/org/elasticsearch/xpack/security/transport/nio/SecurityNioTransport.java index dfa167770c4..c3a139ba084 100644 --- a/plugin/security/src/main/java/org/elasticsearch/xpack/security/transport/nio/SecurityNioTransport.java +++ b/plugin/security/src/main/java/org/elasticsearch/xpack/security/transport/nio/SecurityNioTransport.java @@ -13,23 +13,24 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.BigArrays; import org.elasticsearch.common.util.PageCacheRecycler; import org.elasticsearch.indices.breaker.CircuitBreakerService; -import org.elasticsearch.nio.SocketChannelContext; import org.elasticsearch.nio.AcceptingSelector; import org.elasticsearch.nio.InboundChannelBuffer; import org.elasticsearch.nio.NioSocketChannel; import org.elasticsearch.nio.ServerChannelContext; +import org.elasticsearch.nio.SocketChannelContext; import org.elasticsearch.nio.SocketSelector; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TcpTransport; import org.elasticsearch.transport.nio.NioTransport; import org.elasticsearch.transport.nio.TcpNioServerSocketChannel; import org.elasticsearch.transport.nio.TcpNioSocketChannel; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.security.transport.netty4.SecurityNetty4Transport; -import org.elasticsearch.xpack.ssl.SSLConfiguration; -import org.elasticsearch.xpack.ssl.SSLService; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.security.transport.netty4.SecurityNetty4Transport; +import org.elasticsearch.xpack.core.ssl.SSLConfiguration; +import org.elasticsearch.xpack.core.ssl.SSLService; import javax.net.ssl.SSLEngine; + import java.io.IOException; import java.nio.ByteBuffer; import java.nio.channels.ServerSocketChannel; @@ -40,7 +41,7 @@ import java.util.Map; import java.util.function.BiConsumer; import java.util.function.Supplier; -import static org.elasticsearch.xpack.security.SecurityField.setting; +import static org.elasticsearch.xpack.core.security.SecurityField.setting; /** * This transport provides a transport based on nio that is secured by SSL/TLS. SSL/TLS is a communications diff --git a/plugin/security/src/test/java/org/elasticsearch/integration/AbstractPrivilegeTestCase.java b/plugin/security/src/test/java/org/elasticsearch/integration/AbstractPrivilegeTestCase.java index ca1e17d0d81..1d26cce37db 100644 --- a/plugin/security/src/test/java/org/elasticsearch/integration/AbstractPrivilegeTestCase.java +++ b/plugin/security/src/test/java/org/elasticsearch/integration/AbstractPrivilegeTestCase.java @@ -15,8 +15,8 @@ import org.elasticsearch.client.Response; import org.elasticsearch.client.ResponseException; import org.elasticsearch.common.settings.SecureString; import org.elasticsearch.test.SecurityIntegTestCase; -import org.elasticsearch.xpack.security.authc.support.Hasher; -import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken; +import org.elasticsearch.xpack.core.security.authc.support.Hasher; +import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; import java.io.IOException; import java.util.HashMap; diff --git a/plugin/security/src/test/java/org/elasticsearch/integration/BulkUpdateTests.java b/plugin/security/src/test/java/org/elasticsearch/integration/BulkUpdateTests.java index 6fe40554794..ce7e58972b8 100644 --- a/plugin/security/src/test/java/org/elasticsearch/integration/BulkUpdateTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/integration/BulkUpdateTests.java @@ -21,8 +21,8 @@ import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.test.SecurityIntegTestCase; import org.elasticsearch.test.SecuritySettingsSource; import org.elasticsearch.test.SecuritySettingsSourceField; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; import java.io.IOException; import java.util.Collections; diff --git a/plugin/security/src/test/java/org/elasticsearch/integration/ClearRealmsCacheTests.java b/plugin/security/src/test/java/org/elasticsearch/integration/ClearRealmsCacheTests.java index 85e972170a0..fcab6f0d732 100644 --- a/plugin/security/src/test/java/org/elasticsearch/integration/ClearRealmsCacheTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/integration/ClearRealmsCacheTests.java @@ -17,15 +17,15 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.test.SecurityIntegTestCase; import org.elasticsearch.test.SecuritySettingsSource; import org.elasticsearch.test.SecuritySettingsSourceField; -import org.elasticsearch.xpack.security.action.realm.ClearRealmCacheRequest; -import org.elasticsearch.xpack.security.action.realm.ClearRealmCacheResponse; -import org.elasticsearch.xpack.security.authc.AuthenticationResult; -import org.elasticsearch.xpack.security.authc.Realm; +import org.elasticsearch.xpack.core.security.action.realm.ClearRealmCacheRequest; +import org.elasticsearch.xpack.core.security.action.realm.ClearRealmCacheResponse; +import org.elasticsearch.xpack.core.security.authc.AuthenticationResult; +import org.elasticsearch.xpack.core.security.authc.Realm; +import org.elasticsearch.xpack.core.security.authc.support.Hasher; +import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; +import org.elasticsearch.xpack.core.security.client.SecurityClient; +import org.elasticsearch.xpack.core.security.user.User; import org.elasticsearch.xpack.security.authc.Realms; -import org.elasticsearch.xpack.security.authc.support.Hasher; -import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken; -import org.elasticsearch.xpack.security.client.SecurityClient; -import org.elasticsearch.xpack.security.user.User; import org.junit.BeforeClass; import java.util.ArrayList; diff --git a/plugin/security/src/test/java/org/elasticsearch/integration/ClearRolesCacheTests.java b/plugin/security/src/test/java/org/elasticsearch/integration/ClearRolesCacheTests.java index 099c4368740..eadbe3738b6 100644 --- a/plugin/security/src/test/java/org/elasticsearch/integration/ClearRolesCacheTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/integration/ClearRolesCacheTests.java @@ -10,13 +10,13 @@ import org.elasticsearch.client.Client; import org.elasticsearch.common.network.NetworkModule; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.test.NativeRealmIntegTestCase; +import org.elasticsearch.xpack.core.security.action.role.DeleteRoleResponse; +import org.elasticsearch.xpack.core.security.action.role.GetRolesResponse; +import org.elasticsearch.xpack.core.security.action.role.PutRoleResponse; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor; +import org.elasticsearch.xpack.core.security.client.SecurityClient; import org.elasticsearch.xpack.security.SecurityLifecycleService; -import org.elasticsearch.xpack.security.action.role.DeleteRoleResponse; -import org.elasticsearch.xpack.security.action.role.GetRolesResponse; -import org.elasticsearch.xpack.security.action.role.PutRoleResponse; -import org.elasticsearch.xpack.security.authz.RoleDescriptor; import org.elasticsearch.xpack.security.authz.store.NativeRolesStore; -import org.elasticsearch.xpack.security.client.SecurityClient; import org.junit.Before; import org.junit.BeforeClass; diff --git a/plugin/security/src/test/java/org/elasticsearch/integration/DateMathExpressionIntegTests.java b/plugin/security/src/test/java/org/elasticsearch/integration/DateMathExpressionIntegTests.java index 5232cf8e848..016ccab87eb 100644 --- a/plugin/security/src/test/java/org/elasticsearch/integration/DateMathExpressionIntegTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/integration/DateMathExpressionIntegTests.java @@ -21,13 +21,13 @@ import org.elasticsearch.common.settings.SecureString; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.test.SecurityIntegTestCase; -import org.elasticsearch.xpack.security.authc.support.Hasher; +import org.elasticsearch.xpack.core.security.authc.support.Hasher; import java.util.Collections; import static org.elasticsearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE; import static org.elasticsearch.action.support.WriteRequest.RefreshPolicy.NONE; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.is; diff --git a/plugin/security/src/test/java/org/elasticsearch/integration/DocumentAndFieldLevelSecurityTests.java b/plugin/security/src/test/java/org/elasticsearch/integration/DocumentAndFieldLevelSecurityTests.java index 9098fe673a7..aa6f409ad2a 100644 --- a/plugin/security/src/test/java/org/elasticsearch/integration/DocumentAndFieldLevelSecurityTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/integration/DocumentAndFieldLevelSecurityTests.java @@ -21,8 +21,8 @@ import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.indices.IndicesModule; import org.elasticsearch.search.sort.SortOrder; import org.elasticsearch.test.SecurityIntegTestCase; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.security.authc.support.Hasher; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.security.authc.support.Hasher; import java.util.Collections; import java.util.HashMap; @@ -33,8 +33,8 @@ import static org.elasticsearch.action.support.WriteRequest.RefreshPolicy.IMMEDI import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchHits; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.BASIC_AUTH_HEADER; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.BASIC_AUTH_HEADER; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; import static org.hamcrest.Matchers.equalTo; public class DocumentAndFieldLevelSecurityTests extends SecurityIntegTestCase { diff --git a/plugin/security/src/test/java/org/elasticsearch/integration/DocumentLevelSecurityRandomTests.java b/plugin/security/src/test/java/org/elasticsearch/integration/DocumentLevelSecurityRandomTests.java index cd6087e03a2..f4d1f429d8c 100644 --- a/plugin/security/src/test/java/org/elasticsearch/integration/DocumentLevelSecurityRandomTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/integration/DocumentLevelSecurityRandomTests.java @@ -11,16 +11,16 @@ import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.common.settings.SecureString; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.security.authc.support.Hasher; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.security.authc.support.Hasher; import org.elasticsearch.test.SecurityIntegTestCase; import java.util.ArrayList; import java.util.Collections; import java.util.List; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.BASIC_AUTH_HEADER; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.BASIC_AUTH_HEADER; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; diff --git a/plugin/security/src/test/java/org/elasticsearch/integration/DocumentLevelSecurityTests.java b/plugin/security/src/test/java/org/elasticsearch/integration/DocumentLevelSecurityTests.java index 40b1f333f3e..e958a39d56e 100644 --- a/plugin/security/src/test/java/org/elasticsearch/integration/DocumentLevelSecurityTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/integration/DocumentLevelSecurityTests.java @@ -53,10 +53,9 @@ import org.elasticsearch.search.suggest.term.TermSuggestion; import org.elasticsearch.search.suggest.term.TermSuggestionBuilder; import org.elasticsearch.test.InternalSettingsPlugin; import org.elasticsearch.test.SecurityIntegTestCase; -import org.elasticsearch.xpack.XPackSettings; +import org.elasticsearch.xpack.core.XPackSettings; import org.elasticsearch.xpack.security.LocalStateSecurity; -import org.elasticsearch.xpack.security.Security; -import org.elasticsearch.xpack.security.authc.support.Hasher; +import org.elasticsearch.xpack.core.security.authc.support.Hasher; import java.util.Arrays; import java.util.Collection; @@ -74,8 +73,8 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcke import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchHits; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.BASIC_AUTH_HEADER; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.BASIC_AUTH_HEADER; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.instanceOf; import static org.hamcrest.Matchers.is; diff --git a/plugin/security/src/test/java/org/elasticsearch/integration/FieldLevelSecurityRandomTests.java b/plugin/security/src/test/java/org/elasticsearch/integration/FieldLevelSecurityRandomTests.java index 4612696416f..2a8e9e7a0f8 100644 --- a/plugin/security/src/test/java/org/elasticsearch/integration/FieldLevelSecurityRandomTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/integration/FieldLevelSecurityRandomTests.java @@ -11,8 +11,8 @@ import org.elasticsearch.common.settings.SecureString; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.search.sort.SortOrder; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.security.authc.support.Hasher; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.security.authc.support.Hasher; import org.elasticsearch.test.SecurityIntegTestCase; import java.util.ArrayList; @@ -25,8 +25,8 @@ import java.util.Set; import static org.elasticsearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE; import static org.elasticsearch.index.query.QueryBuilders.matchQuery; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.BASIC_AUTH_HEADER; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.BASIC_AUTH_HEADER; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; import static org.hamcrest.Matchers.equalTo; diff --git a/plugin/security/src/test/java/org/elasticsearch/integration/FieldLevelSecurityTests.java b/plugin/security/src/test/java/org/elasticsearch/integration/FieldLevelSecurityTests.java index 4a26f50b158..b13c0dca8f3 100644 --- a/plugin/security/src/test/java/org/elasticsearch/integration/FieldLevelSecurityTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/integration/FieldLevelSecurityTests.java @@ -38,10 +38,9 @@ import org.elasticsearch.search.sort.SortOrder; import org.elasticsearch.test.ESIntegTestCase; import org.elasticsearch.test.InternalSettingsPlugin; import org.elasticsearch.test.SecurityIntegTestCase; -import org.elasticsearch.xpack.XPackSettings; +import org.elasticsearch.xpack.core.XPackSettings; import org.elasticsearch.xpack.security.LocalStateSecurity; -import org.elasticsearch.xpack.security.Security; -import org.elasticsearch.xpack.security.authc.support.Hasher; +import org.elasticsearch.xpack.core.security.authc.support.Hasher; import java.util.Arrays; import java.util.Collection; @@ -58,8 +57,8 @@ import static org.elasticsearch.join.query.JoinQueryBuilders.hasChildQuery; import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.BASIC_AUTH_HEADER; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.BASIC_AUTH_HEADER; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.instanceOf; import static org.hamcrest.Matchers.is; diff --git a/plugin/security/src/test/java/org/elasticsearch/integration/IndexPrivilegeTests.java b/plugin/security/src/test/java/org/elasticsearch/integration/IndexPrivilegeTests.java index ce4f037a9f4..a0152d20233 100644 --- a/plugin/security/src/test/java/org/elasticsearch/integration/IndexPrivilegeTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/integration/IndexPrivilegeTests.java @@ -13,7 +13,7 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.plugins.Plugin; import org.elasticsearch.test.ESIntegTestCase; import org.elasticsearch.transport.Netty4Plugin; -import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken; +import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; import org.junit.Before; import java.util.ArrayList; diff --git a/plugin/security/src/test/java/org/elasticsearch/integration/IndicesPermissionsWithAliasesWildcardsAndRegexsTests.java b/plugin/security/src/test/java/org/elasticsearch/integration/IndicesPermissionsWithAliasesWildcardsAndRegexsTests.java index 9216ae5e20d..9982b42b859 100644 --- a/plugin/security/src/test/java/org/elasticsearch/integration/IndicesPermissionsWithAliasesWildcardsAndRegexsTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/integration/IndicesPermissionsWithAliasesWildcardsAndRegexsTests.java @@ -9,15 +9,15 @@ import org.elasticsearch.action.admin.indices.alias.Alias; import org.elasticsearch.action.get.GetResponse; import org.elasticsearch.common.settings.SecureString; import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.security.authc.support.Hasher; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.security.authc.support.Hasher; import org.elasticsearch.test.SecurityIntegTestCase; import java.util.Collections; import static org.elasticsearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.BASIC_AUTH_HEADER; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.BASIC_AUTH_HEADER; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; diff --git a/plugin/security/src/test/java/org/elasticsearch/integration/KibanaUserRoleIntegTests.java b/plugin/security/src/test/java/org/elasticsearch/integration/KibanaUserRoleIntegTests.java index 6a42330a19d..a3174a02e99 100644 --- a/plugin/security/src/test/java/org/elasticsearch/integration/KibanaUserRoleIntegTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/integration/KibanaUserRoleIntegTests.java @@ -21,8 +21,8 @@ import org.elasticsearch.common.collect.ImmutableOpenMap; import org.elasticsearch.common.settings.SecureString; import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.test.SecurityIntegTestCase; -import org.elasticsearch.xpack.security.authc.support.Hasher; -import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken; +import org.elasticsearch.xpack.core.security.authc.support.Hasher; +import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; import java.util.Locale; import java.util.Map; diff --git a/plugin/security/src/test/java/org/elasticsearch/integration/MultipleIndicesPermissionsTests.java b/plugin/security/src/test/java/org/elasticsearch/integration/MultipleIndicesPermissionsTests.java index 42f690e0dda..a8750d5b802 100644 --- a/plugin/security/src/test/java/org/elasticsearch/integration/MultipleIndicesPermissionsTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/integration/MultipleIndicesPermissionsTests.java @@ -13,7 +13,7 @@ import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.client.Client; import org.elasticsearch.common.settings.SecureString; import org.elasticsearch.rest.RestStatus; -import org.elasticsearch.xpack.security.authc.support.Hasher; +import org.elasticsearch.xpack.core.security.authc.support.Hasher; import org.elasticsearch.test.SecurityIntegTestCase; import org.elasticsearch.test.SecuritySettingsSource; @@ -21,8 +21,8 @@ import java.util.Collections; import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.BASIC_AUTH_HEADER; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.BASIC_AUTH_HEADER; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; import static org.hamcrest.Matchers.is; diff --git a/plugin/security/src/test/java/org/elasticsearch/integration/PermissionPrecedenceTests.java b/plugin/security/src/test/java/org/elasticsearch/integration/PermissionPrecedenceTests.java index 1ecb1c89c41..41b5787cb26 100644 --- a/plugin/security/src/test/java/org/elasticsearch/integration/PermissionPrecedenceTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/integration/PermissionPrecedenceTests.java @@ -13,8 +13,8 @@ import org.elasticsearch.client.Client; import org.elasticsearch.cluster.metadata.IndexTemplateMetaData; import org.elasticsearch.common.settings.SecureString; import org.elasticsearch.test.SecurityIntegTestCase; -import org.elasticsearch.xpack.security.authc.support.Hasher; -import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken; +import org.elasticsearch.xpack.core.security.authc.support.Hasher; +import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; import java.util.Collections; import java.util.List; @@ -22,7 +22,7 @@ import java.util.Map; import static org.elasticsearch.test.SecurityTestsUtils.assertThrowsAuthorizationException; import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; import static org.hamcrest.Matchers.hasSize; /** diff --git a/plugin/security/src/test/java/org/elasticsearch/integration/SecurityCachePermissionTests.java b/plugin/security/src/test/java/org/elasticsearch/integration/SecurityCachePermissionTests.java index 9794e757700..8a570aac286 100644 --- a/plugin/security/src/test/java/org/elasticsearch/integration/SecurityCachePermissionTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/integration/SecurityCachePermissionTests.java @@ -15,7 +15,7 @@ import org.elasticsearch.test.SecuritySettingsSourceField; import org.junit.Before; import static java.util.Collections.singletonMap; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.is; diff --git a/plugin/security/src/test/java/org/elasticsearch/integration/SecurityClearScrollTests.java b/plugin/security/src/test/java/org/elasticsearch/integration/SecurityClearScrollTests.java index ce6cd130e2d..2ec899dbafe 100644 --- a/plugin/security/src/test/java/org/elasticsearch/integration/SecurityClearScrollTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/integration/SecurityClearScrollTests.java @@ -14,9 +14,8 @@ import org.elasticsearch.action.search.MultiSearchResponse; import org.elasticsearch.action.search.SearchPhaseExecutionException; import org.elasticsearch.common.settings.SecureString; import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.xpack.security.Security; -import org.elasticsearch.xpack.security.SecurityField; -import org.elasticsearch.xpack.security.authc.support.Hasher; +import org.elasticsearch.xpack.core.security.SecurityField; +import org.elasticsearch.xpack.core.security.authc.support.Hasher; import org.elasticsearch.test.SecurityIntegTestCase; import org.junit.After; import org.junit.Before; @@ -27,8 +26,8 @@ import java.util.List; import java.util.Map; import static org.elasticsearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.BASIC_AUTH_HEADER; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.BASIC_AUTH_HEADER; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertThrows; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.is; diff --git a/plugin/security/src/test/java/org/elasticsearch/integration/ldap/AbstractAdLdapRealmTestCase.java b/plugin/security/src/test/java/org/elasticsearch/integration/ldap/AbstractAdLdapRealmTestCase.java index e84d82525a3..bb68547fee9 100644 --- a/plugin/security/src/test/java/org/elasticsearch/integration/ldap/AbstractAdLdapRealmTestCase.java +++ b/plugin/security/src/test/java/org/elasticsearch/integration/ldap/AbstractAdLdapRealmTestCase.java @@ -22,12 +22,12 @@ import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.SecurityIntegTestCase; import org.elasticsearch.test.SecuritySettingsSource; -import org.elasticsearch.xpack.security.SecurityLifecycleServiceField; -import org.elasticsearch.xpack.security.action.rolemapping.PutRoleMappingRequestBuilder; -import org.elasticsearch.xpack.security.action.rolemapping.PutRoleMappingResponse; -import org.elasticsearch.xpack.security.authc.ldap.LdapRealmSettings; -import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken; -import org.elasticsearch.xpack.security.client.SecurityClient; +import org.elasticsearch.xpack.core.security.SecurityLifecycleServiceField; +import org.elasticsearch.xpack.core.security.action.rolemapping.PutRoleMappingRequestBuilder; +import org.elasticsearch.xpack.core.security.action.rolemapping.PutRoleMappingResponse; +import org.elasticsearch.xpack.core.security.authc.ldap.LdapRealmSettings; +import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; +import org.elasticsearch.xpack.core.security.client.SecurityClient; import org.junit.After; import org.junit.AfterClass; import org.junit.Before; @@ -50,9 +50,9 @@ import java.util.function.Supplier; import java.util.stream.Collectors; import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.xpack.security.authc.ldap.support.LdapSearchScope.ONE_LEVEL; -import static org.elasticsearch.xpack.security.authc.ldap.support.LdapSearchScope.SUB_TREE; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.BASIC_AUTH_HEADER; +import static org.elasticsearch.xpack.core.security.authc.ldap.support.LdapSearchScope.ONE_LEVEL; +import static org.elasticsearch.xpack.core.security.authc.ldap.support.LdapSearchScope.SUB_TREE; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.BASIC_AUTH_HEADER; import static org.elasticsearch.xpack.security.test.SecurityTestUtils.writeFile; import static org.hamcrest.Matchers.equalTo; diff --git a/plugin/security/src/test/java/org/elasticsearch/integration/ldap/ActiveDirectoryRunAsTests.java b/plugin/security/src/test/java/org/elasticsearch/integration/ldap/ActiveDirectoryRunAsTests.java index 93bf96498f3..cc5908ae106 100644 --- a/plugin/security/src/test/java/org/elasticsearch/integration/ldap/ActiveDirectoryRunAsTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/integration/ldap/ActiveDirectoryRunAsTests.java @@ -5,25 +5,25 @@ */ package org.elasticsearch.integration.ldap; -import java.util.Map; -import java.util.concurrent.TimeUnit; - import org.elasticsearch.action.ActionFuture; import org.elasticsearch.client.Client; import org.elasticsearch.common.collect.MapBuilder; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.test.junit.annotations.Network; -import org.elasticsearch.xpack.security.action.user.AuthenticateAction; -import org.elasticsearch.xpack.security.action.user.AuthenticateRequest; -import org.elasticsearch.xpack.security.action.user.AuthenticateResponse; -import org.elasticsearch.xpack.security.authc.AuthenticationServiceField; +import org.elasticsearch.xpack.core.security.action.user.AuthenticateAction; +import org.elasticsearch.xpack.core.security.action.user.AuthenticateRequest; +import org.elasticsearch.xpack.core.security.action.user.AuthenticateResponse; +import org.elasticsearch.xpack.core.security.authc.AuthenticationServiceField; +import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; +import org.elasticsearch.xpack.core.security.user.ElasticUser; import org.elasticsearch.xpack.security.authc.ldap.ActiveDirectorySessionFactoryTests; -import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken; -import org.elasticsearch.xpack.security.user.ElasticUser; import org.hamcrest.Matchers; import org.junit.BeforeClass; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.BASIC_AUTH_HEADER; +import java.util.Map; +import java.util.concurrent.TimeUnit; + +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.BASIC_AUTH_HEADER; /** * This tests that "run-as" works on LDAP/AD realms diff --git a/plugin/security/src/test/java/org/elasticsearch/license/LicensingTests.java b/plugin/security/src/test/java/org/elasticsearch/license/LicensingTests.java index c9c6893ae39..351cf91bf94 100644 --- a/plugin/security/src/test/java/org/elasticsearch/license/LicensingTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/license/LicensingTests.java @@ -32,13 +32,13 @@ import org.elasticsearch.test.SecuritySettingsSourceField; import org.elasticsearch.test.junit.annotations.TestLogging; import org.elasticsearch.transport.Netty4Plugin; import org.elasticsearch.transport.Transport; -import org.elasticsearch.xpack.TestXPackTransportClient; -import org.elasticsearch.xpack.XPackField; +import org.elasticsearch.xpack.core.TestXPackTransportClient; +import org.elasticsearch.xpack.core.XPackField; +import org.elasticsearch.xpack.core.security.SecurityField; +import org.elasticsearch.xpack.core.security.action.user.GetUsersResponse; +import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; +import org.elasticsearch.xpack.core.security.client.SecurityClient; import org.elasticsearch.xpack.security.LocalStateSecurity; -import org.elasticsearch.xpack.security.SecurityField; -import org.elasticsearch.xpack.security.action.user.GetUsersResponse; -import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken; -import org.elasticsearch.xpack.security.client.SecurityClient; import org.junit.After; import org.junit.Before; diff --git a/plugin/security/src/test/java/org/elasticsearch/license/XPackLicenseStateTests.java b/plugin/security/src/test/java/org/elasticsearch/license/XPackLicenseStateTests.java index ec3c5bbdb70..b1a7ec06323 100644 --- a/plugin/security/src/test/java/org/elasticsearch/license/XPackLicenseStateTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/license/XPackLicenseStateTests.java @@ -7,7 +7,7 @@ package org.elasticsearch.license; import org.elasticsearch.license.License.OperationMode; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.XPackField; +import org.elasticsearch.xpack.core.XPackField; import org.hamcrest.Matchers; import java.util.Arrays; diff --git a/plugin/security/src/test/java/org/elasticsearch/test/NativeRealmIntegTestCase.java b/plugin/security/src/test/java/org/elasticsearch/test/NativeRealmIntegTestCase.java index ff9bc87c955..cb5d9dbb8f3 100644 --- a/plugin/security/src/test/java/org/elasticsearch/test/NativeRealmIntegTestCase.java +++ b/plugin/security/src/test/java/org/elasticsearch/test/NativeRealmIntegTestCase.java @@ -16,12 +16,12 @@ import org.elasticsearch.common.network.NetworkModule; import org.elasticsearch.common.settings.SecureString; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.set.Sets; -import org.elasticsearch.xpack.security.SecurityLifecycleServiceField; -import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken; -import org.elasticsearch.xpack.security.client.SecurityClient; -import org.elasticsearch.xpack.security.user.ElasticUser; -import org.elasticsearch.xpack.security.user.KibanaUser; -import org.elasticsearch.xpack.security.user.LogstashSystemUser; +import org.elasticsearch.xpack.core.security.SecurityLifecycleServiceField; +import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; +import org.elasticsearch.xpack.core.security.client.SecurityClient; +import org.elasticsearch.xpack.core.security.user.ElasticUser; +import org.elasticsearch.xpack.core.security.user.KibanaUser; +import org.elasticsearch.xpack.core.security.user.LogstashSystemUser; import org.junit.After; import org.junit.Before; diff --git a/plugin/security/src/test/java/org/elasticsearch/test/SecurityIntegTestCase.java b/plugin/security/src/test/java/org/elasticsearch/test/SecurityIntegTestCase.java index 4c59cd7b2c8..82dd2320c03 100644 --- a/plugin/security/src/test/java/org/elasticsearch/test/SecurityIntegTestCase.java +++ b/plugin/security/src/test/java/org/elasticsearch/test/SecurityIntegTestCase.java @@ -5,7 +5,6 @@ */ package org.elasticsearch.test; -import org.bouncycastle.operator.OperatorCreationException; import org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse; import org.elasticsearch.action.admin.cluster.node.info.NodeInfo; import org.elasticsearch.action.admin.cluster.node.info.NodesInfoResponse; @@ -21,7 +20,6 @@ import org.elasticsearch.cluster.health.ClusterHealthStatus; import org.elasticsearch.cluster.metadata.AliasOrIndex; import org.elasticsearch.cluster.metadata.MetaData; import org.elasticsearch.cluster.routing.IndexRoutingTable; -import org.elasticsearch.common.inject.Module; import org.elasticsearch.common.network.NetworkAddress; import org.elasticsearch.common.settings.MockSecureSettings; import org.elasticsearch.common.settings.SecureString; @@ -33,29 +31,20 @@ import org.elasticsearch.common.xcontent.json.JsonXContent; import org.elasticsearch.gateway.GatewayService; import org.elasticsearch.index.Index; import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.xpack.XPackClient; -import org.elasticsearch.xpack.XPackPlugin; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.ml.MachineLearningField; +import org.elasticsearch.xpack.core.XPackClient; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.security.SecurityField; +import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; +import org.elasticsearch.xpack.core.security.client.SecurityClient; import org.elasticsearch.xpack.security.LocalStateSecurity; -import org.elasticsearch.xpack.security.Security; -import org.elasticsearch.xpack.security.SecurityField; -import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken; -import org.elasticsearch.xpack.security.client.SecurityClient; -import org.elasticsearch.xpack.ssl.SSLService; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Rule; import org.junit.rules.ExternalResource; -import javax.security.auth.DestroyFailedException; -import java.io.IOException; import java.net.InetSocketAddress; import java.nio.file.Path; -import java.security.GeneralSecurityException; -import java.time.Clock; -import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; @@ -67,9 +56,9 @@ import java.util.stream.Collectors; import static org.elasticsearch.test.SecuritySettingsSourceField.TEST_PASSWORD_SECURE_STRING; import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoTimeout; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; import static org.elasticsearch.xpack.security.SecurityLifecycleService.SECURITY_INDEX_NAME; import static org.elasticsearch.xpack.security.SecurityLifecycleService.securityIndexMappingSufficientToRead; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; import static org.hamcrest.Matchers.is; import static org.hamcrest.core.IsCollectionContaining.hasItem; diff --git a/plugin/security/src/test/java/org/elasticsearch/test/SecuritySettingsSource.java b/plugin/security/src/test/java/org/elasticsearch/test/SecuritySettingsSource.java index 6c60d5c15ae..d60d9f3a64e 100644 --- a/plugin/security/src/test/java/org/elasticsearch/test/SecuritySettingsSource.java +++ b/plugin/security/src/test/java/org/elasticsearch/test/SecuritySettingsSource.java @@ -20,15 +20,15 @@ import org.elasticsearch.plugins.Plugin; import org.elasticsearch.test.ESIntegTestCase.Scope; import org.elasticsearch.test.discovery.ClusterDiscoveryConfiguration; import org.elasticsearch.transport.Netty4Plugin; -import org.elasticsearch.xpack.XPackClientPlugin; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.XPackField; +import org.elasticsearch.xpack.core.XPackClientPlugin; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.XPackField; import org.elasticsearch.xpack.security.LocalStateSecurity; -import org.elasticsearch.xpack.security.SecurityField; +import org.elasticsearch.xpack.core.security.SecurityField; import org.elasticsearch.xpack.security.audit.logfile.LoggingAuditTrail; -import org.elasticsearch.xpack.security.authc.esnative.NativeRealmSettings; -import org.elasticsearch.xpack.security.authc.file.FileRealmSettings; -import org.elasticsearch.xpack.security.authc.support.Hasher; +import org.elasticsearch.xpack.core.security.authc.esnative.NativeRealmSettings; +import org.elasticsearch.xpack.core.security.authc.file.FileRealmSettings; +import org.elasticsearch.xpack.core.security.authc.support.Hasher; import org.elasticsearch.xpack.security.test.SecurityTestUtils; import java.net.URISyntaxException; @@ -43,7 +43,7 @@ import java.util.List; import java.util.function.Consumer; import static com.carrotsearch.randomizedtesting.RandomizedTest.randomBoolean; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; import static org.elasticsearch.xpack.security.test.SecurityTestUtils.writeFile; /** diff --git a/plugin/security/src/test/java/org/elasticsearch/test/SecurityTestsUtils.java b/plugin/security/src/test/java/org/elasticsearch/test/SecurityTestsUtils.java index d110fe90cce..36ec016170a 100644 --- a/plugin/security/src/test/java/org/elasticsearch/test/SecurityTestsUtils.java +++ b/plugin/security/src/test/java/org/elasticsearch/test/SecurityTestsUtils.java @@ -12,7 +12,7 @@ import org.elasticsearch.rest.RestStatus; import org.hamcrest.Matcher; import static org.apache.lucene.util.LuceneTestCase.expectThrows; -import static org.elasticsearch.xpack.security.test.SecurityAssertions.assertContainsWWWAuthenticateHeader; +import static org.elasticsearch.xpack.core.security.test.SecurityAssertions.assertContainsWWWAuthenticateHeader; import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.CoreMatchers.either; import static org.hamcrest.CoreMatchers.instanceOf; diff --git a/plugin/security/src/test/java/org/elasticsearch/test/SettingsFilterTests.java b/plugin/security/src/test/java/org/elasticsearch/test/SettingsFilterTests.java index 87c43a67ed3..504083f3618 100644 --- a/plugin/security/src/test/java/org/elasticsearch/test/SettingsFilterTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/test/SettingsFilterTests.java @@ -14,8 +14,8 @@ import org.elasticsearch.common.settings.Setting; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.settings.SettingsFilter; import org.elasticsearch.common.settings.SettingsModule; -import org.elasticsearch.xpack.XPackPlugin; -import org.elasticsearch.xpack.XPackSettings; +import org.elasticsearch.xpack.core.XPackPlugin; +import org.elasticsearch.xpack.core.XPackSettings; import org.elasticsearch.xpack.security.Security; import org.hamcrest.Matcher; diff --git a/plugin/security/src/test/java/org/elasticsearch/transport/SecurityServerTransportServiceTests.java b/plugin/security/src/test/java/org/elasticsearch/transport/SecurityServerTransportServiceTests.java index 676ae324552..332fd84c92f 100644 --- a/plugin/security/src/test/java/org/elasticsearch/transport/SecurityServerTransportServiceTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/transport/SecurityServerTransportServiceTests.java @@ -12,12 +12,9 @@ import java.util.stream.Collectors; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.plugins.Plugin; import org.elasticsearch.test.SecurityIntegTestCase; -import org.elasticsearch.xpack.XPackSettings; +import org.elasticsearch.xpack.core.XPackSettings; import org.elasticsearch.xpack.security.transport.SecurityServerTransportInterceptor; -import static org.hamcrest.Matchers.instanceOf; -import static org.hamcrest.Matchers.startsWith; - // this class sits in org.elasticsearch.transport so that TransportService.requestHandlers is visible public class SecurityServerTransportServiceTests extends SecurityIntegTestCase { @Override diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/LocalStateSecurity.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/LocalStateSecurity.java index 84cd1ea1287..686c4ae12f1 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/LocalStateSecurity.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/LocalStateSecurity.java @@ -8,9 +8,9 @@ package org.elasticsearch.xpack.security; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.license.LicenseService; import org.elasticsearch.license.XPackLicenseState; -import org.elasticsearch.xpack.LocalStateCompositeXPackPlugin; +import org.elasticsearch.xpack.core.LocalStateCompositeXPackPlugin; +import org.elasticsearch.xpack.core.ssl.SSLService; import org.elasticsearch.xpack.monitoring.Monitoring; -import org.elasticsearch.xpack.ssl.SSLService; import java.nio.file.Path; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/PkiRealmBootstrapCheckTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/PkiRealmBootstrapCheckTests.java index bfe79bc9fbc..c3473b6af00 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/PkiRealmBootstrapCheckTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/PkiRealmBootstrapCheckTests.java @@ -10,8 +10,8 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.env.Environment; import org.elasticsearch.env.TestEnvironment; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.security.authc.pki.PkiRealmSettings; -import org.elasticsearch.xpack.ssl.SSLService; +import org.elasticsearch.xpack.core.security.authc.pki.PkiRealmSettings; +import org.elasticsearch.xpack.core.ssl.SSLService; public class PkiRealmBootstrapCheckTests extends ESTestCase { diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/ScrollHelperIntegTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/ScrollHelperIntegTests.java index 14e33faad19..c79a369cd1b 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/ScrollHelperIntegTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/ScrollHelperIntegTests.java @@ -21,6 +21,7 @@ import org.elasticsearch.search.SearchHits; import org.elasticsearch.search.internal.InternalSearchResponse; import org.elasticsearch.test.ESSingleNodeTestCase; import org.elasticsearch.threadpool.ThreadPool; +import org.elasticsearch.xpack.core.security.ScrollHelper; import org.mockito.stubbing.Answer; import java.util.ArrayList; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/SecurityContextTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/SecurityContextTests.java index c8ad2069fff..e3b1cd31246 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/SecurityContextTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/SecurityContextTests.java @@ -11,10 +11,11 @@ import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.common.util.concurrent.ThreadContext.StoredContext; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.VersionUtils; -import org.elasticsearch.xpack.security.authc.Authentication; -import org.elasticsearch.xpack.security.authc.Authentication.RealmRef; -import org.elasticsearch.xpack.security.user.SystemUser; -import org.elasticsearch.xpack.security.user.User; +import org.elasticsearch.xpack.core.security.SecurityContext; +import org.elasticsearch.xpack.core.security.authc.Authentication; +import org.elasticsearch.xpack.core.security.authc.Authentication.RealmRef; +import org.elasticsearch.xpack.core.security.user.SystemUser; +import org.elasticsearch.xpack.core.security.user.User; import org.junit.Before; import java.io.IOException; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/SecurityFeatureSetTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/SecurityFeatureSetTests.java index 30ed863e4e8..9e64d4eb67a 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/SecurityFeatureSetTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/SecurityFeatureSetTests.java @@ -15,15 +15,16 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.license.XPackLicenseState; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.XPackFeatureSet; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.XPackField; +import org.elasticsearch.xpack.core.XPackFeatureSet; +import org.elasticsearch.xpack.core.XPackField; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.security.SecurityFeatureSetUsage; +import org.elasticsearch.xpack.core.security.user.AnonymousUser; +import org.elasticsearch.xpack.core.watcher.support.xcontent.XContentSource; import org.elasticsearch.xpack.security.authc.Realms; import org.elasticsearch.xpack.security.authc.support.mapper.NativeRoleMappingStore; import org.elasticsearch.xpack.security.authz.store.CompositeRolesStore; import org.elasticsearch.xpack.security.transport.filter.IPFilter; -import org.elasticsearch.xpack.security.user.AnonymousUser; -import org.elasticsearch.xpack.watcher.support.xcontent.XContentSource; import org.junit.Before; import java.util.Arrays; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/SecurityLifecycleServiceTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/SecurityLifecycleServiceTests.java index a5249ebe873..af00d4ac616 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/SecurityLifecycleServiceTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/SecurityLifecycleServiceTests.java @@ -35,15 +35,16 @@ import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.TestThreadPool; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.MockTransportClient; +import org.elasticsearch.xpack.core.security.SecurityLifecycleServiceField; import org.elasticsearch.xpack.security.audit.index.IndexAuditTrail; import org.elasticsearch.xpack.security.support.IndexLifecycleManager; import org.elasticsearch.xpack.security.test.SecurityTestUtils; -import org.elasticsearch.xpack.template.TemplateUtils; +import org.elasticsearch.xpack.core.template.TemplateUtils; import org.junit.After; import org.junit.Before; import static org.elasticsearch.xpack.security.SecurityLifecycleService.SECURITY_INDEX_NAME; -import static org.elasticsearch.xpack.security.SecurityLifecycleServiceField.SECURITY_TEMPLATE_NAME; +import static org.elasticsearch.xpack.core.security.SecurityLifecycleServiceField.SECURITY_TEMPLATE_NAME; import static org.elasticsearch.xpack.security.SecurityLifecycleService.securityIndexMappingUpToDate; import static org.hamcrest.Matchers.equalTo; import static org.mockito.Mockito.mock; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/SecurityPluginTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/SecurityPluginTests.java index 4617e9f3e49..3f744370329 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/SecurityPluginTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/SecurityPluginTests.java @@ -13,13 +13,13 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.test.SecurityIntegTestCase; import org.elasticsearch.test.SecuritySettingsSource; import org.elasticsearch.test.SecuritySettingsSourceField; -import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken; +import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; import java.io.IOException; import static org.elasticsearch.rest.RestStatus.OK; import static org.elasticsearch.rest.RestStatus.UNAUTHORIZED; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; import static org.hamcrest.Matchers.is; public class SecurityPluginTests extends SecurityIntegTestCase { diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/SecuritySettingsTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/SecuritySettingsTests.java index 7e2a0e01505..c6b5bf430a3 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/SecuritySettingsTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/SecuritySettingsTests.java @@ -7,9 +7,9 @@ package org.elasticsearch.xpack.security; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.XPackField; -import org.elasticsearch.xpack.security.audit.index.IndexAuditTrailField; +import org.elasticsearch.xpack.core.XPackField; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.security.index.IndexAuditTrailField; import java.util.Collections; @@ -18,7 +18,6 @@ import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.nullValue; -import static org.hamcrest.Matchers.not; public class SecuritySettingsTests extends ESTestCase { diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/SecurityTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/SecurityTests.java index 73722ad1ec6..33ecbb9e3ad 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/SecurityTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/SecurityTests.java @@ -30,19 +30,20 @@ import org.elasticsearch.plugins.MapperPlugin; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.watcher.ResourceWatcherService; -import org.elasticsearch.xpack.XPackSettings; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.security.SecurityField; +import org.elasticsearch.xpack.core.security.authc.Realm; +import org.elasticsearch.xpack.core.security.authc.file.FileRealmSettings; +import org.elasticsearch.xpack.core.security.authc.ldap.support.SessionFactorySettings; +import org.elasticsearch.xpack.core.security.authz.AuthorizationServiceField; +import org.elasticsearch.xpack.core.security.authz.accesscontrol.IndicesAccessControl; +import org.elasticsearch.xpack.core.security.authz.permission.FieldPermissions; +import org.elasticsearch.xpack.core.security.authz.permission.FieldPermissionsDefinition; +import org.elasticsearch.xpack.core.ssl.SSLService; import org.elasticsearch.xpack.security.audit.AuditTrailService; import org.elasticsearch.xpack.security.audit.index.IndexAuditTrail; import org.elasticsearch.xpack.security.audit.logfile.LoggingAuditTrail; -import org.elasticsearch.xpack.security.authc.Realm; import org.elasticsearch.xpack.security.authc.Realms; -import org.elasticsearch.xpack.security.authc.file.FileRealmSettings; -import org.elasticsearch.xpack.security.authc.ldap.support.SessionFactorySettings; -import org.elasticsearch.xpack.security.authz.AuthorizationServiceField; -import org.elasticsearch.xpack.security.authz.accesscontrol.IndicesAccessControl; -import org.elasticsearch.xpack.security.authz.permission.FieldPermissions; -import org.elasticsearch.xpack.security.authz.permission.FieldPermissionsDefinition; -import org.elasticsearch.xpack.ssl.SSLService; import org.junit.Before; import java.io.IOException; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/TokenSSLBootsrapCheckTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/TokenSSLBootsrapCheckTests.java index a30cb834784..ec6422a40f8 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/TokenSSLBootsrapCheckTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/TokenSSLBootsrapCheckTests.java @@ -9,7 +9,7 @@ import org.elasticsearch.bootstrap.BootstrapContext; import org.elasticsearch.common.network.NetworkModule; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.XPackSettings; +import org.elasticsearch.xpack.core.XPackSettings; public class TokenSSLBootsrapCheckTests extends ESTestCase { diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/filter/SecurityActionFilterTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/filter/SecurityActionFilterTests.java index 390f0cc062d..44a48f089ad 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/filter/SecurityActionFilterTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/filter/SecurityActionFilterTests.java @@ -27,15 +27,15 @@ import org.elasticsearch.license.XPackLicenseState; import org.elasticsearch.tasks.Task; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.xpack.security.SecurityContext; -import org.elasticsearch.xpack.security.authc.Authentication; -import org.elasticsearch.xpack.security.authc.Authentication.RealmRef; -import org.elasticsearch.xpack.security.authc.AuthenticationField; +import org.elasticsearch.xpack.core.security.SecurityContext; +import org.elasticsearch.xpack.core.security.authc.Authentication; +import org.elasticsearch.xpack.core.security.authc.Authentication.RealmRef; +import org.elasticsearch.xpack.core.security.authc.AuthenticationField; +import org.elasticsearch.xpack.core.security.authz.permission.Role; +import org.elasticsearch.xpack.core.security.user.SystemUser; +import org.elasticsearch.xpack.core.security.user.User; import org.elasticsearch.xpack.security.authc.AuthenticationService; import org.elasticsearch.xpack.security.authz.AuthorizationService; -import org.elasticsearch.xpack.security.authz.permission.Role; -import org.elasticsearch.xpack.security.user.SystemUser; -import org.elasticsearch.xpack.security.user.User; import org.junit.Before; import java.util.Collections; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/interceptor/IndicesAliasesRequestInterceptorTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/interceptor/IndicesAliasesRequestInterceptorTests.java index e96a12a00ab..5a14d02641a 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/interceptor/IndicesAliasesRequestInterceptorTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/interceptor/IndicesAliasesRequestInterceptorTests.java @@ -14,15 +14,14 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.license.XPackLicenseState; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.security.authz.AuthorizationServiceField; +import org.elasticsearch.xpack.core.security.authz.accesscontrol.IndicesAccessControl; +import org.elasticsearch.xpack.core.security.authz.permission.FieldPermissions; +import org.elasticsearch.xpack.core.security.authz.permission.FieldPermissionsDefinition; +import org.elasticsearch.xpack.core.security.authz.permission.Role; +import org.elasticsearch.xpack.core.security.authz.privilege.IndexPrivilege; +import org.elasticsearch.xpack.core.security.user.User; import org.elasticsearch.xpack.security.audit.AuditTrailService; -import org.elasticsearch.xpack.security.authz.AuthorizationService; -import org.elasticsearch.xpack.security.authz.AuthorizationServiceField; -import org.elasticsearch.xpack.security.authz.accesscontrol.IndicesAccessControl; -import org.elasticsearch.xpack.security.authz.permission.FieldPermissions; -import org.elasticsearch.xpack.security.authz.permission.FieldPermissionsDefinition; -import org.elasticsearch.xpack.security.authz.permission.Role; -import org.elasticsearch.xpack.security.authz.privilege.IndexPrivilege; -import org.elasticsearch.xpack.security.user.User; import java.util.Collections; import java.util.Set; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/interceptor/ResizeRequestInterceptorTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/interceptor/ResizeRequestInterceptorTests.java index 8e90bf804be..0cf0a6716de 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/interceptor/ResizeRequestInterceptorTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/interceptor/ResizeRequestInterceptorTests.java @@ -16,15 +16,14 @@ import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.license.XPackLicenseState; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.ThreadPool; +import org.elasticsearch.xpack.core.security.authz.AuthorizationServiceField; +import org.elasticsearch.xpack.core.security.authz.accesscontrol.IndicesAccessControl; +import org.elasticsearch.xpack.core.security.authz.permission.FieldPermissions; +import org.elasticsearch.xpack.core.security.authz.permission.FieldPermissionsDefinition; +import org.elasticsearch.xpack.core.security.authz.permission.Role; +import org.elasticsearch.xpack.core.security.authz.privilege.IndexPrivilege; +import org.elasticsearch.xpack.core.security.user.User; import org.elasticsearch.xpack.security.audit.AuditTrailService; -import org.elasticsearch.xpack.security.authz.AuthorizationService; -import org.elasticsearch.xpack.security.authz.AuthorizationServiceField; -import org.elasticsearch.xpack.security.authz.accesscontrol.IndicesAccessControl; -import org.elasticsearch.xpack.security.authz.permission.FieldPermissions; -import org.elasticsearch.xpack.security.authz.permission.FieldPermissionsDefinition; -import org.elasticsearch.xpack.security.authz.permission.Role; -import org.elasticsearch.xpack.security.authz.privilege.IndexPrivilege; -import org.elasticsearch.xpack.security.user.User; import java.util.Collections; import java.util.Set; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/role/PutRoleBuilderTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/role/PutRoleBuilderTests.java index bc082e0a618..ba305e15ed7 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/role/PutRoleBuilderTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/role/PutRoleBuilderTests.java @@ -11,6 +11,7 @@ import org.elasticsearch.common.bytes.BytesArray; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.client.NoOpClient; +import org.elasticsearch.xpack.core.security.action.role.PutRoleRequestBuilder; import java.nio.charset.Charset; import java.nio.file.Files; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/role/TransportDeleteRoleActionTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/role/TransportDeleteRoleActionTests.java index 591173c1713..0f901830bf1 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/role/TransportDeleteRoleActionTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/role/TransportDeleteRoleActionTests.java @@ -10,11 +10,13 @@ import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.support.ActionFilters; import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver; import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.xpack.security.authz.store.NativeRolesStore; -import org.elasticsearch.xpack.security.authz.store.ReservedRolesStore; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; +import org.elasticsearch.xpack.core.security.action.role.DeleteRoleRequest; +import org.elasticsearch.xpack.core.security.action.role.DeleteRoleResponse; +import org.elasticsearch.xpack.core.security.authz.store.ReservedRolesStore; +import org.elasticsearch.xpack.security.authz.store.NativeRolesStore; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/role/TransportGetRolesActionTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/role/TransportGetRolesActionTests.java index f755097cac6..431d6cc613c 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/role/TransportGetRolesActionTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/role/TransportGetRolesActionTests.java @@ -11,12 +11,14 @@ import org.elasticsearch.action.support.ActionFilters; import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver; import org.elasticsearch.common.Strings; import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.xpack.security.authz.RoleDescriptor; -import org.elasticsearch.xpack.security.authz.store.NativeRolesStore; -import org.elasticsearch.xpack.security.authz.store.ReservedRolesStore; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; +import org.elasticsearch.xpack.core.security.action.role.GetRolesRequest; +import org.elasticsearch.xpack.core.security.action.role.GetRolesResponse; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor; +import org.elasticsearch.xpack.core.security.authz.store.ReservedRolesStore; +import org.elasticsearch.xpack.security.authz.store.NativeRolesStore; import java.util.ArrayList; import java.util.Arrays; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/role/TransportPutRoleActionTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/role/TransportPutRoleActionTests.java index c25308345ab..0ae2477ba03 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/role/TransportPutRoleActionTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/role/TransportPutRoleActionTests.java @@ -10,12 +10,14 @@ import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.support.ActionFilters; import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver; import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.xpack.security.authz.RoleDescriptor; -import org.elasticsearch.xpack.security.authz.store.NativeRolesStore; -import org.elasticsearch.xpack.security.authz.store.ReservedRolesStore; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; +import org.elasticsearch.xpack.core.security.action.role.PutRoleRequest; +import org.elasticsearch.xpack.core.security.action.role.PutRoleResponse; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor; +import org.elasticsearch.xpack.core.security.authz.store.ReservedRolesStore; +import org.elasticsearch.xpack.security.authz.store.NativeRolesStore; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/rolemapping/PutRoleMappingRequestTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/rolemapping/PutRoleMappingRequestTests.java index 4d36a528e48..3079a17b774 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/rolemapping/PutRoleMappingRequestTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/rolemapping/PutRoleMappingRequestTests.java @@ -10,7 +10,10 @@ import java.util.Collections; import org.elasticsearch.client.ElasticsearchClient; import org.elasticsearch.common.ValidationException; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.security.authc.support.mapper.expressiondsl.RoleMapperExpression; +import org.elasticsearch.xpack.core.security.action.rolemapping.PutRoleMappingAction; +import org.elasticsearch.xpack.core.security.action.rolemapping.PutRoleMappingRequest; +import org.elasticsearch.xpack.core.security.action.rolemapping.PutRoleMappingRequestBuilder; +import org.elasticsearch.xpack.core.security.authc.support.mapper.expressiondsl.RoleMapperExpression; import org.junit.Before; import org.mockito.Mockito; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/rolemapping/TransportGetRoleMappingsActionTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/rolemapping/TransportGetRoleMappingsActionTests.java index 0cc1ff4be10..219ce1d1f79 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/rolemapping/TransportGetRoleMappingsActionTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/rolemapping/TransportGetRoleMappingsActionTests.java @@ -20,7 +20,9 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.security.authc.support.mapper.ExpressionRoleMapping; +import org.elasticsearch.xpack.core.security.action.rolemapping.GetRoleMappingsRequest; +import org.elasticsearch.xpack.core.security.action.rolemapping.GetRoleMappingsResponse; +import org.elasticsearch.xpack.core.security.authc.support.mapper.ExpressionRoleMapping; import org.elasticsearch.xpack.security.authc.support.mapper.NativeRoleMappingStore; import org.hamcrest.Matchers; import org.junit.Before; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/rolemapping/TransportPutRoleMappingActionTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/rolemapping/TransportPutRoleMappingActionTests.java index 36bc614e6ad..9ff9871d594 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/rolemapping/TransportPutRoleMappingActionTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/rolemapping/TransportPutRoleMappingActionTests.java @@ -18,9 +18,11 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.security.authc.support.mapper.ExpressionRoleMapping; +import org.elasticsearch.xpack.core.security.action.rolemapping.PutRoleMappingRequest; +import org.elasticsearch.xpack.core.security.action.rolemapping.PutRoleMappingResponse; +import org.elasticsearch.xpack.core.security.authc.support.mapper.ExpressionRoleMapping; import org.elasticsearch.xpack.security.authc.support.mapper.NativeRoleMappingStore; -import org.elasticsearch.xpack.security.authc.support.mapper.expressiondsl.FieldExpression; +import org.elasticsearch.xpack.core.security.authc.support.mapper.expressiondsl.FieldExpression; import org.junit.Before; import static org.hamcrest.Matchers.containsInAnyOrder; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/saml/SamlPrepareAuthenticationRequestTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/saml/SamlPrepareAuthenticationRequestTests.java index 7fcc718b719..e257c37cbd3 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/saml/SamlPrepareAuthenticationRequestTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/saml/SamlPrepareAuthenticationRequestTests.java @@ -8,7 +8,7 @@ package org.elasticsearch.xpack.security.action.saml; import java.io.IOException; import org.elasticsearch.common.io.stream.BytesStreamOutput; -import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.security.action.saml.SamlPrepareAuthenticationRequest; import org.elasticsearch.xpack.security.authc.saml.SamlTestCase; import org.hamcrest.Matchers; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/saml/TransportSamlInvalidateSessionActionTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/saml/TransportSamlInvalidateSessionActionTests.java index 408dfded53a..2bd300a694b 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/saml/TransportSamlInvalidateSessionActionTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/saml/TransportSamlInvalidateSessionActionTests.java @@ -44,23 +44,25 @@ import org.elasticsearch.test.ClusterServiceUtils; import org.elasticsearch.test.client.NoOpClient; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.XPackSettings; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.security.action.saml.SamlInvalidateSessionRequest; +import org.elasticsearch.xpack.core.security.action.saml.SamlInvalidateSessionResponse; +import org.elasticsearch.xpack.core.security.authc.Authentication; +import org.elasticsearch.xpack.core.security.authc.Authentication.RealmRef; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.esnative.NativeRealmSettings; +import org.elasticsearch.xpack.core.security.authc.saml.SamlRealmSettings; +import org.elasticsearch.xpack.core.security.user.User; import org.elasticsearch.xpack.security.SecurityLifecycleService; -import org.elasticsearch.xpack.security.authc.Authentication; -import org.elasticsearch.xpack.security.authc.Authentication.RealmRef; -import org.elasticsearch.xpack.security.authc.RealmConfig; import org.elasticsearch.xpack.security.authc.Realms; import org.elasticsearch.xpack.security.authc.TokenService; import org.elasticsearch.xpack.security.authc.UserToken; -import org.elasticsearch.xpack.security.authc.esnative.NativeRealmSettings; import org.elasticsearch.xpack.security.authc.saml.SamlLogoutRequestHandler; import org.elasticsearch.xpack.security.authc.saml.SamlNameId; import org.elasticsearch.xpack.security.authc.saml.SamlRealm; -import org.elasticsearch.xpack.security.authc.saml.SamlRealmSettings; import org.elasticsearch.xpack.security.authc.saml.SamlRealmTestHelper; import org.elasticsearch.xpack.security.authc.saml.SamlRealmTests; import org.elasticsearch.xpack.security.authc.saml.SamlTestCase; -import org.elasticsearch.xpack.security.user.User; import org.junit.After; import org.junit.Before; import org.opensaml.saml.saml2.core.NameID; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/saml/TransportSamlLogoutActionTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/saml/TransportSamlLogoutActionTests.java index 4b751801731..50a7a35b7a6 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/saml/TransportSamlLogoutActionTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/saml/TransportSamlLogoutActionTests.java @@ -39,21 +39,23 @@ import org.elasticsearch.test.ClusterServiceUtils; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; import org.elasticsearch.watcher.ResourceWatcherService; -import org.elasticsearch.xpack.XPackSettings; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.security.action.saml.SamlLogoutRequest; +import org.elasticsearch.xpack.core.security.action.saml.SamlLogoutResponse; +import org.elasticsearch.xpack.core.security.authc.Authentication; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.saml.SamlRealmSettings; +import org.elasticsearch.xpack.core.security.user.User; +import org.elasticsearch.xpack.core.ssl.SSLService; import org.elasticsearch.xpack.security.SecurityLifecycleService; -import org.elasticsearch.xpack.security.authc.Authentication; -import org.elasticsearch.xpack.security.authc.RealmConfig; import org.elasticsearch.xpack.security.authc.Realms; import org.elasticsearch.xpack.security.authc.TokenService; import org.elasticsearch.xpack.security.authc.UserToken; import org.elasticsearch.xpack.security.authc.saml.SamlNameId; import org.elasticsearch.xpack.security.authc.saml.SamlRealm; -import org.elasticsearch.xpack.security.authc.saml.SamlRealmSettings; import org.elasticsearch.xpack.security.authc.saml.SamlRealmTests; import org.elasticsearch.xpack.security.authc.saml.SamlTestCase; import org.elasticsearch.xpack.security.authc.support.UserRoleMapper; -import org.elasticsearch.xpack.security.user.User; -import org.elasticsearch.xpack.ssl.SSLService; import org.junit.After; import org.junit.Before; import org.opensaml.saml.saml2.core.NameID; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/token/CreateTokenRequestTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/token/CreateTokenRequestTests.java index 4445c417ae7..44045263284 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/token/CreateTokenRequestTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/token/CreateTokenRequestTests.java @@ -8,6 +8,7 @@ package org.elasticsearch.xpack.security.action.token; import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.common.settings.SecureString; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.security.action.token.CreateTokenRequest; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.hasItem; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/user/HasPrivilegesRequestBuilderTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/user/HasPrivilegesRequestBuilderTests.java index 837f011f6e8..2d53a3e6e86 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/user/HasPrivilegesRequestBuilderTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/user/HasPrivilegesRequestBuilderTests.java @@ -5,8 +5,6 @@ */ package org.elasticsearch.xpack.security.action.user; -import java.nio.charset.StandardCharsets; - import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.action.admin.cluster.health.ClusterHealthAction; import org.elasticsearch.action.admin.cluster.stats.ClusterStatsAction; @@ -14,7 +12,11 @@ import org.elasticsearch.client.Client; import org.elasticsearch.common.bytes.BytesArray; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.security.authz.RoleDescriptor; +import org.elasticsearch.xpack.core.security.action.user.HasPrivilegesRequest; +import org.elasticsearch.xpack.core.security.action.user.HasPrivilegesRequestBuilder; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor; + +import java.nio.charset.StandardCharsets; import static org.hamcrest.Matchers.arrayContaining; import static org.hamcrest.Matchers.containsString; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/user/PutUserRequestBuilderTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/user/PutUserRequestBuilderTests.java index ce87bc0d6b5..ac3308e2cc3 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/user/PutUserRequestBuilderTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/user/PutUserRequestBuilderTests.java @@ -10,6 +10,8 @@ import org.elasticsearch.client.Client; import org.elasticsearch.common.bytes.BytesArray; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.security.action.user.PutUserRequest; +import org.elasticsearch.xpack.core.security.action.user.PutUserRequestBuilder; import java.io.IOException; import java.nio.charset.StandardCharsets; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/user/PutUserRequestTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/user/PutUserRequestTests.java index 42a32686415..af3a89c77b6 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/user/PutUserRequestTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/user/PutUserRequestTests.java @@ -7,6 +7,7 @@ package org.elasticsearch.xpack.security.action.user; import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.security.action.user.PutUserRequest; import java.util.Collections; import java.util.Date; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/user/TransportAuthenticateActionTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/user/TransportAuthenticateActionTests.java index 138b6284b1d..56e714d7a70 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/user/TransportAuthenticateActionTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/user/TransportAuthenticateActionTests.java @@ -10,15 +10,17 @@ import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.support.ActionFilters; import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver; import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.xpack.security.SecurityContext; -import org.elasticsearch.xpack.security.user.ElasticUser; -import org.elasticsearch.xpack.security.user.KibanaUser; -import org.elasticsearch.xpack.security.user.SystemUser; -import org.elasticsearch.xpack.security.user.User; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.security.user.XPackUser; +import org.elasticsearch.xpack.core.security.SecurityContext; +import org.elasticsearch.xpack.core.security.action.user.AuthenticateRequest; +import org.elasticsearch.xpack.core.security.action.user.AuthenticateResponse; +import org.elasticsearch.xpack.core.security.user.ElasticUser; +import org.elasticsearch.xpack.core.security.user.KibanaUser; +import org.elasticsearch.xpack.core.security.user.SystemUser; +import org.elasticsearch.xpack.core.security.user.User; +import org.elasticsearch.xpack.core.security.user.XPackUser; import java.util.Collections; import java.util.concurrent.atomic.AtomicReference; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/user/TransportChangePasswordActionTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/user/TransportChangePasswordActionTests.java index 2f425c2247e..78f6fd26e93 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/user/TransportChangePasswordActionTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/user/TransportChangePasswordActionTests.java @@ -10,18 +10,20 @@ import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.support.ActionFilters; import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver; import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.test.SecuritySettingsSourceField; -import org.elasticsearch.xpack.security.authc.esnative.NativeUsersStore; -import org.elasticsearch.xpack.security.authc.support.Hasher; -import org.elasticsearch.xpack.security.user.AnonymousUser; -import org.elasticsearch.xpack.security.user.ElasticUser; -import org.elasticsearch.xpack.security.user.KibanaUser; -import org.elasticsearch.xpack.security.user.SystemUser; -import org.elasticsearch.xpack.security.user.User; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.test.SecuritySettingsSourceField; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.security.user.XPackUser; +import org.elasticsearch.xpack.core.security.action.user.ChangePasswordRequest; +import org.elasticsearch.xpack.core.security.action.user.ChangePasswordResponse; +import org.elasticsearch.xpack.core.security.authc.support.Hasher; +import org.elasticsearch.xpack.core.security.user.AnonymousUser; +import org.elasticsearch.xpack.core.security.user.ElasticUser; +import org.elasticsearch.xpack.core.security.user.KibanaUser; +import org.elasticsearch.xpack.core.security.user.SystemUser; +import org.elasticsearch.xpack.core.security.user.User; +import org.elasticsearch.xpack.core.security.user.XPackUser; +import org.elasticsearch.xpack.security.authc.esnative.NativeUsersStore; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/user/TransportDeleteUserActionTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/user/TransportDeleteUserActionTests.java index 679d0dc9bcf..a60a82e87d7 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/user/TransportDeleteUserActionTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/user/TransportDeleteUserActionTests.java @@ -10,16 +10,18 @@ import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.support.ActionFilters; import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver; import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.xpack.security.authc.esnative.NativeUsersStore; -import org.elasticsearch.xpack.security.user.AnonymousUser; -import org.elasticsearch.xpack.security.user.ElasticUser; -import org.elasticsearch.xpack.security.user.KibanaUser; -import org.elasticsearch.xpack.security.user.SystemUser; -import org.elasticsearch.xpack.security.user.User; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.security.user.XPackUser; +import org.elasticsearch.xpack.core.security.action.user.DeleteUserRequest; +import org.elasticsearch.xpack.core.security.action.user.DeleteUserResponse; +import org.elasticsearch.xpack.core.security.user.AnonymousUser; +import org.elasticsearch.xpack.core.security.user.ElasticUser; +import org.elasticsearch.xpack.core.security.user.KibanaUser; +import org.elasticsearch.xpack.core.security.user.SystemUser; +import org.elasticsearch.xpack.core.security.user.User; +import org.elasticsearch.xpack.core.security.user.XPackUser; +import org.elasticsearch.xpack.security.authc.esnative.NativeUsersStore; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/user/TransportGetUsersActionTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/user/TransportGetUsersActionTests.java index 50527445749..b23fccec018 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/user/TransportGetUsersActionTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/user/TransportGetUsersActionTests.java @@ -15,18 +15,19 @@ import org.elasticsearch.common.ValidationException; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.env.Environment; +import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.threadpool.ThreadPool; +import org.elasticsearch.transport.TransportService; +import org.elasticsearch.xpack.core.security.action.user.GetUsersRequest; +import org.elasticsearch.xpack.core.security.action.user.GetUsersResponse; +import org.elasticsearch.xpack.core.security.user.AnonymousUser; +import org.elasticsearch.xpack.core.security.user.SystemUser; +import org.elasticsearch.xpack.core.security.user.User; +import org.elasticsearch.xpack.core.security.user.XPackUser; import org.elasticsearch.xpack.security.SecurityLifecycleService; import org.elasticsearch.xpack.security.authc.esnative.NativeUsersStore; import org.elasticsearch.xpack.security.authc.esnative.ReservedRealm; import org.elasticsearch.xpack.security.authc.esnative.ReservedRealmTests; -import org.elasticsearch.xpack.security.user.AnonymousUser; -import org.elasticsearch.xpack.security.user.ElasticUser; -import org.elasticsearch.xpack.security.user.SystemUser; -import org.elasticsearch.xpack.security.user.User; -import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.security.user.XPackUser; import org.junit.Before; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/user/TransportHasPrivilegesActionTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/user/TransportHasPrivilegesActionTests.java index 588702a7956..d4a256b8a0c 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/user/TransportHasPrivilegesActionTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/user/TransportHasPrivilegesActionTests.java @@ -5,9 +5,6 @@ */ package org.elasticsearch.xpack.security.action.user; -import java.util.Collections; -import java.util.LinkedHashMap; - import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.admin.cluster.health.ClusterHealthAction; import org.elasticsearch.action.delete.DeleteAction; @@ -23,18 +20,23 @@ import org.elasticsearch.mock.orig.Mockito; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.security.action.user.HasPrivilegesResponse.IndexPrivileges; -import org.elasticsearch.xpack.security.authc.Authentication; -import org.elasticsearch.xpack.security.authc.AuthenticationField; +import org.elasticsearch.xpack.core.security.action.user.HasPrivilegesRequest; +import org.elasticsearch.xpack.core.security.action.user.HasPrivilegesResponse; +import org.elasticsearch.xpack.core.security.action.user.HasPrivilegesResponse.IndexPrivileges; +import org.elasticsearch.xpack.core.security.authc.Authentication; +import org.elasticsearch.xpack.core.security.authc.AuthenticationField; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor; +import org.elasticsearch.xpack.core.security.authz.permission.Role; +import org.elasticsearch.xpack.core.security.authz.privilege.ClusterPrivilege; +import org.elasticsearch.xpack.core.security.authz.privilege.IndexPrivilege; +import org.elasticsearch.xpack.core.security.user.User; import org.elasticsearch.xpack.security.authz.AuthorizationService; -import org.elasticsearch.xpack.security.authz.RoleDescriptor; -import org.elasticsearch.xpack.security.authz.permission.Role; -import org.elasticsearch.xpack.security.authz.privilege.ClusterPrivilege; -import org.elasticsearch.xpack.security.authz.privilege.IndexPrivilege; -import org.elasticsearch.xpack.security.user.User; import org.hamcrest.Matchers; import org.junit.Before; +import java.util.Collections; +import java.util.LinkedHashMap; + import static org.hamcrest.Matchers.containsInAnyOrder; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.is; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/user/TransportPutUserActionTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/user/TransportPutUserActionTests.java index 69accf2e53b..bab047951e5 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/user/TransportPutUserActionTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/user/TransportPutUserActionTests.java @@ -14,19 +14,21 @@ import org.elasticsearch.common.ValidationException; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.env.TestEnvironment; +import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.SecuritySettingsSourceField; +import org.elasticsearch.threadpool.ThreadPool; +import org.elasticsearch.transport.TransportService; +import org.elasticsearch.xpack.core.security.action.user.PutUserRequest; +import org.elasticsearch.xpack.core.security.action.user.PutUserResponse; +import org.elasticsearch.xpack.core.security.authc.support.Hasher; +import org.elasticsearch.xpack.core.security.user.AnonymousUser; +import org.elasticsearch.xpack.core.security.user.SystemUser; +import org.elasticsearch.xpack.core.security.user.User; +import org.elasticsearch.xpack.core.security.user.XPackUser; import org.elasticsearch.xpack.security.SecurityLifecycleService; import org.elasticsearch.xpack.security.authc.esnative.NativeUsersStore; import org.elasticsearch.xpack.security.authc.esnative.ReservedRealm; import org.elasticsearch.xpack.security.authc.esnative.ReservedRealmTests; -import org.elasticsearch.xpack.security.authc.support.Hasher; -import org.elasticsearch.xpack.security.user.AnonymousUser; -import org.elasticsearch.xpack.security.user.SystemUser; -import org.elasticsearch.xpack.security.user.User; -import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.security.user.XPackUser; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/user/TransportSetEnabledActionTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/user/TransportSetEnabledActionTests.java index 64c57f0a369..09fd9043752 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/user/TransportSetEnabledActionTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/user/TransportSetEnabledActionTests.java @@ -15,15 +15,17 @@ import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.security.authc.Authentication; -import org.elasticsearch.xpack.security.authc.AuthenticationField; +import org.elasticsearch.xpack.core.security.action.user.SetEnabledRequest; +import org.elasticsearch.xpack.core.security.action.user.SetEnabledResponse; +import org.elasticsearch.xpack.core.security.authc.Authentication; +import org.elasticsearch.xpack.core.security.authc.AuthenticationField; +import org.elasticsearch.xpack.core.security.user.AnonymousUser; +import org.elasticsearch.xpack.core.security.user.ElasticUser; +import org.elasticsearch.xpack.core.security.user.KibanaUser; +import org.elasticsearch.xpack.core.security.user.SystemUser; +import org.elasticsearch.xpack.core.security.user.User; +import org.elasticsearch.xpack.core.security.user.XPackUser; import org.elasticsearch.xpack.security.authc.esnative.NativeUsersStore; -import org.elasticsearch.xpack.security.user.AnonymousUser; -import org.elasticsearch.xpack.security.user.ElasticUser; -import org.elasticsearch.xpack.security.user.KibanaUser; -import org.elasticsearch.xpack.security.user.SystemUser; -import org.elasticsearch.xpack.security.user.User; -import org.elasticsearch.xpack.security.user.XPackUser; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/audit/AuditTrailServiceTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/audit/AuditTrailServiceTests.java index 8b7aa2bc46b..83d8a43ddf7 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/audit/AuditTrailServiceTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/audit/AuditTrailServiceTests.java @@ -6,14 +6,14 @@ package org.elasticsearch.xpack.security.audit; import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.rest.RestRequest; import org.elasticsearch.license.XPackLicenseState; -import org.elasticsearch.xpack.security.user.User; -import org.elasticsearch.xpack.security.authc.AuthenticationToken; -import org.elasticsearch.xpack.security.transport.filter.IPFilter; -import org.elasticsearch.xpack.security.transport.filter.SecurityIpFilterRule; +import org.elasticsearch.rest.RestRequest; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.transport.TransportMessage; +import org.elasticsearch.xpack.core.security.authc.AuthenticationToken; +import org.elasticsearch.xpack.core.security.user.User; +import org.elasticsearch.xpack.security.transport.filter.IPFilter; +import org.elasticsearch.xpack.security.transport.filter.SecurityIpFilterRule; import org.junit.Before; import java.net.InetAddress; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/audit/index/AuditTrailTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/audit/index/AuditTrailTests.java index 680c7ac82c8..599e8e7adf1 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/audit/index/AuditTrailTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/audit/index/AuditTrailTests.java @@ -5,13 +5,6 @@ */ package org.elasticsearch.xpack.security.audit.index; -import java.util.Collection; -import java.util.List; -import java.util.Map; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicReference; - import org.apache.http.message.BasicHeader; import org.elasticsearch.action.ActionFuture; import org.elasticsearch.action.admin.indices.exists.indices.IndicesExistsResponse; @@ -26,14 +19,22 @@ import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.search.SearchHit; import org.elasticsearch.test.SecurityIntegTestCase; import org.elasticsearch.test.SecuritySettingsSource; -import org.elasticsearch.xpack.security.ScrollHelper; +import org.elasticsearch.xpack.core.security.ScrollHelper; +import org.elasticsearch.xpack.core.security.authc.AuthenticationServiceField; +import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; +import org.elasticsearch.xpack.core.security.index.IndexAuditTrailField; import org.elasticsearch.xpack.security.audit.AuditTrail; import org.elasticsearch.xpack.security.audit.AuditTrailService; -import org.elasticsearch.xpack.security.authc.AuthenticationServiceField; -import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; +import java.util.Collection; +import java.util.List; +import java.util.Map; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicReference; + import static org.elasticsearch.test.SecuritySettingsSourceField.TEST_PASSWORD_SECURE_STRING; import static org.hamcrest.Matchers.containsInAnyOrder; import static org.hamcrest.Matchers.equalTo; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/audit/index/IndexAuditTrailMutedTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/audit/index/IndexAuditTrailMutedTests.java index 8936fedcf83..44dfde6480a 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/audit/index/IndexAuditTrailMutedTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/audit/index/IndexAuditTrailMutedTests.java @@ -5,11 +5,6 @@ */ package org.elasticsearch.xpack.security.audit.index; -import java.net.InetAddress; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.atomic.AtomicBoolean; - import org.elasticsearch.action.Action; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.ActionRequest; @@ -27,14 +22,19 @@ import org.elasticsearch.threadpool.TestThreadPool; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.MockTransportClient; import org.elasticsearch.transport.TransportMessage; +import org.elasticsearch.xpack.core.security.authc.AuthenticationToken; +import org.elasticsearch.xpack.core.security.user.SystemUser; +import org.elasticsearch.xpack.core.security.user.User; import org.elasticsearch.xpack.security.audit.index.IndexAuditTrail.State; -import org.elasticsearch.xpack.security.authc.AuthenticationToken; import org.elasticsearch.xpack.security.transport.filter.SecurityIpFilterRule; -import org.elasticsearch.xpack.security.user.SystemUser; -import org.elasticsearch.xpack.security.user.User; import org.junit.After; import org.junit.Before; +import java.net.InetAddress; +import java.util.concurrent.BlockingQueue; +import java.util.concurrent.LinkedBlockingQueue; +import java.util.concurrent.atomic.AtomicBoolean; + import static org.hamcrest.Matchers.is; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verifyZeroInteractions; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/audit/index/IndexAuditTrailTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/audit/index/IndexAuditTrailTests.java index d7b5fd40279..e4cc92ebe91 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/audit/index/IndexAuditTrailTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/audit/index/IndexAuditTrailTests.java @@ -42,15 +42,16 @@ import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportInfo; import org.elasticsearch.transport.TransportMessage; import org.elasticsearch.transport.TransportRequest; -import org.elasticsearch.xpack.XPackSettings; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.security.SecurityLifecycleServiceField; +import org.elasticsearch.xpack.core.security.authc.AuthenticationToken; +import org.elasticsearch.xpack.core.security.index.IndexAuditTrailField; +import org.elasticsearch.xpack.core.security.user.SystemUser; +import org.elasticsearch.xpack.core.security.user.User; import org.elasticsearch.xpack.security.LocalStateSecurity; -import org.elasticsearch.xpack.security.SecurityLifecycleServiceField; import org.elasticsearch.xpack.security.audit.index.IndexAuditTrail.Message; -import org.elasticsearch.xpack.security.authc.AuthenticationToken; import org.elasticsearch.xpack.security.transport.filter.IPFilter; import org.elasticsearch.xpack.security.transport.filter.SecurityIpFilterRule; -import org.elasticsearch.xpack.security.user.SystemUser; -import org.elasticsearch.xpack.security.user.User; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.joda.time.format.ISODateTimeFormat; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/audit/index/RemoteIndexAuditTrailStartingTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/audit/index/RemoteIndexAuditTrailStartingTests.java index 8d9bc0ca591..6186c0dbb21 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/audit/index/RemoteIndexAuditTrailStartingTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/audit/index/RemoteIndexAuditTrailStartingTests.java @@ -18,7 +18,7 @@ import org.elasticsearch.test.SecurityIntegTestCase; import org.elasticsearch.test.SecuritySettingsSource; import org.elasticsearch.test.SecuritySettingsSourceField; import org.elasticsearch.test.junit.annotations.TestLogging; -import org.elasticsearch.xpack.security.SecurityLifecycleServiceField; +import org.elasticsearch.xpack.core.security.SecurityLifecycleServiceField; import org.elasticsearch.xpack.security.audit.AuditTrail; import org.elasticsearch.xpack.security.audit.AuditTrailService; import org.junit.After; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/audit/logfile/LoggingAuditTrailFilterTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/audit/logfile/LoggingAuditTrailFilterTests.java index 18ab7a89849..6a30e3dc6e8 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/audit/logfile/LoggingAuditTrailFilterTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/audit/logfile/LoggingAuditTrailFilterTests.java @@ -21,14 +21,15 @@ import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.rest.FakeRestRequest; import org.elasticsearch.test.rest.FakeRestRequest.Builder; import org.elasticsearch.transport.TransportMessage; +import org.elasticsearch.xpack.core.security.audit.logfile.CapturingLogger; +import org.elasticsearch.xpack.core.security.authc.AuthenticationToken; +import org.elasticsearch.xpack.core.security.user.SystemUser; +import org.elasticsearch.xpack.core.security.user.User; import org.elasticsearch.xpack.security.audit.logfile.LoggingAuditTrail.AuditEventMetaInfo; import org.elasticsearch.xpack.security.audit.logfile.LoggingAuditTrailTests.MockMessage; import org.elasticsearch.xpack.security.audit.logfile.LoggingAuditTrailTests.RestContent; -import org.elasticsearch.xpack.security.authc.AuthenticationToken; import org.elasticsearch.xpack.security.rest.RemoteHostHeader; import org.elasticsearch.xpack.security.transport.filter.SecurityIpFilterRule; -import org.elasticsearch.xpack.security.user.SystemUser; -import org.elasticsearch.xpack.security.user.User; import org.junit.Before; import org.mockito.stubbing.Answer; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/audit/logfile/LoggingAuditTrailTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/audit/logfile/LoggingAuditTrailTests.java index 83f9ca9d726..adff3943bd8 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/audit/logfile/LoggingAuditTrailTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/audit/logfile/LoggingAuditTrailTests.java @@ -27,12 +27,13 @@ import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.rest.FakeRestRequest; import org.elasticsearch.test.rest.FakeRestRequest.Builder; import org.elasticsearch.transport.TransportMessage; -import org.elasticsearch.xpack.security.authc.AuthenticationToken; +import org.elasticsearch.xpack.core.security.audit.logfile.CapturingLogger; +import org.elasticsearch.xpack.core.security.authc.AuthenticationToken; +import org.elasticsearch.xpack.core.security.user.SystemUser; +import org.elasticsearch.xpack.core.security.user.User; import org.elasticsearch.xpack.security.rest.RemoteHostHeader; import org.elasticsearch.xpack.security.transport.filter.IPFilter; import org.elasticsearch.xpack.security.transport.filter.SecurityIpFilterRule; -import org.elasticsearch.xpack.security.user.SystemUser; -import org.elasticsearch.xpack.security.user.User; import org.junit.Before; import org.mockito.stubbing.Answer; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/AuthenticationServiceTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/AuthenticationServiceTests.java index 192fbc3d497..91c18a47f82 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/AuthenticationServiceTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/AuthenticationServiceTests.java @@ -49,18 +49,25 @@ import org.elasticsearch.threadpool.FixedExecutorBuilder; import org.elasticsearch.threadpool.TestThreadPool; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportMessage; -import org.elasticsearch.xpack.XPackSettings; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.security.authc.Authentication; +import org.elasticsearch.xpack.core.security.authc.Authentication.RealmRef; +import org.elasticsearch.xpack.core.security.authc.AuthenticationField; +import org.elasticsearch.xpack.core.security.authc.AuthenticationResult; +import org.elasticsearch.xpack.core.security.authc.AuthenticationServiceField; +import org.elasticsearch.xpack.core.security.authc.AuthenticationToken; +import org.elasticsearch.xpack.core.security.authc.DefaultAuthenticationFailureHandler; +import org.elasticsearch.xpack.core.security.authc.Realm; +import org.elasticsearch.xpack.core.security.authc.Realm.Factory; +import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; +import org.elasticsearch.xpack.core.security.authz.permission.Role; +import org.elasticsearch.xpack.core.security.user.AnonymousUser; +import org.elasticsearch.xpack.core.security.user.SystemUser; +import org.elasticsearch.xpack.core.security.user.User; import org.elasticsearch.xpack.security.SecurityLifecycleService; import org.elasticsearch.xpack.security.audit.AuditTrailService; -import org.elasticsearch.xpack.security.authc.Authentication.RealmRef; import org.elasticsearch.xpack.security.authc.AuthenticationService.Authenticator; -import org.elasticsearch.xpack.security.authc.Realm.Factory; import org.elasticsearch.xpack.security.authc.esnative.ReservedRealm; -import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken; -import org.elasticsearch.xpack.security.authz.permission.Role; -import org.elasticsearch.xpack.security.user.AnonymousUser; -import org.elasticsearch.xpack.security.user.SystemUser; -import org.elasticsearch.xpack.security.user.User; import org.junit.After; import org.junit.Before; @@ -78,8 +85,8 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.function.Consumer; import static org.elasticsearch.test.SecurityTestsUtils.assertAuthenticationException; +import static org.elasticsearch.xpack.core.security.support.Exceptions.authenticationError; import static org.elasticsearch.xpack.security.authc.TokenServiceTests.mockGetTokenFromId; -import static org.elasticsearch.xpack.security.support.Exceptions.authenticationError; import static org.hamcrest.Matchers.arrayContaining; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/InternalRealmsTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/InternalRealmsTests.java index 865b1842b6c..91e8111b54c 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/InternalRealmsTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/InternalRealmsTests.java @@ -11,12 +11,13 @@ import org.elasticsearch.env.TestEnvironment; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.watcher.ResourceWatcherService; +import org.elasticsearch.xpack.core.security.authc.Realm; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.esnative.NativeRealmSettings; +import org.elasticsearch.xpack.core.ssl.SSLService; import org.elasticsearch.xpack.security.SecurityLifecycleService; -import org.elasticsearch.xpack.security.authc.esnative.NativeRealm; -import org.elasticsearch.xpack.security.authc.esnative.NativeRealmSettings; import org.elasticsearch.xpack.security.authc.esnative.NativeUsersStore; import org.elasticsearch.xpack.security.authc.support.mapper.NativeRoleMappingStore; -import org.elasticsearch.xpack.ssl.SSLService; import java.util.Map; import java.util.function.BiConsumer; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/RealmSettingsTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/RealmSettingsTests.java index 5ebaea59175..ecc66387b94 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/RealmSettingsTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/RealmSettingsTests.java @@ -5,21 +5,22 @@ */ package org.elasticsearch.xpack.security.authc; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; - import org.elasticsearch.common.settings.MockSecureSettings; import org.elasticsearch.common.settings.SecureSettings; import org.elasticsearch.common.settings.Setting; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.SecuritySettingsSource; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.extensions.XPackExtension; -import org.elasticsearch.xpack.security.authc.support.Hasher; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.extensions.XPackExtension; +import org.elasticsearch.xpack.core.security.authc.RealmSettings; +import org.elasticsearch.xpack.core.security.authc.support.Hasher; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.hasSize; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/RealmsTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/RealmsTests.java index 6f84674002c..141d519cde7 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/RealmsTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/RealmsTests.java @@ -13,16 +13,18 @@ import org.elasticsearch.env.TestEnvironment; import org.elasticsearch.license.XPackLicenseState; import org.elasticsearch.license.XPackLicenseState.AllowedRealmType; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.security.authc.esnative.NativeRealmSettings; +import org.elasticsearch.xpack.core.security.authc.AuthenticationResult; +import org.elasticsearch.xpack.core.security.authc.AuthenticationToken; +import org.elasticsearch.xpack.core.security.authc.Realm; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.esnative.NativeRealmSettings; +import org.elasticsearch.xpack.core.security.authc.file.FileRealmSettings; +import org.elasticsearch.xpack.core.security.authc.ldap.LdapRealmSettings; +import org.elasticsearch.xpack.core.security.authc.saml.SamlRealmSettings; +import org.elasticsearch.xpack.core.security.user.User; import org.elasticsearch.xpack.security.authc.esnative.ReservedRealm; -import org.elasticsearch.xpack.security.authc.file.FileRealmSettings; -import org.elasticsearch.xpack.security.authc.ldap.LdapRealm; -import org.elasticsearch.xpack.security.authc.ldap.LdapRealmSettings; -import org.elasticsearch.xpack.security.authc.saml.SamlRealmSettings; -import org.elasticsearch.xpack.security.user.User; import org.junit.Before; -import java.math.BigInteger; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; @@ -274,7 +276,7 @@ public class RealmsTests extends ESTestCase { i = 0; while (iter.hasNext()) { realm = iter.next(); - assertThat(realm.type, is("ldap")); + assertThat(realm.getType(), is("ldap")); i++; } assertThat(i, is(1)); diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/RunAsIntegTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/RunAsIntegTests.java index d4cc93cb548..ce67b84134f 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/RunAsIntegTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/RunAsIntegTests.java @@ -20,11 +20,11 @@ import org.elasticsearch.common.transport.TransportAddress; import org.elasticsearch.test.SecurityIntegTestCase; import org.elasticsearch.test.SecuritySettingsSource; import org.elasticsearch.test.SecuritySettingsSourceField; -import org.elasticsearch.xpack.TestXPackTransportClient; +import org.elasticsearch.xpack.core.TestXPackTransportClient; +import org.elasticsearch.xpack.core.security.authc.AuthenticationServiceField; import org.elasticsearch.xpack.security.LocalStateSecurity; -import org.elasticsearch.xpack.security.Security; -import org.elasticsearch.xpack.security.SecurityField; -import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken; +import org.elasticsearch.xpack.core.security.SecurityField; +import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; import org.junit.BeforeClass; import java.util.Collections; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/TokenAuthIntegTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/TokenAuthIntegTests.java index 76fa95a144f..ec952d32fd1 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/TokenAuthIntegTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/TokenAuthIntegTests.java @@ -22,16 +22,17 @@ import org.elasticsearch.test.SecurityIntegTestCase; import org.elasticsearch.test.SecuritySettingsSource; import org.elasticsearch.test.SecuritySettingsSourceField; import org.elasticsearch.test.junit.annotations.TestLogging; -import org.elasticsearch.xpack.XPackSettings; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.security.action.token.CreateTokenResponse; +import org.elasticsearch.xpack.core.security.action.token.InvalidateTokenRequest; +import org.elasticsearch.xpack.core.security.action.token.InvalidateTokenResponse; +import org.elasticsearch.xpack.core.security.action.user.AuthenticateAction; +import org.elasticsearch.xpack.core.security.action.user.AuthenticateRequest; +import org.elasticsearch.xpack.core.security.action.user.AuthenticateResponse; +import org.elasticsearch.xpack.core.security.authc.TokenMetaData; +import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; +import org.elasticsearch.xpack.core.security.client.SecurityClient; import org.elasticsearch.xpack.security.SecurityLifecycleService; -import org.elasticsearch.xpack.security.action.token.CreateTokenResponse; -import org.elasticsearch.xpack.security.action.token.InvalidateTokenRequest; -import org.elasticsearch.xpack.security.action.token.InvalidateTokenResponse; -import org.elasticsearch.xpack.security.action.user.AuthenticateAction; -import org.elasticsearch.xpack.security.action.user.AuthenticateRequest; -import org.elasticsearch.xpack.security.action.user.AuthenticateResponse; -import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken; -import org.elasticsearch.xpack.security.client.SecurityClient; import org.junit.After; import org.junit.Before; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/TokenServiceTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/TokenServiceTests.java index e998f593779..2228d1d8eda 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/TokenServiceTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/TokenServiceTests.java @@ -43,17 +43,20 @@ import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.EqualsHashCodeTestUtils; import org.elasticsearch.threadpool.FixedExecutorBuilder; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.xpack.XPackSettings; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.security.authc.Authentication; +import org.elasticsearch.xpack.core.security.authc.Authentication.RealmRef; +import org.elasticsearch.xpack.core.security.authc.TokenMetaData; +import org.elasticsearch.xpack.core.security.user.User; +import org.elasticsearch.xpack.core.watcher.watch.ClockMock; import org.elasticsearch.xpack.security.SecurityLifecycleService; -import org.elasticsearch.xpack.security.authc.Authentication.RealmRef; import org.elasticsearch.xpack.security.authc.TokenService.BytesKey; -import org.elasticsearch.xpack.security.user.User; -import org.elasticsearch.xpack.watcher.watch.clock.ClockMock; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; import javax.crypto.SecretKey; + import java.io.IOException; import java.time.Clock; import java.time.Instant; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/UserTokenTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/UserTokenTests.java index 16cbaa2211a..1a8f8dc3b5d 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/UserTokenTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/UserTokenTests.java @@ -8,8 +8,9 @@ package org.elasticsearch.xpack.security.authc; import org.elasticsearch.common.io.stream.BytesStreamOutput; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.security.authc.Authentication.RealmRef; -import org.elasticsearch.xpack.security.user.User; +import org.elasticsearch.xpack.core.security.authc.Authentication; +import org.elasticsearch.xpack.core.security.authc.Authentication.RealmRef; +import org.elasticsearch.xpack.core.security.user.User; import java.io.IOException; import java.time.Clock; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/esnative/ESNativeMigrateToolTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/esnative/ESNativeMigrateToolTests.java index 3fb9920d409..ebe6b6abf18 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/esnative/ESNativeMigrateToolTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/esnative/ESNativeMigrateToolTests.java @@ -14,9 +14,9 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.env.Environment; import org.elasticsearch.test.NativeRealmIntegTestCase; import org.elasticsearch.test.SecuritySettingsSource; +import org.elasticsearch.xpack.core.security.authc.support.CharArrays; +import org.elasticsearch.xpack.core.security.client.SecurityClient; import org.elasticsearch.xpack.security.SecurityLifecycleService; -import org.elasticsearch.xpack.security.authc.support.CharArrays; -import org.elasticsearch.xpack.security.client.SecurityClient; import org.junit.BeforeClass; import java.nio.charset.StandardCharsets; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/esnative/ESNativeRealmMigrateToolTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/esnative/ESNativeRealmMigrateToolTests.java index 753c24beb7d..ed35152475e 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/esnative/ESNativeRealmMigrateToolTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/esnative/ESNativeRealmMigrateToolTests.java @@ -18,7 +18,7 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.env.Environment; import org.elasticsearch.env.TestEnvironment; import org.elasticsearch.test.SecuritySettingsSourceField; -import org.elasticsearch.xpack.security.authz.RoleDescriptor; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor; import java.io.FileNotFoundException; import java.nio.file.Files; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/esnative/NativeRealmIntegTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/esnative/NativeRealmIntegTests.java index cfbe2c579e1..36a49653645 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/esnative/NativeRealmIntegTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/esnative/NativeRealmIntegTests.java @@ -19,29 +19,28 @@ import org.elasticsearch.common.collect.MapBuilder; import org.elasticsearch.common.settings.SecureString; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.rest.RestStatus; -import org.elasticsearch.test.SecuritySettingsSourceField; -import org.elasticsearch.xpack.security.SecurityLifecycleService; -import org.elasticsearch.xpack.security.action.role.DeleteRoleResponse; -import org.elasticsearch.xpack.security.action.role.GetRolesResponse; -import org.elasticsearch.xpack.security.action.role.PutRoleResponse; -import org.elasticsearch.xpack.security.action.user.AuthenticateAction; -import org.elasticsearch.xpack.security.action.user.AuthenticateRequest; -import org.elasticsearch.xpack.security.action.user.AuthenticateResponse; -import org.elasticsearch.xpack.security.action.user.ChangePasswordResponse; -import org.elasticsearch.xpack.security.action.user.DeleteUserResponse; -import org.elasticsearch.xpack.security.action.user.GetUsersResponse; -import org.elasticsearch.xpack.security.authz.RoleDescriptor; -import org.elasticsearch.xpack.security.authz.permission.Role; -import org.elasticsearch.xpack.security.authz.store.NativeRolesStore; -import org.elasticsearch.xpack.security.authz.store.ReservedRolesStore; -import org.elasticsearch.xpack.security.client.SecurityClient; -import org.elasticsearch.xpack.security.user.AnonymousUser; -import org.elasticsearch.xpack.security.user.ElasticUser; -import org.elasticsearch.xpack.security.user.KibanaUser; -import org.elasticsearch.xpack.security.user.SystemUser; -import org.elasticsearch.xpack.security.user.User; import org.elasticsearch.test.NativeRealmIntegTestCase; import org.elasticsearch.test.SecuritySettingsSource; +import org.elasticsearch.test.SecuritySettingsSourceField; +import org.elasticsearch.xpack.core.security.action.role.DeleteRoleResponse; +import org.elasticsearch.xpack.core.security.action.role.GetRolesResponse; +import org.elasticsearch.xpack.core.security.action.role.PutRoleResponse; +import org.elasticsearch.xpack.core.security.action.user.AuthenticateAction; +import org.elasticsearch.xpack.core.security.action.user.AuthenticateRequest; +import org.elasticsearch.xpack.core.security.action.user.AuthenticateResponse; +import org.elasticsearch.xpack.core.security.action.user.ChangePasswordResponse; +import org.elasticsearch.xpack.core.security.action.user.DeleteUserResponse; +import org.elasticsearch.xpack.core.security.action.user.GetUsersResponse; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor; +import org.elasticsearch.xpack.core.security.authz.permission.Role; +import org.elasticsearch.xpack.core.security.authz.store.ReservedRolesStore; +import org.elasticsearch.xpack.core.security.client.SecurityClient; +import org.elasticsearch.xpack.core.security.user.AnonymousUser; +import org.elasticsearch.xpack.core.security.user.ElasticUser; +import org.elasticsearch.xpack.core.security.user.KibanaUser; +import org.elasticsearch.xpack.core.security.user.SystemUser; +import org.elasticsearch.xpack.core.security.user.User; +import org.elasticsearch.xpack.security.authz.store.NativeRolesStore; import org.junit.Before; import org.junit.BeforeClass; @@ -54,8 +53,8 @@ import java.util.concurrent.CountDownLatch; import static org.elasticsearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE; import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoTimeout; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; import static org.elasticsearch.xpack.security.SecurityLifecycleService.SECURITY_INDEX_NAME; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; import static org.elasticsearch.xpack.security.support.IndexLifecycleManager.INTERNAL_SECURITY_INDEX; import static org.hamcrest.Matchers.arrayContaining; import static org.hamcrest.Matchers.containsString; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/esnative/NativeRealmTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/esnative/NativeRealmTests.java index ebe8527ca07..8b64ad4b1ec 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/esnative/NativeRealmTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/esnative/NativeRealmTests.java @@ -11,7 +11,7 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.env.TestEnvironment; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; import java.util.concurrent.atomic.AtomicInteger; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/esnative/NativeUsersStoreTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/esnative/NativeUsersStoreTests.java index 77cc1c483e8..09c1c370e6e 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/esnative/NativeUsersStoreTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/esnative/NativeUsersStoreTests.java @@ -5,14 +5,6 @@ */ package org.elasticsearch.xpack.security.authc.esnative; -import java.io.IOException; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.CopyOnWriteArrayList; -import java.util.function.Consumer; - import org.elasticsearch.action.Action; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.ActionRequest; @@ -33,15 +25,23 @@ import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.index.get.GetResult; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.ThreadPool; +import org.elasticsearch.xpack.core.security.authc.AuthenticationResult; +import org.elasticsearch.xpack.core.security.authc.support.Hasher; +import org.elasticsearch.xpack.core.security.user.ElasticUser; +import org.elasticsearch.xpack.core.security.user.KibanaUser; +import org.elasticsearch.xpack.core.security.user.LogstashSystemUser; +import org.elasticsearch.xpack.core.security.user.User; import org.elasticsearch.xpack.security.SecurityLifecycleService; -import org.elasticsearch.xpack.security.authc.AuthenticationResult; -import org.elasticsearch.xpack.security.authc.support.Hasher; -import org.elasticsearch.xpack.security.user.ElasticUser; -import org.elasticsearch.xpack.security.user.KibanaUser; -import org.elasticsearch.xpack.security.user.LogstashSystemUser; -import org.elasticsearch.xpack.security.user.User; import org.junit.Before; +import java.io.IOException; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.CopyOnWriteArrayList; +import java.util.function.Consumer; + import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.CoreMatchers.equalTo; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/esnative/ReservedRealmIntegTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/esnative/ReservedRealmIntegTests.java index a0a4369bada..484c777059d 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/esnative/ReservedRealmIntegTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/esnative/ReservedRealmIntegTests.java @@ -9,16 +9,16 @@ import org.elasticsearch.ElasticsearchSecurityException; import org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse; import org.elasticsearch.common.settings.SecureString; import org.elasticsearch.test.NativeRealmIntegTestCase; -import org.elasticsearch.xpack.security.action.user.ChangePasswordResponse; -import org.elasticsearch.xpack.security.client.SecurityClient; -import org.elasticsearch.xpack.security.user.ElasticUser; -import org.elasticsearch.xpack.security.user.KibanaUser; -import org.elasticsearch.xpack.security.user.LogstashSystemUser; +import org.elasticsearch.xpack.core.security.action.user.ChangePasswordResponse; +import org.elasticsearch.xpack.core.security.client.SecurityClient; +import org.elasticsearch.xpack.core.security.user.ElasticUser; +import org.elasticsearch.xpack.core.security.user.KibanaUser; +import org.elasticsearch.xpack.core.security.user.LogstashSystemUser; import java.util.Arrays; import static java.util.Collections.singletonMap; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.notNullValue; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/esnative/ReservedRealmTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/esnative/ReservedRealmTests.java index 70fad13fac0..e94490cbe3a 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/esnative/ReservedRealmTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/esnative/ReservedRealmTests.java @@ -5,13 +5,6 @@ */ package org.elasticsearch.xpack.security.authc.esnative; -import java.util.Collection; -import java.util.Collections; -import java.util.Map; -import java.util.Map.Entry; -import java.util.concurrent.ExecutionException; -import java.util.function.Predicate; - import org.elasticsearch.ElasticsearchSecurityException; import org.elasticsearch.Version; import org.elasticsearch.action.ActionListener; @@ -22,21 +15,29 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.env.Environment; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.XPackSettings; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.security.authc.AuthenticationResult; +import org.elasticsearch.xpack.core.security.authc.esnative.ClientReservedRealm; +import org.elasticsearch.xpack.core.security.authc.support.Hasher; +import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; +import org.elasticsearch.xpack.core.security.user.AnonymousUser; +import org.elasticsearch.xpack.core.security.user.ElasticUser; +import org.elasticsearch.xpack.core.security.user.KibanaUser; +import org.elasticsearch.xpack.core.security.user.LogstashSystemUser; +import org.elasticsearch.xpack.core.security.user.User; +import org.elasticsearch.xpack.core.security.user.UsernamesField; import org.elasticsearch.xpack.security.SecurityLifecycleService; -import org.elasticsearch.xpack.security.authc.AuthenticationResult; import org.elasticsearch.xpack.security.authc.esnative.NativeUsersStore.ReservedUserInfo; -import org.elasticsearch.xpack.security.authc.support.Hasher; -import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken; -import org.elasticsearch.xpack.security.user.AnonymousUser; -import org.elasticsearch.xpack.security.user.ElasticUser; -import org.elasticsearch.xpack.security.user.KibanaUser; -import org.elasticsearch.xpack.security.user.LogstashSystemUser; -import org.elasticsearch.xpack.security.user.User; -import org.elasticsearch.xpack.security.user.UsernamesField; import org.junit.Before; import org.mockito.ArgumentCaptor; +import java.util.Collection; +import java.util.Collections; +import java.util.Map; +import java.util.Map.Entry; +import java.util.concurrent.ExecutionException; +import java.util.function.Predicate; + import static org.hamcrest.Matchers.contains; import static org.hamcrest.Matchers.containsInAnyOrder; import static org.hamcrest.Matchers.containsString; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/esnative/tool/SetupPasswordToolTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/esnative/tool/SetupPasswordToolTests.java index a0adb092dc8..d556f44fbab 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/esnative/tool/SetupPasswordToolTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/esnative/tool/SetupPasswordToolTests.java @@ -8,7 +8,6 @@ package org.elasticsearch.xpack.security.authc.esnative.tool; import org.elasticsearch.cli.Command; import org.elasticsearch.cli.CommandTestCase; import org.elasticsearch.cli.ExitCodes; -import org.elasticsearch.cli.Terminal; import org.elasticsearch.cli.UserException; import org.elasticsearch.common.CheckedConsumer; import org.elasticsearch.common.CheckedSupplier; @@ -20,14 +19,17 @@ import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.json.JsonXContent; import org.elasticsearch.env.Environment; import org.elasticsearch.env.TestEnvironment; +import org.elasticsearch.xpack.core.security.support.Validation; +import org.elasticsearch.xpack.core.security.user.ElasticUser; import org.elasticsearch.xpack.security.authc.esnative.ReservedRealm; -import org.elasticsearch.xpack.security.support.Validation; -import org.elasticsearch.xpack.security.user.ElasticUser; import org.hamcrest.CoreMatchers; import org.junit.Before; import org.mockito.ArgumentCaptor; import org.mockito.InOrder; import org.mockito.Mockito; + +import javax.net.ssl.SSLException; + import java.io.IOException; import java.net.HttpURLConnection; import java.net.MalformedURLException; @@ -39,10 +41,10 @@ import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Map; -import javax.net.ssl.SSLException; + +import static org.mockito.Matchers.any; import static org.mockito.Matchers.anyString; import static org.mockito.Matchers.eq; -import static org.mockito.Matchers.any; import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/file/FileRealmTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/file/FileRealmTests.java index 3851f75884b..b1500cc7520 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/file/FileRealmTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/file/FileRealmTests.java @@ -5,10 +5,6 @@ */ package org.elasticsearch.xpack.security.authc.file; -import java.util.Locale; -import java.util.Map; -import java.util.function.Supplier; - import org.elasticsearch.action.support.PlainActionFuture; import org.elasticsearch.common.settings.SecureString; import org.elasticsearch.common.settings.Settings; @@ -16,14 +12,18 @@ import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.env.TestEnvironment; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.watcher.ResourceWatcherService; -import org.elasticsearch.xpack.security.authc.AuthenticationResult; -import org.elasticsearch.xpack.security.authc.RealmConfig; -import org.elasticsearch.xpack.security.authc.support.Hasher; -import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken; -import org.elasticsearch.xpack.security.user.User; +import org.elasticsearch.xpack.core.security.authc.AuthenticationResult; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.support.Hasher; +import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; +import org.elasticsearch.xpack.core.security.user.User; import org.junit.Before; import org.mockito.stubbing.Answer; +import java.util.Locale; +import java.util.Map; +import java.util.function.Supplier; + import static org.hamcrest.Matchers.arrayContaining; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasEntry; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/file/FileUserPasswdStoreTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/file/FileUserPasswdStoreTests.java index 22b3f1f664e..1f139ab0301 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/file/FileUserPasswdStoreTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/file/FileUserPasswdStoreTests.java @@ -5,6 +5,25 @@ */ package org.elasticsearch.xpack.security.authc.file; +import org.apache.logging.log4j.Level; +import org.apache.logging.log4j.Logger; +import org.elasticsearch.common.settings.SecureString; +import org.elasticsearch.common.settings.Settings; +import org.elasticsearch.env.Environment; +import org.elasticsearch.env.TestEnvironment; +import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.threadpool.TestThreadPool; +import org.elasticsearch.threadpool.ThreadPool; +import org.elasticsearch.watcher.ResourceWatcherService; +import org.elasticsearch.xpack.core.XPackField; +import org.elasticsearch.xpack.core.security.audit.logfile.CapturingLogger; +import org.elasticsearch.xpack.core.security.authc.AuthenticationResult; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.support.Hasher; +import org.elasticsearch.xpack.core.security.user.User; +import org.junit.After; +import org.junit.Before; + import java.io.BufferedWriter; import java.nio.charset.StandardCharsets; import java.nio.file.Files; @@ -18,25 +37,6 @@ import java.util.Map; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; -import org.apache.logging.log4j.Level; -import org.apache.logging.log4j.Logger; -import org.elasticsearch.common.settings.SecureString; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.env.Environment; -import org.elasticsearch.env.TestEnvironment; -import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.threadpool.TestThreadPool; -import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.watcher.ResourceWatcherService; -import org.elasticsearch.xpack.XPackField; -import org.elasticsearch.xpack.security.audit.logfile.CapturingLogger; -import org.elasticsearch.xpack.security.authc.AuthenticationResult; -import org.elasticsearch.xpack.security.authc.RealmConfig; -import org.elasticsearch.xpack.security.authc.support.Hasher; -import org.elasticsearch.xpack.security.user.User; -import org.junit.After; -import org.junit.Before; - import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.empty; import static org.hamcrest.Matchers.equalTo; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/file/FileUserRolesStoreTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/file/FileUserRolesStoreTests.java index abac74a1b9e..aae1ec71941 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/file/FileUserRolesStoreTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/file/FileUserRolesStoreTests.java @@ -16,10 +16,10 @@ import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.TestThreadPool; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.watcher.ResourceWatcherService; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.XPackField; -import org.elasticsearch.xpack.security.audit.logfile.CapturingLogger; -import org.elasticsearch.xpack.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.XPackField; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.security.audit.logfile.CapturingLogger; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; import org.junit.After; import org.junit.Before; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/AbstractActiveDirectoryIntegTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/AbstractActiveDirectoryIntegTests.java index d8dde2106af..e6342f2acda 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/AbstractActiveDirectoryIntegTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/AbstractActiveDirectoryIntegTests.java @@ -9,16 +9,16 @@ import com.unboundid.ldap.sdk.LDAPConnection; import com.unboundid.ldap.sdk.LDAPConnectionPool; import com.unboundid.ldap.sdk.LDAPException; import com.unboundid.ldap.sdk.LDAPInterface; - import org.elasticsearch.common.settings.Settings; import org.elasticsearch.env.Environment; import org.elasticsearch.env.TestEnvironment; -import org.elasticsearch.xpack.security.authc.ldap.support.LdapSearchScope; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.junit.annotations.Network; -import org.elasticsearch.xpack.security.authc.ldap.support.SessionFactorySettings; -import org.elasticsearch.xpack.ssl.SSLService; -import org.elasticsearch.xpack.ssl.VerificationMode; +import org.elasticsearch.xpack.core.security.authc.ldap.ActiveDirectorySessionFactorySettings; +import org.elasticsearch.xpack.core.security.authc.ldap.support.LdapSearchScope; +import org.elasticsearch.xpack.core.security.authc.ldap.support.SessionFactorySettings; +import org.elasticsearch.xpack.core.ssl.SSLService; +import org.elasticsearch.xpack.core.ssl.VerificationMode; import org.junit.Before; import java.nio.file.Path; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectoryGroupsResolverTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectoryGroupsResolverTests.java index 7f16e2e5eaf..5b65568a824 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectoryGroupsResolverTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectoryGroupsResolverTests.java @@ -9,9 +9,9 @@ import com.unboundid.ldap.sdk.Filter; import org.elasticsearch.action.support.PlainActionFuture; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.xpack.security.authc.ldap.support.LdapSearchScope; -import org.elasticsearch.xpack.security.support.NoOpLogger; import org.elasticsearch.test.junit.annotations.Network; +import org.elasticsearch.xpack.core.security.authc.ldap.support.LdapSearchScope; +import org.elasticsearch.xpack.core.security.support.NoOpLogger; import java.util.List; import java.util.regex.Pattern; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectoryRealmTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectoryRealmTests.java index ca27c452655..98090174abe 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectoryRealmTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectoryRealmTests.java @@ -22,17 +22,20 @@ import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.TestThreadPool; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.watcher.ResourceWatcherService; -import org.elasticsearch.xpack.security.authc.AuthenticationResult; -import org.elasticsearch.xpack.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.AuthenticationResult; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.ldap.ActiveDirectorySessionFactorySettings; +import org.elasticsearch.xpack.core.security.authc.ldap.LdapRealmSettings; +import org.elasticsearch.xpack.core.security.authc.ldap.PoolingSessionFactorySettings; +import org.elasticsearch.xpack.core.security.authc.support.CachingUsernamePasswordRealmSettings; +import org.elasticsearch.xpack.core.security.authc.support.DnRoleMapperSettings; +import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; +import org.elasticsearch.xpack.core.security.user.User; +import org.elasticsearch.xpack.core.ssl.SSLService; +import org.elasticsearch.xpack.core.ssl.VerificationMode; import org.elasticsearch.xpack.security.authc.ldap.ActiveDirectorySessionFactory.DownLevelADAuthenticator; import org.elasticsearch.xpack.security.authc.ldap.ActiveDirectorySessionFactory.UpnADAuthenticator; -import org.elasticsearch.xpack.security.authc.support.CachingUsernamePasswordRealmSettings; import org.elasticsearch.xpack.security.authc.support.DnRoleMapper; -import org.elasticsearch.xpack.security.authc.support.DnRoleMapperSettings; -import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken; -import org.elasticsearch.xpack.security.user.User; -import org.elasticsearch.xpack.ssl.SSLService; -import org.elasticsearch.xpack.ssl.VerificationMode; import org.junit.After; import org.junit.Before; import org.junit.BeforeClass; @@ -43,8 +46,8 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; -import static org.elasticsearch.xpack.security.authc.ldap.support.SessionFactorySettings.HOSTNAME_VERIFICATION_SETTING; -import static org.elasticsearch.xpack.security.authc.ldap.support.SessionFactorySettings.URLS_SETTING; +import static org.elasticsearch.xpack.core.security.authc.ldap.support.SessionFactorySettings.HOSTNAME_VERIFICATION_SETTING; +import static org.elasticsearch.xpack.core.security.authc.ldap.support.SessionFactorySettings.URLS_SETTING; import static org.hamcrest.Matchers.arrayContaining; import static org.hamcrest.Matchers.arrayContainingInAnyOrder; import static org.hamcrest.Matchers.containsString; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectorySessionFactoryTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectorySessionFactoryTests.java index b3d3c3bb716..d52edb67cb4 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectorySessionFactoryTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectorySessionFactoryTests.java @@ -13,17 +13,18 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.common.util.concurrent.UncategorizedExecutionException; import org.elasticsearch.env.TestEnvironment; -import org.elasticsearch.xpack.security.authc.RealmConfig; -import org.elasticsearch.xpack.security.authc.ldap.support.LdapSearchScope; -import org.elasticsearch.xpack.security.authc.ldap.support.LdapSession; -import org.elasticsearch.xpack.security.authc.ldap.support.LdapTestCase; -import org.elasticsearch.xpack.security.authc.ldap.support.SessionFactory; import org.elasticsearch.test.junit.annotations.Network; import org.elasticsearch.threadpool.TestThreadPool; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.xpack.security.authc.ldap.support.SessionFactorySettings; -import org.elasticsearch.xpack.ssl.SSLService; -import org.elasticsearch.xpack.ssl.VerificationMode; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.ldap.ActiveDirectorySessionFactorySettings; +import org.elasticsearch.xpack.core.security.authc.ldap.support.LdapSearchScope; +import org.elasticsearch.xpack.core.security.authc.ldap.support.SessionFactorySettings; +import org.elasticsearch.xpack.core.ssl.SSLService; +import org.elasticsearch.xpack.core.ssl.VerificationMode; +import org.elasticsearch.xpack.security.authc.ldap.support.LdapSession; +import org.elasticsearch.xpack.security.authc.ldap.support.LdapTestCase; +import org.elasticsearch.xpack.security.authc.ldap.support.SessionFactory; import org.junit.After; import org.junit.Before; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/CancellableLdapRunnableTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/CancellableLdapRunnableTests.java index f0e82f29a76..18b84df6d61 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/CancellableLdapRunnableTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/CancellableLdapRunnableTests.java @@ -5,15 +5,15 @@ */ package org.elasticsearch.xpack.security.authc.ldap; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.atomic.AtomicBoolean; -import java.util.concurrent.atomic.AtomicReference; - import org.elasticsearch.ElasticsearchTimeoutException; import org.elasticsearch.action.ActionListener; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.security.user.User; import org.elasticsearch.xpack.security.authc.ldap.LdapRealm.CancellableLdapRunnable; -import org.elasticsearch.xpack.security.user.User; + +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicReference; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/LdapRealmTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/LdapRealmTests.java index 8163dc1803b..97cc7fc5d4d 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/LdapRealmTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/LdapRealmTests.java @@ -15,18 +15,21 @@ import org.elasticsearch.env.TestEnvironment; import org.elasticsearch.threadpool.TestThreadPool; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.watcher.ResourceWatcherService; -import org.elasticsearch.xpack.security.authc.AuthenticationResult; -import org.elasticsearch.xpack.security.authc.RealmConfig; -import org.elasticsearch.xpack.security.authc.ldap.support.LdapSearchScope; +import org.elasticsearch.xpack.core.security.authc.AuthenticationResult; +import org.elasticsearch.xpack.core.security.authc.Realm; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.ldap.LdapRealmSettings; +import org.elasticsearch.xpack.core.security.authc.ldap.LdapSessionFactorySettings; +import org.elasticsearch.xpack.core.security.authc.ldap.support.LdapSearchScope; +import org.elasticsearch.xpack.core.security.authc.support.CachingUsernamePasswordRealmSettings; +import org.elasticsearch.xpack.core.security.authc.support.DnRoleMapperSettings; +import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; +import org.elasticsearch.xpack.core.security.user.User; +import org.elasticsearch.xpack.core.ssl.SSLService; +import org.elasticsearch.xpack.core.ssl.VerificationMode; import org.elasticsearch.xpack.security.authc.ldap.support.LdapTestCase; import org.elasticsearch.xpack.security.authc.ldap.support.SessionFactory; -import org.elasticsearch.xpack.security.authc.support.CachingUsernamePasswordRealmSettings; import org.elasticsearch.xpack.security.authc.support.DnRoleMapper; -import org.elasticsearch.xpack.security.authc.support.DnRoleMapperSettings; -import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken; -import org.elasticsearch.xpack.security.user.User; -import org.elasticsearch.xpack.ssl.SSLService; -import org.elasticsearch.xpack.ssl.VerificationMode; import org.junit.After; import org.junit.Before; @@ -34,7 +37,7 @@ import java.util.Arrays; import java.util.List; import java.util.Map; -import static org.elasticsearch.xpack.security.authc.ldap.support.SessionFactorySettings.URLS_SETTING; +import static org.elasticsearch.xpack.core.security.authc.ldap.support.SessionFactorySettings.URLS_SETTING; import static org.hamcrest.Matchers.arrayContaining; import static org.hamcrest.Matchers.contains; import static org.hamcrest.Matchers.containsString; @@ -298,7 +301,7 @@ public class LdapRealmTests extends LdapTestCase { } /** - * The contract for {@link org.elasticsearch.xpack.security.authc.Realm} implementations is that they should log-and-return-null (and + * The contract for {@link Realm} implementations is that they should log-and-return-null (and * not call {@link ActionListener#onFailure(Exception)}) if there is an internal exception that prevented them from performing an * authentication. * This method tests that when an LDAP server is unavailable (invalid hostname), there is a null result diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/LdapSessionFactoryTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/LdapSessionFactoryTests.java index 64945b870f6..c9f46ebf319 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/LdapSessionFactoryTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/LdapSessionFactoryTests.java @@ -7,23 +7,21 @@ package org.elasticsearch.xpack.security.authc.ldap; import com.unboundid.ldap.listener.InMemoryDirectoryServer; import com.unboundid.ldap.sdk.LDAPException; -import com.unboundid.ldap.sdk.LDAPInterface; import com.unboundid.ldap.sdk.LDAPURL; import org.elasticsearch.common.settings.SecureString; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.common.util.concurrent.UncategorizedExecutionException; import org.elasticsearch.env.TestEnvironment; -import org.elasticsearch.xpack.security.authc.RealmConfig; -import org.elasticsearch.xpack.security.authc.ldap.support.LdapSearchScope; -import org.elasticsearch.xpack.security.authc.ldap.support.LdapSession; -import org.elasticsearch.xpack.security.authc.ldap.support.LdapTestCase; -import org.elasticsearch.xpack.security.authc.ldap.support.SessionFactory; import org.elasticsearch.test.junit.annotations.Network; import org.elasticsearch.threadpool.TestThreadPool; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.xpack.security.authc.ldap.support.SessionFactorySettings; -import org.elasticsearch.xpack.ssl.SSLService; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.ldap.support.LdapSearchScope; +import org.elasticsearch.xpack.core.security.authc.ldap.support.SessionFactorySettings; +import org.elasticsearch.xpack.core.ssl.SSLService; +import org.elasticsearch.xpack.security.authc.ldap.support.LdapSession; +import org.elasticsearch.xpack.security.authc.ldap.support.LdapTestCase; import org.junit.After; import org.junit.Before; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/LdapTestUtils.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/LdapTestUtils.java index 95ca0f33e06..dced24544aa 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/LdapTestUtils.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/LdapTestUtils.java @@ -5,8 +5,6 @@ */ package org.elasticsearch.xpack.security.authc.ldap; -import java.nio.file.Path; - import com.unboundid.ldap.sdk.LDAPConnection; import com.unboundid.ldap.sdk.LDAPConnectionOptions; import com.unboundid.ldap.sdk.LDAPURL; @@ -16,11 +14,12 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.env.Environment; import org.elasticsearch.env.TestEnvironment; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.security.authc.ldap.support.SessionFactorySettings; +import org.elasticsearch.xpack.core.ssl.SSLService; +import org.elasticsearch.xpack.core.ssl.VerificationMode; import org.elasticsearch.xpack.security.authc.ldap.support.LdapUtils; -import org.elasticsearch.xpack.security.authc.ldap.support.SessionFactory; -import org.elasticsearch.xpack.security.authc.ldap.support.SessionFactorySettings; -import org.elasticsearch.xpack.ssl.SSLService; -import org.elasticsearch.xpack.ssl.VerificationMode; + +import java.nio.file.Path; public class LdapTestUtils { diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/LdapUserSearchSessionFactoryTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/LdapUserSearchSessionFactoryTests.java index c1a40c0790d..d79474dadd9 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/LdapUserSearchSessionFactoryTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/LdapUserSearchSessionFactoryTests.java @@ -24,16 +24,18 @@ import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.env.Environment; import org.elasticsearch.env.TestEnvironment; -import org.elasticsearch.xpack.security.authc.RealmConfig; -import org.elasticsearch.xpack.security.authc.ldap.support.LdapSearchScope; -import org.elasticsearch.xpack.security.authc.ldap.support.LdapSession; -import org.elasticsearch.xpack.security.authc.ldap.support.LdapTestCase; -import org.elasticsearch.xpack.security.authc.ldap.support.SessionFactorySettings; -import org.elasticsearch.xpack.ssl.SSLService; -import org.elasticsearch.xpack.security.support.NoOpLogger; import org.elasticsearch.test.junit.annotations.Network; import org.elasticsearch.threadpool.TestThreadPool; import org.elasticsearch.threadpool.ThreadPool; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.ldap.LdapUserSearchSessionFactorySettings; +import org.elasticsearch.xpack.core.security.authc.ldap.PoolingSessionFactorySettings; +import org.elasticsearch.xpack.core.security.authc.ldap.support.LdapSearchScope; +import org.elasticsearch.xpack.core.security.authc.ldap.support.SessionFactorySettings; +import org.elasticsearch.xpack.core.security.support.NoOpLogger; +import org.elasticsearch.xpack.core.ssl.SSLService; +import org.elasticsearch.xpack.security.authc.ldap.support.LdapSession; +import org.elasticsearch.xpack.security.authc.ldap.support.LdapTestCase; import org.junit.After; import org.junit.Before; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/SearchGroupsResolverInMemoryTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/SearchGroupsResolverInMemoryTests.java index f81ae161d10..fb20c08da61 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/SearchGroupsResolverInMemoryTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/SearchGroupsResolverInMemoryTests.java @@ -19,7 +19,7 @@ import com.unboundid.ldap.sdk.SingleServerSet; import org.elasticsearch.action.support.PlainActionFuture; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.xpack.security.authc.ldap.support.LdapSearchScope; +import org.elasticsearch.xpack.core.security.authc.ldap.support.LdapSearchScope; import org.elasticsearch.xpack.security.authc.ldap.support.LdapTestCase; import org.elasticsearch.xpack.security.authc.ldap.support.LdapUtils; import org.junit.After; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/UserAttributeGroupsResolverTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/UserAttributeGroupsResolverTests.java index aec0e6160ba..a7ad54876db 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/UserAttributeGroupsResolverTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/UserAttributeGroupsResolverTests.java @@ -10,9 +10,9 @@ import com.unboundid.ldap.sdk.SearchRequest; import com.unboundid.ldap.sdk.SearchScope; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.xpack.security.authc.ldap.support.LdapUtils; -import org.elasticsearch.xpack.security.support.NoOpLogger; import org.elasticsearch.test.junit.annotations.Network; +import org.elasticsearch.xpack.core.security.support.NoOpLogger; +import org.elasticsearch.xpack.security.authc.ldap.support.LdapUtils; import java.util.Collection; import java.util.List; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapLoadBalancingTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapLoadBalancingTests.java index 66c825f82f5..00e111fa9d8 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapLoadBalancingTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapLoadBalancingTests.java @@ -11,6 +11,7 @@ import com.unboundid.ldap.sdk.RoundRobinServerSet; import com.unboundid.ldap.sdk.ServerSet; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.security.authc.ldap.support.LdapLoadBalancingSettings; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.instanceOf; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapTestCase.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapTestCase.java index 77041cc3e7e..a874494d58f 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapTestCase.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapTestCase.java @@ -21,11 +21,14 @@ import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.env.TestEnvironment; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.watcher.ResourceWatcherService; -import org.elasticsearch.xpack.security.authc.RealmConfig; -import org.elasticsearch.xpack.security.authc.ldap.LdapSessionFactorySettings; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.ldap.LdapSessionFactorySettings; +import org.elasticsearch.xpack.core.security.authc.ldap.support.LdapLoadBalancingSettings; +import org.elasticsearch.xpack.core.security.authc.ldap.support.LdapSearchScope; +import org.elasticsearch.xpack.core.security.authc.ldap.support.SessionFactorySettings; +import org.elasticsearch.xpack.core.security.authc.support.DnRoleMapperSettings; +import org.elasticsearch.xpack.core.ssl.VerificationMode; import org.elasticsearch.xpack.security.authc.support.DnRoleMapper; -import org.elasticsearch.xpack.security.authc.support.DnRoleMapperSettings; -import org.elasticsearch.xpack.ssl.VerificationMode; import org.junit.After; import org.junit.Before; import org.junit.BeforeClass; @@ -37,8 +40,8 @@ import java.util.ArrayList; import java.util.List; import java.util.Objects; -import static org.elasticsearch.xpack.security.authc.ldap.support.SessionFactorySettings.HOSTNAME_VERIFICATION_SETTING; -import static org.elasticsearch.xpack.security.authc.ldap.support.SessionFactorySettings.URLS_SETTING; +import static org.elasticsearch.xpack.core.security.authc.ldap.support.SessionFactorySettings.HOSTNAME_VERIFICATION_SETTING; +import static org.elasticsearch.xpack.core.security.authc.ldap.support.SessionFactorySettings.URLS_SETTING; // public abstract class LdapTestCase extends ESTestCase { diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/support/SessionFactoryLoadBalancingTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/support/SessionFactoryLoadBalancingTests.java index 6e5152cb9c0..1a9a5b4d56e 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/support/SessionFactoryLoadBalancingTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/support/SessionFactoryLoadBalancingTests.java @@ -17,8 +17,9 @@ import org.elasticsearch.mocksocket.MockSocket; import org.elasticsearch.test.junit.annotations.TestLogging; import org.elasticsearch.threadpool.TestThreadPool; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.xpack.security.authc.RealmConfig; -import org.elasticsearch.xpack.ssl.SSLService; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.ldap.support.LdapSearchScope; +import org.elasticsearch.xpack.core.ssl.SSLService; import org.junit.After; import org.junit.Before; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/support/SessionFactoryTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/support/SessionFactoryTests.java index 53c93c4a154..1a5fa6af5f8 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/support/SessionFactoryTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/support/SessionFactoryTests.java @@ -15,12 +15,13 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.env.Environment; import org.elasticsearch.env.TestEnvironment; -import org.elasticsearch.xpack.security.authc.RealmConfig; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.TestThreadPool; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.xpack.ssl.SSLService; -import org.elasticsearch.xpack.ssl.VerificationMode; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.ldap.support.SessionFactorySettings; +import org.elasticsearch.xpack.core.ssl.SSLService; +import org.elasticsearch.xpack.core.ssl.VerificationMode; import org.junit.After; import org.junit.Before; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/pki/PkiAuthenticationTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/pki/PkiAuthenticationTests.java index 5f28fa1bf24..30c3686efaf 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/pki/PkiAuthenticationTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/pki/PkiAuthenticationTests.java @@ -23,18 +23,18 @@ import org.elasticsearch.test.ESIntegTestCase.ClusterScope; import org.elasticsearch.test.SecurityIntegTestCase; import org.elasticsearch.test.SecuritySettingsSource; import org.elasticsearch.transport.Transport; -import org.elasticsearch.xpack.TestXPackTransportClient; -import org.elasticsearch.xpack.common.socket.SocketAccess; +import org.elasticsearch.xpack.core.TestXPackTransportClient; +import org.elasticsearch.xpack.core.common.socket.SocketAccess; +import org.elasticsearch.xpack.core.security.SecurityField; +import org.elasticsearch.xpack.core.security.authc.file.FileRealmSettings; +import org.elasticsearch.xpack.core.security.authc.pki.PkiRealmSettings; +import org.elasticsearch.xpack.core.ssl.SSLClientAuth; import org.elasticsearch.xpack.security.LocalStateSecurity; -import org.elasticsearch.xpack.security.Security; -import org.elasticsearch.xpack.security.SecurityField; -import org.elasticsearch.xpack.security.authc.file.FileRealm; -import org.elasticsearch.xpack.security.authc.file.FileRealmSettings; -import org.elasticsearch.xpack.ssl.SSLClientAuth; import javax.net.ssl.KeyManagerFactory; import javax.net.ssl.SSLContext; import javax.net.ssl.TrustManagerFactory; + import java.io.InputStream; import java.net.InetSocketAddress; import java.nio.file.Files; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/pki/PkiOptionalClientAuthTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/pki/PkiOptionalClientAuthTests.java index 7db3b84390b..305fad85cf5 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/pki/PkiOptionalClientAuthTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/pki/PkiOptionalClientAuthTests.java @@ -16,12 +16,13 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.test.SecurityIntegTestCase; import org.elasticsearch.test.SecuritySettingsSource; import org.elasticsearch.test.SecuritySettingsSourceField; -import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken; -import org.elasticsearch.xpack.ssl.SSLClientAuth; +import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; +import org.elasticsearch.xpack.core.ssl.SSLClientAuth; import org.junit.BeforeClass; import javax.net.ssl.SSLContext; import javax.net.ssl.TrustManagerFactory; + import java.io.InputStream; import java.nio.file.Files; import java.nio.file.Path; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/pki/PkiRealmTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/pki/PkiRealmTests.java index c3a5e1bdc1a..82b6faf5059 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/pki/PkiRealmTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/pki/PkiRealmTests.java @@ -5,19 +5,6 @@ */ package org.elasticsearch.xpack.security.authc.pki; -import javax.security.auth.x500.X500Principal; -import java.io.InputStream; -import java.nio.file.Files; -import java.nio.file.Path; -import java.security.cert.CertificateFactory; -import java.security.cert.X509Certificate; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.List; -import java.util.Set; -import java.util.regex.Pattern; - import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.support.PlainActionFuture; import org.elasticsearch.common.settings.ClusterSettings; @@ -28,17 +15,32 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.env.TestEnvironment; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.security.authc.AuthenticationResult; -import org.elasticsearch.xpack.security.authc.RealmConfig; -import org.elasticsearch.xpack.security.authc.RealmSettings; +import org.elasticsearch.xpack.core.security.authc.AuthenticationResult; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.RealmSettings; +import org.elasticsearch.xpack.core.security.authc.pki.PkiRealmSettings; +import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; +import org.elasticsearch.xpack.core.security.support.NoOpLogger; +import org.elasticsearch.xpack.core.security.user.User; +import org.elasticsearch.xpack.core.ssl.SSLConfigurationSettings; import org.elasticsearch.xpack.security.authc.support.UserRoleMapper; -import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken; -import org.elasticsearch.xpack.security.support.NoOpLogger; -import org.elasticsearch.xpack.security.user.User; -import org.elasticsearch.xpack.ssl.SSLConfigurationSettings; import org.junit.Before; import org.mockito.Mockito; +import javax.security.auth.x500.X500Principal; + +import java.io.InputStream; +import java.nio.file.Files; +import java.nio.file.Path; +import java.security.cert.CertificateFactory; +import java.security.cert.X509Certificate; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.regex.Pattern; + import static org.hamcrest.Matchers.arrayContainingInAnyOrder; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.is; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/saml/SamlAuthenticatorTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/saml/SamlAuthenticatorTests.java index 0cb95fbf567..e3cbcad4e9e 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/saml/SamlAuthenticatorTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/saml/SamlAuthenticatorTests.java @@ -5,42 +5,6 @@ */ package org.elasticsearch.xpack.security.authc.saml; -import javax.crypto.Cipher; -import javax.crypto.KeyGenerator; -import javax.xml.crypto.dsig.CanonicalizationMethod; -import javax.xml.crypto.dsig.DigestMethod; -import javax.xml.crypto.dsig.Reference; -import javax.xml.crypto.dsig.SignatureMethod; -import javax.xml.crypto.dsig.SignedInfo; -import javax.xml.crypto.dsig.Transform; -import javax.xml.crypto.dsig.XMLSignature; -import javax.xml.crypto.dsig.XMLSignatureFactory; -import javax.xml.crypto.dsig.dom.DOMSignContext; -import javax.xml.crypto.dsig.keyinfo.KeyInfo; -import javax.xml.crypto.dsig.keyinfo.KeyInfoFactory; -import javax.xml.crypto.dsig.spec.C14NMethodParameterSpec; -import javax.xml.crypto.dsig.spec.TransformParameterSpec; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; -import java.io.IOException; -import java.io.StringReader; -import java.nio.charset.StandardCharsets; -import java.security.Key; -import java.security.KeyException; -import java.security.NoSuchAlgorithmException; -import java.security.PrivateKey; -import java.security.cert.X509Certificate; -import java.time.Instant; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.function.Supplier; - import org.apache.xml.security.Init; import org.apache.xml.security.encryption.EncryptedData; import org.apache.xml.security.encryption.EncryptedKey; @@ -58,8 +22,8 @@ import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.env.Environment; import org.elasticsearch.env.TestEnvironment; -import org.elasticsearch.xpack.security.authc.RealmConfig; -import org.elasticsearch.xpack.watcher.watch.clock.ClockMock; +import org.elasticsearch.xpack.core.watcher.watch.ClockMock; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; import org.hamcrest.Matchers; import org.junit.AfterClass; import org.junit.Before; @@ -80,6 +44,43 @@ import org.w3c.dom.NodeList; import org.xml.sax.InputSource; import org.xml.sax.SAXException; +import javax.crypto.Cipher; +import javax.crypto.KeyGenerator; +import javax.xml.crypto.dsig.CanonicalizationMethod; +import javax.xml.crypto.dsig.DigestMethod; +import javax.xml.crypto.dsig.Reference; +import javax.xml.crypto.dsig.SignatureMethod; +import javax.xml.crypto.dsig.SignedInfo; +import javax.xml.crypto.dsig.Transform; +import javax.xml.crypto.dsig.XMLSignature; +import javax.xml.crypto.dsig.XMLSignatureFactory; +import javax.xml.crypto.dsig.dom.DOMSignContext; +import javax.xml.crypto.dsig.keyinfo.KeyInfo; +import javax.xml.crypto.dsig.keyinfo.KeyInfoFactory; +import javax.xml.crypto.dsig.spec.C14NMethodParameterSpec; +import javax.xml.crypto.dsig.spec.TransformParameterSpec; +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; + +import java.io.IOException; +import java.io.StringReader; +import java.nio.charset.StandardCharsets; +import java.security.Key; +import java.security.KeyException; +import java.security.NoSuchAlgorithmException; +import java.security.PrivateKey; +import java.security.cert.X509Certificate; +import java.time.Instant; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Supplier; + import static java.util.Collections.emptyList; import static java.util.Collections.singletonList; import static javax.xml.crypto.dsig.CanonicalizationMethod.EXCLUSIVE; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/saml/SamlLogoutRequestHandlerTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/saml/SamlLogoutRequestHandlerTests.java index c819945cc3a..0077f816292 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/saml/SamlLogoutRequestHandlerTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/saml/SamlLogoutRequestHandlerTests.java @@ -20,7 +20,7 @@ import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.common.util.set.Sets; import org.elasticsearch.env.Environment; import org.elasticsearch.env.TestEnvironment; -import org.elasticsearch.xpack.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; import org.joda.time.DateTime; import org.junit.AfterClass; import org.junit.Before; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/saml/SamlMetadataCommandTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/saml/SamlMetadataCommandTests.java index 315b650124e..b8343062144 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/saml/SamlMetadataCommandTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/saml/SamlMetadataCommandTests.java @@ -5,18 +5,14 @@ */ package org.elasticsearch.xpack.security.authc.saml; -import java.nio.file.Path; -import java.util.Collections; -import java.util.List; - import joptsimple.OptionSet; import org.elasticsearch.cli.MockTerminal; import org.elasticsearch.cli.UserException; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.env.Environment; import org.elasticsearch.env.TestEnvironment; -import org.elasticsearch.xpack.security.authc.RealmSettings; -import org.elasticsearch.xpack.ssl.CertUtils; +import org.elasticsearch.xpack.core.security.authc.RealmSettings; +import org.elasticsearch.xpack.core.ssl.CertUtils; import org.junit.Before; import org.opensaml.saml.common.xml.SAMLConstants; import org.opensaml.saml.saml2.metadata.EntityDescriptor; @@ -27,6 +23,10 @@ import org.opensaml.xmlsec.keyinfo.KeyInfoSupport; import org.opensaml.xmlsec.signature.X509Certificate; import org.opensaml.xmlsec.signature.X509Data; +import java.nio.file.Path; +import java.util.Collections; +import java.util.List; + import static org.hamcrest.Matchers.arrayContaining; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/saml/SamlRealmTestHelper.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/saml/SamlRealmTestHelper.java index 668185944ed..f27a7e30756 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/saml/SamlRealmTestHelper.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/saml/SamlRealmTestHelper.java @@ -8,7 +8,7 @@ package org.elasticsearch.xpack.security.authc.saml; import java.util.Collections; import org.elasticsearch.common.Nullable; -import org.elasticsearch.xpack.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; import org.elasticsearch.xpack.security.authc.support.UserRoleMapper; import org.opensaml.saml.common.xml.SAMLConstants; import org.opensaml.saml.saml2.metadata.EntityDescriptor; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/saml/SamlRealmTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/saml/SamlRealmTests.java index 122f8a1c369..a49fb03a455 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/saml/SamlRealmTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/saml/SamlRealmTests.java @@ -5,7 +5,41 @@ */ package org.elasticsearch.xpack.security.authc.saml; +import org.bouncycastle.openssl.jcajce.JcaPEMWriter; +import org.elasticsearch.action.ActionListener; +import org.elasticsearch.action.support.PlainActionFuture; +import org.elasticsearch.common.collect.Tuple; +import org.elasticsearch.common.settings.MockSecureSettings; +import org.elasticsearch.common.settings.Settings; +import org.elasticsearch.common.settings.SettingsException; +import org.elasticsearch.common.util.concurrent.ThreadContext; +import org.elasticsearch.env.Environment; +import org.elasticsearch.env.TestEnvironment; +import org.elasticsearch.test.http.MockResponse; +import org.elasticsearch.test.http.MockWebServer; +import org.elasticsearch.watcher.ResourceWatcherService; +import org.elasticsearch.xpack.core.security.authc.AuthenticationResult; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.saml.SamlRealmSettings; +import org.elasticsearch.xpack.core.ssl.CertUtils; +import org.elasticsearch.xpack.core.ssl.SSLService; +import org.elasticsearch.xpack.core.ssl.TestsSSLService; +import org.elasticsearch.xpack.security.authc.support.UserRoleMapper; +import org.junit.Before; +import org.mockito.Mockito; +import org.opensaml.saml.common.xml.SAMLConstants; +import org.opensaml.saml.metadata.resolver.impl.AbstractReloadingMetadataResolver; +import org.opensaml.saml.saml2.core.LogoutRequest; +import org.opensaml.saml.saml2.core.NameID; +import org.opensaml.saml.saml2.core.NameIDType; +import org.opensaml.saml.saml2.metadata.EntityDescriptor; +import org.opensaml.saml.saml2.metadata.IDPSSODescriptor; +import org.opensaml.saml.saml2.metadata.SingleLogoutService; +import org.opensaml.saml.saml2.metadata.SingleSignOnService; +import org.opensaml.security.credential.Credential; + import javax.security.auth.x500.X500Principal; + import java.io.IOException; import java.io.OutputStream; import java.nio.charset.StandardCharsets; @@ -25,38 +59,6 @@ import java.util.Set; import java.util.concurrent.atomic.AtomicReference; import java.util.function.Supplier; -import org.bouncycastle.openssl.jcajce.JcaPEMWriter; -import org.elasticsearch.action.ActionListener; -import org.elasticsearch.action.support.PlainActionFuture; -import org.elasticsearch.common.collect.Tuple; -import org.elasticsearch.common.settings.MockSecureSettings; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.settings.SettingsException; -import org.elasticsearch.common.util.concurrent.ThreadContext; -import org.elasticsearch.env.Environment; -import org.elasticsearch.env.TestEnvironment; -import org.elasticsearch.test.http.MockResponse; -import org.elasticsearch.test.http.MockWebServer; -import org.elasticsearch.watcher.ResourceWatcherService; -import org.elasticsearch.xpack.security.authc.AuthenticationResult; -import org.elasticsearch.xpack.security.authc.RealmConfig; -import org.elasticsearch.xpack.security.authc.support.UserRoleMapper; -import org.elasticsearch.xpack.ssl.CertUtils; -import org.elasticsearch.xpack.ssl.SSLService; -import org.elasticsearch.xpack.ssl.TestsSSLService; -import org.junit.Before; -import org.mockito.Mockito; -import org.opensaml.saml.common.xml.SAMLConstants; -import org.opensaml.saml.metadata.resolver.impl.AbstractReloadingMetadataResolver; -import org.opensaml.saml.saml2.core.LogoutRequest; -import org.opensaml.saml.saml2.core.NameID; -import org.opensaml.saml.saml2.core.NameIDType; -import org.opensaml.saml.saml2.metadata.EntityDescriptor; -import org.opensaml.saml.saml2.metadata.IDPSSODescriptor; -import org.opensaml.saml.saml2.metadata.SingleLogoutService; -import org.opensaml.saml.saml2.metadata.SingleSignOnService; -import org.opensaml.security.credential.Credential; - import static org.hamcrest.Matchers.arrayContainingInAnyOrder; import static org.hamcrest.Matchers.contains; import static org.hamcrest.Matchers.containsInAnyOrder; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/saml/SamlSpMetadataBuilderTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/saml/SamlSpMetadataBuilderTests.java index 261f2e8bb80..73e2a516075 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/saml/SamlSpMetadataBuilderTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/saml/SamlSpMetadataBuilderTests.java @@ -5,6 +5,14 @@ */ package org.elasticsearch.xpack.security.authc.saml; +import org.elasticsearch.xpack.core.ssl.CertUtils; +import org.hamcrest.Matchers; +import org.junit.Before; +import org.opensaml.saml.saml2.core.NameID; +import org.opensaml.saml.saml2.metadata.EntityDescriptor; +import org.opensaml.saml.saml2.metadata.impl.EntityDescriptorMarshaller; +import org.w3c.dom.Element; + import java.io.ByteArrayInputStream; import java.nio.charset.StandardCharsets; import java.nio.file.Path; @@ -13,15 +21,6 @@ import java.security.cert.X509Certificate; import java.util.Collections; import java.util.Locale; -import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ssl.CertUtils; -import org.hamcrest.Matchers; -import org.junit.Before; -import org.opensaml.saml.saml2.core.NameID; -import org.opensaml.saml.saml2.metadata.EntityDescriptor; -import org.opensaml.saml.saml2.metadata.impl.EntityDescriptorMarshaller; -import org.w3c.dom.Element; - public class SamlSpMetadataBuilderTests extends SamlTestCase { private X509Certificate certificate; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/saml/SamlTestCase.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/saml/SamlTestCase.java index 7a1a0ebc30f..8bfe001e4c1 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/saml/SamlTestCase.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/saml/SamlTestCase.java @@ -5,26 +5,27 @@ */ package org.elasticsearch.xpack.security.authc.saml; -import javax.security.auth.x500.X500Principal; -import java.security.KeyPair; -import java.security.KeyPairGenerator; -import java.security.PrivateKey; -import java.security.cert.Certificate; -import java.security.cert.X509Certificate; -import java.util.Locale; - import org.apache.logging.log4j.Logger; import org.elasticsearch.ElasticsearchSecurityException; import org.elasticsearch.ExceptionsHelper; import org.elasticsearch.common.collect.Tuple; import org.elasticsearch.common.logging.Loggers; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.ssl.CertUtils; +import org.elasticsearch.xpack.core.ssl.CertUtils; import org.junit.AfterClass; import org.junit.BeforeClass; import org.opensaml.security.x509.X509Credential; import org.opensaml.security.x509.impl.X509KeyManagerX509CredentialAdapter; +import javax.security.auth.x500.X500Principal; + +import java.security.KeyPair; +import java.security.KeyPairGenerator; +import java.security.PrivateKey; +import java.security.cert.Certificate; +import java.security.cert.X509Certificate; +import java.util.Locale; + import static org.hamcrest.Matchers.is; public abstract class SamlTestCase extends ESTestCase { diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/support/BCryptTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/support/BCryptTests.java index ce53c472745..40c4a8ed816 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/support/BCryptTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/support/BCryptTests.java @@ -7,6 +7,7 @@ package org.elasticsearch.xpack.security.authc.support; import org.elasticsearch.common.settings.SecureString; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.security.authc.support.BCrypt; import java.util.ArrayList; import java.util.List; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/support/CachingUsernamePasswordRealmTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/support/CachingUsernamePasswordRealmTests.java index b5f0c51c77b..87f62cd97a1 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/support/CachingUsernamePasswordRealmTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/support/CachingUsernamePasswordRealmTests.java @@ -14,10 +14,14 @@ import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.env.TestEnvironment; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.SecuritySettingsSourceField; -import org.elasticsearch.xpack.security.authc.AuthenticationResult; -import org.elasticsearch.xpack.security.authc.Realm; -import org.elasticsearch.xpack.security.authc.RealmConfig; -import org.elasticsearch.xpack.security.user.User; +import org.elasticsearch.xpack.core.security.authc.AuthenticationResult; +import org.elasticsearch.xpack.core.security.authc.Realm; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.support.BCrypt; +import org.elasticsearch.xpack.core.security.authc.support.CachingUsernamePasswordRealmSettings; +import org.elasticsearch.xpack.core.security.authc.support.Hasher; +import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; +import org.elasticsearch.xpack.core.security.user.User; import org.junit.Before; import java.util.ArrayList; @@ -34,7 +38,6 @@ import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.nullValue; import static org.hamcrest.Matchers.sameInstance; -import static org.mockito.Mockito.mock; public class CachingUsernamePasswordRealmTests extends ESTestCase { diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/support/DnRoleMapperTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/support/DnRoleMapperTests.java index afcf0781cc5..f6d18b7cfc1 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/support/DnRoleMapperTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/support/DnRoleMapperTests.java @@ -5,6 +5,24 @@ */ package org.elasticsearch.xpack.security.authc.support; +import com.unboundid.ldap.sdk.DN; +import org.apache.logging.log4j.Level; +import org.apache.logging.log4j.Logger; +import org.elasticsearch.ElasticsearchException; +import org.elasticsearch.common.settings.Settings; +import org.elasticsearch.common.util.concurrent.ThreadContext; +import org.elasticsearch.env.Environment; +import org.elasticsearch.env.TestEnvironment; +import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.threadpool.TestThreadPool; +import org.elasticsearch.threadpool.ThreadPool; +import org.elasticsearch.watcher.ResourceWatcherService; +import org.elasticsearch.xpack.core.security.audit.logfile.CapturingLogger; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.support.DnRoleMapperSettings; +import org.junit.After; +import org.junit.Before; + import java.io.BufferedWriter; import java.io.IOException; import java.nio.charset.StandardCharsets; @@ -20,23 +38,6 @@ import java.util.Set; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; -import com.unboundid.ldap.sdk.DN; -import org.apache.logging.log4j.Level; -import org.apache.logging.log4j.Logger; -import org.elasticsearch.ElasticsearchException; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.util.concurrent.ThreadContext; -import org.elasticsearch.env.Environment; -import org.elasticsearch.env.TestEnvironment; -import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.threadpool.TestThreadPool; -import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.watcher.ResourceWatcherService; -import org.elasticsearch.xpack.security.audit.logfile.CapturingLogger; -import org.elasticsearch.xpack.security.authc.RealmConfig; -import org.junit.After; -import org.junit.Before; - import static org.hamcrest.Matchers.contains; import static org.hamcrest.Matchers.containsInAnyOrder; import static org.hamcrest.Matchers.containsString; @@ -45,7 +46,6 @@ import static org.hamcrest.Matchers.hasItems; import static org.hamcrest.Matchers.hasKey; import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.is; -import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.notNullValue; public class DnRoleMapperTests extends ESTestCase { diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/support/HasherTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/support/HasherTests.java index 793b4b7cbe5..0a8e8e9ac39 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/support/HasherTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/support/HasherTests.java @@ -7,6 +7,7 @@ package org.elasticsearch.xpack.security.authc.support; import org.elasticsearch.common.settings.SecureString; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.security.authc.support.Hasher; import static org.hamcrest.Matchers.sameInstance; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/support/RoleMappingFileBootstrapCheckTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/support/RoleMappingFileBootstrapCheckTests.java index 8d4fa3066b6..e0f71c40607 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/support/RoleMappingFileBootstrapCheckTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/support/RoleMappingFileBootstrapCheckTests.java @@ -17,7 +17,8 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.env.TestEnvironment; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.support.DnRoleMapperSettings; import org.junit.Before; import static org.hamcrest.Matchers.containsString; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/support/UsernamePasswordTokenTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/support/UsernamePasswordTokenTests.java index 446bc6ea1bc..57c45279884 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/support/UsernamePasswordTokenTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/support/UsernamePasswordTokenTests.java @@ -10,6 +10,7 @@ import org.elasticsearch.common.settings.SecureString; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; import org.junit.Rule; import org.junit.rules.ExpectedException; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/support/mapper/ExpressionRoleMappingTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/support/mapper/ExpressionRoleMappingTests.java index a51c5b4e99e..8c68d15eb07 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/support/mapper/ExpressionRoleMappingTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/support/mapper/ExpressionRoleMappingTests.java @@ -33,8 +33,9 @@ import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.env.Environment; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.security.authc.RealmConfig; -import org.elasticsearch.xpack.security.authc.support.mapper.expressiondsl.AllExpression; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.support.mapper.ExpressionRoleMapping; +import org.elasticsearch.xpack.core.security.authc.support.mapper.expressiondsl.AllExpression; import org.elasticsearch.xpack.security.authc.support.UserRoleMapper; import org.hamcrest.Matchers; import org.junit.Before; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/support/mapper/NativeUserRoleMapperTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/support/mapper/NativeUserRoleMapperTests.java index f73d0dfb680..c35591ed353 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/support/mapper/NativeUserRoleMapperTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/support/mapper/NativeUserRoleMapperTests.java @@ -17,11 +17,12 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.env.Environment; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.security.authc.support.mapper.ExpressionRoleMapping; import org.elasticsearch.xpack.security.SecurityLifecycleService; -import org.elasticsearch.xpack.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; import org.elasticsearch.xpack.security.authc.support.UserRoleMapper; -import org.elasticsearch.xpack.security.authc.support.mapper.expressiondsl.FieldExpression; -import org.elasticsearch.xpack.security.authc.support.mapper.expressiondsl.FieldExpression.FieldPredicate; +import org.elasticsearch.xpack.core.security.authc.support.mapper.expressiondsl.FieldExpression; +import org.elasticsearch.xpack.core.security.authc.support.mapper.expressiondsl.FieldExpression.FieldPredicate; import org.hamcrest.Matchers; import static org.mockito.Mockito.mock; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/support/mapper/expressiondsl/FieldPredicateTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/support/mapper/expressiondsl/FieldPredicateTests.java index bde8a1fee5a..82ce9250279 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/support/mapper/expressiondsl/FieldPredicateTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/support/mapper/expressiondsl/FieldPredicateTests.java @@ -8,7 +8,7 @@ package org.elasticsearch.xpack.security.authc.support.mapper.expressiondsl; import java.math.BigInteger; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.security.authc.support.mapper.expressiondsl.FieldExpression.FieldPredicate; +import org.elasticsearch.xpack.core.security.authc.support.mapper.expressiondsl.FieldExpression.FieldPredicate; import static org.hamcrest.Matchers.is; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/AnalyzeTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/AnalyzeTests.java index 12b1237e2e0..b8634f2e9f3 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/AnalyzeTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/AnalyzeTests.java @@ -8,13 +8,13 @@ package org.elasticsearch.xpack.security.authz; import org.elasticsearch.action.admin.indices.analyze.AnalyzeAction; import org.elasticsearch.common.settings.SecureString; import org.elasticsearch.test.SecurityIntegTestCase; -import org.elasticsearch.xpack.security.authc.support.Hasher; +import org.elasticsearch.xpack.core.security.authc.support.Hasher; import java.util.Collections; import static org.elasticsearch.test.SecurityTestsUtils.assertThrowsAuthorizationException; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.BASIC_AUTH_HEADER; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.BASIC_AUTH_HEADER; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; public class AnalyzeTests extends SecurityIntegTestCase { protected static final String USERS_PASSWD_HASHED = new String(Hasher.BCRYPT.hash(new SecureString("test123".toCharArray()))); diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/AuthorizationServiceTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/AuthorizationServiceTests.java index 7cc93513d94..571eead5d79 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/AuthorizationServiceTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/AuthorizationServiceTests.java @@ -5,15 +5,6 @@ */ package org.elasticsearch.xpack.security.authz; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.UUID; - import org.elasticsearch.ElasticsearchSecurityException; import org.elasticsearch.Version; import org.elasticsearch.action.ActionListener; @@ -99,39 +90,50 @@ import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportActionProxy; import org.elasticsearch.transport.TransportRequest; -import org.elasticsearch.xpack.security.SecurityLifecycleService; -import org.elasticsearch.xpack.security.action.user.AuthenticateAction; -import org.elasticsearch.xpack.security.action.user.AuthenticateRequest; -import org.elasticsearch.xpack.security.action.user.AuthenticateRequestBuilder; -import org.elasticsearch.xpack.security.action.user.ChangePasswordAction; -import org.elasticsearch.xpack.security.action.user.ChangePasswordRequest; -import org.elasticsearch.xpack.security.action.user.ChangePasswordRequestBuilder; -import org.elasticsearch.xpack.security.action.user.DeleteUserAction; -import org.elasticsearch.xpack.security.action.user.PutUserAction; -import org.elasticsearch.xpack.security.action.user.UserRequest; +import org.elasticsearch.xpack.core.security.action.user.AuthenticateAction; +import org.elasticsearch.xpack.core.security.action.user.AuthenticateRequest; +import org.elasticsearch.xpack.core.security.action.user.AuthenticateRequestBuilder; +import org.elasticsearch.xpack.core.security.action.user.ChangePasswordAction; +import org.elasticsearch.xpack.core.security.action.user.ChangePasswordRequest; +import org.elasticsearch.xpack.core.security.action.user.ChangePasswordRequestBuilder; +import org.elasticsearch.xpack.core.security.action.user.DeleteUserAction; +import org.elasticsearch.xpack.core.security.action.user.PutUserAction; +import org.elasticsearch.xpack.core.security.action.user.UserRequest; +import org.elasticsearch.xpack.core.security.authc.Authentication; +import org.elasticsearch.xpack.core.security.authc.Authentication.RealmRef; +import org.elasticsearch.xpack.core.security.authc.DefaultAuthenticationFailureHandler; +import org.elasticsearch.xpack.core.security.authc.esnative.NativeRealmSettings; +import org.elasticsearch.xpack.core.security.authc.file.FileRealmSettings; +import org.elasticsearch.xpack.core.security.authc.ldap.LdapRealmSettings; +import org.elasticsearch.xpack.core.security.authc.pki.PkiRealmSettings; +import org.elasticsearch.xpack.core.security.authz.AuthorizationServiceField; +import org.elasticsearch.xpack.core.security.authz.IndicesAndAliasesResolverField; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor.IndicesPrivileges; +import org.elasticsearch.xpack.core.security.authz.accesscontrol.IndicesAccessControl; +import org.elasticsearch.xpack.core.security.authz.permission.FieldPermissionsCache; +import org.elasticsearch.xpack.core.security.authz.permission.Role; +import org.elasticsearch.xpack.core.security.authz.store.ReservedRolesStore; +import org.elasticsearch.xpack.core.security.user.AnonymousUser; +import org.elasticsearch.xpack.core.security.user.ElasticUser; +import org.elasticsearch.xpack.core.security.user.SystemUser; +import org.elasticsearch.xpack.core.security.user.User; +import org.elasticsearch.xpack.core.security.user.XPackUser; import org.elasticsearch.xpack.security.audit.AuditTrailService; -import org.elasticsearch.xpack.security.authc.Authentication; -import org.elasticsearch.xpack.security.authc.Authentication.RealmRef; -import org.elasticsearch.xpack.security.authc.DefaultAuthenticationFailureHandler; -import org.elasticsearch.xpack.security.authc.esnative.NativeRealmSettings; import org.elasticsearch.xpack.security.authc.esnative.ReservedRealm; -import org.elasticsearch.xpack.security.authc.file.FileRealmSettings; -import org.elasticsearch.xpack.security.authc.ldap.LdapRealmSettings; -import org.elasticsearch.xpack.security.authc.pki.PkiRealmSettings; -import org.elasticsearch.xpack.security.authz.RoleDescriptor.IndicesPrivileges; -import org.elasticsearch.xpack.security.authz.accesscontrol.IndicesAccessControl; -import org.elasticsearch.xpack.security.authz.permission.FieldPermissionsCache; -import org.elasticsearch.xpack.security.authz.permission.Role; import org.elasticsearch.xpack.security.authz.store.CompositeRolesStore; -import org.elasticsearch.xpack.security.authz.store.ReservedRolesStore; -import org.elasticsearch.xpack.security.user.AnonymousUser; -import org.elasticsearch.xpack.security.user.ElasticUser; -import org.elasticsearch.xpack.security.user.SystemUser; -import org.elasticsearch.xpack.security.user.User; -import org.elasticsearch.xpack.security.user.XPackUser; import org.junit.Before; import org.mockito.Mockito; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + import static org.elasticsearch.test.SecurityTestsUtils.assertAuthenticationException; import static org.elasticsearch.test.SecurityTestsUtils.assertThrowsAuthorizationException; import static org.elasticsearch.test.SecurityTestsUtils.assertThrowsAuthorizationExceptionRunAs; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/AuthorizationUtilsTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/AuthorizationUtilsTests.java index 2909b73d176..9c9f2b1b1a4 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/AuthorizationUtilsTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/AuthorizationUtilsTests.java @@ -8,16 +8,16 @@ package org.elasticsearch.xpack.security.authz; import org.elasticsearch.action.ActionListener; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.concurrent.ThreadContext; -import org.elasticsearch.xpack.ClientHelper; -import org.elasticsearch.xpack.security.SecurityContext; -import org.elasticsearch.xpack.security.authc.Authentication; -import org.elasticsearch.xpack.security.authc.Authentication.RealmRef; -import org.elasticsearch.xpack.security.authc.AuthenticationField; -import org.elasticsearch.xpack.security.user.SystemUser; -import org.elasticsearch.xpack.security.user.User; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.security.user.XPackSecurityUser; -import org.elasticsearch.xpack.security.user.XPackUser; +import org.elasticsearch.xpack.core.ClientHelper; +import org.elasticsearch.xpack.core.security.SecurityContext; +import org.elasticsearch.xpack.core.security.authc.Authentication; +import org.elasticsearch.xpack.core.security.authc.Authentication.RealmRef; +import org.elasticsearch.xpack.core.security.authc.AuthenticationField; +import org.elasticsearch.xpack.core.security.user.SystemUser; +import org.elasticsearch.xpack.core.security.user.User; +import org.elasticsearch.xpack.core.security.user.XPackSecurityUser; +import org.elasticsearch.xpack.core.security.user.XPackUser; import org.junit.Before; import java.util.concurrent.CountDownLatch; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/AuthorizedIndicesTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/AuthorizedIndicesTests.java index df8433530d0..4bb8af96ca8 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/AuthorizedIndicesTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/AuthorizedIndicesTests.java @@ -13,14 +13,15 @@ import org.elasticsearch.cluster.metadata.MetaData; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.set.Sets; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor.IndicesPrivileges; +import org.elasticsearch.xpack.core.security.authz.permission.FieldPermissionsCache; +import org.elasticsearch.xpack.core.security.authz.permission.Role; +import org.elasticsearch.xpack.core.security.authz.privilege.ClusterPrivilege; +import org.elasticsearch.xpack.core.security.authz.privilege.IndexPrivilege; +import org.elasticsearch.xpack.core.security.user.User; import org.elasticsearch.xpack.security.SecurityLifecycleService; -import org.elasticsearch.xpack.security.authz.RoleDescriptor.IndicesPrivileges; -import org.elasticsearch.xpack.security.authz.permission.FieldPermissionsCache; -import org.elasticsearch.xpack.security.authz.permission.Role; -import org.elasticsearch.xpack.security.authz.privilege.ClusterPrivilege; -import org.elasticsearch.xpack.security.authz.privilege.IndexPrivilege; import org.elasticsearch.xpack.security.authz.store.CompositeRolesStore; -import org.elasticsearch.xpack.security.user.User; import java.util.List; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/IndexAliasesTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/IndexAliasesTests.java index 83b283539cf..d273d61959e 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/IndexAliasesTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/IndexAliasesTests.java @@ -16,7 +16,7 @@ import org.elasticsearch.client.Client; import org.elasticsearch.common.settings.SecureString; import org.elasticsearch.index.IndexNotFoundException; import org.elasticsearch.test.SecurityIntegTestCase; -import org.elasticsearch.xpack.security.authc.support.Hasher; +import org.elasticsearch.xpack.core.security.authc.support.Hasher; import org.junit.Before; import java.util.Collections; @@ -24,8 +24,8 @@ import java.util.Map; import static org.elasticsearch.test.SecurityTestsUtils.assertThrowsAuthorizationException; import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.BASIC_AUTH_HEADER; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.BASIC_AUTH_HEADER; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.CoreMatchers.equalTo; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/IndicesAndAliasesResolverTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/IndicesAndAliasesResolverTests.java index 55cd9ddcbc8..17d8c754e16 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/IndicesAndAliasesResolverTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/IndicesAndAliasesResolverTests.java @@ -5,13 +5,6 @@ */ package org.elasticsearch.xpack.security.authz; -import java.util.Arrays; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - import org.elasticsearch.Version; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.IndicesRequest; @@ -55,24 +48,33 @@ import org.elasticsearch.search.internal.ShardSearchTransportRequest; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportRequest; -import org.elasticsearch.xpack.graph.action.GraphExploreAction; -import org.elasticsearch.xpack.graph.action.GraphExploreRequest; +import org.elasticsearch.xpack.core.graph.action.GraphExploreAction; +import org.elasticsearch.xpack.core.graph.action.GraphExploreRequest; +import org.elasticsearch.xpack.core.security.authc.DefaultAuthenticationFailureHandler; +import org.elasticsearch.xpack.core.security.authz.IndicesAndAliasesResolverField; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor.IndicesPrivileges; +import org.elasticsearch.xpack.core.security.authz.permission.FieldPermissionsCache; +import org.elasticsearch.xpack.core.security.authz.permission.Role; +import org.elasticsearch.xpack.core.security.authz.store.ReservedRolesStore; +import org.elasticsearch.xpack.core.security.user.AnonymousUser; +import org.elasticsearch.xpack.core.security.user.User; +import org.elasticsearch.xpack.core.security.user.XPackSecurityUser; +import org.elasticsearch.xpack.core.security.user.XPackUser; import org.elasticsearch.xpack.security.SecurityLifecycleService; import org.elasticsearch.xpack.security.audit.AuditTrailService; -import org.elasticsearch.xpack.security.authc.DefaultAuthenticationFailureHandler; import org.elasticsearch.xpack.security.authz.IndicesAndAliasesResolver.ResolvedIndices; -import org.elasticsearch.xpack.security.authz.RoleDescriptor.IndicesPrivileges; -import org.elasticsearch.xpack.security.authz.permission.FieldPermissionsCache; -import org.elasticsearch.xpack.security.authz.permission.Role; import org.elasticsearch.xpack.security.authz.store.CompositeRolesStore; -import org.elasticsearch.xpack.security.authz.store.ReservedRolesStore; import org.elasticsearch.xpack.security.test.SecurityTestUtils; -import org.elasticsearch.xpack.security.user.AnonymousUser; -import org.elasticsearch.xpack.security.user.User; -import org.elasticsearch.xpack.security.user.XPackSecurityUser; -import org.elasticsearch.xpack.security.user.XPackUser; import org.junit.Before; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + import static org.elasticsearch.xpack.security.SecurityLifecycleService.SECURITY_INDEX_NAME; import static org.hamcrest.Matchers.arrayContaining; import static org.hamcrest.Matchers.arrayContainingInAnyOrder; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/RoleDescriptorTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/RoleDescriptorTests.java index 82adb78d31c..e2e44b0deab 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/RoleDescriptorTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/RoleDescriptorTests.java @@ -14,8 +14,9 @@ import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.xpack.security.support.MetadataUtils; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor; +import org.elasticsearch.xpack.core.security.support.MetadataUtils; import java.util.Collections; import java.util.Map; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/SecurityScrollTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/SecurityScrollTests.java index ce5ddd77da5..c3d24e1adc7 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/SecurityScrollTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/SecurityScrollTests.java @@ -15,7 +15,7 @@ import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.search.SearchContextMissingException; import org.elasticsearch.test.SecurityIntegTestCase; import org.elasticsearch.test.SecuritySettingsSourceField; -import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken; +import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; import org.junit.After; import java.util.Collections; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/SecuritySearchOperationListenerTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/SecuritySearchOperationListenerTests.java index 5a80640b0ab..8ce0a5ce1a0 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/SecuritySearchOperationListenerTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/SecuritySearchOperationListenerTests.java @@ -19,11 +19,11 @@ import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.TestSearchContext; import org.elasticsearch.transport.TransportRequest; import org.elasticsearch.transport.TransportRequest.Empty; +import org.elasticsearch.xpack.core.security.authc.Authentication; +import org.elasticsearch.xpack.core.security.authc.Authentication.RealmRef; +import org.elasticsearch.xpack.core.security.authc.AuthenticationField; +import org.elasticsearch.xpack.core.security.user.User; import org.elasticsearch.xpack.security.audit.AuditTrailService; -import org.elasticsearch.xpack.security.authc.Authentication; -import org.elasticsearch.xpack.security.authc.Authentication.RealmRef; -import org.elasticsearch.xpack.security.authc.AuthenticationField; -import org.elasticsearch.xpack.security.user.User; import static org.elasticsearch.mock.orig.Mockito.verifyNoMoreInteractions; import static org.elasticsearch.xpack.security.authz.AuthorizationService.ORIGINATING_ACTION_KEY; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/FieldDataCacheWithFieldSubsetReaderTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/FieldDataCacheWithFieldSubsetReaderTests.java index 7e0838e39c9..6c18e473a0c 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/FieldDataCacheWithFieldSubsetReaderTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/FieldDataCacheWithFieldSubsetReaderTests.java @@ -36,6 +36,7 @@ import org.elasticsearch.index.shard.ShardId; import org.elasticsearch.indices.breaker.CircuitBreakerService; import org.elasticsearch.indices.breaker.NoneCircuitBreakerService; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.security.authz.accesscontrol.FieldSubsetReader; import org.junit.After; import org.junit.Before; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/IndicesAccessControlTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/IndicesAccessControlTests.java index ea33ea1fe88..40d3abb899b 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/IndicesAccessControlTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/IndicesAccessControlTests.java @@ -6,6 +6,7 @@ package org.elasticsearch.xpack.security.authz.accesscontrol; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.security.authz.accesscontrol.IndicesAccessControl; import java.util.Collections; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/IndicesPermissionTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/IndicesPermissionTests.java index c26ba6f789a..6e9e28a41a5 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/IndicesPermissionTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/IndicesPermissionTests.java @@ -16,21 +16,18 @@ import org.elasticsearch.common.io.stream.BytesStreamOutput; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.set.Sets; -import org.elasticsearch.index.query.QueryBuilder; -import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.security.authz.RoleDescriptor; -import org.elasticsearch.xpack.security.authz.permission.FieldPermissions; -import org.elasticsearch.xpack.security.authz.permission.FieldPermissionsCache; -import org.elasticsearch.xpack.security.authz.permission.FieldPermissionsDefinition; -import org.elasticsearch.xpack.security.authz.permission.IndicesPermission; -import org.elasticsearch.xpack.security.authz.permission.Role; -import org.elasticsearch.xpack.security.authz.privilege.IndexPrivilege; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor; +import org.elasticsearch.xpack.core.security.authz.accesscontrol.IndicesAccessControl; +import org.elasticsearch.xpack.core.security.authz.permission.FieldPermissions; +import org.elasticsearch.xpack.core.security.authz.permission.FieldPermissionsCache; +import org.elasticsearch.xpack.core.security.authz.permission.FieldPermissionsDefinition; +import org.elasticsearch.xpack.core.security.authz.permission.IndicesPermission; +import org.elasticsearch.xpack.core.security.authz.permission.Role; +import org.elasticsearch.xpack.core.security.authz.privilege.IndexPrivilege; import java.io.IOException; -import java.util.Arrays; import java.util.Collections; -import java.util.HashSet; import java.util.Map; import java.util.Set; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/OptOutQueryCacheTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/OptOutQueryCacheTests.java index 718397ef7a3..fe180c9c5cc 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/OptOutQueryCacheTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/OptOutQueryCacheTests.java @@ -15,8 +15,9 @@ import org.apache.lucene.search.TermQuery; import org.apache.lucene.search.Weight; import org.apache.lucene.store.Directory; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.security.authz.permission.FieldPermissions; -import org.elasticsearch.xpack.security.authz.permission.FieldPermissionsDefinition; +import org.elasticsearch.xpack.core.security.authz.accesscontrol.IndicesAccessControl; +import org.elasticsearch.xpack.core.security.authz.permission.FieldPermissions; +import org.elasticsearch.xpack.core.security.authz.permission.FieldPermissionsDefinition; import org.junit.After; import org.junit.Before; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/SetSecurityUserProcessorTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/SetSecurityUserProcessorTests.java index 3d35adc83a9..c9ef169a375 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/SetSecurityUserProcessorTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/SetSecurityUserProcessorTests.java @@ -9,10 +9,11 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.ingest.IngestDocument; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.security.authc.Authentication; -import org.elasticsearch.xpack.security.authc.AuthenticationField; -import org.elasticsearch.xpack.security.authz.accesscontrol.SetSecurityUserProcessor.Property; -import org.elasticsearch.xpack.security.user.User; +import org.elasticsearch.xpack.core.security.authc.Authentication; +import org.elasticsearch.xpack.core.security.authc.AuthenticationField; +import org.elasticsearch.xpack.core.security.authz.accesscontrol.SetSecurityUserProcessor; +import org.elasticsearch.xpack.core.security.authz.accesscontrol.SetSecurityUserProcessor.Property; +import org.elasticsearch.xpack.core.security.user.User; import java.util.Collections; import java.util.EnumSet; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissionsTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissionsTests.java index d0fc1590451..b21740ee96c 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissionsTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissionsTests.java @@ -9,7 +9,9 @@ import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.common.bytes.BytesArray; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.security.authz.RoleDescriptor; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor; +import org.elasticsearch.xpack.core.security.authz.permission.FieldPermissions; +import org.elasticsearch.xpack.core.security.authz.permission.FieldPermissionsDefinition; import java.util.ArrayList; import java.util.List; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/permission/PermissionTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/permission/PermissionTests.java index 4aae7a3e5df..7dfd567b460 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/permission/PermissionTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/permission/PermissionTests.java @@ -7,13 +7,14 @@ package org.elasticsearch.xpack.security.authz.permission; import org.elasticsearch.action.get.GetAction; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.security.authz.privilege.Privilege; +import org.elasticsearch.xpack.core.security.authz.permission.Role; +import org.elasticsearch.xpack.core.security.authz.privilege.Privilege; import org.junit.Before; import java.util.function.Predicate; -import static org.elasticsearch.xpack.security.authz.privilege.IndexPrivilege.MONITOR; -import static org.elasticsearch.xpack.security.authz.privilege.IndexPrivilege.READ; +import static org.elasticsearch.xpack.core.security.authz.privilege.IndexPrivilege.MONITOR; +import static org.elasticsearch.xpack.core.security.authz.privilege.IndexPrivilege.READ; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.notNullValue; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/store/CompositeRolesStoreTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/store/CompositeRolesStoreTests.java index e9136bfaaad..280b8b17ccd 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/store/CompositeRolesStoreTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/store/CompositeRolesStoreTests.java @@ -23,12 +23,13 @@ import org.elasticsearch.license.License.OperationMode; import org.elasticsearch.license.TestUtils.UpdatableLicenseState; import org.elasticsearch.license.XPackLicenseState; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.security.authz.RoleDescriptor.IndicesPrivileges; -import org.elasticsearch.xpack.security.authz.accesscontrol.IndicesAccessControl; -import org.elasticsearch.xpack.security.authz.permission.Role; -import org.elasticsearch.xpack.security.authz.RoleDescriptor; -import org.elasticsearch.xpack.security.authz.permission.FieldPermissionsCache; -import org.elasticsearch.xpack.security.authz.privilege.IndexPrivilege; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor.IndicesPrivileges; +import org.elasticsearch.xpack.core.security.authz.accesscontrol.IndicesAccessControl; +import org.elasticsearch.xpack.core.security.authz.permission.FieldPermissionsCache; +import org.elasticsearch.xpack.core.security.authz.permission.Role; +import org.elasticsearch.xpack.core.security.authz.privilege.IndexPrivilege; +import org.elasticsearch.xpack.core.security.authz.store.ReservedRolesStore; import java.io.IOException; import java.util.Arrays; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/store/FileRolesStoreTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/store/FileRolesStoreTests.java index 1d15c1f9afa..d30901a1a9d 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/store/FileRolesStoreTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/store/FileRolesStoreTests.java @@ -17,16 +17,16 @@ import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.TestThreadPool; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.watcher.ResourceWatcherService; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.XPackField; -import org.elasticsearch.xpack.security.audit.logfile.CapturingLogger; -import org.elasticsearch.xpack.security.authz.RoleDescriptor; -import org.elasticsearch.xpack.security.authz.permission.ClusterPermission; -import org.elasticsearch.xpack.security.authz.permission.IndicesPermission; -import org.elasticsearch.xpack.security.authz.permission.Role; -import org.elasticsearch.xpack.security.authz.permission.RunAsPermission; -import org.elasticsearch.xpack.security.authz.privilege.ClusterPrivilege; -import org.elasticsearch.xpack.security.authz.privilege.IndexPrivilege; +import org.elasticsearch.xpack.core.XPackField; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.security.audit.logfile.CapturingLogger; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor; +import org.elasticsearch.xpack.core.security.authz.permission.ClusterPermission; +import org.elasticsearch.xpack.core.security.authz.permission.IndicesPermission; +import org.elasticsearch.xpack.core.security.authz.permission.Role; +import org.elasticsearch.xpack.core.security.authz.permission.RunAsPermission; +import org.elasticsearch.xpack.core.security.authz.privilege.ClusterPrivilege; +import org.elasticsearch.xpack.core.security.authz.privilege.IndexPrivilege; import java.io.BufferedWriter; import java.io.IOException; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/store/NativeRolesStoreTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/store/NativeRolesStoreTests.java index 1d44e5f4098..4ab63c3443b 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/store/NativeRolesStoreTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/store/NativeRolesStoreTests.java @@ -38,12 +38,12 @@ import org.elasticsearch.license.XPackLicenseState; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.TestThreadPool; import org.elasticsearch.threadpool.ThreadPool; +import org.elasticsearch.xpack.core.security.SecurityLifecycleServiceField; +import org.elasticsearch.xpack.core.security.action.role.PutRoleRequest; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor.IndicesPrivileges; import org.elasticsearch.xpack.security.SecurityLifecycleService; -import org.elasticsearch.xpack.security.SecurityLifecycleServiceField; -import org.elasticsearch.xpack.security.action.role.PutRoleRequest; import org.elasticsearch.xpack.security.audit.index.IndexAuditTrail; -import org.elasticsearch.xpack.security.authz.RoleDescriptor; -import org.elasticsearch.xpack.security.authz.RoleDescriptor.IndicesPrivileges; import org.elasticsearch.xpack.security.test.SecurityTestUtils; import org.junit.After; import org.junit.Before; @@ -59,12 +59,12 @@ import java.util.concurrent.atomic.AtomicBoolean; import static org.elasticsearch.cluster.routing.RecoverySource.StoreRecoverySource.EXISTING_STORE_INSTANCE; import static org.elasticsearch.xpack.security.SecurityLifecycleService.SECURITY_INDEX_NAME; +import static org.hamcrest.Matchers.arrayContaining; import static org.hamcrest.Matchers.contains; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.instanceOf; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -import static org.hamcrest.Matchers.arrayContaining; public class NativeRolesStoreTests extends ESTestCase { diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/rest/RestRequestFilterTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/rest/RestRequestFilterTests.java index a3730d73008..62cfa903922 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/rest/RestRequestFilterTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/rest/RestRequestFilterTests.java @@ -12,6 +12,7 @@ import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.rest.FakeRestRequest; +import org.elasticsearch.xpack.core.security.rest.RestRequestFilter; import java.io.IOException; import java.net.InetAddress; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/rest/SecurityRestFilterTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/rest/SecurityRestFilterTests.java index 387147a9b20..87e81e16a86 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/rest/SecurityRestFilterTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/rest/SecurityRestFilterTests.java @@ -23,10 +23,11 @@ import org.elasticsearch.rest.RestStatus; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.SecuritySettingsSourceField; import org.elasticsearch.test.rest.FakeRestRequest; -import org.elasticsearch.xpack.security.authc.Authentication; -import org.elasticsearch.xpack.security.authc.Authentication.RealmRef; +import org.elasticsearch.xpack.core.security.authc.Authentication; +import org.elasticsearch.xpack.core.security.authc.Authentication.RealmRef; +import org.elasticsearch.xpack.core.security.rest.RestRequestFilter; +import org.elasticsearch.xpack.core.security.user.XPackUser; import org.elasticsearch.xpack.security.authc.AuthenticationService; -import org.elasticsearch.xpack.security.user.XPackUser; import org.junit.Before; import org.mockito.ArgumentCaptor; @@ -34,7 +35,7 @@ import java.util.Collections; import java.util.Map; import java.util.Set; -import static org.elasticsearch.xpack.security.support.Exceptions.authenticationError; +import static org.elasticsearch.xpack.core.security.support.Exceptions.authenticationError; import static org.mockito.Matchers.any; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.doAnswer; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/rest/action/RestAuthenticateActionTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/rest/action/RestAuthenticateActionTests.java index 900b0ab903e..a35af3c749f 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/rest/action/RestAuthenticateActionTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/rest/action/RestAuthenticateActionTests.java @@ -15,13 +15,13 @@ import org.elasticsearch.test.SecurityIntegTestCase; import org.elasticsearch.test.SecuritySettingsSource; import org.elasticsearch.test.SecuritySettingsSourceField; import org.elasticsearch.test.rest.yaml.ObjectPath; +import org.elasticsearch.xpack.core.security.user.AnonymousUser; import org.elasticsearch.xpack.security.authz.AuthorizationService; -import org.elasticsearch.xpack.security.user.AnonymousUser; import org.junit.BeforeClass; import java.util.List; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; import static org.hamcrest.Matchers.contains; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.is; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/rest/action/oauth2/RestGetTokenActionTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/rest/action/oauth2/RestGetTokenActionTests.java index 582deffc5c5..f31834c5734 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/rest/action/oauth2/RestGetTokenActionTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/rest/action/oauth2/RestGetTokenActionTests.java @@ -19,10 +19,10 @@ import org.elasticsearch.rest.RestStatus; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.SecuritySettingsSourceField; import org.elasticsearch.test.rest.FakeRestRequest; -import org.elasticsearch.xpack.security.action.token.CreateTokenRequest; -import org.elasticsearch.xpack.security.action.token.CreateTokenResponse; +import org.elasticsearch.xpack.core.security.action.token.CreateTokenRequest; +import org.elasticsearch.xpack.core.security.action.token.CreateTokenResponse; +import org.elasticsearch.xpack.core.security.support.NoOpLogger; import org.elasticsearch.xpack.security.rest.action.oauth2.RestGetTokenAction.CreateTokenResponseActionListener; -import org.elasticsearch.xpack.security.support.NoOpLogger; import java.util.Map; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/rest/action/user/HasPrivilegesRestResponseTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/rest/action/user/HasPrivilegesRestResponseTests.java index 1e858d3ea00..601cabf4f84 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/rest/action/user/HasPrivilegesRestResponseTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/rest/action/user/HasPrivilegesRestResponseTests.java @@ -16,7 +16,7 @@ import org.elasticsearch.rest.BytesRestResponse; import org.elasticsearch.rest.RestChannel; import org.elasticsearch.rest.RestResponse; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.security.action.user.HasPrivilegesResponse; +import org.elasticsearch.xpack.core.security.action.user.HasPrivilegesResponse; import org.elasticsearch.xpack.security.rest.action.user.RestHasPrivilegesAction.HasPrivilegesRestResponseBuilder; import static org.hamcrest.Matchers.equalTo; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/support/IndexLifecycleManagerIntegTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/support/IndexLifecycleManagerIntegTests.java index c117a1f91c5..4934bcd9303 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/support/IndexLifecycleManagerIntegTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/support/IndexLifecycleManagerIntegTests.java @@ -9,8 +9,8 @@ import org.elasticsearch.action.ActionFuture; import org.elasticsearch.action.support.PlainActionFuture; import org.elasticsearch.common.util.concurrent.AbstractRunnable; import org.elasticsearch.test.SecurityIntegTestCase; -import org.elasticsearch.xpack.security.action.user.PutUserRequest; -import org.elasticsearch.xpack.security.action.user.PutUserResponse; +import org.elasticsearch.xpack.core.security.action.user.PutUserRequest; +import org.elasticsearch.xpack.core.security.action.user.PutUserResponse; import org.hamcrest.Matchers; import org.junit.After; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/support/IndexLifecycleManagerTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/support/IndexLifecycleManagerTests.java index 03207d2fded..9411042e363 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/support/IndexLifecycleManagerTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/support/IndexLifecycleManagerTests.java @@ -47,7 +47,7 @@ import org.elasticsearch.index.shard.ShardId; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.xpack.security.test.SecurityTestUtils; -import org.elasticsearch.xpack.template.TemplateUtils; +import org.elasticsearch.xpack.core.template.TemplateUtils; import org.hamcrest.Matchers; import org.junit.Before; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/SecurityServerTransportInterceptorTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/SecurityServerTransportInterceptorTests.java index fc209d73b7b..deb20ce84f5 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/SecurityServerTransportInterceptorTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/SecurityServerTransportInterceptorTests.java @@ -23,29 +23,25 @@ import org.elasticsearch.transport.TransportResponse; import org.elasticsearch.transport.TransportResponse.Empty; import org.elasticsearch.transport.TransportResponseHandler; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.security.SecurityContext; -import org.elasticsearch.xpack.security.authc.Authentication; -import org.elasticsearch.xpack.security.authc.Authentication.RealmRef; +import org.elasticsearch.xpack.core.security.SecurityContext; +import org.elasticsearch.xpack.core.security.authc.Authentication; +import org.elasticsearch.xpack.core.security.authc.Authentication.RealmRef; +import org.elasticsearch.xpack.core.security.user.SystemUser; +import org.elasticsearch.xpack.core.security.user.User; +import org.elasticsearch.xpack.core.ssl.SSLService; import org.elasticsearch.xpack.security.authc.AuthenticationService; import org.elasticsearch.xpack.security.authz.AuthorizationService; -import org.elasticsearch.xpack.security.user.KibanaUser; -import org.elasticsearch.xpack.security.user.SystemUser; -import org.elasticsearch.xpack.security.user.User; -import org.elasticsearch.xpack.ssl.SSLService; import java.util.Collections; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicReference; import java.util.function.Consumer; -import static org.hamcrest.Matchers.arrayContaining; import static org.mockito.Matchers.any; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; import static org.mockito.Mockito.spy; -import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyNoMoreInteractions; import static org.mockito.Mockito.verifyZeroInteractions; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/ServerTransportFilterIntegrationTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/ServerTransportFilterIntegrationTests.java index 5ad8f00c659..6274612295b 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/ServerTransportFilterIntegrationTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/ServerTransportFilterIntegrationTests.java @@ -28,12 +28,12 @@ import org.elasticsearch.transport.TransportRequestOptions; import org.elasticsearch.transport.TransportResponse; import org.elasticsearch.transport.TransportResponseHandler; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.XPackField; +import org.elasticsearch.xpack.core.XPackField; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.security.SecurityField; +import org.elasticsearch.xpack.core.security.authc.file.FileRealmSettings; +import org.elasticsearch.xpack.core.ssl.SSLClientAuth; import org.elasticsearch.xpack.security.LocalStateSecurity; -import org.elasticsearch.xpack.security.SecurityField; -import org.elasticsearch.xpack.security.authc.file.FileRealmSettings; -import org.elasticsearch.xpack.ssl.SSLClientAuth; import org.junit.BeforeClass; import java.io.IOException; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/ServerTransportFilterTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/ServerTransportFilterTests.java index 4c1a6247413..38b9a029d9b 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/ServerTransportFilterTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/ServerTransportFilterTests.java @@ -22,17 +22,17 @@ import org.elasticsearch.test.ESTestCase; import org.elasticsearch.transport.TcpTransport; import org.elasticsearch.transport.TransportChannel; import org.elasticsearch.transport.TransportRequest; -import org.elasticsearch.xpack.security.SecurityContext; -import org.elasticsearch.xpack.security.authc.Authentication; -import org.elasticsearch.xpack.security.authc.Authentication.RealmRef; +import org.elasticsearch.xpack.core.security.SecurityContext; +import org.elasticsearch.xpack.core.security.authc.Authentication; +import org.elasticsearch.xpack.core.security.authc.Authentication.RealmRef; +import org.elasticsearch.xpack.core.security.authz.permission.Role; +import org.elasticsearch.xpack.core.security.authz.store.ReservedRolesStore; +import org.elasticsearch.xpack.core.security.user.KibanaUser; +import org.elasticsearch.xpack.core.security.user.SystemUser; +import org.elasticsearch.xpack.core.security.user.User; +import org.elasticsearch.xpack.core.security.user.XPackUser; import org.elasticsearch.xpack.security.authc.AuthenticationService; import org.elasticsearch.xpack.security.authz.AuthorizationService; -import org.elasticsearch.xpack.security.authz.permission.Role; -import org.elasticsearch.xpack.security.authz.store.ReservedRolesStore; -import org.elasticsearch.xpack.security.user.KibanaUser; -import org.elasticsearch.xpack.security.user.SystemUser; -import org.elasticsearch.xpack.security.user.User; -import org.elasticsearch.xpack.security.user.XPackUser; import org.junit.Before; import java.io.IOException; @@ -40,8 +40,8 @@ import java.util.Collections; import java.util.concurrent.atomic.AtomicReference; import static org.elasticsearch.mock.orig.Mockito.times; -import static org.elasticsearch.xpack.security.support.Exceptions.authenticationError; -import static org.elasticsearch.xpack.security.support.Exceptions.authorizationError; +import static org.elasticsearch.xpack.core.security.support.Exceptions.authenticationError; +import static org.elasticsearch.xpack.core.security.support.Exceptions.authorizationError; import static org.hamcrest.Matchers.arrayContaining; import static org.hamcrest.Matchers.equalTo; import static org.mockito.Matchers.any; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/filter/IPFilterTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/filter/IPFilterTests.java index 2f9070bfed4..78825d95ce0 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/filter/IPFilterTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/filter/IPFilterTests.java @@ -19,9 +19,7 @@ import org.elasticsearch.node.Node; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.junit.annotations.Network; import org.elasticsearch.transport.Transport; -import org.elasticsearch.xpack.XPackPlugin; import org.elasticsearch.xpack.security.LocalStateSecurity; -import org.elasticsearch.xpack.security.Security; import org.elasticsearch.xpack.security.audit.AuditTrailService; import org.junit.Before; import org.mockito.ArgumentCaptor; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/filter/IpFilteringIntegrationTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/filter/IpFilteringIntegrationTests.java index 30510aed3b9..ef1eeace73b 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/filter/IpFilteringIntegrationTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/filter/IpFilteringIntegrationTests.java @@ -15,7 +15,7 @@ import org.elasticsearch.test.ESIntegTestCase.ClusterScope; import org.elasticsearch.test.ESIntegTestCase.Scope; import org.elasticsearch.test.SecurityIntegTestCase; import org.elasticsearch.transport.Transport; -import org.elasticsearch.xpack.common.socket.SocketAccess; +import org.elasticsearch.xpack.core.common.socket.SocketAccess; import org.junit.BeforeClass; import java.io.IOException; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/netty4/DNSOnlyHostnameVerificationTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/netty4/DNSOnlyHostnameVerificationTests.java index 2539e4a2f9e..54e313a9e47 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/netty4/DNSOnlyHostnameVerificationTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/netty4/DNSOnlyHostnameVerificationTests.java @@ -15,11 +15,12 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.test.SecurityIntegTestCase; import org.elasticsearch.test.SecuritySettingsSource; import org.elasticsearch.test.SecuritySettingsSourceField; -import org.elasticsearch.xpack.ssl.CertUtils; +import org.elasticsearch.xpack.core.ssl.CertUtils; import org.junit.AfterClass; import org.junit.BeforeClass; import javax.security.auth.x500.X500Principal; + import java.io.IOException; import java.io.OutputStream; import java.io.UncheckedIOException; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/netty4/IPHostnameVerificationTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/netty4/IPHostnameVerificationTests.java index 68813a6584c..f03a4255b7f 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/netty4/IPHostnameVerificationTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/netty4/IPHostnameVerificationTests.java @@ -10,7 +10,7 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.test.SecurityIntegTestCase; import org.elasticsearch.test.SecuritySettingsSource; import org.elasticsearch.transport.TcpTransport; -import org.elasticsearch.xpack.ssl.SSLClientAuth; +import org.elasticsearch.xpack.core.ssl.SSLClientAuth; import java.nio.file.Files; import java.nio.file.Path; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4HttpServerTransportTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4HttpServerTransportTests.java index 14fd0566fa7..3ef298f3f23 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4HttpServerTransportTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4HttpServerTransportTests.java @@ -19,9 +19,9 @@ import org.elasticsearch.http.NullDispatcher; import org.elasticsearch.http.netty4.Netty4HttpMockUtil; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.ssl.SSLClientAuth; -import org.elasticsearch.xpack.ssl.SSLService; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.ssl.SSLClientAuth; +import org.elasticsearch.xpack.core.ssl.SSLService; import org.elasticsearch.xpack.security.transport.filter.IPFilter; import org.junit.Before; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4ServerTransportTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4ServerTransportTests.java index 12065dfdae2..3d9227319a8 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4ServerTransportTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4ServerTransportTests.java @@ -18,11 +18,13 @@ import org.elasticsearch.env.TestEnvironment; import org.elasticsearch.indices.breaker.CircuitBreakerService; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.xpack.ssl.SSLClientAuth; -import org.elasticsearch.xpack.ssl.SSLService; +import org.elasticsearch.xpack.core.security.transport.netty4.SecurityNetty4Transport; +import org.elasticsearch.xpack.core.ssl.SSLClientAuth; +import org.elasticsearch.xpack.core.ssl.SSLService; import org.junit.Before; import javax.net.ssl.SSLEngine; + import java.nio.file.Path; import java.util.Collections; import java.util.Locale; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/netty4/SslHostnameVerificationTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/netty4/SslHostnameVerificationTests.java index 67f7fd5f1e7..148453b5f84 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/netty4/SslHostnameVerificationTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/netty4/SslHostnameVerificationTests.java @@ -8,20 +8,17 @@ package org.elasticsearch.xpack.security.transport.netty4; import org.elasticsearch.client.Client; import org.elasticsearch.client.transport.NoNodeAvailableException; import org.elasticsearch.client.transport.TransportClient; -import org.elasticsearch.common.settings.MockSecureSettings; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.transport.TransportAddress; import org.elasticsearch.test.SecurityIntegTestCase; import org.elasticsearch.test.SecuritySettingsSource; import org.elasticsearch.transport.Transport; -import org.elasticsearch.xpack.TestXPackTransportClient; +import org.elasticsearch.xpack.core.TestXPackTransportClient; import org.elasticsearch.xpack.security.LocalStateSecurity; -import org.elasticsearch.xpack.security.Security; import java.net.InetSocketAddress; import java.nio.file.Files; import java.nio.file.Path; -import java.util.Map.Entry; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.Matchers.containsString; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/nio/SimpleSecurityNioTransportTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/nio/SimpleSecurityNioTransportTests.java index 4f3b750b226..070bfecd011 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/nio/SimpleSecurityNioTransportTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/nio/SimpleSecurityNioTransportTests.java @@ -8,9 +8,6 @@ package org.elasticsearch.xpack.security.transport.nio; import org.elasticsearch.Version; import org.elasticsearch.cluster.node.DiscoveryNode; import org.elasticsearch.common.SuppressForbidden; -import org.elasticsearch.common.bytes.BytesArray; -import org.elasticsearch.common.bytes.BytesReference; -import org.elasticsearch.common.io.stream.BytesStreamOutput; import org.elasticsearch.common.io.stream.NamedWriteableRegistry; import org.elasticsearch.common.io.stream.OutputStreamStreamOutput; import org.elasticsearch.common.network.NetworkService; @@ -23,36 +20,26 @@ import org.elasticsearch.common.util.BigArrays; import org.elasticsearch.common.util.MockPageCacheRecycler; import org.elasticsearch.env.TestEnvironment; import org.elasticsearch.indices.breaker.NoneCircuitBreakerService; -import org.elasticsearch.mocksocket.MockServerSocket; -import org.elasticsearch.mocksocket.MockSocket; import org.elasticsearch.node.Node; import org.elasticsearch.test.transport.MockTransportService; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.AbstractSimpleTransportTestCase; import org.elasticsearch.transport.BindTransportException; import org.elasticsearch.transport.ConnectTransportException; -import org.elasticsearch.transport.ConnectionProfile; import org.elasticsearch.transport.TcpChannel; import org.elasticsearch.transport.TcpTransport; import org.elasticsearch.transport.Transport; -import org.elasticsearch.transport.TransportRequestOptions; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.common.socket.SocketAccess; -import org.elasticsearch.xpack.ssl.SSLService; +import org.elasticsearch.xpack.core.common.socket.SocketAccess; +import org.elasticsearch.xpack.core.ssl.SSLService; import javax.net.SocketFactory; -import javax.net.ssl.HandshakeCompletedEvent; import javax.net.ssl.HandshakeCompletedListener; import javax.net.ssl.SSLSocket; -import javax.net.ssl.SSLSocketFactory; + import java.io.IOException; -import java.io.UncheckedIOException; import java.net.InetAddress; -import java.net.InetSocketAddress; -import java.net.ServerSocket; -import java.net.Socket; import java.net.UnknownHostException; -import java.nio.channels.SocketChannel; import java.nio.file.Path; import java.util.Collections; import java.util.concurrent.CountDownLatch; @@ -61,7 +48,6 @@ import static java.util.Collections.emptyMap; import static java.util.Collections.emptySet; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.instanceOf; -import static org.hamcrest.Matchers.startsWith; public class SimpleSecurityNioTransportTests extends AbstractSimpleTransportTestCase { diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/ssl/EllipticCurveSSLTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/ssl/EllipticCurveSSLTests.java index 231f160a8a7..ef718d090f7 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/ssl/EllipticCurveSSLTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/ssl/EllipticCurveSSLTests.java @@ -10,8 +10,8 @@ import org.elasticsearch.action.admin.cluster.node.info.NodesInfoResponse; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.transport.TransportAddress; import org.elasticsearch.test.SecurityIntegTestCase; -import org.elasticsearch.xpack.ssl.CertUtils; -import org.elasticsearch.xpack.ssl.SSLService; +import org.elasticsearch.xpack.core.ssl.CertUtils; +import org.elasticsearch.xpack.core.ssl.SSLService; import org.junit.Before; import javax.net.ssl.HandshakeCompletedEvent; @@ -22,6 +22,7 @@ import javax.net.ssl.SSLSocket; import javax.net.ssl.SSLSocketFactory; import javax.net.ssl.TrustManager; import javax.net.ssl.X509ExtendedKeyManager; + import java.io.Reader; import java.nio.file.Files; import java.nio.file.Path; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/ssl/SslIntegrationTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/ssl/SslIntegrationTests.java index 8cc3f645ac0..37f13806c23 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/ssl/SslIntegrationTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/ssl/SslIntegrationTests.java @@ -25,15 +25,15 @@ import org.elasticsearch.common.transport.TransportAddress; import org.elasticsearch.http.HttpServerTransport; import org.elasticsearch.test.SecurityIntegTestCase; import org.elasticsearch.transport.Transport; -import org.elasticsearch.xpack.TestXPackTransportClient; -import org.elasticsearch.xpack.common.socket.SocketAccess; +import org.elasticsearch.xpack.core.TestXPackTransportClient; +import org.elasticsearch.xpack.core.common.socket.SocketAccess; +import org.elasticsearch.xpack.core.ssl.SSLService; import org.elasticsearch.xpack.security.LocalStateSecurity; -import org.elasticsearch.xpack.security.Security; -import org.elasticsearch.xpack.ssl.SSLService; import javax.net.ssl.SSLContext; import javax.net.ssl.SSLHandshakeException; import javax.net.ssl.TrustManagerFactory; + import java.io.InputStreamReader; import java.net.InetSocketAddress; import java.nio.charset.StandardCharsets; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/ssl/SslMultiPortTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/ssl/SslMultiPortTests.java index 8d752bf45a7..1d7ec67762b 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/ssl/SslMultiPortTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/ssl/SslMultiPortTests.java @@ -11,11 +11,10 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.transport.TransportAddress; import org.elasticsearch.test.SecurityIntegTestCase; import org.elasticsearch.transport.Transport; -import org.elasticsearch.xpack.TestXPackTransportClient; +import org.elasticsearch.xpack.core.TestXPackTransportClient; +import org.elasticsearch.xpack.core.security.SecurityField; +import org.elasticsearch.xpack.core.ssl.SSLClientAuth; import org.elasticsearch.xpack.security.LocalStateSecurity; -import org.elasticsearch.xpack.security.Security; -import org.elasticsearch.xpack.security.SecurityField; -import org.elasticsearch.xpack.ssl.SSLClientAuth; import org.junit.BeforeClass; import java.net.InetAddress; @@ -23,9 +22,9 @@ import java.nio.file.Files; import java.nio.file.Path; import java.util.Collections; -import static org.elasticsearch.test.SecuritySettingsSourceField.TEST_PASSWORD; import static org.elasticsearch.test.SecuritySettingsSource.TEST_USER_NAME; import static org.elasticsearch.test.SecuritySettingsSource.addSSLSettingsForStore; +import static org.elasticsearch.test.SecuritySettingsSourceField.TEST_PASSWORD; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.Matchers.containsString; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/user/AnonymousUserIntegTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/user/AnonymousUserIntegTests.java index 9b7a226f570..738cf68763b 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/user/AnonymousUserIntegTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/user/AnonymousUserIntegTests.java @@ -11,6 +11,7 @@ import org.elasticsearch.client.ResponseException; import org.elasticsearch.common.network.NetworkModule; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.test.SecurityIntegTestCase; +import org.elasticsearch.xpack.core.security.user.AnonymousUser; import org.elasticsearch.xpack.security.authz.AuthorizationService; import static org.hamcrest.Matchers.containsString; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/user/AnonymousUserTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/user/AnonymousUserTests.java index e2ad48f2868..4c72afeb5ce 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/user/AnonymousUserTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/user/AnonymousUserTests.java @@ -8,6 +8,8 @@ package org.elasticsearch.xpack.security.user; import org.elasticsearch.common.io.stream.BytesStreamOutput; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.security.user.AnonymousUser; +import org.elasticsearch.xpack.core.security.user.User; import static org.hamcrest.Matchers.arrayContainingInAnyOrder; import static org.hamcrest.Matchers.equalTo; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/user/SystemUserTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/user/SystemUserTests.java index 8d665bd2b65..da1064e27a9 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/user/SystemUserTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/user/SystemUserTests.java @@ -6,6 +6,7 @@ package org.elasticsearch.xpack.security.user; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.security.user.SystemUser; import static org.hamcrest.Matchers.is; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/user/UserTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/user/UserTests.java index aa12ad643d1..5be4b1c0eca 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/user/UserTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/user/UserTests.java @@ -5,18 +5,23 @@ */ package org.elasticsearch.xpack.security.user; -import java.util.Arrays; -import java.util.Collections; - import org.elasticsearch.Version; import org.elasticsearch.common.io.stream.BytesStreamOutput; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.security.user.ElasticUser; +import org.elasticsearch.xpack.core.security.user.InternalUserSerializationHelper; +import org.elasticsearch.xpack.core.security.user.KibanaUser; +import org.elasticsearch.xpack.core.security.user.SystemUser; +import org.elasticsearch.xpack.core.security.user.User; +import org.elasticsearch.xpack.core.security.user.XPackUser; + +import java.util.Arrays; +import java.util.Collections; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.notNullValue; -import static org.hamcrest.Matchers.nullValue; import static org.hamcrest.Matchers.sameInstance; public class UserTests extends ESTestCase { diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/security/user/XPackUserTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/security/user/XPackUserTests.java index 2618abc9248..99c2ae635f6 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/security/user/XPackUserTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/security/user/XPackUserTests.java @@ -5,19 +5,20 @@ */ package org.elasticsearch.xpack.security.user; -import java.util.function.Predicate; - import org.elasticsearch.action.get.GetAction; import org.elasticsearch.action.index.IndexAction; import org.elasticsearch.action.search.SearchAction; import org.elasticsearch.action.update.UpdateAction; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.security.index.IndexAuditTrailField; +import org.elasticsearch.xpack.core.security.user.XPackUser; import org.elasticsearch.xpack.security.SecurityLifecycleService; -import org.elasticsearch.xpack.security.audit.index.IndexAuditTrailField; import org.elasticsearch.xpack.security.audit.index.IndexNameResolver; import org.hamcrest.Matchers; import org.joda.time.DateTime; +import java.util.function.Predicate; + public class XPackUserTests extends ESTestCase { public void testXPackUserCanAccessNonSecurityIndices() { diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/ssl/SSLClientAuthTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/ssl/SSLClientAuthTests.java index 383177ee2df..f82703006d0 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/ssl/SSLClientAuthTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/ssl/SSLClientAuthTests.java @@ -21,15 +21,16 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.transport.TransportAddress; import org.elasticsearch.test.SecurityIntegTestCase; import org.elasticsearch.transport.Transport; -import org.elasticsearch.xpack.TestXPackTransportClient; +import org.elasticsearch.xpack.core.TestXPackTransportClient; +import org.elasticsearch.xpack.core.security.SecurityField; +import org.elasticsearch.xpack.core.ssl.SSLClientAuth; import org.elasticsearch.xpack.security.LocalStateSecurity; -import org.elasticsearch.xpack.security.Security; -import org.elasticsearch.xpack.security.SecurityField; import javax.net.ssl.KeyManagerFactory; import javax.net.ssl.SSLContext; import javax.net.ssl.SSLHandshakeException; import javax.net.ssl.TrustManagerFactory; + import java.io.IOException; import java.io.InputStream; import java.nio.file.Files; @@ -38,7 +39,7 @@ import java.security.KeyStore; import java.security.SecureRandom; import java.security.cert.CertPathBuilderException; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.instanceOf; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/ssl/SSLReloadIntegTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/ssl/SSLReloadIntegTests.java index 1615fba197c..3e05c88953a 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/ssl/SSLReloadIntegTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/ssl/SSLReloadIntegTests.java @@ -25,12 +25,15 @@ import org.elasticsearch.test.SecurityIntegTestCase; import org.elasticsearch.test.SecuritySettingsSource; import org.elasticsearch.test.SecuritySettingsSourceField; import org.elasticsearch.transport.Transport; +import org.elasticsearch.xpack.core.ssl.CertUtils; +import org.elasticsearch.xpack.core.ssl.SSLService; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import javax.net.ssl.SSLHandshakeException; import javax.net.ssl.SSLSocket; import javax.net.ssl.SSLSocketFactory; + import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; diff --git a/plugin/security/src/test/java/org/elasticsearch/xpack/ssl/SSLTrustRestrictionsTests.java b/plugin/security/src/test/java/org/elasticsearch/xpack/ssl/SSLTrustRestrictionsTests.java index 82d97fa166c..7ec509a8ac2 100644 --- a/plugin/security/src/test/java/org/elasticsearch/xpack/ssl/SSLTrustRestrictionsTests.java +++ b/plugin/security/src/test/java/org/elasticsearch/xpack/ssl/SSLTrustRestrictionsTests.java @@ -5,21 +5,6 @@ */ package org.elasticsearch.xpack.ssl; -import javax.net.ssl.SSLHandshakeException; -import javax.net.ssl.SSLSocket; -import javax.net.ssl.SSLSocketFactory; -import javax.security.auth.x500.X500Principal; -import java.io.BufferedWriter; -import java.io.IOException; -import java.net.SocketException; -import java.nio.file.Files; -import java.nio.file.Path; -import java.security.KeyPair; -import java.security.PrivateKey; -import java.security.cert.X509Certificate; -import java.util.Collections; -import java.util.concurrent.TimeUnit; - import org.bouncycastle.asn1.x509.GeneralNames; import org.bouncycastle.openssl.jcajce.JcaPEMWriter; import org.elasticsearch.ElasticsearchException; @@ -31,10 +16,29 @@ import org.elasticsearch.test.ESIntegTestCase; import org.elasticsearch.test.SecurityIntegTestCase; import org.elasticsearch.test.junit.annotations.TestLogging; import org.elasticsearch.transport.Transport; +import org.elasticsearch.xpack.core.ssl.CertUtils; +import org.elasticsearch.xpack.core.ssl.RestrictedTrustManager; +import org.elasticsearch.xpack.core.ssl.SSLService; import org.junit.AfterClass; import org.junit.BeforeClass; -import static org.elasticsearch.xpack.ssl.CertUtils.generateSignedCertificate; +import javax.net.ssl.SSLHandshakeException; +import javax.net.ssl.SSLSocket; +import javax.net.ssl.SSLSocketFactory; +import javax.security.auth.x500.X500Principal; + +import java.io.BufferedWriter; +import java.io.IOException; +import java.net.SocketException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.security.KeyPair; +import java.security.PrivateKey; +import java.security.cert.X509Certificate; +import java.util.Collections; +import java.util.concurrent.TimeUnit; + +import static org.elasticsearch.xpack.core.ssl.CertUtils.generateSignedCertificate; import static org.hamcrest.Matchers.is; /** diff --git a/plugin/src/test/java/org/elasticsearch/xpack/test/rest/XPackRestIT.java b/plugin/src/test/java/org/elasticsearch/xpack/test/rest/XPackRestIT.java index fd117b82336..877c05659a9 100644 --- a/plugin/src/test/java/org/elasticsearch/xpack/test/rest/XPackRestIT.java +++ b/plugin/src/test/java/org/elasticsearch/xpack/test/rest/XPackRestIT.java @@ -17,12 +17,11 @@ import org.elasticsearch.test.SecuritySettingsSourceField; import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate; import org.elasticsearch.test.rest.yaml.ClientYamlTestResponse; import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase; -import org.elasticsearch.xpack.ml.MlMetaIndex; -import org.elasticsearch.xpack.ml.integration.MlRestTestStateCleaner; -import org.elasticsearch.xpack.ml.job.persistence.AnomalyDetectorsIndex; -import org.elasticsearch.xpack.ml.notifications.AuditorField; -import org.elasticsearch.xpack.security.SecurityLifecycleServiceField; -import org.elasticsearch.xpack.watcher.support.WatcherIndexTemplateRegistryField; +import org.elasticsearch.xpack.core.ml.MlMetaIndex; +import org.elasticsearch.xpack.core.ml.integration.MlRestTestStateCleaner; +import org.elasticsearch.xpack.core.ml.job.persistence.AnomalyDetectorsIndex; +import org.elasticsearch.xpack.core.ml.notifications.AuditorField; +import org.elasticsearch.xpack.core.watcher.support.WatcherIndexTemplateRegistryField; import org.junit.After; import org.junit.Before; @@ -41,7 +40,7 @@ import static java.util.Collections.emptyMap; import static java.util.Collections.singletonList; import static java.util.Collections.singletonMap; import static org.elasticsearch.common.xcontent.support.XContentMapValues.extractValue; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.is; diff --git a/plugin/upgrade/src/main/java/org/elasticsearch/xpack/upgrade/IndexUpgradeCheck.java b/plugin/upgrade/src/main/java/org/elasticsearch/xpack/upgrade/IndexUpgradeCheck.java index d569b425761..0972c780618 100644 --- a/plugin/upgrade/src/main/java/org/elasticsearch/xpack/upgrade/IndexUpgradeCheck.java +++ b/plugin/upgrade/src/main/java/org/elasticsearch/xpack/upgrade/IndexUpgradeCheck.java @@ -16,6 +16,8 @@ import org.elasticsearch.index.reindex.BulkByScrollResponse; import org.elasticsearch.script.Script; import org.elasticsearch.tasks.TaskId; import org.elasticsearch.transport.TransportResponse; +import org.elasticsearch.xpack.core.upgrade.IndexUpgradeCheckVersion; +import org.elasticsearch.xpack.core.upgrade.UpgradeActionRequired; import java.util.function.BiConsumer; import java.util.function.Consumer; diff --git a/plugin/upgrade/src/main/java/org/elasticsearch/xpack/upgrade/IndexUpgradeService.java b/plugin/upgrade/src/main/java/org/elasticsearch/xpack/upgrade/IndexUpgradeService.java index 658ce4aae63..af75595d4fd 100644 --- a/plugin/upgrade/src/main/java/org/elasticsearch/xpack/upgrade/IndexUpgradeService.java +++ b/plugin/upgrade/src/main/java/org/elasticsearch/xpack/upgrade/IndexUpgradeService.java @@ -17,6 +17,7 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.index.IndexNotFoundException; import org.elasticsearch.index.reindex.BulkByScrollResponse; import org.elasticsearch.tasks.TaskId; +import org.elasticsearch.xpack.core.upgrade.UpgradeActionRequired; import java.util.HashMap; import java.util.List; diff --git a/plugin/upgrade/src/main/java/org/elasticsearch/xpack/upgrade/Upgrade.java b/plugin/upgrade/src/main/java/org/elasticsearch/xpack/upgrade/Upgrade.java index ac8df1b0cec..568397e3739 100644 --- a/plugin/upgrade/src/main/java/org/elasticsearch/xpack/upgrade/Upgrade.java +++ b/plugin/upgrade/src/main/java/org/elasticsearch/xpack/upgrade/Upgrade.java @@ -9,7 +9,6 @@ import org.elasticsearch.Version; import org.elasticsearch.action.ActionRequest; import org.elasticsearch.action.ActionResponse; import org.elasticsearch.client.Client; -import org.elasticsearch.cluster.metadata.IndexMetaData; import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver; import org.elasticsearch.cluster.node.DiscoveryNodes; import org.elasticsearch.cluster.service.ClusterService; @@ -28,9 +27,8 @@ import org.elasticsearch.rest.RestHandler; import org.elasticsearch.script.ScriptService; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.watcher.ResourceWatcherService; -import org.elasticsearch.xpack.XPackClientPlugin; -import org.elasticsearch.xpack.upgrade.actions.IndexUpgradeAction; -import org.elasticsearch.xpack.upgrade.actions.IndexUpgradeInfoAction; +import org.elasticsearch.xpack.core.upgrade.actions.IndexUpgradeAction; +import org.elasticsearch.xpack.core.upgrade.actions.IndexUpgradeInfoAction; import org.elasticsearch.xpack.upgrade.actions.TransportIndexUpgradeAction; import org.elasticsearch.xpack.upgrade.actions.TransportIndexUpgradeInfoAction; import org.elasticsearch.xpack.upgrade.rest.RestIndexUpgradeAction; diff --git a/plugin/upgrade/src/main/java/org/elasticsearch/xpack/upgrade/actions/TransportIndexUpgradeAction.java b/plugin/upgrade/src/main/java/org/elasticsearch/xpack/upgrade/actions/TransportIndexUpgradeAction.java index 1cca3e18537..edb56017439 100644 --- a/plugin/upgrade/src/main/java/org/elasticsearch/xpack/upgrade/actions/TransportIndexUpgradeAction.java +++ b/plugin/upgrade/src/main/java/org/elasticsearch/xpack/upgrade/actions/TransportIndexUpgradeAction.java @@ -20,6 +20,7 @@ import org.elasticsearch.tasks.Task; import org.elasticsearch.tasks.TaskId; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; +import org.elasticsearch.xpack.core.upgrade.actions.IndexUpgradeAction; import org.elasticsearch.xpack.upgrade.IndexUpgradeService; public class TransportIndexUpgradeAction extends TransportMasterNodeAction { diff --git a/plugin/upgrade/src/main/java/org/elasticsearch/xpack/upgrade/actions/TransportIndexUpgradeInfoAction.java b/plugin/upgrade/src/main/java/org/elasticsearch/xpack/upgrade/actions/TransportIndexUpgradeInfoAction.java index a9f8d8f3231..67ec115d79f 100644 --- a/plugin/upgrade/src/main/java/org/elasticsearch/xpack/upgrade/actions/TransportIndexUpgradeInfoAction.java +++ b/plugin/upgrade/src/main/java/org/elasticsearch/xpack/upgrade/actions/TransportIndexUpgradeInfoAction.java @@ -19,9 +19,10 @@ import org.elasticsearch.license.LicenseUtils; import org.elasticsearch.license.XPackLicenseState; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.XPackField; +import org.elasticsearch.xpack.core.XPackField; +import org.elasticsearch.xpack.core.upgrade.actions.IndexUpgradeInfoAction; import org.elasticsearch.xpack.upgrade.IndexUpgradeService; -import org.elasticsearch.xpack.upgrade.UpgradeActionRequired; +import org.elasticsearch.xpack.core.upgrade.UpgradeActionRequired; import java.util.Map; diff --git a/plugin/upgrade/src/main/java/org/elasticsearch/xpack/upgrade/rest/RestIndexUpgradeAction.java b/plugin/upgrade/src/main/java/org/elasticsearch/xpack/upgrade/rest/RestIndexUpgradeAction.java index 73f21f1305d..337cd810f5e 100644 --- a/plugin/upgrade/src/main/java/org/elasticsearch/xpack/upgrade/rest/RestIndexUpgradeAction.java +++ b/plugin/upgrade/src/main/java/org/elasticsearch/xpack/upgrade/rest/RestIndexUpgradeAction.java @@ -24,8 +24,8 @@ import org.elasticsearch.rest.RestStatus; import org.elasticsearch.rest.action.RestBuilderListener; import org.elasticsearch.tasks.LoggingTaskListener; import org.elasticsearch.tasks.Task; -import org.elasticsearch.xpack.upgrade.actions.IndexUpgradeAction; -import org.elasticsearch.xpack.upgrade.actions.IndexUpgradeAction.Request; +import org.elasticsearch.xpack.core.upgrade.actions.IndexUpgradeAction; +import org.elasticsearch.xpack.core.upgrade.actions.IndexUpgradeAction.Request; import java.io.IOException; import java.util.HashMap; diff --git a/plugin/upgrade/src/main/java/org/elasticsearch/xpack/upgrade/rest/RestIndexUpgradeInfoAction.java b/plugin/upgrade/src/main/java/org/elasticsearch/xpack/upgrade/rest/RestIndexUpgradeInfoAction.java index 74e40d1f279..24b576187cb 100644 --- a/plugin/upgrade/src/main/java/org/elasticsearch/xpack/upgrade/rest/RestIndexUpgradeInfoAction.java +++ b/plugin/upgrade/src/main/java/org/elasticsearch/xpack/upgrade/rest/RestIndexUpgradeInfoAction.java @@ -13,8 +13,8 @@ import org.elasticsearch.rest.BaseRestHandler; import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.RestToXContentListener; -import org.elasticsearch.xpack.upgrade.actions.IndexUpgradeInfoAction; -import org.elasticsearch.xpack.upgrade.actions.IndexUpgradeInfoAction.Request; +import org.elasticsearch.xpack.core.upgrade.actions.IndexUpgradeInfoAction; +import org.elasticsearch.xpack.core.upgrade.actions.IndexUpgradeInfoAction.Request; import java.io.IOException; diff --git a/plugin/upgrade/src/test/java/org/elasticsearch/xpack/upgrade/IndexUpgradeIT.java b/plugin/upgrade/src/test/java/org/elasticsearch/xpack/upgrade/IndexUpgradeIT.java index e91d961c4e4..c2549857535 100644 --- a/plugin/upgrade/src/test/java/org/elasticsearch/xpack/upgrade/IndexUpgradeIT.java +++ b/plugin/upgrade/src/test/java/org/elasticsearch/xpack/upgrade/IndexUpgradeIT.java @@ -15,9 +15,10 @@ import org.elasticsearch.index.IndexNotFoundException; import org.elasticsearch.index.reindex.BulkByScrollResponse; import org.elasticsearch.tasks.TaskId; import org.elasticsearch.transport.TransportResponse; -import org.elasticsearch.xpack.upgrade.actions.IndexUpgradeAction; -import org.elasticsearch.xpack.upgrade.actions.IndexUpgradeInfoAction; -import org.elasticsearch.xpack.upgrade.actions.IndexUpgradeInfoAction.Response; +import org.elasticsearch.xpack.core.upgrade.UpgradeActionRequired; +import org.elasticsearch.xpack.core.upgrade.actions.IndexUpgradeAction; +import org.elasticsearch.xpack.core.upgrade.actions.IndexUpgradeInfoAction; +import org.elasticsearch.xpack.core.upgrade.actions.IndexUpgradeInfoAction.Response; import org.junit.Before; import java.util.Collections; diff --git a/plugin/upgrade/src/test/java/org/elasticsearch/xpack/upgrade/IndexUpgradeIntegTestCase.java b/plugin/upgrade/src/test/java/org/elasticsearch/xpack/upgrade/IndexUpgradeIntegTestCase.java index 1c06bc9d7fd..ea7514b5981 100644 --- a/plugin/upgrade/src/test/java/org/elasticsearch/xpack/upgrade/IndexUpgradeIntegTestCase.java +++ b/plugin/upgrade/src/test/java/org/elasticsearch/xpack/upgrade/IndexUpgradeIntegTestCase.java @@ -13,10 +13,10 @@ import org.elasticsearch.license.AbstractLicensesIntegrationTestCase; import org.elasticsearch.license.License; import org.elasticsearch.license.TestUtils; import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.xpack.XPackPlugin; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.ml.MachineLearningField; -import org.elasticsearch.xpack.monitoring.test.MockPainlessScriptEngine; +import org.elasticsearch.xpack.core.XPackPlugin; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.ml.MachineLearningField; +import org.elasticsearch.xpack.core.monitoring.test.MockPainlessScriptEngine; import java.util.Arrays; import java.util.Collection; diff --git a/plugin/upgrade/src/test/java/org/elasticsearch/xpack/upgrade/IndexUpgradeServiceTests.java b/plugin/upgrade/src/test/java/org/elasticsearch/xpack/upgrade/IndexUpgradeServiceTests.java index f0a0925f4fa..63b1c602bf9 100644 --- a/plugin/upgrade/src/test/java/org/elasticsearch/xpack/upgrade/IndexUpgradeServiceTests.java +++ b/plugin/upgrade/src/test/java/org/elasticsearch/xpack/upgrade/IndexUpgradeServiceTests.java @@ -16,6 +16,7 @@ import org.elasticsearch.cluster.metadata.MetaData; import org.elasticsearch.common.UUIDs; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.upgrade.UpgradeActionRequired; import java.io.IOException; import java.util.Arrays; diff --git a/plugin/upgrade/src/test/java/org/elasticsearch/xpack/upgrade/IndexUpgradeTasksIT.java b/plugin/upgrade/src/test/java/org/elasticsearch/xpack/upgrade/IndexUpgradeTasksIT.java index f53bcec7184..b47018418a3 100644 --- a/plugin/upgrade/src/test/java/org/elasticsearch/xpack/upgrade/IndexUpgradeTasksIT.java +++ b/plugin/upgrade/src/test/java/org/elasticsearch/xpack/upgrade/IndexUpgradeTasksIT.java @@ -38,8 +38,10 @@ import org.elasticsearch.script.ScriptType; import org.elasticsearch.test.ESIntegTestCase; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.watcher.ResourceWatcherService; -import org.elasticsearch.xpack.upgrade.actions.IndexUpgradeAction; -import org.elasticsearch.xpack.upgrade.actions.IndexUpgradeInfoAction; +import org.elasticsearch.xpack.core.upgrade.UpgradeActionRequired; +import org.elasticsearch.xpack.core.upgrade.UpgradeField; +import org.elasticsearch.xpack.core.upgrade.actions.IndexUpgradeAction; +import org.elasticsearch.xpack.core.upgrade.actions.IndexUpgradeInfoAction; import java.util.Arrays; import java.util.Collection; diff --git a/plugin/upgrade/src/test/java/org/elasticsearch/xpack/upgrade/InternalIndexReindexerIT.java b/plugin/upgrade/src/test/java/org/elasticsearch/xpack/upgrade/InternalIndexReindexerIT.java index 838e13f8b87..f8e99edb802 100644 --- a/plugin/upgrade/src/test/java/org/elasticsearch/xpack/upgrade/InternalIndexReindexerIT.java +++ b/plugin/upgrade/src/test/java/org/elasticsearch/xpack/upgrade/InternalIndexReindexerIT.java @@ -32,7 +32,7 @@ import org.elasticsearch.script.ScriptType; import org.elasticsearch.search.SearchHit; import org.elasticsearch.tasks.TaskId; import org.elasticsearch.transport.TransportResponse; -import org.elasticsearch.xpack.XPackPlugin; +import org.elasticsearch.xpack.core.XPackPlugin; import java.util.ArrayList; import java.util.Arrays; diff --git a/plugin/upgrade/src/test/java/org/elasticsearch/xpack/upgrade/actions/IndexUpgradeActionRequestTests.java b/plugin/upgrade/src/test/java/org/elasticsearch/xpack/upgrade/actions/IndexUpgradeActionRequestTests.java index f711713d964..acc2d07df72 100644 --- a/plugin/upgrade/src/test/java/org/elasticsearch/xpack/upgrade/actions/IndexUpgradeActionRequestTests.java +++ b/plugin/upgrade/src/test/java/org/elasticsearch/xpack/upgrade/actions/IndexUpgradeActionRequestTests.java @@ -7,7 +7,7 @@ package org.elasticsearch.xpack.upgrade.actions; import org.elasticsearch.common.io.stream.Writeable; import org.elasticsearch.test.AbstractWireSerializingTestCase; -import org.elasticsearch.xpack.upgrade.actions.IndexUpgradeAction.Request; +import org.elasticsearch.xpack.core.upgrade.actions.IndexUpgradeAction.Request; public class IndexUpgradeActionRequestTests extends AbstractWireSerializingTestCase { @Override diff --git a/plugin/upgrade/src/test/java/org/elasticsearch/xpack/upgrade/actions/IndexUpgradeInfoActionRequestTests.java b/plugin/upgrade/src/test/java/org/elasticsearch/xpack/upgrade/actions/IndexUpgradeInfoActionRequestTests.java index 7c083ae5375..38072755bc3 100644 --- a/plugin/upgrade/src/test/java/org/elasticsearch/xpack/upgrade/actions/IndexUpgradeInfoActionRequestTests.java +++ b/plugin/upgrade/src/test/java/org/elasticsearch/xpack/upgrade/actions/IndexUpgradeInfoActionRequestTests.java @@ -8,7 +8,7 @@ package org.elasticsearch.xpack.upgrade.actions; import org.elasticsearch.action.support.IndicesOptions; import org.elasticsearch.common.io.stream.Writeable; import org.elasticsearch.test.AbstractWireSerializingTestCase; -import org.elasticsearch.xpack.upgrade.actions.IndexUpgradeInfoAction.Request; +import org.elasticsearch.xpack.core.upgrade.actions.IndexUpgradeInfoAction.Request; public class IndexUpgradeInfoActionRequestTests extends AbstractWireSerializingTestCase { @Override diff --git a/plugin/upgrade/src/test/java/org/elasticsearch/xpack/upgrade/actions/IndexUpgradeInfoActionResponseTests.java b/plugin/upgrade/src/test/java/org/elasticsearch/xpack/upgrade/actions/IndexUpgradeInfoActionResponseTests.java index 39ad44537b0..6893e45dd2e 100644 --- a/plugin/upgrade/src/test/java/org/elasticsearch/xpack/upgrade/actions/IndexUpgradeInfoActionResponseTests.java +++ b/plugin/upgrade/src/test/java/org/elasticsearch/xpack/upgrade/actions/IndexUpgradeInfoActionResponseTests.java @@ -6,8 +6,8 @@ package org.elasticsearch.xpack.upgrade.actions; import org.elasticsearch.test.AbstractStreamableTestCase; -import org.elasticsearch.xpack.upgrade.UpgradeActionRequired; -import org.elasticsearch.xpack.upgrade.actions.IndexUpgradeInfoAction.Response; +import org.elasticsearch.xpack.core.upgrade.UpgradeActionRequired; +import org.elasticsearch.xpack.core.upgrade.actions.IndexUpgradeInfoAction.Response; import java.util.EnumSet; import java.util.HashMap; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/EncryptSensitiveDataBootstrapCheck.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/EncryptSensitiveDataBootstrapCheck.java index 259ed7c5366..b38e9c508e9 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/EncryptSensitiveDataBootstrapCheck.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/EncryptSensitiveDataBootstrapCheck.java @@ -8,7 +8,8 @@ package org.elasticsearch.xpack.watcher; import org.elasticsearch.bootstrap.BootstrapCheck; import org.elasticsearch.bootstrap.BootstrapContext; import org.elasticsearch.env.Environment; -import org.elasticsearch.xpack.XPackField; +import org.elasticsearch.xpack.core.XPackField; +import org.elasticsearch.xpack.core.watcher.WatcherField; import java.nio.file.Files; import java.nio.file.Path; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/Watcher.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/Watcher.java index 477f43c94b1..35a392b2506 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/Watcher.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/Watcher.java @@ -48,12 +48,30 @@ import org.elasticsearch.threadpool.ExecutorBuilder; import org.elasticsearch.threadpool.FixedExecutorBuilder; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.watcher.ResourceWatcherService; -import org.elasticsearch.xpack.XPackClientPlugin; -import org.elasticsearch.xpack.XPackPlugin; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.ssl.SSLService; -import org.elasticsearch.xpack.watcher.actions.ActionFactory; -import org.elasticsearch.xpack.watcher.actions.ActionRegistry; +import org.elasticsearch.xpack.core.XPackPlugin; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.ssl.SSLService; +import org.elasticsearch.xpack.core.watcher.WatcherField; +import org.elasticsearch.xpack.core.watcher.actions.ActionFactory; +import org.elasticsearch.xpack.core.watcher.actions.ActionRegistry; +import org.elasticsearch.xpack.core.watcher.condition.ConditionFactory; +import org.elasticsearch.xpack.core.watcher.condition.ConditionRegistry; +import org.elasticsearch.xpack.core.watcher.crypto.CryptoService; +import org.elasticsearch.xpack.core.watcher.execution.TriggeredWatchStoreField; +import org.elasticsearch.xpack.core.watcher.history.HistoryStoreField; +import org.elasticsearch.xpack.core.watcher.input.none.NoneInput; +import org.elasticsearch.xpack.core.watcher.transform.TransformFactory; +import org.elasticsearch.xpack.core.watcher.transform.TransformRegistry; +import org.elasticsearch.xpack.core.watcher.transport.actions.ack.AckWatchAction; +import org.elasticsearch.xpack.core.watcher.transport.actions.activate.ActivateWatchAction; +import org.elasticsearch.xpack.core.watcher.transport.actions.delete.DeleteWatchAction; +import org.elasticsearch.xpack.core.watcher.transport.actions.execute.ExecuteWatchAction; +import org.elasticsearch.xpack.core.watcher.transport.actions.get.GetWatchAction; +import org.elasticsearch.xpack.core.watcher.transport.actions.put.PutWatchAction; +import org.elasticsearch.xpack.core.watcher.transport.actions.service.WatcherServiceAction; +import org.elasticsearch.xpack.core.watcher.transport.actions.stats.WatcherStatsAction; +import org.elasticsearch.xpack.core.watcher.trigger.TriggerEvent; +import org.elasticsearch.xpack.core.watcher.watch.Watch; import org.elasticsearch.xpack.watcher.actions.email.EmailAction; import org.elasticsearch.xpack.watcher.actions.email.EmailActionFactory; import org.elasticsearch.xpack.watcher.actions.hipchat.HipChatAction; @@ -80,28 +98,22 @@ import org.elasticsearch.xpack.watcher.common.http.auth.basic.BasicAuthFactory; import org.elasticsearch.xpack.watcher.common.text.TextTemplateEngine; import org.elasticsearch.xpack.watcher.condition.ArrayCompareCondition; import org.elasticsearch.xpack.watcher.condition.CompareCondition; -import org.elasticsearch.xpack.watcher.condition.ConditionFactory; -import org.elasticsearch.xpack.watcher.condition.ConditionRegistry; import org.elasticsearch.xpack.watcher.condition.InternalAlwaysCondition; import org.elasticsearch.xpack.watcher.condition.NeverCondition; import org.elasticsearch.xpack.watcher.condition.ScriptCondition; -import org.elasticsearch.xpack.watcher.crypto.CryptoService; import org.elasticsearch.xpack.watcher.execution.AsyncTriggerEventConsumer; import org.elasticsearch.xpack.watcher.execution.ExecutionService; import org.elasticsearch.xpack.watcher.execution.InternalWatchExecutor; import org.elasticsearch.xpack.watcher.execution.TriggeredWatch; import org.elasticsearch.xpack.watcher.execution.TriggeredWatchStore; -import org.elasticsearch.xpack.watcher.execution.TriggeredWatchStoreField; import org.elasticsearch.xpack.watcher.execution.WatchExecutor; import org.elasticsearch.xpack.watcher.history.HistoryStore; -import org.elasticsearch.xpack.watcher.history.HistoryStoreField; import org.elasticsearch.xpack.watcher.input.InputFactory; import org.elasticsearch.xpack.watcher.input.InputRegistry; import org.elasticsearch.xpack.watcher.input.chain.ChainInput; import org.elasticsearch.xpack.watcher.input.chain.ChainInputFactory; import org.elasticsearch.xpack.watcher.input.http.HttpInput; import org.elasticsearch.xpack.watcher.input.http.HttpInputFactory; -import org.elasticsearch.xpack.watcher.input.none.NoneInput; import org.elasticsearch.xpack.watcher.input.none.NoneInputFactory; import org.elasticsearch.xpack.watcher.input.search.SearchInput; import org.elasticsearch.xpack.watcher.input.search.SearchInputFactory; @@ -132,30 +144,19 @@ import org.elasticsearch.xpack.watcher.rest.action.RestWatchServiceAction; import org.elasticsearch.xpack.watcher.rest.action.RestWatcherStatsAction; import org.elasticsearch.xpack.watcher.support.WatcherIndexTemplateRegistry; import org.elasticsearch.xpack.watcher.support.search.WatcherSearchTemplateService; -import org.elasticsearch.xpack.watcher.transform.TransformFactory; -import org.elasticsearch.xpack.watcher.transform.TransformRegistry; import org.elasticsearch.xpack.watcher.transform.script.ScriptTransform; import org.elasticsearch.xpack.watcher.transform.script.ScriptTransformFactory; import org.elasticsearch.xpack.watcher.transform.search.SearchTransform; import org.elasticsearch.xpack.watcher.transform.search.SearchTransformFactory; -import org.elasticsearch.xpack.watcher.transport.actions.ack.AckWatchAction; import org.elasticsearch.xpack.watcher.transport.actions.ack.TransportAckWatchAction; -import org.elasticsearch.xpack.watcher.transport.actions.activate.ActivateWatchAction; import org.elasticsearch.xpack.watcher.transport.actions.activate.TransportActivateWatchAction; -import org.elasticsearch.xpack.watcher.transport.actions.delete.DeleteWatchAction; import org.elasticsearch.xpack.watcher.transport.actions.delete.TransportDeleteWatchAction; -import org.elasticsearch.xpack.watcher.transport.actions.execute.ExecuteWatchAction; import org.elasticsearch.xpack.watcher.transport.actions.execute.TransportExecuteWatchAction; -import org.elasticsearch.xpack.watcher.transport.actions.get.GetWatchAction; import org.elasticsearch.xpack.watcher.transport.actions.get.TransportGetWatchAction; -import org.elasticsearch.xpack.watcher.transport.actions.put.PutWatchAction; import org.elasticsearch.xpack.watcher.transport.actions.put.TransportPutWatchAction; import org.elasticsearch.xpack.watcher.transport.actions.service.TransportWatcherServiceAction; -import org.elasticsearch.xpack.watcher.transport.actions.service.WatcherServiceAction; import org.elasticsearch.xpack.watcher.transport.actions.stats.TransportWatcherStatsAction; -import org.elasticsearch.xpack.watcher.transport.actions.stats.WatcherStatsAction; import org.elasticsearch.xpack.watcher.trigger.TriggerEngine; -import org.elasticsearch.xpack.watcher.trigger.TriggerEvent; import org.elasticsearch.xpack.watcher.trigger.TriggerService; import org.elasticsearch.xpack.watcher.trigger.manual.ManualTriggerEngine; import org.elasticsearch.xpack.watcher.trigger.schedule.CronSchedule; @@ -168,7 +169,6 @@ import org.elasticsearch.xpack.watcher.trigger.schedule.ScheduleRegistry; import org.elasticsearch.xpack.watcher.trigger.schedule.WeeklySchedule; import org.elasticsearch.xpack.watcher.trigger.schedule.YearlySchedule; import org.elasticsearch.xpack.watcher.trigger.schedule.engine.TickerScheduleTriggerEngine; -import org.elasticsearch.xpack.watcher.watch.Watch; import org.elasticsearch.xpack.watcher.watch.WatchParser; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/WatcherClientHelper.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/WatcherClientHelper.java index 74b619f8e03..1019f5a423e 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/WatcherClientHelper.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/WatcherClientHelper.java @@ -8,14 +8,14 @@ package org.elasticsearch.xpack.watcher; import org.elasticsearch.action.ActionResponse; import org.elasticsearch.client.Client; import org.elasticsearch.common.util.concurrent.ThreadContext; -import org.elasticsearch.xpack.watcher.watch.Watch; +import org.elasticsearch.xpack.core.watcher.watch.Watch; import java.util.Map; import java.util.function.Supplier; import java.util.stream.Collectors; -import static org.elasticsearch.xpack.ClientHelper.WATCHER_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.stashWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.WATCHER_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.stashWithOrigin; /** * A helper class which decides if we should run via the xpack user and set watcher as origin or diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/WatcherFeatureSet.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/WatcherFeatureSet.java index cd1950d8240..80f37bb5134 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/WatcherFeatureSet.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/WatcherFeatureSet.java @@ -5,17 +5,18 @@ */ package org.elasticsearch.xpack.watcher; -import java.util.Collections; -import java.util.Map; - import org.elasticsearch.action.ActionListener; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.license.XPackLicenseState; -import org.elasticsearch.xpack.XPackFeatureSet; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.XPackField; +import org.elasticsearch.xpack.core.XPackFeatureSet; +import org.elasticsearch.xpack.core.XPackField; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.watcher.WatcherFeatureSetUsage; + +import java.util.Collections; +import java.util.Map; public class WatcherFeatureSet implements XPackFeatureSet { @@ -58,7 +59,7 @@ public class WatcherFeatureSet implements XPackFeatureSet { @Override public void usage(ActionListener listener) { listener.onResponse( - new WatcherFeatureSetUsage(available(), enabled(), + new WatcherFeatureSetUsage(available(), enabled(), watcherService != null ? watcherService.usageStats() : Collections.emptyMap())); } diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/WatcherIndexingListener.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/WatcherIndexingListener.java index 0bdf5213bba..bb3045a0d36 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/WatcherIndexingListener.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/WatcherIndexingListener.java @@ -24,8 +24,8 @@ import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.index.engine.Engine; import org.elasticsearch.index.shard.IndexingOperationListener; import org.elasticsearch.index.shard.ShardId; +import org.elasticsearch.xpack.core.watcher.watch.Watch; import org.elasticsearch.xpack.watcher.trigger.TriggerService; -import org.elasticsearch.xpack.watcher.watch.Watch; import org.elasticsearch.xpack.watcher.watch.WatchParser; import org.elasticsearch.xpack.watcher.watch.WatchStoreUtils; import org.joda.time.DateTime; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/WatcherLifeCycleService.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/WatcherLifeCycleService.java index b48e6ae7e43..69597404a66 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/WatcherLifeCycleService.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/WatcherLifeCycleService.java @@ -21,10 +21,12 @@ import org.elasticsearch.common.component.LifecycleListener; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.gateway.GatewayService; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.xpack.upgrade.UpgradeField; -import org.elasticsearch.xpack.watcher.execution.TriggeredWatchStoreField; +import org.elasticsearch.xpack.core.watcher.WatcherMetaData; +import org.elasticsearch.xpack.core.watcher.WatcherState; +import org.elasticsearch.xpack.core.watcher.execution.TriggeredWatchStoreField; +import org.elasticsearch.xpack.core.watcher.watch.Watch; +import org.elasticsearch.xpack.core.upgrade.UpgradeField; import org.elasticsearch.xpack.watcher.support.WatcherIndexTemplateRegistry; -import org.elasticsearch.xpack.watcher.watch.Watch; import org.elasticsearch.xpack.watcher.watch.WatchStoreUtils; import java.util.Collections; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/WatcherService.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/WatcherService.java index cdcc9270507..8b4536d6568 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/WatcherService.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/WatcherService.java @@ -31,11 +31,12 @@ import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.search.SearchHit; import org.elasticsearch.search.builder.SearchSourceBuilder; import org.elasticsearch.search.sort.SortBuilders; +import org.elasticsearch.xpack.core.watcher.WatcherState; +import org.elasticsearch.xpack.core.watcher.watch.Watch; import org.elasticsearch.xpack.watcher.execution.ExecutionService; import org.elasticsearch.xpack.watcher.execution.TriggeredWatch; import org.elasticsearch.xpack.watcher.execution.TriggeredWatchStore; import org.elasticsearch.xpack.watcher.trigger.TriggerService; -import org.elasticsearch.xpack.watcher.watch.Watch; import org.elasticsearch.xpack.watcher.watch.WatchParser; import org.elasticsearch.xpack.watcher.watch.WatchStoreUtils; @@ -52,10 +53,10 @@ import java.util.stream.Collectors; import static org.elasticsearch.cluster.routing.ShardRoutingState.RELOCATING; import static org.elasticsearch.cluster.routing.ShardRoutingState.STARTED; -import static org.elasticsearch.xpack.ClientHelper.WATCHER_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.stashWithOrigin; -import static org.elasticsearch.xpack.watcher.support.Exceptions.illegalState; -import static org.elasticsearch.xpack.watcher.watch.Watch.INDEX; +import static org.elasticsearch.xpack.core.ClientHelper.WATCHER_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.stashWithOrigin; +import static org.elasticsearch.xpack.core.watcher.support.Exceptions.illegalState; +import static org.elasticsearch.xpack.core.watcher.watch.Watch.INDEX; public class WatcherService extends AbstractComponent { diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/email/EmailAction.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/email/EmailAction.java index b306dc75594..a17db3881f5 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/email/EmailAction.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/email/EmailAction.java @@ -10,7 +10,10 @@ import org.elasticsearch.common.Nullable; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.watcher.common.secret.Secret; +import org.elasticsearch.xpack.core.watcher.actions.Action; +import org.elasticsearch.xpack.core.watcher.common.secret.Secret; +import org.elasticsearch.xpack.core.watcher.support.xcontent.WatcherParams; +import org.elasticsearch.xpack.core.watcher.support.xcontent.WatcherXContentParser; import org.elasticsearch.xpack.watcher.notification.email.Authentication; import org.elasticsearch.xpack.watcher.notification.email.DataAttachment; import org.elasticsearch.xpack.watcher.notification.email.Email; @@ -18,9 +21,6 @@ import org.elasticsearch.xpack.watcher.notification.email.EmailTemplate; import org.elasticsearch.xpack.watcher.notification.email.Profile; import org.elasticsearch.xpack.watcher.notification.email.attachment.EmailAttachments; import org.elasticsearch.xpack.watcher.notification.email.attachment.EmailAttachmentsParser; -import org.elasticsearch.xpack.watcher.actions.Action; -import org.elasticsearch.xpack.watcher.support.xcontent.WatcherParams; -import org.elasticsearch.xpack.watcher.support.xcontent.WatcherXContentParser; import java.io.IOException; import java.util.Locale; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/email/EmailActionFactory.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/email/EmailActionFactory.java index 178840a5686..4b478eaba4d 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/email/EmailActionFactory.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/email/EmailActionFactory.java @@ -8,8 +8,8 @@ package org.elasticsearch.xpack.watcher.actions.email; import org.elasticsearch.common.logging.ServerLoggers; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentParser; +import org.elasticsearch.xpack.core.watcher.actions.ActionFactory; import org.elasticsearch.xpack.watcher.common.text.TextTemplateEngine; -import org.elasticsearch.xpack.watcher.actions.ActionFactory; import org.elasticsearch.xpack.watcher.notification.email.EmailService; import org.elasticsearch.xpack.watcher.notification.email.HtmlSanitizer; import org.elasticsearch.xpack.watcher.notification.email.attachment.EmailAttachmentsParser; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/email/ExecutableEmailAction.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/email/ExecutableEmailAction.java index a24a331adf1..8e0955c4eaf 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/email/ExecutableEmailAction.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/email/ExecutableEmailAction.java @@ -7,6 +7,10 @@ package org.elasticsearch.xpack.watcher.actions.email; import org.apache.logging.log4j.Logger; import org.elasticsearch.ElasticsearchException; +import org.elasticsearch.xpack.core.watcher.actions.Action; +import org.elasticsearch.xpack.core.watcher.actions.ExecutableAction; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.common.text.TextTemplateEngine; import org.elasticsearch.xpack.watcher.notification.email.Attachment; import org.elasticsearch.xpack.watcher.notification.email.DataAttachment; @@ -14,11 +18,7 @@ import org.elasticsearch.xpack.watcher.notification.email.Email; import org.elasticsearch.xpack.watcher.notification.email.EmailService; import org.elasticsearch.xpack.watcher.notification.email.HtmlSanitizer; import org.elasticsearch.xpack.watcher.notification.email.attachment.EmailAttachmentParser; -import org.elasticsearch.xpack.watcher.actions.Action; -import org.elasticsearch.xpack.watcher.actions.ExecutableAction; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; import org.elasticsearch.xpack.watcher.support.Variables; -import org.elasticsearch.xpack.watcher.watch.Payload; import java.io.IOException; import java.util.HashMap; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/hipchat/ExecutableHipChatAction.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/hipchat/ExecutableHipChatAction.java index af22925caa4..5772d1ffa6f 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/hipchat/ExecutableHipChatAction.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/hipchat/ExecutableHipChatAction.java @@ -6,16 +6,16 @@ package org.elasticsearch.xpack.watcher.actions.hipchat; import org.apache.logging.log4j.Logger; +import org.elasticsearch.xpack.core.watcher.actions.Action; +import org.elasticsearch.xpack.core.watcher.actions.ExecutableAction; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.common.text.TextTemplateEngine; import org.elasticsearch.xpack.watcher.notification.hipchat.HipChatAccount; import org.elasticsearch.xpack.watcher.notification.hipchat.HipChatMessage; import org.elasticsearch.xpack.watcher.notification.hipchat.HipChatService; import org.elasticsearch.xpack.watcher.notification.hipchat.SentMessages; -import org.elasticsearch.xpack.watcher.actions.Action; -import org.elasticsearch.xpack.watcher.actions.ExecutableAction; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; import org.elasticsearch.xpack.watcher.support.Variables; -import org.elasticsearch.xpack.watcher.watch.Payload; import java.util.Map; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/hipchat/HipChatAction.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/hipchat/HipChatAction.java index 23a0a3b821a..51dfb8ef8de 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/hipchat/HipChatAction.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/hipchat/HipChatAction.java @@ -11,11 +11,11 @@ import org.elasticsearch.common.Nullable; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; +import org.elasticsearch.xpack.core.watcher.actions.Action; import org.elasticsearch.xpack.watcher.common.http.HttpProxy; import org.elasticsearch.xpack.watcher.common.text.TextTemplate; import org.elasticsearch.xpack.watcher.notification.hipchat.HipChatMessage; import org.elasticsearch.xpack.watcher.notification.hipchat.SentMessages; -import org.elasticsearch.xpack.watcher.actions.Action; import java.io.IOException; import java.util.Objects; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/hipchat/HipChatActionFactory.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/hipchat/HipChatActionFactory.java index 5d6d02fd558..d725e6f6e70 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/hipchat/HipChatActionFactory.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/hipchat/HipChatActionFactory.java @@ -8,8 +8,8 @@ package org.elasticsearch.xpack.watcher.actions.hipchat; import org.elasticsearch.common.logging.ServerLoggers; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentParser; +import org.elasticsearch.xpack.core.watcher.actions.ActionFactory; import org.elasticsearch.xpack.watcher.common.text.TextTemplateEngine; -import org.elasticsearch.xpack.watcher.actions.ActionFactory; import org.elasticsearch.xpack.watcher.notification.hipchat.HipChatAccount; import org.elasticsearch.xpack.watcher.notification.hipchat.HipChatService; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/index/ExecutableIndexAction.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/index/ExecutableIndexAction.java index 252b3485e03..4633e0b9a00 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/index/ExecutableIndexAction.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/index/ExecutableIndexAction.java @@ -17,15 +17,15 @@ import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentType; +import org.elasticsearch.xpack.core.watcher.actions.Action; +import org.elasticsearch.xpack.core.watcher.actions.Action.Result.Status; +import org.elasticsearch.xpack.core.watcher.actions.ExecutableAction; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.support.WatcherDateTimeUtils; +import org.elasticsearch.xpack.core.watcher.support.xcontent.XContentSource; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.WatcherClientHelper; -import org.elasticsearch.xpack.watcher.actions.Action; -import org.elasticsearch.xpack.watcher.actions.Action.Result.Status; -import org.elasticsearch.xpack.watcher.actions.ExecutableAction; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; import org.elasticsearch.xpack.watcher.support.ArrayObjectIterator; -import org.elasticsearch.xpack.watcher.support.WatcherDateTimeUtils; -import org.elasticsearch.xpack.watcher.support.xcontent.XContentSource; -import org.elasticsearch.xpack.watcher.watch.Payload; import org.joda.time.DateTime; import java.io.IOException; @@ -34,7 +34,7 @@ import java.util.Map; import java.util.stream.Stream; import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.xpack.watcher.support.Exceptions.illegalState; +import static org.elasticsearch.xpack.core.watcher.support.Exceptions.illegalState; public class ExecutableIndexAction extends ExecutableAction { diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/index/IndexAction.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/index/IndexAction.java index 464bf2afe08..fa1e533ede0 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/index/IndexAction.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/index/IndexAction.java @@ -6,16 +6,15 @@ package org.elasticsearch.xpack.watcher.actions.index; import org.elasticsearch.ElasticsearchParseException; -import org.elasticsearch.action.support.WriteRequest; import org.elasticsearch.action.support.WriteRequest.RefreshPolicy; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.watcher.actions.Action; -import org.elasticsearch.xpack.watcher.support.WatcherDateTimeUtils; -import org.elasticsearch.xpack.watcher.support.xcontent.XContentSource; +import org.elasticsearch.xpack.core.watcher.actions.Action; +import org.elasticsearch.xpack.core.watcher.support.WatcherDateTimeUtils; +import org.elasticsearch.xpack.core.watcher.support.xcontent.XContentSource; import org.joda.time.DateTimeZone; import java.io.IOException; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/index/IndexActionFactory.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/index/IndexActionFactory.java index 05f39f108e7..d08e6e37231 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/index/IndexActionFactory.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/index/IndexActionFactory.java @@ -10,7 +10,7 @@ import org.elasticsearch.common.logging.ServerLoggers; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.watcher.actions.ActionFactory; +import org.elasticsearch.xpack.core.watcher.actions.ActionFactory; import java.io.IOException; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/jira/ExecutableJiraAction.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/jira/ExecutableJiraAction.java index 89970667605..acb0c8ce591 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/jira/ExecutableJiraAction.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/jira/ExecutableJiraAction.java @@ -6,16 +6,16 @@ package org.elasticsearch.xpack.watcher.actions.jira; import org.apache.logging.log4j.Logger; +import org.elasticsearch.xpack.core.watcher.actions.Action; +import org.elasticsearch.xpack.core.watcher.actions.ExecutableAction; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.common.text.TextTemplate; import org.elasticsearch.xpack.watcher.common.text.TextTemplateEngine; import org.elasticsearch.xpack.watcher.notification.jira.JiraAccount; import org.elasticsearch.xpack.watcher.notification.jira.JiraIssue; import org.elasticsearch.xpack.watcher.notification.jira.JiraService; -import org.elasticsearch.xpack.watcher.actions.Action; -import org.elasticsearch.xpack.watcher.actions.ExecutableAction; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; import org.elasticsearch.xpack.watcher.support.Variables; -import org.elasticsearch.xpack.watcher.watch.Payload; import java.util.ArrayList; import java.util.HashMap; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/jira/JiraAction.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/jira/JiraAction.java index e3aeb341096..018359c9f47 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/jira/JiraAction.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/jira/JiraAction.java @@ -11,9 +11,9 @@ import org.elasticsearch.common.Nullable; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; +import org.elasticsearch.xpack.core.watcher.actions.Action; import org.elasticsearch.xpack.watcher.common.http.HttpProxy; import org.elasticsearch.xpack.watcher.notification.jira.JiraIssue; -import org.elasticsearch.xpack.watcher.actions.Action; import java.io.IOException; import java.util.Collections; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/jira/JiraActionFactory.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/jira/JiraActionFactory.java index 29e0d09840e..e91f584eaef 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/jira/JiraActionFactory.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/jira/JiraActionFactory.java @@ -8,9 +8,9 @@ package org.elasticsearch.xpack.watcher.actions.jira; import org.elasticsearch.common.logging.ServerLoggers; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentParser; +import org.elasticsearch.xpack.core.watcher.actions.ActionFactory; import org.elasticsearch.xpack.watcher.common.text.TextTemplateEngine; import org.elasticsearch.xpack.watcher.notification.jira.JiraService; -import org.elasticsearch.xpack.watcher.actions.ActionFactory; import java.io.IOException; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/logging/ExecutableLoggingAction.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/logging/ExecutableLoggingAction.java index 32b5f1a7220..ad929d6e305 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/logging/ExecutableLoggingAction.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/logging/ExecutableLoggingAction.java @@ -8,12 +8,12 @@ package org.elasticsearch.xpack.watcher.actions.logging; import org.apache.logging.log4j.Logger; import org.elasticsearch.common.logging.ServerLoggers; import org.elasticsearch.common.settings.Settings; +import org.elasticsearch.xpack.core.watcher.actions.Action; +import org.elasticsearch.xpack.core.watcher.actions.ExecutableAction; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.common.text.TextTemplateEngine; -import org.elasticsearch.xpack.watcher.actions.Action; -import org.elasticsearch.xpack.watcher.actions.ExecutableAction; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; import org.elasticsearch.xpack.watcher.support.Variables; -import org.elasticsearch.xpack.watcher.watch.Payload; import java.util.Map; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/logging/LoggingAction.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/logging/LoggingAction.java index 0dbb415ef1d..5a84b2ed02e 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/logging/LoggingAction.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/logging/LoggingAction.java @@ -10,8 +10,8 @@ import org.elasticsearch.common.Nullable; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; +import org.elasticsearch.xpack.core.watcher.actions.Action; import org.elasticsearch.xpack.watcher.common.text.TextTemplate; -import org.elasticsearch.xpack.watcher.actions.Action; import java.io.IOException; import java.util.Locale; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/logging/LoggingActionFactory.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/logging/LoggingActionFactory.java index a17fc7dfa14..6edf51f5574 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/logging/LoggingActionFactory.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/logging/LoggingActionFactory.java @@ -8,8 +8,8 @@ package org.elasticsearch.xpack.watcher.actions.logging; import org.elasticsearch.common.logging.ServerLoggers; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentParser; +import org.elasticsearch.xpack.core.watcher.actions.ActionFactory; import org.elasticsearch.xpack.watcher.common.text.TextTemplateEngine; -import org.elasticsearch.xpack.watcher.actions.ActionFactory; import java.io.IOException; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/pagerduty/ExecutablePagerDutyAction.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/pagerduty/ExecutablePagerDutyAction.java index 6bd14162b06..224e72e1a3d 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/pagerduty/ExecutablePagerDutyAction.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/pagerduty/ExecutablePagerDutyAction.java @@ -6,16 +6,16 @@ package org.elasticsearch.xpack.watcher.actions.pagerduty; import org.apache.logging.log4j.Logger; +import org.elasticsearch.xpack.core.watcher.actions.Action; +import org.elasticsearch.xpack.core.watcher.actions.ExecutableAction; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.common.text.TextTemplateEngine; import org.elasticsearch.xpack.watcher.notification.pagerduty.IncidentEvent; import org.elasticsearch.xpack.watcher.notification.pagerduty.PagerDutyAccount; import org.elasticsearch.xpack.watcher.notification.pagerduty.PagerDutyService; import org.elasticsearch.xpack.watcher.notification.pagerduty.SentEvent; -import org.elasticsearch.xpack.watcher.actions.Action; -import org.elasticsearch.xpack.watcher.actions.ExecutableAction; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; import org.elasticsearch.xpack.watcher.support.Variables; -import org.elasticsearch.xpack.watcher.watch.Payload; import java.util.Map; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/pagerduty/PagerDutyAction.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/pagerduty/PagerDutyAction.java index f7aa819205c..78ddfd9efeb 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/pagerduty/PagerDutyAction.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/pagerduty/PagerDutyAction.java @@ -9,7 +9,7 @@ package org.elasticsearch.xpack.watcher.actions.pagerduty; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.watcher.actions.Action; +import org.elasticsearch.xpack.core.watcher.actions.Action; import org.elasticsearch.xpack.watcher.notification.pagerduty.IncidentEvent; import org.elasticsearch.xpack.watcher.notification.pagerduty.SentEvent; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/pagerduty/PagerDutyActionFactory.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/pagerduty/PagerDutyActionFactory.java index 4dd634028bc..9998a522fee 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/pagerduty/PagerDutyActionFactory.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/pagerduty/PagerDutyActionFactory.java @@ -8,9 +8,9 @@ package org.elasticsearch.xpack.watcher.actions.pagerduty; import org.elasticsearch.common.logging.ServerLoggers; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentParser; +import org.elasticsearch.xpack.core.watcher.actions.ActionFactory; import org.elasticsearch.xpack.watcher.common.text.TextTemplateEngine; import org.elasticsearch.xpack.watcher.notification.pagerduty.PagerDutyService; -import org.elasticsearch.xpack.watcher.actions.ActionFactory; import java.io.IOException; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/slack/ExecutableSlackAction.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/slack/ExecutableSlackAction.java index 35ce6f118e5..9ab4a028ca1 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/slack/ExecutableSlackAction.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/slack/ExecutableSlackAction.java @@ -6,16 +6,16 @@ package org.elasticsearch.xpack.watcher.actions.slack; import org.apache.logging.log4j.Logger; +import org.elasticsearch.xpack.core.watcher.actions.Action; +import org.elasticsearch.xpack.core.watcher.actions.ExecutableAction; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.common.text.TextTemplateEngine; import org.elasticsearch.xpack.watcher.notification.slack.SentMessages; import org.elasticsearch.xpack.watcher.notification.slack.SlackAccount; import org.elasticsearch.xpack.watcher.notification.slack.SlackService; import org.elasticsearch.xpack.watcher.notification.slack.message.SlackMessage; -import org.elasticsearch.xpack.watcher.actions.Action; -import org.elasticsearch.xpack.watcher.actions.ExecutableAction; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; import org.elasticsearch.xpack.watcher.support.Variables; -import org.elasticsearch.xpack.watcher.watch.Payload; import java.util.Map; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/slack/SlackAction.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/slack/SlackAction.java index d7d7df785ed..233853655e2 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/slack/SlackAction.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/slack/SlackAction.java @@ -11,10 +11,10 @@ import org.elasticsearch.common.Nullable; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; +import org.elasticsearch.xpack.core.watcher.actions.Action; import org.elasticsearch.xpack.watcher.common.http.HttpProxy; import org.elasticsearch.xpack.watcher.notification.slack.SentMessages; import org.elasticsearch.xpack.watcher.notification.slack.message.SlackMessage; -import org.elasticsearch.xpack.watcher.actions.Action; import java.io.IOException; import java.util.Objects; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/slack/SlackActionFactory.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/slack/SlackActionFactory.java index bbd443bee8f..40fe11e9263 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/slack/SlackActionFactory.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/slack/SlackActionFactory.java @@ -8,9 +8,9 @@ package org.elasticsearch.xpack.watcher.actions.slack; import org.elasticsearch.common.logging.ServerLoggers; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentParser; +import org.elasticsearch.xpack.core.watcher.actions.ActionFactory; import org.elasticsearch.xpack.watcher.common.text.TextTemplateEngine; import org.elasticsearch.xpack.watcher.notification.slack.SlackService; -import org.elasticsearch.xpack.watcher.actions.ActionFactory; import java.io.IOException; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/webhook/ExecutableWebhookAction.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/webhook/ExecutableWebhookAction.java index 095b35c48f8..7313d529b4a 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/webhook/ExecutableWebhookAction.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/webhook/ExecutableWebhookAction.java @@ -6,15 +6,15 @@ package org.elasticsearch.xpack.watcher.actions.webhook; import org.apache.logging.log4j.Logger; +import org.elasticsearch.xpack.core.watcher.actions.Action; +import org.elasticsearch.xpack.core.watcher.actions.ExecutableAction; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.common.http.HttpClient; import org.elasticsearch.xpack.watcher.common.http.HttpRequest; import org.elasticsearch.xpack.watcher.common.http.HttpResponse; import org.elasticsearch.xpack.watcher.common.text.TextTemplateEngine; -import org.elasticsearch.xpack.watcher.actions.Action; -import org.elasticsearch.xpack.watcher.actions.ExecutableAction; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; import org.elasticsearch.xpack.watcher.support.Variables; -import org.elasticsearch.xpack.watcher.watch.Payload; import java.util.Map; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/webhook/WebhookAction.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/webhook/WebhookAction.java index 383189f5bf1..8d20d91f4dc 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/webhook/WebhookAction.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/webhook/WebhookAction.java @@ -9,10 +9,10 @@ import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; +import org.elasticsearch.xpack.core.watcher.actions.Action; import org.elasticsearch.xpack.watcher.common.http.HttpRequest; import org.elasticsearch.xpack.watcher.common.http.HttpRequestTemplate; import org.elasticsearch.xpack.watcher.common.http.HttpResponse; -import org.elasticsearch.xpack.watcher.actions.Action; import java.io.IOException; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/webhook/WebhookActionFactory.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/webhook/WebhookActionFactory.java index 0b53b37fcbc..2cb3518d2e8 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/webhook/WebhookActionFactory.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/actions/webhook/WebhookActionFactory.java @@ -8,10 +8,10 @@ package org.elasticsearch.xpack.watcher.actions.webhook; import org.elasticsearch.common.logging.ServerLoggers; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.watcher.common.text.TextTemplateEngine; -import org.elasticsearch.xpack.watcher.actions.ActionFactory; +import org.elasticsearch.xpack.core.watcher.actions.ActionFactory; import org.elasticsearch.xpack.watcher.common.http.HttpClient; import org.elasticsearch.xpack.watcher.common.http.HttpRequestTemplate; +import org.elasticsearch.xpack.watcher.common.text.TextTemplateEngine; import java.io.IOException; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/client/WatchSourceBuilders.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/client/WatchSourceBuilders.java index fa9b7b591c2..8fe4f667c50 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/client/WatchSourceBuilders.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/client/WatchSourceBuilders.java @@ -5,6 +5,8 @@ */ package org.elasticsearch.xpack.watcher.client; +import org.elasticsearch.xpack.core.watcher.client.WatchSourceBuilder; + public final class WatchSourceBuilders { private WatchSourceBuilders() { diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/common/http/HttpClient.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/common/http/HttpClient.java index b5b44b8b84d..ecd6933fc46 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/common/http/HttpClient.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/common/http/HttpClient.java @@ -39,12 +39,13 @@ import org.elasticsearch.common.unit.ByteSizeValue; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.xpack.common.socket.SocketAccess; -import org.elasticsearch.xpack.ssl.SSLService; +import org.elasticsearch.xpack.core.common.socket.SocketAccess; +import org.elasticsearch.xpack.core.ssl.SSLService; import org.elasticsearch.xpack.watcher.common.http.auth.ApplicableHttpAuth; import org.elasticsearch.xpack.watcher.common.http.auth.HttpAuthRegistry; import javax.net.ssl.HostnameVerifier; + import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/common/http/HttpContentType.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/common/http/HttpContentType.java index e08a2ffdb4b..7901bdfdf93 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/common/http/HttpContentType.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/common/http/HttpContentType.java @@ -9,7 +9,7 @@ import org.elasticsearch.common.xcontent.XContentType; import java.util.Locale; -import static org.elasticsearch.xpack.watcher.support.Exceptions.illegalArgument; +import static org.elasticsearch.xpack.core.watcher.support.Exceptions.illegalArgument; public enum HttpContentType { diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/common/http/HttpRequest.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/common/http/HttpRequest.java index 07f82b52a6f..29ce415241a 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/common/http/HttpRequest.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/common/http/HttpRequest.java @@ -16,10 +16,10 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.rest.RestUtils; +import org.elasticsearch.xpack.core.watcher.support.WatcherDateTimeUtils; +import org.elasticsearch.xpack.core.watcher.support.WatcherUtils; import org.elasticsearch.xpack.watcher.common.http.auth.HttpAuth; import org.elasticsearch.xpack.watcher.common.http.auth.HttpAuthRegistry; -import org.elasticsearch.xpack.watcher.support.WatcherDateTimeUtils; -import org.elasticsearch.xpack.watcher.support.WatcherUtils; import java.io.IOException; import java.io.UnsupportedEncodingException; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/common/http/HttpRequestTemplate.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/common/http/HttpRequestTemplate.java index 2458e1d9d01..84e071c8bfb 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/common/http/HttpRequestTemplate.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/common/http/HttpRequestTemplate.java @@ -6,7 +6,6 @@ package org.elasticsearch.xpack.watcher.common.http; import io.netty.handler.codec.http.HttpHeaders; - import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.Strings; @@ -18,11 +17,11 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.rest.RestUtils; import org.elasticsearch.script.ScriptType; +import org.elasticsearch.xpack.core.watcher.support.WatcherDateTimeUtils; import org.elasticsearch.xpack.watcher.common.http.auth.HttpAuth; import org.elasticsearch.xpack.watcher.common.http.auth.HttpAuthRegistry; import org.elasticsearch.xpack.watcher.common.text.TextTemplate; import org.elasticsearch.xpack.watcher.common.text.TextTemplateEngine; -import org.elasticsearch.xpack.watcher.support.WatcherDateTimeUtils; import java.io.IOException; import java.net.URI; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/common/http/HttpSettings.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/common/http/HttpSettings.java index ca1dacdaa73..7b8e0efdf7b 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/common/http/HttpSettings.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/common/http/HttpSettings.java @@ -9,7 +9,7 @@ import org.elasticsearch.common.settings.Setting; import org.elasticsearch.common.unit.ByteSizeUnit; import org.elasticsearch.common.unit.ByteSizeValue; import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.xpack.ssl.SSLConfigurationSettings; +import org.elasticsearch.xpack.core.ssl.SSLConfigurationSettings; import java.util.ArrayList; import java.util.List; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/common/http/auth/HttpAuthRegistry.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/common/http/auth/HttpAuthRegistry.java index 2f217236707..edf584231d6 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/common/http/auth/HttpAuthRegistry.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/common/http/auth/HttpAuthRegistry.java @@ -11,7 +11,7 @@ import org.elasticsearch.common.xcontent.XContentParser; import java.io.IOException; import java.util.Map; -import static org.elasticsearch.xpack.watcher.support.Exceptions.illegalArgument; +import static org.elasticsearch.xpack.core.watcher.support.Exceptions.illegalArgument; public class HttpAuthRegistry { diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/common/http/auth/basic/ApplicableBasicAuth.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/common/http/auth/basic/ApplicableBasicAuth.java index 2d5de4a39c7..86639a59a12 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/common/http/auth/basic/ApplicableBasicAuth.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/common/http/auth/basic/ApplicableBasicAuth.java @@ -8,8 +8,8 @@ package org.elasticsearch.xpack.watcher.common.http.auth.basic; import org.apache.http.auth.AuthScope; import org.apache.http.auth.UsernamePasswordCredentials; import org.apache.http.client.CredentialsProvider; +import org.elasticsearch.xpack.core.watcher.crypto.CryptoService; import org.elasticsearch.xpack.watcher.common.http.auth.ApplicableHttpAuth; -import org.elasticsearch.xpack.watcher.crypto.CryptoService; import java.net.HttpURLConnection; import java.nio.charset.StandardCharsets; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/common/http/auth/basic/BasicAuth.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/common/http/auth/basic/BasicAuth.java index 8d32178515b..535742e9764 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/common/http/auth/basic/BasicAuth.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/common/http/auth/basic/BasicAuth.java @@ -9,10 +9,10 @@ import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; +import org.elasticsearch.xpack.core.watcher.common.secret.Secret; +import org.elasticsearch.xpack.core.watcher.support.xcontent.WatcherParams; +import org.elasticsearch.xpack.core.watcher.support.xcontent.WatcherXContentParser; import org.elasticsearch.xpack.watcher.common.http.auth.HttpAuth; -import org.elasticsearch.xpack.watcher.common.secret.Secret; -import org.elasticsearch.xpack.watcher.support.xcontent.WatcherParams; -import org.elasticsearch.xpack.watcher.support.xcontent.WatcherXContentParser; import java.io.IOException; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/common/http/auth/basic/BasicAuthFactory.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/common/http/auth/basic/BasicAuthFactory.java index 321fdf81f9f..838c53be7b1 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/common/http/auth/basic/BasicAuthFactory.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/common/http/auth/basic/BasicAuthFactory.java @@ -7,8 +7,8 @@ package org.elasticsearch.xpack.watcher.common.http.auth.basic; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.xcontent.XContentParser; +import org.elasticsearch.xpack.core.watcher.crypto.CryptoService; import org.elasticsearch.xpack.watcher.common.http.auth.HttpAuthFactory; -import org.elasticsearch.xpack.watcher.crypto.CryptoService; import java.io.IOException; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/condition/AbstractCompareCondition.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/condition/AbstractCompareCondition.java index da51cf9313e..555f9d46545 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/condition/AbstractCompareCondition.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/condition/AbstractCompareCondition.java @@ -6,10 +6,11 @@ package org.elasticsearch.xpack.watcher.condition; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.condition.ExecutableCondition; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.support.WatcherDateTimeUtils; +import org.elasticsearch.xpack.core.watcher.support.xcontent.ObjectPath; import org.elasticsearch.xpack.watcher.support.Variables; -import org.elasticsearch.xpack.watcher.support.WatcherDateTimeUtils; -import org.elasticsearch.xpack.watcher.support.xcontent.ObjectPath; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/condition/ArrayCompareCondition.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/condition/ArrayCompareCondition.java index 50de6f5b558..6aeccf734c2 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/condition/ArrayCompareCondition.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/condition/ArrayCompareCondition.java @@ -8,8 +8,8 @@ package org.elasticsearch.xpack.watcher.condition; import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.watcher.common.xcontent.XContentUtils; -import org.elasticsearch.xpack.watcher.support.xcontent.ObjectPath; +import org.elasticsearch.xpack.core.watcher.common.xcontent.XContentUtils; +import org.elasticsearch.xpack.core.watcher.support.xcontent.ObjectPath; import java.io.IOException; import java.time.Clock; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/condition/CompareCondition.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/condition/CompareCondition.java index 17d0595ac4d..a3b21dec295 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/condition/CompareCondition.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/condition/CompareCondition.java @@ -8,8 +8,8 @@ package org.elasticsearch.xpack.watcher.condition; import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.watcher.common.xcontent.XContentUtils; -import org.elasticsearch.xpack.watcher.support.xcontent.ObjectPath; +import org.elasticsearch.xpack.core.watcher.common.xcontent.XContentUtils; +import org.elasticsearch.xpack.core.watcher.support.xcontent.ObjectPath; import java.io.IOException; import java.time.Clock; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/condition/InternalAlwaysCondition.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/condition/InternalAlwaysCondition.java index 0aa6a80494a..1f1fe8c0325 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/condition/InternalAlwaysCondition.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/condition/InternalAlwaysCondition.java @@ -7,7 +7,9 @@ package org.elasticsearch.xpack.watcher.condition; import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.condition.AlwaysCondition; +import org.elasticsearch.xpack.core.watcher.condition.ExecutableCondition; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; import java.io.IOException; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/condition/LenientCompare.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/condition/LenientCompare.java index 5f918ea3149..06e93762244 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/condition/LenientCompare.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/condition/LenientCompare.java @@ -5,7 +5,7 @@ */ package org.elasticsearch.xpack.watcher.condition; -import org.elasticsearch.xpack.watcher.support.WatcherDateTimeUtils; +import org.elasticsearch.xpack.core.watcher.support.WatcherDateTimeUtils; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/condition/NeverCondition.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/condition/NeverCondition.java index c4b661b3322..f4994a1d6d5 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/condition/NeverCondition.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/condition/NeverCondition.java @@ -6,10 +6,10 @@ package org.elasticsearch.xpack.watcher.condition; import org.elasticsearch.ElasticsearchParseException; -import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.condition.ExecutableCondition; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; import java.io.IOException; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/condition/ScriptCondition.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/condition/ScriptCondition.java index 919190297be..e2befe9a24e 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/condition/ScriptCondition.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/condition/ScriptCondition.java @@ -11,14 +11,15 @@ import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.script.ExecutableScript; import org.elasticsearch.script.Script; import org.elasticsearch.script.ScriptService; +import org.elasticsearch.xpack.core.watcher.condition.ExecutableCondition; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; import org.elasticsearch.xpack.watcher.Watcher; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; import org.elasticsearch.xpack.watcher.support.Variables; import java.io.IOException; import java.util.Map; -import static org.elasticsearch.xpack.watcher.support.Exceptions.illegalState; +import static org.elasticsearch.xpack.core.watcher.support.Exceptions.illegalState; /** * This class executes a script against the ctx payload and returns a boolean diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/execution/AsyncTriggerEventConsumer.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/execution/AsyncTriggerEventConsumer.java index bc01e52a22f..0c1f724f7ce 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/execution/AsyncTriggerEventConsumer.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/execution/AsyncTriggerEventConsumer.java @@ -10,7 +10,7 @@ import org.apache.logging.log4j.message.ParameterizedMessage; import org.apache.logging.log4j.util.Supplier; import org.elasticsearch.common.logging.ServerLoggers; import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.xpack.watcher.trigger.TriggerEvent; +import org.elasticsearch.xpack.core.watcher.trigger.TriggerEvent; import java.util.function.Consumer; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/execution/CurrentExecutions.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/execution/CurrentExecutions.java index 58abc9d05ae..95ac8030036 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/execution/CurrentExecutions.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/execution/CurrentExecutions.java @@ -15,7 +15,7 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.ReentrantLock; -import static org.elasticsearch.xpack.watcher.support.Exceptions.illegalState; +import static org.elasticsearch.xpack.core.watcher.support.Exceptions.illegalState; public final class CurrentExecutions implements Iterable { diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/execution/ExecutionService.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/execution/ExecutionService.java index 3d8262c1f56..cf7ef56d296 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/execution/ExecutionService.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/execution/ExecutionService.java @@ -34,20 +34,24 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.common.xcontent.json.JsonXContent; import org.elasticsearch.index.engine.DocumentMissingException; -import org.elasticsearch.xpack.watcher.actions.ActionWrapperResult; -import org.elasticsearch.xpack.watcher.common.stats.Counters; +import org.elasticsearch.xpack.core.watcher.actions.ActionWrapper; +import org.elasticsearch.xpack.core.watcher.actions.ActionWrapperResult; +import org.elasticsearch.xpack.core.watcher.condition.Condition; +import org.elasticsearch.xpack.core.watcher.execution.ExecutionState; +import org.elasticsearch.xpack.core.watcher.execution.QueuedWatch; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionSnapshot; +import org.elasticsearch.xpack.core.watcher.history.WatchRecord; +import org.elasticsearch.xpack.core.watcher.input.Input; +import org.elasticsearch.xpack.core.watcher.transform.Transform; +import org.elasticsearch.xpack.core.watcher.trigger.TriggerEvent; +import org.elasticsearch.xpack.core.watcher.watch.Watch; +import org.elasticsearch.xpack.core.watcher.watch.WatchField; +import org.elasticsearch.xpack.core.watcher.watch.WatchStatus; import org.elasticsearch.xpack.watcher.Watcher; -import org.elasticsearch.xpack.watcher.actions.ActionWrapper; -import org.elasticsearch.xpack.watcher.condition.Condition; +import org.elasticsearch.xpack.watcher.common.stats.Counters; import org.elasticsearch.xpack.watcher.history.HistoryStore; -import org.elasticsearch.xpack.watcher.history.WatchRecord; -import org.elasticsearch.xpack.watcher.input.Input; -import org.elasticsearch.xpack.watcher.transform.Transform; -import org.elasticsearch.xpack.watcher.trigger.TriggerEvent; -import org.elasticsearch.xpack.watcher.watch.Watch; -import org.elasticsearch.xpack.watcher.watch.WatchField; import org.elasticsearch.xpack.watcher.watch.WatchParser; -import org.elasticsearch.xpack.watcher.watch.WatchStatus; import org.joda.time.DateTime; import java.io.IOException; @@ -63,8 +67,8 @@ import java.util.Map; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; -import static org.elasticsearch.xpack.ClientHelper.WATCHER_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.stashWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.WATCHER_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.stashWithOrigin; import static org.joda.time.DateTimeZone.UTC; public class ExecutionService extends AbstractComponent { diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/execution/InternalWatchExecutor.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/execution/InternalWatchExecutor.java index 08de680de10..21ba6451af6 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/execution/InternalWatchExecutor.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/execution/InternalWatchExecutor.java @@ -7,7 +7,7 @@ package org.elasticsearch.xpack.watcher.execution; import org.elasticsearch.common.util.concurrent.EsThreadPoolExecutor; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.xpack.XPackField; +import org.elasticsearch.xpack.core.XPackField; import java.util.concurrent.BlockingQueue; import java.util.stream.Stream; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/execution/ManualExecutionContext.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/execution/ManualExecutionContext.java index cccd7f3ca8a..28040478411 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/execution/ManualExecutionContext.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/execution/ManualExecutionContext.java @@ -7,13 +7,15 @@ package org.elasticsearch.xpack.watcher.execution; import org.elasticsearch.common.CheckedSupplier; import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.xpack.watcher.actions.Action; -import org.elasticsearch.xpack.watcher.actions.ActionWrapper; -import org.elasticsearch.xpack.watcher.actions.ActionWrapperResult; -import org.elasticsearch.xpack.watcher.condition.Condition; -import org.elasticsearch.xpack.watcher.input.Input; +import org.elasticsearch.xpack.core.watcher.actions.Action; +import org.elasticsearch.xpack.core.watcher.actions.ActionWrapper; +import org.elasticsearch.xpack.core.watcher.actions.ActionWrapperResult; +import org.elasticsearch.xpack.core.watcher.condition.Condition; +import org.elasticsearch.xpack.core.watcher.execution.ActionExecutionMode; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.input.Input; +import org.elasticsearch.xpack.core.watcher.watch.Watch; import org.elasticsearch.xpack.watcher.trigger.manual.ManualTriggerEvent; -import org.elasticsearch.xpack.watcher.watch.Watch; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/execution/SyncTriggerEventConsumer.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/execution/SyncTriggerEventConsumer.java index ec44a322887..f41258ea764 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/execution/SyncTriggerEventConsumer.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/execution/SyncTriggerEventConsumer.java @@ -10,7 +10,7 @@ import org.apache.logging.log4j.message.ParameterizedMessage; import org.apache.logging.log4j.util.Supplier; import org.elasticsearch.common.logging.ServerLoggers; import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.xpack.watcher.trigger.TriggerEvent; +import org.elasticsearch.xpack.core.watcher.trigger.TriggerEvent; import java.util.function.Consumer; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/execution/TriggeredExecutionContext.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/execution/TriggeredExecutionContext.java index 000670bc19c..642512e687c 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/execution/TriggeredExecutionContext.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/execution/TriggeredExecutionContext.java @@ -6,7 +6,8 @@ package org.elasticsearch.xpack.watcher.execution; import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.xpack.watcher.trigger.TriggerEvent; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.trigger.TriggerEvent; import org.joda.time.DateTime; public class TriggeredExecutionContext extends WatchExecutionContext { diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/execution/TriggeredWatch.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/execution/TriggeredWatch.java index 4e8bff7a236..7788fd1898a 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/execution/TriggeredWatch.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/execution/TriggeredWatch.java @@ -15,7 +15,8 @@ import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentHelper; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.watcher.trigger.TriggerEvent; +import org.elasticsearch.xpack.core.watcher.execution.Wid; +import org.elasticsearch.xpack.core.watcher.trigger.TriggerEvent; import org.elasticsearch.xpack.watcher.trigger.TriggerService; import java.io.IOException; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/execution/TriggeredWatchStore.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/execution/TriggeredWatchStore.java index bd933655dd5..dd889dfe4dc 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/execution/TriggeredWatchStore.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/execution/TriggeredWatchStore.java @@ -34,7 +34,9 @@ import org.elasticsearch.index.IndexNotFoundException; import org.elasticsearch.search.SearchHit; import org.elasticsearch.search.builder.SearchSourceBuilder; import org.elasticsearch.search.sort.SortBuilders; -import org.elasticsearch.xpack.watcher.watch.Watch; +import org.elasticsearch.xpack.core.watcher.execution.TriggeredWatchStoreField; +import org.elasticsearch.xpack.core.watcher.execution.Wid; +import org.elasticsearch.xpack.core.watcher.watch.Watch; import org.elasticsearch.xpack.watcher.watch.WatchStoreUtils; import java.io.IOException; @@ -46,10 +48,10 @@ import java.util.Set; import java.util.concurrent.atomic.AtomicBoolean; import java.util.stream.Collectors; -import static org.elasticsearch.xpack.ClientHelper.WATCHER_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.executeAsyncWithOrigin; -import static org.elasticsearch.xpack.ClientHelper.stashWithOrigin; -import static org.elasticsearch.xpack.watcher.support.Exceptions.illegalState; +import static org.elasticsearch.xpack.core.ClientHelper.WATCHER_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.stashWithOrigin; +import static org.elasticsearch.xpack.core.watcher.support.Exceptions.illegalState; public class TriggeredWatchStore extends AbstractComponent { diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/history/HistoryStore.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/history/HistoryStore.java index 5f95c1143e1..096b44cfac3 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/history/HistoryStore.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/history/HistoryStore.java @@ -17,8 +17,10 @@ import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.index.engine.VersionConflictEngineException; -import org.elasticsearch.xpack.watcher.execution.ExecutionState; -import org.elasticsearch.xpack.watcher.support.xcontent.WatcherParams; +import org.elasticsearch.xpack.core.watcher.execution.ExecutionState; +import org.elasticsearch.xpack.core.watcher.history.HistoryStoreField; +import org.elasticsearch.xpack.core.watcher.history.WatchRecord; +import org.elasticsearch.xpack.core.watcher.support.xcontent.WatcherParams; import org.elasticsearch.xpack.watcher.watch.WatchStoreUtils; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; @@ -32,9 +34,9 @@ import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReadWriteLock; import java.util.concurrent.locks.ReentrantReadWriteLock; -import static org.elasticsearch.xpack.ClientHelper.WATCHER_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.stashWithOrigin; -import static org.elasticsearch.xpack.watcher.support.Exceptions.ioException; +import static org.elasticsearch.xpack.core.ClientHelper.WATCHER_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.stashWithOrigin; +import static org.elasticsearch.xpack.core.watcher.support.Exceptions.ioException; public class HistoryStore extends AbstractComponent { diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/InputBuilders.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/InputBuilders.java index 46015088948..4faf6636edc 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/InputBuilders.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/InputBuilders.java @@ -6,14 +6,14 @@ package org.elasticsearch.xpack.watcher.input; import org.elasticsearch.common.collect.MapBuilder; +import org.elasticsearch.xpack.core.watcher.input.none.NoneInput; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.common.http.HttpRequestTemplate; import org.elasticsearch.xpack.watcher.input.chain.ChainInput; import org.elasticsearch.xpack.watcher.input.http.HttpInput; -import org.elasticsearch.xpack.watcher.input.none.NoneInput; import org.elasticsearch.xpack.watcher.input.search.SearchInput; import org.elasticsearch.xpack.watcher.input.simple.SimpleInput; import org.elasticsearch.xpack.watcher.support.search.WatcherSearchTemplateRequest; -import org.elasticsearch.xpack.watcher.watch.Payload; import java.util.HashMap; import java.util.Map; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/InputFactory.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/InputFactory.java index b868998aee8..25deb2227c6 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/InputFactory.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/InputFactory.java @@ -7,6 +7,8 @@ package org.elasticsearch.xpack.watcher.input; import org.apache.logging.log4j.Logger; import org.elasticsearch.common.xcontent.XContentParser; +import org.elasticsearch.xpack.core.watcher.input.ExecutableInput; +import org.elasticsearch.xpack.core.watcher.input.Input; import java.io.IOException; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/InputRegistry.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/InputRegistry.java index c1a3de8fb95..460725c3dda 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/InputRegistry.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/InputRegistry.java @@ -8,6 +8,7 @@ package org.elasticsearch.xpack.watcher.input; import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentParser; +import org.elasticsearch.xpack.core.watcher.input.ExecutableInput; import org.elasticsearch.xpack.watcher.input.chain.ChainInput; import org.elasticsearch.xpack.watcher.input.chain.ChainInputFactory; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/chain/ChainInput.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/chain/ChainInput.java index 6c33045d322..3c62f4d1066 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/chain/ChainInput.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/chain/ChainInput.java @@ -10,9 +10,9 @@ import org.elasticsearch.common.ParseField; import org.elasticsearch.common.collect.Tuple; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.watcher.input.Input; +import org.elasticsearch.xpack.core.watcher.input.Input; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.input.InputRegistry; -import org.elasticsearch.xpack.watcher.watch.Payload; import java.io.IOException; import java.util.ArrayList; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/chain/ChainInputFactory.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/chain/ChainInputFactory.java index 792bb233d47..c885d32eb4d 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/chain/ChainInputFactory.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/chain/ChainInputFactory.java @@ -9,8 +9,8 @@ import org.elasticsearch.common.collect.Tuple; import org.elasticsearch.common.logging.ServerLoggers; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.watcher.input.ExecutableInput; -import org.elasticsearch.xpack.watcher.input.Input; +import org.elasticsearch.xpack.core.watcher.input.ExecutableInput; +import org.elasticsearch.xpack.core.watcher.input.Input; import org.elasticsearch.xpack.watcher.input.InputFactory; import org.elasticsearch.xpack.watcher.input.InputRegistry; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/chain/ExecutableChainInput.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/chain/ExecutableChainInput.java index c2f9372ba2f..2643876bdb6 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/chain/ExecutableChainInput.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/chain/ExecutableChainInput.java @@ -7,10 +7,10 @@ package org.elasticsearch.xpack.watcher.input.chain; import org.apache.logging.log4j.Logger; import org.elasticsearch.common.collect.Tuple; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; -import org.elasticsearch.xpack.watcher.input.ExecutableInput; -import org.elasticsearch.xpack.watcher.input.Input; -import org.elasticsearch.xpack.watcher.watch.Payload; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.input.ExecutableInput; +import org.elasticsearch.xpack.core.watcher.input.Input; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import java.util.ArrayList; import java.util.HashMap; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/http/ExecutableHttpInput.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/http/ExecutableHttpInput.java index 37b1766dafb..c4dad3b27c6 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/http/ExecutableHttpInput.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/http/ExecutableHttpInput.java @@ -12,15 +12,15 @@ import org.elasticsearch.common.xcontent.NamedXContentRegistry; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentType; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.input.ExecutableInput; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.common.http.HttpClient; import org.elasticsearch.xpack.watcher.common.http.HttpRequest; import org.elasticsearch.xpack.watcher.common.http.HttpResponse; import org.elasticsearch.xpack.watcher.common.text.TextTemplateEngine; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; -import org.elasticsearch.xpack.watcher.input.ExecutableInput; import org.elasticsearch.xpack.watcher.support.Variables; import org.elasticsearch.xpack.watcher.support.XContentFilterKeysUtils; -import org.elasticsearch.xpack.watcher.watch.Payload; import java.util.HashMap; import java.util.List; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/http/HttpInput.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/http/HttpInput.java index 328e5c949ac..0e0d14d1bc9 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/http/HttpInput.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/http/HttpInput.java @@ -10,11 +10,11 @@ import org.elasticsearch.common.Nullable; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; +import org.elasticsearch.xpack.core.watcher.input.Input; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.common.http.HttpContentType; import org.elasticsearch.xpack.watcher.common.http.HttpRequest; import org.elasticsearch.xpack.watcher.common.http.HttpRequestTemplate; -import org.elasticsearch.xpack.watcher.input.Input; -import org.elasticsearch.xpack.watcher.watch.Payload; import java.io.IOException; import java.util.Collection; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/none/ExecutableNoneInput.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/none/ExecutableNoneInput.java index 69815b0ea3e..ff0eb3eacbb 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/none/ExecutableNoneInput.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/none/ExecutableNoneInput.java @@ -7,9 +7,10 @@ package org.elasticsearch.xpack.watcher.input.none; import org.apache.logging.log4j.Logger; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; -import org.elasticsearch.xpack.watcher.input.ExecutableInput; -import org.elasticsearch.xpack.watcher.watch.Payload; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.input.ExecutableInput; +import org.elasticsearch.xpack.core.watcher.input.none.NoneInput; +import org.elasticsearch.xpack.core.watcher.watch.Payload; public class ExecutableNoneInput extends ExecutableInput { diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/none/NoneInputFactory.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/none/NoneInputFactory.java index c7c59b57dd1..a86ebee8d88 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/none/NoneInputFactory.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/none/NoneInputFactory.java @@ -8,6 +8,7 @@ package org.elasticsearch.xpack.watcher.input.none; import org.elasticsearch.common.logging.ServerLoggers; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentParser; +import org.elasticsearch.xpack.core.watcher.input.none.NoneInput; import org.elasticsearch.xpack.watcher.input.InputFactory; import java.io.IOException; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/search/ExecutableSearchInput.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/search/ExecutableSearchInput.java index 560350ba5a0..7110fc5bbbb 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/search/ExecutableSearchInput.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/search/ExecutableSearchInput.java @@ -19,13 +19,13 @@ import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.script.Script; import org.elasticsearch.search.SearchHit; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.input.ExecutableInput; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.WatcherClientHelper; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; -import org.elasticsearch.xpack.watcher.input.ExecutableInput; import org.elasticsearch.xpack.watcher.support.XContentFilterKeysUtils; import org.elasticsearch.xpack.watcher.support.search.WatcherSearchTemplateRequest; import org.elasticsearch.xpack.watcher.support.search.WatcherSearchTemplateService; -import org.elasticsearch.xpack.watcher.watch.Payload; import java.util.Map; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/search/SearchInput.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/search/SearchInput.java index 3cb4fe7a10e..15baf2199b9 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/search/SearchInput.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/search/SearchInput.java @@ -11,10 +11,10 @@ import org.elasticsearch.common.ParseField; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.watcher.input.Input; -import org.elasticsearch.xpack.watcher.support.WatcherDateTimeUtils; +import org.elasticsearch.xpack.core.watcher.input.Input; +import org.elasticsearch.xpack.core.watcher.support.WatcherDateTimeUtils; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.support.search.WatcherSearchTemplateRequest; -import org.elasticsearch.xpack.watcher.watch.Payload; import org.joda.time.DateTimeZone; import java.io.IOException; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/simple/ExecutableSimpleInput.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/simple/ExecutableSimpleInput.java index 513386d67db..97cb764fbd2 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/simple/ExecutableSimpleInput.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/simple/ExecutableSimpleInput.java @@ -6,9 +6,9 @@ package org.elasticsearch.xpack.watcher.input.simple; import org.apache.logging.log4j.Logger; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; -import org.elasticsearch.xpack.watcher.input.ExecutableInput; -import org.elasticsearch.xpack.watcher.watch.Payload; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.input.ExecutableInput; +import org.elasticsearch.xpack.core.watcher.watch.Payload; /** * This class just defines a simple xcontent map as an input diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/simple/SimpleInput.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/simple/SimpleInput.java index 918679e76ec..584b3eaf172 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/simple/SimpleInput.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/simple/SimpleInput.java @@ -8,8 +8,8 @@ package org.elasticsearch.xpack.watcher.input.simple; import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.watcher.input.Input; -import org.elasticsearch.xpack.watcher.watch.Payload; +import org.elasticsearch.xpack.core.watcher.input.Input; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import java.io.IOException; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/transform/ExecutableTransformInput.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/transform/ExecutableTransformInput.java index c737c5b97f3..944a616d067 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/transform/ExecutableTransformInput.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/transform/ExecutableTransformInput.java @@ -6,11 +6,11 @@ package org.elasticsearch.xpack.watcher.input.transform; import org.apache.logging.log4j.Logger; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; -import org.elasticsearch.xpack.watcher.input.ExecutableInput; -import org.elasticsearch.xpack.watcher.transform.ExecutableTransform; -import org.elasticsearch.xpack.watcher.transform.Transform; -import org.elasticsearch.xpack.watcher.watch.Payload; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.input.ExecutableInput; +import org.elasticsearch.xpack.core.watcher.transform.ExecutableTransform; +import org.elasticsearch.xpack.core.watcher.transform.Transform; +import org.elasticsearch.xpack.core.watcher.watch.Payload; public final class ExecutableTransformInput extends ExecutableInput { diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/transform/TransformInput.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/transform/TransformInput.java index c3b7632b8d5..11c16c0b35e 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/transform/TransformInput.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/transform/TransformInput.java @@ -6,9 +6,9 @@ package org.elasticsearch.xpack.watcher.input.transform; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.watcher.input.Input; -import org.elasticsearch.xpack.watcher.transform.Transform; -import org.elasticsearch.xpack.watcher.watch.Payload; +import org.elasticsearch.xpack.core.watcher.input.Input; +import org.elasticsearch.xpack.core.watcher.transform.Transform; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import java.io.IOException; import java.util.Objects; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/transform/TransformInputFactory.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/transform/TransformInputFactory.java index 9e728e8704a..ffee0ca80db 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/transform/TransformInputFactory.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/input/transform/TransformInputFactory.java @@ -9,11 +9,11 @@ import org.elasticsearch.common.logging.ServerLoggers; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentParserUtils; +import org.elasticsearch.xpack.core.watcher.transform.ExecutableTransform; +import org.elasticsearch.xpack.core.watcher.transform.Transform; +import org.elasticsearch.xpack.core.watcher.transform.TransformFactory; +import org.elasticsearch.xpack.core.watcher.transform.TransformRegistry; import org.elasticsearch.xpack.watcher.input.InputFactory; -import org.elasticsearch.xpack.watcher.transform.ExecutableTransform; -import org.elasticsearch.xpack.watcher.transform.Transform; -import org.elasticsearch.xpack.watcher.transform.TransformFactory; -import org.elasticsearch.xpack.watcher.transform.TransformRegistry; import java.io.IOException; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/email/Account.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/email/Account.java index 4d44e956d8b..d52dc91d5fd 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/email/Account.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/email/Account.java @@ -10,7 +10,7 @@ import org.elasticsearch.SpecialPermission; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.settings.SettingsException; import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.xpack.watcher.crypto.CryptoService; +import org.elasticsearch.xpack.core.watcher.crypto.CryptoService; import javax.activation.CommandMap; import javax.activation.MailcapCommandMap; @@ -19,6 +19,7 @@ import javax.mail.Session; import javax.mail.Transport; import javax.mail.internet.InternetAddress; import javax.mail.internet.MimeMessage; + import java.security.AccessController; import java.security.PrivilegedAction; import java.security.PrivilegedActionException; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/email/Authentication.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/email/Authentication.java index aab5f6e48a2..4ab76020bb6 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/email/Authentication.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/email/Authentication.java @@ -5,7 +5,7 @@ */ package org.elasticsearch.xpack.watcher.notification.email; -import org.elasticsearch.xpack.watcher.common.secret.Secret; +import org.elasticsearch.xpack.core.watcher.common.secret.Secret; import java.util.Objects; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/email/DataAttachment.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/email/DataAttachment.java index b742f513f9e..2ef16c6d3a3 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/email/DataAttachment.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/email/DataAttachment.java @@ -11,13 +11,13 @@ import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.xpack.watcher.watch.Payload; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import java.io.IOException; import java.util.Locale; import java.util.Map; -import static org.elasticsearch.xpack.watcher.support.Exceptions.illegalArgument; +import static org.elasticsearch.xpack.core.watcher.support.Exceptions.illegalArgument; public enum DataAttachment implements ToXContentObject { diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/email/EmailService.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/email/EmailService.java index 18c18220427..0c8b007da45 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/email/EmailService.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/email/EmailService.java @@ -9,7 +9,7 @@ import org.elasticsearch.common.Nullable; import org.elasticsearch.common.settings.ClusterSettings; import org.elasticsearch.common.settings.Setting; import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.xpack.watcher.crypto.CryptoService; +import org.elasticsearch.xpack.core.watcher.crypto.CryptoService; import org.elasticsearch.xpack.watcher.notification.NotificationService; import javax.mail.MessagingException; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/email/attachment/DataAttachmentParser.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/email/attachment/DataAttachmentParser.java index 11c17b93756..36f6fda6ae6 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/email/attachment/DataAttachmentParser.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/email/attachment/DataAttachmentParser.java @@ -9,10 +9,10 @@ import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.Strings; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.notification.email.Attachment; import org.elasticsearch.xpack.watcher.support.Variables; -import org.elasticsearch.xpack.watcher.watch.Payload; import java.io.IOException; import java.util.Map; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/email/attachment/EmailAttachmentParser.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/email/attachment/EmailAttachmentParser.java index 4c2ce534b5a..5bf786bef44 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/email/attachment/EmailAttachmentParser.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/email/attachment/EmailAttachmentParser.java @@ -7,9 +7,9 @@ package org.elasticsearch.xpack.watcher.notification.email.attachment; import org.elasticsearch.common.xcontent.ToXContentFragment; import org.elasticsearch.common.xcontent.XContentParser; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.notification.email.Attachment; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; -import org.elasticsearch.xpack.watcher.watch.Payload; import java.io.IOException; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/email/attachment/HttpEmailAttachementParser.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/email/attachment/HttpEmailAttachementParser.java index a95e1c63326..a11998253e2 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/email/attachment/HttpEmailAttachementParser.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/email/attachment/HttpEmailAttachementParser.java @@ -11,15 +11,15 @@ import org.elasticsearch.common.ParseField; import org.elasticsearch.common.Strings; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.xcontent.XContentParser; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.common.http.HttpClient; import org.elasticsearch.xpack.watcher.common.http.HttpRequest; import org.elasticsearch.xpack.watcher.common.http.HttpRequestTemplate; import org.elasticsearch.xpack.watcher.common.http.HttpResponse; import org.elasticsearch.xpack.watcher.common.text.TextTemplateEngine; import org.elasticsearch.xpack.watcher.notification.email.Attachment; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; import org.elasticsearch.xpack.watcher.support.Variables; -import org.elasticsearch.xpack.watcher.watch.Payload; import java.io.IOException; import java.util.Map; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/email/attachment/ReportingAttachmentParser.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/email/attachment/ReportingAttachmentParser.java index 382c3d2f111..4c80e31c591 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/email/attachment/ReportingAttachmentParser.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/email/attachment/ReportingAttachmentParser.java @@ -19,6 +19,8 @@ import org.elasticsearch.common.xcontent.NamedXContentRegistry; import org.elasticsearch.common.xcontent.ObjectParser; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.json.JsonXContent; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.common.http.HttpClient; import org.elasticsearch.xpack.watcher.common.http.HttpMethod; import org.elasticsearch.xpack.watcher.common.http.HttpProxy; @@ -30,9 +32,7 @@ import org.elasticsearch.xpack.watcher.common.http.auth.HttpAuthRegistry; import org.elasticsearch.xpack.watcher.common.text.TextTemplate; import org.elasticsearch.xpack.watcher.common.text.TextTemplateEngine; import org.elasticsearch.xpack.watcher.notification.email.Attachment; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; import org.elasticsearch.xpack.watcher.support.Variables; -import org.elasticsearch.xpack.watcher.watch.Payload; import java.io.IOException; import java.io.UncheckedIOException; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/pagerduty/IncidentEvent.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/pagerduty/IncidentEvent.java index 4353b099c75..a214ddc2291 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/pagerduty/IncidentEvent.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/pagerduty/IncidentEvent.java @@ -13,13 +13,13 @@ import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.common.http.HttpMethod; import org.elasticsearch.xpack.watcher.common.http.HttpProxy; import org.elasticsearch.xpack.watcher.common.http.HttpRequest; import org.elasticsearch.xpack.watcher.common.http.Scheme; import org.elasticsearch.xpack.watcher.common.text.TextTemplate; import org.elasticsearch.xpack.watcher.common.text.TextTemplateEngine; -import org.elasticsearch.xpack.watcher.watch.Payload; import java.io.IOException; import java.util.ArrayList; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/pagerduty/PagerDutyAccount.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/pagerduty/PagerDutyAccount.java index 71f7b9085bc..b59457e2646 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/pagerduty/PagerDutyAccount.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/pagerduty/PagerDutyAccount.java @@ -8,10 +8,10 @@ package org.elasticsearch.xpack.watcher.notification.pagerduty; import org.apache.logging.log4j.Logger; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.settings.SettingsException; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.common.http.HttpClient; import org.elasticsearch.xpack.watcher.common.http.HttpRequest; import org.elasticsearch.xpack.watcher.common.http.HttpResponse; -import org.elasticsearch.xpack.watcher.watch.Payload; import java.io.IOException; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/slack/message/DynamicAttachments.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/slack/message/DynamicAttachments.java index e33d340c58a..11526e9f2c1 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/slack/message/DynamicAttachments.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/slack/message/DynamicAttachments.java @@ -9,8 +9,8 @@ import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; +import org.elasticsearch.xpack.core.watcher.support.xcontent.ObjectPath; import org.elasticsearch.xpack.watcher.common.text.TextTemplateEngine; -import org.elasticsearch.xpack.watcher.support.xcontent.ObjectPath; import java.io.IOException; import java.util.ArrayList; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/WatcherRestHandler.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/WatcherRestHandler.java index f0ce0564e11..f6c3f218963 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/WatcherRestHandler.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/WatcherRestHandler.java @@ -9,7 +9,7 @@ import org.elasticsearch.client.node.NodeClient; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.rest.BaseRestHandler; import org.elasticsearch.rest.RestRequest; -import org.elasticsearch.xpack.watcher.client.WatcherClient; +import org.elasticsearch.xpack.core.watcher.client.WatcherClient; import java.io.IOException; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestAckWatchAction.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestAckWatchAction.java index 93d71fa7fef..b75cb9cfb7a 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestAckWatchAction.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestAckWatchAction.java @@ -13,12 +13,12 @@ import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.RestResponse; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.rest.action.RestBuilderListener; -import org.elasticsearch.xpack.watcher.client.WatcherClient; +import org.elasticsearch.xpack.core.watcher.client.WatcherClient; +import org.elasticsearch.xpack.core.watcher.support.xcontent.WatcherParams; +import org.elasticsearch.xpack.core.watcher.transport.actions.ack.AckWatchRequest; +import org.elasticsearch.xpack.core.watcher.transport.actions.ack.AckWatchResponse; +import org.elasticsearch.xpack.core.watcher.watch.WatchField; import org.elasticsearch.xpack.watcher.rest.WatcherRestHandler; -import org.elasticsearch.xpack.watcher.support.xcontent.WatcherParams; -import org.elasticsearch.xpack.watcher.transport.actions.ack.AckWatchRequest; -import org.elasticsearch.xpack.watcher.transport.actions.ack.AckWatchResponse; -import org.elasticsearch.xpack.watcher.watch.WatchField; import java.io.IOException; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestActivateWatchAction.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestActivateWatchAction.java index 72a775d1a7e..68fc1d6d4fc 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestActivateWatchAction.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestActivateWatchAction.java @@ -13,12 +13,12 @@ import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.RestResponse; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.rest.action.RestBuilderListener; -import org.elasticsearch.xpack.watcher.client.WatcherClient; +import org.elasticsearch.xpack.core.watcher.client.WatcherClient; +import org.elasticsearch.xpack.core.watcher.support.xcontent.WatcherParams; +import org.elasticsearch.xpack.core.watcher.transport.actions.activate.ActivateWatchRequest; +import org.elasticsearch.xpack.core.watcher.transport.actions.activate.ActivateWatchResponse; +import org.elasticsearch.xpack.core.watcher.watch.WatchField; import org.elasticsearch.xpack.watcher.rest.WatcherRestHandler; -import org.elasticsearch.xpack.watcher.support.xcontent.WatcherParams; -import org.elasticsearch.xpack.watcher.transport.actions.activate.ActivateWatchRequest; -import org.elasticsearch.xpack.watcher.transport.actions.activate.ActivateWatchResponse; -import org.elasticsearch.xpack.watcher.watch.WatchField; import java.io.IOException; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestDeleteWatchAction.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestDeleteWatchAction.java index 9240adc4c0c..e41d52c1954 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestDeleteWatchAction.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestDeleteWatchAction.java @@ -13,10 +13,10 @@ import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.RestResponse; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.rest.action.RestBuilderListener; -import org.elasticsearch.xpack.watcher.client.WatcherClient; +import org.elasticsearch.xpack.core.watcher.client.WatcherClient; +import org.elasticsearch.xpack.core.watcher.transport.actions.delete.DeleteWatchRequest; +import org.elasticsearch.xpack.core.watcher.transport.actions.delete.DeleteWatchResponse; import org.elasticsearch.xpack.watcher.rest.WatcherRestHandler; -import org.elasticsearch.xpack.watcher.transport.actions.delete.DeleteWatchRequest; -import org.elasticsearch.xpack.watcher.transport.actions.delete.DeleteWatchResponse; import java.io.IOException; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestExecuteWatchAction.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestExecuteWatchAction.java index 88db5b0e3c8..c1853532497 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestExecuteWatchAction.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestExecuteWatchAction.java @@ -18,14 +18,14 @@ import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.RestResponse; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.rest.action.RestBuilderListener; -import org.elasticsearch.xpack.security.rest.RestRequestFilter; -import org.elasticsearch.xpack.watcher.client.WatcherClient; -import org.elasticsearch.xpack.watcher.execution.ActionExecutionMode; +import org.elasticsearch.xpack.core.security.rest.RestRequestFilter; +import org.elasticsearch.xpack.core.watcher.client.WatcherClient; +import org.elasticsearch.xpack.core.watcher.execution.ActionExecutionMode; +import org.elasticsearch.xpack.core.watcher.support.xcontent.WatcherParams; +import org.elasticsearch.xpack.core.watcher.transport.actions.execute.ExecuteWatchRequest; +import org.elasticsearch.xpack.core.watcher.transport.actions.execute.ExecuteWatchRequestBuilder; +import org.elasticsearch.xpack.core.watcher.transport.actions.execute.ExecuteWatchResponse; import org.elasticsearch.xpack.watcher.rest.WatcherRestHandler; -import org.elasticsearch.xpack.watcher.support.xcontent.WatcherParams; -import org.elasticsearch.xpack.watcher.transport.actions.execute.ExecuteWatchRequest; -import org.elasticsearch.xpack.watcher.transport.actions.execute.ExecuteWatchRequestBuilder; -import org.elasticsearch.xpack.watcher.transport.actions.execute.ExecuteWatchResponse; import java.io.IOException; import java.util.Collections; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestGetWatchAction.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestGetWatchAction.java index d2058943dba..61b650a3cf5 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestGetWatchAction.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestGetWatchAction.java @@ -14,10 +14,10 @@ import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.RestResponse; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.rest.action.RestBuilderListener; -import org.elasticsearch.xpack.watcher.client.WatcherClient; +import org.elasticsearch.xpack.core.watcher.client.WatcherClient; +import org.elasticsearch.xpack.core.watcher.transport.actions.get.GetWatchRequest; +import org.elasticsearch.xpack.core.watcher.transport.actions.get.GetWatchResponse; import org.elasticsearch.xpack.watcher.rest.WatcherRestHandler; -import org.elasticsearch.xpack.watcher.transport.actions.get.GetWatchRequest; -import org.elasticsearch.xpack.watcher.transport.actions.get.GetWatchResponse; import java.io.IOException; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestPutWatchAction.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestPutWatchAction.java index c5cbbbc9465..7d679d36b78 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestPutWatchAction.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestPutWatchAction.java @@ -14,11 +14,11 @@ import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.RestResponse; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.rest.action.RestBuilderListener; -import org.elasticsearch.xpack.security.rest.RestRequestFilter; -import org.elasticsearch.xpack.watcher.client.WatcherClient; +import org.elasticsearch.xpack.core.security.rest.RestRequestFilter; +import org.elasticsearch.xpack.core.watcher.client.WatcherClient; +import org.elasticsearch.xpack.core.watcher.transport.actions.put.PutWatchRequest; +import org.elasticsearch.xpack.core.watcher.transport.actions.put.PutWatchResponse; import org.elasticsearch.xpack.watcher.rest.WatcherRestHandler; -import org.elasticsearch.xpack.watcher.transport.actions.put.PutWatchRequest; -import org.elasticsearch.xpack.watcher.transport.actions.put.PutWatchResponse; import java.io.IOException; import java.util.Collections; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestWatchServiceAction.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestWatchServiceAction.java index 38fa5255b54..b65bf795b89 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestWatchServiceAction.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestWatchServiceAction.java @@ -9,9 +9,9 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.AcknowledgedRestListener; -import org.elasticsearch.xpack.watcher.client.WatcherClient; +import org.elasticsearch.xpack.core.watcher.client.WatcherClient; +import org.elasticsearch.xpack.core.watcher.transport.actions.service.WatcherServiceRequest; import org.elasticsearch.xpack.watcher.rest.WatcherRestHandler; -import org.elasticsearch.xpack.watcher.transport.actions.service.WatcherServiceRequest; import java.io.IOException; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestWatcherStatsAction.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestWatcherStatsAction.java index 0f99cc8960c..90c756c1323 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestWatcherStatsAction.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestWatcherStatsAction.java @@ -10,9 +10,9 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.RestActions; -import org.elasticsearch.xpack.watcher.client.WatcherClient; +import org.elasticsearch.xpack.core.watcher.client.WatcherClient; +import org.elasticsearch.xpack.core.watcher.transport.actions.stats.WatcherStatsRequest; import org.elasticsearch.xpack.watcher.rest.WatcherRestHandler; -import org.elasticsearch.xpack.watcher.transport.actions.stats.WatcherStatsRequest; import java.io.IOException; import java.util.Collections; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/support/Variables.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/support/Variables.java index 27c7b1b4a27..858f6707f29 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/support/Variables.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/support/Variables.java @@ -5,8 +5,8 @@ */ package org.elasticsearch.xpack.watcher.support; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; -import org.elasticsearch.xpack.watcher.watch.Payload; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import java.util.HashMap; import java.util.Map; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/support/WatcherIndexTemplateRegistry.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/support/WatcherIndexTemplateRegistry.java index f20f0b485bc..6e1fb859284 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/support/WatcherIndexTemplateRegistry.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/support/WatcherIndexTemplateRegistry.java @@ -21,7 +21,8 @@ import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.gateway.GatewayService; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.xpack.template.TemplateUtils; +import org.elasticsearch.xpack.core.watcher.support.WatcherIndexTemplateRegistryField; +import org.elasticsearch.xpack.core.template.TemplateUtils; import java.nio.charset.StandardCharsets; import java.util.concurrent.ConcurrentHashMap; @@ -30,8 +31,8 @@ import java.util.concurrent.Executor; import java.util.concurrent.atomic.AtomicBoolean; import java.util.regex.Pattern; -import static org.elasticsearch.xpack.ClientHelper.WATCHER_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.executeAsyncWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.WATCHER_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin; public class WatcherIndexTemplateRegistry extends AbstractComponent implements ClusterStateListener { diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/support/search/WatcherSearchTemplateService.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/support/search/WatcherSearchTemplateService.java index 42396141015..598105a48eb 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/support/search/WatcherSearchTemplateService.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/support/search/WatcherSearchTemplateService.java @@ -17,10 +17,10 @@ import org.elasticsearch.script.ScriptService; import org.elasticsearch.script.ScriptType; import org.elasticsearch.script.TemplateScript; import org.elasticsearch.search.builder.SearchSourceBuilder; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.Watcher; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; import org.elasticsearch.xpack.watcher.support.Variables; -import org.elasticsearch.xpack.watcher.watch.Payload; import java.io.IOException; import java.util.Map; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transform/TransformBuilders.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transform/TransformBuilders.java index c57048c4264..29df7c787d7 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transform/TransformBuilders.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transform/TransformBuilders.java @@ -7,8 +7,9 @@ package org.elasticsearch.xpack.watcher.transform; import org.elasticsearch.script.Script; import org.elasticsearch.script.ScriptType; +import org.elasticsearch.xpack.core.watcher.transform.Transform; +import org.elasticsearch.xpack.core.watcher.transform.chain.ChainTransform; import org.elasticsearch.xpack.watcher.support.search.WatcherSearchTemplateRequest; -import org.elasticsearch.xpack.watcher.transform.chain.ChainTransform; import org.elasticsearch.xpack.watcher.transform.script.ScriptTransform; import org.elasticsearch.xpack.watcher.transform.search.SearchTransform; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transform/script/ExecutableScriptTransform.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transform/script/ExecutableScriptTransform.java index 2dde57f4a82..e2b1cf882cc 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transform/script/ExecutableScriptTransform.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transform/script/ExecutableScriptTransform.java @@ -11,10 +11,10 @@ import org.apache.logging.log4j.util.Supplier; import org.elasticsearch.script.ExecutableScript; import org.elasticsearch.script.Script; import org.elasticsearch.script.ScriptService; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.transform.ExecutableTransform; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.Watcher; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; -import org.elasticsearch.xpack.watcher.transform.ExecutableTransform; -import org.elasticsearch.xpack.watcher.watch.Payload; import java.io.IOException; import java.util.HashMap; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transform/script/ScriptTransform.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transform/script/ScriptTransform.java index bbcb7de73ed..0c0f9c34bdc 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transform/script/ScriptTransform.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transform/script/ScriptTransform.java @@ -9,8 +9,8 @@ import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.script.Script; -import org.elasticsearch.xpack.watcher.transform.Transform; -import org.elasticsearch.xpack.watcher.watch.Payload; +import org.elasticsearch.xpack.core.watcher.transform.Transform; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import java.io.IOException; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transform/script/ScriptTransformFactory.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transform/script/ScriptTransformFactory.java index 5221a5d335d..a4a8844a313 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transform/script/ScriptTransformFactory.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transform/script/ScriptTransformFactory.java @@ -9,7 +9,7 @@ import org.elasticsearch.common.logging.ServerLoggers; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.script.ScriptService; -import org.elasticsearch.xpack.watcher.transform.TransformFactory; +import org.elasticsearch.xpack.core.watcher.transform.TransformFactory; import java.io.IOException; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transform/search/ExecutableSearchTransform.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transform/search/ExecutableSearchTransform.java index c8756d12a5f..03dbf88fb0d 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transform/search/ExecutableSearchTransform.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transform/search/ExecutableSearchTransform.java @@ -15,12 +15,12 @@ import org.elasticsearch.client.Client; import org.elasticsearch.common.bytes.BytesArray; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.script.Script; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.transform.ExecutableTransform; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.WatcherClientHelper; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; import org.elasticsearch.xpack.watcher.support.search.WatcherSearchTemplateRequest; import org.elasticsearch.xpack.watcher.support.search.WatcherSearchTemplateService; -import org.elasticsearch.xpack.watcher.transform.ExecutableTransform; -import org.elasticsearch.xpack.watcher.watch.Payload; import static org.elasticsearch.xpack.watcher.transform.search.SearchTransform.TYPE; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transform/search/SearchTransform.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transform/search/SearchTransform.java index b51c305b35d..e52198805d4 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transform/search/SearchTransform.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transform/search/SearchTransform.java @@ -11,10 +11,10 @@ import org.elasticsearch.common.ParseField; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.watcher.support.WatcherDateTimeUtils; +import org.elasticsearch.xpack.core.watcher.support.WatcherDateTimeUtils; +import org.elasticsearch.xpack.core.watcher.transform.Transform; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.support.search.WatcherSearchTemplateRequest; -import org.elasticsearch.xpack.watcher.transform.Transform; -import org.elasticsearch.xpack.watcher.watch.Payload; import org.joda.time.DateTimeZone; import java.io.IOException; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transform/search/SearchTransformFactory.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transform/search/SearchTransformFactory.java index fc32edc8014..e17fc85dbec 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transform/search/SearchTransformFactory.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transform/search/SearchTransformFactory.java @@ -12,8 +12,8 @@ import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.NamedXContentRegistry; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.script.ScriptService; +import org.elasticsearch.xpack.core.watcher.transform.TransformFactory; import org.elasticsearch.xpack.watcher.support.search.WatcherSearchTemplateService; -import org.elasticsearch.xpack.watcher.transform.TransformFactory; import java.io.IOException; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/WatcherTransportAction.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/WatcherTransportAction.java index 2bca462774a..363857f2766 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/WatcherTransportAction.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/WatcherTransportAction.java @@ -18,7 +18,7 @@ import org.elasticsearch.license.XPackLicenseState; import org.elasticsearch.tasks.Task; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.XPackField; +import org.elasticsearch.xpack.core.XPackField; public abstract class WatcherTransportAction extends HandledTransportAction { diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/ack/TransportAckWatchAction.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/ack/TransportAckWatchAction.java index bfbf7e99b79..d48345c300a 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/ack/TransportAckWatchAction.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/ack/TransportAckWatchAction.java @@ -24,10 +24,13 @@ import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.license.XPackLicenseState; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.watcher.actions.ActionWrapper; +import org.elasticsearch.xpack.core.watcher.actions.ActionWrapper; +import org.elasticsearch.xpack.core.watcher.transport.actions.ack.AckWatchAction; +import org.elasticsearch.xpack.core.watcher.transport.actions.ack.AckWatchRequest; +import org.elasticsearch.xpack.core.watcher.transport.actions.ack.AckWatchResponse; +import org.elasticsearch.xpack.core.watcher.watch.Watch; +import org.elasticsearch.xpack.core.watcher.watch.WatchField; import org.elasticsearch.xpack.watcher.transport.actions.WatcherTransportAction; -import org.elasticsearch.xpack.watcher.watch.Watch; -import org.elasticsearch.xpack.watcher.watch.WatchField; import org.elasticsearch.xpack.watcher.watch.WatchParser; import org.joda.time.DateTime; @@ -36,8 +39,8 @@ import java.util.Arrays; import java.util.List; import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.xpack.ClientHelper.WATCHER_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.executeAsyncWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.WATCHER_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin; import static org.joda.time.DateTimeZone.UTC; public class TransportAckWatchAction extends WatcherTransportAction { diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/activate/TransportActivateWatchAction.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/activate/TransportActivateWatchAction.java index 61e95e474a1..cc6ef9274e8 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/activate/TransportActivateWatchAction.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/activate/TransportActivateWatchAction.java @@ -23,20 +23,23 @@ import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.license.XPackLicenseState; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; +import org.elasticsearch.xpack.core.watcher.transport.actions.activate.ActivateWatchAction; +import org.elasticsearch.xpack.core.watcher.transport.actions.activate.ActivateWatchRequest; +import org.elasticsearch.xpack.core.watcher.transport.actions.activate.ActivateWatchResponse; +import org.elasticsearch.xpack.core.watcher.watch.Watch; +import org.elasticsearch.xpack.core.watcher.watch.WatchField; +import org.elasticsearch.xpack.core.watcher.watch.WatchStatus; import org.elasticsearch.xpack.watcher.transport.actions.WatcherTransportAction; -import org.elasticsearch.xpack.watcher.watch.Watch; -import org.elasticsearch.xpack.watcher.watch.WatchField; import org.elasticsearch.xpack.watcher.watch.WatchParser; -import org.elasticsearch.xpack.watcher.watch.WatchStatus; import org.joda.time.DateTime; import java.io.IOException; import java.time.Clock; import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.xpack.ClientHelper.WATCHER_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.executeAsyncWithOrigin; -import static org.elasticsearch.xpack.watcher.support.WatcherDateTimeUtils.writeDate; +import static org.elasticsearch.xpack.core.ClientHelper.WATCHER_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin; +import static org.elasticsearch.xpack.core.watcher.support.WatcherDateTimeUtils.writeDate; import static org.joda.time.DateTimeZone.UTC; /** diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/delete/TransportDeleteWatchAction.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/delete/TransportDeleteWatchAction.java index 2287393f886..ca66e9e678d 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/delete/TransportDeleteWatchAction.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/delete/TransportDeleteWatchAction.java @@ -18,10 +18,13 @@ import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.watcher.watch.Watch; +import org.elasticsearch.xpack.core.watcher.transport.actions.delete.DeleteWatchAction; +import org.elasticsearch.xpack.core.watcher.transport.actions.delete.DeleteWatchRequest; +import org.elasticsearch.xpack.core.watcher.transport.actions.delete.DeleteWatchResponse; +import org.elasticsearch.xpack.core.watcher.watch.Watch; -import static org.elasticsearch.xpack.ClientHelper.WATCHER_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.executeAsyncWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.WATCHER_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin; /** * Performs the delete operation. This inherits directly from HandledTransportAction, because deletion should always work diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/execute/TransportExecuteWatchAction.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/execute/TransportExecuteWatchAction.java index 471424d792c..74f8c1a9809 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/execute/TransportExecuteWatchAction.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/execute/TransportExecuteWatchAction.java @@ -23,20 +23,23 @@ import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.license.XPackLicenseState; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.XPackField; +import org.elasticsearch.xpack.core.XPackField; +import org.elasticsearch.xpack.core.watcher.execution.ActionExecutionMode; +import org.elasticsearch.xpack.core.watcher.history.WatchRecord; +import org.elasticsearch.xpack.core.watcher.support.xcontent.WatcherParams; +import org.elasticsearch.xpack.core.watcher.transport.actions.execute.ExecuteWatchAction; +import org.elasticsearch.xpack.core.watcher.transport.actions.execute.ExecuteWatchRequest; +import org.elasticsearch.xpack.core.watcher.transport.actions.execute.ExecuteWatchResponse; +import org.elasticsearch.xpack.core.watcher.trigger.TriggerEvent; +import org.elasticsearch.xpack.core.watcher.watch.Payload; +import org.elasticsearch.xpack.core.watcher.watch.Watch; import org.elasticsearch.xpack.watcher.condition.InternalAlwaysCondition; -import org.elasticsearch.xpack.watcher.execution.ActionExecutionMode; import org.elasticsearch.xpack.watcher.execution.ExecutionService; import org.elasticsearch.xpack.watcher.execution.ManualExecutionContext; -import org.elasticsearch.xpack.watcher.history.WatchRecord; import org.elasticsearch.xpack.watcher.input.simple.SimpleInput; -import org.elasticsearch.xpack.watcher.support.xcontent.WatcherParams; import org.elasticsearch.xpack.watcher.transport.actions.WatcherTransportAction; -import org.elasticsearch.xpack.watcher.trigger.TriggerEvent; import org.elasticsearch.xpack.watcher.trigger.TriggerService; import org.elasticsearch.xpack.watcher.trigger.manual.ManualTriggerEvent; -import org.elasticsearch.xpack.watcher.watch.Payload; -import org.elasticsearch.xpack.watcher.watch.Watch; import org.elasticsearch.xpack.watcher.watch.WatchParser; import org.joda.time.DateTime; @@ -45,8 +48,8 @@ import java.time.Clock; import java.util.HashMap; import java.util.Map; -import static org.elasticsearch.xpack.ClientHelper.WATCHER_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.executeAsyncWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.WATCHER_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin; import static org.joda.time.DateTimeZone.UTC; /** diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/TransportGetWatchAction.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/TransportGetWatchAction.java index 59ccadd6882..25164c55ddb 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/TransportGetWatchAction.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/TransportGetWatchAction.java @@ -20,17 +20,20 @@ import org.elasticsearch.index.IndexNotFoundException; import org.elasticsearch.license.XPackLicenseState; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.watcher.support.xcontent.WatcherParams; +import org.elasticsearch.xpack.core.watcher.support.xcontent.WatcherParams; +import org.elasticsearch.xpack.core.watcher.transport.actions.get.GetWatchAction; +import org.elasticsearch.xpack.core.watcher.transport.actions.get.GetWatchRequest; +import org.elasticsearch.xpack.core.watcher.transport.actions.get.GetWatchResponse; +import org.elasticsearch.xpack.core.watcher.watch.Watch; import org.elasticsearch.xpack.watcher.transport.actions.WatcherTransportAction; -import org.elasticsearch.xpack.watcher.watch.Watch; import org.elasticsearch.xpack.watcher.watch.WatchParser; import org.joda.time.DateTime; import java.time.Clock; import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.xpack.ClientHelper.WATCHER_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.executeAsyncWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.WATCHER_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin; import static org.joda.time.DateTimeZone.UTC; public class TransportGetWatchAction extends WatcherTransportAction { diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/put/TransportPutWatchAction.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/put/TransportPutWatchAction.java index ac17f729f9e..8f7f1ab31a8 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/put/TransportPutWatchAction.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/put/TransportPutWatchAction.java @@ -21,11 +21,14 @@ import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.license.XPackLicenseState; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; +import org.elasticsearch.xpack.core.watcher.support.xcontent.WatcherParams; +import org.elasticsearch.xpack.core.watcher.transport.actions.put.PutWatchAction; +import org.elasticsearch.xpack.core.watcher.transport.actions.put.PutWatchRequest; +import org.elasticsearch.xpack.core.watcher.transport.actions.put.PutWatchResponse; +import org.elasticsearch.xpack.core.watcher.watch.Payload; +import org.elasticsearch.xpack.core.watcher.watch.Watch; import org.elasticsearch.xpack.watcher.Watcher; -import org.elasticsearch.xpack.watcher.support.xcontent.WatcherParams; import org.elasticsearch.xpack.watcher.transport.actions.WatcherTransportAction; -import org.elasticsearch.xpack.watcher.watch.Payload; -import org.elasticsearch.xpack.watcher.watch.Watch; import org.elasticsearch.xpack.watcher.watch.WatchParser; import org.joda.time.DateTime; @@ -34,8 +37,8 @@ import java.util.Map; import java.util.stream.Collectors; import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.xpack.ClientHelper.WATCHER_ORIGIN; -import static org.elasticsearch.xpack.ClientHelper.executeAsyncWithOrigin; +import static org.elasticsearch.xpack.core.ClientHelper.WATCHER_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin; import static org.joda.time.DateTimeZone.UTC; public class TransportPutWatchAction extends WatcherTransportAction { diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/service/TransportWatcherServiceAction.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/service/TransportWatcherServiceAction.java index 9264daa7130..14510c9097d 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/service/TransportWatcherServiceAction.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/service/TransportWatcherServiceAction.java @@ -22,7 +22,10 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.watcher.WatcherMetaData; +import org.elasticsearch.xpack.core.watcher.WatcherMetaData; +import org.elasticsearch.xpack.core.watcher.transport.actions.service.WatcherServiceAction; +import org.elasticsearch.xpack.core.watcher.transport.actions.service.WatcherServiceRequest; +import org.elasticsearch.xpack.core.watcher.transport.actions.service.WatcherServiceResponse; public class TransportWatcherServiceAction extends TransportMasterNodeAction { diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/stats/TransportWatcherStatsAction.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/stats/TransportWatcherStatsAction.java index 9475db0929a..5c966291cae 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/stats/TransportWatcherStatsAction.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/stats/TransportWatcherStatsAction.java @@ -14,6 +14,9 @@ import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; +import org.elasticsearch.xpack.core.watcher.transport.actions.stats.WatcherStatsAction; +import org.elasticsearch.xpack.core.watcher.transport.actions.stats.WatcherStatsRequest; +import org.elasticsearch.xpack.core.watcher.transport.actions.stats.WatcherStatsResponse; import org.elasticsearch.xpack.watcher.WatcherLifeCycleService; import org.elasticsearch.xpack.watcher.WatcherService; import org.elasticsearch.xpack.watcher.execution.ExecutionService; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/TriggerEngine.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/TriggerEngine.java index 62c5e4b4552..14f0a32bf85 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/TriggerEngine.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/TriggerEngine.java @@ -7,7 +7,9 @@ package org.elasticsearch.xpack.watcher.trigger; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.watcher.watch.Watch; +import org.elasticsearch.xpack.core.watcher.trigger.Trigger; +import org.elasticsearch.xpack.core.watcher.trigger.TriggerEvent; +import org.elasticsearch.xpack.core.watcher.watch.Watch; import java.io.IOException; import java.util.Collection; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/TriggerService.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/TriggerService.java index 3a931193832..7da6ca381b3 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/TriggerService.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/TriggerService.java @@ -9,7 +9,9 @@ import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.common.component.AbstractComponent; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.watcher.watch.Watch; +import org.elasticsearch.xpack.core.watcher.trigger.Trigger; +import org.elasticsearch.xpack.core.watcher.trigger.TriggerEvent; +import org.elasticsearch.xpack.core.watcher.watch.Watch; import java.io.IOException; import java.util.Collection; @@ -21,7 +23,7 @@ import java.util.concurrent.CopyOnWriteArrayList; import java.util.function.Consumer; import static java.util.Collections.unmodifiableMap; -import static org.elasticsearch.xpack.watcher.support.Exceptions.illegalArgument; +import static org.elasticsearch.xpack.core.watcher.support.Exceptions.illegalArgument; public class TriggerService extends AbstractComponent { diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/manual/ManualTrigger.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/manual/ManualTrigger.java index 76af1918f18..d1f9d6e55fa 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/manual/ManualTrigger.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/manual/ManualTrigger.java @@ -8,7 +8,7 @@ package org.elasticsearch.xpack.watcher.trigger.manual; import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.watcher.trigger.Trigger; +import org.elasticsearch.xpack.core.watcher.trigger.Trigger; import java.io.IOException; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/manual/ManualTriggerEngine.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/manual/ManualTriggerEngine.java index a4ac54439f8..386e2850121 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/manual/ManualTriggerEngine.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/manual/ManualTriggerEngine.java @@ -7,17 +7,17 @@ package org.elasticsearch.xpack.watcher.trigger.manual; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.xcontent.XContentParser; +import org.elasticsearch.xpack.core.watcher.trigger.TriggerEvent; +import org.elasticsearch.xpack.core.watcher.watch.Watch; import org.elasticsearch.xpack.watcher.trigger.TriggerEngine; -import org.elasticsearch.xpack.watcher.trigger.TriggerEvent; import org.elasticsearch.xpack.watcher.trigger.TriggerService; -import org.elasticsearch.xpack.watcher.watch.Watch; import java.io.IOException; import java.util.Collection; import java.util.Map; import java.util.function.Consumer; -import static org.elasticsearch.xpack.watcher.support.Exceptions.illegalArgument; +import static org.elasticsearch.xpack.core.watcher.support.Exceptions.illegalArgument; public class ManualTriggerEngine implements TriggerEngine { diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/manual/ManualTriggerEvent.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/manual/ManualTriggerEvent.java index cd046ced5fd..a0d03a735be 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/manual/ManualTriggerEvent.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/manual/ManualTriggerEvent.java @@ -7,7 +7,7 @@ package org.elasticsearch.xpack.watcher.trigger.manual; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.watcher.trigger.TriggerEvent; +import org.elasticsearch.xpack.core.watcher.trigger.TriggerEvent; import org.elasticsearch.xpack.watcher.trigger.TriggerService; import java.io.IOException; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/Cron.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/Cron.java index 49fc3264448..f6888036d6f 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/Cron.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/Cron.java @@ -21,7 +21,7 @@ import java.util.StringTokenizer; import java.util.TimeZone; import java.util.TreeSet; -import static org.elasticsearch.xpack.watcher.support.Exceptions.illegalArgument; +import static org.elasticsearch.xpack.core.watcher.support.Exceptions.illegalArgument; /** diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/HourlySchedule.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/HourlySchedule.java index 50310cb6d4f..18faee4c4b5 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/HourlySchedule.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/HourlySchedule.java @@ -18,7 +18,7 @@ import java.util.HashSet; import java.util.List; import java.util.Set; -import static org.elasticsearch.xpack.watcher.support.Exceptions.illegalArgument; +import static org.elasticsearch.xpack.core.watcher.support.Exceptions.illegalArgument; public class HourlySchedule extends CronnableSchedule { diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/IntervalSchedule.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/IntervalSchedule.java index 7249f97a178..4940377cc1a 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/IntervalSchedule.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/IntervalSchedule.java @@ -14,7 +14,7 @@ import java.io.IOException; import java.util.Locale; import java.util.concurrent.TimeUnit; -import static org.elasticsearch.xpack.watcher.support.Exceptions.illegalArgument; +import static org.elasticsearch.xpack.core.watcher.support.Exceptions.illegalArgument; public class IntervalSchedule implements Schedule { diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/Schedule.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/Schedule.java index d8f4928a6d4..f3c9248fbb8 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/Schedule.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/Schedule.java @@ -7,7 +7,7 @@ package org.elasticsearch.xpack.watcher.trigger.schedule; import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.scheduler.SchedulerEngine; +import org.elasticsearch.xpack.core.scheduler.SchedulerEngine; import java.io.IOException; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleTrigger.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleTrigger.java index 069f7a9a351..7561560202d 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleTrigger.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleTrigger.java @@ -6,7 +6,7 @@ package org.elasticsearch.xpack.watcher.trigger.schedule; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.xpack.watcher.trigger.Trigger; +import org.elasticsearch.xpack.core.watcher.trigger.Trigger; import java.io.IOException; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleTriggerEngine.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleTriggerEngine.java index 4b96c8617fc..dfee54c391a 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleTriggerEngine.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleTriggerEngine.java @@ -9,9 +9,9 @@ import org.elasticsearch.common.Nullable; import org.elasticsearch.common.component.AbstractComponent; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.watcher.support.WatcherDateTimeUtils; +import org.elasticsearch.xpack.core.watcher.support.WatcherDateTimeUtils; +import org.elasticsearch.xpack.core.watcher.trigger.TriggerEvent; import org.elasticsearch.xpack.watcher.trigger.TriggerEngine; -import org.elasticsearch.xpack.watcher.trigger.TriggerEvent; import org.elasticsearch.xpack.watcher.trigger.TriggerService; import org.joda.time.DateTime; @@ -22,7 +22,7 @@ import java.util.Map; import java.util.concurrent.CopyOnWriteArrayList; import java.util.function.Consumer; -import static org.elasticsearch.xpack.watcher.support.Exceptions.illegalArgument; +import static org.elasticsearch.xpack.core.watcher.support.Exceptions.illegalArgument; import static org.joda.time.DateTimeZone.UTC; public abstract class ScheduleTriggerEngine extends AbstractComponent implements TriggerEngine { diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleTriggerEvent.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleTriggerEvent.java index 1a8c4985a5e..dbb7e34d472 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleTriggerEvent.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleTriggerEvent.java @@ -9,8 +9,8 @@ import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.watcher.support.WatcherDateTimeUtils; -import org.elasticsearch.xpack.watcher.trigger.TriggerEvent; +import org.elasticsearch.xpack.core.watcher.support.WatcherDateTimeUtils; +import org.elasticsearch.xpack.core.watcher.trigger.TriggerEvent; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/engine/TickerScheduleTriggerEngine.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/engine/TickerScheduleTriggerEngine.java index d3e2484c2ff..b52ef09cdf0 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/engine/TickerScheduleTriggerEngine.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/engine/TickerScheduleTriggerEngine.java @@ -9,13 +9,13 @@ import org.elasticsearch.common.settings.Setting; import org.elasticsearch.common.settings.Setting.Property; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.xpack.watcher.trigger.TriggerEvent; +import org.elasticsearch.xpack.core.watcher.trigger.TriggerEvent; +import org.elasticsearch.xpack.core.watcher.watch.Watch; import org.elasticsearch.xpack.watcher.trigger.schedule.Schedule; import org.elasticsearch.xpack.watcher.trigger.schedule.ScheduleRegistry; import org.elasticsearch.xpack.watcher.trigger.schedule.ScheduleTrigger; import org.elasticsearch.xpack.watcher.trigger.schedule.ScheduleTriggerEngine; import org.elasticsearch.xpack.watcher.trigger.schedule.ScheduleTriggerEvent; -import org.elasticsearch.xpack.watcher.watch.Watch; import org.joda.time.DateTime; import java.time.Clock; diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/support/DayTimes.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/support/DayTimes.java index 63efae3a910..be1c42f5b87 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/support/DayTimes.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/support/DayTimes.java @@ -15,7 +15,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import static org.elasticsearch.xpack.watcher.support.Exceptions.illegalArgument; +import static org.elasticsearch.xpack.core.watcher.support.Exceptions.illegalArgument; import static org.elasticsearch.xpack.watcher.support.Strings.join; public class DayTimes implements Times { diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/support/MonthTimes.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/support/MonthTimes.java index 7954930fe85..50ffe333abf 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/support/MonthTimes.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/support/MonthTimes.java @@ -18,7 +18,7 @@ import java.util.Locale; import java.util.Set; import static org.elasticsearch.common.util.set.Sets.newHashSet; -import static org.elasticsearch.xpack.watcher.support.Exceptions.illegalArgument; +import static org.elasticsearch.xpack.core.watcher.support.Exceptions.illegalArgument; import static org.elasticsearch.xpack.watcher.support.Strings.join; public class MonthTimes implements Times { diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/support/YearTimes.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/support/YearTimes.java index 195497f7c34..64c3ae1967e 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/support/YearTimes.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/support/YearTimes.java @@ -20,7 +20,7 @@ import java.util.Locale; import java.util.Set; import static org.elasticsearch.common.util.set.Sets.newHashSet; -import static org.elasticsearch.xpack.watcher.support.Exceptions.illegalArgument; +import static org.elasticsearch.xpack.core.watcher.support.Exceptions.illegalArgument; import static org.elasticsearch.xpack.watcher.support.Strings.join; public class YearTimes implements Times { diff --git a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/watch/WatchParser.java b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/watch/WatchParser.java index 7a8dda3fc86..eb5603d6f04 100644 --- a/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/watch/WatchParser.java +++ b/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/watch/WatchParser.java @@ -14,20 +14,23 @@ import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.NamedXContentRegistry; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.xpack.watcher.actions.ActionRegistry; -import org.elasticsearch.xpack.watcher.actions.ActionStatus; -import org.elasticsearch.xpack.watcher.actions.ActionWrapper; -import org.elasticsearch.xpack.watcher.common.secret.Secret; -import org.elasticsearch.xpack.watcher.condition.ExecutableCondition; +import org.elasticsearch.xpack.core.watcher.actions.ActionRegistry; +import org.elasticsearch.xpack.core.watcher.actions.ActionStatus; +import org.elasticsearch.xpack.core.watcher.actions.ActionWrapper; +import org.elasticsearch.xpack.core.watcher.common.secret.Secret; +import org.elasticsearch.xpack.core.watcher.condition.ExecutableCondition; +import org.elasticsearch.xpack.core.watcher.crypto.CryptoService; +import org.elasticsearch.xpack.core.watcher.input.ExecutableInput; +import org.elasticsearch.xpack.core.watcher.support.WatcherDateTimeUtils; +import org.elasticsearch.xpack.core.watcher.support.xcontent.WatcherXContentParser; +import org.elasticsearch.xpack.core.watcher.transform.ExecutableTransform; +import org.elasticsearch.xpack.core.watcher.trigger.Trigger; +import org.elasticsearch.xpack.core.watcher.watch.Watch; +import org.elasticsearch.xpack.core.watcher.watch.WatchField; +import org.elasticsearch.xpack.core.watcher.watch.WatchStatus; import org.elasticsearch.xpack.watcher.condition.InternalAlwaysCondition; -import org.elasticsearch.xpack.watcher.crypto.CryptoService; -import org.elasticsearch.xpack.watcher.input.ExecutableInput; import org.elasticsearch.xpack.watcher.input.InputRegistry; import org.elasticsearch.xpack.watcher.input.none.ExecutableNoneInput; -import org.elasticsearch.xpack.watcher.support.WatcherDateTimeUtils; -import org.elasticsearch.xpack.watcher.support.xcontent.WatcherXContentParser; -import org.elasticsearch.xpack.watcher.transform.ExecutableTransform; -import org.elasticsearch.xpack.watcher.trigger.Trigger; import org.elasticsearch.xpack.watcher.trigger.TriggerService; import org.elasticsearch.xpack.common.time.HaltedClock; import org.joda.time.DateTime; @@ -41,7 +44,7 @@ import java.util.Map; import static java.util.Collections.unmodifiableMap; import static org.elasticsearch.common.unit.TimeValue.timeValueMillis; -import static org.elasticsearch.xpack.watcher.support.Exceptions.ioException; +import static org.elasticsearch.xpack.core.watcher.support.Exceptions.ioException; import static org.joda.time.DateTimeZone.UTC; public class WatchParser extends AbstractComponent { diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/EncryptSensitiveDataBootstrapCheckTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/EncryptSensitiveDataBootstrapCheckTests.java index add4591d1ad..3dcec25ddb8 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/EncryptSensitiveDataBootstrapCheckTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/EncryptSensitiveDataBootstrapCheckTests.java @@ -11,7 +11,8 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.env.Environment; import org.elasticsearch.env.TestEnvironment; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.watcher.crypto.CryptoServiceTests; +import org.elasticsearch.xpack.core.watcher.WatcherField; +import org.elasticsearch.xpack.core.watcher.crypto.CryptoServiceTests; public class EncryptSensitiveDataBootstrapCheckTests extends ESTestCase { diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/WatcherClientHelperTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/WatcherClientHelperTests.java index 3a0d254726f..f1908ccefc2 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/WatcherClientHelperTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/WatcherClientHelperTests.java @@ -14,7 +14,7 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; import org.elasticsearch.xpack.watcher.test.WatchExecutionContextMockBuilder; import org.junit.Before; @@ -22,8 +22,8 @@ import java.util.Collections; import java.util.Map; import java.util.function.Consumer; -import static org.elasticsearch.xpack.ClientHelper.ACTION_ORIGIN_TRANSIENT_NAME; -import static org.elasticsearch.xpack.ClientHelper.WATCHER_ORIGIN; +import static org.elasticsearch.xpack.core.ClientHelper.ACTION_ORIGIN_TRANSIENT_NAME; +import static org.elasticsearch.xpack.core.ClientHelper.WATCHER_ORIGIN; import static org.hamcrest.Matchers.hasEntry; import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.is; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/WatcherFeatureSetTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/WatcherFeatureSetTests.java index 5151d78a053..f9faf64c18f 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/WatcherFeatureSetTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/WatcherFeatureSetTests.java @@ -5,10 +5,6 @@ */ package org.elasticsearch.xpack.watcher; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - import org.elasticsearch.action.support.PlainActionFuture; import org.elasticsearch.common.io.stream.BytesStreamOutput; import org.elasticsearch.common.settings.Settings; @@ -16,10 +12,15 @@ import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.license.XPackLicenseState; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.XPackFeatureSet; -import org.elasticsearch.xpack.watcher.support.xcontent.XContentSource; +import org.elasticsearch.xpack.core.XPackFeatureSet; +import org.elasticsearch.xpack.core.watcher.WatcherFeatureSetUsage; +import org.elasticsearch.xpack.core.watcher.support.xcontent.XContentSource; import org.junit.Before; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; import static org.hamcrest.Matchers.hasEntry; import static org.hamcrest.Matchers.instanceOf; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/WatcherIndexingListenerTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/WatcherIndexingListenerTests.java index 8ff80a82d0e..9483ee2fc0a 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/WatcherIndexingListenerTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/WatcherIndexingListenerTests.java @@ -32,13 +32,13 @@ import org.elasticsearch.index.engine.Engine; import org.elasticsearch.index.shard.ShardId; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.VersionUtils; +import org.elasticsearch.xpack.core.watcher.watch.ClockMock; +import org.elasticsearch.xpack.core.watcher.watch.Watch; +import org.elasticsearch.xpack.core.watcher.watch.WatchStatus; import org.elasticsearch.xpack.watcher.WatcherIndexingListener.Configuration; import org.elasticsearch.xpack.watcher.WatcherIndexingListener.ShardAllocationConfiguration; import org.elasticsearch.xpack.watcher.trigger.TriggerService; -import org.elasticsearch.xpack.watcher.watch.Watch; import org.elasticsearch.xpack.watcher.watch.WatchParser; -import org.elasticsearch.xpack.watcher.watch.WatchStatus; -import org.elasticsearch.xpack.watcher.watch.clock.ClockMock; import org.joda.time.DateTime; import org.junit.Before; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/WatcherLifeCycleServiceTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/WatcherLifeCycleServiceTests.java index a0d3fce4816..3339a39f152 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/WatcherLifeCycleServiceTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/WatcherLifeCycleServiceTests.java @@ -31,9 +31,9 @@ import org.elasticsearch.index.shard.ShardId; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.VersionUtils; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.xpack.watcher.execution.TriggeredWatchStore; -import org.elasticsearch.xpack.watcher.execution.TriggeredWatchStoreField; -import org.elasticsearch.xpack.watcher.watch.Watch; +import org.elasticsearch.xpack.core.watcher.WatcherState; +import org.elasticsearch.xpack.core.watcher.execution.TriggeredWatchStoreField; +import org.elasticsearch.xpack.core.watcher.watch.Watch; import org.junit.Before; import org.mockito.stubbing.Answer; @@ -47,9 +47,9 @@ import java.util.stream.IntStream; import static java.util.Arrays.asList; import static org.elasticsearch.cluster.routing.ShardRoutingState.RELOCATING; import static org.elasticsearch.cluster.routing.ShardRoutingState.STARTED; -import static org.elasticsearch.xpack.watcher.support.WatcherIndexTemplateRegistryField.HISTORY_TEMPLATE_NAME; -import static org.elasticsearch.xpack.watcher.support.WatcherIndexTemplateRegistryField.TRIGGERED_TEMPLATE_NAME; -import static org.elasticsearch.xpack.watcher.support.WatcherIndexTemplateRegistryField.WATCHES_TEMPLATE_NAME; +import static org.elasticsearch.xpack.core.watcher.support.WatcherIndexTemplateRegistryField.HISTORY_TEMPLATE_NAME; +import static org.elasticsearch.xpack.core.watcher.support.WatcherIndexTemplateRegistryField.TRIGGERED_TEMPLATE_NAME; +import static org.elasticsearch.xpack.core.watcher.support.WatcherIndexTemplateRegistryField.WATCHES_TEMPLATE_NAME; import static org.mockito.Matchers.any; import static org.mockito.Matchers.anyObject; import static org.mockito.Matchers.anyString; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/WatcherMetaDataSerializationTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/WatcherMetaDataSerializationTests.java index e00966862a1..50a7fec4749 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/WatcherMetaDataSerializationTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/WatcherMetaDataSerializationTests.java @@ -16,7 +16,8 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.XPackClientPlugin; +import org.elasticsearch.xpack.core.XPackClientPlugin; +import org.elasticsearch.xpack.core.watcher.WatcherMetaData; import java.util.Collections; import java.util.stream.Collectors; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/WatcherPluginTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/WatcherPluginTests.java index d0bebbbd51e..2516ca5e4d6 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/WatcherPluginTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/WatcherPluginTests.java @@ -13,7 +13,7 @@ import org.elasticsearch.index.analysis.AnalysisRegistry; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.IndexSettingsModule; import org.elasticsearch.threadpool.ExecutorBuilder; -import org.elasticsearch.xpack.watcher.watch.Watch; +import org.elasticsearch.xpack.core.watcher.watch.Watch; import java.util.List; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/WatcherServiceTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/WatcherServiceTests.java index 82237c927a1..0622ab48227 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/WatcherServiceTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/WatcherServiceTests.java @@ -41,13 +41,13 @@ import org.elasticsearch.search.SearchHits; import org.elasticsearch.search.SearchShardTarget; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.xpack.XPackSettings; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.watcher.watch.Watch; +import org.elasticsearch.xpack.core.watcher.watch.WatchStatus; import org.elasticsearch.xpack.watcher.execution.ExecutionService; import org.elasticsearch.xpack.watcher.execution.TriggeredWatchStore; import org.elasticsearch.xpack.watcher.trigger.TriggerService; -import org.elasticsearch.xpack.watcher.watch.Watch; import org.elasticsearch.xpack.watcher.watch.WatchParser; -import org.elasticsearch.xpack.watcher.watch.WatchStatus; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.mockito.ArgumentCaptor; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/ActionErrorIntegrationTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/ActionErrorIntegrationTests.java index 61b5ff5bee9..144a0a75b15 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/ActionErrorIntegrationTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/ActionErrorIntegrationTests.java @@ -8,11 +8,11 @@ package org.elasticsearch.xpack.watcher.actions; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.index.query.QueryBuilders; +import org.elasticsearch.xpack.core.watcher.support.xcontent.XContentSource; +import org.elasticsearch.xpack.core.watcher.transport.actions.get.GetWatchResponse; +import org.elasticsearch.xpack.core.watcher.transport.actions.put.PutWatchResponse; import org.elasticsearch.xpack.watcher.actions.index.IndexAction; -import org.elasticsearch.xpack.watcher.support.xcontent.XContentSource; import org.elasticsearch.xpack.watcher.test.AbstractWatcherIntegrationTestCase; -import org.elasticsearch.xpack.watcher.transport.actions.get.GetWatchResponse; -import org.elasticsearch.xpack.watcher.transport.actions.put.PutWatchResponse; import static org.elasticsearch.index.query.QueryBuilders.termsQuery; import static org.elasticsearch.xpack.watcher.client.WatchSourceBuilders.watchBuilder; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/ActionWrapperTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/ActionWrapperTests.java index afba65dae54..7754e622d5a 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/ActionWrapperTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/ActionWrapperTests.java @@ -6,10 +6,15 @@ package org.elasticsearch.xpack.watcher.actions; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.watcher.actions.Action; +import org.elasticsearch.xpack.core.watcher.actions.ActionStatus; +import org.elasticsearch.xpack.core.watcher.actions.ActionWrapper; +import org.elasticsearch.xpack.core.watcher.actions.ActionWrapperResult; +import org.elasticsearch.xpack.core.watcher.actions.ExecutableAction; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.watch.Watch; +import org.elasticsearch.xpack.core.watcher.watch.WatchStatus; import org.elasticsearch.xpack.watcher.condition.NeverCondition; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; -import org.elasticsearch.xpack.watcher.watch.Watch; -import org.elasticsearch.xpack.watcher.watch.WatchStatus; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; @@ -17,7 +22,7 @@ import java.util.Collections; import java.util.HashMap; import java.util.Map; -import static org.elasticsearch.xpack.watcher.actions.ActionStatus.AckStatus.State; +import static org.elasticsearch.xpack.core.watcher.actions.ActionStatus.AckStatus.State; import static org.hamcrest.Matchers.is; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.mock; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/TimeThrottleIntegrationTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/TimeThrottleIntegrationTests.java index 78ba1756d98..c0be6c1c17f 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/TimeThrottleIntegrationTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/TimeThrottleIntegrationTests.java @@ -12,10 +12,10 @@ import org.elasticsearch.search.builder.SearchSourceBuilder; import org.elasticsearch.search.sort.SortBuilders; import org.elasticsearch.search.sort.SortOrder; import org.elasticsearch.test.junit.annotations.TestLogging; -import org.elasticsearch.xpack.watcher.history.HistoryStoreField; -import org.elasticsearch.xpack.watcher.support.xcontent.ObjectPath; +import org.elasticsearch.xpack.core.watcher.history.HistoryStoreField; +import org.elasticsearch.xpack.core.watcher.support.xcontent.ObjectPath; +import org.elasticsearch.xpack.core.watcher.transport.actions.put.PutWatchResponse; import org.elasticsearch.xpack.watcher.test.AbstractWatcherIntegrationTestCase; -import org.elasticsearch.xpack.watcher.transport.actions.put.PutWatchResponse; import java.util.Map; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/email/EmailActionTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/email/EmailActionTests.java index e961565f422..21d9f57d069 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/email/EmailActionTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/email/EmailActionTests.java @@ -16,13 +16,18 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.json.JsonXContent; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.watcher.actions.Action; +import org.elasticsearch.xpack.core.watcher.common.secret.Secret; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.execution.Wid; +import org.elasticsearch.xpack.core.watcher.support.xcontent.WatcherParams; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.common.http.HttpClient; import org.elasticsearch.xpack.watcher.common.http.HttpRequest; import org.elasticsearch.xpack.watcher.common.http.HttpRequestTemplate; import org.elasticsearch.xpack.watcher.common.http.HttpResponse; import org.elasticsearch.xpack.watcher.common.http.auth.HttpAuthRegistry; import org.elasticsearch.xpack.watcher.common.http.auth.basic.BasicAuthFactory; -import org.elasticsearch.xpack.watcher.common.secret.Secret; import org.elasticsearch.xpack.watcher.common.text.TextTemplate; import org.elasticsearch.xpack.watcher.common.text.TextTemplateEngine; import org.elasticsearch.xpack.watcher.notification.email.Attachment; @@ -38,13 +43,8 @@ import org.elasticsearch.xpack.watcher.notification.email.attachment.EmailAttach import org.elasticsearch.xpack.watcher.notification.email.attachment.EmailAttachmentsParser; import org.elasticsearch.xpack.watcher.notification.email.attachment.HttpEmailAttachementParser; import org.elasticsearch.xpack.watcher.notification.email.attachment.HttpRequestAttachment; -import org.elasticsearch.xpack.watcher.actions.Action; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; -import org.elasticsearch.xpack.watcher.execution.Wid; -import org.elasticsearch.xpack.watcher.support.xcontent.WatcherParams; import org.elasticsearch.xpack.watcher.test.AbstractWatcherIntegrationTestCase; import org.elasticsearch.xpack.watcher.test.MockTextTemplateEngine; -import org.elasticsearch.xpack.watcher.watch.Payload; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.junit.Before; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/email/EmailAttachmentTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/email/EmailAttachmentTests.java index ce7fb2287f9..88f837d7140 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/email/EmailAttachmentTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/email/EmailAttachmentTests.java @@ -14,12 +14,12 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.test.http.MockResponse; import org.elasticsearch.test.http.MockWebServer; -import org.elasticsearch.xpack.watcher.client.WatchSourceBuilder; -import org.elasticsearch.xpack.watcher.client.WatcherClient; +import org.elasticsearch.xpack.core.watcher.client.WatchSourceBuilder; +import org.elasticsearch.xpack.core.watcher.client.WatcherClient; +import org.elasticsearch.xpack.core.watcher.history.HistoryStoreField; import org.elasticsearch.xpack.watcher.common.http.HttpRequestTemplate; import org.elasticsearch.xpack.watcher.common.http.Scheme; import org.elasticsearch.xpack.watcher.condition.InternalAlwaysCondition; -import org.elasticsearch.xpack.watcher.history.HistoryStoreField; import org.elasticsearch.xpack.watcher.notification.email.EmailTemplate; import org.elasticsearch.xpack.watcher.notification.email.attachment.DataAttachment; import org.elasticsearch.xpack.watcher.notification.email.attachment.EmailAttachmentParser; @@ -34,6 +34,7 @@ import javax.mail.BodyPart; import javax.mail.Multipart; import javax.mail.Part; import javax.mail.internet.MimeMessage; + import java.io.InputStream; import java.io.InputStreamReader; import java.nio.charset.StandardCharsets; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/hipchat/HipChatActionTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/hipchat/HipChatActionTests.java index c07816567be..d0b0cacc8fb 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/hipchat/HipChatActionTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/hipchat/HipChatActionTests.java @@ -13,6 +13,10 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.json.JsonXContent; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.watcher.actions.Action; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.execution.Wid; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.common.http.HttpProxy; import org.elasticsearch.xpack.watcher.common.http.HttpRequest; import org.elasticsearch.xpack.watcher.common.http.HttpResponse; @@ -22,10 +26,6 @@ import org.elasticsearch.xpack.watcher.notification.hipchat.HipChatAccount; import org.elasticsearch.xpack.watcher.notification.hipchat.HipChatMessage; import org.elasticsearch.xpack.watcher.notification.hipchat.HipChatService; import org.elasticsearch.xpack.watcher.notification.hipchat.SentMessages; -import org.elasticsearch.xpack.watcher.actions.Action; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; -import org.elasticsearch.xpack.watcher.execution.Wid; -import org.elasticsearch.xpack.watcher.watch.Payload; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.junit.Before; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/index/IndexActionTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/index/IndexActionTests.java index 05d4354ba4a..346b2d0e85c 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/index/IndexActionTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/index/IndexActionTests.java @@ -7,8 +7,6 @@ package org.elasticsearch.xpack.watcher.actions.index; import org.elasticsearch.ElasticsearchException; import org.elasticsearch.ElasticsearchParseException; -import org.elasticsearch.action.search.SearchRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.action.DocWriteRequest; import org.elasticsearch.action.bulk.BulkItemResponse; import org.elasticsearch.action.bulk.BulkRequest; @@ -27,12 +25,12 @@ import org.elasticsearch.index.Index; import org.elasticsearch.index.shard.ShardId; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.xpack.watcher.actions.Action; -import org.elasticsearch.xpack.watcher.actions.Action.Result.Status; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; -import org.elasticsearch.xpack.watcher.support.xcontent.XContentSource; +import org.elasticsearch.xpack.core.watcher.actions.Action; +import org.elasticsearch.xpack.core.watcher.actions.Action.Result.Status; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.support.xcontent.XContentSource; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.test.WatcherTestUtils; -import org.elasticsearch.xpack.watcher.watch.Payload; import org.joda.time.DateTime; import org.junit.Before; import org.mockito.ArgumentCaptor; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/jira/ExecutableJiraActionTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/jira/ExecutableJiraActionTests.java index c41c459c83c..cb434e62df5 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/jira/ExecutableJiraActionTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/jira/ExecutableJiraActionTests.java @@ -9,6 +9,10 @@ import org.elasticsearch.common.collect.MapBuilder; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.script.ScriptService; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.watcher.actions.Action; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.execution.Wid; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.common.http.HttpClient; import org.elasticsearch.xpack.watcher.common.http.HttpProxy; import org.elasticsearch.xpack.watcher.common.http.HttpRequest; @@ -19,10 +23,6 @@ import org.elasticsearch.xpack.watcher.common.text.TextTemplate; import org.elasticsearch.xpack.watcher.common.text.TextTemplateEngine; import org.elasticsearch.xpack.watcher.notification.jira.JiraAccount; import org.elasticsearch.xpack.watcher.notification.jira.JiraService; -import org.elasticsearch.xpack.watcher.actions.Action; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; -import org.elasticsearch.xpack.watcher.execution.Wid; -import org.elasticsearch.xpack.watcher.watch.Payload; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.mockito.ArgumentCaptor; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/jira/JiraActionTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/jira/JiraActionTests.java index 9fe51f05ccc..59c9b877e6c 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/jira/JiraActionTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/jira/JiraActionTests.java @@ -16,6 +16,10 @@ import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.json.JsonXContent; import org.elasticsearch.script.ScriptService; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.watcher.actions.Action; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.execution.Wid; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.common.http.HttpClient; import org.elasticsearch.xpack.watcher.common.http.HttpProxy; import org.elasticsearch.xpack.watcher.common.http.HttpRequest; @@ -26,11 +30,7 @@ import org.elasticsearch.xpack.watcher.notification.jira.JiraAccount; import org.elasticsearch.xpack.watcher.notification.jira.JiraAccountTests; import org.elasticsearch.xpack.watcher.notification.jira.JiraIssue; import org.elasticsearch.xpack.watcher.notification.jira.JiraService; -import org.elasticsearch.xpack.watcher.actions.Action; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; -import org.elasticsearch.xpack.watcher.execution.Wid; import org.elasticsearch.xpack.watcher.support.Variables; -import org.elasticsearch.xpack.watcher.watch.Payload; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/logging/LoggingActionTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/logging/LoggingActionTests.java index a1574cc1e00..fdfd8ae0745 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/logging/LoggingActionTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/logging/LoggingActionTests.java @@ -12,13 +12,13 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.watcher.actions.Action; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.common.text.TextTemplate; import org.elasticsearch.xpack.watcher.common.text.TextTemplateEngine; import org.elasticsearch.xpack.watcher.notification.email.Attachment; -import org.elasticsearch.xpack.watcher.actions.Action; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; import org.elasticsearch.xpack.watcher.test.WatcherTestUtils; -import org.elasticsearch.xpack.watcher.watch.Payload; import org.joda.time.DateTime; import org.junit.Before; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/pagerduty/PagerDutyActionTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/pagerduty/PagerDutyActionTests.java index 6b199a50e44..fb4fa5e8f48 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/pagerduty/PagerDutyActionTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/pagerduty/PagerDutyActionTests.java @@ -14,21 +14,21 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.json.JsonXContent; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.watcher.actions.Action; +import org.elasticsearch.xpack.core.watcher.actions.Action; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.execution.Wid; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.common.http.HttpProxy; import org.elasticsearch.xpack.watcher.common.http.HttpRequest; import org.elasticsearch.xpack.watcher.common.http.HttpResponse; import org.elasticsearch.xpack.watcher.common.text.TextTemplate; import org.elasticsearch.xpack.watcher.common.text.TextTemplateEngine; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; -import org.elasticsearch.xpack.watcher.execution.Wid; import org.elasticsearch.xpack.watcher.notification.pagerduty.IncidentEvent; import org.elasticsearch.xpack.watcher.notification.pagerduty.IncidentEventContext; import org.elasticsearch.xpack.watcher.notification.pagerduty.IncidentEventDefaults; import org.elasticsearch.xpack.watcher.notification.pagerduty.PagerDutyAccount; import org.elasticsearch.xpack.watcher.notification.pagerduty.PagerDutyService; import org.elasticsearch.xpack.watcher.notification.pagerduty.SentEvent; -import org.elasticsearch.xpack.watcher.watch.Payload; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.junit.Before; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/slack/ExecutableSlackActionTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/slack/ExecutableSlackActionTests.java index 0e702f16878..4c945ec9fd5 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/slack/ExecutableSlackActionTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/slack/ExecutableSlackActionTests.java @@ -7,6 +7,9 @@ package org.elasticsearch.xpack.watcher.actions.slack; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.execution.Wid; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.common.http.HttpClient; import org.elasticsearch.xpack.watcher.common.http.HttpProxy; import org.elasticsearch.xpack.watcher.common.http.HttpRequest; @@ -15,10 +18,7 @@ import org.elasticsearch.xpack.watcher.common.text.TextTemplate; import org.elasticsearch.xpack.watcher.notification.slack.SlackAccount; import org.elasticsearch.xpack.watcher.notification.slack.SlackService; import org.elasticsearch.xpack.watcher.notification.slack.message.SlackMessage; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; -import org.elasticsearch.xpack.watcher.execution.Wid; import org.elasticsearch.xpack.watcher.test.MockTextTemplateEngine; -import org.elasticsearch.xpack.watcher.watch.Payload; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.mockito.ArgumentCaptor; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/slack/SlackActionTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/slack/SlackActionTests.java index 04fdb2e6bbb..00839ffea94 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/slack/SlackActionTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/slack/SlackActionTests.java @@ -13,6 +13,10 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.json.JsonXContent; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.watcher.actions.Action; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.execution.Wid; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.common.http.HttpProxy; import org.elasticsearch.xpack.watcher.common.http.HttpRequest; import org.elasticsearch.xpack.watcher.common.http.HttpResponse; @@ -23,10 +27,6 @@ import org.elasticsearch.xpack.watcher.notification.slack.SlackService; import org.elasticsearch.xpack.watcher.notification.slack.message.SlackMessage; import org.elasticsearch.xpack.watcher.notification.slack.message.SlackMessageDefaults; import org.elasticsearch.xpack.watcher.notification.slack.message.SlackMessageTests; -import org.elasticsearch.xpack.watcher.actions.Action; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; -import org.elasticsearch.xpack.watcher.execution.Wid; -import org.elasticsearch.xpack.watcher.watch.Payload; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.junit.Before; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/throttler/AckThrottlerTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/throttler/AckThrottlerTests.java index 4732dc01ebe..787c2c7ce51 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/throttler/AckThrottlerTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/throttler/AckThrottlerTests.java @@ -6,16 +6,18 @@ package org.elasticsearch.xpack.watcher.actions.throttler; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.watcher.actions.ActionStatus; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; -import org.elasticsearch.xpack.watcher.watch.Payload; -import org.elasticsearch.xpack.watcher.watch.Watch; -import org.elasticsearch.xpack.watcher.watch.WatchStatus; +import org.elasticsearch.xpack.core.watcher.actions.ActionStatus; +import org.elasticsearch.xpack.core.watcher.actions.throttler.AckThrottler; +import org.elasticsearch.xpack.core.watcher.actions.throttler.Throttler; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.watch.Payload; +import org.elasticsearch.xpack.core.watcher.watch.Watch; +import org.elasticsearch.xpack.core.watcher.watch.WatchStatus; import org.joda.time.DateTime; import java.time.Clock; -import static org.elasticsearch.xpack.watcher.support.WatcherDateTimeUtils.formatDate; +import static org.elasticsearch.xpack.core.watcher.support.WatcherDateTimeUtils.formatDate; import static org.elasticsearch.xpack.watcher.test.WatcherTestUtils.mockExecutionContext; import static org.hamcrest.CoreMatchers.nullValue; import static org.hamcrest.Matchers.is; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/throttler/ActionThrottleTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/throttler/ActionThrottleTests.java index e7bd59ff695..0ea6e6362ba 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/throttler/ActionThrottleTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/throttler/ActionThrottleTests.java @@ -9,28 +9,28 @@ import org.elasticsearch.ElasticsearchException; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.xpack.watcher.actions.Action; +import org.elasticsearch.xpack.core.watcher.actions.Action; +import org.elasticsearch.xpack.core.watcher.client.WatchSourceBuilder; +import org.elasticsearch.xpack.core.watcher.execution.ActionExecutionMode; +import org.elasticsearch.xpack.core.watcher.execution.ExecutionState; +import org.elasticsearch.xpack.core.watcher.support.xcontent.ObjectPath; +import org.elasticsearch.xpack.core.watcher.transport.actions.execute.ExecuteWatchRequestBuilder; +import org.elasticsearch.xpack.core.watcher.transport.actions.execute.ExecuteWatchResponse; +import org.elasticsearch.xpack.core.watcher.transport.actions.put.PutWatchRequest; +import org.elasticsearch.xpack.core.watcher.watch.Watch; import org.elasticsearch.xpack.watcher.actions.email.EmailAction; import org.elasticsearch.xpack.watcher.actions.index.IndexAction; import org.elasticsearch.xpack.watcher.actions.logging.LoggingAction; import org.elasticsearch.xpack.watcher.actions.webhook.WebhookAction; -import org.elasticsearch.xpack.watcher.client.WatchSourceBuilder; import org.elasticsearch.xpack.watcher.common.http.HttpMethod; import org.elasticsearch.xpack.watcher.common.http.HttpRequestTemplate; import org.elasticsearch.xpack.watcher.common.text.TextTemplate; -import org.elasticsearch.xpack.watcher.execution.ActionExecutionMode; -import org.elasticsearch.xpack.watcher.execution.ExecutionState; import org.elasticsearch.xpack.watcher.notification.email.EmailTemplate; -import org.elasticsearch.xpack.watcher.support.xcontent.ObjectPath; import org.elasticsearch.xpack.watcher.test.AbstractWatcherIntegrationTestCase; -import org.elasticsearch.xpack.watcher.transport.actions.execute.ExecuteWatchRequestBuilder; -import org.elasticsearch.xpack.watcher.transport.actions.execute.ExecuteWatchResponse; -import org.elasticsearch.xpack.watcher.transport.actions.put.PutWatchRequest; import org.elasticsearch.xpack.watcher.trigger.manual.ManualTriggerEvent; import org.elasticsearch.xpack.watcher.trigger.schedule.IntervalSchedule; import org.elasticsearch.xpack.watcher.trigger.schedule.ScheduleTrigger; import org.elasticsearch.xpack.watcher.trigger.schedule.ScheduleTriggerEvent; -import org.elasticsearch.xpack.watcher.watch.Watch; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/throttler/PeriodThrottlerTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/throttler/PeriodThrottlerTests.java index 38782baefe4..c9663694879 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/throttler/PeriodThrottlerTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/throttler/PeriodThrottlerTests.java @@ -7,10 +7,12 @@ package org.elasticsearch.xpack.watcher.actions.throttler; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.watcher.actions.ActionStatus; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; -import org.elasticsearch.xpack.watcher.watch.Payload; -import org.elasticsearch.xpack.watcher.watch.WatchStatus; +import org.elasticsearch.xpack.core.watcher.actions.ActionStatus; +import org.elasticsearch.xpack.core.watcher.actions.throttler.PeriodThrottler; +import org.elasticsearch.xpack.core.watcher.actions.throttler.Throttler; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.watch.Payload; +import org.elasticsearch.xpack.core.watcher.watch.WatchStatus; import org.joda.time.DateTime; import org.joda.time.PeriodType; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/webhook/WebhookActionTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/webhook/WebhookActionTests.java index a3e9ad499fb..f57f65f1d62 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/webhook/WebhookActionTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/webhook/WebhookActionTests.java @@ -16,6 +16,12 @@ import org.elasticsearch.env.TestEnvironment; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.http.MockResponse; import org.elasticsearch.test.http.MockWebServer; +import org.elasticsearch.xpack.core.ssl.SSLService; +import org.elasticsearch.xpack.core.watcher.actions.Action; +import org.elasticsearch.xpack.core.watcher.actions.Action.Result.Status; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.watch.Payload; +import org.elasticsearch.xpack.core.watcher.watch.Watch; import org.elasticsearch.xpack.watcher.common.http.HttpClient; import org.elasticsearch.xpack.watcher.common.http.HttpMethod; import org.elasticsearch.xpack.watcher.common.http.HttpProxy; @@ -26,24 +32,19 @@ import org.elasticsearch.xpack.watcher.common.http.auth.HttpAuthRegistry; import org.elasticsearch.xpack.watcher.common.http.auth.basic.BasicAuthFactory; import org.elasticsearch.xpack.watcher.common.text.TextTemplate; import org.elasticsearch.xpack.watcher.common.text.TextTemplateEngine; -import org.elasticsearch.xpack.watcher.notification.email.Attachment; -import org.elasticsearch.xpack.ssl.SSLService; -import org.elasticsearch.xpack.watcher.actions.Action; -import org.elasticsearch.xpack.watcher.actions.Action.Result.Status; import org.elasticsearch.xpack.watcher.execution.TriggeredExecutionContext; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.watcher.notification.email.Attachment; import org.elasticsearch.xpack.watcher.support.search.WatcherSearchTemplateService; import org.elasticsearch.xpack.watcher.test.AbstractWatcherIntegrationTestCase; import org.elasticsearch.xpack.watcher.test.MockTextTemplateEngine; import org.elasticsearch.xpack.watcher.test.WatcherTestUtils; import org.elasticsearch.xpack.watcher.trigger.schedule.ScheduleTriggerEvent; -import org.elasticsearch.xpack.watcher.watch.Payload; -import org.elasticsearch.xpack.watcher.watch.Watch; import org.hamcrest.Matchers; import org.joda.time.DateTime; import org.junit.Before; import javax.mail.internet.AddressException; + import java.io.IOException; import java.util.Map; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/webhook/WebhookHttpsIntegrationTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/webhook/WebhookHttpsIntegrationTests.java index 168ec114b06..9858a5cd118 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/webhook/WebhookHttpsIntegrationTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/webhook/WebhookHttpsIntegrationTests.java @@ -11,7 +11,9 @@ import org.elasticsearch.env.Environment; import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.test.http.MockResponse; import org.elasticsearch.test.http.MockWebServer; -import org.elasticsearch.xpack.ssl.TestsSSLService; +import org.elasticsearch.xpack.core.ssl.TestsSSLService; +import org.elasticsearch.xpack.core.watcher.history.WatchRecord; +import org.elasticsearch.xpack.core.watcher.support.xcontent.XContentSource; import org.elasticsearch.xpack.watcher.actions.ActionBuilders; import org.elasticsearch.xpack.watcher.common.http.HttpMethod; import org.elasticsearch.xpack.watcher.common.http.HttpRequestTemplate; @@ -19,8 +21,6 @@ import org.elasticsearch.xpack.watcher.common.http.Scheme; import org.elasticsearch.xpack.watcher.common.http.auth.basic.BasicAuth; import org.elasticsearch.xpack.watcher.common.text.TextTemplate; import org.elasticsearch.xpack.watcher.condition.InternalAlwaysCondition; -import org.elasticsearch.xpack.watcher.history.WatchRecord; -import org.elasticsearch.xpack.watcher.support.xcontent.XContentSource; import org.elasticsearch.xpack.watcher.test.AbstractWatcherIntegrationTestCase; import org.junit.After; import org.junit.Before; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/webhook/WebhookIntegrationTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/webhook/WebhookIntegrationTests.java index cc9eb683edd..151bf4af189 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/webhook/WebhookIntegrationTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/actions/webhook/WebhookIntegrationTests.java @@ -15,14 +15,14 @@ import org.elasticsearch.plugins.Plugin; import org.elasticsearch.test.http.MockResponse; import org.elasticsearch.test.http.MockWebServer; import org.elasticsearch.transport.Netty4Plugin; +import org.elasticsearch.xpack.core.watcher.history.WatchRecord; +import org.elasticsearch.xpack.core.watcher.support.xcontent.XContentSource; import org.elasticsearch.xpack.watcher.actions.ActionBuilders; import org.elasticsearch.xpack.watcher.common.http.HttpMethod; import org.elasticsearch.xpack.watcher.common.http.HttpRequestTemplate; import org.elasticsearch.xpack.watcher.common.http.auth.basic.BasicAuth; import org.elasticsearch.xpack.watcher.common.text.TextTemplate; import org.elasticsearch.xpack.watcher.condition.InternalAlwaysCondition; -import org.elasticsearch.xpack.watcher.history.WatchRecord; -import org.elasticsearch.xpack.watcher.support.xcontent.XContentSource; import org.elasticsearch.xpack.watcher.test.AbstractWatcherIntegrationTestCase; import org.junit.After; import org.junit.Before; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/common/http/HttpClientTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/common/http/HttpClientTests.java index f7c2fd789c4..61422edb845 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/common/http/HttpClientTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/common/http/HttpClientTests.java @@ -23,9 +23,9 @@ import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.http.MockResponse; import org.elasticsearch.test.http.MockWebServer; import org.elasticsearch.test.junit.annotations.Network; -import org.elasticsearch.xpack.ssl.SSLService; -import org.elasticsearch.xpack.ssl.TestsSSLService; -import org.elasticsearch.xpack.ssl.VerificationMode; +import org.elasticsearch.xpack.core.ssl.SSLService; +import org.elasticsearch.xpack.core.ssl.TestsSSLService; +import org.elasticsearch.xpack.core.ssl.VerificationMode; import org.elasticsearch.xpack.watcher.common.http.auth.HttpAuthRegistry; import org.elasticsearch.xpack.watcher.common.http.auth.basic.BasicAuth; import org.elasticsearch.xpack.watcher.common.http.auth.basic.BasicAuthFactory; @@ -33,6 +33,7 @@ import org.junit.After; import org.junit.Before; import javax.net.ssl.SSLContext; + import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/common/http/HttpConnectionTimeoutTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/common/http/HttpConnectionTimeoutTests.java index e02aee12807..1b66d48ff06 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/common/http/HttpConnectionTimeoutTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/common/http/HttpConnectionTimeoutTests.java @@ -12,8 +12,8 @@ import org.elasticsearch.env.Environment; import org.elasticsearch.env.TestEnvironment; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.junit.annotations.Network; +import org.elasticsearch.xpack.core.ssl.SSLService; import org.elasticsearch.xpack.watcher.common.http.auth.HttpAuthRegistry; -import org.elasticsearch.xpack.ssl.SSLService; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.lessThan; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/common/http/HttpReadTimeoutTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/common/http/HttpReadTimeoutTests.java index 07d9aed0307..5f344931e1f 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/common/http/HttpReadTimeoutTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/common/http/HttpReadTimeoutTests.java @@ -12,8 +12,8 @@ import org.elasticsearch.env.TestEnvironment; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.http.MockResponse; import org.elasticsearch.test.http.MockWebServer; +import org.elasticsearch.xpack.core.ssl.SSLService; import org.elasticsearch.xpack.watcher.common.http.auth.HttpAuthRegistry; -import org.elasticsearch.xpack.ssl.SSLService; import org.junit.After; import org.junit.Before; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/condition/AlwaysConditionTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/condition/AlwaysConditionTests.java index 5048e3da5e1..8ae0025066e 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/condition/AlwaysConditionTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/condition/AlwaysConditionTests.java @@ -10,6 +10,7 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.script.ScriptService; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.watcher.condition.ExecutableCondition; import java.time.Clock; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/condition/ArrayCompareConditionSearchTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/condition/ArrayCompareConditionSearchTests.java index 8368bdba598..b8931013ded 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/condition/ArrayCompareConditionSearchTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/condition/ArrayCompareConditionSearchTests.java @@ -8,9 +8,10 @@ package org.elasticsearch.xpack.watcher.condition; import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.search.aggregations.AggregationBuilders; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.condition.Condition; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.test.AbstractWatcherIntegrationTestCase; -import org.elasticsearch.xpack.watcher.watch.Payload; import java.io.IOException; import java.time.Clock; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/condition/ArrayCompareConditionTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/condition/ArrayCompareConditionTests.java index db161f171cc..7f938ef167c 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/condition/ArrayCompareConditionTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/condition/ArrayCompareConditionTests.java @@ -11,9 +11,9 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.json.JsonXContent; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.watcher.watch.clock.ClockMock; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; -import org.elasticsearch.xpack.watcher.watch.Payload; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.watch.ClockMock; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.joda.time.DateTime; import org.junit.Rule; import org.junit.rules.ExpectedException; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/condition/CompareConditionSearchTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/condition/CompareConditionSearchTests.java index 61c63813994..0cfc2575386 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/condition/CompareConditionSearchTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/condition/CompareConditionSearchTests.java @@ -9,16 +9,16 @@ import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.action.search.ShardSearchFailure; import org.elasticsearch.common.text.Text; import org.elasticsearch.index.Index; +import org.elasticsearch.search.SearchHit; +import org.elasticsearch.search.SearchHits; import org.elasticsearch.search.SearchShardTarget; import org.elasticsearch.search.aggregations.AggregationBuilders; import org.elasticsearch.search.aggregations.BucketOrder; import org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramInterval; -import org.elasticsearch.search.SearchHit; -import org.elasticsearch.search.SearchHits; import org.elasticsearch.search.internal.InternalSearchResponse; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.test.AbstractWatcherIntegrationTestCase; -import org.elasticsearch.xpack.watcher.watch.Payload; import java.time.Clock; import java.util.Map; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/condition/CompareConditionTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/condition/CompareConditionTests.java index 5b1224ec219..7d4529f6506 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/condition/CompareConditionTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/condition/CompareConditionTests.java @@ -10,10 +10,10 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.json.JsonXContent; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.watcher.watch.clock.ClockMock; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.watch.ClockMock; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.condition.CompareCondition.Op; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; -import org.elasticsearch.xpack.watcher.watch.Payload; import org.joda.time.DateTime; import java.time.Clock; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/condition/NeverConditionTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/condition/NeverConditionTests.java index 5c1561d085c..61bc87185fe 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/condition/NeverConditionTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/condition/NeverConditionTests.java @@ -9,6 +9,7 @@ import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.watcher.condition.ExecutableCondition; import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; import static org.hamcrest.Matchers.containsString; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/condition/ScriptConditionTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/condition/ScriptConditionTests.java index 6812d58ee0a..759025a1e54 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/condition/ScriptConditionTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/condition/ScriptConditionTests.java @@ -28,10 +28,11 @@ import org.elasticsearch.script.ScriptService; import org.elasticsearch.script.ScriptType; import org.elasticsearch.search.internal.InternalSearchResponse; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.watcher.condition.ExecutableCondition; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.Watcher; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; import org.elasticsearch.xpack.watcher.test.AbstractWatcherIntegrationTestCase; -import org.elasticsearch.xpack.watcher.watch.Payload; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.junit.Before; @@ -46,7 +47,7 @@ import java.util.function.Function; import static java.util.Collections.emptyList; import static java.util.Collections.singletonMap; import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.xpack.watcher.support.Exceptions.illegalArgument; +import static org.elasticsearch.xpack.core.watcher.support.Exceptions.illegalArgument; import static org.elasticsearch.xpack.watcher.test.WatcherTestUtils.mockExecutionContext; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.is; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/execution/ExecutionServiceTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/execution/ExecutionServiceTests.java index e237618927d..6b739030996 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/execution/ExecutionServiceTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/execution/ExecutionServiceTests.java @@ -29,35 +29,41 @@ import org.elasticsearch.index.IndexNotFoundException; import org.elasticsearch.index.get.GetResult; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.xpack.watcher.actions.ActionWrapperResult; +import org.elasticsearch.xpack.core.watcher.actions.Action; +import org.elasticsearch.xpack.core.watcher.actions.ActionStatus; +import org.elasticsearch.xpack.core.watcher.actions.ActionWrapper; +import org.elasticsearch.xpack.core.watcher.actions.ActionWrapperResult; +import org.elasticsearch.xpack.core.watcher.actions.ExecutableAction; +import org.elasticsearch.xpack.core.watcher.actions.throttler.ActionThrottler; +import org.elasticsearch.xpack.core.watcher.actions.throttler.Throttler; +import org.elasticsearch.xpack.core.watcher.condition.Condition; +import org.elasticsearch.xpack.core.watcher.condition.ExecutableCondition; +import org.elasticsearch.xpack.core.watcher.execution.ExecutionPhase; +import org.elasticsearch.xpack.core.watcher.execution.ExecutionState; +import org.elasticsearch.xpack.core.watcher.execution.QueuedWatch; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionSnapshot; +import org.elasticsearch.xpack.core.watcher.execution.Wid; +import org.elasticsearch.xpack.core.watcher.history.WatchRecord; +import org.elasticsearch.xpack.core.watcher.input.ExecutableInput; +import org.elasticsearch.xpack.core.watcher.input.Input; +import org.elasticsearch.xpack.core.watcher.support.xcontent.ObjectPath; +import org.elasticsearch.xpack.core.watcher.support.xcontent.XContentSource; +import org.elasticsearch.xpack.core.watcher.transform.ExecutableTransform; +import org.elasticsearch.xpack.core.watcher.transform.Transform; +import org.elasticsearch.xpack.core.watcher.trigger.TriggerEvent; +import org.elasticsearch.xpack.core.watcher.watch.ClockMock; +import org.elasticsearch.xpack.core.watcher.watch.Payload; +import org.elasticsearch.xpack.core.watcher.watch.Watch; +import org.elasticsearch.xpack.core.watcher.watch.WatchStatus; import org.elasticsearch.xpack.watcher.condition.InternalAlwaysCondition; -import org.elasticsearch.xpack.watcher.condition.Condition; -import org.elasticsearch.xpack.watcher.condition.ExecutableCondition; -import org.elasticsearch.xpack.watcher.watch.WatchParser; -import org.elasticsearch.xpack.watcher.watch.clock.ClockMock; -import org.elasticsearch.xpack.watcher.actions.Action; -import org.elasticsearch.xpack.watcher.actions.ActionStatus; -import org.elasticsearch.xpack.watcher.actions.ActionWrapper; -import org.elasticsearch.xpack.watcher.actions.ExecutableAction; -import org.elasticsearch.xpack.watcher.actions.throttler.ActionThrottler; -import org.elasticsearch.xpack.watcher.actions.throttler.Throttler; import org.elasticsearch.xpack.watcher.condition.NeverCondition; import org.elasticsearch.xpack.watcher.history.HistoryStore; -import org.elasticsearch.xpack.watcher.history.WatchRecord; -import org.elasticsearch.xpack.watcher.input.ExecutableInput; -import org.elasticsearch.xpack.watcher.input.Input; import org.elasticsearch.xpack.watcher.input.none.ExecutableNoneInput; -import org.elasticsearch.xpack.watcher.support.xcontent.ObjectPath; -import org.elasticsearch.xpack.watcher.support.xcontent.XContentSource; -import org.elasticsearch.xpack.watcher.transform.ExecutableTransform; -import org.elasticsearch.xpack.watcher.transform.Transform; -import org.elasticsearch.xpack.watcher.trigger.TriggerEvent; import org.elasticsearch.xpack.watcher.trigger.manual.ManualTrigger; import org.elasticsearch.xpack.watcher.trigger.manual.ManualTriggerEvent; import org.elasticsearch.xpack.watcher.trigger.schedule.ScheduleTriggerEvent; -import org.elasticsearch.xpack.watcher.watch.Payload; -import org.elasticsearch.xpack.watcher.watch.Watch; -import org.elasticsearch.xpack.watcher.watch.WatchStatus; +import org.elasticsearch.xpack.watcher.watch.WatchParser; import org.joda.time.DateTime; import org.junit.Before; import org.mockito.ArgumentCaptor; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/execution/TriggeredWatchStoreTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/execution/TriggeredWatchStoreTests.java index 0434db57655..615e6748d2b 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/execution/TriggeredWatchStoreTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/execution/TriggeredWatchStoreTests.java @@ -44,9 +44,12 @@ import org.elasticsearch.search.SearchShardTarget; import org.elasticsearch.search.internal.InternalSearchResponse; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.ThreadPool; +import org.elasticsearch.xpack.core.watcher.execution.TriggeredWatchStoreField; +import org.elasticsearch.xpack.core.watcher.execution.Wid; +import org.elasticsearch.xpack.core.watcher.watch.ClockMock; +import org.elasticsearch.xpack.core.watcher.watch.Watch; import org.elasticsearch.xpack.watcher.common.http.HttpClient; import org.elasticsearch.xpack.watcher.notification.email.EmailService; -import org.elasticsearch.xpack.watcher.watch.clock.ClockMock; import org.elasticsearch.xpack.watcher.support.search.WatcherSearchTemplateService; import org.elasticsearch.xpack.watcher.test.WatcherTestUtils; import org.elasticsearch.xpack.watcher.trigger.TriggerEngine; @@ -54,7 +57,6 @@ import org.elasticsearch.xpack.watcher.trigger.TriggerService; import org.elasticsearch.xpack.watcher.trigger.schedule.CronSchedule; import org.elasticsearch.xpack.watcher.trigger.schedule.ScheduleRegistry; import org.elasticsearch.xpack.watcher.trigger.schedule.ScheduleTriggerEvent; -import org.elasticsearch.xpack.watcher.watch.Watch; import org.elasticsearch.xpack.watcher.watch.WatchTests; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryActionConditionTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryActionConditionTests.java index e9f8d766911..189bf1d5b05 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryActionConditionTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryActionConditionTests.java @@ -13,17 +13,17 @@ import org.elasticsearch.script.ScriptType; import org.elasticsearch.search.SearchHit; import org.elasticsearch.search.builder.SearchSourceBuilder; import org.elasticsearch.test.junit.annotations.TestLogging; -import org.elasticsearch.xpack.watcher.client.WatchSourceBuilder; -import org.elasticsearch.xpack.watcher.condition.InternalAlwaysCondition; +import org.elasticsearch.xpack.core.watcher.client.WatchSourceBuilder; +import org.elasticsearch.xpack.core.watcher.condition.Condition; +import org.elasticsearch.xpack.core.watcher.condition.ExecutableCondition; +import org.elasticsearch.xpack.core.watcher.execution.ExecutionState; +import org.elasticsearch.xpack.core.watcher.input.Input; +import org.elasticsearch.xpack.core.watcher.transport.actions.put.PutWatchResponse; import org.elasticsearch.xpack.watcher.condition.CompareCondition; -import org.elasticsearch.xpack.watcher.condition.Condition; -import org.elasticsearch.xpack.watcher.condition.ExecutableCondition; +import org.elasticsearch.xpack.watcher.condition.InternalAlwaysCondition; import org.elasticsearch.xpack.watcher.condition.NeverCondition; import org.elasticsearch.xpack.watcher.condition.ScriptCondition; -import org.elasticsearch.xpack.watcher.execution.ExecutionState; -import org.elasticsearch.xpack.watcher.input.Input; import org.elasticsearch.xpack.watcher.test.AbstractWatcherIntegrationTestCase; -import org.elasticsearch.xpack.watcher.transport.actions.put.PutWatchResponse; import java.util.ArrayList; import java.util.Arrays; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryStoreTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryStoreTests.java index 3a54f650365..f2e9fa5449a 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryStoreTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryStoreTests.java @@ -16,21 +16,22 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.xpack.watcher.actions.ActionStatus; -import org.elasticsearch.xpack.watcher.actions.ActionWrapperResult; +import org.elasticsearch.xpack.core.watcher.actions.ActionStatus; +import org.elasticsearch.xpack.core.watcher.actions.ActionWrapperResult; +import org.elasticsearch.xpack.core.watcher.execution.ExecutionState; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionResult; +import org.elasticsearch.xpack.core.watcher.execution.Wid; +import org.elasticsearch.xpack.core.watcher.history.WatchRecord; +import org.elasticsearch.xpack.core.watcher.watch.Watch; +import org.elasticsearch.xpack.core.watcher.watch.WatchStatus; import org.elasticsearch.xpack.watcher.actions.jira.JiraAction; import org.elasticsearch.xpack.watcher.common.http.HttpClient; import org.elasticsearch.xpack.watcher.common.http.HttpRequest; import org.elasticsearch.xpack.watcher.common.http.HttpResponse; -import org.elasticsearch.xpack.watcher.execution.ExecutionState; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionResult; -import org.elasticsearch.xpack.watcher.execution.Wid; import org.elasticsearch.xpack.watcher.notification.jira.JiraAccount; import org.elasticsearch.xpack.watcher.notification.jira.JiraIssue; import org.elasticsearch.xpack.watcher.trigger.schedule.ScheduleTriggerEvent; -import org.elasticsearch.xpack.watcher.watch.Watch; -import org.elasticsearch.xpack.watcher.watch.WatchStatus; import org.hamcrest.Description; import org.hamcrest.Matcher; import org.hamcrest.TypeSafeMatcher; @@ -39,8 +40,8 @@ import org.junit.Before; import static java.util.Collections.emptyMap; import static java.util.Collections.singletonMap; -import static org.elasticsearch.xpack.watcher.history.HistoryStoreField.getHistoryIndexNameForTime; -import static org.elasticsearch.xpack.watcher.support.WatcherIndexTemplateRegistryField.INDEX_TEMPLATE_VERSION; +import static org.elasticsearch.xpack.core.watcher.history.HistoryStoreField.getHistoryIndexNameForTime; +import static org.elasticsearch.xpack.core.watcher.support.WatcherIndexTemplateRegistryField.INDEX_TEMPLATE_VERSION; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.not; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateEmailMappingsTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateEmailMappingsTests.java index cfc90812c7a..38008194b0a 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateEmailMappingsTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateEmailMappingsTests.java @@ -10,12 +10,13 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.search.aggregations.Aggregations; import org.elasticsearch.search.aggregations.bucket.terms.Terms; import org.elasticsearch.test.junit.annotations.TestLogging; +import org.elasticsearch.xpack.core.watcher.execution.ExecutionState; +import org.elasticsearch.xpack.core.watcher.history.HistoryStoreField; +import org.elasticsearch.xpack.core.watcher.transport.actions.put.PutWatchResponse; import org.elasticsearch.xpack.watcher.condition.InternalAlwaysCondition; -import org.elasticsearch.xpack.watcher.execution.ExecutionState; import org.elasticsearch.xpack.watcher.notification.email.EmailTemplate; import org.elasticsearch.xpack.watcher.notification.email.support.EmailServer; import org.elasticsearch.xpack.watcher.test.AbstractWatcherIntegrationTestCase; -import org.elasticsearch.xpack.watcher.transport.actions.put.PutWatchResponse; import org.junit.After; import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateHttpMappingsTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateHttpMappingsTests.java index a8394ebe44d..51652078dc9 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateHttpMappingsTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateHttpMappingsTests.java @@ -15,13 +15,14 @@ import org.elasticsearch.search.aggregations.Aggregations; import org.elasticsearch.search.aggregations.bucket.terms.Terms; import org.elasticsearch.test.http.MockResponse; import org.elasticsearch.test.http.MockWebServer; +import org.elasticsearch.xpack.core.watcher.execution.ExecutionState; +import org.elasticsearch.xpack.core.watcher.history.HistoryStoreField; +import org.elasticsearch.xpack.core.watcher.support.xcontent.ObjectPath; +import org.elasticsearch.xpack.core.watcher.transport.actions.put.PutWatchResponse; import org.elasticsearch.xpack.watcher.common.http.HttpMethod; import org.elasticsearch.xpack.watcher.common.http.HttpRequestTemplate; import org.elasticsearch.xpack.watcher.condition.InternalAlwaysCondition; -import org.elasticsearch.xpack.watcher.execution.ExecutionState; -import org.elasticsearch.xpack.watcher.support.xcontent.ObjectPath; import org.elasticsearch.xpack.watcher.test.AbstractWatcherIntegrationTestCase; -import org.elasticsearch.xpack.watcher.transport.actions.put.PutWatchResponse; import org.junit.After; import org.junit.Before; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateIndexActionMappingsTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateIndexActionMappingsTests.java index 99bd06ef7ec..6bf273b194c 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateIndexActionMappingsTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateIndexActionMappingsTests.java @@ -8,9 +8,10 @@ package org.elasticsearch.xpack.watcher.history; import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.search.aggregations.Aggregations; import org.elasticsearch.search.aggregations.bucket.terms.Terms; -import org.elasticsearch.xpack.watcher.execution.ExecutionState; +import org.elasticsearch.xpack.core.watcher.execution.ExecutionState; +import org.elasticsearch.xpack.core.watcher.history.HistoryStoreField; +import org.elasticsearch.xpack.core.watcher.transport.actions.put.PutWatchResponse; import org.elasticsearch.xpack.watcher.test.AbstractWatcherIntegrationTestCase; -import org.elasticsearch.xpack.watcher.transport.actions.put.PutWatchResponse; import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; import static org.elasticsearch.search.builder.SearchSourceBuilder.searchSource; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateSearchInputMappingsTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateSearchInputMappingsTests.java index 90710f64b40..17575f58ec2 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateSearchInputMappingsTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateSearchInputMappingsTests.java @@ -10,11 +10,12 @@ import org.elasticsearch.action.search.SearchType; import org.elasticsearch.common.bytes.BytesArray; import org.elasticsearch.search.aggregations.Aggregations; import org.elasticsearch.search.aggregations.bucket.terms.Terms; +import org.elasticsearch.xpack.core.watcher.execution.ExecutionState; +import org.elasticsearch.xpack.core.watcher.history.HistoryStoreField; +import org.elasticsearch.xpack.core.watcher.transport.actions.put.PutWatchResponse; import org.elasticsearch.xpack.watcher.condition.InternalAlwaysCondition; -import org.elasticsearch.xpack.watcher.execution.ExecutionState; import org.elasticsearch.xpack.watcher.support.search.WatcherSearchTemplateRequest; import org.elasticsearch.xpack.watcher.test.AbstractWatcherIntegrationTestCase; -import org.elasticsearch.xpack.watcher.transport.actions.put.PutWatchResponse; import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; import static org.elasticsearch.search.builder.SearchSourceBuilder.searchSource; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateTimeMappingsTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateTimeMappingsTests.java index a62cc89cc7f..2259ad87eb1 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateTimeMappingsTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateTimeMappingsTests.java @@ -10,10 +10,11 @@ import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.action.admin.indices.mapping.get.GetMappingsResponse; import org.elasticsearch.cluster.metadata.MappingMetaData; import org.elasticsearch.common.collect.ImmutableOpenMap; +import org.elasticsearch.xpack.core.watcher.execution.ExecutionState; +import org.elasticsearch.xpack.core.watcher.history.HistoryStoreField; +import org.elasticsearch.xpack.core.watcher.transport.actions.put.PutWatchResponse; import org.elasticsearch.xpack.watcher.condition.InternalAlwaysCondition; -import org.elasticsearch.xpack.watcher.execution.ExecutionState; import org.elasticsearch.xpack.watcher.test.AbstractWatcherIntegrationTestCase; -import org.elasticsearch.xpack.watcher.transport.actions.put.PutWatchResponse; import java.util.Map; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/input/chain/ChainInputTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/input/chain/ChainInputTests.java index 3366f65147f..7084a195f3c 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/input/chain/ChainInputTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/input/chain/ChainInputTests.java @@ -15,17 +15,17 @@ import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.SecuritySettingsSourceField; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.common.http.HttpRequestTemplate; import org.elasticsearch.xpack.watcher.common.http.auth.basic.BasicAuth; import org.elasticsearch.xpack.watcher.condition.ScriptCondition; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; import org.elasticsearch.xpack.watcher.input.InputFactory; import org.elasticsearch.xpack.watcher.input.InputRegistry; import org.elasticsearch.xpack.watcher.input.http.HttpInput; import org.elasticsearch.xpack.watcher.input.simple.SimpleInput; import org.elasticsearch.xpack.watcher.input.simple.SimpleInputFactory; import org.elasticsearch.xpack.watcher.test.WatcherTestUtils; -import org.elasticsearch.xpack.watcher.watch.Payload; import java.util.HashMap; import java.util.Map; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/input/chain/ExecutableChainInputTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/input/chain/ExecutableChainInputTests.java index cbacadba8f8..0ae6e0b3c96 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/input/chain/ExecutableChainInputTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/input/chain/ExecutableChainInputTests.java @@ -9,19 +9,19 @@ import org.elasticsearch.common.Nullable; import org.elasticsearch.common.collect.Tuple; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; -import org.elasticsearch.xpack.watcher.execution.Wid; -import org.elasticsearch.xpack.watcher.input.ExecutableInput; -import org.elasticsearch.xpack.watcher.input.Input; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.execution.Wid; +import org.elasticsearch.xpack.core.watcher.input.ExecutableInput; +import org.elasticsearch.xpack.core.watcher.input.Input; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.input.simple.SimpleInput; -import org.elasticsearch.xpack.watcher.watch.Payload; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import java.io.IOException; import java.util.Arrays; -import static org.elasticsearch.xpack.watcher.input.Input.Result.Status; +import static org.elasticsearch.xpack.core.watcher.input.Input.Result.Status; import static org.elasticsearch.xpack.watcher.test.WatcherTestUtils.mockExecutionContextBuilder; import static org.hamcrest.Matchers.is; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/input/http/HttpInputTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/input/http/HttpInputTests.java index 51742863b05..694d8bee815 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/input/http/HttpInputTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/input/http/HttpInputTests.java @@ -16,6 +16,9 @@ import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.support.xcontent.ObjectPath; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.common.http.HttpClient; import org.elasticsearch.xpack.watcher.common.http.HttpContentType; import org.elasticsearch.xpack.watcher.common.http.HttpMethod; @@ -29,11 +32,8 @@ import org.elasticsearch.xpack.watcher.common.http.auth.basic.BasicAuth; import org.elasticsearch.xpack.watcher.common.http.auth.basic.BasicAuthFactory; import org.elasticsearch.xpack.watcher.common.text.TextTemplate; import org.elasticsearch.xpack.watcher.common.text.TextTemplateEngine; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; import org.elasticsearch.xpack.watcher.input.InputBuilders; -import org.elasticsearch.xpack.watcher.support.xcontent.ObjectPath; import org.elasticsearch.xpack.watcher.test.WatcherTestUtils; -import org.elasticsearch.xpack.watcher.watch.Payload; import org.junit.Before; import java.io.IOException; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/input/simple/SimpleInputTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/input/simple/SimpleInputTests.java index 319cceef5ee..b435e7ba38a 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/input/simple/SimpleInputTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/input/simple/SimpleInputTests.java @@ -10,10 +10,10 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.watcher.input.ExecutableInput; -import org.elasticsearch.xpack.watcher.input.Input; +import org.elasticsearch.xpack.core.watcher.input.ExecutableInput; +import org.elasticsearch.xpack.core.watcher.input.Input; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.input.InputFactory; -import org.elasticsearch.xpack.watcher.watch.Payload; import java.util.ArrayList; import java.util.HashMap; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/input/transform/TransformInputTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/input/transform/TransformInputTests.java index 5ac802a4530..c8b08e2d02f 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/input/transform/TransformInputTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/input/transform/TransformInputTests.java @@ -17,18 +17,18 @@ import org.elasticsearch.script.ScriptEngine; import org.elasticsearch.script.ScriptService; import org.elasticsearch.script.ScriptType; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.input.ExecutableInput; +import org.elasticsearch.xpack.core.watcher.input.Input; +import org.elasticsearch.xpack.core.watcher.transform.ExecutableTransform; +import org.elasticsearch.xpack.core.watcher.transform.TransformFactory; +import org.elasticsearch.xpack.core.watcher.transform.TransformRegistry; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.Watcher; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; -import org.elasticsearch.xpack.watcher.input.ExecutableInput; -import org.elasticsearch.xpack.watcher.input.Input; import org.elasticsearch.xpack.watcher.test.WatcherTestUtils; -import org.elasticsearch.xpack.watcher.transform.ExecutableTransform; -import org.elasticsearch.xpack.watcher.transform.TransformFactory; -import org.elasticsearch.xpack.watcher.transform.TransformRegistry; import org.elasticsearch.xpack.watcher.transform.script.ExecutableScriptTransform; import org.elasticsearch.xpack.watcher.transform.script.ScriptTransform; import org.elasticsearch.xpack.watcher.transform.script.ScriptTransformFactory; -import org.elasticsearch.xpack.watcher.watch.Payload; import org.junit.Before; import java.util.Collections; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/notification/email/AccountTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/notification/email/AccountTests.java index 5f02654488e..62320f52e73 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/notification/email/AccountTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/notification/email/AccountTests.java @@ -9,7 +9,7 @@ import org.elasticsearch.ElasticsearchException; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.watcher.common.secret.Secret; +import org.elasticsearch.xpack.core.watcher.common.secret.Secret; import org.elasticsearch.xpack.watcher.notification.email.support.EmailServer; import org.junit.After; import org.junit.Before; @@ -17,6 +17,7 @@ import org.junit.Before; import javax.mail.Address; import javax.mail.Message; import javax.mail.internet.InternetAddress; + import java.util.Properties; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/notification/email/EmailSecretsIntegrationTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/notification/email/EmailSecretsIntegrationTests.java index 63d3f897a30..6dab68539d7 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/notification/email/EmailSecretsIntegrationTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/notification/email/EmailSecretsIntegrationTests.java @@ -9,21 +9,21 @@ import org.elasticsearch.action.get.GetResponse; import org.elasticsearch.common.settings.MockSecureSettings; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.support.XContentMapValues; -import org.elasticsearch.xpack.watcher.WatcherField; +import org.elasticsearch.xpack.core.watcher.WatcherField; +import org.elasticsearch.xpack.core.watcher.client.WatcherClient; +import org.elasticsearch.xpack.core.watcher.crypto.CryptoService; +import org.elasticsearch.xpack.core.watcher.crypto.CryptoServiceTests; +import org.elasticsearch.xpack.core.watcher.execution.ActionExecutionMode; +import org.elasticsearch.xpack.core.watcher.support.xcontent.XContentSource; +import org.elasticsearch.xpack.core.watcher.transport.actions.execute.ExecuteWatchResponse; +import org.elasticsearch.xpack.core.watcher.transport.actions.get.GetWatchResponse; +import org.elasticsearch.xpack.core.watcher.trigger.TriggerEvent; +import org.elasticsearch.xpack.core.watcher.watch.Watch; import org.elasticsearch.xpack.watcher.actions.ActionBuilders; -import org.elasticsearch.xpack.watcher.client.WatcherClient; import org.elasticsearch.xpack.watcher.condition.InternalAlwaysCondition; -import org.elasticsearch.xpack.watcher.crypto.CryptoService; -import org.elasticsearch.xpack.watcher.crypto.CryptoServiceTests; -import org.elasticsearch.xpack.watcher.execution.ActionExecutionMode; import org.elasticsearch.xpack.watcher.notification.email.support.EmailServer; -import org.elasticsearch.xpack.watcher.support.xcontent.XContentSource; import org.elasticsearch.xpack.watcher.test.AbstractWatcherIntegrationTestCase; -import org.elasticsearch.xpack.watcher.transport.actions.execute.ExecuteWatchResponse; -import org.elasticsearch.xpack.watcher.transport.actions.get.GetWatchResponse; -import org.elasticsearch.xpack.watcher.trigger.TriggerEvent; import org.elasticsearch.xpack.watcher.trigger.schedule.ScheduleTriggerEvent; -import org.elasticsearch.xpack.watcher.watch.Watch; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.junit.After; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/notification/email/EmailServiceTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/notification/email/EmailServiceTests.java index deb9ee8a0ad..6616ea2b73b 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/notification/email/EmailServiceTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/notification/email/EmailServiceTests.java @@ -8,7 +8,7 @@ package org.elasticsearch.xpack.watcher.notification.email; import org.elasticsearch.common.settings.ClusterSettings; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.watcher.common.secret.Secret; +import org.elasticsearch.xpack.core.watcher.common.secret.Secret; import org.junit.Before; import java.util.Collections; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/notification/email/attachment/EmailAttachmentParsersTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/notification/email/attachment/EmailAttachmentParsersTests.java index 198203943cc..09e28b129cc 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/notification/email/attachment/EmailAttachmentParsersTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/notification/email/attachment/EmailAttachmentParsersTests.java @@ -12,11 +12,11 @@ import org.elasticsearch.common.xcontent.XContent; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.common.http.HttpRequestTemplate; import org.elasticsearch.xpack.watcher.common.http.Scheme; import org.elasticsearch.xpack.watcher.notification.email.Attachment; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; -import org.elasticsearch.xpack.watcher.watch.Payload; import java.io.IOException; import java.nio.charset.StandardCharsets; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/notification/email/attachment/HttpEmailAttachementParserTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/notification/email/attachment/HttpEmailAttachementParserTests.java index 5352a345206..b40a804eea5 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/notification/email/attachment/HttpEmailAttachementParserTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/notification/email/attachment/HttpEmailAttachementParserTests.java @@ -11,6 +11,9 @@ import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.execution.Wid; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.common.http.HttpClient; import org.elasticsearch.xpack.watcher.common.http.HttpRequest; import org.elasticsearch.xpack.watcher.common.http.HttpRequestTemplate; @@ -18,10 +21,7 @@ import org.elasticsearch.xpack.watcher.common.http.HttpResponse; import org.elasticsearch.xpack.watcher.common.http.auth.HttpAuthRegistry; import org.elasticsearch.xpack.watcher.common.http.auth.basic.BasicAuth; import org.elasticsearch.xpack.watcher.common.http.auth.basic.BasicAuthFactory; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; -import org.elasticsearch.xpack.watcher.execution.Wid; import org.elasticsearch.xpack.watcher.test.MockTextTemplateEngine; -import org.elasticsearch.xpack.watcher.watch.Payload; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.junit.Before; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/notification/email/attachment/ReportingAttachmentParserTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/notification/email/attachment/ReportingAttachmentParserTests.java index 25b58061eaf..ad6d353a88a 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/notification/email/attachment/ReportingAttachmentParserTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/notification/email/attachment/ReportingAttachmentParserTests.java @@ -6,7 +6,6 @@ package org.elasticsearch.xpack.watcher.notification.email.attachment; import com.fasterxml.jackson.core.io.JsonEOFException; - import org.elasticsearch.ElasticsearchException; import org.elasticsearch.common.ParsingException; import org.elasticsearch.common.collect.MapBuilder; @@ -16,6 +15,9 @@ import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.execution.Wid; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.common.http.HttpClient; import org.elasticsearch.xpack.watcher.common.http.HttpMethod; import org.elasticsearch.xpack.watcher.common.http.HttpProxy; @@ -29,10 +31,7 @@ import org.elasticsearch.xpack.watcher.common.http.auth.basic.BasicAuthFactory; import org.elasticsearch.xpack.watcher.common.text.TextTemplate; import org.elasticsearch.xpack.watcher.common.text.TextTemplateEngine; import org.elasticsearch.xpack.watcher.notification.email.Attachment; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; -import org.elasticsearch.xpack.watcher.execution.Wid; import org.elasticsearch.xpack.watcher.test.MockTextTemplateEngine; -import org.elasticsearch.xpack.watcher.watch.Payload; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.junit.Before; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/notification/pagerduty/PagerDutyAccountsTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/notification/pagerduty/PagerDutyAccountsTests.java index fd476629203..70486b83dfa 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/notification/pagerduty/PagerDutyAccountsTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/notification/pagerduty/PagerDutyAccountsTests.java @@ -11,12 +11,12 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.json.JsonXContent; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.rest.yaml.ObjectPath; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.common.http.HttpClient; import org.elasticsearch.xpack.watcher.common.http.HttpProxy; import org.elasticsearch.xpack.watcher.common.http.HttpRequest; import org.elasticsearch.xpack.watcher.common.http.HttpResponse; import org.elasticsearch.xpack.watcher.notification.slack.message.SlackMessageDefaultsTests; -import org.elasticsearch.xpack.watcher.watch.Payload; import org.junit.Before; import org.mockito.ArgumentCaptor; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/rest/action/RestExecuteWatchActionTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/rest/action/RestExecuteWatchActionTests.java index 2cd48447cb1..f71999a068c 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/rest/action/RestExecuteWatchActionTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/rest/action/RestExecuteWatchActionTests.java @@ -14,8 +14,8 @@ import org.elasticsearch.rest.RestController; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.rest.FakeRestRequest; import org.elasticsearch.test.rest.FakeRestRequest.Builder; -import org.elasticsearch.xpack.watcher.client.WatcherClient; -import org.elasticsearch.xpack.watcher.transport.actions.execute.ExecuteWatchRequestBuilder; +import org.elasticsearch.xpack.core.watcher.client.WatcherClient; +import org.elasticsearch.xpack.core.watcher.transport.actions.execute.ExecuteWatchRequestBuilder; import java.util.Arrays; import java.util.HashMap; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/support/FilterXContentTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/support/FilterXContentTests.java index 2f0d9906682..eadf739b175 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/support/FilterXContentTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/support/FilterXContentTests.java @@ -9,7 +9,7 @@ import org.elasticsearch.common.collect.MapBuilder; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.watcher.support.xcontent.ObjectPath; +import org.elasticsearch.xpack.core.watcher.support.xcontent.ObjectPath; import org.hamcrest.Matchers; import java.io.IOException; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/support/VariablesTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/support/VariablesTests.java index 9ab9bcdd70c..74396a32906 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/support/VariablesTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/support/VariablesTests.java @@ -6,13 +6,13 @@ package org.elasticsearch.xpack.watcher.support; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; -import org.elasticsearch.xpack.watcher.execution.Wid; -import org.elasticsearch.xpack.watcher.support.xcontent.ObjectPath; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.execution.Wid; +import org.elasticsearch.xpack.core.watcher.support.xcontent.ObjectPath; +import org.elasticsearch.xpack.core.watcher.trigger.TriggerEvent; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.test.WatcherTestUtils; -import org.elasticsearch.xpack.watcher.trigger.TriggerEvent; import org.elasticsearch.xpack.watcher.trigger.schedule.ScheduleTriggerEvent; -import org.elasticsearch.xpack.watcher.watch.Payload; import org.joda.time.DateTime; import java.util.Map; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/support/WatcherDateTimeUtilsTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/support/WatcherDateTimeUtilsTests.java index 4661072291f..8c08c12a493 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/support/WatcherDateTimeUtilsTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/support/WatcherDateTimeUtilsTests.java @@ -11,6 +11,7 @@ import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.watcher.support.WatcherDateTimeUtils; import java.util.HashMap; import java.util.Map; @@ -22,7 +23,7 @@ import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.MINUTES; import static java.util.concurrent.TimeUnit.SECONDS; import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.xpack.watcher.support.WatcherDateTimeUtils.parseTimeValueSupportingFractional; +import static org.elasticsearch.xpack.core.watcher.support.WatcherDateTimeUtils.parseTimeValueSupportingFractional; import static org.hamcrest.CoreMatchers.nullValue; import static org.hamcrest.Matchers.either; import static org.hamcrest.Matchers.is; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/support/WatcherIndexTemplateRegistryTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/support/WatcherIndexTemplateRegistryTests.java index d11446d9192..4388b20f520 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/support/WatcherIndexTemplateRegistryTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/support/WatcherIndexTemplateRegistryTests.java @@ -28,6 +28,7 @@ import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.gateway.GatewayService; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.ThreadPool; +import org.elasticsearch.xpack.core.watcher.support.WatcherIndexTemplateRegistryField; import org.junit.Before; import org.mockito.ArgumentCaptor; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/support/WatcherUtilsTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/support/WatcherUtilsTests.java index 99b1315c857..54414e337fc 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/support/WatcherUtilsTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/support/WatcherUtilsTests.java @@ -22,6 +22,7 @@ import org.elasticsearch.script.Script; import org.elasticsearch.script.ScriptType; import org.elasticsearch.search.builder.SearchSourceBuilder; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.watcher.support.WatcherUtils; import org.elasticsearch.xpack.watcher.support.search.WatcherSearchTemplateRequest; import org.joda.time.DateTime; @@ -33,9 +34,9 @@ import java.util.Map; import static java.util.Collections.singletonMap; import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.elasticsearch.xpack.core.watcher.support.WatcherDateTimeUtils.formatDate; +import static org.elasticsearch.xpack.core.watcher.support.WatcherUtils.flattenModel; import static org.elasticsearch.xpack.watcher.input.search.ExecutableSearchInput.DEFAULT_SEARCH_TYPE; -import static org.elasticsearch.xpack.watcher.support.WatcherDateTimeUtils.formatDate; -import static org.elasticsearch.xpack.watcher.support.WatcherUtils.flattenModel; import static org.elasticsearch.xpack.watcher.test.WatcherTestUtils.getRandomSupportedSearchType; import static org.hamcrest.Matchers.arrayContainingInAnyOrder; import static org.hamcrest.Matchers.equalTo; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/support/xcontent/MapPathTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/support/xcontent/MapPathTests.java index 7550e398b69..f89552a6377 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/support/xcontent/MapPathTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/support/xcontent/MapPathTests.java @@ -6,6 +6,7 @@ package org.elasticsearch.xpack.watcher.support.xcontent; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.watcher.support.xcontent.ObjectPath; import java.util.ArrayList; import java.util.Arrays; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/support/xcontent/XContentSourceTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/support/xcontent/XContentSourceTests.java index 965d9a49e25..5149cf07bb8 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/support/xcontent/XContentSourceTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/support/xcontent/XContentSourceTests.java @@ -11,6 +11,7 @@ import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.watcher.support.xcontent.XContentSource; import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; import static org.elasticsearch.common.xcontent.XContentFactory.smileBuilder; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/AbstractWatcherIntegrationTestCase.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/AbstractWatcherIntegrationTestCase.java index d00efd82826..3727261851d 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/AbstractWatcherIntegrationTestCase.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/AbstractWatcherIntegrationTestCase.java @@ -39,29 +39,27 @@ import org.elasticsearch.test.InternalTestCluster; import org.elasticsearch.test.disruption.ServiceDisruptionScheme; import org.elasticsearch.test.store.MockFSIndexStore; import org.elasticsearch.test.transport.MockTransportService; -import org.elasticsearch.xpack.LocalStateCompositeXPackPlugin; -import org.elasticsearch.xpack.XPackClient; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.ml.MachineLearningField; -import org.elasticsearch.xpack.security.SecurityField; -import org.elasticsearch.xpack.template.TemplateUtils; -import org.elasticsearch.xpack.watcher.WatcherState; -import org.elasticsearch.xpack.watcher.client.WatcherClient; -import org.elasticsearch.xpack.watcher.execution.ExecutionState; -import org.elasticsearch.xpack.watcher.execution.TriggeredWatchStoreField; +import org.elasticsearch.xpack.core.XPackClient; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.watcher.WatcherState; +import org.elasticsearch.xpack.core.watcher.client.WatcherClient; +import org.elasticsearch.xpack.core.watcher.execution.ExecutionState; +import org.elasticsearch.xpack.core.watcher.execution.TriggeredWatchStoreField; +import org.elasticsearch.xpack.core.watcher.history.HistoryStoreField; +import org.elasticsearch.xpack.core.watcher.support.WatcherIndexTemplateRegistryField; +import org.elasticsearch.xpack.core.watcher.support.xcontent.XContentSource; +import org.elasticsearch.xpack.core.watcher.transport.actions.stats.WatcherStatsResponse; +import org.elasticsearch.xpack.core.watcher.watch.ClockMock; +import org.elasticsearch.xpack.core.watcher.watch.Watch; +import org.elasticsearch.xpack.core.security.SecurityField; +import org.elasticsearch.xpack.core.template.TemplateUtils; import org.elasticsearch.xpack.watcher.history.HistoryStore; -import org.elasticsearch.xpack.watcher.history.HistoryStoreField; import org.elasticsearch.xpack.watcher.notification.email.Authentication; import org.elasticsearch.xpack.watcher.notification.email.Email; import org.elasticsearch.xpack.watcher.notification.email.EmailService; import org.elasticsearch.xpack.watcher.notification.email.Profile; -import org.elasticsearch.xpack.watcher.support.WatcherIndexTemplateRegistryField; -import org.elasticsearch.xpack.watcher.support.xcontent.XContentSource; -import org.elasticsearch.xpack.watcher.transport.actions.stats.WatcherStatsResponse; import org.elasticsearch.xpack.watcher.trigger.ScheduleTriggerEngineMock; -import org.elasticsearch.xpack.watcher.watch.Watch; import org.elasticsearch.xpack.watcher.watch.WatchParser; -import org.elasticsearch.xpack.watcher.watch.clock.ClockMock; import org.hamcrest.Matcher; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; @@ -86,9 +84,9 @@ import static org.elasticsearch.index.query.QueryBuilders.boolQuery; import static org.elasticsearch.index.query.QueryBuilders.matchQuery; import static org.elasticsearch.test.ESIntegTestCase.Scope.SUITE; import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.xpack.watcher.support.WatcherIndexTemplateRegistryField.HISTORY_TEMPLATE_NAME; -import static org.elasticsearch.xpack.watcher.support.WatcherIndexTemplateRegistryField.TRIGGERED_TEMPLATE_NAME; -import static org.elasticsearch.xpack.watcher.support.WatcherIndexTemplateRegistryField.WATCHES_TEMPLATE_NAME; +import static org.elasticsearch.xpack.core.watcher.support.WatcherIndexTemplateRegistryField.HISTORY_TEMPLATE_NAME; +import static org.elasticsearch.xpack.core.watcher.support.WatcherIndexTemplateRegistryField.TRIGGERED_TEMPLATE_NAME; +import static org.elasticsearch.xpack.core.watcher.support.WatcherIndexTemplateRegistryField.WATCHES_TEMPLATE_NAME; import static org.hamcrest.Matchers.emptyArray; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.everyItem; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/LocalStateWatcher.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/LocalStateWatcher.java index 5489d4098b9..54c94dddd0f 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/LocalStateWatcher.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/LocalStateWatcher.java @@ -7,8 +7,8 @@ package org.elasticsearch.xpack.watcher.test; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.license.XPackLicenseState; -import org.elasticsearch.xpack.LocalStateCompositeXPackPlugin; -import org.elasticsearch.xpack.ssl.SSLService; +import org.elasticsearch.xpack.core.LocalStateCompositeXPackPlugin; +import org.elasticsearch.xpack.core.ssl.SSLService; import org.elasticsearch.xpack.watcher.Watcher; import java.nio.file.Path; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/TimeWarpedWatcher.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/TimeWarpedWatcher.java index d0e939cdcdf..432720a59b5 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/TimeWarpedWatcher.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/TimeWarpedWatcher.java @@ -6,33 +6,24 @@ package org.elasticsearch.xpack.watcher.test; import org.apache.logging.log4j.Logger; -import org.elasticsearch.common.inject.Module; -import org.elasticsearch.common.inject.util.Providers; -import org.elasticsearch.common.logging.Loggers; import org.elasticsearch.common.logging.ServerLoggers; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.license.XPackLicenseState; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.xpack.LocalStateCompositeXPackPlugin; -import org.elasticsearch.xpack.XPackPlugin; -import org.elasticsearch.xpack.ssl.SSLService; +import org.elasticsearch.xpack.core.LocalStateCompositeXPackPlugin; +import org.elasticsearch.xpack.core.ssl.SSLService; +import org.elasticsearch.xpack.core.watcher.trigger.TriggerEvent; +import org.elasticsearch.xpack.core.watcher.watch.ClockMock; import org.elasticsearch.xpack.watcher.Watcher; -import org.elasticsearch.xpack.watcher.WatcherFeatureSet; -import org.elasticsearch.xpack.watcher.WatcherService; import org.elasticsearch.xpack.watcher.execution.ExecutionService; import org.elasticsearch.xpack.watcher.execution.SyncTriggerEventConsumer; import org.elasticsearch.xpack.watcher.execution.WatchExecutor; import org.elasticsearch.xpack.watcher.trigger.ScheduleTriggerEngineMock; import org.elasticsearch.xpack.watcher.trigger.TriggerEngine; -import org.elasticsearch.xpack.watcher.trigger.TriggerEvent; import org.elasticsearch.xpack.watcher.trigger.schedule.ScheduleRegistry; -import org.elasticsearch.xpack.watcher.watch.clock.ClockMock; import java.nio.file.Path; import java.time.Clock; -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.BlockingQueue; import java.util.function.Consumer; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/WatchExecutionContextMockBuilder.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/WatchExecutionContextMockBuilder.java index 40f813faf06..eb859baad89 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/WatchExecutionContextMockBuilder.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/WatchExecutionContextMockBuilder.java @@ -6,13 +6,13 @@ package org.elasticsearch.xpack.watcher.test; import org.elasticsearch.common.collect.MapBuilder; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; -import org.elasticsearch.xpack.watcher.execution.Wid; -import org.elasticsearch.xpack.watcher.trigger.TriggerEvent; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.execution.Wid; +import org.elasticsearch.xpack.core.watcher.trigger.TriggerEvent; +import org.elasticsearch.xpack.core.watcher.watch.Payload; +import org.elasticsearch.xpack.core.watcher.watch.Watch; +import org.elasticsearch.xpack.core.watcher.watch.WatchStatus; import org.elasticsearch.xpack.watcher.trigger.schedule.ScheduleTriggerEvent; -import org.elasticsearch.xpack.watcher.watch.Payload; -import org.elasticsearch.xpack.watcher.watch.Watch; -import org.elasticsearch.xpack.watcher.watch.WatchStatus; import org.joda.time.DateTime; import java.util.Collections; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/WatcherTestUtils.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/WatcherTestUtils.java index 265967213ee..9b38973e9c5 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/WatcherTestUtils.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/WatcherTestUtils.java @@ -15,8 +15,16 @@ import org.elasticsearch.common.xcontent.XContent; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.search.builder.SearchSourceBuilder; -import org.elasticsearch.xpack.watcher.actions.ActionStatus; -import org.elasticsearch.xpack.watcher.actions.ActionWrapper; +import org.elasticsearch.xpack.core.watcher.actions.ActionStatus; +import org.elasticsearch.xpack.core.watcher.actions.ActionWrapper; +import org.elasticsearch.xpack.core.watcher.common.secret.Secret; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.execution.Wid; +import org.elasticsearch.xpack.core.watcher.support.xcontent.XContentSource; +import org.elasticsearch.xpack.core.watcher.trigger.TriggerEvent; +import org.elasticsearch.xpack.core.watcher.watch.Payload; +import org.elasticsearch.xpack.core.watcher.watch.Watch; +import org.elasticsearch.xpack.core.watcher.watch.WatchStatus; import org.elasticsearch.xpack.watcher.actions.email.EmailAction; import org.elasticsearch.xpack.watcher.actions.email.ExecutableEmailAction; import org.elasticsearch.xpack.watcher.actions.webhook.ExecutableWebhookAction; @@ -24,13 +32,10 @@ import org.elasticsearch.xpack.watcher.actions.webhook.WebhookAction; import org.elasticsearch.xpack.watcher.common.http.HttpClient; import org.elasticsearch.xpack.watcher.common.http.HttpMethod; import org.elasticsearch.xpack.watcher.common.http.HttpRequestTemplate; -import org.elasticsearch.xpack.watcher.common.secret.Secret; import org.elasticsearch.xpack.watcher.common.text.TextTemplate; import org.elasticsearch.xpack.watcher.common.text.TextTemplateEngine; import org.elasticsearch.xpack.watcher.condition.InternalAlwaysCondition; import org.elasticsearch.xpack.watcher.execution.TriggeredExecutionContext; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; -import org.elasticsearch.xpack.watcher.execution.Wid; import org.elasticsearch.xpack.watcher.input.simple.ExecutableSimpleInput; import org.elasticsearch.xpack.watcher.input.simple.SimpleInput; import org.elasticsearch.xpack.watcher.notification.email.Authentication; @@ -40,20 +45,16 @@ import org.elasticsearch.xpack.watcher.notification.email.HtmlSanitizer; import org.elasticsearch.xpack.watcher.notification.email.Profile; import org.elasticsearch.xpack.watcher.support.search.WatcherSearchTemplateRequest; import org.elasticsearch.xpack.watcher.support.search.WatcherSearchTemplateService; -import org.elasticsearch.xpack.watcher.support.xcontent.XContentSource; import org.elasticsearch.xpack.watcher.transform.search.ExecutableSearchTransform; import org.elasticsearch.xpack.watcher.transform.search.SearchTransform; -import org.elasticsearch.xpack.watcher.trigger.TriggerEvent; import org.elasticsearch.xpack.watcher.trigger.schedule.CronSchedule; import org.elasticsearch.xpack.watcher.trigger.schedule.IntervalSchedule; import org.elasticsearch.xpack.watcher.trigger.schedule.ScheduleTrigger; import org.elasticsearch.xpack.watcher.trigger.schedule.ScheduleTriggerEvent; -import org.elasticsearch.xpack.watcher.watch.Payload; -import org.elasticsearch.xpack.watcher.watch.Watch; -import org.elasticsearch.xpack.watcher.watch.WatchStatus; import org.joda.time.DateTime; import javax.mail.internet.AddressException; + import java.io.IOException; import java.util.ArrayList; import java.util.Collections; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/bench/ScheduleEngineTriggerBenchmark.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/bench/ScheduleEngineTriggerBenchmark.java index b6a23ecf6a3..725b2913839 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/bench/ScheduleEngineTriggerBenchmark.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/bench/ScheduleEngineTriggerBenchmark.java @@ -10,15 +10,15 @@ import org.elasticsearch.common.SuppressForbidden; import org.elasticsearch.common.logging.ESLoggerFactory; import org.elasticsearch.common.metrics.MeanMetric; import org.elasticsearch.common.settings.Settings; +import org.elasticsearch.xpack.core.watcher.trigger.TriggerEvent; +import org.elasticsearch.xpack.core.watcher.watch.Watch; import org.elasticsearch.xpack.watcher.condition.InternalAlwaysCondition; import org.elasticsearch.xpack.watcher.input.none.ExecutableNoneInput; -import org.elasticsearch.xpack.watcher.trigger.TriggerEvent; import org.elasticsearch.xpack.watcher.trigger.schedule.ScheduleRegistry; import org.elasticsearch.xpack.watcher.trigger.schedule.ScheduleTrigger; import org.elasticsearch.xpack.watcher.trigger.schedule.ScheduleTriggerEngine; import org.elasticsearch.xpack.watcher.trigger.schedule.ScheduleTriggerEvent; import org.elasticsearch.xpack.watcher.trigger.schedule.engine.TickerScheduleTriggerEngine; -import org.elasticsearch.xpack.watcher.watch.Watch; import java.time.Clock; import java.util.ArrayList; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/bench/WatcherExecutorServiceBenchmark.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/bench/WatcherExecutorServiceBenchmark.java index 18ad645a52a..b32f143289d 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/bench/WatcherExecutorServiceBenchmark.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/bench/WatcherExecutorServiceBenchmark.java @@ -5,7 +5,6 @@ */ package org.elasticsearch.xpack.watcher.test.bench; -import org.bouncycastle.operator.OperatorCreationException; import org.elasticsearch.client.Client; import org.elasticsearch.common.logging.ServerLoggers; import org.elasticsearch.common.settings.Settings; @@ -15,25 +14,19 @@ import org.elasticsearch.node.Node; import org.elasticsearch.script.Script; import org.elasticsearch.script.ScriptType; import org.elasticsearch.search.builder.SearchSourceBuilder; -import org.elasticsearch.xpack.XPackPlugin; -import org.elasticsearch.xpack.watcher.common.http.HttpRequestTemplate; +import org.elasticsearch.xpack.core.watcher.client.WatchSourceBuilder; +import org.elasticsearch.xpack.core.watcher.client.WatcherClient; +import org.elasticsearch.xpack.core.watcher.transport.actions.put.PutWatchRequest; import org.elasticsearch.xpack.watcher.Watcher; -import org.elasticsearch.xpack.watcher.client.WatchSourceBuilder; -import org.elasticsearch.xpack.watcher.client.WatcherClient; +import org.elasticsearch.xpack.watcher.common.http.HttpRequestTemplate; import org.elasticsearch.xpack.watcher.condition.ScriptCondition; -import org.elasticsearch.xpack.watcher.transport.actions.put.PutWatchRequest; import org.elasticsearch.xpack.watcher.trigger.ScheduleTriggerEngineMock; import org.elasticsearch.xpack.watcher.trigger.TriggerEngine; import org.elasticsearch.xpack.watcher.trigger.schedule.ScheduleRegistry; -import java.io.IOException; -import java.nio.file.Path; -import java.security.GeneralSecurityException; import java.time.Clock; import java.util.Arrays; -import javax.security.auth.DestroyFailedException; - import static java.util.Collections.emptyMap; import static org.elasticsearch.xpack.watcher.actions.ActionBuilders.indexAction; import static org.elasticsearch.xpack.watcher.input.InputBuilders.httpInput; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/bench/WatcherScheduleEngineBenchmark.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/bench/WatcherScheduleEngineBenchmark.java index 46da0052a05..7cf29632538 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/bench/WatcherScheduleEngineBenchmark.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/bench/WatcherScheduleEngineBenchmark.java @@ -27,16 +27,15 @@ import org.elasticsearch.search.aggregations.bucket.terms.Terms; import org.elasticsearch.search.aggregations.metrics.percentiles.Percentiles; import org.elasticsearch.search.builder.SearchSourceBuilder; import org.elasticsearch.threadpool.ThreadPoolStats; -import org.elasticsearch.xpack.XPackPlugin; -import org.elasticsearch.xpack.watcher.WatcherState; +import org.elasticsearch.xpack.core.watcher.WatcherState; +import org.elasticsearch.xpack.core.watcher.client.WatchSourceBuilder; +import org.elasticsearch.xpack.core.watcher.client.WatcherClient; +import org.elasticsearch.xpack.core.watcher.history.HistoryStoreField; +import org.elasticsearch.xpack.core.watcher.watch.Watch; import org.elasticsearch.xpack.watcher.actions.ActionBuilders; import org.elasticsearch.xpack.watcher.actions.logging.LoggingLevel; -import org.elasticsearch.xpack.watcher.client.WatchSourceBuilder; -import org.elasticsearch.xpack.watcher.client.WatcherClient; import org.elasticsearch.xpack.watcher.condition.ScriptCondition; -import org.elasticsearch.xpack.watcher.history.HistoryStoreField; import org.elasticsearch.xpack.watcher.test.LocalStateWatcher; -import org.elasticsearch.xpack.watcher.watch.Watch; import java.io.IOException; import java.time.Clock; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/integration/BasicWatcherTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/integration/BasicWatcherTests.java index a4760eb7368..6d97ef05e40 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/integration/BasicWatcherTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/integration/BasicWatcherTests.java @@ -14,21 +14,21 @@ import org.elasticsearch.script.Script; import org.elasticsearch.script.ScriptType; import org.elasticsearch.search.builder.SearchSourceBuilder; import org.elasticsearch.test.junit.annotations.TestLogging; -import org.elasticsearch.xpack.watcher.client.WatchSourceBuilder; -import org.elasticsearch.xpack.watcher.client.WatcherClient; -import org.elasticsearch.xpack.watcher.condition.InternalAlwaysCondition; +import org.elasticsearch.xpack.core.watcher.client.WatchSourceBuilder; +import org.elasticsearch.xpack.core.watcher.client.WatcherClient; +import org.elasticsearch.xpack.core.watcher.support.xcontent.XContentSource; +import org.elasticsearch.xpack.core.watcher.transport.actions.delete.DeleteWatchResponse; +import org.elasticsearch.xpack.core.watcher.transport.actions.get.GetWatchResponse; +import org.elasticsearch.xpack.core.watcher.transport.actions.put.PutWatchResponse; +import org.elasticsearch.xpack.core.watcher.watch.Watch; import org.elasticsearch.xpack.watcher.condition.CompareCondition; +import org.elasticsearch.xpack.watcher.condition.InternalAlwaysCondition; import org.elasticsearch.xpack.watcher.support.search.WatcherSearchTemplateRequest; -import org.elasticsearch.xpack.watcher.support.xcontent.XContentSource; import org.elasticsearch.xpack.watcher.test.AbstractWatcherIntegrationTestCase; -import org.elasticsearch.xpack.watcher.transport.actions.delete.DeleteWatchResponse; -import org.elasticsearch.xpack.watcher.transport.actions.get.GetWatchResponse; -import org.elasticsearch.xpack.watcher.transport.actions.put.PutWatchResponse; import org.elasticsearch.xpack.watcher.trigger.schedule.IntervalSchedule; import org.elasticsearch.xpack.watcher.trigger.schedule.Schedules; import org.elasticsearch.xpack.watcher.trigger.schedule.support.MonthTimes; import org.elasticsearch.xpack.watcher.trigger.schedule.support.WeekTimes; -import org.elasticsearch.xpack.watcher.watch.Watch; import org.joda.time.DateTime; import java.time.Clock; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/integration/BootStrapTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/integration/BootStrapTests.java index 722b2f36891..f39e7028ed0 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/integration/BootStrapTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/integration/BootStrapTests.java @@ -13,22 +13,22 @@ import org.elasticsearch.cluster.service.ClusterService; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.test.junit.annotations.TestLogging; -import org.elasticsearch.xpack.watcher.condition.InternalAlwaysCondition; +import org.elasticsearch.xpack.core.watcher.condition.ExecutableCondition; +import org.elasticsearch.xpack.core.watcher.execution.ExecutionState; +import org.elasticsearch.xpack.core.watcher.execution.TriggeredWatchStoreField; +import org.elasticsearch.xpack.core.watcher.execution.Wid; +import org.elasticsearch.xpack.core.watcher.history.HistoryStoreField; +import org.elasticsearch.xpack.core.watcher.history.WatchRecord; +import org.elasticsearch.xpack.core.watcher.transport.actions.stats.WatcherStatsResponse; +import org.elasticsearch.xpack.core.watcher.watch.Watch; +import org.elasticsearch.xpack.core.watcher.watch.WatchField; import org.elasticsearch.xpack.watcher.condition.CompareCondition; -import org.elasticsearch.xpack.watcher.condition.ExecutableCondition; -import org.elasticsearch.xpack.watcher.execution.ExecutionState; +import org.elasticsearch.xpack.watcher.condition.InternalAlwaysCondition; import org.elasticsearch.xpack.watcher.execution.TriggeredWatch; -import org.elasticsearch.xpack.watcher.execution.TriggeredWatchStoreField; -import org.elasticsearch.xpack.watcher.execution.Wid; import org.elasticsearch.xpack.watcher.history.HistoryStore; -import org.elasticsearch.xpack.watcher.history.HistoryStoreField; -import org.elasticsearch.xpack.watcher.history.WatchRecord; import org.elasticsearch.xpack.watcher.support.search.WatcherSearchTemplateRequest; import org.elasticsearch.xpack.watcher.test.AbstractWatcherIntegrationTestCase; -import org.elasticsearch.xpack.watcher.transport.actions.stats.WatcherStatsResponse; import org.elasticsearch.xpack.watcher.trigger.schedule.ScheduleTriggerEvent; -import org.elasticsearch.xpack.watcher.watch.Watch; -import org.elasticsearch.xpack.watcher.watch.WatchField; import org.hamcrest.Matchers; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/integration/ExecutionVarsIntegrationTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/integration/ExecutionVarsIntegrationTests.java index 99299328e3e..85b0280588a 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/integration/ExecutionVarsIntegrationTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/integration/ExecutionVarsIntegrationTests.java @@ -9,13 +9,13 @@ import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.common.xcontent.support.XContentMapValues; import org.elasticsearch.plugins.Plugin; import org.elasticsearch.script.MockScriptPlugin; -import org.elasticsearch.xpack.watcher.client.WatcherClient; +import org.elasticsearch.xpack.core.watcher.client.WatcherClient; +import org.elasticsearch.xpack.core.watcher.support.xcontent.ObjectPath; +import org.elasticsearch.xpack.core.watcher.support.xcontent.XContentSource; +import org.elasticsearch.xpack.core.watcher.transport.actions.execute.ExecuteWatchResponse; +import org.elasticsearch.xpack.core.watcher.transport.actions.put.PutWatchResponse; import org.elasticsearch.xpack.watcher.condition.ScriptCondition; -import org.elasticsearch.xpack.watcher.support.xcontent.ObjectPath; -import org.elasticsearch.xpack.watcher.support.xcontent.XContentSource; import org.elasticsearch.xpack.watcher.test.AbstractWatcherIntegrationTestCase; -import org.elasticsearch.xpack.watcher.transport.actions.execute.ExecuteWatchResponse; -import org.elasticsearch.xpack.watcher.transport.actions.put.PutWatchResponse; import org.hamcrest.Matcher; import java.util.HashMap; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/integration/HipChatServiceTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/integration/HipChatServiceTests.java index de4d68c97ca..f513a1da55a 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/integration/HipChatServiceTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/integration/HipChatServiceTests.java @@ -13,19 +13,19 @@ import org.elasticsearch.script.MockMustacheScriptEngine; import org.elasticsearch.test.ESSingleNodeTestCase; import org.elasticsearch.test.junit.annotations.Network; import org.elasticsearch.test.junit.annotations.TestLogging; -import org.elasticsearch.xpack.XPackSettings; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.watcher.WatcherState; +import org.elasticsearch.xpack.core.watcher.client.WatcherClient; +import org.elasticsearch.xpack.core.watcher.history.HistoryStoreField; +import org.elasticsearch.xpack.core.watcher.transport.actions.put.PutWatchResponse; import org.elasticsearch.xpack.watcher.WatcherService; -import org.elasticsearch.xpack.watcher.WatcherState; import org.elasticsearch.xpack.watcher.actions.hipchat.HipChatAction; -import org.elasticsearch.xpack.watcher.client.WatcherClient; import org.elasticsearch.xpack.watcher.condition.InternalAlwaysCondition; -import org.elasticsearch.xpack.watcher.history.HistoryStoreField; import org.elasticsearch.xpack.watcher.notification.hipchat.HipChatAccount; import org.elasticsearch.xpack.watcher.notification.hipchat.HipChatMessage; import org.elasticsearch.xpack.watcher.notification.hipchat.HipChatService; import org.elasticsearch.xpack.watcher.notification.hipchat.SentMessages; import org.elasticsearch.xpack.watcher.test.LocalStateWatcher; -import org.elasticsearch.xpack.watcher.transport.actions.put.PutWatchResponse; import java.util.Arrays; import java.util.Collection; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/integration/HistoryIntegrationTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/integration/HistoryIntegrationTests.java index df31622897e..9eeb3a2dc2a 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/integration/HistoryIntegrationTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/integration/HistoryIntegrationTests.java @@ -13,15 +13,15 @@ import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.search.SearchHit; import org.elasticsearch.search.sort.SortBuilders; import org.elasticsearch.search.sort.SortOrder; -import org.elasticsearch.xpack.watcher.actions.ActionStatus; -import org.elasticsearch.xpack.watcher.client.WatchSourceBuilder; -import org.elasticsearch.xpack.watcher.input.Input; +import org.elasticsearch.xpack.core.watcher.actions.ActionStatus; +import org.elasticsearch.xpack.core.watcher.client.WatchSourceBuilder; +import org.elasticsearch.xpack.core.watcher.input.Input; +import org.elasticsearch.xpack.core.watcher.support.xcontent.XContentSource; +import org.elasticsearch.xpack.core.watcher.transport.actions.put.PutWatchResponse; +import org.elasticsearch.xpack.core.watcher.watch.WatchStatus; import org.elasticsearch.xpack.watcher.support.search.WatcherSearchTemplateRequest; -import org.elasticsearch.xpack.watcher.support.xcontent.XContentSource; import org.elasticsearch.xpack.watcher.test.AbstractWatcherIntegrationTestCase; -import org.elasticsearch.xpack.watcher.transport.actions.put.PutWatchResponse; import org.elasticsearch.xpack.watcher.trigger.schedule.IntervalSchedule; -import org.elasticsearch.xpack.watcher.watch.WatchStatus; import java.util.Locale; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/integration/HttpSecretsIntegrationTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/integration/HttpSecretsIntegrationTests.java index aed553f76c1..066854c113e 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/integration/HttpSecretsIntegrationTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/integration/HttpSecretsIntegrationTests.java @@ -11,22 +11,22 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.support.XContentMapValues; import org.elasticsearch.test.http.MockResponse; import org.elasticsearch.test.http.MockWebServer; -import org.elasticsearch.xpack.watcher.WatcherField; -import org.elasticsearch.xpack.watcher.client.WatcherClient; +import org.elasticsearch.xpack.core.watcher.WatcherField; +import org.elasticsearch.xpack.core.watcher.client.WatcherClient; +import org.elasticsearch.xpack.core.watcher.crypto.CryptoService; +import org.elasticsearch.xpack.core.watcher.crypto.CryptoServiceTests; +import org.elasticsearch.xpack.core.watcher.execution.ActionExecutionMode; +import org.elasticsearch.xpack.core.watcher.support.xcontent.XContentSource; +import org.elasticsearch.xpack.core.watcher.transport.actions.execute.ExecuteWatchResponse; +import org.elasticsearch.xpack.core.watcher.transport.actions.get.GetWatchResponse; +import org.elasticsearch.xpack.core.watcher.trigger.TriggerEvent; +import org.elasticsearch.xpack.core.watcher.watch.Watch; import org.elasticsearch.xpack.watcher.common.http.HttpRequestTemplate; import org.elasticsearch.xpack.watcher.common.http.auth.basic.ApplicableBasicAuth; import org.elasticsearch.xpack.watcher.common.http.auth.basic.BasicAuth; import org.elasticsearch.xpack.watcher.condition.InternalAlwaysCondition; -import org.elasticsearch.xpack.watcher.crypto.CryptoService; -import org.elasticsearch.xpack.watcher.crypto.CryptoServiceTests; -import org.elasticsearch.xpack.watcher.execution.ActionExecutionMode; -import org.elasticsearch.xpack.watcher.support.xcontent.XContentSource; import org.elasticsearch.xpack.watcher.test.AbstractWatcherIntegrationTestCase; -import org.elasticsearch.xpack.watcher.transport.actions.execute.ExecuteWatchResponse; -import org.elasticsearch.xpack.watcher.transport.actions.get.GetWatchResponse; -import org.elasticsearch.xpack.watcher.trigger.TriggerEvent; import org.elasticsearch.xpack.watcher.trigger.schedule.ScheduleTriggerEvent; -import org.elasticsearch.xpack.watcher.watch.Watch; import org.joda.time.DateTime; import org.junit.After; import org.junit.Before; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/integration/PagerDutyServiceTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/integration/PagerDutyServiceTests.java index 55a7bc54323..6682892a5d8 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/integration/PagerDutyServiceTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/integration/PagerDutyServiceTests.java @@ -8,6 +8,8 @@ package org.elasticsearch.xpack.watcher.test.integration; import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.test.junit.annotations.Network; +import org.elasticsearch.xpack.core.watcher.transport.actions.put.PutWatchResponse; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.actions.pagerduty.PagerDutyAction; import org.elasticsearch.xpack.watcher.condition.InternalAlwaysCondition; import org.elasticsearch.xpack.watcher.notification.pagerduty.IncidentEvent; @@ -16,8 +18,6 @@ import org.elasticsearch.xpack.watcher.notification.pagerduty.PagerDutyAccount; import org.elasticsearch.xpack.watcher.notification.pagerduty.PagerDutyService; import org.elasticsearch.xpack.watcher.notification.pagerduty.SentEvent; import org.elasticsearch.xpack.watcher.test.AbstractWatcherIntegrationTestCase; -import org.elasticsearch.xpack.watcher.transport.actions.put.PutWatchResponse; -import org.elasticsearch.xpack.watcher.watch.Payload; import static org.elasticsearch.index.query.QueryBuilders.boolQuery; import static org.elasticsearch.index.query.QueryBuilders.termQuery; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/integration/SearchInputTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/integration/SearchInputTests.java index ef3753dc06f..3cd908228cd 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/integration/SearchInputTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/integration/SearchInputTests.java @@ -30,16 +30,16 @@ import org.elasticsearch.search.builder.SearchSourceBuilder; import org.elasticsearch.search.internal.InternalSearchResponse; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.ThreadPool; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.input.Input; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.Watcher; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; -import org.elasticsearch.xpack.watcher.input.Input; import org.elasticsearch.xpack.watcher.input.search.ExecutableSearchInput; import org.elasticsearch.xpack.watcher.input.search.SearchInput; import org.elasticsearch.xpack.watcher.input.search.SearchInputFactory; import org.elasticsearch.xpack.watcher.support.search.WatcherSearchTemplateRequest; import org.elasticsearch.xpack.watcher.support.search.WatcherSearchTemplateService; import org.elasticsearch.xpack.watcher.test.WatcherTestUtils; -import org.elasticsearch.xpack.watcher.watch.Payload; import org.junit.Before; import org.mockito.ArgumentCaptor; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/integration/SlackServiceTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/integration/SlackServiceTests.java index 01b34fdd4a6..5457f75ec94 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/integration/SlackServiceTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/integration/SlackServiceTests.java @@ -12,6 +12,8 @@ import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.search.SearchHit; import org.elasticsearch.test.junit.annotations.Network; +import org.elasticsearch.xpack.core.watcher.support.xcontent.XContentSource; +import org.elasticsearch.xpack.core.watcher.transport.actions.put.PutWatchResponse; import org.elasticsearch.xpack.watcher.actions.slack.SlackAction; import org.elasticsearch.xpack.watcher.condition.InternalAlwaysCondition; import org.elasticsearch.xpack.watcher.notification.slack.SentMessages; @@ -20,9 +22,7 @@ import org.elasticsearch.xpack.watcher.notification.slack.SlackService; import org.elasticsearch.xpack.watcher.notification.slack.message.Action; import org.elasticsearch.xpack.watcher.notification.slack.message.Attachment; import org.elasticsearch.xpack.watcher.notification.slack.message.SlackMessage; -import org.elasticsearch.xpack.watcher.support.xcontent.XContentSource; import org.elasticsearch.xpack.watcher.test.AbstractWatcherIntegrationTestCase; -import org.elasticsearch.xpack.watcher.transport.actions.put.PutWatchResponse; import org.joda.time.DateTime; import java.util.Collections; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/integration/WatchAckTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/integration/WatchAckTests.java index ee3eefc1066..cab15b90b28 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/integration/WatchAckTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/integration/WatchAckTests.java @@ -15,18 +15,18 @@ import org.elasticsearch.action.support.WriteRequest; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.test.junit.annotations.TestLogging; -import org.elasticsearch.xpack.watcher.actions.ActionStatus; +import org.elasticsearch.xpack.core.watcher.actions.ActionStatus; +import org.elasticsearch.xpack.core.watcher.execution.ExecutionState; +import org.elasticsearch.xpack.core.watcher.history.HistoryStoreField; +import org.elasticsearch.xpack.core.watcher.history.WatchRecord; +import org.elasticsearch.xpack.core.watcher.transport.actions.ack.AckWatchRequestBuilder; +import org.elasticsearch.xpack.core.watcher.transport.actions.ack.AckWatchResponse; +import org.elasticsearch.xpack.core.watcher.transport.actions.get.GetWatchRequest; +import org.elasticsearch.xpack.core.watcher.transport.actions.get.GetWatchResponse; +import org.elasticsearch.xpack.core.watcher.transport.actions.put.PutWatchResponse; +import org.elasticsearch.xpack.core.watcher.watch.Watch; import org.elasticsearch.xpack.watcher.condition.CompareCondition; -import org.elasticsearch.xpack.watcher.execution.ExecutionState; -import org.elasticsearch.xpack.watcher.history.HistoryStoreField; -import org.elasticsearch.xpack.watcher.history.WatchRecord; import org.elasticsearch.xpack.watcher.test.AbstractWatcherIntegrationTestCase; -import org.elasticsearch.xpack.watcher.transport.actions.ack.AckWatchRequestBuilder; -import org.elasticsearch.xpack.watcher.transport.actions.ack.AckWatchResponse; -import org.elasticsearch.xpack.watcher.transport.actions.get.GetWatchRequest; -import org.elasticsearch.xpack.watcher.transport.actions.get.GetWatchResponse; -import org.elasticsearch.xpack.watcher.transport.actions.put.PutWatchResponse; -import org.elasticsearch.xpack.watcher.watch.Watch; import org.hamcrest.Matchers; import org.junit.Before; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/integration/WatchMetadataTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/integration/WatchMetadataTests.java index a1c4694ad68..87c10c97c8f 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/integration/WatchMetadataTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/integration/WatchMetadataTests.java @@ -7,17 +7,17 @@ package org.elasticsearch.xpack.watcher.test.integration; import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.common.unit.TimeValue; +import org.elasticsearch.xpack.core.watcher.execution.ActionExecutionMode; +import org.elasticsearch.xpack.core.watcher.history.HistoryStoreField; +import org.elasticsearch.xpack.core.watcher.support.xcontent.ObjectPath; +import org.elasticsearch.xpack.core.watcher.transport.actions.execute.ExecuteWatchResponse; +import org.elasticsearch.xpack.core.watcher.trigger.TriggerEvent; import org.elasticsearch.xpack.watcher.actions.logging.LoggingAction; import org.elasticsearch.xpack.watcher.actions.logging.LoggingLevel; import org.elasticsearch.xpack.watcher.common.text.TextTemplate; -import org.elasticsearch.xpack.watcher.condition.InternalAlwaysCondition; import org.elasticsearch.xpack.watcher.condition.CompareCondition; -import org.elasticsearch.xpack.watcher.execution.ActionExecutionMode; -import org.elasticsearch.xpack.watcher.history.HistoryStoreField; -import org.elasticsearch.xpack.watcher.support.xcontent.ObjectPath; +import org.elasticsearch.xpack.watcher.condition.InternalAlwaysCondition; import org.elasticsearch.xpack.watcher.test.AbstractWatcherIntegrationTestCase; -import org.elasticsearch.xpack.watcher.transport.actions.execute.ExecuteWatchResponse; -import org.elasticsearch.xpack.watcher.trigger.TriggerEvent; import org.elasticsearch.xpack.watcher.trigger.schedule.ScheduleTriggerEvent; import org.joda.time.DateTime; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/transform/TransformIntegrationTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/transform/TransformIntegrationTests.java index d2fe58536f9..ef5edc7a833 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/transform/TransformIntegrationTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/transform/TransformIntegrationTests.java @@ -15,10 +15,10 @@ import org.elasticsearch.script.MockScriptPlugin; import org.elasticsearch.script.Script; import org.elasticsearch.script.ScriptType; import org.elasticsearch.test.junit.annotations.TestLogging; +import org.elasticsearch.xpack.core.watcher.transport.actions.put.PutWatchResponse; import org.elasticsearch.xpack.watcher.condition.InternalAlwaysCondition; import org.elasticsearch.xpack.watcher.support.search.WatcherSearchTemplateRequest; import org.elasticsearch.xpack.watcher.test.AbstractWatcherIntegrationTestCase; -import org.elasticsearch.xpack.watcher.transport.actions.put.PutWatchResponse; import java.io.IOException; import java.io.UncheckedIOException; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/transform/chain/ChainTransformTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/transform/chain/ChainTransformTests.java index b57745d147b..f4e4a995926 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/transform/chain/ChainTransformTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/transform/chain/ChainTransformTests.java @@ -12,12 +12,15 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.json.JsonXContent; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; -import org.elasticsearch.xpack.watcher.transform.ExecutableTransform; -import org.elasticsearch.xpack.watcher.transform.Transform; -import org.elasticsearch.xpack.watcher.transform.TransformFactory; -import org.elasticsearch.xpack.watcher.transform.TransformRegistry; -import org.elasticsearch.xpack.watcher.watch.Payload; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.transform.ExecutableTransform; +import org.elasticsearch.xpack.core.watcher.transform.Transform; +import org.elasticsearch.xpack.core.watcher.transform.TransformFactory; +import org.elasticsearch.xpack.core.watcher.transform.TransformRegistry; +import org.elasticsearch.xpack.core.watcher.transform.chain.ChainTransform; +import org.elasticsearch.xpack.core.watcher.transform.chain.ChainTransformFactory; +import org.elasticsearch.xpack.core.watcher.transform.chain.ExecutableChainTransform; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import java.io.IOException; import java.util.ArrayList; @@ -159,7 +162,7 @@ public class ChainTransformTests extends ESTestCase { return new Result("named", new Payload.Simple(data)); } - public static class Transform implements org.elasticsearch.xpack.watcher.transform.Transform { + public static class Transform implements org.elasticsearch.xpack.core.watcher.transform.Transform { private final String name; @@ -236,7 +239,7 @@ public class ChainTransformTests extends ESTestCase { return new Result(TYPE); } - public static class Transform implements org.elasticsearch.xpack.watcher.transform.Transform { + public static class Transform implements org.elasticsearch.xpack.core.watcher.transform.Transform { @Override public String type() { return TYPE; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/transform/script/ScriptTransformTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/transform/script/ScriptTransformTests.java index 16578d86927..bc79561f726 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/transform/script/ScriptTransformTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/transform/script/ScriptTransformTests.java @@ -16,11 +16,11 @@ import org.elasticsearch.script.ScriptModule; import org.elasticsearch.script.ScriptService; import org.elasticsearch.script.ScriptType; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext; +import org.elasticsearch.xpack.core.watcher.transform.Transform; +import org.elasticsearch.xpack.core.watcher.watch.Payload; import org.elasticsearch.xpack.watcher.Watcher; -import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; import org.elasticsearch.xpack.watcher.support.Variables; -import org.elasticsearch.xpack.watcher.transform.Transform; -import org.elasticsearch.xpack.watcher.watch.Payload; import java.util.Collections; import java.util.HashMap; @@ -30,7 +30,7 @@ import static java.util.Collections.emptyMap; import static java.util.Collections.singleton; import static java.util.Collections.singletonMap; import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.xpack.watcher.support.Exceptions.illegalArgument; +import static org.elasticsearch.xpack.core.watcher.support.Exceptions.illegalArgument; import static org.elasticsearch.xpack.watcher.test.WatcherTestUtils.mockExecutionContext; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/transport/action/WatchRequestValidationTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/transport/action/WatchRequestValidationTests.java index f34444993d6..893e493bd15 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/transport/action/WatchRequestValidationTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/transport/action/WatchRequestValidationTests.java @@ -10,13 +10,13 @@ import org.elasticsearch.common.bytes.BytesArray; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.watcher.execution.ActionExecutionMode; -import org.elasticsearch.xpack.watcher.transport.actions.ack.AckWatchRequest; -import org.elasticsearch.xpack.watcher.transport.actions.activate.ActivateWatchRequest; -import org.elasticsearch.xpack.watcher.transport.actions.delete.DeleteWatchRequest; -import org.elasticsearch.xpack.watcher.transport.actions.execute.ExecuteWatchRequest; -import org.elasticsearch.xpack.watcher.transport.actions.get.GetWatchRequest; -import org.elasticsearch.xpack.watcher.transport.actions.put.PutWatchRequest; +import org.elasticsearch.xpack.core.watcher.execution.ActionExecutionMode; +import org.elasticsearch.xpack.core.watcher.transport.actions.ack.AckWatchRequest; +import org.elasticsearch.xpack.core.watcher.transport.actions.activate.ActivateWatchRequest; +import org.elasticsearch.xpack.core.watcher.transport.actions.delete.DeleteWatchRequest; +import org.elasticsearch.xpack.core.watcher.transport.actions.execute.ExecuteWatchRequest; +import org.elasticsearch.xpack.core.watcher.transport.actions.get.GetWatchRequest; +import org.elasticsearch.xpack.core.watcher.transport.actions.put.PutWatchRequest; import static org.hamcrest.Matchers.hasItem; import static org.hamcrest.Matchers.is; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/transport/action/activate/ActivateWatchTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/transport/action/activate/ActivateWatchTests.java index da31c19a483..879b50bd2eb 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/transport/action/activate/ActivateWatchTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/transport/action/activate/ActivateWatchTests.java @@ -15,14 +15,14 @@ import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.test.junit.annotations.TestLogging; -import org.elasticsearch.xpack.watcher.client.WatcherClient; -import org.elasticsearch.xpack.watcher.execution.ExecutionState; -import org.elasticsearch.xpack.watcher.support.xcontent.XContentSource; +import org.elasticsearch.xpack.core.watcher.client.WatcherClient; +import org.elasticsearch.xpack.core.watcher.execution.ExecutionState; +import org.elasticsearch.xpack.core.watcher.support.xcontent.XContentSource; +import org.elasticsearch.xpack.core.watcher.transport.actions.activate.ActivateWatchResponse; +import org.elasticsearch.xpack.core.watcher.transport.actions.get.GetWatchResponse; +import org.elasticsearch.xpack.core.watcher.transport.actions.put.PutWatchResponse; +import org.elasticsearch.xpack.core.watcher.transport.actions.stats.WatcherStatsResponse; import org.elasticsearch.xpack.watcher.test.AbstractWatcherIntegrationTestCase; -import org.elasticsearch.xpack.watcher.transport.actions.activate.ActivateWatchResponse; -import org.elasticsearch.xpack.watcher.transport.actions.get.GetWatchResponse; -import org.elasticsearch.xpack.watcher.transport.actions.put.PutWatchResponse; -import org.elasticsearch.xpack.watcher.transport.actions.stats.WatcherStatsResponse; import java.util.List; import java.util.Set; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/transport/action/delete/DeleteWatchTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/transport/action/delete/DeleteWatchTests.java index 9bb3459623c..e30d0cf429d 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/transport/action/delete/DeleteWatchTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/transport/action/delete/DeleteWatchTests.java @@ -10,15 +10,14 @@ import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.test.http.MockResponse; import org.elasticsearch.test.http.MockWebServer; +import org.elasticsearch.xpack.core.watcher.history.HistoryStoreField; +import org.elasticsearch.xpack.core.watcher.support.xcontent.ObjectPath; +import org.elasticsearch.xpack.core.watcher.transport.actions.delete.DeleteWatchResponse; +import org.elasticsearch.xpack.core.watcher.transport.actions.execute.ExecuteWatchResponse; +import org.elasticsearch.xpack.core.watcher.transport.actions.get.GetWatchResponse; +import org.elasticsearch.xpack.core.watcher.transport.actions.put.PutWatchResponse; import org.elasticsearch.xpack.watcher.common.http.HttpRequestTemplate; -import org.elasticsearch.xpack.watcher.history.HistoryStore; -import org.elasticsearch.xpack.watcher.history.HistoryStoreField; -import org.elasticsearch.xpack.watcher.support.xcontent.ObjectPath; import org.elasticsearch.xpack.watcher.test.AbstractWatcherIntegrationTestCase; -import org.elasticsearch.xpack.watcher.transport.actions.delete.DeleteWatchResponse; -import org.elasticsearch.xpack.watcher.transport.actions.execute.ExecuteWatchResponse; -import org.elasticsearch.xpack.watcher.transport.actions.get.GetWatchResponse; -import org.elasticsearch.xpack.watcher.transport.actions.put.PutWatchResponse; import java.util.Map; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/transport/action/execute/ExecuteWatchRequestTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/transport/action/execute/ExecuteWatchRequestTests.java index 6c4f03bddec..8083374e44a 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/transport/action/execute/ExecuteWatchRequestTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/transport/action/execute/ExecuteWatchRequestTests.java @@ -10,7 +10,7 @@ import org.elasticsearch.common.io.stream.BytesStreamOutput; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.watcher.transport.actions.execute.ExecuteWatchRequest; +import org.elasticsearch.xpack.core.watcher.transport.actions.execute.ExecuteWatchRequest; import java.io.IOException; import java.nio.charset.StandardCharsets; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/transport/action/execute/ExecuteWatchTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/transport/action/execute/ExecuteWatchTests.java index 655430bf623..c307764c29f 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/transport/action/execute/ExecuteWatchTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/transport/action/execute/ExecuteWatchTests.java @@ -6,18 +6,18 @@ package org.elasticsearch.xpack.watcher.transport.action.execute; import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.xpack.watcher.actions.ActionStatus; -import org.elasticsearch.xpack.watcher.client.WatcherClient; +import org.elasticsearch.xpack.core.watcher.actions.ActionStatus; +import org.elasticsearch.xpack.core.watcher.client.WatcherClient; +import org.elasticsearch.xpack.core.watcher.execution.ActionExecutionMode; +import org.elasticsearch.xpack.core.watcher.execution.Wid; +import org.elasticsearch.xpack.core.watcher.support.xcontent.XContentSource; +import org.elasticsearch.xpack.core.watcher.transport.actions.ack.AckWatchRequestBuilder; +import org.elasticsearch.xpack.core.watcher.transport.actions.ack.AckWatchResponse; +import org.elasticsearch.xpack.core.watcher.transport.actions.execute.ExecuteWatchResponse; +import org.elasticsearch.xpack.core.watcher.transport.actions.put.PutWatchResponse; +import org.elasticsearch.xpack.core.watcher.watch.WatchStatus; import org.elasticsearch.xpack.watcher.condition.InternalAlwaysCondition; -import org.elasticsearch.xpack.watcher.execution.ActionExecutionMode; -import org.elasticsearch.xpack.watcher.execution.Wid; -import org.elasticsearch.xpack.watcher.support.xcontent.XContentSource; import org.elasticsearch.xpack.watcher.test.AbstractWatcherIntegrationTestCase; -import org.elasticsearch.xpack.watcher.transport.actions.ack.AckWatchRequestBuilder; -import org.elasticsearch.xpack.watcher.transport.actions.ack.AckWatchResponse; -import org.elasticsearch.xpack.watcher.transport.actions.execute.ExecuteWatchResponse; -import org.elasticsearch.xpack.watcher.transport.actions.put.PutWatchResponse; -import org.elasticsearch.xpack.watcher.watch.WatchStatus; import static org.elasticsearch.xpack.watcher.actions.ActionBuilders.loggingAction; import static org.elasticsearch.xpack.watcher.client.WatchSourceBuilders.watchBuilder; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/transport/action/get/GetWatchTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/transport/action/get/GetWatchTests.java index 0477c6ca7ce..62c64364baa 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/transport/action/get/GetWatchTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/transport/action/get/GetWatchTests.java @@ -7,13 +7,13 @@ package org.elasticsearch.xpack.watcher.transport.action.get; import org.elasticsearch.action.admin.indices.get.GetIndexResponse; import org.elasticsearch.index.IndexNotFoundException; +import org.elasticsearch.xpack.core.watcher.support.xcontent.XContentSource; +import org.elasticsearch.xpack.core.watcher.transport.actions.get.GetWatchRequest; +import org.elasticsearch.xpack.core.watcher.transport.actions.get.GetWatchResponse; +import org.elasticsearch.xpack.core.watcher.transport.actions.put.PutWatchResponse; +import org.elasticsearch.xpack.core.watcher.watch.Watch; import org.elasticsearch.xpack.watcher.condition.InternalAlwaysCondition; -import org.elasticsearch.xpack.watcher.support.xcontent.XContentSource; import org.elasticsearch.xpack.watcher.test.AbstractWatcherIntegrationTestCase; -import org.elasticsearch.xpack.watcher.transport.actions.get.GetWatchRequest; -import org.elasticsearch.xpack.watcher.transport.actions.get.GetWatchResponse; -import org.elasticsearch.xpack.watcher.transport.actions.put.PutWatchResponse; -import org.elasticsearch.xpack.watcher.watch.Watch; import java.util.Map; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/transport/action/put/PutWatchSerializationTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/transport/action/put/PutWatchSerializationTests.java index 01d451594ec..f087e2b7501 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/transport/action/put/PutWatchSerializationTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/transport/action/put/PutWatchSerializationTests.java @@ -7,11 +7,10 @@ package org.elasticsearch.xpack.watcher.transport.action.put; import org.elasticsearch.common.bytes.BytesArray; import org.elasticsearch.common.io.stream.BytesStreamOutput; -import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.common.xcontent.json.JsonXContent; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.watcher.transport.actions.put.PutWatchRequest; +import org.elasticsearch.xpack.core.watcher.transport.actions.put.PutWatchRequest; import static org.hamcrest.Matchers.is; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/transport/actions/put/TransportPutWatchActionTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/transport/actions/put/TransportPutWatchActionTests.java index d65ac4c39a0..a2c7818c3b0 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/transport/actions/put/TransportPutWatchActionTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/transport/actions/put/TransportPutWatchActionTests.java @@ -19,11 +19,12 @@ import org.elasticsearch.license.XPackLicenseState; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; +import org.elasticsearch.xpack.core.watcher.transport.actions.put.PutWatchRequest; +import org.elasticsearch.xpack.core.watcher.watch.ClockMock; +import org.elasticsearch.xpack.core.watcher.watch.Watch; import org.elasticsearch.xpack.watcher.Watcher; import org.elasticsearch.xpack.watcher.test.WatchExecutionContextMockBuilder; -import org.elasticsearch.xpack.watcher.watch.Watch; import org.elasticsearch.xpack.watcher.watch.WatchParser; -import org.elasticsearch.xpack.watcher.watch.clock.ClockMock; import org.junit.Before; import org.mockito.ArgumentCaptor; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/trigger/ScheduleTriggerEngineMock.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/trigger/ScheduleTriggerEngineMock.java index 625192a8ea8..d74d7bea0c7 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/trigger/ScheduleTriggerEngineMock.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/trigger/ScheduleTriggerEngineMock.java @@ -10,12 +10,12 @@ import org.elasticsearch.common.logging.ServerLoggers; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.xpack.watcher.watch.clock.ClockMock; +import org.elasticsearch.xpack.core.watcher.watch.ClockMock; +import org.elasticsearch.xpack.core.watcher.watch.Watch; import org.elasticsearch.xpack.watcher.trigger.schedule.ScheduleRegistry; import org.elasticsearch.xpack.watcher.trigger.schedule.ScheduleTrigger; import org.elasticsearch.xpack.watcher.trigger.schedule.ScheduleTriggerEngine; import org.elasticsearch.xpack.watcher.trigger.schedule.ScheduleTriggerEvent; -import org.elasticsearch.xpack.watcher.watch.Watch; import org.joda.time.DateTime; import java.io.IOException; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/engine/TickerScheduleEngineTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/engine/TickerScheduleEngineTests.java index de8b498aa0e..96608817a0b 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/engine/TickerScheduleEngineTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/engine/TickerScheduleEngineTests.java @@ -7,17 +7,17 @@ package org.elasticsearch.xpack.watcher.trigger.schedule.engine; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.watcher.watch.clock.ClockMock; +import org.elasticsearch.xpack.core.watcher.trigger.TriggerEvent; +import org.elasticsearch.xpack.core.watcher.watch.ClockMock; +import org.elasticsearch.xpack.core.watcher.watch.Watch; import org.elasticsearch.xpack.watcher.condition.InternalAlwaysCondition; import org.elasticsearch.xpack.watcher.input.none.ExecutableNoneInput; import org.elasticsearch.xpack.watcher.trigger.TriggerEngine; -import org.elasticsearch.xpack.watcher.trigger.TriggerEvent; import org.elasticsearch.xpack.watcher.trigger.schedule.Schedule; import org.elasticsearch.xpack.watcher.trigger.schedule.ScheduleRegistry; import org.elasticsearch.xpack.watcher.trigger.schedule.ScheduleTrigger; import org.elasticsearch.xpack.watcher.trigger.schedule.support.DayOfWeek; import org.elasticsearch.xpack.watcher.trigger.schedule.support.WeekTimes; -import org.elasticsearch.xpack.watcher.watch.Watch; import org.joda.time.DateTime; import org.junit.After; import org.junit.Before; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/watch/WatchStatusIntegrationTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/watch/WatchStatusIntegrationTests.java index 9d5dfdc0856..9f738d8daa6 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/watch/WatchStatusIntegrationTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/watch/WatchStatusIntegrationTests.java @@ -7,11 +7,11 @@ package org.elasticsearch.xpack.watcher.watch; import org.elasticsearch.action.get.GetResponse; import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.xpack.watcher.client.WatcherClient; +import org.elasticsearch.xpack.core.watcher.client.WatcherClient; +import org.elasticsearch.xpack.core.watcher.support.xcontent.XContentSource; +import org.elasticsearch.xpack.core.watcher.transport.actions.get.GetWatchResponse; import org.elasticsearch.xpack.watcher.condition.NeverCondition; -import org.elasticsearch.xpack.watcher.support.xcontent.XContentSource; import org.elasticsearch.xpack.watcher.test.AbstractWatcherIntegrationTestCase; -import org.elasticsearch.xpack.watcher.transport.actions.get.GetWatchResponse; import static org.elasticsearch.xpack.watcher.actions.ActionBuilders.loggingAction; import static org.elasticsearch.xpack.watcher.client.WatchSourceBuilders.watchBuilder; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/watch/WatchStatusTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/watch/WatchStatusTests.java index 6230b7946e8..1a8263c0c33 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/watch/WatchStatusTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/watch/WatchStatusTests.java @@ -11,10 +11,11 @@ import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.watcher.actions.ActionStatus; -import org.elasticsearch.xpack.watcher.actions.ActionStatus.AckStatus.State; +import org.elasticsearch.xpack.core.watcher.actions.ActionStatus; +import org.elasticsearch.xpack.core.watcher.actions.ActionStatus.AckStatus.State; +import org.elasticsearch.xpack.core.watcher.support.xcontent.WatcherParams; +import org.elasticsearch.xpack.core.watcher.watch.WatchStatus; import org.elasticsearch.xpack.watcher.actions.logging.LoggingAction; -import org.elasticsearch.xpack.watcher.support.xcontent.WatcherParams; import java.io.IOException; import java.util.Collections; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/watch/WatchTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/watch/WatchTests.java index 5f1538f1704..43c2aacf2e4 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/watch/WatchTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/watch/WatchTests.java @@ -26,10 +26,26 @@ import org.elasticsearch.license.XPackLicenseState; import org.elasticsearch.script.Script; import org.elasticsearch.script.ScriptService; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.watcher.actions.ActionFactory; -import org.elasticsearch.xpack.watcher.actions.ActionRegistry; -import org.elasticsearch.xpack.watcher.actions.ActionStatus; -import org.elasticsearch.xpack.watcher.actions.ActionWrapper; +import org.elasticsearch.xpack.core.watcher.actions.ActionFactory; +import org.elasticsearch.xpack.core.watcher.actions.ActionRegistry; +import org.elasticsearch.xpack.core.watcher.actions.ActionStatus; +import org.elasticsearch.xpack.core.watcher.actions.ActionWrapper; +import org.elasticsearch.xpack.core.watcher.actions.throttler.ActionThrottler; +import org.elasticsearch.xpack.core.watcher.condition.ConditionFactory; +import org.elasticsearch.xpack.core.watcher.condition.ConditionRegistry; +import org.elasticsearch.xpack.core.watcher.condition.ExecutableCondition; +import org.elasticsearch.xpack.core.watcher.input.ExecutableInput; +import org.elasticsearch.xpack.core.watcher.input.none.NoneInput; +import org.elasticsearch.xpack.core.watcher.transform.ExecutableTransform; +import org.elasticsearch.xpack.core.watcher.transform.TransformFactory; +import org.elasticsearch.xpack.core.watcher.transform.TransformRegistry; +import org.elasticsearch.xpack.core.watcher.transform.chain.ChainTransform; +import org.elasticsearch.xpack.core.watcher.transform.chain.ExecutableChainTransform; +import org.elasticsearch.xpack.core.watcher.trigger.Trigger; +import org.elasticsearch.xpack.core.watcher.watch.ClockMock; +import org.elasticsearch.xpack.core.watcher.watch.Watch; +import org.elasticsearch.xpack.core.watcher.watch.WatchField; +import org.elasticsearch.xpack.core.watcher.watch.WatchStatus; import org.elasticsearch.xpack.watcher.actions.email.EmailAction; import org.elasticsearch.xpack.watcher.actions.email.EmailActionFactory; import org.elasticsearch.xpack.watcher.actions.email.ExecutableEmailAction; @@ -39,7 +55,6 @@ import org.elasticsearch.xpack.watcher.actions.index.IndexActionFactory; import org.elasticsearch.xpack.watcher.actions.logging.ExecutableLoggingAction; import org.elasticsearch.xpack.watcher.actions.logging.LoggingAction; import org.elasticsearch.xpack.watcher.actions.logging.LoggingActionFactory; -import org.elasticsearch.xpack.watcher.actions.throttler.ActionThrottler; import org.elasticsearch.xpack.watcher.actions.webhook.ExecutableWebhookAction; import org.elasticsearch.xpack.watcher.actions.webhook.WebhookAction; import org.elasticsearch.xpack.watcher.actions.webhook.WebhookActionFactory; @@ -50,21 +65,16 @@ import org.elasticsearch.xpack.watcher.common.http.auth.HttpAuthRegistry; import org.elasticsearch.xpack.watcher.common.http.auth.basic.BasicAuthFactory; import org.elasticsearch.xpack.watcher.common.text.TextTemplate; import org.elasticsearch.xpack.watcher.common.text.TextTemplateEngine; -import org.elasticsearch.xpack.watcher.condition.InternalAlwaysCondition; import org.elasticsearch.xpack.watcher.condition.AlwaysConditionTests; import org.elasticsearch.xpack.watcher.condition.ArrayCompareCondition; import org.elasticsearch.xpack.watcher.condition.CompareCondition; -import org.elasticsearch.xpack.watcher.condition.ConditionFactory; -import org.elasticsearch.xpack.watcher.condition.ConditionRegistry; -import org.elasticsearch.xpack.watcher.condition.ExecutableCondition; +import org.elasticsearch.xpack.watcher.condition.InternalAlwaysCondition; import org.elasticsearch.xpack.watcher.condition.NeverCondition; import org.elasticsearch.xpack.watcher.condition.ScriptCondition; -import org.elasticsearch.xpack.watcher.input.ExecutableInput; import org.elasticsearch.xpack.watcher.input.InputBuilders; import org.elasticsearch.xpack.watcher.input.InputFactory; import org.elasticsearch.xpack.watcher.input.InputRegistry; import org.elasticsearch.xpack.watcher.input.none.ExecutableNoneInput; -import org.elasticsearch.xpack.watcher.input.none.NoneInput; import org.elasticsearch.xpack.watcher.input.search.ExecutableSearchInput; import org.elasticsearch.xpack.watcher.input.search.SearchInput; import org.elasticsearch.xpack.watcher.input.search.SearchInputFactory; @@ -82,18 +92,12 @@ import org.elasticsearch.xpack.watcher.support.search.WatcherSearchTemplateReque import org.elasticsearch.xpack.watcher.support.search.WatcherSearchTemplateService; import org.elasticsearch.xpack.watcher.test.MockTextTemplateEngine; import org.elasticsearch.xpack.watcher.test.WatcherTestUtils; -import org.elasticsearch.xpack.watcher.transform.ExecutableTransform; -import org.elasticsearch.xpack.watcher.transform.TransformFactory; -import org.elasticsearch.xpack.watcher.transform.TransformRegistry; -import org.elasticsearch.xpack.watcher.transform.chain.ChainTransform; -import org.elasticsearch.xpack.watcher.transform.chain.ExecutableChainTransform; import org.elasticsearch.xpack.watcher.transform.script.ExecutableScriptTransform; import org.elasticsearch.xpack.watcher.transform.script.ScriptTransform; import org.elasticsearch.xpack.watcher.transform.script.ScriptTransformFactory; import org.elasticsearch.xpack.watcher.transform.search.ExecutableSearchTransform; import org.elasticsearch.xpack.watcher.transform.search.SearchTransform; import org.elasticsearch.xpack.watcher.transform.search.SearchTransformFactory; -import org.elasticsearch.xpack.watcher.trigger.Trigger; import org.elasticsearch.xpack.watcher.trigger.TriggerEngine; import org.elasticsearch.xpack.watcher.trigger.TriggerService; import org.elasticsearch.xpack.watcher.trigger.schedule.CronSchedule; @@ -112,7 +116,6 @@ import org.elasticsearch.xpack.watcher.trigger.schedule.support.Month; import org.elasticsearch.xpack.watcher.trigger.schedule.support.MonthTimes; import org.elasticsearch.xpack.watcher.trigger.schedule.support.WeekTimes; import org.elasticsearch.xpack.watcher.trigger.schedule.support.YearTimes; -import org.elasticsearch.xpack.watcher.watch.clock.ClockMock; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.junit.Before; diff --git a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/watch/clock/ClockTests.java b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/watch/clock/ClockTests.java index d1b7d17830a..d9f57e28b48 100644 --- a/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/watch/clock/ClockTests.java +++ b/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/watch/clock/ClockTests.java @@ -6,6 +6,7 @@ package org.elasticsearch.xpack.watcher.watch.clock; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.watcher.watch.ClockMock; import org.joda.time.DateTime; import java.time.Clock; diff --git a/qa/audit-tests/src/test/java/org/elasticsearch/xpack/security/audit/IndexAuditIT.java b/qa/audit-tests/src/test/java/org/elasticsearch/xpack/security/audit/IndexAuditIT.java index e39527ffacd..86bc2f57c15 100644 --- a/qa/audit-tests/src/test/java/org/elasticsearch/xpack/security/audit/IndexAuditIT.java +++ b/qa/audit-tests/src/test/java/org/elasticsearch/xpack/security/audit/IndexAuditIT.java @@ -19,10 +19,10 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.plugins.Plugin; import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.xpack.XPackClientPlugin; -import org.elasticsearch.xpack.security.SecurityField; +import org.elasticsearch.xpack.core.XPackClientPlugin; +import org.elasticsearch.xpack.core.security.SecurityField; import org.elasticsearch.xpack.security.audit.index.IndexAuditTrail; -import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken; +import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; import java.util.Arrays; import java.util.Collection; diff --git a/qa/core-rest-tests-with-security/src/test/java/org/elasticsearch/xpack/security/CoreWithSecurityClientYamlTestSuiteIT.java b/qa/core-rest-tests-with-security/src/test/java/org/elasticsearch/xpack/security/CoreWithSecurityClientYamlTestSuiteIT.java index fd7d5b3c418..89ebc2db0ee 100644 --- a/qa/core-rest-tests-with-security/src/test/java/org/elasticsearch/xpack/security/CoreWithSecurityClientYamlTestSuiteIT.java +++ b/qa/core-rest-tests-with-security/src/test/java/org/elasticsearch/xpack/security/CoreWithSecurityClientYamlTestSuiteIT.java @@ -16,7 +16,7 @@ import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate; import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; @TimeoutSuite(millis = 30 * TimeUnits.MINUTE) // as default timeout seems not enough on the jenkins VMs public class CoreWithSecurityClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase { diff --git a/qa/full-cluster-restart/src/test/java/org/elasticsearch/xpack/restart/FullClusterRestartIT.java b/qa/full-cluster-restart/src/test/java/org/elasticsearch/xpack/restart/FullClusterRestartIT.java index ca2383a8008..e2f8da8debc 100644 --- a/qa/full-cluster-restart/src/test/java/org/elasticsearch/xpack/restart/FullClusterRestartIT.java +++ b/qa/full-cluster-restart/src/test/java/org/elasticsearch/xpack/restart/FullClusterRestartIT.java @@ -19,14 +19,14 @@ import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.common.xcontent.json.JsonXContent; import org.elasticsearch.test.StreamsUtils; import org.elasticsearch.test.rest.ESRestTestCase; -import org.elasticsearch.xpack.watcher.common.text.TextTemplate; -import org.elasticsearch.xpack.monitoring.exporter.MonitoringTemplateUtils; +import org.elasticsearch.xpack.core.monitoring.exporter.MonitoringTemplateUtils; +import org.elasticsearch.xpack.core.watcher.client.WatchSourceBuilder; +import org.elasticsearch.xpack.core.watcher.support.xcontent.ObjectPath; import org.elasticsearch.xpack.security.support.IndexLifecycleManager; import org.elasticsearch.xpack.test.rest.XPackRestTestHelper; import org.elasticsearch.xpack.watcher.actions.logging.LoggingAction; -import org.elasticsearch.xpack.watcher.client.WatchSourceBuilder; +import org.elasticsearch.xpack.watcher.common.text.TextTemplate; import org.elasticsearch.xpack.watcher.condition.InternalAlwaysCondition; -import org.elasticsearch.xpack.watcher.support.xcontent.ObjectPath; import org.elasticsearch.xpack.watcher.trigger.schedule.IntervalSchedule; import org.elasticsearch.xpack.watcher.trigger.schedule.ScheduleTrigger; import org.junit.Before; diff --git a/qa/multi-cluster-search-security/src/test/java/org/elasticsearch/xpack/security/MultiClusterSearchWithSecurityYamlTestSuiteIT.java b/qa/multi-cluster-search-security/src/test/java/org/elasticsearch/xpack/security/MultiClusterSearchWithSecurityYamlTestSuiteIT.java index 78e7b26f5ba..e61ff9062d1 100644 --- a/qa/multi-cluster-search-security/src/test/java/org/elasticsearch/xpack/security/MultiClusterSearchWithSecurityYamlTestSuiteIT.java +++ b/qa/multi-cluster-search-security/src/test/java/org/elasticsearch/xpack/security/MultiClusterSearchWithSecurityYamlTestSuiteIT.java @@ -14,7 +14,7 @@ import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate; import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; public class MultiClusterSearchWithSecurityYamlTestSuiteIT extends ESClientYamlSuiteTestCase { diff --git a/qa/multi-node/src/test/java/org/elasticsearch/multi_node/GlobalCheckpointSyncActionIT.java b/qa/multi-node/src/test/java/org/elasticsearch/multi_node/GlobalCheckpointSyncActionIT.java index 2ec2e3b410e..0dfd322b107 100644 --- a/qa/multi-node/src/test/java/org/elasticsearch/multi_node/GlobalCheckpointSyncActionIT.java +++ b/qa/multi-node/src/test/java/org/elasticsearch/multi_node/GlobalCheckpointSyncActionIT.java @@ -20,7 +20,7 @@ import java.util.HashMap; import java.util.Map; import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; import static org.hamcrest.Matchers.equalTo; public class GlobalCheckpointSyncActionIT extends ESRestTestCase { diff --git a/qa/openldap-tests/src/test/java/org/elasticsearch/test/OpenLdapTests.java b/qa/openldap-tests/src/test/java/org/elasticsearch/test/OpenLdapTests.java index 10c7dbf32e7..b07324e09df 100644 --- a/qa/openldap-tests/src/test/java/org/elasticsearch/test/OpenLdapTests.java +++ b/qa/openldap-tests/src/test/java/org/elasticsearch/test/OpenLdapTests.java @@ -5,11 +5,6 @@ */ package org.elasticsearch.test; -import java.nio.file.Path; -import java.util.List; -import java.util.Map; -import java.util.concurrent.ExecutionException; - import com.unboundid.ldap.sdk.LDAPConnection; import com.unboundid.ldap.sdk.LDAPException; import org.elasticsearch.action.support.PlainActionFuture; @@ -23,20 +18,25 @@ import org.elasticsearch.env.Environment; import org.elasticsearch.env.TestEnvironment; import org.elasticsearch.threadpool.TestThreadPool; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.xpack.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.ldap.support.LdapSearchScope; +import org.elasticsearch.xpack.core.security.authc.ldap.support.SessionFactorySettings; +import org.elasticsearch.xpack.core.ssl.SSLService; +import org.elasticsearch.xpack.core.ssl.VerificationMode; import org.elasticsearch.xpack.security.authc.ldap.LdapSessionFactory; import org.elasticsearch.xpack.security.authc.ldap.LdapTestUtils; import org.elasticsearch.xpack.security.authc.ldap.support.LdapMetaDataResolver; -import org.elasticsearch.xpack.security.authc.ldap.support.LdapSearchScope; import org.elasticsearch.xpack.security.authc.ldap.support.LdapSession; import org.elasticsearch.xpack.security.authc.ldap.support.LdapTestCase; import org.elasticsearch.xpack.security.authc.ldap.support.SessionFactory; -import org.elasticsearch.xpack.security.authc.ldap.support.SessionFactorySettings; -import org.elasticsearch.xpack.ssl.SSLService; -import org.elasticsearch.xpack.ssl.VerificationMode; import org.junit.After; import org.junit.Before; +import java.nio.file.Path; +import java.util.List; +import java.util.Map; +import java.util.concurrent.ExecutionException; + import static org.hamcrest.Matchers.anyOf; import static org.hamcrest.Matchers.contains; import static org.hamcrest.Matchers.containsString; diff --git a/qa/openldap-tests/src/test/java/org/elasticsearch/xpack/security/authc/ldap/OpenLdapUserSearchSessionFactoryTests.java b/qa/openldap-tests/src/test/java/org/elasticsearch/xpack/security/authc/ldap/OpenLdapUserSearchSessionFactoryTests.java index e58b0be99c4..b14cd6eeb77 100644 --- a/qa/openldap-tests/src/test/java/org/elasticsearch/xpack/security/authc/ldap/OpenLdapUserSearchSessionFactoryTests.java +++ b/qa/openldap-tests/src/test/java/org/elasticsearch/xpack/security/authc/ldap/OpenLdapUserSearchSessionFactoryTests.java @@ -16,12 +16,12 @@ import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.OpenLdapTests; import org.elasticsearch.threadpool.TestThreadPool; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.xpack.security.authc.RealmConfig; -import org.elasticsearch.xpack.security.authc.ldap.support.LdapSearchScope; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.ldap.support.LdapSearchScope; +import org.elasticsearch.xpack.core.ssl.SSLService; import org.elasticsearch.xpack.security.authc.ldap.support.LdapSession; import org.elasticsearch.xpack.security.authc.ldap.support.LdapTestCase; import org.elasticsearch.xpack.security.authc.ldap.support.SessionFactory; -import org.elasticsearch.xpack.ssl.SSLService; import org.junit.After; import org.junit.Before; diff --git a/qa/openldap-tests/src/test/java/org/elasticsearch/xpack/security/authc/ldap/SearchGroupsResolverTests.java b/qa/openldap-tests/src/test/java/org/elasticsearch/xpack/security/authc/ldap/SearchGroupsResolverTests.java index 129ebb7ce0d..4ebeec779a2 100644 --- a/qa/openldap-tests/src/test/java/org/elasticsearch/xpack/security/authc/ldap/SearchGroupsResolverTests.java +++ b/qa/openldap-tests/src/test/java/org/elasticsearch/xpack/security/authc/ldap/SearchGroupsResolverTests.java @@ -9,8 +9,8 @@ import org.elasticsearch.action.support.PlainActionFuture; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.test.OpenLdapTests; -import org.elasticsearch.xpack.security.authc.ldap.support.LdapSearchScope; -import org.elasticsearch.xpack.security.support.NoOpLogger; +import org.elasticsearch.xpack.core.security.authc.ldap.support.LdapSearchScope; +import org.elasticsearch.xpack.core.security.support.NoOpLogger; import java.util.List; diff --git a/qa/reindex-tests-with-security/src/test/java/org/elasticsearch/xpack/security/ReindexWithSecurityClientYamlTestSuiteIT.java b/qa/reindex-tests-with-security/src/test/java/org/elasticsearch/xpack/security/ReindexWithSecurityClientYamlTestSuiteIT.java index 096bacba11b..67ebf16f426 100644 --- a/qa/reindex-tests-with-security/src/test/java/org/elasticsearch/xpack/security/ReindexWithSecurityClientYamlTestSuiteIT.java +++ b/qa/reindex-tests-with-security/src/test/java/org/elasticsearch/xpack/security/ReindexWithSecurityClientYamlTestSuiteIT.java @@ -14,7 +14,7 @@ import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate; import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; public class ReindexWithSecurityClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase { private static final String USER = "test_admin"; diff --git a/qa/reindex-tests-with-security/src/test/java/org/elasticsearch/xpack/security/ReindexWithSecurityIT.java b/qa/reindex-tests-with-security/src/test/java/org/elasticsearch/xpack/security/ReindexWithSecurityIT.java index 5da824d388a..72c196ab70d 100644 --- a/qa/reindex-tests-with-security/src/test/java/org/elasticsearch/xpack/security/ReindexWithSecurityIT.java +++ b/qa/reindex-tests-with-security/src/test/java/org/elasticsearch/xpack/security/ReindexWithSecurityIT.java @@ -14,15 +14,11 @@ import org.elasticsearch.index.IndexNotFoundException; import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.index.reindex.DeleteByQueryAction; import org.elasticsearch.index.reindex.ReindexAction; -import org.elasticsearch.index.reindex.ReindexPlugin; import org.elasticsearch.index.reindex.UpdateByQueryAction; -import org.elasticsearch.plugins.Plugin; import org.elasticsearch.test.SecurityIntegTestCase; -import org.junit.Before; +import org.elasticsearch.xpack.core.security.SecurityField; -import java.util.ArrayList; import java.util.Collection; -import java.util.Collections; import java.util.stream.Collectors; import static org.hamcrest.core.IsCollectionContaining.hasItem; diff --git a/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/TokenBackwardsCompatibilityIT.java b/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/TokenBackwardsCompatibilityIT.java index 45979427174..5807a6078ee 100644 --- a/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/TokenBackwardsCompatibilityIT.java +++ b/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/TokenBackwardsCompatibilityIT.java @@ -19,7 +19,7 @@ import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.test.SecuritySettingsSourceField; import org.elasticsearch.test.rest.ESRestTestCase; import org.elasticsearch.test.rest.yaml.ObjectPath; -import org.elasticsearch.xpack.security.SecurityLifecycleServiceField; +import org.elasticsearch.xpack.core.security.SecurityLifecycleServiceField; import org.junit.Before; import java.io.IOException; @@ -28,8 +28,8 @@ import java.util.Collections; import java.util.List; import java.util.Map; -import static org.elasticsearch.xpack.security.SecurityLifecycleServiceField.SECURITY_TEMPLATE_NAME; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; +import static org.elasticsearch.xpack.core.security.SecurityLifecycleServiceField.SECURITY_TEMPLATE_NAME; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; import static org.hamcrest.Matchers.greaterThanOrEqualTo; public class TokenBackwardsCompatibilityIT extends ESRestTestCase { diff --git a/qa/saml-idp-tests/src/test/java/org/elasticsearch/xpack/security/authc/saml/SamlAuthenticationIntegTests.java b/qa/saml-idp-tests/src/test/java/org/elasticsearch/xpack/security/authc/saml/SamlAuthenticationIntegTests.java index 284bfa00f15..195486f8df5 100644 --- a/qa/saml-idp-tests/src/test/java/org/elasticsearch/xpack/security/authc/saml/SamlAuthenticationIntegTests.java +++ b/qa/saml-idp-tests/src/test/java/org/elasticsearch/xpack/security/authc/saml/SamlAuthenticationIntegTests.java @@ -5,29 +5,6 @@ */ package org.elasticsearch.xpack.security.authc.saml; -import javax.net.ssl.KeyManager; -import javax.net.ssl.SSLContext; -import javax.net.ssl.TrustManager; -import javax.net.ssl.X509ExtendedTrustManager; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.net.InetAddress; -import java.net.InetSocketAddress; -import java.net.URI; -import java.net.URISyntaxException; -import java.nio.file.Path; -import java.security.SecureRandom; -import java.security.cert.Certificate; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.concurrent.Executor; -import java.util.concurrent.ExecutorService; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - import com.sun.net.httpserver.HttpExchange; import com.sun.net.httpserver.HttpHandler; import com.sun.net.httpserver.HttpServer; @@ -77,22 +54,47 @@ import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.mocksocket.MockHttpServer; import org.elasticsearch.test.SecurityIntegTestCase; import org.elasticsearch.test.SecuritySettingsSourceField; -import org.elasticsearch.xpack.common.socket.SocketAccess; -import org.elasticsearch.xpack.security.action.rolemapping.PutRoleMappingAction; -import org.elasticsearch.xpack.security.action.rolemapping.PutRoleMappingRequestBuilder; -import org.elasticsearch.xpack.security.action.user.ChangePasswordRequestBuilder; +import org.elasticsearch.xpack.core.common.socket.SocketAccess; +import org.elasticsearch.xpack.core.security.action.rolemapping.PutRoleMappingAction; +import org.elasticsearch.xpack.core.security.action.rolemapping.PutRoleMappingRequestBuilder; +import org.elasticsearch.xpack.core.security.action.user.ChangePasswordRequestBuilder; +import org.elasticsearch.xpack.core.security.authc.file.FileRealmSettings; +import org.elasticsearch.xpack.core.security.authc.saml.SamlRealmSettings; +import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; +import org.elasticsearch.xpack.core.security.authc.support.mapper.expressiondsl.ExpressionParser; +import org.elasticsearch.xpack.core.security.authc.support.mapper.expressiondsl.RoleMapperExpression; +import org.elasticsearch.xpack.core.ssl.CertUtils; import org.elasticsearch.xpack.security.authc.Realms; -import org.elasticsearch.xpack.security.authc.file.FileRealmSettings; -import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken; -import org.elasticsearch.xpack.security.authc.support.mapper.expressiondsl.ExpressionParser; -import org.elasticsearch.xpack.security.authc.support.mapper.expressiondsl.RoleMapperExpression; -import org.elasticsearch.xpack.ssl.CertUtils; import org.hamcrest.Matchers; import org.junit.After; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; +import javax.net.ssl.KeyManager; +import javax.net.ssl.SSLContext; +import javax.net.ssl.TrustManager; +import javax.net.ssl.X509ExtendedTrustManager; + +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.net.InetAddress; +import java.net.InetSocketAddress; +import java.net.URI; +import java.net.URISyntaxException; +import java.nio.file.Path; +import java.security.SecureRandom; +import java.security.cert.Certificate; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.concurrent.Executor; +import java.util.concurrent.ExecutorService; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + import static java.util.Collections.emptyMap; import static org.elasticsearch.common.xcontent.XContentHelper.convertToMap; import static org.hamcrest.Matchers.contains; diff --git a/qa/security-client-tests/src/test/java/org/elasticsearch/xpack/security/qa/SecurityTransportClientIT.java b/qa/security-client-tests/src/test/java/org/elasticsearch/xpack/security/qa/SecurityTransportClientIT.java index 820d21bc25c..519f365d515 100644 --- a/qa/security-client-tests/src/test/java/org/elasticsearch/xpack/security/qa/SecurityTransportClientIT.java +++ b/qa/security-client-tests/src/test/java/org/elasticsearch/xpack/security/qa/SecurityTransportClientIT.java @@ -16,17 +16,16 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.transport.TransportAddress; import org.elasticsearch.plugins.Plugin; import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.xpack.XPackClientPlugin; -import org.elasticsearch.xpack.XPackPlugin; +import org.elasticsearch.xpack.core.XPackClientPlugin; import org.elasticsearch.xpack.client.PreBuiltXPackTransportClient; -import org.elasticsearch.xpack.security.SecurityField; +import org.elasticsearch.xpack.core.security.SecurityField; import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.concurrent.TimeUnit; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.is; diff --git a/qa/security-example-extension/src/main/java/org/elasticsearch/example/ExampleExtension.java b/qa/security-example-extension/src/main/java/org/elasticsearch/example/ExampleExtension.java index 5e80b2865ab..37679692938 100644 --- a/qa/security-example-extension/src/main/java/org/elasticsearch/example/ExampleExtension.java +++ b/qa/security-example-extension/src/main/java/org/elasticsearch/example/ExampleExtension.java @@ -11,10 +11,10 @@ import org.elasticsearch.example.realm.CustomAuthenticationFailureHandler; import org.elasticsearch.example.realm.CustomRealm; import org.elasticsearch.example.role.CustomInMemoryRolesProvider; import org.elasticsearch.watcher.ResourceWatcherService; -import org.elasticsearch.xpack.security.authc.AuthenticationFailureHandler; -import org.elasticsearch.xpack.extensions.XPackExtension; -import org.elasticsearch.xpack.security.authc.Realm; -import org.elasticsearch.xpack.security.authz.RoleDescriptor; +import org.elasticsearch.xpack.core.extensions.XPackExtension; +import org.elasticsearch.xpack.core.security.authc.AuthenticationFailureHandler; +import org.elasticsearch.xpack.core.security.authc.Realm; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor; import java.security.AccessController; import java.security.PrivilegedAction; diff --git a/qa/security-example-extension/src/main/java/org/elasticsearch/example/realm/CustomAuthenticationFailureHandler.java b/qa/security-example-extension/src/main/java/org/elasticsearch/example/realm/CustomAuthenticationFailureHandler.java index ecc2567e0c1..e8cd4fc6ebf 100644 --- a/qa/security-example-extension/src/main/java/org/elasticsearch/example/realm/CustomAuthenticationFailureHandler.java +++ b/qa/security-example-extension/src/main/java/org/elasticsearch/example/realm/CustomAuthenticationFailureHandler.java @@ -8,8 +8,8 @@ package org.elasticsearch.example.realm; import org.elasticsearch.ElasticsearchSecurityException; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.rest.RestRequest; -import org.elasticsearch.xpack.security.authc.AuthenticationToken; -import org.elasticsearch.xpack.security.authc.DefaultAuthenticationFailureHandler; +import org.elasticsearch.xpack.core.security.authc.AuthenticationToken; +import org.elasticsearch.xpack.core.security.authc.DefaultAuthenticationFailureHandler; import org.elasticsearch.transport.TransportMessage; public class CustomAuthenticationFailureHandler extends DefaultAuthenticationFailureHandler { diff --git a/qa/security-example-extension/src/main/java/org/elasticsearch/example/realm/CustomRealm.java b/qa/security-example-extension/src/main/java/org/elasticsearch/example/realm/CustomRealm.java index d110a6ca071..19ef9d2eb0d 100644 --- a/qa/security-example-extension/src/main/java/org/elasticsearch/example/realm/CustomRealm.java +++ b/qa/security-example-extension/src/main/java/org/elasticsearch/example/realm/CustomRealm.java @@ -8,13 +8,13 @@ package org.elasticsearch.example.realm; import org.elasticsearch.action.ActionListener; import org.elasticsearch.common.settings.SecureString; import org.elasticsearch.common.util.concurrent.ThreadContext; -import org.elasticsearch.xpack.security.authc.AuthenticationResult; -import org.elasticsearch.xpack.security.authc.AuthenticationToken; -import org.elasticsearch.xpack.security.authc.Realm; -import org.elasticsearch.xpack.security.authc.RealmConfig; -import org.elasticsearch.xpack.security.authc.support.CharArrays; -import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken; -import org.elasticsearch.xpack.security.user.User; +import org.elasticsearch.xpack.core.security.authc.AuthenticationResult; +import org.elasticsearch.xpack.core.security.authc.AuthenticationToken; +import org.elasticsearch.xpack.core.security.authc.Realm; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.support.CharArrays; +import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; +import org.elasticsearch.xpack.core.security.user.User; public class CustomRealm extends Realm { diff --git a/qa/security-example-extension/src/main/java/org/elasticsearch/example/role/CustomInMemoryRolesProvider.java b/qa/security-example-extension/src/main/java/org/elasticsearch/example/role/CustomInMemoryRolesProvider.java index e1f4680c6c9..df9d3b5a6b8 100644 --- a/qa/security-example-extension/src/main/java/org/elasticsearch/example/role/CustomInMemoryRolesProvider.java +++ b/qa/security-example-extension/src/main/java/org/elasticsearch/example/role/CustomInMemoryRolesProvider.java @@ -8,7 +8,7 @@ package org.elasticsearch.example.role; import org.elasticsearch.action.ActionListener; import org.elasticsearch.common.component.AbstractComponent; import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.xpack.security.authz.RoleDescriptor; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor; import java.util.HashSet; import java.util.Map; diff --git a/qa/security-example-extension/src/test/java/org/elasticsearch/example/realm/CustomRealmIT.java b/qa/security-example-extension/src/test/java/org/elasticsearch/example/realm/CustomRealmIT.java index 3b4de438ddc..f1e2a983535 100644 --- a/qa/security-example-extension/src/test/java/org/elasticsearch/example/realm/CustomRealmIT.java +++ b/qa/security-example-extension/src/test/java/org/elasticsearch/example/realm/CustomRealmIT.java @@ -20,8 +20,7 @@ import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.env.Environment; import org.elasticsearch.plugins.Plugin; import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.xpack.XPackClientPlugin; -import org.elasticsearch.xpack.XPackPlugin; +import org.elasticsearch.xpack.core.XPackClientPlugin; import org.elasticsearch.xpack.client.PreBuiltXPackTransportClient; import java.util.Collection; diff --git a/qa/security-example-extension/src/test/java/org/elasticsearch/example/realm/CustomRealmTests.java b/qa/security-example-extension/src/test/java/org/elasticsearch/example/realm/CustomRealmTests.java index 0a34f8350a9..123bdacf17a 100644 --- a/qa/security-example-extension/src/test/java/org/elasticsearch/example/realm/CustomRealmTests.java +++ b/qa/security-example-extension/src/test/java/org/elasticsearch/example/realm/CustomRealmTests.java @@ -11,10 +11,10 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.env.TestEnvironment; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.security.authc.AuthenticationResult; -import org.elasticsearch.xpack.security.authc.RealmConfig; -import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken; -import org.elasticsearch.xpack.security.user.User; +import org.elasticsearch.xpack.core.security.authc.AuthenticationResult; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; +import org.elasticsearch.xpack.core.security.user.User; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.notNullValue; diff --git a/qa/security-example-extension/src/test/java/org/elasticsearch/example/role/CustomRolesProviderIT.java b/qa/security-example-extension/src/test/java/org/elasticsearch/example/role/CustomRolesProviderIT.java index eeccf0c7b4e..4e1fb722560 100644 --- a/qa/security-example-extension/src/test/java/org/elasticsearch/example/role/CustomRolesProviderIT.java +++ b/qa/security-example-extension/src/test/java/org/elasticsearch/example/role/CustomRolesProviderIT.java @@ -15,9 +15,9 @@ import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.example.realm.CustomRealm; import org.elasticsearch.plugins.Plugin; import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.xpack.XPackClientPlugin; -import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken; -import org.elasticsearch.xpack.security.client.SecurityClient; +import org.elasticsearch.xpack.core.XPackClientPlugin; +import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; +import org.elasticsearch.xpack.core.security.client.SecurityClient; import java.util.Collection; import java.util.Collections; @@ -25,7 +25,7 @@ import java.util.Collections; import static org.elasticsearch.example.role.CustomInMemoryRolesProvider.INDEX; import static org.elasticsearch.example.role.CustomInMemoryRolesProvider.ROLE_A; import static org.elasticsearch.example.role.CustomInMemoryRolesProvider.ROLE_B; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; import static org.hamcrest.Matchers.is; /** diff --git a/qa/security-example-spi-extension/src/main/java/org/elasticsearch/example/ExampleSecurityExtension.java b/qa/security-example-spi-extension/src/main/java/org/elasticsearch/example/ExampleSecurityExtension.java index 9bae1a03816..88b6e88aa19 100644 --- a/qa/security-example-spi-extension/src/main/java/org/elasticsearch/example/ExampleSecurityExtension.java +++ b/qa/security-example-spi-extension/src/main/java/org/elasticsearch/example/ExampleSecurityExtension.java @@ -11,15 +11,14 @@ import org.elasticsearch.example.realm.CustomAuthenticationFailureHandler; import org.elasticsearch.example.realm.CustomRealm; import org.elasticsearch.example.role.CustomInMemoryRolesProvider; import org.elasticsearch.watcher.ResourceWatcherService; +import org.elasticsearch.xpack.core.security.authc.AuthenticationFailureHandler; +import org.elasticsearch.xpack.core.security.authc.Realm; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor; import org.elasticsearch.xpack.security.SecurityExtension; -import org.elasticsearch.xpack.security.authc.AuthenticationFailureHandler; -import org.elasticsearch.xpack.security.authc.Realm; -import org.elasticsearch.xpack.security.authz.RoleDescriptor; import java.security.AccessController; import java.security.PrivilegedAction; import java.util.Arrays; -import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.List; diff --git a/qa/security-example-spi-extension/src/main/java/org/elasticsearch/example/realm/CustomAuthenticationFailureHandler.java b/qa/security-example-spi-extension/src/main/java/org/elasticsearch/example/realm/CustomAuthenticationFailureHandler.java index ecc2567e0c1..73f71c8fe58 100644 --- a/qa/security-example-spi-extension/src/main/java/org/elasticsearch/example/realm/CustomAuthenticationFailureHandler.java +++ b/qa/security-example-spi-extension/src/main/java/org/elasticsearch/example/realm/CustomAuthenticationFailureHandler.java @@ -8,9 +8,9 @@ package org.elasticsearch.example.realm; import org.elasticsearch.ElasticsearchSecurityException; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.rest.RestRequest; -import org.elasticsearch.xpack.security.authc.AuthenticationToken; -import org.elasticsearch.xpack.security.authc.DefaultAuthenticationFailureHandler; import org.elasticsearch.transport.TransportMessage; +import org.elasticsearch.xpack.core.security.authc.AuthenticationToken; +import org.elasticsearch.xpack.core.security.authc.DefaultAuthenticationFailureHandler; public class CustomAuthenticationFailureHandler extends DefaultAuthenticationFailureHandler { diff --git a/qa/security-example-spi-extension/src/main/java/org/elasticsearch/example/realm/CustomRealm.java b/qa/security-example-spi-extension/src/main/java/org/elasticsearch/example/realm/CustomRealm.java index d110a6ca071..19ef9d2eb0d 100644 --- a/qa/security-example-spi-extension/src/main/java/org/elasticsearch/example/realm/CustomRealm.java +++ b/qa/security-example-spi-extension/src/main/java/org/elasticsearch/example/realm/CustomRealm.java @@ -8,13 +8,13 @@ package org.elasticsearch.example.realm; import org.elasticsearch.action.ActionListener; import org.elasticsearch.common.settings.SecureString; import org.elasticsearch.common.util.concurrent.ThreadContext; -import org.elasticsearch.xpack.security.authc.AuthenticationResult; -import org.elasticsearch.xpack.security.authc.AuthenticationToken; -import org.elasticsearch.xpack.security.authc.Realm; -import org.elasticsearch.xpack.security.authc.RealmConfig; -import org.elasticsearch.xpack.security.authc.support.CharArrays; -import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken; -import org.elasticsearch.xpack.security.user.User; +import org.elasticsearch.xpack.core.security.authc.AuthenticationResult; +import org.elasticsearch.xpack.core.security.authc.AuthenticationToken; +import org.elasticsearch.xpack.core.security.authc.Realm; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.support.CharArrays; +import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; +import org.elasticsearch.xpack.core.security.user.User; public class CustomRealm extends Realm { diff --git a/qa/security-example-spi-extension/src/main/java/org/elasticsearch/example/role/CustomInMemoryRolesProvider.java b/qa/security-example-spi-extension/src/main/java/org/elasticsearch/example/role/CustomInMemoryRolesProvider.java index e1f4680c6c9..df9d3b5a6b8 100644 --- a/qa/security-example-spi-extension/src/main/java/org/elasticsearch/example/role/CustomInMemoryRolesProvider.java +++ b/qa/security-example-spi-extension/src/main/java/org/elasticsearch/example/role/CustomInMemoryRolesProvider.java @@ -8,7 +8,7 @@ package org.elasticsearch.example.role; import org.elasticsearch.action.ActionListener; import org.elasticsearch.common.component.AbstractComponent; import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.xpack.security.authz.RoleDescriptor; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor; import java.util.HashSet; import java.util.Map; diff --git a/qa/security-example-spi-extension/src/test/java/org/elasticsearch/example/realm/CustomRealmIT.java b/qa/security-example-spi-extension/src/test/java/org/elasticsearch/example/realm/CustomRealmIT.java index da6d62b1bf0..65ec595a0d4 100644 --- a/qa/security-example-spi-extension/src/test/java/org/elasticsearch/example/realm/CustomRealmIT.java +++ b/qa/security-example-spi-extension/src/test/java/org/elasticsearch/example/realm/CustomRealmIT.java @@ -20,8 +20,8 @@ import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.env.Environment; import org.elasticsearch.plugins.Plugin; import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.xpack.XPackClientPlugin; import org.elasticsearch.xpack.client.PreBuiltXPackTransportClient; +import org.elasticsearch.xpack.core.XPackClientPlugin; import java.util.Collection; import java.util.Collections; diff --git a/qa/security-example-spi-extension/src/test/java/org/elasticsearch/example/realm/CustomRealmTests.java b/qa/security-example-spi-extension/src/test/java/org/elasticsearch/example/realm/CustomRealmTests.java index c0532d99ab6..d1435ebaa3c 100644 --- a/qa/security-example-spi-extension/src/test/java/org/elasticsearch/example/realm/CustomRealmTests.java +++ b/qa/security-example-spi-extension/src/test/java/org/elasticsearch/example/realm/CustomRealmTests.java @@ -11,10 +11,10 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.env.TestEnvironment; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.security.authc.AuthenticationResult; -import org.elasticsearch.xpack.security.authc.RealmConfig; -import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken; -import org.elasticsearch.xpack.security.user.User; +import org.elasticsearch.xpack.core.security.authc.AuthenticationResult; +import org.elasticsearch.xpack.core.security.authc.RealmConfig; +import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; +import org.elasticsearch.xpack.core.security.user.User; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.notNullValue; diff --git a/qa/security-example-spi-extension/src/test/java/org/elasticsearch/example/role/CustomRolesProviderIT.java b/qa/security-example-spi-extension/src/test/java/org/elasticsearch/example/role/CustomRolesProviderIT.java index eeccf0c7b4e..4e1fb722560 100644 --- a/qa/security-example-spi-extension/src/test/java/org/elasticsearch/example/role/CustomRolesProviderIT.java +++ b/qa/security-example-spi-extension/src/test/java/org/elasticsearch/example/role/CustomRolesProviderIT.java @@ -15,9 +15,9 @@ import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.example.realm.CustomRealm; import org.elasticsearch.plugins.Plugin; import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.xpack.XPackClientPlugin; -import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken; -import org.elasticsearch.xpack.security.client.SecurityClient; +import org.elasticsearch.xpack.core.XPackClientPlugin; +import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; +import org.elasticsearch.xpack.core.security.client.SecurityClient; import java.util.Collection; import java.util.Collections; @@ -25,7 +25,7 @@ import java.util.Collections; import static org.elasticsearch.example.role.CustomInMemoryRolesProvider.INDEX; import static org.elasticsearch.example.role.CustomInMemoryRolesProvider.ROLE_A; import static org.elasticsearch.example.role.CustomInMemoryRolesProvider.ROLE_B; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; import static org.hamcrest.Matchers.is; /** diff --git a/qa/security-migrate-tests/src/test/java/org/elasticsearch/xpack/security/MigrateToolIT.java b/qa/security-migrate-tests/src/test/java/org/elasticsearch/xpack/security/MigrateToolIT.java index 3d6f4b9b714..4ecfc339a08 100644 --- a/qa/security-migrate-tests/src/test/java/org/elasticsearch/xpack/security/MigrateToolIT.java +++ b/qa/security-migrate-tests/src/test/java/org/elasticsearch/xpack/security/MigrateToolIT.java @@ -17,22 +17,22 @@ import org.elasticsearch.common.settings.SecureString; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.env.Environment; -import org.elasticsearch.xpack.security.action.role.GetRolesResponse; -import org.elasticsearch.xpack.security.action.user.GetUsersResponse; -import org.elasticsearch.xpack.security.action.user.PutUserResponse; +import org.elasticsearch.xpack.core.security.action.role.GetRolesResponse; +import org.elasticsearch.xpack.core.security.action.user.GetUsersResponse; +import org.elasticsearch.xpack.core.security.action.user.PutUserResponse; +import org.elasticsearch.xpack.core.security.authz.RoleDescriptor; +import org.elasticsearch.xpack.core.security.authz.permission.FieldPermissions; +import org.elasticsearch.xpack.core.security.authz.permission.FieldPermissionsDefinition; +import org.elasticsearch.xpack.core.security.client.SecurityClient; +import org.elasticsearch.xpack.core.security.user.User; import org.elasticsearch.xpack.security.authc.esnative.ESNativeRealmMigrateTool; -import org.elasticsearch.xpack.security.authz.RoleDescriptor; -import org.elasticsearch.xpack.security.authz.permission.FieldPermissions; -import org.elasticsearch.xpack.security.authz.permission.FieldPermissionsDefinition; -import org.elasticsearch.xpack.security.client.SecurityClient; -import org.elasticsearch.xpack.security.user.User; import org.junit.Before; import java.nio.file.Path; import java.util.Arrays; import java.util.Collections; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; import static org.hamcrest.Matchers.containsString; /** diff --git a/qa/security-migrate-tests/src/test/java/org/elasticsearch/xpack/security/MigrateToolTestCase.java b/qa/security-migrate-tests/src/test/java/org/elasticsearch/xpack/security/MigrateToolTestCase.java index 2a74ed4d9c5..2987c1afc8d 100644 --- a/qa/security-migrate-tests/src/test/java/org/elasticsearch/xpack/security/MigrateToolTestCase.java +++ b/qa/security-migrate-tests/src/test/java/org/elasticsearch/xpack/security/MigrateToolTestCase.java @@ -14,6 +14,7 @@ import org.elasticsearch.common.logging.ESLoggerFactory; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.transport.TransportAddress; import org.elasticsearch.xpack.client.PreBuiltXPackTransportClient; +import org.elasticsearch.xpack.core.security.SecurityField; import org.junit.After; import org.junit.AfterClass; import org.junit.Before; diff --git a/qa/security-setup-password-tests/src/test/java/org/elasticsearch/xpack/security/authc/esnative/tool/SetupPasswordToolIT.java b/qa/security-setup-password-tests/src/test/java/org/elasticsearch/xpack/security/authc/esnative/tool/SetupPasswordToolIT.java index e7592fb90fc..ab25dac8941 100644 --- a/qa/security-setup-password-tests/src/test/java/org/elasticsearch/xpack/security/authc/esnative/tool/SetupPasswordToolIT.java +++ b/qa/security-setup-password-tests/src/test/java/org/elasticsearch/xpack/security/authc/esnative/tool/SetupPasswordToolIT.java @@ -33,7 +33,7 @@ import java.util.List; import java.util.Map; import java.util.stream.Collectors; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; public class SetupPasswordToolIT extends ESRestTestCase { diff --git a/qa/security-tools-tests/src/test/java/org/elasticsearch/xpack/ssl/CertificateGenerateToolTests.java b/qa/security-tools-tests/src/test/java/org/elasticsearch/xpack/core/ssl/CertificateGenerateToolTests.java similarity index 98% rename from qa/security-tools-tests/src/test/java/org/elasticsearch/xpack/ssl/CertificateGenerateToolTests.java rename to qa/security-tools-tests/src/test/java/org/elasticsearch/xpack/core/ssl/CertificateGenerateToolTests.java index cf0e89fa104..ede61f6fbc3 100644 --- a/qa/security-tools-tests/src/test/java/org/elasticsearch/xpack/ssl/CertificateGenerateToolTests.java +++ b/qa/security-tools-tests/src/test/java/org/elasticsearch/xpack/core/ssl/CertificateGenerateToolTests.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ssl; +package org.elasticsearch.xpack.core.ssl; import com.google.common.jimfs.Configuration; import com.google.common.jimfs.Jimfs; @@ -33,14 +33,14 @@ import org.elasticsearch.env.Environment; import org.elasticsearch.env.TestEnvironment; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.SecuritySettingsSourceField; -import org.elasticsearch.test.SecurityTestsUtils; -import org.elasticsearch.xpack.ssl.CertificateGenerateTool.CAInfo; -import org.elasticsearch.xpack.ssl.CertificateGenerateTool.CertificateInformation; -import org.elasticsearch.xpack.ssl.CertificateGenerateTool.Name; +import org.elasticsearch.xpack.core.ssl.CertificateGenerateTool.CAInfo; +import org.elasticsearch.xpack.core.ssl.CertificateGenerateTool.CertificateInformation; +import org.elasticsearch.xpack.core.ssl.CertificateGenerateTool.Name; import org.hamcrest.Matchers; import org.junit.After; import javax.security.auth.x500.X500Principal; + import java.io.IOException; import java.io.InputStream; import java.io.Reader; diff --git a/qa/security-tools-tests/src/test/java/org/elasticsearch/xpack/ssl/CertificateToolTests.java b/qa/security-tools-tests/src/test/java/org/elasticsearch/xpack/core/ssl/CertificateToolTests.java similarity index 98% rename from qa/security-tools-tests/src/test/java/org/elasticsearch/xpack/ssl/CertificateToolTests.java rename to qa/security-tools-tests/src/test/java/org/elasticsearch/xpack/core/ssl/CertificateToolTests.java index 8dbd75fcf03..a3983b981d5 100644 --- a/qa/security-tools-tests/src/test/java/org/elasticsearch/xpack/ssl/CertificateToolTests.java +++ b/qa/security-tools-tests/src/test/java/org/elasticsearch/xpack/core/ssl/CertificateToolTests.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.ssl; +package org.elasticsearch.xpack.core.ssl; import com.google.common.jimfs.Configuration; import com.google.common.jimfs.Jimfs; @@ -38,14 +38,13 @@ import org.elasticsearch.env.Environment; import org.elasticsearch.env.TestEnvironment; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.SecuritySettingsSourceField; -import org.elasticsearch.test.SecurityTestsUtils; import org.elasticsearch.test.TestMatchers; -import org.elasticsearch.xpack.ssl.CertificateTool.CAInfo; -import org.elasticsearch.xpack.ssl.CertificateTool.CertificateAuthorityCommand; -import org.elasticsearch.xpack.ssl.CertificateTool.CertificateCommand; -import org.elasticsearch.xpack.ssl.CertificateTool.CertificateInformation; -import org.elasticsearch.xpack.ssl.CertificateTool.GenerateCertificateCommand; -import org.elasticsearch.xpack.ssl.CertificateTool.Name; +import org.elasticsearch.xpack.core.ssl.CertificateTool.CAInfo; +import org.elasticsearch.xpack.core.ssl.CertificateTool.CertificateAuthorityCommand; +import org.elasticsearch.xpack.core.ssl.CertificateTool.CertificateCommand; +import org.elasticsearch.xpack.core.ssl.CertificateTool.CertificateInformation; +import org.elasticsearch.xpack.core.ssl.CertificateTool.GenerateCertificateCommand; +import org.elasticsearch.xpack.core.ssl.CertificateTool.Name; import org.hamcrest.Matchers; import org.junit.After; @@ -54,6 +53,7 @@ import javax.net.ssl.TrustManagerFactory; import javax.net.ssl.X509ExtendedKeyManager; import javax.net.ssl.X509ExtendedTrustManager; import javax.security.auth.x500.X500Principal; + import java.io.IOException; import java.io.Reader; import java.net.InetAddress; @@ -86,12 +86,10 @@ import java.util.Set; import java.util.function.Function; import java.util.stream.Collectors; -import static org.elasticsearch.test.TestMatchers.pathExists; import static org.hamcrest.Matchers.arrayWithSize; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.instanceOf; -import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.nullValue; /** diff --git a/qa/security-tools-tests/src/test/java/org/elasticsearch/xpack/security/authc/file/tool/UsersToolTests.java b/qa/security-tools-tests/src/test/java/org/elasticsearch/xpack/security/authc/file/tool/UsersToolTests.java index 39a8d97b528..b899e8a157f 100644 --- a/qa/security-tools-tests/src/test/java/org/elasticsearch/xpack/security/authc/file/tool/UsersToolTests.java +++ b/qa/security-tools-tests/src/test/java/org/elasticsearch/xpack/security/authc/file/tool/UsersToolTests.java @@ -19,12 +19,12 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.env.Environment; import org.elasticsearch.env.TestEnvironment; import org.elasticsearch.test.SecuritySettingsSourceField; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.XPackField; -import org.elasticsearch.xpack.security.authc.support.Hasher; -import org.elasticsearch.xpack.security.authz.store.ReservedRolesStore; -import org.elasticsearch.xpack.security.user.ElasticUser; -import org.elasticsearch.xpack.security.user.KibanaUser; +import org.elasticsearch.xpack.core.XPackField; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.security.authc.support.Hasher; +import org.elasticsearch.xpack.core.security.authz.store.ReservedRolesStore; +import org.elasticsearch.xpack.core.security.user.ElasticUser; +import org.elasticsearch.xpack.core.security.user.KibanaUser; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; diff --git a/qa/security-tools-tests/src/test/java/org/elasticsearch/xpack/security/crypto/tool/SystemKeyToolTests.java b/qa/security-tools-tests/src/test/java/org/elasticsearch/xpack/security/crypto/tool/SystemKeyToolTests.java index 11beb494fde..46bb97bb37b 100644 --- a/qa/security-tools-tests/src/test/java/org/elasticsearch/xpack/security/crypto/tool/SystemKeyToolTests.java +++ b/qa/security-tools-tests/src/test/java/org/elasticsearch/xpack/security/crypto/tool/SystemKeyToolTests.java @@ -15,7 +15,7 @@ import org.elasticsearch.common.io.PathUtilsForTesting; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.env.Environment; import org.elasticsearch.env.TestEnvironment; -import org.elasticsearch.xpack.XPackField; +import org.elasticsearch.xpack.core.XPackField; import org.junit.After; import java.nio.file.FileSystem; diff --git a/qa/smoke-test-graph-with-security/src/test/java/org/elasticsearch/smoketest/GraphWithSecurityIT.java b/qa/smoke-test-graph-with-security/src/test/java/org/elasticsearch/smoketest/GraphWithSecurityIT.java index 952d9541310..5650f407dd3 100644 --- a/qa/smoke-test-graph-with-security/src/test/java/org/elasticsearch/smoketest/GraphWithSecurityIT.java +++ b/qa/smoke-test-graph-with-security/src/test/java/org/elasticsearch/smoketest/GraphWithSecurityIT.java @@ -14,7 +14,7 @@ import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate; import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; public class GraphWithSecurityIT extends ESClientYamlSuiteTestCase { diff --git a/qa/smoke-test-ml-with-security/src/test/java/org/elasticsearch/smoketest/MlWithSecurityIT.java b/qa/smoke-test-ml-with-security/src/test/java/org/elasticsearch/smoketest/MlWithSecurityIT.java index 286603010f3..fc6cb92791f 100644 --- a/qa/smoke-test-ml-with-security/src/test/java/org/elasticsearch/smoketest/MlWithSecurityIT.java +++ b/qa/smoke-test-ml-with-security/src/test/java/org/elasticsearch/smoketest/MlWithSecurityIT.java @@ -16,7 +16,7 @@ import org.elasticsearch.xpack.test.rest.XPackRestIT; import java.util.Collections; import java.util.Map; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; public class MlWithSecurityIT extends XPackRestIT { diff --git a/qa/smoke-test-plugins-ssl/src/test/java/org/elasticsearch/smoketest/SmokeTestMonitoringWithSecurityIT.java b/qa/smoke-test-plugins-ssl/src/test/java/org/elasticsearch/smoketest/SmokeTestMonitoringWithSecurityIT.java index 72eaf19f412..d87ae7b8b38 100644 --- a/qa/smoke-test-plugins-ssl/src/test/java/org/elasticsearch/smoketest/SmokeTestMonitoringWithSecurityIT.java +++ b/qa/smoke-test-plugins-ssl/src/test/java/org/elasticsearch/smoketest/SmokeTestMonitoringWithSecurityIT.java @@ -12,8 +12,8 @@ import org.elasticsearch.common.network.NetworkModule; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.plugins.Plugin; import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.xpack.XPackPlugin; -import org.elasticsearch.xpack.security.SecurityField; +import org.elasticsearch.xpack.core.XPackPlugin; +import org.elasticsearch.xpack.core.security.SecurityField; import org.junit.After; import org.junit.Before; diff --git a/qa/smoke-test-plugins-ssl/src/test/java/org/elasticsearch/smoketest/SmokeTestPluginsSslClientYamlTestSuiteIT.java b/qa/smoke-test-plugins-ssl/src/test/java/org/elasticsearch/smoketest/SmokeTestPluginsSslClientYamlTestSuiteIT.java index a5f1d993281..8411a7eb5a4 100644 --- a/qa/smoke-test-plugins-ssl/src/test/java/org/elasticsearch/smoketest/SmokeTestPluginsSslClientYamlTestSuiteIT.java +++ b/qa/smoke-test-plugins-ssl/src/test/java/org/elasticsearch/smoketest/SmokeTestPluginsSslClientYamlTestSuiteIT.java @@ -23,7 +23,7 @@ import java.net.URISyntaxException; import java.nio.file.Files; import java.nio.file.Path; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; public class SmokeTestPluginsSslClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase { diff --git a/qa/smoke-test-plugins/src/test/java/org/elasticsearch/smoketest/XSmokeTestPluginsClientYamlTestSuiteIT.java b/qa/smoke-test-plugins/src/test/java/org/elasticsearch/smoketest/XSmokeTestPluginsClientYamlTestSuiteIT.java index c790fccaa63..29671386f5b 100644 --- a/qa/smoke-test-plugins/src/test/java/org/elasticsearch/smoketest/XSmokeTestPluginsClientYamlTestSuiteIT.java +++ b/qa/smoke-test-plugins/src/test/java/org/elasticsearch/smoketest/XSmokeTestPluginsClientYamlTestSuiteIT.java @@ -14,7 +14,7 @@ import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate; import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; public class XSmokeTestPluginsClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase { diff --git a/qa/smoke-test-security-with-mustache/src/test/java/org/elasticsearch/smoketest/SmokeTestSecurityWithMustacheClientYamlTestSuiteIT.java b/qa/smoke-test-security-with-mustache/src/test/java/org/elasticsearch/smoketest/SmokeTestSecurityWithMustacheClientYamlTestSuiteIT.java index 12287b739d2..46daddae62b 100644 --- a/qa/smoke-test-security-with-mustache/src/test/java/org/elasticsearch/smoketest/SmokeTestSecurityWithMustacheClientYamlTestSuiteIT.java +++ b/qa/smoke-test-security-with-mustache/src/test/java/org/elasticsearch/smoketest/SmokeTestSecurityWithMustacheClientYamlTestSuiteIT.java @@ -14,7 +14,7 @@ import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate; import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; public class SmokeTestSecurityWithMustacheClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase { diff --git a/qa/smoke-test-watcher-with-mustache/src/test/java/org/elasticsearch/smoketest/WatcherWithMustacheIT.java b/qa/smoke-test-watcher-with-mustache/src/test/java/org/elasticsearch/smoketest/WatcherWithMustacheIT.java index 0296dbc1658..07964e5da9b 100644 --- a/qa/smoke-test-watcher-with-mustache/src/test/java/org/elasticsearch/smoketest/WatcherWithMustacheIT.java +++ b/qa/smoke-test-watcher-with-mustache/src/test/java/org/elasticsearch/smoketest/WatcherWithMustacheIT.java @@ -10,7 +10,7 @@ import com.carrotsearch.randomizedtesting.annotations.ParametersFactory; import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate; import org.elasticsearch.test.rest.yaml.ClientYamlTestResponse; import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase; -import org.elasticsearch.xpack.watcher.support.WatcherIndexTemplateRegistryField; +import org.elasticsearch.xpack.core.watcher.support.WatcherIndexTemplateRegistryField; import org.junit.After; import org.junit.Before; diff --git a/qa/smoke-test-watcher-with-painless/src/test/java/org/elasticsearch/smoketest/WatcherWithPainlessIT.java b/qa/smoke-test-watcher-with-painless/src/test/java/org/elasticsearch/smoketest/WatcherWithPainlessIT.java index 3854a6c1a44..aee36dedbb8 100644 --- a/qa/smoke-test-watcher-with-painless/src/test/java/org/elasticsearch/smoketest/WatcherWithPainlessIT.java +++ b/qa/smoke-test-watcher-with-painless/src/test/java/org/elasticsearch/smoketest/WatcherWithPainlessIT.java @@ -9,7 +9,7 @@ import com.carrotsearch.randomizedtesting.annotations.ParametersFactory; import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate; import org.elasticsearch.test.rest.yaml.ClientYamlTestResponse; import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase; -import org.elasticsearch.xpack.watcher.support.WatcherIndexTemplateRegistryField; +import org.elasticsearch.xpack.core.watcher.support.WatcherIndexTemplateRegistryField; import org.junit.After; import org.junit.Before; diff --git a/qa/smoke-test-watcher-with-security/src/test/java/org/elasticsearch/smoketest/SmokeTestWatcherWithSecurityClientYamlTestSuiteIT.java b/qa/smoke-test-watcher-with-security/src/test/java/org/elasticsearch/smoketest/SmokeTestWatcherWithSecurityClientYamlTestSuiteIT.java index ec354fb4d42..75ac3149af3 100644 --- a/qa/smoke-test-watcher-with-security/src/test/java/org/elasticsearch/smoketest/SmokeTestWatcherWithSecurityClientYamlTestSuiteIT.java +++ b/qa/smoke-test-watcher-with-security/src/test/java/org/elasticsearch/smoketest/SmokeTestWatcherWithSecurityClientYamlTestSuiteIT.java @@ -16,7 +16,7 @@ import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate; import org.elasticsearch.test.rest.yaml.ClientYamlTestResponse; import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase; -import org.elasticsearch.xpack.watcher.support.WatcherIndexTemplateRegistryField; +import org.elasticsearch.xpack.core.watcher.support.WatcherIndexTemplateRegistryField; import org.junit.After; import org.junit.Before; @@ -26,7 +26,7 @@ import java.util.Collections; import static java.util.Collections.emptyList; import static java.util.Collections.emptyMap; import static java.util.Collections.singletonMap; -import static org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; +import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; import static org.hamcrest.Matchers.is; public class SmokeTestWatcherWithSecurityClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase { diff --git a/qa/smoke-test-watcher/src/test/java/org/elasticsearch/smoketest/SmokeTestWatcherClientYamlTestSuiteIT.java b/qa/smoke-test-watcher/src/test/java/org/elasticsearch/smoketest/SmokeTestWatcherClientYamlTestSuiteIT.java index 06578b232b4..4a09bb3179d 100644 --- a/qa/smoke-test-watcher/src/test/java/org/elasticsearch/smoketest/SmokeTestWatcherClientYamlTestSuiteIT.java +++ b/qa/smoke-test-watcher/src/test/java/org/elasticsearch/smoketest/SmokeTestWatcherClientYamlTestSuiteIT.java @@ -12,7 +12,7 @@ import org.elasticsearch.test.junit.annotations.TestLogging; import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate; import org.elasticsearch.test.rest.yaml.ClientYamlTestResponse; import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase; -import org.elasticsearch.xpack.watcher.support.WatcherIndexTemplateRegistryField; +import org.elasticsearch.xpack.core.watcher.support.WatcherIndexTemplateRegistryField; import org.junit.After; import org.junit.Before; diff --git a/qa/transport-client-tests/src/test/java/org/elasticsearch/xpack/ml/client/MLTransportClientIT.java b/qa/transport-client-tests/src/test/java/org/elasticsearch/xpack/ml/client/MLTransportClientIT.java index d614fdcdc67..4fab7424ad8 100644 --- a/qa/transport-client-tests/src/test/java/org/elasticsearch/xpack/ml/client/MLTransportClientIT.java +++ b/qa/transport-client-tests/src/test/java/org/elasticsearch/xpack/ml/client/MLTransportClientIT.java @@ -9,28 +9,29 @@ import org.elasticsearch.client.Client; import org.elasticsearch.common.bytes.BytesArray; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.xpack.XPackClient; -import org.elasticsearch.xpack.ml.action.CloseJobAction; -import org.elasticsearch.xpack.ml.action.DeleteJobAction; -import org.elasticsearch.xpack.ml.action.FlushJobAction; -import org.elasticsearch.xpack.ml.action.GetBucketsAction; -import org.elasticsearch.xpack.ml.action.GetDatafeedsAction; -import org.elasticsearch.xpack.ml.action.GetJobsAction; -import org.elasticsearch.xpack.ml.action.GetModelSnapshotsAction; -import org.elasticsearch.xpack.ml.action.OpenJobAction; -import org.elasticsearch.xpack.ml.action.PostDataAction; -import org.elasticsearch.xpack.ml.action.PutDatafeedAction; -import org.elasticsearch.xpack.ml.action.PutJobAction; -import org.elasticsearch.xpack.ml.action.StartDatafeedAction; -import org.elasticsearch.xpack.ml.action.StopDatafeedAction; -import org.elasticsearch.xpack.ml.action.UpdateModelSnapshotAction; -import org.elasticsearch.xpack.ml.action.ValidateDetectorAction; -import org.elasticsearch.xpack.ml.action.ValidateJobConfigAction; -import org.elasticsearch.xpack.ml.datafeed.DatafeedConfig; -import org.elasticsearch.xpack.ml.job.config.AnalysisConfig; -import org.elasticsearch.xpack.ml.job.config.DataDescription; -import org.elasticsearch.xpack.ml.job.config.Detector; -import org.elasticsearch.xpack.ml.job.config.Job; +import org.elasticsearch.xpack.core.XPackClient; +import org.elasticsearch.xpack.core.ml.action.CloseJobAction; +import org.elasticsearch.xpack.core.ml.action.DeleteJobAction; +import org.elasticsearch.xpack.core.ml.action.FlushJobAction; +import org.elasticsearch.xpack.core.ml.action.GetBucketsAction; +import org.elasticsearch.xpack.core.ml.action.GetDatafeedsAction; +import org.elasticsearch.xpack.core.ml.action.GetJobsAction; +import org.elasticsearch.xpack.core.ml.action.GetModelSnapshotsAction; +import org.elasticsearch.xpack.core.ml.action.OpenJobAction; +import org.elasticsearch.xpack.core.ml.action.PostDataAction; +import org.elasticsearch.xpack.core.ml.action.PutDatafeedAction; +import org.elasticsearch.xpack.core.ml.action.PutJobAction; +import org.elasticsearch.xpack.core.ml.action.StartDatafeedAction; +import org.elasticsearch.xpack.core.ml.action.StopDatafeedAction; +import org.elasticsearch.xpack.core.ml.action.UpdateModelSnapshotAction; +import org.elasticsearch.xpack.core.ml.action.ValidateDetectorAction; +import org.elasticsearch.xpack.core.ml.action.ValidateJobConfigAction; +import org.elasticsearch.xpack.core.ml.client.MachineLearningClient; +import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; +import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig; +import org.elasticsearch.xpack.core.ml.job.config.DataDescription; +import org.elasticsearch.xpack.core.ml.job.config.Detector; +import org.elasticsearch.xpack.core.ml.job.config.Job; import java.util.ArrayList; import java.util.Collections; diff --git a/qa/tribe-tests-with-license/src/test/java/org/elasticsearch/license/TribeTransportTestCase.java b/qa/tribe-tests-with-license/src/test/java/org/elasticsearch/license/TribeTransportTestCase.java index 700ad1f0bfe..5ffba4fa46e 100644 --- a/qa/tribe-tests-with-license/src/test/java/org/elasticsearch/license/TribeTransportTestCase.java +++ b/qa/tribe-tests-with-license/src/test/java/org/elasticsearch/license/TribeTransportTestCase.java @@ -34,15 +34,15 @@ import org.elasticsearch.test.TestCluster; import org.elasticsearch.test.discovery.TestZenDiscovery; import org.elasticsearch.tribe.TribePlugin; import org.elasticsearch.xpack.CompositeTestingXPackPlugin; -import org.elasticsearch.xpack.XPackClientPlugin; -import org.elasticsearch.xpack.XPackPlugin; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.XPackField; +import org.elasticsearch.xpack.core.XPackClientPlugin; +import org.elasticsearch.xpack.core.XPackPlugin; +import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.XPackField; import org.elasticsearch.xpack.deprecation.Deprecation; import org.elasticsearch.xpack.graph.Graph; import org.elasticsearch.xpack.logstash.Logstash; import org.elasticsearch.xpack.ml.MachineLearning; -import org.elasticsearch.xpack.ml.MachineLearningField; +import org.elasticsearch.xpack.core.ml.MachineLearningField; import org.elasticsearch.xpack.monitoring.Monitoring; import org.elasticsearch.xpack.security.Security; import org.elasticsearch.xpack.upgrade.Upgrade; diff --git a/qa/tribe-tests-with-license/src/test/java/org/elasticsearch/test/LicensingTribeIT.java b/qa/tribe-tests-with-license/src/test/java/org/elasticsearch/test/LicensingTribeIT.java index d885f7de666..a4ea28656ae 100644 --- a/qa/tribe-tests-with-license/src/test/java/org/elasticsearch/test/LicensingTribeIT.java +++ b/qa/tribe-tests-with-license/src/test/java/org/elasticsearch/test/LicensingTribeIT.java @@ -16,10 +16,9 @@ import org.elasticsearch.license.LicensesStatus; import org.elasticsearch.license.LicensingClient; import org.elasticsearch.license.PutLicenseResponse; import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.xpack.LocalStateCompositeXPackPlugin; -import org.elasticsearch.xpack.XPackPlugin; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.ml.MachineLearningField; +import org.elasticsearch.xpack.core.LocalStateCompositeXPackPlugin; +import org.elasticsearch.xpack.core.XPackPlugin; +import org.elasticsearch.xpack.core.XPackSettings; import org.junit.AfterClass; import java.io.IOException; diff --git a/qa/tribe-tests-with-license/src/test/java/org/elasticsearch/xpack/CompositeTestingXPackPlugin.java b/qa/tribe-tests-with-license/src/test/java/org/elasticsearch/xpack/CompositeTestingXPackPlugin.java index c3ade34d7b2..bf84eaf428a 100644 --- a/qa/tribe-tests-with-license/src/test/java/org/elasticsearch/xpack/CompositeTestingXPackPlugin.java +++ b/qa/tribe-tests-with-license/src/test/java/org/elasticsearch/xpack/CompositeTestingXPackPlugin.java @@ -8,16 +8,16 @@ package org.elasticsearch.xpack; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.license.LicenseService; import org.elasticsearch.license.XPackLicenseState; +import org.elasticsearch.xpack.core.LocalStateCompositeXPackPlugin; +import org.elasticsearch.xpack.core.ssl.SSLService; import org.elasticsearch.xpack.deprecation.Deprecation; import org.elasticsearch.xpack.graph.Graph; import org.elasticsearch.xpack.logstash.Logstash; import org.elasticsearch.xpack.ml.MachineLearning; import org.elasticsearch.xpack.monitoring.Monitoring; import org.elasticsearch.xpack.security.Security; -import org.elasticsearch.xpack.ssl.SSLService; import org.elasticsearch.xpack.watcher.Watcher; - import java.nio.file.Path; public class CompositeTestingXPackPlugin extends LocalStateCompositeXPackPlugin { diff --git a/qa/tribe-tests-with-license/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringPluginTests.java b/qa/tribe-tests-with-license/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringPluginTests.java index 3748900ec8b..8149521a303 100644 --- a/qa/tribe-tests-with-license/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringPluginTests.java +++ b/qa/tribe-tests-with-license/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringPluginTests.java @@ -16,9 +16,7 @@ import org.elasticsearch.plugins.PluginInfo; import org.elasticsearch.test.ESIntegTestCase.ClusterScope; import org.elasticsearch.test.discovery.TestZenDiscovery; import org.elasticsearch.tribe.TribePlugin; -import org.elasticsearch.xpack.XPackPlugin; -import org.elasticsearch.xpack.XPackSettings; -import org.elasticsearch.xpack.ml.MachineLearningField; +import org.elasticsearch.xpack.core.XPackSettings; import org.elasticsearch.xpack.monitoring.test.MonitoringIntegTestCase; import java.nio.file.Path; diff --git a/qa/tribe-tests-with-license/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringTribeTests.java b/qa/tribe-tests-with-license/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringTribeTests.java index 4babeaed06e..57607ebe752 100644 --- a/qa/tribe-tests-with-license/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringTribeTests.java +++ b/qa/tribe-tests-with-license/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringTribeTests.java @@ -7,9 +7,9 @@ package org.elasticsearch.xpack.monitoring; import org.elasticsearch.client.Client; import org.elasticsearch.license.TribeTransportTestCase; -import org.elasticsearch.xpack.XPackField; -import org.elasticsearch.xpack.monitoring.action.MonitoringBulkAction; -import org.elasticsearch.xpack.monitoring.action.MonitoringBulkRequest; +import org.elasticsearch.xpack.core.XPackField; +import org.elasticsearch.xpack.core.monitoring.action.MonitoringBulkAction; +import org.elasticsearch.xpack.core.monitoring.action.MonitoringBulkRequest; import java.util.Collections; import java.util.List; diff --git a/qa/tribe-tests-with-security/src/test/java/org/elasticsearch/test/TribeWithSecurityIT.java b/qa/tribe-tests-with-security/src/test/java/org/elasticsearch/test/TribeWithSecurityIT.java index 751e7523490..34ea85ee1ea 100644 --- a/qa/tribe-tests-with-security/src/test/java/org/elasticsearch/test/TribeWithSecurityIT.java +++ b/qa/tribe-tests-with-security/src/test/java/org/elasticsearch/test/TribeWithSecurityIT.java @@ -17,12 +17,12 @@ import org.elasticsearch.common.network.NetworkModule; import org.elasticsearch.common.settings.SecureString; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.transport.TransportAddress; +import org.elasticsearch.xpack.core.security.SecurityField; +import org.elasticsearch.xpack.core.security.action.role.GetRolesResponse; +import org.elasticsearch.xpack.core.security.action.role.PutRoleResponse; +import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; +import org.elasticsearch.xpack.core.security.client.SecurityClient; import org.elasticsearch.xpack.security.Security; -import org.elasticsearch.xpack.security.SecurityField; -import org.elasticsearch.xpack.security.action.role.GetRolesResponse; -import org.elasticsearch.xpack.security.action.role.PutRoleResponse; -import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken; -import org.elasticsearch.xpack.security.client.SecurityClient; import org.junit.After; import org.junit.AfterClass; diff --git a/qa/tribe-tests-with-security/src/test/java/org/elasticsearch/xpack/security/SecurityTribeTests.java b/qa/tribe-tests-with-security/src/test/java/org/elasticsearch/xpack/security/SecurityTribeTests.java index 82eaeef1c52..3b76ddd27b7 100644 --- a/qa/tribe-tests-with-security/src/test/java/org/elasticsearch/xpack/security/SecurityTribeTests.java +++ b/qa/tribe-tests-with-security/src/test/java/org/elasticsearch/xpack/security/SecurityTribeTests.java @@ -20,7 +20,6 @@ import org.elasticsearch.common.settings.SecureString; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.util.concurrent.ThreadContext; -import org.elasticsearch.common.util.set.Sets; import org.elasticsearch.env.Environment; import org.elasticsearch.env.NodeEnvironment; import org.elasticsearch.index.IndexNotFoundException; @@ -35,11 +34,12 @@ import org.elasticsearch.test.SecuritySettingsSourceField; import org.elasticsearch.test.discovery.TestZenDiscovery; import org.elasticsearch.tribe.TribePlugin; import org.elasticsearch.tribe.TribeService; -import org.elasticsearch.xpack.security.action.role.GetRolesResponse; -import org.elasticsearch.xpack.security.action.role.PutRoleResponse; -import org.elasticsearch.xpack.security.action.user.PutUserResponse; -import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken; -import org.elasticsearch.xpack.security.client.SecurityClient; +import org.elasticsearch.xpack.core.security.SecurityLifecycleServiceField; +import org.elasticsearch.xpack.core.security.action.role.GetRolesResponse; +import org.elasticsearch.xpack.core.security.action.role.PutRoleResponse; +import org.elasticsearch.xpack.core.security.action.user.PutUserResponse; +import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; +import org.elasticsearch.xpack.core.security.client.SecurityClient; import org.elasticsearch.xpack.security.support.IndexLifecycleManager; import org.junit.After; import org.junit.AfterClass; diff --git a/transport-client/src/main/java/org/elasticsearch/xpack/client/PreBuiltXPackTransportClient.java b/transport-client/src/main/java/org/elasticsearch/xpack/client/PreBuiltXPackTransportClient.java index 2dd69cc721d..cf4e5db92b0 100644 --- a/transport-client/src/main/java/org/elasticsearch/xpack/client/PreBuiltXPackTransportClient.java +++ b/transport-client/src/main/java/org/elasticsearch/xpack/client/PreBuiltXPackTransportClient.java @@ -12,10 +12,9 @@ import org.elasticsearch.common.network.NetworkModule; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.plugins.Plugin; import org.elasticsearch.transport.client.PreBuiltTransportClient; -import org.elasticsearch.xpack.XPackClientPlugin; -import org.elasticsearch.xpack.XPackPlugin; -import org.elasticsearch.xpack.security.Security; -import org.elasticsearch.xpack.security.SecurityField; +import org.elasticsearch.xpack.core.XPackClientPlugin; +import org.elasticsearch.xpack.core.XPackPlugin; +import org.elasticsearch.xpack.core.security.SecurityField; import java.util.Arrays; import java.util.Collection; diff --git a/transport-client/src/test/java/org/elasticsearch/xpack/client/PreBuiltXPackTransportClientTests.java b/transport-client/src/test/java/org/elasticsearch/xpack/client/PreBuiltXPackTransportClientTests.java index 23c4a31126f..f9808ce54fa 100644 --- a/transport-client/src/test/java/org/elasticsearch/xpack/client/PreBuiltXPackTransportClientTests.java +++ b/transport-client/src/test/java/org/elasticsearch/xpack/client/PreBuiltXPackTransportClientTests.java @@ -9,7 +9,7 @@ import com.carrotsearch.randomizedtesting.RandomizedTest; import org.elasticsearch.client.transport.TransportClient; import org.elasticsearch.common.network.NetworkModule; import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.xpack.security.SecurityField; +import org.elasticsearch.xpack.core.security.SecurityField; import org.junit.Test; import static org.junit.Assert.assertEquals;