You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2015/07/10 00:34:40 UTC
svn commit: r1690181 - in
/directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/model:
DnSpecStyleEnum.java DnSpecTypeEnum.java GroupTypeEnum.java
LimitSelectorEnum.java
Author: elecharny
Date: Thu Jul 9 22:34:39 2015
New Revision: 1690181
URL: http://svn.apache.org/r1690181
Log:
Added enum for the olcLimits
Added:
directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/model/DnSpecStyleEnum.java
directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/model/DnSpecTypeEnum.java
directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/model/GroupTypeEnum.java
directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/model/LimitSelectorEnum.java
Added: directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/model/DnSpecStyleEnum.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/model/DnSpecStyleEnum.java?rev=1690181&view=auto
==============================================================================
--- directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/model/DnSpecStyleEnum.java (added)
+++ directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/model/DnSpecStyleEnum.java Thu Jul 9 22:34:39 2015
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.directory.studio.openldap.common.ui.model;
+
+
+/**
+ * An enumeration of all the possible olcLimits selector dnspec style
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public enum DnSpecStyleEnum
+{
+ EXACT( "exact" ),
+ BASE( "base" ),
+ ONE_LEVEL( "onelevel" ),
+ SUBTREE( "subtree" ),
+ CHILDREN( "children" ),
+ REGEXP( "regexp" ),
+ ANONYMOUS( "anonymous" ),
+ NONE( "---" );
+
+ /** The associated name */
+ private String name;
+
+ /**
+ * Creates a dnspec style instance
+ */
+ private DnSpecStyleEnum( String name )
+ {
+ this.name = name;
+ }
+
+ /**
+ * @return the text
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+
+ /**
+ * Retrieve the instance associated to a String. Return NONE if not found.
+ *
+ * @param name The name to retrieve
+ * @return The DnSpecTypeEnum instance found, or NONE.
+ */
+ public static DnSpecStyleEnum getSelector( String name )
+ {
+ for ( DnSpecStyleEnum dnSpecStyle : values() )
+ {
+ if ( dnSpecStyle.name.equalsIgnoreCase( name ) )
+ {
+ return dnSpecStyle;
+ }
+ }
+
+ return NONE;
+ }
+}
Added: directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/model/DnSpecTypeEnum.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/model/DnSpecTypeEnum.java?rev=1690181&view=auto
==============================================================================
--- directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/model/DnSpecTypeEnum.java (added)
+++ directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/model/DnSpecTypeEnum.java Thu Jul 9 22:34:39 2015
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.directory.studio.openldap.common.ui.model;
+
+
+/**
+ * An enumeration of all the possible olcLimits selector dnspec type
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public enum DnSpecTypeEnum
+{
+ SELF( "self" ),
+ THIS( "this" ),
+ NONE( "---" );
+
+ /** The associated name */
+ private String name;
+
+ /**
+ * Creates a dnspec type instance
+ */
+ private DnSpecTypeEnum( String name )
+ {
+ this.name = name;
+ }
+
+ /**
+ * @return the text
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+
+ /**
+ * Retrieve the instance associated to a String. Return NONE if not found.
+ *
+ * @param name The name to retrieve
+ * @return The DnSpecTypeEnum instance found, or NONE.
+ */
+ public static DnSpecTypeEnum getSelector( String name )
+ {
+ for ( DnSpecTypeEnum dnSpecType : values() )
+ {
+ if ( dnSpecType.name.equalsIgnoreCase( name ) )
+ {
+ return dnSpecType;
+ }
+ }
+
+ return NONE;
+ }
+}
Added: directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/model/GroupTypeEnum.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/model/GroupTypeEnum.java?rev=1690181&view=auto
==============================================================================
--- directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/model/GroupTypeEnum.java (added)
+++ directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/model/GroupTypeEnum.java Thu Jul 9 22:34:39 2015
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.directory.studio.openldap.common.ui.model;
+
+
+/**
+ * An enumeration of all the possible olcLimits selector group type
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public enum GroupTypeEnum
+{
+ GROUP( "group" ),
+ GROUP_OC( "group/oc" ),
+ GROUP_OC_AC( "group/oc/ac" ),
+ NONE( "---" );
+
+ /** The associated name */
+ private String name;
+
+ /**
+ * Creates a group type instance
+ */
+ private GroupTypeEnum( String name )
+ {
+ this.name = name;
+ }
+
+ /**
+ * @return the text
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+
+ /**
+ * Retrieve the instance associated to a String. Return NONE if not found.
+ *
+ * @param name The name to retrieve
+ * @return The DnSpecTypeEnum instance found, or NONE.
+ */
+ public static GroupTypeEnum getSelector( String name )
+ {
+ for ( GroupTypeEnum groupType : values() )
+ {
+ if ( groupType.name.equalsIgnoreCase( name ) )
+ {
+ return groupType;
+ }
+ }
+
+ return NONE;
+ }
+}
Added: directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/model/LimitSelectorEnum.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/model/LimitSelectorEnum.java?rev=1690181&view=auto
==============================================================================
--- directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/model/LimitSelectorEnum.java (added)
+++ directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/model/LimitSelectorEnum.java Thu Jul 9 22:34:39 2015
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.directory.studio.openldap.common.ui.model;
+
+
+/**
+ * An enumeration of all the possible olcLimits selectors
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public enum LimitSelectorEnum
+{
+ ANONYMOUS( "anonymous" ),
+ USERS( "users" ),
+ DNSPEC( "dnspec" ),
+ GROUP( "group" ),
+ GROUP_OC( "group/oc" ),
+ GROUP_OC_AC( "group/oc/ac" ),
+ NONE( "---" );
+
+ /** The associated name */
+ private String name;
+
+ /**
+ * Creates a selector instance
+ */
+ private LimitSelectorEnum( String name )
+ {
+ this.name = name;
+ }
+
+ /**
+ * @return the text
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+
+ /**
+ * Retrieve the instance associated to a String. Return NONE if not found.
+ *
+ * @param name The name to retrieve
+ * @return The LimitSelectorEnum instance found, or NONE.
+ */
+ public static LimitSelectorEnum getSelector( String name )
+ {
+ for ( LimitSelectorEnum selector : values() )
+ {
+ if ( selector.name.equalsIgnoreCase( name ) )
+ {
+ return selector;
+ }
+ }
+
+ return NONE;
+ }
+}