本文整理汇总了Java中org.xdi.xml.GluuErrorHandler类的典型用法代码示例。如果您正苦于以下问题:Java GluuErrorHandler类的具体用法?Java GluuErrorHandler怎么用?Java GluuErrorHandler使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
GluuErrorHandler类属于org.xdi.xml包,在下文中一共展示了GluuErrorHandler类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: validateMetadata
import org.xdi.xml.GluuErrorHandler; //导入依赖的package包/类
/**
* @param stream
* @throws IOException
* @throws SAXException
* @throws ParserConfigurationException
* @return GluuErrorHandler
*/
public GluuErrorHandler validateMetadata(InputStream stream) throws ParserConfigurationException, SAXException, IOException {
Schema schema;
try {
String idpTemplatesLocation = configurationFactory.getIDPTemplatesLocation();
// String schemaDir = OxTrustConfiguration.DIR + "shibboleth3" + File.separator + "idp" + File.separator + "schema" + File.separator;
String schemaDir = idpTemplatesLocation + "shibboleth3" + File.separator + "idp" + File.separator + "schema" + File.separator;
schema = SchemaBuilder.buildSchema(SchemaLanguage.XML, schemaDir);
} catch (Exception e) {
// Schema build error
final List<String> validationLog = new ArrayList<String>();
validationLog.add(GluuErrorHandler.SCHEMA_CREATING_ERROR_MESSAGE);
validationLog.add(e.getMessage());
// return internal error
return new GluuErrorHandler(false, true, validationLog);
}
return XMLValidator.validateMetadata(stream, schema);
}
示例2: validateMetadata
import org.xdi.xml.GluuErrorHandler; //导入依赖的package包/类
/**
* @param stream
* @throws IOException
* @throws SAXException
* @throws ParserConfigurationException
* @return GluuErrorHandler
*/
public static GluuErrorHandler validateMetadata(InputStream stream)
throws ParserConfigurationException, SAXException, IOException {
//TODO: change for IDP3
String schemaDir = OxTrustConfiguration.DIR + "shibboleth2" + File.separator
+ "idp" + File.separator + "schema" + File.separator;
Schema schema = SchemaBuilder.buildSchema(SchemaLanguage.XML, schemaDir);
return XMLValidator.validateMetadata(stream, schema);
}
示例3: validateMetadata
import org.xdi.xml.GluuErrorHandler; //导入依赖的package包/类
/**
* @param stream
* @throws IOException
* @throws SAXException
* @throws ParserConfigurationException
* @return GluuErrorHandler
*/
public static GluuErrorHandler validateMetadata(InputStream stream)
throws ParserConfigurationException, SAXException, IOException {
String schemaDir = OxTrustConfiguration.DIR + "shibboleth2" + File.separator
+ "idp" + File.separator + "schema" + File.separator;
Schema schema = SchemaBuilder.buildSchema(SchemaLanguage.XML, schemaDir);
return XMLValidator.validateMetadata(stream, schema);
}