/**
  * @param SyndicationDistributionProfile $object_to_fill
  * @param array $props_to_skip
  * @return SyndicationDistributionProfile
  */
 public function toInsertableObject($object_to_fill = null, $props_to_skip = array())
 {
     if (is_null($object_to_fill)) {
         $object_to_fill = new SyndicationDistributionProfile();
     }
     kSyndicationFeedManager::validateXsl($this->xsl);
     return parent::toInsertableObject($object_to_fill, $props_to_skip);
 }
 /**
  * Add new Distribution Profile
  * 
  * @action add
  * @param KalturaDistributionProfile $distributionProfile
  * @return KalturaDistributionProfile
  * @throws ContentDistributionErrors::DISTRIBUTION_PROVIDER_NOT_FOUND
  */
 function addAction(KalturaDistributionProfile $distributionProfile)
 {
     $distributionProfile->validatePropertyMinLength("name", 1);
     $distributionProfile->validatePropertyNotNull("providerType");
     if (is_null($distributionProfile->status)) {
         $distributionProfile->status = KalturaDistributionProfileStatus::DISABLED;
     }
     $providerType = kPluginableEnumsManager::apiToCore('DistributionProviderType', $distributionProfile->providerType);
     $dbDistributionProfile = DistributionProfilePeer::createDistributionProfile($providerType);
     if (!$dbDistributionProfile) {
         throw new KalturaAPIException(ContentDistributionErrors::DISTRIBUTION_PROVIDER_NOT_FOUND, $distributionProfile->providerType);
     }
     $distributionProfile->toInsertableObject($dbDistributionProfile);
     $dbDistributionProfile->setPartnerId($this->impersonatedPartnerId);
     $dbDistributionProfile->save();
     $distributionProfile = KalturaDistributionProfileFactory::createKalturaDistributionProfile($dbDistributionProfile->getProviderType());
     $distributionProfile->fromObject($dbDistributionProfile);
     return $distributionProfile;
 }