code: void setContentDefinition(CmsContentDefinition definition) {
  
          if (m_availableLocales.isEmpty()) {
              // only set the locales when initially setting the content definition
              m_availableLocales.putAll(definition.getAvailableLocales());
              m_contentLocales.addAll(definition.getContentLocales());
          } else {
              m_contentLocales.add(definition.getLocale());
          }
          m_title = definition.getTitle();
          m_sitePath = definition.getSitePath();
          m_resourceTypeName = definition.getResourceType();
          m_registeredEntities.add(definition.getEntityId());
          String tabs = "";
          for (CmsTabInfo info : definition.getTabInfos()) {
              tabs += info.getTabId() + ":" + info.getStartName() + "   ";
          }
          CmsDebugLog.consoleLog("Tabs: " + tabs);
          m_tabInfos = definition.getTabInfos();
          m_iconClasses = definition.getIconClasses();
          addContentDefinition(definition);
          CmsDefaultWidgetService service = (CmsDefaultWidgetService)getWidgetService();
          service.addConfigurations(definition.getConfigurations());
          service.setSyncValues(definition.getSyncValues());
          service.setSkipPaths(definition.getSkipPaths());
          addEntityChangeHandler(definition.getEntityId(), new ValueChangeHandler<CmsEntity>() {
  
              public void onValueChange(ValueChangeEvent<CmsEntity> event) {
  
                  setChanged();
              }
          });
      }
docs: Sets the content definition.<p>
  
  @param definition the content definition