Update the request URI to get the pdf for this resource.

        Args:
            resource_id (integer): The group id.
348180
def pdf(self, resource_id):
        
        self.resource_id(str(resource_id))
        self._request_uri = '{}/pdf'.format(self._request_uri)
1258122
def tag(self, resource_id):
        
        self._request_uri = '{}/{}'.format(self._request_uri, self.tcex.safetag(resource_id))
443387
private void updateFormAction(String id) {

        setAction(
            CmsXmlContentUgcApi.SERVICE_URL
                + "?"
                + CmsUgcConstants.PARAM_FORM_DATA_ID
                + "="
                + id
                + "&"
                + CmsUgcConstants.PARAM_SESSION_ID
                + "="
                + m_formSession.getSessionId());
    }
514362
async def download(self, resource_url):
        '''
        
        '''
        resolver_path = self.find_path_from_url(resource_url)
        await self.apply_resolver_path(resource_url, resolver_path)
198007
def _update_resource_view(self, log=False):
        # type: () -> bool
        
        update = False
        if 'id' in self.data and self._load_from_hdx('resource view', self.data['id']):
            update = True
        else:
            if 'resource_id' in self.data:
                resource_views = self.get_all_for_resource(self.data['resource_id'])
                for resource_view in resource_views:
                    if self.data['title'] == resource_view['title']:
                        self.old_data = self.data
                        self.data = resource_view.data
                        update = True
                        break
        if update:
            if log:
                logger.warning('resource view exists. Updating %s' % self.data['id'])
            self._merge_hdx_update('resource view', 'id')
        return update
740883
def generate(self, id_or_uri):
        
        uri = self._client.build_uri(id_or_uri) + "/generate"
        return self._client.get(uri)
745522
def update_resource(self, resource):
        ''''''
        index = self.resources.index(resource)
        data = {
            'resources__{index}'.format(index=index): resource
        }
        self.update(**data)
        self.reload()
        post_save.send(self.__class__, document=self)
469501
def update_resource(uri, r, content_type)
      clear
      uri = URI.parse(uri)
      @req = Net::HTTP::Put.new uri.request_uri
      @req['Content-Type'] = content_type
      cache = @cache.get(uri.to_s)
      unless cache.nil?
        @req['If-Not-Modified-Since'] = cache.last_modofied unless cache.last_modified.nil?
        @req['If-Match'] = cache.etag unless cache.etag.nil?
      end
      set_common_info(@req)
      @req.body = r
      @http_class.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http|
        @res = http.request(@req)
        case @res
          when Net::HTTPSuccess
            #warn "Bad Status Code: #{@res.code}" unless @res.class == Net::HTTPOK || @res.class == Net::HTTPNoContent
            unless @res.body.nil?
              @rc = Atom::MediaType::ENTRY.is_a?(@res['Content-Type']) ? Atom::Entry.new(:stream => @res.body) : @res.body
              @cache.put uri.to_s, {
                :rc            => @rc,
                :etag          => @res['ETag'],
                :last_modified => @res['Last-Modified'] }
            end
          else
            raise RequestError, "Failed to update resource. #{@res.code}"
        end
      end
    end
189693
def put(self, id):
        
        try:
            #Async update flow
            object_ = json_util.loads(self.request.body)

            toa = self.request.headers.get("Caesium-TOA", None)

            obj_check = yield self.client.find_one_by_id(id)
            if not obj_check:
                self.raise_error(404, "Resource not found: %s" % id)
                self.finish()
                return

            if toa:

                stack = AsyncSchedulableDocumentRevisionStack(self.client.collection_name, self.settings, master_id=id)
                revision_id = yield stack.push(object_, int(toa), meta=self._get_meta_data())

                if isinstance(revision_id, str):
                    self.set_header("Caesium-TOA", toa)

                    #We add the id of the original request, because we don't want to infer this
                    #On the client side, as the state of the client code could change easily
                    #We want this request to return with the originating ID as well.
                    object_["id"] = id
                    self.return_resource(object_)
                else:
                    self.raise_error(404, "Revision not scheduled for object: %s" % id)

            else:
                if object_.get("_id"):
                    del object_["_id"]

                response = yield self.client.update(id, object_)

                if response.get("updatedExisting"):
                    object_ = yield self.client.find_one_by_id(id)
                    self.return_resource(object_)
                else:
                    self.raise_error(404, "Resource not found: %s" % id)

        except ValidationError as vex:
            self.logger.error("%s validation error" % self.object_name, vex)
            self.raise_error(400, "Your %s cannot be updated because it is missing required fields, see docs" % self.object_name)
        except ValueError as ex:
            self.raise_error(400, "Invalid JSON Body, check formatting. %s" % ex[0])
        except InvalidId as ex:
            self.raise_error(message="Your ID is malformed: %s" % id)
        except Exception as ex:
            self.logger.error(ex)
            self.raise_error()
821246
@com.fasterxml.jackson.annotation.JsonProperty("resourceId")
    public void setResourceId(String resourceId) {
        this.resourceId = resourceId;
    }
565188
def offer_pdf(self, offer_id):
        
        return self._create_get_request(resource=OFFERS, billomat_id=offer_id, command=PDF)
1117233
public static Uri getUriForResourceId(int resourceId) {
    return new Uri.Builder()
        .scheme(LOCAL_RESOURCE_SCHEME)
        .path(String.valueOf(resourceId))
        .build();
  }
962956
def _update_asset_content_url_to_match_id(self, ac):
        """"""
        mgr = self._provider_session._get_provider_manager('REPOSITORY')
        aas = mgr.get_asset_admin_session_for_repository(self._provider_session._catalog_id,
                                                         proxy=self._provider_session._proxy)
        form = aas.get_asset_content_form_for_update(ac.ident)

        url = ac._my_map['url']
        old_url = os.path.splitext(os.path.basename(url))[0]
        new_url = url.replace(old_url, ac.ident.identifier)

        form.set_url(new_url)
        return aas.update_asset_content(form)
73778
async def get_resource(self, resource_id: int) -> dict:
        """"""
        resource = await self.request.get(
            join_path(self._base_path, str(resource_id))
        )
        self._sanitize_resource(self._get_to_actual_data(resource))
        return resource
156411
public void updateTree(CmsUUID id) {

        CmsObject cms = A_CmsUI.getCmsObject();
        updateResourceInTree(cms, id);

    }
1183895
def update_resource_attribute(resource_attr_id, is_var, **kwargs):
    
    user_id = kwargs.get('user_id')
    try:
        ra = db.DBSession.query(ResourceAttr).filter(ResourceAttr.id == resource_attr_id).one()
    except NoResultFound:
        raise ResourceNotFoundError("Resource Attribute %s not found"%(resource_attr_id))

    ra.check_write_permission(user_id)

    ra.is_var = is_var

    return 'OK'
426493
def get(self, resource_id):
        
        response = self.requester.get(
            '/{endpoint}/{entity}/{id}',
            endpoint=self.endpoint, entity=self.entity, id=resource_id,
            paginate=False
        )
        return response.json()