00001
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #ifndef _PERSPRODNODE_I_H_
00034 #define _PERSPRODNODE_I_H_
00035
00036
00037
00038
00039
00040
00041
00042
00043 #include "persprodnodeS.h"
00044 #include "servantlocators.h"
00045
00046
00047 namespace OSB_LIB {
00048 class PersProduct;
00049 class PersProductNode;
00050 class ProductNode;
00051 }
00052
00053 namespace OSB_CORBA {
00054 class ContractAdmin_i;
00055 class PersProductWriter_i;
00056 }
00057
00058
00059
00060 namespace OSB_CORBA {
00061 using namespace corba::cadmin::persproditem;
00062 using namespace corba::cadmin::persprodnode;
00063
00064 using corba::cadmin::PersItemId;
00065 using corba::cadmin::PersNodeId;
00066 using corba::cadmin::Status;
00067 using corba::cadmin::StatusHistory;
00068 using corba::cadmin::StatusRequest;
00069 using corba::cadmin::StatusValue;
00070 using corba::common::CfgErrorSeq_out;
00071 using corba::common::DateTime;
00072 using corba::common::Utf8String;
00073 using corba::pcat::pp::PpTypeId;
00074 using corba::pcat::pp::ProductPartId;
00075
00079 class PersProdNodeWriter_i :
00080 public virtual POA_corba::cadmin::persprodnode::PersProdNodeWriter
00081 {
00082 public :
00083
00084 static const std::string IFC;
00085
00087 PersProdNodeWriter_i (
00088 ContractAdmin_i& cadmin,
00089 PersProductWriter_i& ppServant,
00090 const OSB_LIB::ProductNode* pn,
00091 OSB_LIB::PersProductNode* ppn
00092 );
00093
00094 virtual ~PersProdNodeWriter_i();
00095
00096 public:
00098 const Locators::Key& key() const
00099 {
00100 return key_;
00101 }
00102
00104 virtual PersNodeId id()
00105 throw (CORBA::SystemException);
00106
00108 virtual ProductPartId prodPartId()
00109 throw (CORBA::SystemException);
00110
00112 virtual Utf8String* name()
00113 throw (CORBA::SystemException, OsbCorbaException);
00114
00119 virtual Utf8String* desc()
00120 throw (CORBA::SystemException, OsbCorbaException);
00121
00123 virtual PpTypeId type()
00124 throw (CORBA::SystemException, OsbCorbaException);
00125
00127 virtual DateTime* createdDate()
00128 throw (CORBA::SystemException);
00129
00131 virtual Status effStatus()
00132 throw (CORBA::SystemException);
00133
00135 virtual Status prefStatus()
00136 throw (CORBA::SystemException);
00137
00139 virtual DateTime* effStatusDate()
00140 throw (CORBA::SystemException);
00141
00143 virtual DateTime* prefStatusDate()
00144 throw (CORBA::SystemException);
00145
00157 virtual StatusValue requestedStatus(
00158 const DateTime& ts
00159 ) throw (CORBA::SystemException, OsbCorbaException);
00160
00173 StatusHistory* statusHistory(
00174 const DateTime& from,
00175 const DateTime& to,
00176 CORBA::Boolean noWait
00177 ) throw (CORBA::SystemException, OsbCorbaException);
00178
00182 virtual PersProdItemSeq* getConfigs()
00183 throw (CORBA::SystemException, OsbCorbaException);
00184
00192 virtual PersProdItemWriter* getConfig(
00193 const PersItemId& id
00194 ) throw (CORBA::SystemException, OsbCorbaException);
00195
00197 virtual PersProdItemWriter* currentConfig()
00198 throw (CORBA::SystemException, OsbCorbaException);
00199
00213 virtual PersProdItemWriter_ptr creNewConfig()
00214 throw (CORBA::SystemException, OsbCorbaException);
00215
00226 virtual CORBA::Boolean removeConfig(
00227 const PersItemId& id,
00228 CORBA::Boolean noWait
00229 ) throw (CORBA::SystemException, OsbCorbaException);
00230
00231 private:
00237 OSB_LIB::PersProduct* persProduct();
00238
00239 private:
00241 typedef std::list<Locators::Key> Servants;
00242
00244 ContractAdmin_i& cadmin_;
00246 PersProductWriter_i& ppServant_;
00247
00249 const OSB_LIB::ProductNode* pn_;
00250
00252 OSB_LIB::PersProductNode* ppn_;
00253
00255 Servants ppiServants_;
00256
00258 Locators::Key key_;
00259 };
00260 }
00261 #endif // #ifndef _ASSOCIATE_I_H_