Pass through to provider ResourceBinSession.use_comparative_bin_view
10793
def use_comparative_bin_view(self):
        """"""
        self._bin_view = COMPARATIVE
        # self._get_provider_session('resource_bin_session') # To make sure the session is tracked
        for session in self._get_provider_sessions():
            try:
                session.use_comparative_bin_view()
            except AttributeError:
                pass
263439
def use_comparative_assessment_view(self):
        """"""
        self._object_views['assessment'] = COMPARATIVE
        # self._get_provider_session('assessment_lookup_session') # To make sure the session is tracked
        for session in self._get_provider_sessions():
            try:
                session.use_comparative_assessment_view()
            except AttributeError:
                pass
48008
def use_comparative_family_view(self):
        """"""
        self._family_view = COMPARATIVE
        # self._get_provider_session('family_lookup_session') # To make sure the session is tracked
        for session in self._get_provider_sessions():
            try:
                session.use_comparative_family_view()
            except AttributeError:
                pass
1227534
def use_any_status_composition_view(self):
        """"""
        self._operable_views['composition'] = ANY_STATUS
        # self._get_provider_session('composition_lookup_session')  # To make sure the session is tracked
        for session in self._get_provider_sessions():
            try:
                session.use_any_status_composition_view()
            except AttributeError:
                pass
58696
def _set_hierarchy_view(self, session):
        """"""
        if self._hierarchy_view == COMPARATIVE:
            try:
                session.use_comparative_hierarchy_view()
            except AttributeError:
                pass
        else:
            try:
                session.use_plenary_hierarchy_view()
            except AttributeError:
                pass
211578
function loadBinary (file, callback) {
  if (isPlask) {
    loadBinaryPlask(file, callback)
  } else {
    loadBinaryBrowser(file, callback)
  }
}
972483
def use_federated_bin_view(self):
        """"""
        self._bin_view = FEDERATED
        # self._get_provider_session('resource_lookup_session') # To make sure the session is tracked
        for session in self._get_provider_sessions():
            try:
                session.use_federated_bin_view()
            except AttributeError:
                pass
1209464
def use_comparative_composition_repository_view(self):
        """"""
        self._repository_view = COMPARATIVE
        # self._get_provider_session('composition_repository_session') # To make sure the session is tracked
        for session in self._get_provider_sessions():
            try:
                session.use_comparative_repository_view()
            except AttributeError:
                pass
491723
synchronized void loadImageIfNecessary(final boolean isInLayoutPass) {
        int width = getWidth();
        int height = getHeight();

        boolean wrapWidth = false, wrapHeight = false;
        if (getLayoutParams() != null) {
            wrapWidth = getLayoutParams().width == LayoutParams.WRAP_CONTENT;
            wrapHeight = getLayoutParams().height == LayoutParams.WRAP_CONTENT;
        }

        // if the view's bounds aren't known yet, and this is not a wrap-content/wrap-content
        // view, hold off on loading the image.
        boolean isFullyWrapContent = wrapWidth && wrapHeight;
        if (width == 0 && height == 0 && !isFullyWrapContent) {
            return;
        }

        // if the URL to be loaded in this view is empty, cancel any old requests and clear the
        // currently loaded image.
        if (TextUtils.isEmpty(url)) {
            if (imageContainer != null) {
                imageContainer.cancelRequest();
                imageContainer = null;
            }
            setDefaultImageOrNull();
            return;
        }

        // if there was an old request in this view, check if it needs to be canceled.
        if (imageContainer != null && imageContainer.getRequestUrl() != null) {
            if (imageContainer.getRequestUrl().equals(url)) {
                // if the request is from the same URL, return.
                return;
            } else {
                // if there is a pre-existing request, cancel it if it's fetching a different URL.
                imageContainer.cancelRequest();
                setDefaultImageOrNull();
            }
        }

        // Calculate the max image width / height to use while ignoring WRAP_CONTENT dimens.
        int maxWidth = wrapWidth ? 0 : width;
        int maxHeight = wrapHeight ? 0 : height;

        // The pre-existing content of this view didn't match the current URL. Load the new image
        // from the network.
        ImageContainer newContainer = imageLoader.get(url,
                new ImageListener() {
                    @Override
                    public void onError(JusError error) {
                        if (errorImageId != 0) {
                            setImageResource(errorImageId);
                        }
                    }

                    @Override
                    public void onResponse(final ImageContainer response, boolean isImmediate) {
                        //verify if we expect the same url
                        if (NetworkImageView.this.url == null ||
                                !NetworkImageView.this.url.equals(response.getRequestUrl())) {
                            JusLog.error("NetworkImageView received: " + response.getRequestUrl()
                                    + ", expected: " + NetworkImageView.this.url);
                            return;
                        }

                        // If this was an immediate response that was delivered inside of a layout
                        // pass do not set the image immediately as it will trigger a requestLayout
                        // inside of a layout. Instead, defer setting the image by posting back to
                        // the main threadId.
                        if (isImmediate && isInLayoutPass) {
                            post(new Runnable() {
                                @Override
                                public void run() {
                                    onResponse(response, false);
                                }
                            });
                            return;
                        }

                        if (response.getBitmap() != null && isOk2Draw(response.getBitmap())) {
                            setImageBitmap(response.getBitmap());
                        } else if (defaultImageId != 0) {
                            if (!isImmediate) {
                                JusLog.error("NetworkImageView received null for: " + response
                                        .getRequestUrl());
                            }
                            setImageResource(defaultImageId);
                        }
                    }
                }, maxWidth, maxHeight, tag);

        // update the ImageContainer to be the new bitmap container.
        imageContainer = newContainer;
    }
