You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2015/01/01 19:12:27 UTC
[32/32] syncope git commit: [SYNCOPE-620] JPA entities + basic tests
[SYNCOPE-620] JPA entities + basic tests
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/556d5186
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/556d5186
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/556d5186
Branch: refs/heads/2_0_X
Commit: 556d518625f25baee800203e6dd274aeb8e9f91b
Parents: 20390b0
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Thu Jan 1 19:11:28 2015 +0100
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Thu Jan 1 19:11:28 2015 +0100
----------------------------------------------------------------------
syncope620/common/lib/pom.xml | 6 +-
.../syncope/common/lib/AbstractBaseBean.java | 49 +
.../syncope/common/lib/SyncopeConstants.java | 52 +
.../lib/annotation/FormAttributeField.java | 36 +
.../common/lib/mod/AbstractAttributableMod.java | 111 ++
.../common/lib/mod/AbstractSubjectMod.java | 56 +
.../apache/syncope/common/lib/mod/AttrMod.java | 76 ++
.../lib/report/AbstractReportletConf.java | 50 +
.../common/lib/report/RoleReportletConf.java | 109 ++
.../common/lib/report/StaticReportletConf.java | 107 ++
.../common/lib/report/UserReportletConf.java | 114 ++
.../syncope/common/lib/report/package-info.java | 23 +
.../common/lib/to/AbstractAnnotatedBean.java | 108 ++
.../common/lib/to/AbstractAttributableTO.java | 86 ++
.../common/lib/to/AbstractSubjectTO.java | 68 ++
.../apache/syncope/common/lib/to/AttrTO.java | 92 ++
.../syncope/common/lib/to/ConnObjectTO.java | 58 +
.../syncope/common/lib/to/ConnPoolConfTO.java | 81 ++
.../syncope/common/lib/to/MembershipTO.java | 49 +
.../common/lib/to/PropagationStatus.java | 152 +++
.../apache/syncope/common/lib/to/RoleTO.java | 258 ++++
.../apache/syncope/common/lib/to/UserTO.java | 183 +++
.../common/lib/types/EntityViolationType.java | 63 +-
.../lib/types/PropagationTaskExecStatus.java | 47 +
.../syncope/common/lib/types/TaskType.java | 54 +
syncope620/pom.xml | 206 ++++
syncope620/server/persistence-api/pom.xml | 10 +-
.../persistence/api/RoleEntitlementUtil.java | 88 ++
.../validation/InvalidEntityException.java | 129 ++
.../InvalidPlainAttrValueException.java | 43 +
.../validation/ParsingValidationException.java | 30 +
.../api/attrvalue/validation/Validator.java | 27 +
.../api/content/ContentExporter.java | 28 +
.../persistence/api/content/ContentLoader.java | 25 +
.../persistence/api/dao/AttrTemplateDAO.java | 4 +-
.../syncope/persistence/api/dao/ConfDAO.java | 10 +-
.../persistence/api/dao/ConnInstanceDAO.java | 34 +
.../apache/syncope/persistence/api/dao/DAO.java | 6 +-
.../syncope/persistence/api/dao/DerAttrDAO.java | 15 +-
.../persistence/api/dao/DerSchemaDAO.java | 7 +-
.../persistence/api/dao/EntitlementDAO.java | 6 +-
.../api/dao/ExternalResourceDAO.java | 4 +-
.../syncope/persistence/api/dao/LoggerDAO.java | 4 +-
.../persistence/api/dao/MembershipDAO.java | 4 +-
.../persistence/api/dao/NormAttrDAO.java | 30 -
.../persistence/api/dao/NormAttrValueDAO.java | 36 -
.../persistence/api/dao/NormSchemaDAO.java | 38 -
.../persistence/api/dao/NotificationDAO.java | 4 +-
.../persistence/api/dao/PlainAttrDAO.java | 30 +
.../persistence/api/dao/PlainAttrValueDAO.java | 36 +
.../persistence/api/dao/PlainSchemaDAO.java | 38 +
.../syncope/persistence/api/dao/PolicyDAO.java | 2 +-
.../syncope/persistence/api/dao/ReportDAO.java | 4 +-
.../persistence/api/dao/ReportExecDAO.java | 4 +-
.../syncope/persistence/api/dao/RoleDAO.java | 12 +-
.../api/dao/SecurityQuestionDAO.java | 4 +-
.../syncope/persistence/api/dao/SubjectDAO.java | 20 +-
.../persistence/api/dao/SubjectSearchDAO.java | 17 +-
.../syncope/persistence/api/dao/TaskDAO.java | 23 +-
.../persistence/api/dao/TaskExecDAO.java | 7 +-
.../syncope/persistence/api/dao/UserDAO.java | 12 +-
.../syncope/persistence/api/dao/VirAttrDAO.java | 4 +-
.../persistence/api/dao/VirSchemaDAO.java | 7 +-
.../dao/validation/InvalidEntityException.java | 129 --
.../InvalidNormAttrValueException.java | 43 -
.../validation/ParsingValidationException.java | 30 -
.../api/dao/validation/Validator.java | 26 -
.../persistence/api/entity/AccountPolicy.java | 9 +-
.../syncope/persistence/api/entity/Attr.java | 2 +-
.../persistence/api/entity/AttrTemplate.java | 6 +-
.../persistence/api/entity/Attributable.java | 26 +-
.../api/entity/AttributableUtil.java | 23 +-
.../persistence/api/entity/ConnInstance.java | 8 +-
.../syncope/persistence/api/entity/DerAttr.java | 4 +-
.../api/entity/ExternalResource.java | 4 -
.../syncope/persistence/api/entity/Logger.java | 2 +-
.../syncope/persistence/api/entity/Mapping.java | 4 +-
.../persistence/api/entity/MappingItem.java | 4 +-
.../persistence/api/entity/NormAttr.java | 37 -
.../persistence/api/entity/NormAttrValue.java | 62 -
.../persistence/api/entity/NormSchema.java | 56 -
.../persistence/api/entity/Notification.java | 6 -
.../persistence/api/entity/PlainAttr.java | 37 +
.../api/entity/PlainAttrUniqueValue.java | 26 +
.../persistence/api/entity/PlainAttrValue.java | 62 +
.../persistence/api/entity/PlainSchema.java | 67 ++
.../persistence/api/entity/PushPolicy.java | 23 +
.../syncope/persistence/api/entity/Report.java | 8 +-
.../api/entity/ReportletConfInstance.java | 33 +
.../syncope/persistence/api/entity/Schema.java | 12 +-
.../syncope/persistence/api/entity/Subject.java | 6 +-
.../syncope/persistence/api/entity/VirAttr.java | 2 -
.../persistence/api/entity/VirSchema.java | 1 +
.../persistence/api/entity/conf/CNormAttr.java | 25 -
.../persistence/api/entity/conf/CPlainAttr.java | 39 +
.../api/entity/conf/CPlainAttrUniqueValue.java | 31 +
.../api/entity/conf/CPlainAttrValue.java | 28 +
.../api/entity/conf/CPlainSchema.java | 25 +
.../persistence/api/entity/conf/Conf.java | 12 +-
.../api/entity/membership/MDerAttr.java | 8 +-
.../api/entity/membership/MDerAttrTemplate.java | 3 +-
.../api/entity/membership/MDerSchema.java | 25 +
.../api/entity/membership/MNormAttr.java | 28 -
.../entity/membership/MNormAttrTemplate.java | 26 -
.../api/entity/membership/MNormAttrValue.java | 25 -
.../api/entity/membership/MPlainAttr.java | 42 +
.../entity/membership/MPlainAttrTemplate.java | 25 +
.../membership/MPlainAttrUniqueValue.java | 31 +
.../api/entity/membership/MPlainAttrValue.java | 28 +
.../api/entity/membership/MPlainSchema.java | 25 +
.../api/entity/membership/MVirAttr.java | 6 +
.../api/entity/membership/MVirAttrTemplate.java | 3 +-
.../api/entity/membership/MVirSchema.java | 25 +
.../api/entity/membership/Membership.java | 28 +-
.../persistence/api/entity/role/RDerAttr.java | 8 +-
.../api/entity/role/RDerAttrTemplate.java | 3 +-
.../persistence/api/entity/role/RDerSchema.java | 25 +
.../api/entity/role/RMappingItem.java | 4 +
.../persistence/api/entity/role/RNormAttr.java | 28 -
.../api/entity/role/RNormAttrTemplate.java | 26 -
.../api/entity/role/RNormAttrValue.java | 25 -
.../persistence/api/entity/role/RPlainAttr.java | 42 +
.../api/entity/role/RPlainAttrTemplate.java | 25 +
.../api/entity/role/RPlainAttrUniqueValue.java | 31 +
.../api/entity/role/RPlainAttrValue.java | 28 +
.../api/entity/role/RPlainSchema.java | 25 +
.../persistence/api/entity/role/RVirAttr.java | 6 +
.../api/entity/role/RVirAttrTemplate.java | 3 +-
.../persistence/api/entity/role/RVirSchema.java | 25 +
.../persistence/api/entity/role/Role.java | 26 +-
.../api/entity/task/NotificationTask.java | 2 -
.../persistence/api/entity/task/SyncTask.java | 11 +-
.../persistence/api/entity/task/Task.java | 7 +-
.../persistence/api/entity/user/UDerAttr.java | 8 +-
.../persistence/api/entity/user/UDerSchema.java | 25 +
.../api/entity/user/UMappingItem.java | 4 +
.../persistence/api/entity/user/UNormAttr.java | 25 -
.../api/entity/user/UNormAttrValue.java | 25 -
.../persistence/api/entity/user/UPlainAttr.java | 38 +
.../api/entity/user/UPlainAttrUniqueValue.java | 31 +
.../api/entity/user/UPlainAttrValue.java | 28 +
.../api/entity/user/UPlainSchema.java | 25 +
.../persistence/api/entity/user/UVirAttr.java | 6 +
.../persistence/api/entity/user/UVirSchema.java | 25 +
.../persistence/api/entity/user/User.java | 32 +-
syncope620/server/persistence-jpa/pom.xml | 224 ++++
.../attrvalue/validation/AbstractValidator.java | 54 +
.../validation/AlwaysTrueValidator.java | 40 +
.../attrvalue/validation/BasicValidator.java | 54 +
.../validation/EmailAddressValidator.java | 42 +
.../jpa/content/AbstractContentDealer.java | 88 ++
.../jpa/content/ContentLoaderHandler.java | 199 ++++
.../jpa/content/XMLContentLoader.java | 89 ++
.../persistence/jpa/dao/AbstractDAO.java | 117 ++
.../persistence/jpa/dao/AbstractSubjectDAO.java | 349 ++++++
.../persistence/jpa/dao/JPAAttrTemplateDAO.java | 107 ++
.../syncope/persistence/jpa/dao/JPAConfDAO.java | 106 ++
.../persistence/jpa/dao/JPAConnInstanceDAO.java | 90 ++
.../persistence/jpa/dao/JPADerAttrDAO.java | 86 ++
.../persistence/jpa/dao/JPADerSchemaDAO.java | 132 ++
.../persistence/jpa/dao/JPAEntitlementDAO.java | 88 ++
.../jpa/dao/JPAExternalResourceDAO.java | 254 ++++
.../persistence/jpa/dao/JPALoggerDAO.java | 69 ++
.../persistence/jpa/dao/JPAMembershipDAO.java | 87 ++
.../persistence/jpa/dao/JPANotificationDAO.java | 53 +
.../persistence/jpa/dao/JPAPlainAttrDAO.java | 76 ++
.../jpa/dao/JPAPlainAttrValueDAO.java | 104 ++
.../persistence/jpa/dao/JPAPlainSchemaDAO.java | 141 +++
.../persistence/jpa/dao/JPAPolicyDAO.java | 150 +++
.../persistence/jpa/dao/JPAReportDAO.java | 90 ++
.../persistence/jpa/dao/JPAReportExecDAO.java | 101 ++
.../syncope/persistence/jpa/dao/JPARoleDAO.java | 531 +++++++++
.../jpa/dao/JPASecurityQuestionDAO.java | 71 ++
.../jpa/dao/JPASubjectSearchDAO.java | 715 +++++++++++
.../syncope/persistence/jpa/dao/JPATaskDAO.java | 185 +++
.../persistence/jpa/dao/JPATaskExecDAO.java | 118 ++
.../syncope/persistence/jpa/dao/JPAUserDAO.java | 225 ++++
.../persistence/jpa/dao/JPAVirAttrDAO.java | 86 ++
.../persistence/jpa/dao/JPAVirSchemaDAO.java | 131 ++
.../persistence/jpa/dao/OrderBySupport.java | 47 +
.../persistence/jpa/dao/SearchSupport.java | 132 ++
.../jpa/entity/AbstractAnnotatedEntity.java | 113 ++
.../jpa/entity/AbstractAttrTemplate.java | 42 +
.../jpa/entity/AbstractAttributable.java | 106 ++
.../persistence/jpa/entity/AbstractDerAttr.java | 52 +
.../jpa/entity/AbstractDerSchema.java | 85 ++
.../persistence/jpa/entity/AbstractEntity.java | 112 ++
.../persistence/jpa/entity/AbstractExec.java | 114 ++
.../persistence/jpa/entity/AbstractMapping.java | 76 ++
.../jpa/entity/AbstractMappingItem.java | 190 +++
.../jpa/entity/AbstractPlainAttr.java | 81 ++
.../jpa/entity/AbstractPlainAttrValue.java | 282 +++++
.../jpa/entity/AbstractPlainSchema.java | 271 +++++
.../persistence/jpa/entity/AbstractSubject.java | 64 +
.../persistence/jpa/entity/AbstractVirAttr.java | 62 +
.../jpa/entity/AbstractVirSchema.java | 89 ++
.../jpa/entity/AnnotatedEntityListener.java | 54 +
.../jpa/entity/JPAAccountPolicy.java | 90 ++
.../jpa/entity/JPAAttributableUtil.java | 882 ++++++++++++++
.../persistence/jpa/entity/JPAConnInstance.java | 268 +++++
.../persistence/jpa/entity/JPAConnPoolConf.java | 107 ++
.../persistence/jpa/entity/JPAEntitlement.java | 62 +
.../jpa/entity/JPAExternalResource.java | 426 +++++++
.../persistence/jpa/entity/JPALogger.java | 80 ++
.../persistence/jpa/entity/JPANotification.java | 262 ++++
.../jpa/entity/JPAPasswordPolicy.java | 43 +
.../persistence/jpa/entity/JPAPolicy.java | 90 ++
.../persistence/jpa/entity/JPAPushPolicy.java | 42 +
.../persistence/jpa/entity/JPAReport.java | 150 +++
.../persistence/jpa/entity/JPAReportExec.java | 87 ++
.../jpa/entity/JPAReportletConfInstance.java | 77 ++
.../jpa/entity/JPASecurityQuestion.java | 56 +
.../persistence/jpa/entity/JPASyncPolicy.java | 43 +
.../jpa/entity/conf/JPACPlainAttr.java | 150 +++
.../entity/conf/JPACPlainAttrUniqueValue.java | 78 ++
.../jpa/entity/conf/JPACPlainAttrValue.java | 64 +
.../jpa/entity/conf/JPACPlainSchema.java | 36 +
.../persistence/jpa/entity/conf/JPAConf.java | 116 ++
.../jpa/entity/membership/JPAMDerAttr.java | 82 ++
.../entity/membership/JPAMDerAttrTemplate.java | 67 ++
.../jpa/entity/membership/JPAMDerSchema.java | 34 +
.../jpa/entity/membership/JPAMPlainAttr.java | 141 +++
.../membership/JPAMPlainAttrTemplate.java | 68 ++
.../membership/JPAMPlainAttrUniqueValue.java | 78 ++
.../entity/membership/JPAMPlainAttrValue.java | 64 +
.../jpa/entity/membership/JPAMPlainSchema.java | 36 +
.../jpa/entity/membership/JPAMVirAttr.java | 81 ++
.../entity/membership/JPAMVirAttrTemplate.java | 67 ++
.../jpa/entity/membership/JPAMVirSchema.java | 36 +
.../jpa/entity/membership/JPAMembership.java | 195 +++
.../jpa/entity/role/JPARDerAttr.java | 82 ++
.../jpa/entity/role/JPARDerAttrTemplate.java | 66 +
.../jpa/entity/role/JPARDerSchema.java | 34 +
.../jpa/entity/role/JPARMapping.java | 103 ++
.../jpa/entity/role/JPARMappingItem.java | 58 +
.../jpa/entity/role/JPARPlainAttr.java | 140 +++
.../jpa/entity/role/JPARPlainAttrTemplate.java | 66 +
.../entity/role/JPARPlainAttrUniqueValue.java | 78 ++
.../jpa/entity/role/JPARPlainAttrValue.java | 64 +
.../jpa/entity/role/JPARPlainSchema.java | 36 +
.../jpa/entity/role/JPARVirAttr.java | 82 ++
.../jpa/entity/role/JPARVirAttrTemplate.java | 66 +
.../jpa/entity/role/JPARVirSchema.java | 36 +
.../persistence/jpa/entity/role/JPARole.java | 593 +++++++++
.../entity/task/AbstractProvisioningTask.java | 168 +++
.../jpa/entity/task/JPANotificationTask.java | 160 +++
.../jpa/entity/task/JPAPropagationTask.java | 199 ++++
.../jpa/entity/task/JPAPushTask.java | 82 ++
.../jpa/entity/task/JPASchedTask.java | 89 ++
.../jpa/entity/task/JPASyncTask.java | 110 ++
.../persistence/jpa/entity/task/JPATask.java | 96 ++
.../jpa/entity/task/JPATaskExec.java | 82 ++
.../jpa/entity/user/JPAUDerAttr.java | 67 ++
.../jpa/entity/user/JPAUDerSchema.java | 34 +
.../jpa/entity/user/JPAUMapping.java | 125 ++
.../jpa/entity/user/JPAUMappingItem.java | 58 +
.../jpa/entity/user/JPAUPlainAttr.java | 147 +++
.../entity/user/JPAUPlainAttrUniqueValue.java | 79 ++
.../jpa/entity/user/JPAUPlainAttrValue.java | 64 +
.../jpa/entity/user/JPAUPlainSchema.java | 36 +
.../jpa/entity/user/JPAUVirAttr.java | 67 ++
.../jpa/entity/user/JPAUVirSchema.java | 36 +
.../persistence/jpa/entity/user/JPAUser.java | 536 +++++++++
.../validation/entity/AbstractValidator.java | 46 +
.../validation/entity/ConnInstanceCheck.java | 41 +
.../entity/ConnInstanceValidator.java | 64 +
.../entity/EntityValidationListener.java | 51 +
.../entity/ExternalResourceCheck.java | 41 +
.../entity/ExternalResourceValidator.java | 130 ++
.../validation/entity/NotificationCheck.java | 41 +
.../entity/NotificationValidator.java | 59 +
.../jpa/validation/entity/PlainAttrCheck.java | 41 +
.../validation/entity/PlainAttrValidator.java | 59 +
.../validation/entity/PlainAttrValueCheck.java | 41 +
.../entity/PlainAttrValueValidator.java | 98 ++
.../jpa/validation/entity/PlainSchemaCheck.java | 41 +
.../validation/entity/PlainSchemaValidator.java | 61 +
.../jpa/validation/entity/PolicyCheck.java | 41 +
.../jpa/validation/entity/PolicyValidator.java | 59 +
.../validation/entity/PropagationTaskCheck.java | 41 +
.../entity/PropagationTaskValidator.java | 65 +
.../entity/ProvisioningTaskCheck.java | 41 +
.../entity/ProvisioningTaskValidator.java | 84 ++
.../jpa/validation/entity/ReportCheck.java | 41 +
.../jpa/validation/entity/ReportValidator.java | 67 ++
.../jpa/validation/entity/RoleCheck.java | 41 +
.../jpa/validation/entity/RoleValidator.java | 44 +
.../jpa/validation/entity/SchedTaskCheck.java | 41 +
.../validation/entity/SchedTaskValidator.java | 68 ++
.../jpa/validation/entity/SchemaNameCheck.java | 41 +
.../validation/entity/SchemaNameValidator.java | 133 +++
.../jpa/validation/entity/UserCheck.java | 42 +
.../jpa/validation/entity/UserValidator.java | 194 +++
.../src/main/resources/META-INF/orm.xml | 355 ++++++
.../resources/META-INF/spring-persistence.xml | 31 +
.../src/main/resources/audit/audit.sql | 24 +
.../main/resources/audit/audit_mysql_innodb.sql | 24 +
.../src/main/resources/audit/audit_oracle.sql | 38 +
.../main/resources/audit/audit_sqlserver.sql | 28 +
.../src/main/resources/content.xml | 183 +++
.../src/main/resources/indexes.xml | 40 +
.../src/main/resources/persistence.properties | 27 +
.../src/main/resources/persistenceContext.xml | 136 +++
.../resources/persistenceContextEMFactory.xml | 56 +
.../src/main/resources/quartz/tables_h2.sql | 266 +++++
.../src/main/resources/quartz/tables_mysql.sql | 206 ++++
.../resources/quartz/tables_mysql_innodb.sql | 221 ++++
.../src/main/resources/quartz/tables_oracle.sql | 208 ++++
.../main/resources/quartz/tables_postgres.sql | 204 ++++
.../main/resources/quartz/tables_sqlServer.sql | 296 +++++
.../src/main/resources/views.xml | 149 +++
.../syncope/persistence/jpa/AbstractTest.java | 28 +
.../persistence/jpa/DummyConnectorRegistry.java | 37 +
.../persistence/jpa/TestInitializer.java | 37 +
.../persistence/jpa/entity/AttrTest.java | 237 ++++
.../jpa/entity/AttributableSearchTest.java | 484 ++++++++
.../persistence/jpa/entity/ConfTest.java | 109 ++
.../jpa/entity/ConnInstanceTest.java | 145 +++
.../persistence/jpa/entity/DerAttrTest.java | 280 +++++
.../persistence/jpa/entity/DerSchemaTest.java | 104 ++
.../persistence/jpa/entity/EntitlementTest.java | 72 ++
.../persistence/jpa/entity/MembershipTest.java | 85 ++
.../jpa/entity/NotificationTest.java | 132 ++
.../persistence/jpa/entity/PlainSchemaTest.java | 162 +++
.../persistence/jpa/entity/PolicyTest.java | 152 +++
.../persistence/jpa/entity/ReportTest.java | 83 ++
.../persistence/jpa/entity/ResourceTest.java | 268 +++++
.../persistence/jpa/entity/RoleTest.java | 143 +++
.../jpa/entity/SecurityQuestionTest.java | 68 ++
.../persistence/jpa/entity/TaskExecTest.java | 96 ++
.../persistence/jpa/entity/TaskTest.java | 118 ++
.../persistence/jpa/entity/UserTest.java | 213 ++++
.../persistence/jpa/entity/VirAttrTest.java | 145 +++
.../persistence/jpa/entity/VirSchemaTest.java | 103 ++
.../jpa/relationship/EntitlementTest.java | 57 +
.../src/test/resources/content.xml | 1125 ++++++++++++++++++
.../src/test/resources/persistence.properties | 28 +
.../src/test/resources/persistenceTestEnv.xml | 49 +
.../src/test/resources/simplelogger.properties | 17 +
syncope620/server/pom.xml | 6 +-
syncope620/server/provisioning-api/pom.xml | 54 +
.../provisioning/api/ConnPoolConfUtil.java | 69 ++
.../syncope/provisioning/api/Connector.java | 216 ++++
.../provisioning/api/ConnectorFactory.java | 63 +
.../provisioning/api/ConnectorRegistry.java | 41 +
.../provisioning/api/job/ProvisioningJob.java | 28 +
.../syncope/provisioning/api/job/PushJob.java | 26 +
.../syncope/provisioning/api/job/SyncJob.java | 26 +
.../syncope/provisioning/api/job/TaskJob.java | 43 +
.../api/propagation/PropagationActions.java | 30 +
.../api/sync/ProvisioningActions.java | 42 +
.../provisioning/api/sync/PushActions.java | 137 +++
.../provisioning/api/sync/SyncActions.java | 175 +++
.../provisioning/api/sync/SyncProfile.java | 84 ++
.../provisioning/api/sync/SyncResult.java | 140 +++
.../api/sync/SyncopeResultHandler.java | 29 +
syncope620/server/security/pom.xml | 76 ++
.../server/security/AuthContextUtil.java | 55 +
.../syncope/server/security/Encryptor.java | 256 ++++
.../server/security/SecureRandomUtil.java | 44 +
.../src/main/resources/security.properties | 30 +
syncope620/server/spring/pom.xml | 48 +
.../spring/ApplicationContextProvider.java | 47 +
.../apache/syncope/server/spring/BeanUtils.java | 201 ++++
.../spring/ResourceWithFallbackLoader.java | 82 ++
syncope620/server/utils/pom.xml | 75 ++
.../apache/syncope/server/utils/DataFormat.java | 117 ++
.../apache/syncope/server/utils/URIUtil.java | 61 +
.../utils/jexl/ClassFreeUberspectImpl.java | 43 +
.../server/utils/jexl/EmptyClassLoader.java | 36 +
.../syncope/server/utils/jexl/JexlUtil.java | 289 +++++
.../utils/policy/AccountPolicyEnforcer.java | 101 ++
.../utils/policy/AccountPolicyException.java | 32 +
.../utils/policy/PasswordPolicyEnforcer.java | 202 ++++
.../utils/policy/PasswordPolicyException.java | 32 +
.../utils/policy/PolicyEnforceException.java | 32 +
.../server/utils/policy/PolicyEnforcer.java | 30 +
.../server/utils/policy/PolicyEvaluator.java | 109 ++
.../server/utils/policy/PolicyException.java | 32 +
.../server/utils/policy/PolicyPattern.java | 50 +
.../server/utils/policy/UserSuspender.java | 26 +
.../serialization/AttributeDeserializer.java | 84 ++
.../serialization/AttributeSerializer.java | 78 ++
.../GuardedStringDeserializer.java | 94 ++
.../serialization/GuardedStringSerializer.java | 90 ++
.../server/utils/serialization/POJOHelper.java | 80 ++
.../serialization/SyncTokenDeserializer.java | 65 +
.../serialization/SyncTokenSerializer.java | 58 +
388 files changed, 31675 insertions(+), 1000 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/common/lib/pom.xml
----------------------------------------------------------------------
diff --git a/syncope620/common/lib/pom.xml b/syncope620/common/lib/pom.xml
index 4c9cccc..d52f136 100644
--- a/syncope620/common/lib/pom.xml
+++ b/syncope620/common/lib/pom.xml
@@ -30,7 +30,7 @@ under the License.
<name>Apache Syncope Common Lib</name>
<description>Apache Syncope Common Lib</description>
<groupId>org.apache.syncope.common</groupId>
- <artifactId>syncope-lib</artifactId>
+ <artifactId>syncope-common-lib</artifactId>
<packaging>jar</packaging>
<dependencies>
@@ -45,6 +45,10 @@ under the License.
</dependency>
<dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
</dependency>
http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/AbstractBaseBean.java
----------------------------------------------------------------------
diff --git a/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/AbstractBaseBean.java b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/AbstractBaseBean.java
new file mode 100644
index 0000000..28bd4bd
--- /dev/null
+++ b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/AbstractBaseBean.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.common.lib;
+
+import java.io.Serializable;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+@XmlType
+// Reporting here only classes used via PagedResult
+//@XmlSeeAlso({ AbstractTaskTO.class, ReportTO.class, RoleTO.class, UserTO.class })
+public abstract class AbstractBaseBean implements Serializable {
+
+ private static final long serialVersionUID = 3119542005279892164L;
+
+ @Override
+ public boolean equals(final Object obj) {
+ return EqualsBuilder.reflectionEquals(this, obj);
+ }
+
+ @Override
+ public int hashCode() {
+ return HashCodeBuilder.reflectionHashCode(this);
+ }
+
+ @Override
+ public String toString() {
+ return ReflectionToStringBuilder.toString(this, ToStringStyle.MULTI_LINE_STYLE);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/SyncopeConstants.java
----------------------------------------------------------------------
diff --git a/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/SyncopeConstants.java b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/SyncopeConstants.java
new file mode 100644
index 0000000..817b00d
--- /dev/null
+++ b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/SyncopeConstants.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.common.lib;
+
+import java.util.regex.Pattern;
+
+public class SyncopeConstants {
+
+ public static final String NAMESPACE = "http://syncope.apache.org/2.0";
+
+ public static final String UNAUTHENTICATED = "unauthenticated";
+
+ public static final String ANONYMOUS_ENTITLEMENT = "anonymous";
+
+ public static final String ENUM_VALUES_SEPARATOR = ";";
+
+ public static final String[] DATE_PATTERNS = {
+ "yyyy-MM-dd'T'HH:mm:ssZ",
+ "EEE, dd MMM yyyy HH:mm:ss z",
+ "yyyy-MM-dd'T'HH:mm:ssz",
+ "yyyy-MM-dd HH:mm:ss",
+ "yyyy-MM-dd HH:mm:ss.S", // explicitly added to import date into MySql repository
+ "yyyy-MM-dd" };
+
+ public static final String DEFAULT_DATE_PATTERN = "yyyy-MM-dd'T'HH:mm:ssZ";
+
+ public static final String DEFAULT_ENCODING = "UTF-8";
+
+ public static final String ROOT_LOGGER = "ROOT";
+
+ public static final Pattern EMAIL_PATTERN = Pattern.compile(
+ "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*"
+ + "@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
+ Pattern.CASE_INSENSITIVE);
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/annotation/FormAttributeField.java
----------------------------------------------------------------------
diff --git a/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/annotation/FormAttributeField.java b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/annotation/FormAttributeField.java
new file mode 100644
index 0000000..f007020
--- /dev/null
+++ b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/annotation/FormAttributeField.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.common.lib.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import org.apache.syncope.common.lib.types.IntMappingType;
+
+@Target({ ElementType.FIELD })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface FormAttributeField {
+
+ boolean userSearch() default false;
+
+ boolean roleSearch() default false;
+
+ IntMappingType schema() default IntMappingType.UserSchema;
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/mod/AbstractAttributableMod.java
----------------------------------------------------------------------
diff --git a/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/mod/AbstractAttributableMod.java b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/mod/AbstractAttributableMod.java
new file mode 100644
index 0000000..7339565
--- /dev/null
+++ b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/mod/AbstractAttributableMod.java
@@ -0,0 +1,111 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.common.lib.mod;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.HashSet;
+import java.util.Set;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.AbstractBaseBean;
+
+/**
+ * Abstract base class for objects that can have attributes removed, added or updated.
+ *
+ * Attributes can be regular attributes, derived attributes, virtual attributes and resources.
+ */
+@XmlType
+public abstract class AbstractAttributableMod extends AbstractBaseBean {
+
+ private static final long serialVersionUID = 3241118574016303198L;
+
+ protected long key;
+
+ protected final Set<AttrMod> attrsToUpdate = new HashSet<>();
+
+ protected final Set<String> attrsToRemove = new HashSet<>();
+
+ protected final Set<String> derAttrsToAdd = new HashSet<>();
+
+ protected final Set<String> derAttrsToRemove = new HashSet<>();
+
+ protected final Set<AttrMod> virAttrsToUpdate = new HashSet<>();
+
+ protected final Set<String> virAttrsToRemove = new HashSet<>();
+
+ public long getKey() {
+ return key;
+ }
+
+ public void setKey(final long key) {
+ this.key = key;
+ }
+
+ @XmlElementWrapper(name = "attributesToRemove")
+ @XmlElement(name = "attribute")
+ @JsonProperty("attributesToRemove")
+ public Set<String> getAttrsToRemove() {
+ return attrsToRemove;
+ }
+
+ @XmlElementWrapper(name = "attributesToUpdate")
+ @XmlElement(name = "attributeMod")
+ @JsonProperty("attributesToUpdate")
+ public Set<AttrMod> getAttrsToUpdate() {
+ return attrsToUpdate;
+ }
+
+ @XmlElementWrapper(name = "derAttrsToAdd")
+ @XmlElement(name = "attribute")
+ @JsonProperty("derAttrsToAdd")
+ public Set<String> getDerAttrsToAdd() {
+ return derAttrsToAdd;
+ }
+
+ @XmlElementWrapper(name = "derAttrsToRemove")
+ @XmlElement(name = "attribute")
+ @JsonProperty("derAttrsToRemove")
+ public Set<String> getDerAttrsToRemove() {
+ return derAttrsToRemove;
+ }
+
+ @XmlElementWrapper(name = "virAttrsToRemove")
+ @XmlElement(name = "attribute")
+ @JsonProperty("virAttrsToRemove")
+ public Set<String> getVirAttrsToRemove() {
+ return virAttrsToRemove;
+ }
+
+ @XmlElementWrapper(name = "virAttrsToUpdate")
+ @XmlElement(name = "attribute")
+ @JsonProperty("virAttrsToUpdate")
+ public Set<AttrMod> getVirAttrsToUpdate() {
+ return virAttrsToUpdate;
+ }
+
+ /**
+ * @return true is all backing Sets are empty.
+ */
+ public boolean isEmpty() {
+ return attrsToUpdate.isEmpty() && attrsToRemove.isEmpty()
+ && derAttrsToAdd.isEmpty() && derAttrsToRemove.isEmpty()
+ && virAttrsToUpdate.isEmpty() && virAttrsToRemove.isEmpty();
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/mod/AbstractSubjectMod.java
----------------------------------------------------------------------
diff --git a/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/mod/AbstractSubjectMod.java b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/mod/AbstractSubjectMod.java
new file mode 100644
index 0000000..96e2a64
--- /dev/null
+++ b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/mod/AbstractSubjectMod.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.common.lib.mod;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.HashSet;
+import java.util.Set;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlType
+public abstract class AbstractSubjectMod extends AbstractAttributableMod {
+
+ private static final long serialVersionUID = -6404459635536484024L;
+
+ protected final Set<String> resourcesToAdd = new HashSet<>();
+
+ protected final Set<String> resourcesToRemove = new HashSet<>();
+
+ @XmlElementWrapper(name = "resourcesToAdd")
+ @XmlElement(name = "resource")
+ @JsonProperty("resourcesToAdd")
+ public Set<String> getResourcesToAdd() {
+ return resourcesToAdd;
+ }
+
+ @XmlElementWrapper(name = "resourcesToRemove")
+ @XmlElement(name = "resource")
+ @JsonProperty("resourcesToRemove")
+ public Set<String> getResourcesToRemove() {
+ return resourcesToRemove;
+ }
+
+ @Override
+ public boolean isEmpty() {
+ return super.isEmpty() && resourcesToAdd.isEmpty() && resourcesToRemove.isEmpty();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/mod/AttrMod.java
----------------------------------------------------------------------
diff --git a/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/mod/AttrMod.java b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/mod/AttrMod.java
new file mode 100644
index 0000000..b0cee5b
--- /dev/null
+++ b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/mod/AttrMod.java
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.common.lib.mod;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.AbstractBaseBean;
+
+@XmlRootElement
+@XmlType
+public class AttrMod extends AbstractBaseBean {
+
+ private static final long serialVersionUID = -913573979137431406L;
+
+ private String schema;
+
+ private List<String> valuesToBeAdded;
+
+ private List<String> valuesToBeRemoved;
+
+ public AttrMod() {
+ super();
+
+ valuesToBeAdded = new ArrayList<>();
+ valuesToBeRemoved = new ArrayList<>();
+ }
+
+ public String getSchema() {
+ return schema;
+ }
+
+ public void setSchema(final String schema) {
+ this.schema = schema;
+ }
+
+ @XmlElementWrapper(name = "valuesToBeAdded")
+ @XmlElement(name = "value")
+ @JsonProperty("valuesToBeAdded")
+ public List<String> getValuesToBeAdded() {
+ return valuesToBeAdded;
+ }
+
+ @XmlElementWrapper(name = "valuesToBeRemoved")
+ @XmlElement(name = "value")
+ @JsonProperty("valuesToBeRemoved")
+ public List<String> getValuesToBeRemoved() {
+ return valuesToBeRemoved;
+ }
+
+ @JsonIgnore
+ public boolean isEmpty() {
+ return valuesToBeAdded.isEmpty() && valuesToBeRemoved.isEmpty();
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/report/AbstractReportletConf.java
----------------------------------------------------------------------
diff --git a/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/report/AbstractReportletConf.java b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/report/AbstractReportletConf.java
new file mode 100644
index 0000000..6efdb32
--- /dev/null
+++ b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/report/AbstractReportletConf.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.common.lib.report;
+
+import javax.xml.bind.annotation.XmlSeeAlso;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.AbstractBaseBean;
+
+@XmlType
+@XmlSeeAlso({ StaticReportletConf.class, UserReportletConf.class, RoleReportletConf.class })
+public abstract class AbstractReportletConf extends AbstractBaseBean implements ReportletConf {
+
+ private static final long serialVersionUID = -6130008602014516608L;
+
+ private String name;
+
+ public AbstractReportletConf() {
+ this("");
+ setName(getClass().getName());
+ }
+
+ public AbstractReportletConf(final String name) {
+ this.name = name;
+ }
+
+ @Override
+ public final String getName() {
+ return name;
+ }
+
+ public final void setName(final String name) {
+ this.name = name;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/report/RoleReportletConf.java
----------------------------------------------------------------------
diff --git a/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/report/RoleReportletConf.java b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/report/RoleReportletConf.java
new file mode 100644
index 0000000..55e2da9
--- /dev/null
+++ b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/report/RoleReportletConf.java
@@ -0,0 +1,109 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.common.lib.report;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.annotation.FormAttributeField;
+import org.apache.syncope.common.lib.types.IntMappingType;
+
+@XmlRootElement(name = "roleReportletConf")
+@XmlType
+public class RoleReportletConf extends AbstractReportletConf {
+
+ private static final long serialVersionUID = -8488503068032439699L;
+
+ @XmlEnum
+ @XmlType(name = "roleReportletConfFeature")
+ public enum Feature {
+
+ id,
+ name,
+ roleOwner,
+ userOwner,
+ entitlements,
+ users,
+ resources
+
+ }
+
+ @FormAttributeField(userSearch = true)
+ private String matchingCond;
+
+ @FormAttributeField(schema = IntMappingType.RoleSchema)
+ private final List<String> attrs = new ArrayList<String>();
+
+ @FormAttributeField(schema = IntMappingType.RoleDerivedSchema)
+ private final List<String> derAttrs = new ArrayList<String>();
+
+ @FormAttributeField(schema = IntMappingType.RoleVirtualSchema)
+ private final List<String> virAttrs = new ArrayList<String>();
+
+ private final List<Feature> features = new ArrayList<Feature>();
+
+ public RoleReportletConf() {
+ super();
+ }
+
+ public RoleReportletConf(final String name) {
+ super(name);
+ }
+
+ @XmlElementWrapper(name = "attributes")
+ @XmlElement(name = "attribute")
+ @JsonProperty("attributes")
+ public List<String> getAttrs() {
+ return attrs;
+ }
+
+ @XmlElementWrapper(name = "derivedAttributes")
+ @XmlElement(name = "attribute")
+ @JsonProperty("derivedAttributes")
+ public List<String> getDerAttrs() {
+ return derAttrs;
+ }
+
+ @XmlElementWrapper(name = "virtualAttributes")
+ @XmlElement(name = "attribute")
+ @JsonProperty("virtualAttributes")
+ public List<String> getVirAttrs() {
+ return virAttrs;
+ }
+
+ @XmlElementWrapper(name = "features")
+ @XmlElement(name = "feature")
+ @JsonProperty("features")
+ public List<Feature> getFeatures() {
+ return features;
+ }
+
+ public String getMatchingCond() {
+ return matchingCond;
+ }
+
+ public void setMatchingCond(final String matchingCond) {
+ this.matchingCond = matchingCond;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/report/StaticReportletConf.java
----------------------------------------------------------------------
diff --git a/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/report/StaticReportletConf.java b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/report/StaticReportletConf.java
new file mode 100644
index 0000000..9160089
--- /dev/null
+++ b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/report/StaticReportletConf.java
@@ -0,0 +1,107 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.common.lib.report;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.types.TraceLevel;
+
+@XmlRootElement(name = "staticReportletConf")
+@XmlType
+public class StaticReportletConf extends AbstractReportletConf {
+
+ private static final long serialVersionUID = -4814950086361753689L;
+
+ private String stringField;
+
+ private Long longField;
+
+ private Double doubleField;
+
+ private Date dateField;
+
+ private TraceLevel traceLevel;
+
+ private final List<String> listField = new ArrayList<String>();
+
+ public StaticReportletConf() {
+ super();
+ }
+
+ public StaticReportletConf(final String name) {
+ super(name);
+ }
+
+ public Date getDateField() {
+ return dateField == null
+ ? null
+ : new Date(dateField.getTime());
+ }
+
+ public void setDateField(Date dateField) {
+ this.dateField = dateField == null
+ ? null
+ : new Date(dateField.getTime());
+ }
+
+ public Double getDoubleField() {
+ return doubleField;
+ }
+
+ public void setDoubleField(Double doubleField) {
+ this.doubleField = doubleField;
+ }
+
+ @XmlElementWrapper(name = "listField")
+ @XmlElement(name = "field")
+ @JsonProperty("listField")
+ public List<String> getListField() {
+ return listField;
+ }
+
+ public Long getLongField() {
+ return longField;
+ }
+
+ public void setLongField(Long longField) {
+ this.longField = longField;
+ }
+
+ public String getStringField() {
+ return stringField;
+ }
+
+ public void setStringField(String stringField) {
+ this.stringField = stringField;
+ }
+
+ public TraceLevel getTraceLevel() {
+ return traceLevel;
+ }
+
+ public void setTraceLevel(TraceLevel traceLevel) {
+ this.traceLevel = traceLevel;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/report/UserReportletConf.java
----------------------------------------------------------------------
diff --git a/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/report/UserReportletConf.java b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/report/UserReportletConf.java
new file mode 100644
index 0000000..2c6ed17
--- /dev/null
+++ b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/report/UserReportletConf.java
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.common.lib.report;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.annotation.FormAttributeField;
+import org.apache.syncope.common.lib.types.IntMappingType;
+
+@XmlRootElement(name = "userReportletConf")
+@XmlType
+public class UserReportletConf extends AbstractReportletConf {
+
+ @XmlEnum
+ @XmlType(name = "userReportletConfFeature")
+ public enum Feature {
+
+ id,
+ username,
+ workflowId,
+ status,
+ creationDate,
+ lastLoginDate,
+ changePwdDate,
+ passwordHistorySize,
+ failedLoginCount,
+ memberships,
+ resources
+
+ }
+
+ private static final long serialVersionUID = 6602717600064602764L;
+
+ @FormAttributeField(userSearch = true)
+ private String matchingCond;
+
+ @FormAttributeField(schema = IntMappingType.UserSchema)
+ private final List<String> attrs = new ArrayList<String>();
+
+ @FormAttributeField(schema = IntMappingType.UserDerivedSchema)
+ private final List<String> derAttrs = new ArrayList<String>();
+
+ @FormAttributeField(schema = IntMappingType.UserVirtualSchema)
+ private final List<String> virAttrs = new ArrayList<String>();
+
+ private final List<Feature> features = new ArrayList<Feature>();
+
+ public UserReportletConf() {
+ super();
+ }
+
+ public UserReportletConf(final String name) {
+ super(name);
+ }
+
+ @XmlElementWrapper(name = "attributes")
+ @XmlElement(name = "attribute")
+ @JsonProperty("attributes")
+ public List<String> getAttrs() {
+ return attrs;
+ }
+
+ @XmlElementWrapper(name = "derivedAttributes")
+ @XmlElement(name = "attribute")
+ @JsonProperty("derivedAttributes")
+ public List<String> getDerAttrs() {
+ return derAttrs;
+ }
+
+ @XmlElementWrapper(name = "virtualAttributes")
+ @XmlElement(name = "attribute")
+ @JsonProperty("virtualAttributes")
+ public List<String> getVirAttrs() {
+ return virAttrs;
+ }
+
+ @XmlElementWrapper(name = "features")
+ @XmlElement(name = "feature")
+ @JsonProperty("features")
+ public List<Feature> getFeatures() {
+ return features;
+ }
+
+ public String getMatchingCond() {
+ return matchingCond;
+ }
+
+ public void setMatchingCond(final String matchingCond) {
+ this.matchingCond = matchingCond;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/report/package-info.java
----------------------------------------------------------------------
diff --git a/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/report/package-info.java b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/report/package-info.java
new file mode 100644
index 0000000..bc452c1
--- /dev/null
+++ b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/report/package-info.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+@XmlSchema(namespace = SyncopeConstants.NAMESPACE)
+package org.apache.syncope.common.lib.report;
+
+import javax.xml.bind.annotation.XmlSchema;
+import org.apache.syncope.common.lib.SyncopeConstants;
http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractAnnotatedBean.java
----------------------------------------------------------------------
diff --git a/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractAnnotatedBean.java b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractAnnotatedBean.java
new file mode 100644
index 0000000..c0f7155
--- /dev/null
+++ b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractAnnotatedBean.java
@@ -0,0 +1,108 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.common.lib.to;
+
+import org.apache.syncope.common.lib.AbstractBaseBean;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import java.util.Date;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.commons.lang3.StringUtils;
+
+/**
+ * Abstract wrapper for common system information.
+ */
+@XmlType
+public class AbstractAnnotatedBean extends AbstractBaseBean {
+
+ private static final long serialVersionUID = -930797879027642457L;
+
+ /**
+ * Username of the user that has created this profile.
+ * <p>
+ * Cannot be used a reference to an existing user for two main reasons: the creator can be the user <tt>admin</tt>;
+ * the creator could have been removed.
+ */
+ private String creator;
+
+ /**
+ * Creation date.
+ */
+ private Date creationDate;
+
+ /**
+ * Username of the user that has performed the last modification to this profile.
+ * <p>
+ * This field cannot be null: at creation time it have to be initialized with the creator username.
+ * <p>
+ * The modifier can be the user itself whether the last performed change has been a self-modification.
+ * <p>
+ * Cannot be used a reference to an existing user for two main reasons: the modifier can be the user <tt>admin</tt>;
+ * the modifier could have been removed.
+ */
+ private String lastModifier;
+
+ /**
+ * Last change date.
+ * <p>
+ * This field cannot be null: at creation time it has to be initialized with <tt>creationDate</tt> field value.
+ */
+ private Date lastChangeDate;
+
+ public String getCreator() {
+ return creator;
+ }
+
+ public void setCreator(final String creator) {
+ this.creator = creator;
+ }
+
+ public Date getCreationDate() {
+ return creationDate;
+ }
+
+ public void setCreationDate(final Date creationDate) {
+ this.creationDate = creationDate;
+ }
+
+ public String getLastModifier() {
+ return lastModifier;
+ }
+
+ public void setLastModifier(final String lastModifier) {
+ this.lastModifier = lastModifier;
+ }
+
+ public Date getLastChangeDate() {
+ return lastChangeDate;
+ }
+
+ public void setLastChangeDate(final Date lastChangeDate) {
+ this.lastChangeDate = lastChangeDate;
+ }
+
+ @JsonIgnore
+ public String getETagValue() {
+ Date etagDate = getLastChangeDate() == null
+ ? getCreationDate() : getLastChangeDate();
+ return etagDate == null
+ ? StringUtils.EMPTY
+ : String.valueOf(etagDate.getTime());
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractAttributableTO.java
----------------------------------------------------------------------
diff --git a/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractAttributableTO.java b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractAttributableTO.java
new file mode 100644
index 0000000..5cb48bb
--- /dev/null
+++ b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractAttributableTO.java
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.common.lib.to;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlType
+public abstract class AbstractAttributableTO extends ConnObjectTO {
+
+ private static final long serialVersionUID = 4083884098736820255L;
+
+ private long id;
+
+ private final List<AttrTO> derAttrs = new ArrayList<>();
+
+ private final List<AttrTO> virAttrs = new ArrayList<>();
+
+ public long getId() {
+ return id;
+ }
+
+ public void setId(final long id) {
+ this.id = id;
+ }
+
+ @JsonIgnore
+ public Map<String, AttrTO> getDerAttrMap() {
+ Map<String, AttrTO> result = new HashMap<>(derAttrs.size());
+ for (AttrTO attributeTO : derAttrs) {
+ result.put(attributeTO.getSchema(), attributeTO);
+ }
+ result = Collections.unmodifiableMap(result);
+
+ return result;
+ }
+
+ @JsonIgnore
+ public Map<String, AttrTO> getVirAttrMap() {
+ Map<String, AttrTO> result = new HashMap<>(virAttrs.size());
+ for (AttrTO attributeTO : virAttrs) {
+ result.put(attributeTO.getSchema(), attributeTO);
+ }
+ result = Collections.unmodifiableMap(result);
+
+ return result;
+ }
+
+ @XmlElementWrapper(name = "derivedAttributes")
+ @XmlElement(name = "attribute")
+ @JsonProperty("derivedAttributes")
+ public List<AttrTO> getDerAttrs() {
+ return derAttrs;
+ }
+
+ @XmlElementWrapper(name = "virtualAttributes")
+ @XmlElement(name = "attribute")
+ @JsonProperty("virtualAttributes")
+ public List<AttrTO> getVirAttrs() {
+ return virAttrs;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractSubjectTO.java
----------------------------------------------------------------------
diff --git a/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractSubjectTO.java b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractSubjectTO.java
new file mode 100644
index 0000000..5c9fa42
--- /dev/null
+++ b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractSubjectTO.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.common.lib.to;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlType
+public abstract class AbstractSubjectTO extends AbstractAttributableTO {
+
+ private static final long serialVersionUID = 114668706977919206L;
+
+ private final Set<String> resources = new HashSet<>();
+
+ private final List<PropagationStatus> propagationStatusTOs = new ArrayList<>();
+
+ @XmlElementWrapper(name = "resources")
+ @XmlElement(name = "resource")
+ @JsonProperty("resources")
+ public Set<String> getResources() {
+ return resources;
+ }
+
+ public boolean removePropagationTO(final String resource) {
+ if (resource != null && getPropagationStatusTOs().isEmpty()) {
+ final List<PropagationStatus> toBeRemoved = new ArrayList<PropagationStatus>();
+
+ for (PropagationStatus propagationTO : getPropagationStatusTOs()) {
+ if (resource.equals(propagationTO.getResource())) {
+ toBeRemoved.add(propagationTO);
+ }
+ }
+
+ return propagationStatusTOs.removeAll(toBeRemoved);
+ }
+ return false;
+ }
+
+ @XmlElementWrapper(name = "propagationStatuses")
+ @XmlElement(name = "propagationStatus")
+ @JsonProperty("propagationStatuses")
+ public List<PropagationStatus> getPropagationStatusTOs() {
+ return propagationStatusTOs;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/to/AttrTO.java
----------------------------------------------------------------------
diff --git a/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/to/AttrTO.java b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/to/AttrTO.java
new file mode 100644
index 0000000..829f309
--- /dev/null
+++ b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/to/AttrTO.java
@@ -0,0 +1,92 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.common.lib.to;
+
+import org.apache.syncope.common.lib.AbstractBaseBean;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(name = "attribute")
+@XmlType
+public class AttrTO extends AbstractBaseBean {
+
+ private static final long serialVersionUID = 4941691338796323623L;
+
+ /**
+ * Name of the schema that this attribute is referring to.
+ */
+ private String schema;
+
+ /**
+ * Set of (string) values of this attribute.
+ */
+ private final List<String> values;
+
+ /**
+ * Whether this attribute is read-only or not.
+ */
+ private boolean readonly;
+
+ /**
+ * Default constructor.
+ */
+ public AttrTO() {
+ super();
+ values = new ArrayList<String>();
+ readonly = false;
+ }
+
+ /**
+ * @return the name of the schema that this attribute is referring to
+ */
+ public String getSchema() {
+ return schema;
+ }
+
+ /**
+ * @param schema name to be set
+ */
+ public void setSchema(final String schema) {
+ this.schema = schema;
+
+ }
+
+ /**
+ * @return attribute values as strings
+ */
+ @XmlElementWrapper(name = "values")
+ @XmlElement(name = "value")
+ @JsonProperty("values")
+ public List<String> getValues() {
+ return values;
+ }
+
+ public boolean isReadonly() {
+ return readonly;
+ }
+
+ public void setReadonly(final boolean readonly) {
+ this.readonly = readonly;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnObjectTO.java
----------------------------------------------------------------------
diff --git a/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnObjectTO.java b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnObjectTO.java
new file mode 100644
index 0000000..d298609
--- /dev/null
+++ b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnObjectTO.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.common.lib.to;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(name = "connObject")
+@XmlType
+public class ConnObjectTO extends AbstractAnnotatedBean {
+
+ private static final long serialVersionUID = 5139554911265442497L;
+
+ private final List<AttrTO> attrs = new ArrayList<>();
+
+ @XmlElementWrapper(name = "attributes")
+ @XmlElement(name = "attribute")
+ @JsonProperty("attributes")
+ public List<AttrTO> getPlainAttrs() {
+ return attrs;
+ }
+
+ @JsonIgnore
+ public Map<String, AttrTO> getAttrMap() {
+ Map<String, AttrTO> result = new HashMap<>(attrs.size());
+ for (AttrTO attributeTO : attrs) {
+ result.put(attributeTO.getSchema(), attributeTO);
+ }
+ result = Collections.<String, AttrTO>unmodifiableMap(result);
+
+ return result;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnPoolConfTO.java
----------------------------------------------------------------------
diff --git a/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnPoolConfTO.java b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnPoolConfTO.java
new file mode 100644
index 0000000..9f455dc
--- /dev/null
+++ b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnPoolConfTO.java
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.common.lib.to;
+
+import org.apache.syncope.common.lib.AbstractBaseBean;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(name = "connPoolConf")
+@XmlType
+public class ConnPoolConfTO extends AbstractBaseBean {
+
+ private static final long serialVersionUID = -214360178113476623L;
+
+ private Integer maxObjects;
+
+ private Integer minIdle;
+
+ private Integer maxIdle;
+
+ private Long maxWait;
+
+ private Long minEvictableIdleTimeMillis;
+
+ public Integer getMaxObjects() {
+ return maxObjects;
+ }
+
+ public void setMaxObjects(final Integer maxObjects) {
+ this.maxObjects = maxObjects;
+ }
+
+ public Integer getMinIdle() {
+ return minIdle;
+ }
+
+ public void setMinIdle(final Integer minIdle) {
+ this.minIdle = minIdle;
+ }
+
+ public Integer getMaxIdle() {
+ return maxIdle;
+ }
+
+ public void setMaxIdle(final Integer maxIdle) {
+ this.maxIdle = maxIdle;
+ }
+
+ public Long getMaxWait() {
+ return maxWait;
+ }
+
+ public void setMaxWait(final Long maxWait) {
+ this.maxWait = maxWait;
+ }
+
+ public Long getMinEvictableIdleTimeMillis() {
+ return minEvictableIdleTimeMillis;
+ }
+
+ public void setMinEvictableIdleTimeMillis(final Long minEvictableIdleTimeMillis) {
+ this.minEvictableIdleTimeMillis = minEvictableIdleTimeMillis;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/to/MembershipTO.java
----------------------------------------------------------------------
diff --git a/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/to/MembershipTO.java b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/to/MembershipTO.java
new file mode 100644
index 0000000..d53e20a
--- /dev/null
+++ b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/to/MembershipTO.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.common.lib.to;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(name = "membership")
+@XmlType
+public class MembershipTO extends AbstractAttributableTO {
+
+ private static final long serialVersionUID = 5992828670273935861L;
+
+ private long roleId;
+
+ private String roleName;
+
+ public long getRoleId() {
+ return roleId;
+ }
+
+ public void setRoleId(final long roleId) {
+ this.roleId = roleId;
+ }
+
+ public String getRoleName() {
+ return roleName;
+ }
+
+ public void setRoleName(final String roleName) {
+ this.roleName = roleName;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/to/PropagationStatus.java
----------------------------------------------------------------------
diff --git a/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/to/PropagationStatus.java b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/to/PropagationStatus.java
new file mode 100644
index 0000000..de844be
--- /dev/null
+++ b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/to/PropagationStatus.java
@@ -0,0 +1,152 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.common.lib.to;
+
+import org.apache.syncope.common.lib.AbstractBaseBean;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.types.PropagationTaskExecStatus;
+
+/**
+ * Single propagation status.
+ */
+@XmlRootElement(name = "propagationStatus")
+@XmlType
+public class PropagationStatus extends AbstractBaseBean {
+
+ /**
+ * Serial version ID.
+ */
+ private static final long serialVersionUID = 3921498450222857690L;
+
+ /**
+ * Object before propagation.
+ */
+ private ConnObjectTO beforeObj;
+
+ /**
+ * Object after propagation.
+ */
+ private ConnObjectTO afterObj;
+
+ /**
+ * Propagated resource name.
+ */
+ private String resource;
+
+ /**
+ * Propagation task execution status.
+ */
+ private PropagationTaskExecStatus status;
+
+ /**
+ * Propagation task execution failure message.
+ */
+ private String failureReason;
+
+ /**
+ * After object getter.
+ *
+ * @return after object.
+ */
+ public ConnObjectTO getAfterObj() {
+ return afterObj;
+ }
+
+ /**
+ * After object setter.
+ *
+ * @param afterObj object.
+ */
+ public void setAfterObj(final ConnObjectTO afterObj) {
+ this.afterObj = afterObj;
+ }
+
+ /**
+ * Before object getter.
+ *
+ * @return before object.
+ */
+ public ConnObjectTO getBeforeObj() {
+ return beforeObj;
+ }
+
+ /**
+ * Before object setter.
+ *
+ * @param beforeObj object.
+ */
+ public void setBeforeObj(final ConnObjectTO beforeObj) {
+ this.beforeObj = beforeObj;
+ }
+
+ /**
+ * resource name getter.
+ *
+ * @return resource name.
+ */
+ public String getResource() {
+ return resource;
+ }
+
+ /**
+ * Resource name setter.
+ *
+ * @param resource resource name
+ */
+ public void setResource(final String resource) {
+ this.resource = resource;
+ }
+
+ /**
+ * Propagation execution status getter.
+ *
+ * @return status
+ */
+ public PropagationTaskExecStatus getStatus() {
+ return status;
+ }
+
+ /**
+ * Propagation execution status setter.
+ *
+ * @param status propagation execution status
+ */
+ public void setStatus(final PropagationTaskExecStatus status) {
+ this.status = status;
+ }
+
+ /**
+ * Propagation execution message getter.
+ *
+ * @return failureReason.
+ */
+ public String getFailureReason() {
+ return failureReason;
+ }
+
+ /**
+ * Propagation execution failure message setter.
+ *
+ * @param failureReason describes why this propagation failed
+ */
+ public void setFailureReason(final String failureReason) {
+ this.failureReason = failureReason;
+ }
+}