Examples of PEFileLayout


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

    protected void changeS1ASAliasPassword(RepositoryConfig config,
        String storePassword, String oldKeyPassword, String newKeyPassword)
        throws RepositoryException
    {               
        if (!storePassword.equals(oldKeyPassword) && !oldKeyPassword.equals(newKeyPassword)) {
            final PEFileLayout layout = getFileLayout(config);
            final File src = layout.getTrustStoreTemplate();
            final File keystore = layout.getKeyStore();
            //First see if the alias exists. The user could have deleted it. Any failure in the
            //command indicates that the alias does not exist, so we return without error.
            String[] keytoolCmd = {               
                "-list",
                "-keystore", keystore.getAbsolutePath(),  
View Full Code Here

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

     * @param newKeyPassword
     */   
    protected void changeSSLCertificateDatabasePassword(RepositoryConfig config,
        String oldPassword, String newPassword) throws RepositoryException
    {
        final PEFileLayout layout = getFileLayout(config);
        File keystore = layout.getKeyStore();
        File truststore = layout.getTrustStore();              

        if (keystore.exists()) {
            //Change the password on the keystore      
            changeKeystorePassword(oldPassword, newPassword, keystore);           
            //Change the s1as alias password in the keystore...The assumption
View Full Code Here

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

    private static final StringManager strMgr =
    StringManager.getManager(PEDomainsManager.class);

    /** after the creation of domain.xml , unjar the bundled samples.jar. */   
    public void handleCreateEvent(DomainConfig cfg) throws DomainException {                       
        PEFileLayout layout = new PEFileLayout(cfg);
        File appsDir = layout.getInstallApplicationsDir();
        File domainDir = layout.getRepositoryDir();
        File jarFile = new File(appsDir, "samples.jar" );
       
        try{
            ZipFile file = new ZipFile(FileUtils.safeGetCanonicalPath(jarFile),
                                        FileUtils.safeGetCanonicalPath(domainDir));
View Full Code Here

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

        }
    }

    private Config getTemplateConfig(final String profile, final String tcn) throws IllegalArgumentException, ConfigException {
        final RepositoryConfig myRepos = new RepositoryConfig(); //all system properties are taken care of.
        final PEFileLayout layout = new PEFileLayout(myRepos);
        final File profileDomainXmlTemplate = new File(layout.getProfileFolder(profile), "sample-domain.xml");
        if (! profileDomainXmlTemplate.exists()) {
            final String msg = _strMgr.getString("template.domain.xml.not.found",
                    profileDomainXmlTemplate.getAbsolutePath(), profile);
            throw new IllegalArgumentException(msg);
        }
View Full Code Here

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

            int state = im.getInstanceStatus();
            boolean printMessage = (state == Status.kInstanceNotRunningCode);
            super.runCommand();
  
            if (printMessage) {
                String xmlPath = new PEFileLayout(config).getDomainConfigFile().getAbsolutePath();
                ConfigContext cc = ConfigFactory.createConfigContext(xmlPath);
                String sipPortsUsed = getSipListenerPorts(cc);
                CLILogger.getInstance().printDetailMessage(
                            getLocalizedString("PortsSipContainer", new Object[] {sipPortsUsed}));
            }
View Full Code Here

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

    private static final StringManager strMgr =
    StringManager.getManager(PEDomainsManager.class);

    /** after the creation of domain.xml , unjar the bundled samples.jar. */   
    public void handleCreateEvent(DomainConfig cfg) throws DomainException {                       
        PEFileLayout layout = new PEFileLayout(cfg);
        File appsDir = layout.getInstallApplicationsDir();
        File domainDir = layout.getRepositoryDir();
        File jarFile = new File(appsDir, "samples.jar" );
       
        try{
            ZipFile file = new ZipFile(FileUtils.safeGetCanonicalPath(jarFile),
                                        FileUtils.safeGetCanonicalPath(domainDir));
View Full Code Here

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

     * startserv & stopserv scripts.    
     * @param domainConfig
     */
    public static TokenValueSet getTokenValueSet(DomainConfig domainConfig)
    {
        final PEFileLayout layout = new PEFileLayout(domainConfig);

        final TokenValueSet tokens = new TokenValueSet();

        final String configRootDir = domainConfig.getConfigRoot();           
        TokenValue tv = new TokenValue(CONFIG_HOME, configRootDir);
        tokens.add(tv);

        final String instanceRoot =
            layout.getRepositoryDir().getAbsolutePath();
        tv = new TokenValue(INSTANCE_ROOT, instanceRoot);
        tokens.add(tv);

        final String instanceName = (String)domainConfig.get(DomainConfig.K_SERVERID);
        if((instanceName == null) || (instanceName.equals("")))
View Full Code Here

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

     * Sets the permissions for the domain directory, its config directory,
     * startserv/stopserv scripts etc.
     */
    protected void setPermissions(RepositoryConfig repositoryConfig) throws RepositoryException
    {               
        final PEFileLayout layout = getFileLayout(repositoryConfig);
        final File domainDir = layout.getRepositoryDir();
        try {               
            chmod("-R 755", domainDir);                                       
        } catch (Exception e) {
            throw new RepositoryException(
                _strMgr.getString("setPermissionError"), e);
View Full Code Here

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

     * operations will be authenticated against this file realm by default.
     * @see PEFileLayout#ADMIN_KEY_FILE
     */
    protected void createAdminKeyFile(final RepositoryConfig config, final String
        user, final String clearPwd) throws RepositoryException {
        final PEFileLayout layout = getFileLayout(config);
        final File src = layout.getKeyFileTemplate();
        final File dest = layout.getAdminKeyFile();     
        try {
            FileUtils.copy(src, dest);
            modifyKeyFile(dest, user, clearPwd);
        } catch (final Exception e) {
            throw new RepositoryException(_strMgr.getString("keyFileNotCreated"), e);
View Full Code Here

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

     * Create the FileRealm kefile from the given user and password.
     */
    protected void createKeyFile(RepositoryConfig config, String user,
        String password) throws RepositoryException
    {
        final PEFileLayout layout = getFileLayout(config);
        final File src = layout.getKeyFileTemplate();
        final File dest = layout.getKeyFile();
        try {
            FileUtils.copy(src, dest);
            /* This keyfile is simply a copy of the template as by default
               at the domain creation time, we do not add administrative user
               to it. J2EE application users will be added to this file later.
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.