def getLicenseAndHolderFromObject(self, obj): """ Get the copyright holder and license from an object. """ if ILicensable.providedBy(obj): lic = ILicense(obj) return lic.holder, lic.license else: return None
def getLicenseFromObject(self, obj): """ Get the copyright license for an object. """ if ILicensable.providedBy(obj): lic = ILicense(obj) return lic.license else: return None
def getHolderFromObject(self, obj): """ Get the copyright holder for an object. """ if ILicensable.providedBy(obj): lic = ILicense(obj) return lic.holder else: return None
def UpdateLicenseMetadataHandler(obj, event): """ Update License Metadata from request object. """ if ILicensable.providedBy(event.object): try: clutil = getUtility(IContentLicensingUtility) except: pass else: clutil.setObjLicense(event.object)
def setRightsHolder(self, obj, holder): """ Set the Dublin Core Extension RightsHolder field. """ if ILicensable.providedBy(obj): lic = ILicense(obj) lic.holder = holder
def setRightsLicense(self, obj, newLicense): """ Set the Dublin Core Extension field. """ if ILicensable.providedBy(obj): lic = ILicense(obj) lic.license = newLicense
def isLicensable(self, obj): """ Is an object licensable? """ return ILicensable.providedBy(obj)