📄 policyconstants.java
字号:
package com.sslexplorer.policyframework;
import com.sslexplorer.extensions.ApplicationShortcutResourceType;
import com.sslexplorer.properties.PropertyProfileResourceType;
import com.sslexplorer.security.AuthenticationSchemeResourceType;
import com.sslexplorer.tunnels.TunnelResourceType;
import com.sslexplorer.vfs.NetworkPlaceResourceType;
import com.sslexplorer.webforwards.WebForwardResourceType;
/**
* Constants used throughout the policy framework.
*
* @author Brett Smith <a href="mailto:brett@3sp.com"><brett@3sp.com></a>
* @version $Revision: 1.23 $
*/
public interface PolicyConstants {
/**
* A special policy with an ID of 0 is the 'Everyone' policy. All users are
* part of this policy.
*/
public final static int EVERYONE_POLICY_ID = 0;
/**
* The Id for the permission that allows users to create resources and
* assign policies to them.
*/
public final static int PERM_CREATE_AND_ASSIGN_ID = 1;
/**
* The Id for the permission that allows users to edit resources and assign
* policies to them.
*/
public final static int PERM_EDIT_AND_ASSIGN_ID = 2;
/**
* The Id for the permission that allows users to assign policies to
* resources.
*/
public final static int PERM_ASSIGN_ID = 3;
/**
* Id for permission that allows an item to be edited.
*/
public final static int PERM_EDIT_ID = 4;
/**
* Id for permission that allows an item to be created.
*/
public final static int PERM_CREATE_ID = 5;
/**
* Id for permission that allows items or resources to be deleted.
*/
public final static int PERM_DELETE_ID = 6;
/**
* Id for permission that allows resources to be copied.
*/
public final static int PERM_COPY_ID = 7;
/**
* Id for permission that allows configuration of policies within policies.
*/
public final static int PERM_NEST_ID = 8;
/**
* Id for generic permission that allows some item to be changed in some
* way.
*/
public static final int PERM_CHANGE_ID = 9;
/**
* Id for generic permission thats some item or resource to be viewed
* (although not neccessarily edited)
*/
public static final int PERM_VIEW_ID = 10;
/**
* Id for permission that allows some action to be performed.
*/
public static final int PERM_PERFORM_ID = 11;
/**
* Id for permission that allows some entity to be updated.
*/
public static final int PERM_UPDATE_ID = 12;
/**
* Id for permission that allows some entity to be installed
*/
public static final int PERM_INSTALL_ID = 13;
/**
* Id for permission that allows some type of entity to be maintained.
*
*/
public static final int PERM_MAINTAIN_ID = 14;
/**
* Id for permission that allows type of entity to be used.
*/
public static final int PERM_USE_ID = 15;
/**
* Id for permission that allows some type of sub-system to be controlled
*/
public static final int PERM_CONTROL_ID = 16;
/**
* Id for permission that allows some type of entity to be sent somewhere.
*/
public static final int PERM_SEND_ID = 17;
/**
* Id for permission that allows the server to be shutdown.
*/
public static final int PERM_SHUTDOWN_ID = 18;
/**
* Id for permission that allows the server to be restarted.
*/
public static final int PERM_RESTART_ID = 19;
/**
* Permission that allows users to create resources and assign policies to
* them.
*/
public final static Permission PERM_CREATE_EDIT_AND_ASSIGN = new Permission(PERM_CREATE_AND_ASSIGN_ID, "policyframework");
/**
* The permission that allows users to edit resources and assign policies to
* them.
*/
public final static Permission PERM_EDIT_AND_ASSIGN = new Permission(PERM_EDIT_AND_ASSIGN_ID, "policyframework");
/**
* Permission that allows an item to be created.
*/
public final static Permission PERM_CREATE = new Permission(PERM_CREATE_ID, "policyframework");
/**
* Permission that allows an item to be edited.
*/
public final static Permission PERM_EDIT = new Permission(PERM_EDIT_ID, "policyframework");
/**
* Permission that allows configuration of policies within policies.
*/
public final static Permission PERM_NEST = new Permission(PERM_NEST_ID, "policyframework");
/**
* Permission that allows items or resources to be deleted.
*/
public final static Permission PERM_DELETE = new Permission(PERM_DELETE_ID, "policyframework");
/**
* Permission that allows resources to be copied.
*/
public final static Permission PERM_COPY = new Permission(PERM_COPY_ID, "policyframework");
/**
* Generic permission that allows some item to be changed in some
* way.
*/
public final static Permission PERM_CHANGE = new Permission(PERM_CHANGE_ID, "policyframework");
/**
* Generic permission thats some item or resource to be viewed
* (although not neccessarily edited)
*/
public final static Permission PERM_VIEW = new Permission(PERM_VIEW_ID, "policyframework");
/**
* Permission that allows some action to be performed.
*/
public final static Permission PERM_PERFORM = new Permission(PERM_PERFORM_ID, "policyframework");
/**
* Permission that allows some entity to be installed
*/
public final static Permission PERM_INSTALL = new Permission(PERM_INSTALL_ID, "policyframework");
/**
* Permission that allows some entity to be updated
*/
public final static Permission PERM_UPDATE = new Permission(PERM_UPDATE_ID, "policyframework");
/**
* Permission that allows some entity or group of entities to be maintained
*/
public static final Permission PERM_MAINTAIN = new Permission(PERM_MAINTAIN_ID, "policyframework");
/**
* Permission that allows some entity or group of entities to be used
*/
public static final Permission PERM_USE = new Permission(PERM_USE_ID, "policyframework");
/**
* Permission that allows some entity or group of entities to be controlled
*/
public static final Permission PERM_CONTROL = new Permission(PERM_CONTROL_ID, "policyframework");
/**
* Permission that allows some entity or group of entities to be sent somewhere
*/
public static final Permission PERM_SEND = new Permission(PERM_SEND_ID, "policyframework");
/**
* Permission that allows the server to be shut down
*/
public static final Permission PERM_SHUTDOWN = new Permission(PERM_SHUTDOWN_ID, "policyframework");
/**
* Permission that allows the server to be restarted
*/
public static final Permission PERM_RESTART = new Permission(PERM_RESTART_ID, "policyframework");
/**
* permission that allows users to assign policies to resources.
*/
public static final Permission PERM_ASSIGN = new Permission(PERM_ASSIGN_ID, "policyframework");
/*
* Permission classes
*/
/**
* Permission class for <i>Delegation Resource Permissions</i>
*/
public final static String DELEGATION_CLASS = "delegation";
/**
* Permission class for <i>System Resource Permissions</i>
*/
public final static String SYSTEM_CLASS = "system";
/**
* Permission class for <i>Personal Resource Permissions</i>
*/
public final static String PERSONAL_CLASS = "personal";
/*
* Global Resource Permission Id's
*/
public final static int WEBFORWARD_RESOURCE_TYPE_ID = 0;
public final static int PROFILE_RESOURCE_TYPE_ID = 1;
public final static int NETWORK_PLACE_RESOURCE_TYPE_ID = 2;
public final static int APPLICATION_SHORTCUT_RESOURCE_TYPE_ID = 3;
public final static int SSL_TUNNEL_RESOURCE_TYPE_ID = 4;
public final static int POLICY_RESOURCE_TYPE_ID = 5;
public final static int RESOURCE_PERMISSION_RESOURCE_TYPE_ID = 6;
public final static ResourceType WEBFORWARD_RESOURCE_TYPE = new WebForwardResourceType();
public static final ResourceType PROFILE_RESOURCE_TYPE = new PropertyProfileResourceType(PROFILE_RESOURCE_TYPE_ID,
DELEGATION_CLASS);
public final static ResourceType NETWORK_PLACE_RESOURCE_TYPE = new NetworkPlaceResourceType();
public static final ResourceType APPLICATION_SHORTCUT_RESOURCE_TYPE = new ApplicationShortcutResourceType();
public static final ResourceType SSL_TUNNEL_RESOURCE_TYPE = new TunnelResourceType();
public static final ResourceType POLICY_RESOURCE_TYPE = new PolicyResourceType();
public static final ResourceType RESOURCE_PERMISSION_RESOURCE_TYPE = new ResourcePermissionResourceType();
// System Resource Permissions (delegatable)
public final static int SERVICE_CONTROL_RESOURCE_TYPE_ID = 1000; //
public final static int SYSTEM_CONFIGURATION_RESOURCE_TYPE_ID = 1001; //
public final static int KEYSTORE_RESOURCE_TYPE_ID = 1002; //
public final static int AUTHENTICATION_SCHEMES_RESOURCE_TYPE_ID = 1003;
public final static int ROLES_RESOURCE_TYPE_ID = 1004;
public final static int ACCOUNTS_RESOURCE_TYPE_ID = 1005;
public final static int IP_RESTRICTIONS_RESOURCE_TYPE_ID = 1006;
public final static int EXTENSIONS_RESOURCE_TYPE_ID = 1007; //
public final static int MESSAGE_QUEUE_RESOURCE_TYPE_ID = 1008;
public final static int STATUS_TYPE_RESOURCE_TYPE_ID = 1009;
public final static int REPLACEMENTS_RESOURCE_TYPE_ID = 1010;
public final static int USER_ATTRIBUTE_DEFINITIONS_RESOURCE_TYPE_ID = 1011;
public final static ResourceType SERVICE_CONTROL_RESOURCE_TYPE = new DefaultResourceType(SERVICE_CONTROL_RESOURCE_TYPE_ID,
"policyframework", SYSTEM_CLASS);
public static final ResourceType SYSTEM_CONFIGURATION_RESOURCE_TYPE = new DefaultResourceType(
SYSTEM_CONFIGURATION_RESOURCE_TYPE_ID, "policyframework", SYSTEM_CLASS);
public static final ResourceType KEYSTORE_RESOURCE_TYPE = new DefaultResourceType(KEYSTORE_RESOURCE_TYPE_ID, "policyframework",
SYSTEM_CLASS);
public static final ResourceType AUTHENTICATION_SCHEMES_RESOURCE_TYPE = new AuthenticationSchemeResourceType();
public static final ResourceType ROLES_RESOURCE_TYPE = new DefaultResourceType(ROLES_RESOURCE_TYPE_ID, "policyframework",
SYSTEM_CLASS);
public static final ResourceType ACCOUNTS_RESOURCE_TYPE = new DefaultResourceType(ACCOUNTS_RESOURCE_TYPE_ID, "policyframework",
SYSTEM_CLASS);
public static final ResourceType IP_RESTRICTIONS_RESOURCE_TYPE = new DefaultResourceType(IP_RESTRICTIONS_RESOURCE_TYPE_ID,
"policyframework", SYSTEM_CLASS);
public static final ResourceType EXTENSIONS_RESOURCE_TYPE = new DefaultResourceType(EXTENSIONS_RESOURCE_TYPE_ID,
"policyframework", SYSTEM_CLASS);
public static final ResourceType MESSAGE_QUEUE_RESOURCE_TYPE = new DefaultResourceType(MESSAGE_QUEUE_RESOURCE_TYPE_ID,
"policyframework", SYSTEM_CLASS);
public static final ResourceType STATUS_TYPE_RESOURCE_TYPE = new DefaultResourceType(STATUS_TYPE_RESOURCE_TYPE_ID,
"policyframework", SYSTEM_CLASS);
public static final ResourceType REPLACEMENTS_RESOURCE_TYPE = new DefaultResourceType(REPLACEMENTS_RESOURCE_TYPE_ID,
"policyframework", SYSTEM_CLASS);
public static final ResourceType USER_ATTRIBUTE_DEFINITIONS_RESOURCE_TYPE = new DefaultResourceType(USER_ATTRIBUTE_DEFINITIONS_RESOURCE_TYPE_ID,
"policyframework", SYSTEM_CLASS);
// Personal Resource Permissions (non-delegatable)
public final static int PERSONAL_PROFILE_RESOURCE_TYPE_ID = 2001;
public final static int PASSWORD_RESOURCE_TYPE_ID = 2002;
public final static int PERSONAL_DETAILS_RESOURCE_TYPE_ID = 2003;
public final static int VPN_CLIENT_RESOURCE_TYPE_ID = 2004;
public final static int FAVORITES_RESOURCE_TYPE_ID = 2005;
public final static int USER_ATTRIBUTES_RESOURCE_TYPE_ID = 2006;
public static final ResourceType PERSONAL_PROFILE_RESOURCE_TYPE = new PropertyProfileResourceType(
PERSONAL_PROFILE_RESOURCE_TYPE_ID, PERSONAL_CLASS);
public static final ResourceType PASSWORD_RESOURCE_TYPE = new DefaultResourceType(PASSWORD_RESOURCE_TYPE_ID, "policyframework",
PERSONAL_CLASS);
public static final ResourceType PERSONAL_DETAILS_RESOURCE_TYPE = new DefaultResourceType(PERSONAL_DETAILS_RESOURCE_TYPE_ID,
"policyframework", PERSONAL_CLASS);
public static final ResourceType VPN_CLIENT_RESOURCE_TYPE = new DefaultResourceType(VPN_CLIENT_RESOURCE_TYPE_ID,
"policyframework", PERSONAL_CLASS);
public static final ResourceType FAVORITES_RESOURCE_TYPE = new DefaultResourceType(FAVORITES_RESOURCE_TYPE_ID,
"policyframework", PERSONAL_CLASS);
public static final ResourceType USER_ATTRIBUTES_RESOURCE_TYPE = new DefaultResourceType(USER_ATTRIBUTES_RESOURCE_TYPE_ID,
"policyframework", PERSONAL_CLASS);;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -