Search in sources :

Example 1 with RMSiteCompliance

use of org.alfresco.rm.rest.api.model.RMSiteCompliance in project records-management by Alfresco.

the class RMSitesImpl method getCompliance.

/**
 * Obtain compliance from site info
 *
 * @param siteInfo
 * @return
 */
private RMSiteCompliance getCompliance(SiteInfo siteInfo) {
    NodeRef nodeRef = siteInfo.getNodeRef();
    QName siteType = nodeService.getType(nodeRef);
    RMSiteCompliance compliance;
    if (RecordsManagementModel.TYPE_RM_SITE.equals(siteType)) {
        compliance = RMSiteCompliance.STANDARD;
    } else {
        compliance = RMSiteCompliance.DOD5015;
    }
    return compliance;
}
Also used : NodeRef(org.alfresco.service.cmr.repository.NodeRef) QName(org.alfresco.service.namespace.QName) RMSiteCompliance(org.alfresco.rm.rest.api.model.RMSiteCompliance)

Example 2 with RMSiteCompliance

use of org.alfresco.rm.rest.api.model.RMSiteCompliance in project records-management by Alfresco.

the class RMSitesImpl method getRMSite.

@Override
public RMSite getRMSite(String siteId) {
    Site site = getSite(siteId);
    SiteInfo siteInfo = siteService.getSite(siteId);
    RMSiteCompliance compliance = getCompliance(siteInfo);
    return new RMSite(site, compliance);
}
Also used : Site(org.alfresco.rest.api.model.Site) RMSite(org.alfresco.rm.rest.api.model.RMSite) SiteInfo(org.alfresco.service.cmr.site.SiteInfo) RMSite(org.alfresco.rm.rest.api.model.RMSite) RMSiteCompliance(org.alfresco.rm.rest.api.model.RMSiteCompliance)

Example 3 with RMSiteCompliance

use of org.alfresco.rm.rest.api.model.RMSiteCompliance in project records-management by Alfresco.

the class RMSitesImpl method createRMSite.

@Override
public RMSite createRMSite(RMSite rmSite, Parameters parameters) {
    RMSiteCompliance compliance = rmSite.getCompliance();
    if (compliance == null) {
        compliance = RMSiteCompliance.STANDARD;
    }
    Site site = createSite(rmSite, parameters);
    return new RMSite(site, compliance);
}
Also used : Site(org.alfresco.rest.api.model.Site) RMSite(org.alfresco.rm.rest.api.model.RMSite) RMSite(org.alfresco.rm.rest.api.model.RMSite) RMSiteCompliance(org.alfresco.rm.rest.api.model.RMSiteCompliance)

Example 4 with RMSiteCompliance

use of org.alfresco.rm.rest.api.model.RMSiteCompliance in project records-management by Alfresco.

the class RMSitesImpl method updateRMSite.

/**
 * Updates the RM site
 */
public RMSite updateRMSite(String siteId, SiteUpdate update, Parameters parameters) {
    Site updatedSite = updateSite(siteId, update, parameters);
    SiteInfo siteInfo = siteService.getSite(siteId);
    RMSiteCompliance compliance = getCompliance(siteInfo);
    return new RMSite(updatedSite, compliance);
}
Also used : Site(org.alfresco.rest.api.model.Site) RMSite(org.alfresco.rm.rest.api.model.RMSite) SiteInfo(org.alfresco.service.cmr.site.SiteInfo) RMSite(org.alfresco.rm.rest.api.model.RMSite) RMSiteCompliance(org.alfresco.rm.rest.api.model.RMSiteCompliance)

Aggregations

RMSiteCompliance (org.alfresco.rm.rest.api.model.RMSiteCompliance)4 Site (org.alfresco.rest.api.model.Site)3 RMSite (org.alfresco.rm.rest.api.model.RMSite)3 SiteInfo (org.alfresco.service.cmr.site.SiteInfo)2 NodeRef (org.alfresco.service.cmr.repository.NodeRef)1 QName (org.alfresco.service.namespace.QName)1