cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thorsten.som...@realtech.de
Subject Tomcat 3.1 + IIS + Cocoon 1.8 problem - please help
Date Thu, 16 Aug 2001 07:48:33 GMT
ERM::Event ERM::tGNetManModule::convertToERMEvent(const
ERM::TGNetMan::Event& ev)
{
	ERM::Event ermevent;
	ERM::UserShortInfo usf;
	ERM::NodeShortInfo nsf;

/*erm:
    UserShortInfo assigneduser;
    OB::WStrForStruct category;
    OB::WStrForStruct eventclass;
    CORBA::Long id;
    OB::WStrForStruct message;
    NodeShortInfo node;
    EventSeverity severity;
    OB::WStrForStruct source;
    OB::WStrForStruct sourceminor;
    EventStatus status;
    CORBA::Boolean userdb;
    OB::WStrForStruct uuidme;
    CORBA::Long timestamp;

tgnetman:
    CORBA::Long id;
    CORBA::Long assigneduserid; // netman userid = ermuserid ?????
    CORBA::Long category;
    CORBA::Long eventclass;
    OB::WStrForStruct message;
    Noderef nodeid;
    EventSeverity severity;
    OB::WStrForStruct netmanServer;
    TimestampType timestamp;
*/

	//ermevent.assigneduser = usf;
	
	// convert category
	//ermevent.category = ;

	// convert eventclass
	//ermevent.eventclass = ;

	ermevent.id = ev.id;
	ermevent.message = ev.message;
	
	// RMS nodeid is the same
	nsf.id = ev.id;
	//nsf.name =;
	ermevent.node = nsf;

	// convert severity
	switch(ev.severity)
	{
		case ERM::TGNetMan::esv_fatal:
			ermevent.severity = ERM::fatal;
			break;

		case ERM::TGNetMan::esv_critical:
			ermevent.severity = ERM::critical;
			break;
		
		case ERM::TGNetMan::esv_minor:
			ermevent.severity = ERM::minor;
			break;
		
		case ERM::TGNetMan::esv_warning:
			ermevent.severity = ERM::warning;
			break;

		case ERM::TGNetMan::esv_harmless:
			ermevent.severity = ERM::harmless;
			break;

		case ERM::TGNetMan::esv_normal:
			ermevent.severity = ERM::normal;
			break;

		case ERM::TGNetMan::esv_informal:
			ermevent.severity = ERM::informal;
			break;

		default:
			;
			// severity not known
	}

	ermevent.source = m_source.c_str();
	ermevent.sourceminor = m_sourceminor.c_str();	//ev.netmanServer

	// convert status
	switch(ev.status)
	{
		case ERM::TGNetMan::est_open:
			ermevent.status = ERM::open;
			break;

		case ERM::TGNetMan::est_assigned:
			ermevent.status = ERM::assigned;
			break;
		
		case ERM::TGNetMan::est_reopened:
			ermevent.status = ERM::reopened;
			break;
		
		case ERM::TGNetMan::est_closed:
			ermevent.status = ERM::closed;
			break;

		case ERM::TGNetMan::est_ignored:
			ermevent.status = ERM::ignored;
			break;

		case ERM::TGNetMan::est_deleted:
			// this case is mapped to 'closed' because in ERM
the status 'deleted' does not exist
			ermevent.status = ERM::closed;
			break;

		default:
			// status not known
			;
	}

	// ????
	ermevent.userdb = true;

	// tGNetMan don't know uuidme
	ermevent.uuidme = L"";

	// ERM and RMS use the same timestamp
	ermevent.timestamp = ev.timestamp;

	return ermevent;
}

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message