當前位置: 首頁>>代碼示例>>Java>>正文


Java RestEntity類代碼示例

本文整理匯總了Java中net.nuagenetworks.bambou.annotation.RestEntity的典型用法代碼示例。如果您正苦於以下問題:Java RestEntity類的具體用法?Java RestEntity怎麽用?Java RestEntity使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


RestEntity類屬於net.nuagenetworks.bambou.annotation包,在下文中一共展示了RestEntity類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getResourceUrl

import net.nuagenetworks.bambou.annotation.RestEntity; //導入依賴的package包/類
@JsonIgnore
protected String getResourceUrl(RestSession<?> session) {
    // Get the object's resource name
    RestEntity annotation = getClass().getAnnotation(RestEntity.class);
    String resourceName = annotation.resourceName();

    // Build the base URL
    String url = session.getRestBaseUrl();

    // Build the complete URL for the specified object
    if (id != null) {
        return String.format("%s/%s/%s", url, resourceName, id);
    } else {
        return String.format("%s/%s", url, resourceName);
    }
}
 
開發者ID:nuagenetworks,項目名稱:java-bambou,代碼行數:17,代碼來源:RestObject.java

示例2: getResourceUrl

import net.nuagenetworks.bambou.annotation.RestEntity; //導入依賴的package包/類
protected String getResourceUrl(RestSession<?> session) {
    // Get the object's resource name
    RestEntity annotation = getClass().getAnnotation(RestEntity.class);
    String resourceName = annotation.resourceName();

    // Build the base URL
    String url = session.getRestBaseUrl();

    return String.format("%s/%s", url, resourceName);
}
 
開發者ID:nuagenetworks,項目名稱:java-bambou,代碼行數:11,代碼來源:RestRootObject.java

示例3: getResourceUrlForChildType

import net.nuagenetworks.bambou.annotation.RestEntity; //導入依賴的package包/類
protected String getResourceUrlForChildType(RestSession<?> session, Class<?> childRestObjClass) {
    // Get the child object's resource name
    RestEntity annotation = childRestObjClass.getAnnotation(RestEntity.class);
    String resourceName = annotation.resourceName();

    return String.format("%s/%s", session.getRestBaseUrl(), resourceName);
}
 
開發者ID:nuagenetworks,項目名稱:java-bambou,代碼行數:8,代碼來源:RestRootObject.java

示例4: getResourceUrlForChildType

import net.nuagenetworks.bambou.annotation.RestEntity; //導入依賴的package包/類
@JsonIgnore
protected String getResourceUrlForChildType(RestSession<?> session, Class<?> childRestObjClass) {
    // Get the child object's resource name
    RestEntity annotation = childRestObjClass.getAnnotation(RestEntity.class);
    String childResourceName = annotation.resourceName();

    return String.format("%s/%s", getResourceUrl(session), childResourceName);
}
 
開發者ID:nuagenetworks,項目名稱:java-bambou,代碼行數:9,代碼來源:RestObject.java

示例5: getRestName

import net.nuagenetworks.bambou.annotation.RestEntity; //導入依賴的package包/類
@JsonIgnore
protected static String getRestName(Class<?> restObjClass) {
    RestEntity annotation = restObjClass.getAnnotation(RestEntity.class);
    return annotation.restName();
}
 
開發者ID:nuagenetworks,項目名稱:java-bambou,代碼行數:6,代碼來源:RestObject.java


注:本文中的net.nuagenetworks.bambou.annotation.RestEntity類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。