/** * Reset the display name of this application. * * @param name the display name of the application. */ public void setName(String name) { name = name.replace('/', '-'); name = name.replace('\\', '-'); // for deploying from NT to solaris & vice versa. This will // need to be cleaned when we clean up the backend for registering apps super.setName(name); if (this.getRoleMapper() != null) { this.getRoleMapper().setName(name); } }
/** * Sets the registration name for this application. This name is used * while deploying the application. The deployment process gurantees * that this name is unique. * * @param appId the registration name used for this application */ public void setRegistrationName(String appId) { // at his point we need to swap our RoleMapper, if we have one... SecurityRoleMapper roleMapper = null; try { roleMapper = getRoleMapper(); } catch (IllegalArgumentException ignore) { } if (roleMapper != null) { SecurityRoleMapperFactory factory = habitat.getComponent(SecurityRoleMapperFactory.class); if (factory == null) { throw new IllegalArgumentException(localStrings.getLocalString( "enterprise.deployment.norolemapperfactorydefine", "This application has no role mapper factory defined")); } factory.removeRoleMapper(getName()); roleMapper.setName(appId); factory.setRoleMapper(appId, roleMapper); } this.registrationName = appId; }