Pass through to provider CompositionLookupSession.use_comparative_composition_view
760021
def use_comparative_composition_view(self):
        """"""
        self._object_views['composition'] = COMPARATIVE
        # self._get_provider_session('composition_lookup_session') # To make sure the session is tracked
        for session in self._get_provider_sessions():
            try:
                session.use_comparative_composition_view()
            except AttributeError:
                pass
323019
function processCompositions( topPage, pageRef ) {

      return processNestedCompositions( topPage, pageRef, null, [] );

      function processNestedCompositions( page, pageRef, instanceId, compositionChain ) {

         page.debugInfo = {
            id: instanceId,
            name: page.name,
            path: page.path,
            //validate: validators.features.pages[ page.name ],
            compositions: [],
            [ FLAT ]: page.definition,
            [ COMPACT ]: deepClone( page.definition )
         };

         let promise = Promise.resolve();

         forEachArea( page, (items, areaName) => {
            items.slice().reverse().forEach( (item, index) => {
               if( item.enabled === false ) {
                  return;
               }
               ensureItemHasId( item );
               if( !has( item, 'composition' ) ) {
                  return;
               }

               const compositionRef = item.composition;
               if( compositionChain.indexOf( compositionRef ) !== -1 ) {
                  const chainString = compositionChain.concat( [ compositionRef ] ).join( ' -> ' );
                  const message = `Cycle in compositions detected: ${chainString}`;
                  throw formatError( topPage, message );
               }

               const itemPointer = `/areas/${areaName}/${items.length - index - 1}`;

               // Compositions must be loaded sequentially, because replacing the widgets in the page needs to
               // take place in order. Otherwise the order of widgets could be messed up.
               promise = promise
                  .then( () => prefixCompositionIds( lookup( compositionRef ), item ) )
                  .then( composition =>
                     processCompositionExpressions( composition, item, itemPointer, pageRef )
                  )
                  .then( composition => {
                     const chain = compositionChain.concat( composition.name );
                     return processNestedCompositions( composition, compositionRef, item.id, chain );
                  } )
                  .then( composition => {
                     page.debugInfo.compositions.push( composition.debugInfo );
                     mergeCompositionAreasWithPageAreas( composition, page.definition, items, item );
                     validateWidgetItems( composition, compositionRef );
                  } );
            } );
         } );

         return promise
            .then( () => page );
      }
   }
473480
def use_plenary_asset_composition_view(self):
        """"""
        self._object_views['asset_composition'] = PLENARY
        # self._get_provider_session('asset_composition_session') # To make sure the session is tracked
        for session in self._get_provider_sessions():
            try:
                session.use_plenary_asset_composition_view()
            except AttributeError:
                pass
206918
def _set_repository_view(self, session):
        """"""
        if self._repository_view == COMPARATIVE:
            try:
                session.use_comparative_repository_view()
            except AttributeError:
                pass
        else:
            try:
                session.use_plenary_repository_view()
            except AttributeError:
                pass
1358193
def use_comparative_asset_composition_view(self):
        """"""
        self._object_views['asset_composition'] = COMPARATIVE
        # self._get_provider_session('asset_composition_session') # To make sure the session is tracked
        for session in self._get_provider_sessions():
            try:
                session.use_comparative_asset_composition_view()
            except AttributeError:
                pass
11843
def use_comparative_sequence_rule_view(self):
        """"""
        self._object_views['sequence_rule'] = COMPARATIVE
        # self._get_provider_session('sequence_rule_lookup_session') # To make sure the session is tracked
        for session in self._get_provider_sessions():
            try:
                session.use_comparative_sequence_rule_view()
            except AttributeError:
                pass
169425
function UMLComponentInstanceView() {
        UMLGeneralNodeView.apply(this, arguments);
        this.containerChangeable = true;
        // mixin UMLComponentViewMixin
        _.extend(UMLComponentInstanceView.prototype, UMLComponentViewMixin);

        this.fillColor = PreferenceManager.get("uml.componentinstance.fillColor", "#ffffff") || PreferenceManager.get("view.fillColor", "#ffffff");
        this.stereotypeDisplay  = PreferenceManager.get("uml.component.stereotypeDisplay", UML.SD_LABEL);
    }
144795
public void openPreview(String resourcePath, String resourceType) {

        if (m_currentPreview != null) {
            m_currentPreview.removePreview();
        }
        String provider = getProviderName(resourceType);
        if (m_previewFactoryRegistration.containsKey(provider)) {
            m_handler.m_galleryDialog.useMaxDimensions();
            m_currentPreview = m_previewFactoryRegistration.get(provider).getPreview(m_handler.m_galleryDialog);
            m_currentPreview.openPreview(resourcePath, !m_resultsSelectable);
            m_handler.hideShowPreviewButton(false);
        } else {
            CmsDebugLog.getInstance().printLine(
                "Preview provider \"" + provider + "\" has not been registered properly.");
        }
    }
