DBA Data[Home] [Help]

PACKAGE: APPS.FND_OAM_DSCFG_PROPERTIES_PKG

Source


1 PACKAGE FND_OAM_DSCFG_PROPERTIES_PKG AUTHID CURRENT_USER as
2 /* $Header: AFOAMDSCPROPS.pls 120.2 2005/12/19 09:41 ilawler noship $ */
3 
4    ---------------
5    -- Constants --
6    ---------------
7    -- Property Datatypes and Names are stored in DSCFG_API_PKG.
8 
9    ---------------------------------
10    -- Public Procedures/Functions --
11    ---------------------------------
12 
13    -- This procedure adds a new property for a given parent type/id.  The configuration instance is checked to make
14    -- sure it's been initialized.  We don't check to see if the property already exists so we can have multi-valued properties
15    -- that are compiled into lists (e.g. ADDITIONAL_DOMAIN property).  No autonomous commit to allow atomic commit
16    -- with the parent.
17    -- Invariants:
18    --   Should only be called after a configuration instance has been created or set and an object has been created/queried.
19    -- Parameters:
20    --   p_parent_type           The type of object to which this property belongs. DSCFG_API_PKG.G_TYPE_*.
21    --   p_parent_id             The id of the object to which this property belongs.
22    --   p_property_name         Name in the Property Name-Value pair, has meaning in the context of the object type.
23    --                           These names are defined as DSCFG_API_PKG.G_PROP_* constants.
24    --   p_datatype              Data type of the property, based on DSCFG_API_PKG.G_DATATYPE_* constants.
25    --   p_canonical_value       Canonical, VARCHAR2, representation of the value in the Property Name-Value pair.
26    --
27    --   x_property_id:          The corresponding ID of the newly property.
28    -- Return Statuses:
29    --   Throws NO_DATA_FOUND if the configuration instance isn't initialized.
30    PROCEDURE ADD_PROPERTY(p_parent_type         IN VARCHAR2,
31                           p_parent_id           IN NUMBER,
32                           p_property_name       IN VARCHAR2,
33                           p_datatype            IN VARCHAR2,
34                           p_canonical_value     IN VARCHAR2,
35                           x_property_id         OUT NOCOPY NUMBER);
36 
37    -- Convenience wrapper on generic ADD_PROPERTY for datatype VARCHAR2
38    PROCEDURE ADD_PROPERTY(p_parent_type         IN VARCHAR2,
39                           p_parent_id           IN NUMBER,
40                           p_property_name       IN VARCHAR2,
41                           p_varchar2_value      IN VARCHAR2,
42                           x_property_id         OUT NOCOPY NUMBER);
43 
44    -- Convenience wrapper on generic ADD_PROPERTY for datatype NUMBER
45    PROCEDURE ADD_PROPERTY(p_parent_type         IN VARCHAR2,
46                           p_parent_id           IN NUMBER,
47                           p_property_name       IN VARCHAR2,
48                           p_number_value        IN NUMBER,
49                           x_property_id         OUT NOCOPY NUMBER);
50 
51    -- Convenience wrapper on generic ADD_PROPERTY for datatype DATE
52    PROCEDURE ADD_PROPERTY(p_parent_type         IN VARCHAR2,
53                           p_parent_id           IN NUMBER,
54                           p_property_name       IN VARCHAR2,
55                           p_date_value          IN DATE,
56                           x_property_id         OUT NOCOPY NUMBER);
57 
58    -- Convenience wrapper on generic ADD_PROPERTY for datatype BOOLEAN
59    PROCEDURE ADD_PROPERTY(p_parent_type         IN VARCHAR2,
60                           p_parent_id           IN NUMBER,
61                           p_property_name       IN VARCHAR2,
62                           p_boolean_value       IN BOOLEAN,
63                           x_property_id         OUT NOCOPY NUMBER);
64 
65    -- Convenience wrapper on generic ADD_PROPERTY for datatype ROWID
66    PROCEDURE ADD_PROPERTY_ROWID(p_parent_type           IN VARCHAR2,
67                                 p_parent_id             IN NUMBER,
68                                 p_property_name         IN VARCHAR2,
69                                 p_rowid_value           IN ROWID,
70                                 x_property_id           OUT NOCOPY NUMBER);
71 
72    -- Convenience wrapper on generic ADD_PROPERTY for datatype RAW
73    PROCEDURE ADD_PROPERTY_RAW(p_parent_type             IN VARCHAR2,
74                               p_parent_id               IN NUMBER,
75                               p_property_name           IN VARCHAR2,
76                               p_raw_value               IN RAW,
77                               x_property_id             OUT NOCOPY NUMBER);
78 
79    -- This procedure obtains the value for a given parent/property name.
80    -- Invariants:
81    --   None
82    -- Parameters:
83    --   p_parent_type           The type of object to which this property belongs. DSCFG_API_PKG.G_TYPE_*.
84    --   p_parent_id             The id of the object to which this property belongs.
85    --   p_property_name         Name in the Property Name-Value pair, has meaning in the context of the object type.
86    --                           These names are defined as DSCFG_API_PKG.G_PROP_* constants.
87    --
88    --   x_canonical_value:      The canonical_value of the corresponding property
89    -- Return Statuses:
90    --   NO_DATA_FOUND when property not found
91    --   TOO_MANY_ROWS when the property has more than one value
92    PROCEDURE GET_PROPERTY_CANONICAL_VALUE(p_parent_type         IN VARCHAR2,
93                                           p_parent_id           IN NUMBER,
94                                           p_property_name       IN VARCHAR2,
95                                           x_canonical_value     OUT NOCOPY VARCHAR2);
96 
97    -- Convenience wrapper on generic GET_PROPERTY_CANONICAL_VALUE for datatype VARCHAR2
98    PROCEDURE GET_PROPERTY_VALUE(p_parent_type           IN VARCHAR2,
99                                 p_parent_id             IN NUMBER,
100                                 p_property_name         IN VARCHAR2,
101                                 x_varchar2_value        OUT NOCOPY VARCHAR2);
102 
103    -- Convenience wrapper on generic GET_PROPERTY_CANONICAL_VALUE for datatype NUMBER
104    PROCEDURE GET_PROPERTY_VALUE(p_parent_type           IN VARCHAR2,
105                                 p_parent_id             IN NUMBER,
106                                 p_property_name         IN VARCHAR2,
107                                 x_number_value          OUT NOCOPY NUMBER);
108 
109    -- Convenience wrapper on generic GET_PROPERTY_CANONICAL_VALUE for datatype DATE
110    PROCEDURE GET_PROPERTY_VALUE(p_parent_type           IN VARCHAR2,
111                                 p_parent_id             IN NUMBER,
112                                 p_property_name         IN VARCHAR2,
113                                 x_date_value            OUT NOCOPY DATE);
114 
115 
116    -- This procedure tries to update a property and failing that adds the property. The configuration instance is checked to make
117    -- sure it's been initialized. No autonomous commit to allow atomic commit with the parent.
118    -- Invariants:
119    --   Should only be called after a configuration instance has been created or set and an object has been created/queried.
120    -- Parameters:
121    --   p_parent_type           The type of object to which this property belongs. DSCFG_API_PKG.G_TYPE_*.
122    --   p_parent_id             The id of the object to which this property belongs.
123    --   p_property_name         Name in the Property Name-Value pair, has meaning in the context of the object type.
124    --                           These names are defined as DSCFG_API_PKG.G_PROP_* constants.
125    --   p_datatype              Data type of the property, based on DSCFG_API_PKG.G_DATATYPE_* constants.
126    --   p_canonical_value       Canonical, VARCHAR2, representation of the value in the Property Name-Value pair.
127    --
128    --   x_property_id:          The corresponding ID of the newly property.
129    -- Return Statuses:
130    --   Throws NO_DATA_FOUND if the configuration instance isn't initialized.
131    PROCEDURE SET_OR_ADD_PROPERTY(p_parent_type          IN VARCHAR2,
132                                  p_parent_id            IN NUMBER,
133                                  p_property_name        IN VARCHAR2,
134                                  p_datatype             IN VARCHAR2,
135                                  p_canonical_value      IN VARCHAR2,
136                                  x_property_id          OUT NOCOPY NUMBER);
137 
138    -- Convenience wrapper on generic SET_OR_ADD_PROPERTY for datatype VARCHAR2
139    PROCEDURE SET_OR_ADD_PROPERTY(p_parent_type          IN VARCHAR2,
140                                  p_parent_id            IN NUMBER,
141                                  p_property_name        IN VARCHAR2,
142                                  p_varchar2_value       IN VARCHAR2,
143                                  x_property_id          OUT NOCOPY NUMBER);
144 
145    -- Convenience wrapper on generic SET_OR_ADD_PROPERTY for datatype NUMBER
146    PROCEDURE SET_OR_ADD_PROPERTY(p_parent_type          IN VARCHAR2,
147                                  p_parent_id            IN NUMBER,
148                                  p_property_name        IN VARCHAR2,
149                                  p_number_value         IN NUMBER,
150                                  x_property_id          OUT NOCOPY NUMBER);
151 
152    -- Convenience wrapper on generic SET_OR_ADD_PROPERTY for datatype DATE
153    PROCEDURE SET_OR_ADD_PROPERTY(p_parent_type          IN VARCHAR2,
154                                  p_parent_id            IN NUMBER,
155                                  p_property_name        IN VARCHAR2,
156                                  p_date_value           IN DATE,
157                                  x_property_id          OUT NOCOPY NUMBER);
158 
159    -- This procedure deletes all properties attached to a particular parent_type/id
160    -- Invariants:
161    --   None
162    -- Parameters:
163    --   p_parent_type:          The parent_type
164    --   p_parent_id:            The parent_id
165    -- Return Statuses:
166    --   TRUE on success, FALSE on failure.
167    FUNCTION DELETE_PROPERTIES(p_parent_type     IN VARCHAR2,
168                               p_parent_id       IN NUMBER)
169       RETURN BOOLEAN;
170 
171    -- This procedure deletes a property
172    -- Invariants:
173    --   None
174    -- Parameters:
175    --   p_property_id:          The property ID
176    -- Return Statuses:
177    --   TRUE on success, FALSE on failure.
178    FUNCTION DELETE_PROPERTY(p_property_id       IN NUMBER)
179       RETURN BOOLEAN;
180 
181 END FND_OAM_DSCFG_PROPERTIES_PKG;