@Override public boolean supports(Class<?> entityType) { MappedAttribute mappedAttribute = entityType.getAnnotation(MappedAttribute.class); return mappedAttribute != null && !isNullOrEmpty(mappedAttribute.value()); }
/** * @author pedroigor */ @IdentityManaged (Relationship.class) @Entity public class RelationshipTypeEntity extends AttributedTypeEntity { private static final long serialVersionUID = -3619372498444894118L; @RelationshipClass private String typeName; public String getTypeName() { return this.typeName; } public void setTypeName(String typeName) { this.typeName = typeName; } }
@IdentityManaged (Partition.class) @Entity public class PartitionTypeEntity extends AttributedTypeEntity { private String typeName; @ConfigurationName private String configurationName;
@Override protected List<EntityMapping> doCreateMapping(Class<?> entityType) throws SecurityConfigurationException { ArrayList<EntityMapping> mappings = new ArrayList<EntityMapping>(); PermissionManaged identityManaged = entityType.getAnnotation(PermissionManaged.class); Class<?>[] resourceClasses = identityManaged.resourceClasses(); if (resourceClasses.length > 0) { for (Class<?> resourceClass : resourceClasses) { mappings.add(createEntityMapping(entityType, resourceClass)); } } else { mappings.add(createEntityMapping(entityType, Object.class)); } return mappings; }
/** * <p>This entity is mapped to support X509 credential types using a {@link X509CertificateStorage}.</p> * * @author pedroigor */ @ManagedCredential (X509CertificateStorage.class) @Entity public class X509CredentialTypeEntity extends AbstractCredentialTypeEntity { private static final long serialVersionUID = -8313462190592256324L; @CredentialProperty @Column(length = 1024) private String base64Cert; public String getBase64Cert() { return base64Cert; } public void setBase64Cert(String base64Cert) { this.base64Cert = base64Cert; } }
@Override public boolean supports(Class<?> entityType) { MappedAttribute mappedAttribute = entityType.getAnnotation(MappedAttribute.class); return mappedAttribute != null && !isNullOrEmpty(mappedAttribute.value()); }
@Override protected List<EntityMapping> doCreateMapping(Class<?> entityType) throws SecurityConfigurationException { ArrayList<EntityMapping> mappings = new ArrayList<EntityMapping>(); PermissionManaged identityManaged = entityType.getAnnotation(PermissionManaged.class); Class<?>[] resourceClasses = identityManaged.resourceClasses(); if (resourceClasses.length > 0) { for (Class<?> resourceClass : resourceClasses) { mappings.add(createEntityMapping(entityType, resourceClass)); } } else { mappings.add(createEntityMapping(entityType, Object.class)); } return mappings; }
@IdentityManaged (Partition.class) @Entity public class PartitionTypeEntity extends AttributedTypeEntity { private String typeName; @ConfigurationName private String configurationName;
/** * <p>This entity is mapped to support X509 credential types using a {@link X509CertificateStorage}.</p> * * @author pedroigor */ @ManagedCredential (X509CertificateStorage.class) @Entity public class X509CredentialTypeEntity extends AbstractCredentialTypeEntity { private static final long serialVersionUID = -8313462190592256324L; @CredentialProperty @Column(length = 1024) private String base64Cert; public String getBase64Cert() { return base64Cert; } public void setBase64Cert(String base64Cert) { this.base64Cert = base64Cert; } }
/** * @author pedroigor */ @IdentityManaged (Role.class) @Entity public class RoleTypeEntity extends IdentityTypeEntity { private static final long serialVersionUID = -1111674876657091722L; @AttributeValue private String name; public String getName() { return this.name; } public void setName(String name) { this.name = name; } }
@Override public EntityMapping configure(Class<?> supportedType, Class<?> entityType) { EntityMapping entityMapping = new EntityMapping(supportedType); MappedAttribute mappedAttribute = entityType.getAnnotation(MappedAttribute.class); Property namedProperty = getNamedProperty(mappedAttribute.value(), supportedType); if (namedProperty == null) { throw MESSAGES.configJpaStoreMappedPropertyNotFound(entityType, mappedAttribute.value(), supportedType); } entityMapping.addOwnerProperty(entityType); return entityMapping; }
@ManagedCredential (DigestCredentialStorage.class) @Entity public class DigestCredentialTypeEntity extends AbstractCredentialTypeEntity {
/** * @author pedroigor */ @IdentityManaged (Relationship.class) @Entity public class RelationshipTypeEntity extends AttributedTypeEntity { private static final long serialVersionUID = -3619372498444894118L; @RelationshipClass private String typeName; public String getTypeName() { return this.typeName; } public void setTypeName(String typeName) { this.typeName = typeName; } }
@Override public EntityMapping configure(Class<?> supportedType, Class<?> entityType) { EntityMapping entityMapping = new EntityMapping(supportedType); MappedAttribute mappedAttribute = entityType.getAnnotation(MappedAttribute.class); Property namedProperty = getNamedProperty(mappedAttribute.value(), supportedType); if (namedProperty == null) { throw MESSAGES.configJpaStoreMappedPropertyNotFound(entityType, mappedAttribute.value(), supportedType); } entityMapping.addOwnerProperty(entityType); return entityMapping; }
@ManagedCredential (DigestCredentialStorage.class) @Entity public class DigestCredentialTypeEntity extends AbstractCredentialTypeEntity {
/** * @author pedroigor */ @IdentityManaged (Role.class) @Entity public class RoleTypeEntity extends IdentityTypeEntity { private static final long serialVersionUID = -1111674876657091722L; @AttributeValue private String name; public String getName() { return this.name; } public void setName(String name) { this.name = name; } }
@ManagedCredential (EncodedPasswordStorage.class) @Entity public class PasswordCredentialTypeEntity extends AbstractCredentialTypeEntity {
@ManagedCredential (OTPCredentialStorage.class) @Entity public class OTPCredentialTypeEntity extends AbstractCredentialTypeEntity {
@ManagedCredential (EncodedPasswordStorage.class) @Entity public class PasswordCredentialTypeEntity extends AbstractCredentialTypeEntity {
@ManagedCredential (OTPCredentialStorage.class) @Entity public class OTPCredentialTypeEntity extends AbstractCredentialTypeEntity {