OW_SimpleAuthorizer.hpp

Go to the documentation of this file.
00001 /*******************************************************************************
00002 * Copyright (C) 2001-2004 Vintela, Inc. All rights reserved.
00003 *
00004 * Redistribution and use in source and binary forms, with or without
00005 * modification, are permitted provided that the following conditions are met:
00006 *
00007 *  - Redistributions of source code must retain the above copyright notice,
00008 *    this list of conditions and the following disclaimer.
00009 *
00010 *  - Redistributions in binary form must reproduce the above copyright notice,
00011 *    this list of conditions and the following disclaimer in the documentation
00012 *    and/or other materials provided with the distribution.
00013 *
00014 *  - Neither the name of Vintela, Inc. nor the names of its
00015 *    contributors may be used to endorse or promote products derived from this
00016 *    software without specific prior written permission.
00017 *
00018 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00019 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00020 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00021 * ARE DISCLAIMED. IN NO EVENT SHALL Vintela, Inc. OR THE CONTRIBUTORS
00022 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
00023 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
00024 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00025 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
00026 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
00027 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00028 * POSSIBILITY OF SUCH DAMAGE.
00029 *******************************************************************************/
00030 
00035 #ifndef OW_SIMPLE_AUTHORIZER_HPP_INCLUDE_GUARD_
00036 #define OW_SIMPLE_AUTHORIZER_HPP_INCLUDE_GUARD_
00037 #include "OW_config.h"
00038 #include "OW_AuthorizerIFC.hpp"
00039 #include "OW_IntrusiveReference.hpp"
00040 
00041 namespace OW_NAMESPACE
00042 {
00043 
00044 // defined in the .cpp
00045 class AccessMgr;
00046 
00047 // This class is responsible for Access control.
00048 class SimpleAuthorizer : public AuthorizerIFC
00049 {
00050 public:
00054    SimpleAuthorizer();
00058    virtual ~SimpleAuthorizer();
00059 
00060    virtual String getName() const;
00061    virtual void setSubRepositoryIFC(const RepositoryIFCRef& rep);
00066    virtual void open(const String& path);
00070    virtual void close();
00071    virtual ServiceEnvironmentIFCRef getEnvironment() const;
00072    AuthorizerIFC* clone() const;
00073 
00074 #ifndef OW_DISABLE_INSTANCE_MANIPULATION
00075 
00081    virtual void createNameSpace(const String& ns, OperationContext& context);
00088    virtual void deleteNameSpace(const String& ns, OperationContext& context);
00089 #endif // #ifndef OW_DISABLE_INSTANCE_MANIPULATION
00090 
00097    virtual void enumNameSpace(StringResultHandlerIFC& result,
00098       OperationContext& context);
00108    virtual CIMQualifierType getQualifierType(const String& ns,
00109       const String& qualifierName,
00110       OperationContext& context);
00111 #ifndef OW_DISABLE_QUALIFIER_DECLARATION
00112 
00119    virtual void enumQualifierTypes(
00120       const String& ns,
00121       CIMQualifierTypeResultHandlerIFC& result,
00122       OperationContext& context);
00129    virtual void deleteQualifierType(const String& ns, const String& qualName,
00130       OperationContext& context);
00140    virtual void setQualifierType(const String& ns,
00141       const CIMQualifierType& qt, OperationContext& context);
00142 #endif // #ifndef OW_DISABLE_QUALIFIER_DECLARATION
00143 
00167    virtual CIMClass getClass(
00168       const String& ns,
00169       const String& className,
00170       WBEMFlags::ELocalOnlyFlag localOnly, WBEMFlags::EIncludeQualifiersFlag includeQualifiers,
00171       WBEMFlags::EIncludeClassOriginFlag includeClassOrigin, const StringArray* propertyList,
00172       OperationContext& context);
00173 #ifndef OW_DISABLE_SCHEMA_MANIPULATION
00174 
00191    virtual CIMClass deleteClass(const String& ns, const String& className,
00192       OperationContext& context);
00208    virtual void createClass(const String& ns, const CIMClass& cimClass,
00209       OperationContext& context);
00230    virtual CIMClass modifyClass(
00231       const String& ns,
00232       const CIMClass& cc,
00233       OperationContext& context);
00234 #endif // #ifndef OW_DISABLE_SCHEMA_MANIPULATION
00235 
00257    virtual void enumClasses(const String& ns,
00258       const String& className,
00259       CIMClassResultHandlerIFC& result,
00260       WBEMFlags::EDeepFlag deep, WBEMFlags::ELocalOnlyFlag localOnly, WBEMFlags::EIncludeQualifiersFlag includeQualifiers,
00261       WBEMFlags::EIncludeClassOriginFlag includeClassOrigin, OperationContext& context);
00281    virtual void enumClassNames(const String& ns,
00282       const String& className,
00283       StringResultHandlerIFC& result,
00284       WBEMFlags::EDeepFlag deep, OperationContext& context);
00311    virtual void enumInstances(
00312       const String& ns,
00313       const String& className,
00314       CIMInstanceResultHandlerIFC& result,
00315       WBEMFlags::EDeepFlag deep,
00316       WBEMFlags::ELocalOnlyFlag localOnly,
00317       WBEMFlags::EIncludeQualifiersFlag includeQualifiers,
00318       WBEMFlags::EIncludeClassOriginFlag includeClassOrigin,
00319       const StringArray* propertyList,
00320       WBEMFlags::EEnumSubclassesFlag enumSubclasses,
00321       OperationContext& context);
00342    virtual void enumInstanceNames(
00343       const String& ns,
00344       const String& className,
00345       CIMObjectPathResultHandlerIFC& result,
00346       WBEMFlags::EDeepFlag deep, OperationContext& context);
00370    virtual CIMInstance getInstance(
00371       const String& ns,
00372       const CIMObjectPath& instanceName,
00373       WBEMFlags::ELocalOnlyFlag localOnly, WBEMFlags::EIncludeQualifiersFlag includeQualifiers,
00374       WBEMFlags::EIncludeClassOriginFlag includeClassOrigin, const StringArray* propertyList,
00375       OperationContext& context);
00376 #ifndef OW_DISABLE_INSTANCE_MANIPULATION
00377 
00391    virtual CIMInstance deleteInstance(const String& ns, const CIMObjectPath& cop,
00392       OperationContext& context);
00408    virtual CIMObjectPath createInstance(const String& ns,
00409       const CIMInstance& ci,
00410       OperationContext& context);
00429    virtual CIMInstance modifyInstance(
00430       const String& ns,
00431       const CIMInstance& modifiedInstance,
00432       WBEMFlags::EIncludeQualifiersFlag includeQualifiers,
00433       const StringArray* propertyList,
00434       OperationContext& context);
00435 #if !defined(OW_DISABLE_PROPERTY_OPERATIONS)
00436 
00444    virtual void setProperty(
00445       const String& ns,
00446       const CIMObjectPath& name, const String& propertyName,
00447       const CIMValue& cv, OperationContext& context);
00448 #endif // #if !defined(OW_DISABLE_PROPERTY_OPERATIONS)
00449 #endif // #ifndef OW_DISABLE_INSTANCE_MANIPULATION
00450 
00451 #if !defined(OW_DISABLE_PROPERTY_OPERATIONS)
00452 
00461    virtual CIMValue getProperty(
00462       const String& ns,
00463       const CIMObjectPath& name,
00464       const String& propertyName, OperationContext& context);
00465 #endif // #if !defined(OW_DISABLE_PROPERTY_OPERATIONS)
00466 
00479    virtual CIMValue invokeMethod(
00480       const String& ns,
00481       const CIMObjectPath& path,
00482       const String& methodName, const CIMParamValueArray& inParams,
00483       CIMParamValueArray& outParams, OperationContext& context);
00484 #ifndef OW_DISABLE_ASSOCIATION_TRAVERSAL
00485    virtual void associatorNames(
00486       const String& ns,
00487       const CIMObjectPath& path,
00488       CIMObjectPathResultHandlerIFC& result,
00489       const String& assocClass,
00490       const String& resultClass, const String& role,
00491       const String& resultRole, OperationContext& context);
00492    virtual void associators(
00493       const String& ns,
00494       const CIMObjectPath& path,
00495       CIMInstanceResultHandlerIFC& result,
00496       const String& assocClass,
00497       const String& resultClass, const String& role,
00498       const String& resultRole,  WBEMFlags::EIncludeQualifiersFlag includeQualifiers,
00499       WBEMFlags::EIncludeClassOriginFlag includeClassOrigin, const StringArray* propertyList,
00500       OperationContext& context);
00501    virtual void associatorsClasses(
00502       const String& ns,
00503       const CIMObjectPath& path,
00504       CIMClassResultHandlerIFC& result,
00505       const String& assocClass,
00506       const String& resultClass, const String& role,
00507       const String& resultRole,  WBEMFlags::EIncludeQualifiersFlag includeQualifiers,
00508       WBEMFlags::EIncludeClassOriginFlag includeClassOrigin, const StringArray* propertyList,
00509       OperationContext& context);
00510    virtual void referenceNames(
00511       const String& ns,
00512       const CIMObjectPath& path,
00513       CIMObjectPathResultHandlerIFC& result,
00514       const String& resultClass,
00515       const String& role, OperationContext& context);
00516    virtual void references(
00517       const String& ns,
00518       const CIMObjectPath& path,
00519       CIMInstanceResultHandlerIFC& result,
00520       const String& resultClass,
00521       const String& role, WBEMFlags::EIncludeQualifiersFlag includeQualifiers,
00522       WBEMFlags::EIncludeClassOriginFlag includeClassOrigin, const StringArray* propertyList,
00523       OperationContext& context);
00524    
00525    virtual void referencesClasses(
00526       const String& ns,
00527       const CIMObjectPath& path,
00528       CIMClassResultHandlerIFC& result,
00529       const String& resultClass,
00530       const String& role, WBEMFlags::EIncludeQualifiersFlag includeQualifiers,
00531       WBEMFlags::EIncludeClassOriginFlag includeClassOrigin, const StringArray* propertyList,
00532       OperationContext& context);
00533 #endif // #ifndef OW_DISABLE_ASSOCIATION_TRAVERSAL
00534    
00547    virtual void execQuery(
00548       const String& ns,
00549       CIMInstanceResultHandlerIFC& result,
00550       const String &query, const String& queryLanguage,
00551       OperationContext& context);
00552 
00553 private:
00554 
00555    virtual void beginOperation(WBEMFlags::EOperationFlag op, OperationContext& context);
00556    virtual void endOperation(WBEMFlags::EOperationFlag op, OperationContext& context, WBEMFlags::EOperationResultFlag result);
00557 
00558    IntrusiveReference<AccessMgr> m_accessMgr;
00559    
00560    RepositoryIFCRef m_cimRepository;
00561 };
00562 
00563 } // end namespace OW_NAMESPACE
00564 
00565 #endif

Generated on Thu Feb 9 08:48:11 2006 for openwbem by  doxygen 1.4.6