/** * {@inheritDoc} */ @Override public void execute() throws CommandExecutionException { try { Map<SignatureType, SignatureFileInfo> sigFileInfos = signatureManager.getDefaultSignatures(); for (SignatureFileInfo info : sigFileInfos.values()) { printWriter.println(I18N.getResource(I18N.DEFAULT_SIGNATURE_VERSION, info.getType(), info.getVersion(), info.getFile().getFileName().toString())); } } catch (SignatureFileException e) { throw new CommandExecutionException(e); } }
/** * @throws CommandExecutionException */ private void updateDefaultVersion(String key) throws CommandExecutionException { final PropertiesConfiguration properties = globalConfig.getProperties(); properties.setProperty(mapping.get(type).getName(), key); try { properties.save(); SignatureFileInfo sigFileInfo = signatureManager.getDefaultSignatures().get(type); printWriter.println(I18N.getResource(I18N.CONFIGURE_SIGNATURE_FILE_VERSION_SUCCESS, sigFileInfo.getVersion(), sigFileInfo.getFile().getFileName().toString())); } catch (ConfigurationException e) { throw new CommandExecutionException(e); } catch (SignatureFileException e) { throw new CommandExecutionException(e); } };
signatures = signatureManager.getDefaultSignatures(); } catch (SignatureFileException e) { throw new ProfileManagerException(e.getMessage());
public void execute() throws CommandExecutionException { try { Map<SignatureType, SignatureFileInfo> sigs = signatureManager.getDefaultSignatures(); ProfileInstance profile = profileManager.createProfile(sigs); profile.changeState(ProfileState.VIRGIN);
signatures = signatureManager.getDefaultSignatures(); } catch (SignatureFileException e) { throw new ProfileManagerException(e.getMessage());