For comprehensive information about FlexiCore Security Model please visit our site.
FlexiCore Security Model is a FlexiCore Module and a FlexiCore Entity Plugin. FlexiCore Security Model defines the entities required by FlexiCore Security Service for its multi-tenancy access control support.
Add the flexicore-security-model dependency to your main app using the latest version available from maven central:
<dependency>
<groupId>com.wizzdi</groupId>
<artifactId>flexicore-security-model</artifactId>
<version>LATEST</version>
</dependency>
Add the flexicore-security-model dependency to your main app using the latest version available from maven central:
<dependency>
<groupId>com.wizzdi</groupId>
<artifactId>flexicore-security-model</artifactId>
<version>LATEST</version>
<scope>provided</scope>
</dependency>
add the flexicore-security-model.jar to your entities folder.
you can add a field of type Baseclass
to your entity:
@Entity
public class TestEntity{
@Id
private String id;
@ManyToOne(targetEntity = Baseclass.class)
private Baseclass security;
@Id
public String getId() {
return id;
}
public <T extends TestEntity> T setId(String id) {
this.id = id;
return (T) this;
}
@ManyToOne(targetEntity = Baseclass.class)
public Baseclass getSecurity() {
return security;
}
public <T extends TestEntity> T setSecurity(Baseclass security) {
this.security = security;
return (T) this;
}
}
or you can directly inherit from Baseclass
@Entity
public class TestEntity extends Baseclass{
@ManyToOne(targetEntity = Baseclass.class)
private Baseclass security;
@ManyToOne(targetEntity = Baseclass.class)
public Baseclass getSecurity() {
return security;
}
public <T extends TestEntity> T setSecurity(Baseclass security) {
this.security = security;
return (T) this;
}
}