⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 utils.java

📁 一个完整的XACML工程,学习XACML技术的好例子!
💻 JAVA
字号:
/*
 * Created on 12-Apr-2005
 *
 * TODO All
 */
package ke.defaultimpl.utils;

import java.io.IOException;

import org.xml.sax.SAXException;

import ke.defaultimpl.utils.xml.parsing.IncorrectSchemaException;
import ke.defaultimpl.utils.xml.parsing.SchemaBean;
import ke.defaultimpl.utils.xml.parsing.SchemaParserUtils;

/**
 * @author James Cunningham
 * 
 * @version
 *
 * TODO All
 */
public class Utils
{
    /**
     * @return
     */
    public static String generateUniqueId() {
        return new RandomGUID().toString();
    }
    
    /**
     * @param schemaFile
     * @return
     * @throws UtilsException
     */
    
    public static SchemaBean getAttributesFromSchema(String schemaFile) throws UtilsException{
        try {
            return SchemaParserUtils.getAttributesFromSchema(schemaFile);
        } catch (SAXException se) {
            throw new UtilsException("Error parsing schema file: " + se);
        } catch (IncorrectSchemaException ise) {
            throw new UtilsException("Error: Incorrect schema: " + ise);
        } catch (IOException ioe) {
            throw new UtilsException("Error reading file: " + ioe);
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -