in core/src/main/java/org/apache/sling/cms/core/internal/models/PublishableResourceImpl.java [69:95]
public PublishableResourceImpl(@Self Resource resource) {
this.resource = resource;
this.created = resource.getValueMap().get(JcrConstants.JCR_CREATED, Calendar.class);
this.createdBy = resource.getValueMap().get(NodeTypeConstants.JCR_CREATEDBY, String.class);
if (CMSConstants.NT_CONFIG.equals(resource.getValueMap().get(JcrConstants.JCR_PRIMARYTYPE, String.class))) {
this.contentResource = resource;
} else {
this.contentResource = resource.getChild(JcrConstants.JCR_CONTENT);
}
if (this.contentResource != null) {
ValueMap properties = contentResource.getValueMap();
this.lastModified = properties.get(JcrConstants.JCR_LASTMODIFIED, Calendar.class);
this.lastModifiedBy = properties.get(NodeTypeConstants.JCR_LASTMODIFIEDBY, String.class);
this.lastPublication = properties.get(CMSConstants.PN_LAST_PUBLICATION, Calendar.class);
this.lastPublicationBy = properties.get(NodeTypeConstants.JCR_LASTMODIFIEDBY, String.class);
this.lastPublicationType = properties.get(CMSConstants.PN_LAST_PUBLICATION_TYPE, String.class);
this.published = properties.get(CMSConstants.PN_PUBLISHED,
properties.get(LEGACY_PUBLISHED_PROPERTY, false));
} else {
this.lastModified = null;
this.lastModifiedBy = null;
this.lastPublication = null;
this.lastPublicationBy = null;
this.lastPublicationType = null;
this.published = false;
}
}