当前位置: 首页>>代码示例>>Java>>正文


Java Significance类代码示例

本文整理汇总了Java中de.hshannover.f4.trust.ifmapj.metadata.Significance的典型用法代码示例。如果您正苦于以下问题:Java Significance类的具体用法?Java Significance怎么用?Java Significance使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Significance类属于de.hshannover.f4.trust.ifmapj.metadata包,在下文中一共展示了Significance类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: mapSignificance

import de.hshannover.f4.trust.ifmapj.metadata.Significance; //导入依赖的package包/类
private Significance mapSignificance(RiskfactorLevel riskFactor) {
    switch (riskFactor) {
    case Critical:
        return Significance.critical;
    case High:
        return Significance.critical;
    case Medium:
        return Significance.important;
    case Low:
        return Significance.important;
    case None:
        return Significance.informational;
    default:
        return Significance.informational;
    }
}
 
开发者ID:trustathsh,项目名称:ironvas,代码行数:17,代码来源:EventUpdateConverter.java

示例2: performAction

import de.hshannover.f4.trust.ifmapj.metadata.Significance; //导入依赖的package包/类
@Override
public void performAction(PatternRule rule, RuleMatch result) {
	if (rule.getId() == result.getRuleId()) {
		LOGGER.debug("Performing PublishEventAction for rule: " + rule.getId());
		if (result.getPublishVertex() == null) {
			LOGGER.warn("Publish not successful, PublishVertex is null for rule " + rule.getId());
			return;
		}

		Identifier id = convertVertex(result.getPublishVertex());
		if (id == null) {
			LOGGER.warn("Publish not successful, converting the PublishVertex of rule " + rule.getId()
					+ " to an ifmapj Identifier failed. Check above for other log entries.");
			return;
		}
		Document updateEvent = mMf.createEvent(rule.getDescription(), result.getResultGraph().getLastUpdated()
				.toString(), "GPM", 100, 100, Significance.critical, EventType.cve, "",
				ResultUtil.buildRecommendation(rule.getRecommendation(), result), "");

		PublishRequest update = Requests.createPublishReq();
		update.addPublishElement(Requests.createPublishUpdate(id, updateEvent));
		IfmapPublishUtil.publish(update);
		
		boolean isPolicyPublisherEnabled = mConfig.getBoolean("irongpm.publisher.policy.enabled", false);
		if (isPolicyPublisherEnabled) {
			try {
				PolicyPublisher.publishAction(rule, result);
			} catch (IfmapErrorResult | IfmapException e) {
				LOGGER.warn("Error at publishing pattern to matched identifier-link: " + e.getMessage());
			}
		}
	} else {
		LOGGER.warn("Failed performing action since rule (" + rule.getId() + ") and result (" + result.getRuleId()
				+ ") id's did not match!");
	}
}
 
开发者ID:trustathsh,项目名称:irongpm,代码行数:37,代码来源:PublishEventAction.java

示例3: performAction

import de.hshannover.f4.trust.ifmapj.metadata.Significance; //导入依赖的package包/类
@Override
public void performAction(PatternRule rule, RuleMatch result) {
	if (rule.getId() == result.getRuleId()) {
		LOGGER.debug("Performing UnexpectedBehaviorAction for rule: " + rule.getId());
		if (result.getPublishVertex() == null) {
			LOGGER.warn("Publish not successful, PublishVertex is null for rule " + rule.getId());
			return;
		}

		Identifier id = convertVertex(result.getPublishVertex());
		if (id == null) {
			LOGGER.warn("Publish not successful, converting the PublishVertex of rule " + rule.getId()
					+ " to an ifmapj Identifier failed. Check above for other log entries.");
			return;
		}
		Document updateUnexpectedBehavior = mMf.createUnexpectedBehavior(result.getResultGraph().getLastUpdated()
				.toString(), "GPM", 100, 100, Significance.critical, rule.getDescription());

		PublishRequest update = Requests.createPublishReq();
		update.addPublishElement(Requests.createPublishUpdate(id, updateUnexpectedBehavior));
		IfmapPublishUtil.publish(update);

		boolean isPolicyPublisherEnabled = mConfig.getBoolean("irongpm.publisher.policy.enabled", false);
		if (isPolicyPublisherEnabled) {
			try {
				PolicyPublisher.publishAction(rule, result);
			} catch (IfmapErrorResult | IfmapException e) {
				LOGGER.warn("Error at publishing pattern to matched identifier-link: " + e.getMessage());
			}
		}
	} else {
		LOGGER.warn("Failed performing action since rule (" + rule.getId() + ") and result (" + result.getRuleId()
				+ ") id's did not match!");
	}
}
 
