Package er.bugtracker.components

Source Code of er.bugtracker.components.ReadMarker

/*
* Copyright (C) NetStruxr, Inc. All rights reserved.
*
* This software is published under the terms of the NetStruxr
* Public Software License version 0.5, a copy of which has been
* included with this distribution in the LICENSE.NPL file.  */
package er.bugtracker.components;
import com.webobjects.appserver.WOContext;
import com.webobjects.appserver.WOResponse;
import com.webobjects.directtoweb.D2WComponent;
import com.webobjects.directtoweb.InspectPageInterface;
import com.webobjects.eocontrol.EOEnterpriseObject;

import er.bugtracker.Markable;

public class ReadMarker extends D2WComponent {

    public ReadMarker(WOContext c) {
        super(c);
    }
   
    @Override
    public void appendToResponse(WOResponse aResponse, WOContext aContext) {
        if(context().page() instanceof InspectPageInterface) {
            EOEnterpriseObject eo = object();
            if (eo instanceof Markable) {
                Markable markable = (Markable) eo;
                markable.markAsRead();
            }
        }
        super.appendToResponse(aResponse, aContext);
    }
}
TOP

Related Classes of er.bugtracker.components.ReadMarker

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.