Examples of Auditable


Examples of com.rupertjones.globalcron.common.audit.Auditable

    }

    @Override
    @SuppressWarnings("unchecked")
    public void onPostInsert(PostInsertEvent event) {
        Auditable entity = (Auditable) event.getEntity();
        AuditLogType type = entity.getAuditTypeForInsert();
        audit(entity, type);
    }
View Full Code Here

Examples of com.rupertjones.globalcron.common.audit.Auditable

    }

    @Override
    @SuppressWarnings("unchecked")
    public void onPostUpdate(PostUpdateEvent event) {
        Auditable entity = (Auditable) event.getEntity();
        AuditLogType type = entity.getAuditTypeForUpdate();
        audit(entity, type);
    }
View Full Code Here

Examples of org.apache.isis.core.objectstore.jdo.applib.annotations.Auditable

    }

    @Override
    public void process(ProcessClassContext processClassContext) {
        final Class<?> cls = processClassContext.getCls();
        final Auditable annotation = Annotations.getAnnotation(cls, Auditable.class);
        if (annotation == null) {
            return;
        }
        FacetUtil.addFacet(new AuditableFacetAnnotationInJdoApplib(
                processClassContext.getFacetHolder()));
View Full Code Here

Examples of org.apache.openjpa.audit.Auditable

  /**
   * Records all auditable classes in operation-specific sets.
   */
  @Override
  public void register(Class<?> cls) {
    Auditable auditable = cls.getAnnotation(Auditable.class);
    if (auditable == null) {
      return;
    }
   
    List<AuditableOperation> events = Arrays.asList(auditable.values());
    if (events.contains(AuditableOperation.ALL) || events.contains(AuditableOperation.CREATE)) {
      _newTypes.add(cls);
      _allTypes.add(cls);
    }
    if (events.contains(AuditableOperation.ALL) || events.contains(AuditableOperation.UPDATE)) {
View Full Code Here

Examples of org.apache.openjpa.audit.Auditable

  /**
   * Records all auditable classes in operation-specific sets.
   */
  @Override
  public void register(Class<?> cls) {
    Auditable auditable = cls.getAnnotation(Auditable.class);
    if (auditable == null) {
      return;
    }
   
    List<AuditableOperation> events = Arrays.asList(auditable.values());
    if (events.contains(AuditableOperation.ALL) || events.contains(AuditableOperation.CREATE)) {
      _newTypes.add(cls);
      _allTypes.add(cls);
    }
    if (events.contains(AuditableOperation.ALL) || events.contains(AuditableOperation.UPDATE)) {
View Full Code Here

Examples of org.joget.commons.spring.model.Auditable

                String message = "";
                int i = 0;
                for (Class clazz : param) {
                    if (args[i] instanceof Auditable) {
                        Auditable obj = (Auditable) args[i];
                        message += clazz.getName() + "@" + obj.getAuditTrailId() + ";";
                        auditableObjExists = true;
                    }

                    i++;
                }
View Full Code Here

Examples of org.opentides.bean.Auditable

   * Sets the userId within the web session for audit logging.
   * @param obj
   */
  private void setAuditUserId(T obj) {
    if (Auditable.class.isAssignableFrom(obj.getClass())) {
      Auditable auditable = (Auditable) obj;
      if (auditable.getAuditUserId()==null)
        auditable.setUserId();     
    }
  }
View Full Code Here

Examples of org.opentides.bean.Auditable

                                String[] propertyNames,
                                Type[] types)
            throws CallbackException {
        if (entity instanceof Auditable) {
          try {
              Auditable auditable = (Auditable) entity;
              if (!auditable.isSkipAudit()) {
              // Use the id and class to get the pre-update state from the database
              Session tempSession =
                    HibernateUtil.getSessionFactory().openSession();
              Auditable old = (Auditable) tempSession.get(entity.getClass(), auditable.getId());
              if (old == null)
                return false; // old object is not yet persisted?
              synchronized(oldies) {
                oldies.put(old.getId(), old);
              }
              synchronized(updates) {
                updates.add((Auditable)entity);
              }
              }
View Full Code Here

Examples of org.opentides.bean.Auditable

                }else{
                  friendlyMessage = entity.getFriendlyMessage();
                }
               
                if (StringUtil.isEmpty(entity.getAuditMessage())){
                  Auditable old = oldies.get(entity.getId());
                  auditMessage = CrudUtil.buildUpdateMessage(old, entity);
                }else{
                  auditMessage = entity.getAuditMessage();
                }
                if (!StringUtil.isEmpty(auditMessage))
View Full Code Here

Examples of org.sete.common.Auditable

    protected Serializable entityIsPersistent(SaveOrUpdateEvent event) throws HibernateException {
        Serializable id = super.entityIsPersistent(event);
        Object object = event.getObject();

        if(isAuditable(object)) {
            Auditable auditable = (Auditable) object;
            Integer uid = getAuthenticatedExecutingUser();
            auditable.setLastUpdatedBy(uid);
            auditable.setLastUpdateOn(new Date());
        }

        return id;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.