643478
def use_plenary_proficiency_view(self):
        """"""
        self._object_views['proficiency'] = PLENARY
        # self._get_provider_session('proficiency_lookup_session') # To make sure the session is tracked
        for session in self._get_provider_sessions():
            try:
                session.use_plenary_proficiency_view()
            except AttributeError:
                pass
995147
public ResolvedViewable resolveViewable(final Viewable viewable, final MediaType mediaType,
                                            final Class<?> resourceClass, final TemplateProcessor templateProcessor) {
        if (viewable.isTemplateNameAbsolute()) {
            return resolveAbsoluteViewable(viewable, resourceClass, mediaType, templateProcessor);
        } else {
            if (resourceClass == null) {
                throw new ViewableContextException(LocalizationMessages.TEMPLATE_RESOLVING_CLASS_CANNOT_BE_NULL());
            }

            return resolveRelativeViewable(viewable, resourceClass, mediaType, templateProcessor);
        }
    }
325799
def save_composition(self, composition_form, *args, **kwargs):
        """"""
        # Implemented from kitosid template for -
        # osid.resource.ResourceAdminSession.update_resource
        if composition_form.is_for_update():
            return self.update_composition(composition_form, *args, **kwargs)
        else:
            return self.create_composition(composition_form, *args, **kwargs)
1333628
function view(template, options = {}) {

	if(!template) {
		throw new Exception('Please pass a template!');
	}

	return Class => {

		let renderedFlag = !(options.renderedFlag === false);

		initCoreMap(storage, Class);
		initViewMap(storage, Class);

		let map = storage.get(Class);

		/**
		 * Its required when we use @style multiple times!
		 * Only once registration!
		 */
		if(map.get('@view').get('callbacksDefined')){
			return;
		}

		map.get('@callbacks').get('created').push((domNode, createVars = {}) => {

			// get and merge dom view var attributes
			let domViewAttributes = extractDomProperties(
				domNode, /^@view\.bind\.(\S+)$/i, true
			);

			// get the restof regular attributes
			let regularDomAttributes = extractDomProperties(domNode);

			let viewBinds = {};
			let entries = map.get('@view').get('bind');
			entries.forEach(([key, value]) => viewBinds[key] = value);

			let viewVars = Object.assign({},
				viewBinds,
				domViewAttributes,
				createVars,
				regularDomAttributes
			);

			// initialize view
			let $view = new View({
				prerenderer: HandlebarsRuntime.template,
				rootNode: domNode,
				vars: viewVars,
				template: template,
			});

			view.helper.registerSetGet(
				domNode,
				Object.assign({}, viewBinds, domViewAttributes)
			);

			// render view
			$view.render(null, {
				renderedFlag: renderedFlag,
			});

			domNode.$view = $view;
		});

		map.get('@callbacks').get('attached').push(domNode => {

			if(domNode.$view.initialized()){
				return;
			}

			/**
			 * Using the same instance is 30% faster in
			 * (Chrome, Opera) and no difference in Firefox
			 * @see: https://jsperf.com/new-class-vs-singleton
			 */
			domNode.$view.reinit({
				rootNode: domNode,
				prerenderer: HandlebarsRuntime.template,
			});
		});

		map.get('@callbacks').get('detached').push(domNode => {
			domNode.$view.destroy();
		});

		map.get('@view').set('callbacksDefined', true);
	}
}
1296748
void showVariationsWindow(String resource) {

        final Window window = CmsBasicDialog.prepareWindow(DialogWidth.max);
        CmsVariationsDialog variationsDialog = new CmsVariationsDialog(resource, new Runnable() {

            public void run() {

                window.close();

            }

        }, Mode.FlexCache);
        try {
            CmsResource resourceObject = getRootCms().readResource(CmsFlexCacheKey.getResourceName(resource));
            variationsDialog.displayResourceInfo(Collections.singletonList(resourceObject));
        } catch (CmsException e) {
            //
        }
        window.setCaption(CmsVaadinUtils.getMessageText(Messages.GUI_CACHE_VIEW_FLEX_VARIATIONS_1, resource));
        window.setContent(variationsDialog);
        UI.getCurrent().addWindow(window);
    }
208180
def use_unsequestered_composition_view(self):
        """"""
        self._containable_views['composition'] = UNSEQUESTERED
        # self._get_provider_session('composition_lookup_session') # To make sure the session is tracked
        for session in self._get_provider_sessions():
            try:
                session.use_unsequestered_composition_view()
            except AttributeError:
                pass
