Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
SIX OVAL - http://code.google.com/p/six-oval/ Copyright (C) 2010 National Institute of Advanced Industrial Science and Technology (AIST) Registration Number: H22PRO-1124 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
 
 package jp.go.aist.six.oval.model.windows;
 
The sharedresource state defines the different metadata associated with a Windows shared resource.

Author(s):
Akihito Nakamura, AIST
Version:
$Id: SharedResourceState.java 3046 2013-02-21 09:33:57Z nakamura5akihito@gmail.com $
See also:
OVAL Language
 
 public class SharedResourceState
     extends StateType
 {
 
     //{0..1}
     private EntityStateStringType   netname;
     private EntityStateSharedResourceTypeType      shared_type;
     private EntityStateIntType      max_uses;
     private EntityStateIntType      current_uses;
     private EntityStateStringType   local_path;
     private EntityStateBoolType     access_read_permission;
     private EntityStateBoolType     access_write_permission;
     private EntityStateBoolType     access_create_permission;
     private EntityStateBoolType     access_exec_permission;
     private EntityStateBoolType     access_delete_permission;
     private EntityStateBoolType     access_atrib_permission;
     private EntityStateBoolType     access_perm_permission;
     private EntityStateBoolType     access_all_permission;



    
Constructor.
 
     public SharedResourceState()
     {
         thisnull, 0 );
     }
 
 
     public SharedResourceState(
                     final String id,
                     final int version
                     )
     {
         thisidversionnull );
     }
 
 
     public SharedResourceState(
                     final String id,
                     final int version,
                     final String comment
                     )
     {
         superidversioncomment );
 
 //        _oval_platform_type = OvalPlatformType.windows;
 //        _oval_component_type = OvalComponentType.sharedresource;
          = .;
     }



    
 
     public void setNetname(
                     final EntityStateStringType netname
                    )
    {
        this. = netname;
    }
    {
        return ;
    }



    
    public void setSharedType(
                    final EntityStateSharedResourceTypeType shared_type
                    )
    {
        this. = shared_type;
    }
    {
        return ;
    }



    
    public void setMaxUses(
                    final EntityStateIntType max_uses
                    )
    {
        this. = max_uses;
    }
    {
        return ;
    }



    
    public void setCurrentUses(
                    final EntityStateIntType current_uses
                    )
    {
        this. = current_uses;
    }
    {
        return ;
    }



    
    public void setLocalPath(
                    final EntityStateStringType local_path
                    )
    {
        this. = local_path;
    }
    {
        return ;
    }



    
    public void setAccessReadPermission(
                    final EntityStateBoolType access_read_permission
                    )
    {
        this. = access_read_permission;
    }
    {
        return ;
    }



    
    public void setAccessWritePermission(
                    final EntityStateBoolType access_write_permission
                    )
    {
        this. = access_write_permission;
    }
    {
        return ;
    }



    
    public void setAccessCreatePermission(
                    final EntityStateBoolType access_create_permission
                    )
    {
        this. = access_create_permission;
    }
    {
        return ;
    }



    
    public void setAccessExecPermission(
                    final EntityStateBoolType access_exec_permission
                    )
    {
        this. = access_exec_permission;
    }
    {
        return ;
    }



    
    public void setAccessDeletePermission(
                    final EntityStateBoolType access_delete_permission
                    )
    {
        this. = access_delete_permission;
    }
    {
        return ;
    }



    
    public void setAccessAtribPermission(
                    final EntityStateBoolType access_atrib_permission
                    )
    {
        this. = access_atrib_permission;
    }
    {
        return ;
    }



    
    public void setAccessPermPermission(
                    final EntityStateBoolType access_perm_permission
                    )
    {
        this. = access_perm_permission;
    }
    {
        return ;
    }



    
    public void setAccessAllPermission(
                    final EntityStateBoolType access_all_permission
                    )
    {
        this. = access_all_permission;
    }
    {
        return ;
    }
    //*********************************************************************
    //  DefinitionsElement
    //*********************************************************************
    @Override
    {
        Collection<ElementRef>  ref_list = new ArrayList<ElementRef>();
        ref_list.addgetNetname() );
        ref_list.addgetSharedType() );
        ref_list.addgetMaxUses() );
        ref_list.addgetCurrentUses() );
        ref_list.addgetLocalPath() );
        ref_list.addgetAccessReadPermission() );
        ref_list.addgetAccessWritePermission() );
        ref_list.addgetAccessCreatePermission() );
        ref_list.addgetAccessExecPermission() );
        ref_list.addgetAccessDeletePermission() );
        ref_list.addgetAccessAtribPermission() );
        ref_list.addgetAccessPermPermission() );
        ref_list.addgetAccessAllPermission() );
        return ref_list;
    }
    //**************************************************************
    //  java.lang.Object
    //**************************************************************
    @Override
    public int hashCode()
    {
        return super.hashCode();
    }
    @Override
    public boolean equals(
                    final Object obj
                    )
    {
        if (!(obj instanceof SharedResourceState)) {
            return false;
        }
        return super.equalsobj );
    }
    @Override
    public String toString()
    {
        return "sharedresource_state[" + super.toString()
             + ", netname="                     + getNetname()
             + ", shared_type="                 + getSharedType()
             + ", max_uses="                    + getMaxUses()
             + ", current_users="               + getCurrentUses()
             + ", local_path="                  + getLocalPath()
             + ", access_read_permission="      + getAccessReadPermission()
             + ", access_write_permission="     + getAccessWritePermission()
             + ", access_create_permission="    + getAccessCreatePermission()
             + ", access_exec_permission="      + getAccessExecPermission()
             + ", access_delete_permission="    + getAccessDeletePermission()
             + ", access_atrib_permission="     + getAccessAtribPermission()
             + ", access_perm_permission="      + getAccessPermPermission()
             + ", access_all_permission="       + getAccessAllPermission()
             + "]";
    }
//SharedResourceState
New to GrepCode? Check out our FAQ X