summaryrefslogtreecommitdiff
path: root/src/com/google/wireless/gdata/spreadsheets/data/SpreadsheetEntry.java
blob: a10837b909df8e2f02ee810dd0f4b1fb6cb65f56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Copyright 2007 The Android Open Source Project
package com.google.wireless.gdata.spreadsheets.data;

import com.google.wireless.gdata.GDataException;
import com.google.wireless.gdata.data.Entry;
import com.google.wireless.gdata.data.StringUtils;

/**
 * Represents an entry in a GData Spreadsheets meta-feed.
 */
public class SpreadsheetEntry extends Entry {
    /** The URI of the worksheets meta-feed for this spreadsheet */
    private String worksheetsUri = null;

    /**
     * Fetches the URI of the worksheets meta-feed (that is, list of worksheets)
     * for this spreadsheet.
     * 
     * @return the worksheets meta-feed URI
     * @throws GDataException if the unique key is not set
     */
    public String getWorksheetFeedUri() throws GDataException {
        if (StringUtils.isEmpty(worksheetsUri)) {
            throw new GDataException("worksheet URI is not set");
        }
        return worksheetsUri;
    }

    /**
     * Sets the URI of the worksheet meta-feed corresponding to this
     * spreadsheet.
     * 
     * @param href
     */
    public void setWorksheetFeedUri(String href) {
        worksheetsUri = href;
    }
}