@Override public Object extract(String valueAsString, Event event) throws IllegalAccessException, NoSuchMethodException, InvocationTargetException { return event.getSession().getProperty(valueAsString); } });
@Override public Object extract(String valueAsString, Event event) throws IllegalAccessException, NoSuchMethodException, InvocationTargetException { return event.getProfile().getProperty(valueAsString); } });
/** * Sets the associated Profile. * * @param profile the associated Profile */ public void setProfile(Profile profile) { this.profileId = profile.getItemId(); this.profile = profile; }
public Session saveSession(Session session) { if (session.getItemId() == null) { return null; } if (session.getProfile() != null && session.getProfile().getProperties() != null) { session.getProfile().setProperties(removePersonalIdentifiersFromSessionProfile(session.getProfile().getProperties())); } return persistenceService.save(session) ? session : null; }
public static PropertyType getPropertyTypeById(Collection<PropertyType> propertyTypes, String propertyTypeId) { for (PropertyType propertyType : propertyTypes) { if (propertyType.getMetadata().getId().equals(propertyTypeId)) { return propertyType; } } return null; }
public MetadataItem(Metadata metadata) { super(metadata.getId()); this.metadata = metadata; }
@Override public int compare(PropertyType o1, PropertyType o2) { if (o1.getRank() == o2.getRank()) { return o1.getMetadata().getName().compareTo(o1.getMetadata().getName()); } else if (o1.getRank() < o2.getRank()) { return -1; } else { return 1; } } });
@Override public Object extract(String valueAsString, Event event) throws IllegalAccessException, NoSuchMethodException, InvocationTargetException { return event.getProperty(valueAsString); } });
public PersonaWithSessions loadPersonaWithSessions(String personaId) { Persona persona = persistenceService.load(personaId, Persona.class); if (persona == null) { return null; } List<PersonaSession> sessions = persistenceService.query("profileId", persona.getItemId(), "timeStamp:desc", PersonaSession.class); return new PersonaWithSessions(persona, sessions); }
@Override public Object extract(String valueAsString, Event event) throws IllegalAccessException, NoSuchMethodException, InvocationTargetException { return event.getProfile().getProperty(valueAsString); } });
public Session saveSession(Session session) { if (session.getItemId() == null) { return null; } if (session.getProfile() != null && session.getProfile().getProperties() != null) { session.getProfile().setProperties(removePersonalIdentifiersFromSessionProfile(session.getProfile().getProperties())); } return persistenceService.save(session) ? session : null; }
/** * Sets the associated Profile. * * @param profile the associated Profile */ public void setProfile(Profile profile) { this.profileId = profile.getItemId(); this.profile = profile; }
public void setMetadata(Metadata metadata) { this.itemId = metadata.getId(); this.metadata = metadata; }
@Override public Object extract(String valueAsString, Event event) throws IllegalAccessException, NoSuchMethodException, InvocationTargetException { return event.getSession().getProperty(valueAsString); } });
@Override public int compare(PropertyType o1, PropertyType o2) { if (o1.getRank() == o2.getRank()) { return o1.getMetadata().getName().compareTo(o1.getMetadata().getName()); } else if (o1.getRank() < o2.getRank()) { return -1; } else { return 1; } } });
@Override public Object extract(String valueAsString, Event event) throws IllegalAccessException, NoSuchMethodException, InvocationTargetException { return event.getProperty(valueAsString); } });
public PersonaWithSessions loadPersonaWithSessions(String personaId) { Persona persona = persistenceService.load(personaId, Persona.class); if (persona == null) { return null; } List<PersonaSession> sessions = persistenceService.query("profileId", persona.getItemId(), "timeStamp:desc", PersonaSession.class); return new PersonaWithSessions(persona, sessions); }
/** * Instantiates a new Session. * * @param itemId the identifier for this Session * @param profile the associated {@link Profile} * @param timeStamp the time stamp * @param scope the scope */ public Session(String itemId, Profile profile, Date timeStamp, String scope) { super(itemId); this.profile = profile; this.profileId = profile.getItemId(); this.timeStamp = timeStamp; this.scope = scope; }
public void setMetadata(Metadata metadata) { this.itemId = metadata.getId(); this.metadata = metadata; }
public MetadataItem(Metadata metadata) { super(metadata.getId()); this.metadata = metadata; }