private Partition createDefaultPartition() { Partition storedPartition = new Realm(Realm.DEFAULT_REALM); storedPartition.setId(Realm.DEFAULT_REALM); return storedPartition; }
private Partition createDefaultPartition() { Partition storedPartition = new Realm(Realm.DEFAULT_REALM); storedPartition.setId(Realm.DEFAULT_REALM); return storedPartition; }
@Override protected IdentityType doPopulateEntry(Map<String, Serializable> properties) throws Exception { IdentityType identityType = super.doPopulateEntry(properties); String partitionType = properties.get("partitionType").toString(); String partitionId = properties.get("partitionId").toString(); Partition partition = (Partition) Class.forName(partitionType).getConstructor(new Class[]{String.class}).newInstance(""); partition.setId(partitionId); identityType.setPartition(partition); identityType.setCreatedDate((Date) properties.get("createdDate")); identityType.setExpirationDate((Date) properties.get("expirationDate")); identityType.setEnabled((Boolean) properties.get("enabled")); return identityType; }
@Override protected IdentityType doPopulateEntry(Map<String, Serializable> properties) throws Exception { IdentityType identityType = super.doPopulateEntry(properties); String partitionType = properties.get("partitionType").toString(); String partitionId = properties.get("partitionId").toString(); Partition partition = (Partition) Class.forName(partitionType).getConstructor(new Class[]{String.class}).newInstance(""); partition.setId(partitionId); identityType.setPartition(partition); identityType.setCreatedDate((Date) properties.get("createdDate")); identityType.setExpirationDate((Date) properties.get("expirationDate")); identityType.setEnabled((Boolean) properties.get("enabled")); return identityType; }
@Override public void add(IdentityContext identityContext, Partition partition, String configurationName) { partition.setId(identityContext.getIdGenerator().generate()); FilePartition filePartition = new FilePartition(cloneAttributedType(identityContext, partition), configurationName); this.fileDataSource.getPartitions().put(filePartition.getId(), filePartition); this.fileDataSource.flushPartitions(filePartition); }
@Override public void add(IdentityContext identityContext, Partition partition, String configurationName) { partition.setId(identityContext.getIdGenerator().generate()); FilePartition filePartition = new FilePartition(cloneAttributedType(identityContext, partition), configurationName); this.fileDataSource.getPartitions().put(filePartition.getId(), filePartition); this.fileDataSource.flushPartitions(filePartition); }