Package com.sun.enterprise.admin.servermgmt.pe

Examples of com.sun.enterprise.admin.servermgmt.pe.PEFileLayout


     * @param password
     * @throws RepositoryException
     */
    public void validateMasterPassword(RepositoryConfig config,
            String password) throws RepositoryException {
        final PEFileLayout layout = getFileLayout(config);
        final File passwordAliases = layout.getPasswordAliasKeystore();
        try {
            // WBN July 2007
            // we are constructing this object ONLY to see if it throws
            // an Exception.  We do not use the object.
            new PasswordAdapter(passwordAliases.getAbsolutePath(),
View Full Code Here


     * @param alias for which the clear text password would returns
     * @throws RepositoryException
     */
    public String getClearPasswordForAlias(RepositoryConfig config,
            String password, String alias) throws RepositoryException {
        final PEFileLayout layout = getFileLayout(config);
        final File passwordAliases = layout.getPasswordAliasKeystore();
        try {
            PasswordAdapter p = new PasswordAdapter(passwordAliases.getAbsolutePath(),
                    password.toCharArray());
            String clearPwd = p.getPasswordForAlias(alias);
            return clearPwd;
View Full Code Here

     * @param password password protecting the keystore
     * @throws RepositoryException
     */
    protected void createPasswordAliasKeystore(RepositoryConfig config,
            String password) throws RepositoryException {
        final PEFileLayout layout = getFileLayout(config);
        final File passwordAliases = layout.getPasswordAliasKeystore();
        try {
            PasswordAdapter p = new PasswordAdapter(passwordAliases.getAbsolutePath(),
                    password.toCharArray());
            p.writeStore();
        }
View Full Code Here

     * @param newPassword new password
     * @throws RepositoryException
     */
    protected void changePasswordAliasKeystorePassword(RepositoryConfig config,
            String oldPassword, String newPassword) throws RepositoryException {
        final PEFileLayout layout = getFileLayout(config);
        final File passwordAliases = layout.getPasswordAliasKeystore();

        //Change the password of the keystore alias file
        if (passwordAliases.exists()) {
            try {
                PasswordAdapter p = new PasswordAdapter(passwordAliases.getAbsolutePath(),
View Full Code Here

    /**
     * Create JBI instance.
     */
    protected void createJBIInstance(String instanceName,
            RepositoryConfig config) throws RepositoryException {
        final PEFileLayout layout = getFileLayout(config);
        layout.createJBIDirectories();
        final TokenValueSet tvSet = new TokenValueSet();
        final String tvDelimiter = "@";
        final String tJbiInstanceName = "JBI_INSTANCE_NAME";
        final String tJbiInstanceRoot = "JBI_INSTANCE_ROOT";
        try {

            final TokenValue tvJbiInstanceName = new TokenValue(tJbiInstanceName,
                    instanceName, tvDelimiter);
            final TokenValue tvJbiInstanceRoot = new TokenValue(tJbiInstanceRoot,
                    layout.getRepositoryDir().getCanonicalPath(), tvDelimiter);
            tvSet.add(tvJbiInstanceName);
            tvSet.add(tvJbiInstanceRoot);
            final File src = layout.getJbiTemplateFile();
            final File dest = layout.getJbiRegistryFile();

            generateFromTemplate(tvSet, src, dest);

            final File httpConfigSrc = layout.getHttpBcConfigTemplate();
            final File httpConfigDest = layout.getHttpBcConfigFile();
            //tokens will be added in a follow-up integration
            final TokenValueSet httpTvSet = new TokenValueSet();
            generateFromTemplate(httpTvSet, httpConfigSrc, httpConfigDest);

            createHttpBCInstallRoot(layout);
View Full Code Here

    /**
     * Create MQ instance.
     */
    protected void createMQInstance(
            RepositoryConfig config) throws RepositoryException {
        final PEFileLayout layout = getFileLayout(config);
        final File broker = layout.getImqBrokerExecutable();
        final File mqVarHome = layout.getImqVarHome();
        try {
            FileUtils.mkdirsMaybe(mqVarHome);
            final List<String> cmdInput = new ArrayList<String>();
            cmdInput.add(broker.getAbsolutePath());
            cmdInput.add("-init");
View Full Code Here

    /**
     * Create the timer database wal file.
     */
    protected void createTimerWal(
            RepositoryConfig config) throws RepositoryException {
        final PEFileLayout layout = getFileLayout(config);
        final File src = layout.getTimerWalTemplate();
        final File dest = layout.getTimerWal();
        try {
            FileUtils.copy(src, dest);
        }
        catch (IOException ioe) {
            throw new RepositoryException(
View Full Code Here

    /**
     * Create the timer database dbn file.
     */
    protected void createTimerDbn(
            RepositoryConfig config) throws RepositoryException {
        final PEFileLayout layout = getFileLayout(config);
        final File src = layout.getTimerDbnTemplate();
        final File dest = layout.getTimerDbn();
        try {
            FileUtils.copy(src, dest);
        }
        catch (IOException ioe) {
            throw new RepositoryException(
View Full Code Here

       try {
          RepositoryConfig rc = new RepositoryConfig();
            String configDir = rc.getRepositoryRoot()+  File.separator +rc.getRepositoryName() +
                     File.separator+ rc.getInstanceName() +File.separator + "config";
          PEFileLayout layout = new PEFileLayout(rc);
          File src = new File(layout.getTemplatesDir(), PEFileLayout.LOGGING_PROPERTIES_FILE);
          File dest = new File (configDir, PEFileLayout.LOGGING_PROPERTIES_FILE);
            if  (!dest.exists())
                FileUtils.copy(src, dest);
            
      } catch (IOException ioe) {
View Full Code Here

        return x509DistinguishedName;  //must be of form "CN=..., OU=..."
    }

    protected PEFileLayout getFileLayout(RepositoryConfig config) {
        if (_fileLayout == null) {
            _fileLayout = new PEFileLayout(config);
        }
        return _fileLayout;
    }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.admin.servermgmt.pe.PEFileLayout

Copyright © 2018 www.massapicom. 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.