class FileConnection implements ObjectStoreConnection {

    @Override
    public boolean updateDomain(Domain domain) {

        final String caller = "updateDomain";
        DomainStruct domainStruct = getDomainStruct(domain.getName());
        if (domainStruct == null) {
            throw ZMSUtils.error(ResourceException.NOT_FOUND, "domain not found", caller);
        }

        verifyDomainProductIdUniqueness(domain.getName(), domain.getYpmId(), caller);

        domainStruct.setId(domain.getId());
        domainStruct.setName(domain.getName());
        domainStruct.setModified(Timestamp.fromCurrentTime());
        DomainMeta meta = new DomainMeta()
                .setAccount(domain.getAccount())
                .setAuditEnabled(domain.getAuditEnabled())
                .setDescription(domain.getDescription())
                .setEnabled(domain.getEnabled())
                .setOrg(domain.getOrg())
                .setYpmId(domain.getYpmId())
                .setApplicationId(domain.getApplicationId())
                .setCertDnsDomain(domain.getCertDnsDomain())
                .setMemberExpiryDays(domain.getMemberExpiryDays())
                .setServiceExpiryDays(domain.getServiceExpiryDays())
                .setTokenExpiryMins(domain.getTokenExpiryMins())
                .setServiceCertExpiryMins(domain.getServiceCertExpiryMins())
                .setRoleCertExpiryMins(domain.getRoleCertExpiryMins())
                .setSignAlgorithm(domain.getSignAlgorithm());
        domainStruct.setMeta(meta);
        putDomainStruct(domain.getName(), domainStruct);
        return true;
    }

    public  FileConnection(File rootDir, File quotaDir);

}