Pass through to provider BinAdminSession.get_bin_form_for_update
439394
def get_bin_form(self, *args, **kwargs):
        """"""
        # Implemented from kitosid template for -
        # osid.resource.BinAdminSession.get_bin_form_for_update_template
        # This method might be a bit sketchy. Time will tell.
        if isinstance(args[-1], list) or 'bin_record_types' in kwargs:
            return self.get_bin_form_for_create(*args, **kwargs)
        else:
            return self.get_bin_form_for_update(*args, **kwargs)
620212
def get_comment_form(self, *args, **kwargs):
        """"""
        # Implemented from kitosid template for -
        # osid.resource.ResourceAdminSession.get_resource_form_for_update
        # This method might be a bit sketchy. Time will tell.
        if isinstance(args[-1], list) or 'comment_record_types' in kwargs:
            return self.get_comment_form_for_create(*args, **kwargs)
        else:
            return self.get_comment_form_for_update(*args, **kwargs)
787590
def _set_bin_view(self, session):
        """"""
        if self._bin_view == FEDERATED:
            try:
                session.use_federated_bin_view()
            except AttributeError:
                pass
        else:
            try:
                session.use_isolated_bin_view()
            except AttributeError:
                pass
631708
def get_log_form(self, *args, **kwargs):
        """"""
        # Implemented from kitosid template for -
        # osid.resource.BinAdminSession.get_bin_form_for_update_template
        # This method might be a bit sketchy. Time will tell.
        if isinstance(args[-1], list) or 'log_record_types' in kwargs:
            return self.get_log_form_for_create(*args, **kwargs)
        else:
            return self.get_log_form_for_update(*args, **kwargs)
214366
def get_form_kwargs(self):
        
        kwargs = super(AddUpdateMixin, self).get_form_kwargs()
        kwargs.update({'user': self.request.user})
        return kwargs
526743
function updatebin(){
  var bin = bininputfield;
  if(bininputvalue != bin){
    updateall(bininputtobin(bin));
    clearallinputs();
    bininputfield = bin;
    bininputvalue = bin;
  }
}
179600
def get_repository_form(self, *args, **kwargs):
        """"""
        # Implemented from kitosid template for -
        # osid.resource.BinAdminSession.get_bin_form_for_update_template
        # This method might be a bit sketchy. Time will tell.
        if isinstance(args[-1], list) or 'repository_record_types' in kwargs:
            return self.get_repository_form_for_create(*args, **kwargs)
        else:
            return self.get_repository_form_for_update(*args, **kwargs)
533003
def refresh(self, updated_self):

		'''
		
		'''

		logger.debug('refreshing binary attributes')
		self.mimetype = updated_self.binary.mimetype
		self.data = updated_self.binary.data
729891
def as_bin(self):
        """"""
        f = io.BytesIO()
        self.stream(f)
        return f.getvalue()
54210
def bin_upgrade(self):
        
        packages = self.args[1:]
        options = [
            "-u",
            "--upgradepkg"
        ]
        flag = ""
        flags = [
            "--dry-run",
            "--install-new",
            "--reinstall",
            "--verbose"
        ]
        if len(self.args) > 1 and self.args[0] in options:
            if self.args[1] in flags:
                flag = self.args[1]
                packages = self.args[2:]
            PackageManager(packages).upgrade(flag)
        else:
            usage("")
1132137
def get_relationship_form(self, *args, **kwargs):
        """"""
        # Implemented from kitosid template for -
        # osid.resource.ResourceAdminSession.get_resource_form_for_update
        # This method might be a bit sketchy. Time will tell.
        if isinstance(args[-1], list) or 'relationship_record_types' in kwargs:
            return self.get_relationship_form_for_create(*args, **kwargs)
        else:
            return self.get_relationship_form_for_update(*args, **kwargs)
224605
def save_bank(self, bank_form, *args, **kwargs):
        """"""
        # Implemented from kitosid template for -
        # osid.resource.BinAdminSession.update_bin
        if bank_form.is_for_update():
            return self.update_bank(bank_form, *args, **kwargs)
        else:
            return self.create_bank(bank_form, *args, **kwargs)
1891
def get_book_form(self, *args, **kwargs):
        """"""
        # Implemented from kitosid template for -
        # osid.resource.BinAdminSession.get_bin_form_for_update_template
        # This method might be a bit sketchy. Time will tell.
        if isinstance(args[-1], list) or 'book_record_types' in kwargs:
            return self.get_book_form_for_create(*args, **kwargs)
        else:
            return self.get_book_form_for_update(*args, **kwargs)
499243
def bin(self):
        
        if self.local_bin:
            return self.local_bin
        else:
            return self.config.bin(self.name)
1066731
def get_assessment_offered_form(self, *args, **kwargs):
        """"""
        # Implemented from kitosid template for -
        # osid.resource.ResourceAdminSession.get_resource_form_for_update
        # This method might be a bit sketchy. Time will tell.
        if isinstance(args[-1], list) or 'assessment_offered_record_types' in kwargs:
            return self.get_assessment_offered_form_for_create(*args, **kwargs)
        else:
            return self.get_assessment_offered_form_for_update(*args, **kwargs)
161841
function getBinPath(cmd, fn) {
  which(cmd, function(err, bin) {
    if (err) {
      return fn(err);
    }

    fs.exists(bin, function(exists) {
      if (!exists) {
        return fn(new Error(format(
          'Expected file for `%s` does not exist at `%s`',
          cmd, bin)));
      }
      fn(null, bin);
    });
  });
}
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