1037597
private Map<I_CmsResourceType, I_CmsPreviewProvider> getPreviewProviderForTypes(List<I_CmsResourceType> types) {

        Map<String, I_CmsPreviewProvider> previewProviderMap = new HashMap<String, I_CmsPreviewProvider>();
        Map<I_CmsResourceType, I_CmsPreviewProvider> typeProviderMapping = new HashMap<I_CmsResourceType, I_CmsPreviewProvider>();
        for (I_CmsResourceType type : types) {
            String providerClass = type.getGalleryPreviewProvider();
            if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(providerClass)) {
                providerClass = providerClass.trim();
                try {
                    if (previewProviderMap.containsKey(providerClass)) {
                        typeProviderMapping.put(type, previewProviderMap.get(providerClass));
                    } else {
                        I_CmsPreviewProvider previewProvider = (I_CmsPreviewProvider)Class.forName(
                            providerClass).newInstance();
                        previewProviderMap.put(providerClass, previewProvider);
                        typeProviderMapping.put(type, previewProvider);
                    }
                } catch (Exception e) {
                    logError(
                        new CmsException(
                            Messages.get().container(
                                Messages.ERR_INSTANCING_PREVIEW_PROVIDER_2,
                                providerClass,
                                type.getTypeName()),
                            e));
                }
            }
        }
        return typeProviderMapping;
    }
838994
function convertVal(converter, view, self, tagCtx, bindingPaths, text) {
		// self is template object or linkCtx object
		if (converter || bindingPaths) {
			var tmplConverter,
				linkCtx = !self.markup && self,
				tag = {
					_: {
						inline: !linkCtx
					},
					tagName:  converter + ":",
					tagCtx: tagCtx,
					flow: TRUE,
					_is: "tag"
				},
				args = tagCtx.args = slice.call(arguments, 5);

			tagCtx.view = view;
			tagCtx.bind = !!(linkCtx || bindingPaths);

			if (linkCtx) {
				linkCtx.tag = tag;
				tag.linkCtx = linkCtx;
				tagCtx.ctx = extendCtx(tagCtx.ctx, linkCtx.view.ctx);
			}
			tag.ctx = tagCtx.ctx || {};
			tagCtx.props = tagCtx.props || {};
			delete tagCtx.ctx;

			converter = converter !== "true" && converter; // If there is a convertBack but no convert, converter will be "true"

			if (converter && ((tmplConverter = view.getRsc("converters", converter)) || error("Unknown converter: {{"+ converter + ":"))) {
				// A call to {{cnvt: ... }} or {^{cnvt: ... }} or data-link="{cnvt: ... }"
				text = tmplConverter.apply(tag, args);
			}
			if (bindingPaths) {
				// A call to {^{: ... }} or {^{cnvt: ... }}
				bindingPaths = view.tmpl.bnds[bindingPaths-1];
				linkCtx.paths = bindingPaths;
				// Consider being able to switch off binding if parent view is not currently bound.

				view._.tag = tag; // Provide this tag on view, for addBindingMarkers^ on bound tags to add the tag
				// to view._.bnds, associated with the tag id, and for getting the tagCtx and linkCtx during
				// rendering, and so when rendering subsequent {{else}}, will be associated with this tag.
				//TODO does this work with nested elses and with {^{foo:...}} which also adds tag to view, for markerNodes.

				text = view._.onRender(text, view, TRUE);
	//Example:  text = '<script type="jsv123"></script>' + text + '<script type="jsv123/"></script>';
			}
		}
		return text;
	}
93598
function DiffProvider(serviceRegistry, filter) {
		var allReferences = serviceRegistry.getServiceReferences("orion.core.diff"); //$NON-NLS-0$
		var i, _references = allReferences;
		if (filter) {
			_references = [];
			for(i = 0; i < allReferences.length; ++i) {
				if (filter(allReferences[i])) {
					_references.push(allReferences[i]);
				}
			}
		}
		var _patterns = [];
		var _services = [];
		
		for(i = 0; i < _references.length; ++i) {
			_patterns[i] = new RegExp(_references[i].getProperty("pattern") || ".*");//$NON-NLS-1$ //$NON-NLS-0$
			_services[i] = serviceRegistry.getService(_references[i]);
		}

		this._getService = function(location) {
			location = _normalizeURL(location);
			for(var i = 0; i < _patterns.length; ++i) {
				if (_patterns[i].test(location)) {
					return _services[i];
				}
			}
			throw messages["NoDiffServiceLocationMatched"] + location;
		};
	}