开发者ID:trustathsh,项目名称:irongpm,代码行数:36,代码来源:UnexpectedBehaviorAction.java

示例4: createEventDocument

import de.hshannover.f4.trust.ifmapj.metadata.Significance; //导入依赖的package包/类
private Document createEventDocument() {
	return mMetadataFactory.createEvent(
			"event42",
			"2010-04-21T16:11:09Z",
			"discovererId",
			1,
			1,
			Significance.critical,
			EventType.cve,
			"",
			"42",
			"CVE-2011-0997");
}
 
开发者ID:trustathsh,项目名称:visitmeta,代码行数:14,代码来源:InMemoryMetadataFactoryTest.java

示例5: createEvent

import de.hshannover.f4.trust.ifmapj.metadata.Significance; //导入依赖的package包/类
public static Document createEvent(String name, String discoveredTime, String discovererId, Integer magnitude,
		Integer confidence, Significance significance, EventType type, String otherTypeDefinition,
		String information, String vulnerabilityUri, Date timestamp) {
	Document doc = IFMAP_METADATA_FACTORY.createEvent(name, discoveredTime, discovererId, magnitude, confidence,
			significance, type, otherTypeDefinition, information, vulnerabilityUri);
	setDocumentXmlAttributes(doc, timestamp);
	return doc;
}
 
开发者ID:trustathsh,项目名称:visitmeta,代码行数:9,代码来源:MetadataMock.java

示例6: CreateEvent

import de.hshannover.f4.trust.ifmapj.metadata.Significance; //导入依赖的package包/类
public static Document CreateEvent(String name, String discoveredTime, String discovererId, Integer magnitude,
		Integer confidence, Significance significance, EventType type, String otherTypeDefinition,
		String information, String vulnerabilityUri, Date timestamp) {
	return MetadataMock.createEvent(name, discoveredTime, discovererId, magnitude, confidence, significance, type,
			otherTypeDefinition, information, vulnerabilityUri, timestamp);
}
 
开发者ID:trustathsh,项目名称:visitmeta,代码行数:7,代码来源:IfmapjMock.java

示例7: CreateUnexpectedBehavior

import de.hshannover.f4.trust.ifmapj.metadata.Significance; //导入依赖的package包/类
public static Document CreateUnexpectedBehavior(String discoveredTime, String discovererId, Integer magnitude,
		Integer confidence, Significance significance, String type, Date timestamp) {
	return MetadataMock.createUnexpectedBehavior(discoveredTime, discovererId, magnitude, confidence, significance,
			type, timestamp);
}
 
开发者ID:trustathsh,项目名称:visitmeta,代码行数:6,代码来源:IfmapjMock.java

示例8: createUnexpectedBehavior

import de.hshannover.f4.trust.ifmapj.metadata.Significance; //导入依赖的package包/类
public static Document createUnexpectedBehavior(String discoveredTime, String discovererId, Integer magnitude,
		Integer confidence, Significance significance, String type, Date timestamp) {
	Document doc = IFMAP_METADATA_FACTORY.createUnexpectedBehavior(discoveredTime, discovererId, magnitude, confidence, significance, type);
	setDocumentXmlAttributes(doc, timestamp);
	return doc;
}
 
开发者ID:trustathsh,项目名称:visitmeta,代码行数:7,代码来源:MetadataMock.java


注:本文中的de.hshannover.f4.trust.ifmapj.metadata.Significance类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。