357444
def as_view(cls, view_type, *init_args, **init_kwargs):
        
        global _method

        new_cls = type(
            cls.__name__ + '_' + _BridgeMixin.__name__ + '_restless',
            (_BridgeMixin, cls._request_handler_base_,),
            dict(
                __resource_cls__=cls,
                __resource_args__=init_args,
                __resource_kwargs__=init_kwargs,
                __resource_view_type__=view_type)
        )

        """
        Add required http-methods to the newly created class
        We need to scan through MRO to find what functions users declared,
        and then add corresponding http-methods used by Tornado.
        """
        bases = inspect.getmro(cls)
        bases = bases[0:bases.index(Resource)-1]
        for k, v in cls.http_methods[view_type].items():
            if any(v in base_cls.__dict__ for base_cls in bases):
                setattr(new_cls, k.lower(), _method)

        return new_cls
264630
def use_comparative_assessment_part_bank_view(self):
        """"""
        self._bank_view = COMPARATIVE
        # self._get_provider_session('assessment_part_bank_session') # To make sure the session is tracked
        for session in self._get_provider_sessions():
            try:
                session.use_comparative_bank_view()
            except AttributeError:
                pass
1125023
@Override
	protected void performGlobalBundleLinksRendering(BundleRendererContext ctx, Writer out, boolean debugOn)
			throws IOException {

		if (isForcedToRenderIeCssBundleInDebug(ctx, debugOn)) {
			ResourceBundlePathsIterator resourceBundleIterator = bundler.getGlobalResourceBundlePaths(
					DebugMode.FORCE_NON_DEBUG_IN_IE, new ConditionalCommentRenderer(out), ctx.getVariants());
			while (resourceBundleIterator.hasNext()) {
				BundlePath globalBundlePath = resourceBundleIterator.nextPath();
				renderIeCssBundleLink(ctx, out, globalBundlePath);
			}
		} else {

			super.performGlobalBundleLinksRendering(ctx, out, debugOn);
		}
	}
1371899
def use_comparative_assessment_taken_view(self):
        """"""
        self._object_views['assessment_taken'] = COMPARATIVE
        # self._get_provider_session('assessment_taken_lookup_session') # To make sure the session is tracked
        for session in self._get_provider_sessions():
            try:
                session.use_comparative_assessment_taken_view()
            except AttributeError:
                pass
522292
def _set_book_view(self, session):
        """"""
        if self._book_view == COMPARATIVE:
            try:
                session.use_comparative_book_view()
            except AttributeError:
                pass
        else:
            try:
                session.use_plenary_book_view()
            except AttributeError:
                pass
568415
def use_comparative_gradebook_view(self):
        """"""
        self._gradebook_view = COMPARATIVE
        # self._get_provider_session('grade_system_gradebook_session') # To make sure the session is tracked
        for session in self._get_provider_sessions():
            try:
                session.use_comparative_gradebook_view()
            except AttributeError:
                pass
1166416
def _set_family_view(self, session):
        """"""
        if self._family_view == COMPARATIVE:
            try:
                session.use_comparative_family_view()
            except AttributeError:
                pass
        else:
            try:
                session.use_plenary_family_view()
            except AttributeError:
                pass
810842
private void createViewIfNotExist(Map<String, MapReduce> views, String columnName)
    {
        if (views.get(columnName) == null)
        {
            createView(views, columnName);
        }
    }